побреюсь налысо если это пофиксило баг
This commit is contained in:
parent
a4d42e67e0
commit
68bbb38b82
|
|
@ -1 +1 @@
|
|||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./react-you-ui6.js"),u=require("./string_utils-Bad7L8P5.js"),c=t=>{const r=i.usePalette(),{style:o,color:e=u.hexFromArgb(r.primary),...s}=t;return n.jsx("a",{style:{color:e,textDecorationColor:e,textDecoration:"underline",...o},...s})};exports.Link=c;
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("react"),i=require("./react-you-ui6.js"),a=require("./string_utils-Bad7L8P5.js"),l=require("./create-component-D9KTUrcf.js"),u=l.o({tagName:"a",elementClass:HTMLAnchorElement,react:c}),m=t=>{const r=i.usePalette(),{style:o,color:e=a.hexFromArgb(r.primary),...n}=t;return s.jsx(u,{style:{color:e,textDecorationColor:e,textDecoration:"underline",...o},...n})};exports.Link=m;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,27 @@
|
|||
import { jsx as s } from "react/jsx-runtime";
|
||||
import { usePalette as i } from "./react-you-ui6.mjs";
|
||||
import { h as m } from "./string_utils-B4bsIQ5w.mjs";
|
||||
const p = (o) => {
|
||||
const r = i(), { style: e, color: t = m(r.primary), ...n } = o;
|
||||
return /* @__PURE__ */ s(
|
||||
"a",
|
||||
import { jsx as n } from "react/jsx-runtime";
|
||||
import a from "react";
|
||||
import { usePalette as s } from "./react-you-ui6.mjs";
|
||||
import { h as c } from "./string_utils-B4bsIQ5w.mjs";
|
||||
import { o as l } from "./create-component-CVXl33PD.mjs";
|
||||
const i = l({
|
||||
tagName: "a",
|
||||
elementClass: HTMLAnchorElement,
|
||||
react: a
|
||||
}), y = (o) => {
|
||||
const e = s(), { style: r, color: t = c(e.primary), ...m } = o;
|
||||
return /* @__PURE__ */ n(
|
||||
i,
|
||||
{
|
||||
style: {
|
||||
color: t,
|
||||
textDecorationColor: t,
|
||||
textDecoration: "underline",
|
||||
...e
|
||||
...r
|
||||
},
|
||||
...n
|
||||
...m
|
||||
}
|
||||
);
|
||||
};
|
||||
export {
|
||||
p as Link
|
||||
y as Link
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
export interface AriaProps {
|
||||
'aria-label'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
'aria-describedby'?: string;
|
||||
'aria-controls'?: string;
|
||||
'aria-expanded'?: boolean;
|
||||
'aria-hidden'?: boolean;
|
||||
'aria-invalid'?: boolean;
|
||||
'aria-required'?: boolean;
|
||||
'aria-disabled'?: boolean;
|
||||
'aria-pressed'?: boolean;
|
||||
'aria-checked'?: boolean;
|
||||
'aria-selected'?: boolean;
|
||||
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
||||
'aria-live'?: 'off' | 'polite' | 'assertive';
|
||||
'aria-atomic'?: boolean;
|
||||
'aria-relevant'?: 'additions' | 'removals' | 'text' | 'all';
|
||||
'aria-busy'?: boolean;
|
||||
'aria-dropeffect'?: 'copy' | 'move' | 'link' | 'execute' | 'popup' | 'none';
|
||||
'aria-dragged'?: boolean;
|
||||
'aria-grabbed'?: boolean;
|
||||
'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
||||
'aria-level'?: number;
|
||||
'aria-multiline'?: boolean;
|
||||
'aria-multiselectable'?: boolean;
|
||||
'aria-orientation'?: 'horizontal' | 'vertical';
|
||||
'aria-placeholder'?: string;
|
||||
'aria-readonly'?: boolean;
|
||||
'aria-sort'?: 'ascending' | 'descending' | 'none' | 'other';
|
||||
'aria-valuemax'?: number;
|
||||
'aria-valuemin'?: number;
|
||||
'aria-valuenow'?: number;
|
||||
'aria-valuetext'?: string;
|
||||
ariaLabel?: string;
|
||||
ariaLabelledby?: string;
|
||||
ariaDescribedby?: string;
|
||||
ariaControls?: string;
|
||||
ariaExpanded?: boolean;
|
||||
ariaHidden?: boolean;
|
||||
ariaInvalid?: boolean;
|
||||
ariaRequired?: boolean;
|
||||
ariaDisabled?: boolean;
|
||||
ariaPressed?: boolean;
|
||||
ariaChecked?: boolean;
|
||||
ariaSelected?: boolean;
|
||||
ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
||||
ariaLive?: 'off' | 'polite' | 'assertive';
|
||||
ariaAtomic?: boolean;
|
||||
ariaRelevant?: 'additions' | 'removals' | 'text' | 'all';
|
||||
ariaBusy?: boolean;
|
||||
ariaDropeffect?: 'copy' | 'move' | 'link' | 'execute' | 'popup' | 'none';
|
||||
ariaDragged?: boolean;
|
||||
ariaGrabbed?: boolean;
|
||||
ariaHaspopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
||||
ariaLevel?: number;
|
||||
ariaMultiline?: boolean;
|
||||
ariaMultiselectable?: boolean;
|
||||
ariaOrientation?: 'horizontal' | 'vertical';
|
||||
ariaPlaceholder?: string;
|
||||
ariaReadonly?: boolean;
|
||||
ariaSort?: 'ascending' | 'descending' | 'none' | 'other';
|
||||
ariaValuemax?: number;
|
||||
ariaValuemin?: number;
|
||||
ariaValuenow?: number;
|
||||
ariaValuetext?: string;
|
||||
role?: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,13 @@ import React from "react";
|
|||
import { AriaProps } from "../types/aria";
|
||||
import { usePalette } from "../hooks/useTheme";
|
||||
import { hexFromArgb } from "@material/material-color-utilities";
|
||||
import { createComponent } from '@lit/react';
|
||||
|
||||
const Anchor = createComponent({
|
||||
tagName: 'a',
|
||||
elementClass: HTMLAnchorElement,
|
||||
react: React,
|
||||
});
|
||||
|
||||
type LinkProps = AriaProps & {
|
||||
href?: string;
|
||||
|
|
@ -20,7 +27,7 @@ export const Link = (props: LinkProps) => {
|
|||
const { style, color = hexFromArgb(palette.primary), ...rest } = props;
|
||||
|
||||
return (
|
||||
<a
|
||||
<Anchor
|
||||
style={{
|
||||
color,
|
||||
textDecorationColor: color,
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
export interface AriaProps {
|
||||
'aria-label'?: string;
|
||||
'aria-labelledby'?: string;
|
||||
'aria-describedby'?: string;
|
||||
'aria-controls'?: string;
|
||||
'aria-expanded'?: boolean;
|
||||
'aria-hidden'?: boolean;
|
||||
'aria-invalid'?: boolean;
|
||||
'aria-required'?: boolean;
|
||||
'aria-disabled'?: boolean;
|
||||
'aria-pressed'?: boolean;
|
||||
'aria-checked'?: boolean;
|
||||
'aria-selected'?: boolean;
|
||||
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
||||
'aria-live'?: 'off' | 'polite' | 'assertive';
|
||||
'aria-atomic'?: boolean;
|
||||
'aria-relevant'?: 'additions' | 'removals' | 'text' | 'all';
|
||||
'aria-busy'?: boolean;
|
||||
'aria-dropeffect'?: 'copy' | 'move' | 'link' | 'execute' | 'popup' | 'none';
|
||||
'aria-dragged'?: boolean;
|
||||
'aria-grabbed'?: boolean;
|
||||
'aria-haspopup'?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
||||
'aria-level'?: number;
|
||||
'aria-multiline'?: boolean;
|
||||
'aria-multiselectable'?: boolean;
|
||||
'aria-orientation'?: 'horizontal' | 'vertical';
|
||||
'aria-placeholder'?: string;
|
||||
'aria-readonly'?: boolean;
|
||||
'aria-sort'?: 'ascending' | 'descending' | 'none' | 'other';
|
||||
'aria-valuemax'?: number;
|
||||
'aria-valuemin'?: number;
|
||||
'aria-valuenow'?: number;
|
||||
'aria-valuetext'?: string;
|
||||
ariaLabel?: string;
|
||||
ariaLabelledby?: string;
|
||||
ariaDescribedby?: string;
|
||||
ariaControls?: string;
|
||||
ariaExpanded?: boolean;
|
||||
ariaHidden?: boolean;
|
||||
ariaInvalid?: boolean;
|
||||
ariaRequired?: boolean;
|
||||
ariaDisabled?: boolean;
|
||||
ariaPressed?: boolean;
|
||||
ariaChecked?: boolean;
|
||||
ariaSelected?: boolean;
|
||||
ariaCurrent?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
||||
ariaLive?: 'off' | 'polite' | 'assertive';
|
||||
ariaAtomic?: boolean;
|
||||
ariaRelevant?: 'additions' | 'removals' | 'text' | 'all';
|
||||
ariaBusy?: boolean;
|
||||
ariaDropeffect?: 'copy' | 'move' | 'link' | 'execute' | 'popup' | 'none';
|
||||
ariaDragged?: boolean;
|
||||
ariaGrabbed?: boolean;
|
||||
ariaHaspopup?: boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
||||
ariaLevel?: number;
|
||||
ariaMultiline?: boolean;
|
||||
ariaMultiselectable?: boolean;
|
||||
ariaOrientation?: 'horizontal' | 'vertical';
|
||||
ariaPlaceholder?: string;
|
||||
ariaReadonly?: boolean;
|
||||
ariaSort?: 'ascending' | 'descending' | 'none' | 'other';
|
||||
ariaValuemax?: number;
|
||||
ariaValuemin?: number;
|
||||
ariaValuenow?: number;
|
||||
ariaValuetext?: string;
|
||||
role?: string;
|
||||
}
|
||||
Loading…
Reference in New Issue