@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clubmed/trident-icons",
3
- "version": "1.3.2",
3
+ "version": "1.3.3-beta.1",
4
4
  "type": "module",
5
5
  "description": "Shared ClubMed Icons library",
6
6
  "keywords": [
package/svg/SvgIcon.js CHANGED
@@ -1,38 +1,39 @@
1
- import { jsx as o } from "react/jsx-runtime";
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 k(t) {
6
+ function v(n) {
7
7
  const {
8
- name: n,
9
- className: e,
10
- width: i = "16px",
8
+ name: o,
9
+ className: i,
10
+ width: e = "16px",
11
11
  color: r = "inherit",
12
- style: s,
13
- element: a,
12
+ style: a,
13
+ element: s,
14
14
  aspectRatio: m,
15
15
  viewBox: c,
16
16
  ...l
17
- } = t, { intrinsicClassName: p, transform: f } = x(t), d = `text-${r}`;
18
- return /* @__PURE__ */ o(
17
+ } = n, { intrinsicClassName: d, transform: p } = x(n), f = `text-${r}`;
18
+ return /* @__PURE__ */ t(
19
19
  "span",
20
20
  {
21
- role: "presentation",
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
- e
26
+ f,
27
+ i
29
28
  ),
30
- style: { width: i, transform: f, aspectRatio: m, ...s },
31
- children: /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(a, { viewBox: c }) })
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
- k as SvgIcon
37
+ v as SvgIcon
37
38
  };
38
39
  //# sourceMappingURL=SvgIcon.js.map
@@ -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 role=\"presentation\"\n aria-label={`Icon ${name}`}\n {...omit(attrs, ['group', 'orientation', 'type'])}\n className={classnames(\n 'inline-block shrink-0 align-middle',\n intrinsicClassName,\n iconColor,\n className,\n )}\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,MAAK;AAAA,MACL,cAAY,QAAQb,CAAI;AAAA,MACvB,GAAGc,EAAKN,GAAO,CAAC,SAAS,eAAe,MAAM,CAAC;AAAA,MAChD,WAAWO;AAAA,QACT;AAAA,QACAN;AAAA,QACAG;AAAA,QACAX;AAAA,MACF;AAAA,MACA,OAAO,EAAE,OAAAC,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;"}
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;"}
@@ -1,33 +1,34 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { c as x } from "../chunks/index.js";
3
- import { useIconOrientation as d } from "../hooks/useIconOrientation.js";
4
- import { omit as h } from "../utils/omit.js";
5
- function I(n) {
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: t,
8
- className: i,
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: l,
14
- viewBox: c,
15
- ...m
16
- } = n, { intrinsicClassName: p, transform: f } = d(n), u = `text-${r}`;
17
- return /* @__PURE__ */ o(
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-label": `Icon ${t}`,
21
- role: "presentation",
22
- ...h(m, ["group", "orientation", "type"]),
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
- p,
26
- u,
27
- i
24
+ d,
25
+ f,
26
+ o
28
27
  ),
29
- style: { width: e, transform: f, aspectRatio: l, ...s },
30
- children: /* @__PURE__ */ o("svg", { viewBox: c, children: /* @__PURE__ */ o("use", { xlinkHref: a }) })
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-label={`Icon ${name}`}\n role=\"presentation\"\n {...omit(attrs, ['group', 'orientation', 'type'])}\n className={classnames(\n 'inline-block shrink-0 align-middle',\n intrinsicClassName,\n iconColor,\n className,\n )}\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,cAAY,QAAQb,CAAI;AAAA,MACxB,MAAK;AAAA,MACJ,GAAGc,EAAKN,GAAO,CAAC,SAAS,eAAe,MAAM,CAAC;AAAA,MAChD,WAAWO;AAAA,QACT;AAAA,QACAN;AAAA,QACAG;AAAA,QACAX;AAAA,MACF;AAAA,MACA,OAAO,EAAE,OAAAC,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;"}
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;"}