@clubmed/trident-icons 1.3.2 → 1.3.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/svg/SvgIcon.js +17 -16
- package/svg/SvgIcon.js.map +1 -1
- package/svg-use/SvgUseIcon.js +22 -21
- package/svg-use/SvgUseIcon.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# ClubMed React UI components changelog
|
|
2
2
|
|
|
3
|
+
## [1.3.3-beta.1](https://scm.clubmed.com/clubmed/ui/trident-icons/compare/v1.3.2...v1.3.3-beta.1) (2025-08-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **icons:** update accessibility attributes and testing queries for icon components ([66fa628](https://scm.clubmed.com/clubmed/ui/trident-icons/-/commit/66fa628af82c37cf381607211c9b58c36d698087))
|
|
9
|
+
|
|
3
10
|
## [1.3.2](https://scm.clubmed.com/clubmed/ui/trident-icons/compare/v1.3.1...v1.3.2) (2025-08-08)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
package/svg/SvgIcon.js
CHANGED
|
@@ -1,38 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as h } from "../chunks/index.js";
|
|
3
3
|
import { Suspense as u } from "react";
|
|
4
4
|
import { useIconOrientation as x } from "../hooks/useIconOrientation.js";
|
|
5
5
|
import { omit as g } from "../utils/omit.js";
|
|
6
|
-
function
|
|
6
|
+
function v(n) {
|
|
7
7
|
const {
|
|
8
|
-
name:
|
|
9
|
-
className:
|
|
10
|
-
width:
|
|
8
|
+
name: o,
|
|
9
|
+
className: i,
|
|
10
|
+
width: e = "16px",
|
|
11
11
|
color: r = "inherit",
|
|
12
|
-
style:
|
|
13
|
-
element:
|
|
12
|
+
style: a,
|
|
13
|
+
element: s,
|
|
14
14
|
aspectRatio: m,
|
|
15
15
|
viewBox: c,
|
|
16
16
|
...l
|
|
17
|
-
} =
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
} = n, { intrinsicClassName: d, transform: p } = x(n), f = `text-${r}`;
|
|
18
|
+
return /* @__PURE__ */ t(
|
|
19
19
|
"span",
|
|
20
20
|
{
|
|
21
|
-
|
|
22
|
-
"aria-label": `Icon ${n}`,
|
|
21
|
+
"aria-hidden": !0,
|
|
23
22
|
...g(l, ["group", "orientation", "type"]),
|
|
24
23
|
className: h(
|
|
25
24
|
"inline-block shrink-0 align-middle",
|
|
26
|
-
p,
|
|
27
25
|
d,
|
|
28
|
-
|
|
26
|
+
f,
|
|
27
|
+
i
|
|
29
28
|
),
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
"data-name": "Icon",
|
|
30
|
+
"data-testid": `icon-${o}`,
|
|
31
|
+
style: { width: e, transform: p, aspectRatio: m, ...a },
|
|
32
|
+
children: /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(s, { viewBox: c }) })
|
|
32
33
|
}
|
|
33
34
|
);
|
|
34
35
|
}
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
v as SvgIcon
|
|
37
38
|
};
|
|
38
39
|
//# sourceMappingURL=SvgIcon.js.map
|
package/svg/SvgIcon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgIcon.js","sources":["../../lib/svg/SvgIcon.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { type ComponentProps, type ComponentType, type LazyExoticComponent, Suspense } from 'react';\nimport type { IconProps } from '@/IconsResolver';\nimport { useIconOrientation } from '@/hooks/useIconOrientation';\nimport { omit } from '@/utils/omit';\n\ntype SvgComponent = ComponentType<ComponentProps<'svg'> & { title?: string }>;\n\nexport interface SvgIconProps extends IconProps {\n element: LazyExoticComponent<SvgComponent>;\n /**\n * default: '0 0 30 30',\n */\n viewBox?: string;\n /**\n * aspectRatio: 1\n */\n aspectRatio?: number;\n intrinsicRotation?: number;\n intrinsicClassName?: string;\n}\n\nexport function SvgIcon(props: SvgIconProps) {\n const {\n name,\n className,\n width = '16px',\n color = 'inherit',\n style,\n element: SVG,\n aspectRatio,\n viewBox,\n ...attrs\n } = props;\n\n const { intrinsicClassName, transform } = useIconOrientation(props);\n const iconColor = `text-${color}`;\n\n return (\n <span\n
|
|
1
|
+
{"version":3,"file":"SvgIcon.js","sources":["../../lib/svg/SvgIcon.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport { type ComponentProps, type ComponentType, type LazyExoticComponent, Suspense } from 'react';\nimport type { IconProps } from '@/IconsResolver';\nimport { useIconOrientation } from '@/hooks/useIconOrientation';\nimport { omit } from '@/utils/omit';\n\ntype SvgComponent = ComponentType<ComponentProps<'svg'> & { title?: string }>;\n\nexport interface SvgIconProps extends IconProps {\n element: LazyExoticComponent<SvgComponent>;\n /**\n * default: '0 0 30 30',\n */\n viewBox?: string;\n /**\n * aspectRatio: 1\n */\n aspectRatio?: number;\n intrinsicRotation?: number;\n intrinsicClassName?: string;\n}\n\nexport function SvgIcon(props: SvgIconProps) {\n const {\n name,\n className,\n width = '16px',\n color = 'inherit',\n style,\n element: SVG,\n aspectRatio,\n viewBox,\n ...attrs\n } = props;\n\n const { intrinsicClassName, transform } = useIconOrientation(props);\n const iconColor = `text-${color}`;\n\n return (\n <span\n aria-hidden={true}\n {...omit(attrs, ['group', 'orientation', 'type'])}\n className={classnames(\n 'inline-block shrink-0 align-middle',\n intrinsicClassName,\n iconColor,\n className,\n )}\n data-name=\"Icon\"\n data-testid={`icon-${name}`}\n style={{ width: width!, transform, aspectRatio, ...style }}\n >\n <Suspense>\n <SVG viewBox={viewBox} />\n </Suspense>\n </span>\n );\n}\n"],"names":["SvgIcon","props","name","className","width","color","style","SVG","aspectRatio","viewBox","attrs","intrinsicClassName","transform","useIconOrientation","iconColor","jsx","omit","classnames","Suspense"],"mappings":";;;;;AAsBO,SAASA,EAAQC,GAAqB;AACrC,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,OAAAC,IAAQ;AAAA,IACR,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAT,GAEE,EAAE,oBAAAU,GAAoB,WAAAC,EAAU,IAAIC,EAAmBZ,CAAK,GAC5Da,IAAY,QAAQT,CAAK;AAG7B,SAAA,gBAAAU;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACZ,GAAGC,EAAKN,GAAO,CAAC,SAAS,eAAe,MAAM,CAAC;AAAA,MAChD,WAAWO;AAAA,QACT;AAAA,QACAN;AAAA,QACAG;AAAA,QACAX;AAAA,MACF;AAAA,MACA,aAAU;AAAA,MACV,eAAa,QAAQD,CAAI;AAAA,MACzB,OAAO,EAAE,OAAAE,GAAe,WAAAQ,GAAW,aAAAJ,GAAa,GAAGF,EAAM;AAAA,MAEzD,UAAC,gBAAAS,EAAAG,GAAA,EACC,UAAC,gBAAAH,EAAAR,GAAA,EAAI,SAAAE,EAAkB,CAAA,GACzB;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/svg-use/SvgUseIcon.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useIconOrientation as
|
|
4
|
-
import { omit as
|
|
5
|
-
function I(
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { c as u } from "../chunks/index.js";
|
|
3
|
+
import { useIconOrientation as h } from "../hooks/useIconOrientation.js";
|
|
4
|
+
import { omit as x } from "../utils/omit.js";
|
|
5
|
+
function I(i) {
|
|
6
6
|
const {
|
|
7
|
-
name:
|
|
8
|
-
className:
|
|
7
|
+
name: n,
|
|
8
|
+
className: o,
|
|
9
9
|
width: e = "16px",
|
|
10
10
|
color: r = "inherit",
|
|
11
11
|
style: s,
|
|
12
12
|
url: a,
|
|
13
|
-
aspectRatio:
|
|
14
|
-
viewBox:
|
|
15
|
-
...
|
|
16
|
-
} =
|
|
17
|
-
return /* @__PURE__ */
|
|
13
|
+
aspectRatio: c,
|
|
14
|
+
viewBox: m,
|
|
15
|
+
...l
|
|
16
|
+
} = i, { intrinsicClassName: d, transform: p } = h(i), f = `text-${r}`;
|
|
17
|
+
return /* @__PURE__ */ t(
|
|
18
18
|
"span",
|
|
19
19
|
{
|
|
20
|
-
"aria-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: x(
|
|
20
|
+
"aria-hidden": !0,
|
|
21
|
+
...x(l, ["group", "orientation", "type"]),
|
|
22
|
+
className: u(
|
|
24
23
|
"inline-block shrink-0 align-middle",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
d,
|
|
25
|
+
f,
|
|
26
|
+
o
|
|
28
27
|
),
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"data-name": "Icon",
|
|
29
|
+
"data-testid": `icon-${n}`,
|
|
30
|
+
style: { width: e, transform: p, aspectRatio: c, ...s },
|
|
31
|
+
children: /* @__PURE__ */ t("svg", { viewBox: m, children: /* @__PURE__ */ t("use", { xlinkHref: a }) })
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SvgUseIcon.js","sources":["../../lib/svg-use/SvgUseIcon.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { IconProps } from '@/IconsResolver';\nimport { useIconOrientation } from '@/hooks/useIconOrientation';\nimport { omit } from '@/utils/omit';\n\nexport interface SvgUseIconProps extends IconProps {\n url: string;\n /**\n * default: '0 0 30 30',\n */\n viewBox?: string;\n /**\n * aspectRatio: 1\n */\n aspectRatio?: number;\n intrinsicRotation?: number;\n intrinsicClassName?: string;\n}\n\nexport function SvgUseIcon(props: SvgUseIconProps) {\n const {\n name,\n className,\n width = '16px',\n color = 'inherit',\n style,\n url,\n aspectRatio,\n viewBox,\n ...attrs\n } = props;\n const { intrinsicClassName, transform } = useIconOrientation(props);\n\n const iconColor = `text-${color}`;\n\n return (\n <span\n aria-
|
|
1
|
+
{"version":3,"file":"SvgUseIcon.js","sources":["../../lib/svg-use/SvgUseIcon.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { IconProps } from '@/IconsResolver';\nimport { useIconOrientation } from '@/hooks/useIconOrientation';\nimport { omit } from '@/utils/omit';\n\nexport interface SvgUseIconProps extends IconProps {\n url: string;\n /**\n * default: '0 0 30 30',\n */\n viewBox?: string;\n /**\n * aspectRatio: 1\n */\n aspectRatio?: number;\n intrinsicRotation?: number;\n intrinsicClassName?: string;\n}\n\nexport function SvgUseIcon(props: SvgUseIconProps) {\n const {\n name,\n className,\n width = '16px',\n color = 'inherit',\n style,\n url,\n aspectRatio,\n viewBox,\n ...attrs\n } = props;\n const { intrinsicClassName, transform } = useIconOrientation(props);\n\n const iconColor = `text-${color}`;\n\n return (\n <span\n aria-hidden={true}\n {...omit(attrs, ['group', 'orientation', 'type'])}\n className={classnames(\n 'inline-block shrink-0 align-middle',\n intrinsicClassName,\n iconColor,\n className,\n )}\n data-name=\"Icon\"\n data-testid={`icon-${name}`}\n style={{ width: width!, transform, aspectRatio, ...style }}\n >\n <svg viewBox={viewBox}>\n <use xlinkHref={url} />\n </svg>\n </span>\n );\n}\n"],"names":["SvgUseIcon","props","name","className","width","color","style","url","aspectRatio","viewBox","attrs","intrinsicClassName","transform","useIconOrientation","iconColor","jsx","omit","classnames"],"mappings":";;;;AAmBO,SAASA,EAAWC,GAAwB;AAC3C,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,OAAAC,IAAQ;AAAA,IACR,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAT,GACE,EAAE,oBAAAU,GAAoB,WAAAC,EAAU,IAAIC,EAAmBZ,CAAK,GAE5Da,IAAY,QAAQT,CAAK;AAG7B,SAAA,gBAAAU;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACZ,GAAGC,EAAKN,GAAO,CAAC,SAAS,eAAe,MAAM,CAAC;AAAA,MAChD,WAAWO;AAAA,QACT;AAAA,QACAN;AAAA,QACAG;AAAA,QACAX;AAAA,MACF;AAAA,MACA,aAAU;AAAA,MACV,eAAa,QAAQD,CAAI;AAAA,MACzB,OAAO,EAAE,OAAAE,GAAe,WAAAQ,GAAW,aAAAJ,GAAa,GAAGF,EAAM;AAAA,MAEzD,4BAAC,OAAI,EAAA,SAAAG,GACH,4BAAC,OAAI,EAAA,WAAWF,GAAK,EACvB,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|