@clubmed/trident-ui 1.3.0-beta.12 → 1.3.0-beta.13

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.
Files changed (127) hide show
  1. package/.npm/_logs/2025-08-08T15_19_22_167Z-debug-0.log +19 -0
  2. package/.npm/_logs/2025-08-08T15_19_22_257Z-debug-0.log +14 -0
  3. package/CHANGELOG.md +7 -0
  4. package/README.md +8 -0
  5. package/assets/{style.css → trident-ui.css} +1 -1
  6. package/atoms/Clickable/Clickable.d.ts +2 -2
  7. package/atoms/Heading/Heading.d.ts +1 -1
  8. package/atoms/Heading/HeadingGroup.d.ts +2 -2
  9. package/atoms/Icons/Iconics.d.ts +1 -1
  10. package/atoms/Icons/IconsResolver.d.ts +1 -1
  11. package/atoms/Icons/contexts/IconsContext.d.ts +1 -1
  12. package/atoms/Icons/svg/SvgIcon.d.ts +1 -1
  13. package/atoms/Icons/svg-use/SvgUseIcon.d.ts +1 -1
  14. package/atoms/Image/Image.d.ts +1 -1
  15. package/atoms/Image/Image.js +12 -12
  16. package/atoms/Image/Image.js.map +1 -1
  17. package/atoms/Prose/Prose.d.ts +2 -2
  18. package/chunks/ResizeObserver.js +1 -1
  19. package/chunks/ResizeObserver.js.map +1 -1
  20. package/chunks/_commonjsHelpers.js +19 -14
  21. package/chunks/_commonjsHelpers.js.map +1 -1
  22. package/chunks/index.js +36 -33
  23. package/chunks/index.js.map +1 -1
  24. package/chunks/plugin.js +57 -46
  25. package/chunks/plugin.js.map +1 -1
  26. package/contexts/Devices/Device.d.ts +3 -3
  27. package/contexts/Devices/hooks/useQueries.d.ts +2 -2
  28. package/contexts/Devices/reducers/reducer.d.ts +2 -2
  29. package/contexts/TridentUIConfig.d.ts +1 -1
  30. package/contexts/TridentUIConfig.js +1265 -653
  31. package/contexts/TridentUIConfig.js.map +1 -1
  32. package/helpers/colors/colors.d.ts +1 -1
  33. package/hooks/useKeyboardControls.d.ts +1 -1
  34. package/hooks/useResizeObserver.d.ts +1 -1
  35. package/hooks/useSafeBoop.d.ts +2 -2
  36. package/molecules/Arrows/Arrows.d.ts +2 -2
  37. package/molecules/Avatar.d.ts +1 -1
  38. package/molecules/Avatar.js +24 -24
  39. package/molecules/Avatar.js.map +1 -1
  40. package/molecules/Backdrop.d.ts +1 -1
  41. package/molecules/Breadcrumb.d.ts +2 -3
  42. package/molecules/Breadcrumb.js +25 -36
  43. package/molecules/Breadcrumb.js.map +1 -1
  44. package/molecules/Breadcrumb.themes.d.ts +1 -1
  45. package/molecules/Buttons/ArrowButton.d.ts +1 -1
  46. package/molecules/Buttons/Button.d.ts +3 -3
  47. package/molecules/Buttons/ButtonAnchor.d.ts +2 -2
  48. package/molecules/Buttons/ButtonContent.d.ts +2 -2
  49. package/molecules/Buttons/FakeButton.d.ts +2 -3
  50. package/molecules/Buttons/InertButton.d.ts +2 -2
  51. package/molecules/Buttons/v2/Button.d.ts +2081 -2082
  52. package/molecules/Buttons/v2/Button.type.d.ts +2 -2
  53. package/molecules/Cards/Card.d.ts +4 -4
  54. package/molecules/Cards/CardBackground.d.ts +2 -2
  55. package/molecules/Cards/CardBackground.js +17 -17
  56. package/molecules/Cards/CardBackground.js.map +1 -1
  57. package/molecules/Cards/CardBackgroundContext.d.ts +1 -1
  58. package/molecules/Cards/CardClickable.d.ts +1 -1
  59. package/molecules/Cards/ExpandableCard.d.ts +3 -3
  60. package/molecules/Cards/ExpandableCard.js +41 -41
  61. package/molecules/Cards/ExpandableCard.js.map +1 -1
  62. package/molecules/Cards/v2/Card.d.ts +1 -1
  63. package/molecules/Cards/v2/Card.js +13 -13
  64. package/molecules/Cards/v2/Card.js.map +1 -1
  65. package/molecules/Chip.d.ts +3 -3
  66. package/molecules/Chip.themes.d.ts +1 -1
  67. package/molecules/ElasticHeight.d.ts +1 -1
  68. package/molecules/ElasticHeight.js +20 -21
  69. package/molecules/ElasticHeight.js.map +1 -1
  70. package/molecules/Forms/Checkboxes/Checkbox.d.ts +1 -1
  71. package/molecules/Forms/Checkboxes/Checkbox.js +43 -43
  72. package/molecules/Forms/Checkboxes/Checkbox.js.map +1 -1
  73. package/molecules/Forms/Checkboxes/Checkboxes.d.ts +2 -2
  74. package/molecules/Forms/DateField.d.ts +2 -2
  75. package/molecules/Forms/DateField.js +60 -61
  76. package/molecules/Forms/DateField.js.map +1 -1
  77. package/molecules/Forms/Filter.d.ts +1 -2
  78. package/molecules/Forms/Filter.js +29 -29
  79. package/molecules/Forms/Filter.js.map +1 -1
  80. package/molecules/Forms/FormControl.d.ts +4 -4
  81. package/molecules/Forms/FormLabel.d.ts +1 -1
  82. package/molecules/Forms/NumberField.d.ts +278 -278
  83. package/molecules/Forms/Password/Password.d.ts +1 -1
  84. package/molecules/Forms/Password/ValidationMessage.d.ts +1 -1
  85. package/molecules/Forms/Radios/Radio.d.ts +1 -2
  86. package/molecules/Forms/Radios/Radio.js +30 -30
  87. package/molecules/Forms/Radios/Radio.js.map +1 -1
  88. package/molecules/Forms/Radios/RadioGroup.d.ts +2 -2
  89. package/molecules/Forms/Radios/RadioGroup.js +50 -52
  90. package/molecules/Forms/Radios/RadioGroup.js.map +1 -1
  91. package/molecules/Forms/Range.d.ts +1 -2
  92. package/molecules/Forms/Range.js +118 -113
  93. package/molecules/Forms/Range.js.map +1 -1
  94. package/molecules/Forms/Select.d.ts +3 -3
  95. package/molecules/Forms/Switch.d.ts +1 -1
  96. package/molecules/Forms/TextField.d.ts +3 -3
  97. package/molecules/HamburgerIcon.d.ts +1 -1
  98. package/molecules/Link.d.ts +2 -2
  99. package/molecules/Loader.d.ts +1 -1
  100. package/molecules/Pagination.d.ts +2 -2
  101. package/molecules/Popin.d.ts +1 -1
  102. package/molecules/Spinner.d.ts +1 -1
  103. package/molecules/Tabs/Tab.d.ts +2 -3
  104. package/molecules/Tabs/Tab.js +41 -42
  105. package/molecules/Tabs/Tab.js.map +1 -1
  106. package/molecules/Tabs/TabList.d.ts +1 -1
  107. package/molecules/Tabs/TabList.js +21 -21
  108. package/molecules/Tabs/TabList.js.map +1 -1
  109. package/molecules/Tabs/TabPanel.d.ts +1 -1
  110. package/molecules/Tabs/TabPanel.js +13 -13
  111. package/molecules/Tabs/TabPanel.js.map +1 -1
  112. package/molecules/Tabs/Tabs.d.ts +1 -1
  113. package/molecules/Tabs/TabsBody.d.ts +1 -1
  114. package/molecules/Tabs/context/TabControl.d.ts +2 -2
  115. package/molecules/Tabs/hooks/tabControl.d.ts +5 -5
  116. package/molecules/Tag.d.ts +4 -4
  117. package/package.json +29 -32
  118. package/tailwind/plugins/animationDelay.d.ts +2 -2
  119. package/tailwind/plugins/hocus.d.ts +2 -2
  120. package/tailwind/plugins/lineClampFix.d.ts +2 -2
  121. package/tailwind/plugins/popover.d.ts +2 -2
  122. package/tailwind/plugins/startingStyle.d.ts +2 -2
  123. package/tailwind/plugins/transitionBehavior.d.ts +2 -2
  124. package/tailwind/tailwind.preset.d.ts +50 -50
  125. package/tests/helpers/device.d.ts +14 -0
  126. package/tests/helpers/device.js +13426 -0
  127. package/tests/helpers/device.js.map +1 -0
@@ -1,4 +1,4 @@
1
- import type { Theme } from '../../types/Theme';
1
+ import { Theme } from '../../types/Theme';
2
2
  export declare enum Colors {
3
3
  black = "black",
4
4
  darkGrey = "darkGrey",
@@ -1,4 +1,4 @@
1
- import { type KeyboardEvent } from 'react';
1
+ import { KeyboardEvent } from 'react';
2
2
  interface Options {
3
3
  up?: VoidFunction;
4
4
  down?: VoidFunction;
@@ -1,2 +1,2 @@
1
- import useResizeObserver from 'use-resize-observer';
1
+ import { default as useResizeObserver } from 'use-resize-observer';
2
2
  export default useResizeObserver;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import useBoop from 'use-boop';
1
+ import { CSSProperties } from 'react';
2
+ import { default as useBoop } from 'use-boop';
3
3
  type Args = Parameters<typeof useBoop>[0];
4
4
  export declare const useSafeBoop: (boopArgs: Args) => [CSSProperties, () => void];
5
5
  export {};
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, ComponentPropsWithoutRef, FunctionComponent } from 'react';
2
- import type { ArrowsLabels } from './ArrowsLabels';
1
+ import { ComponentProps, ComponentPropsWithoutRef, FunctionComponent } from 'react';
2
+ import { ArrowsLabels } from './ArrowsLabels';
3
3
  import { ArrowButton } from '../Buttons/ArrowButton';
4
4
  export interface ArrowsProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
5
5
  color?: ComponentProps<typeof ArrowButton>['color'];
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes, PropsWithChildren } from 'react';
1
+ import { HTMLAttributes, PropsWithChildren } from 'react';
2
2
  interface AvatarProps extends HTMLAttributes<HTMLDivElement> {
3
3
  alt?: string;
4
4
  src?: string | undefined;
@@ -1,50 +1,50 @@
1
- import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
- import { c as l } from "../chunks/index.js";
3
- const p = (e = "") => e.split(" ").map((i) => i.slice(0, 1)).join("");
4
- function b({
1
+ import { jsx as l, jsxs as f } from "react/jsx-runtime";
2
+ import { c as u } from "../chunks/index.js";
3
+ const a = (e = "") => e.split(" ").map((t) => t.slice(0, 1)).join("");
4
+ function p({
5
5
  alt: e,
6
- src: i,
6
+ src: t,
7
7
  srcSet: n,
8
- style: o,
9
- children: f,
10
- className: t,
11
- ...u
8
+ style: r,
9
+ children: o,
10
+ className: i,
11
+ ...s
12
12
  }) {
13
- return /* @__PURE__ */ r(
13
+ return /* @__PURE__ */ l(
14
14
  "div",
15
15
  {
16
- ...u,
17
- ...i || n ? { role: "figure", "aria-label": e } : {},
18
- className: l(
16
+ ...s,
17
+ ...t || n ? { role: "figure", "aria-label": e } : {},
18
+ className: u(
19
19
  "flex items-center justify-center relative overflow-hidden",
20
20
  {
21
- "rounded-full": !(t != null && t.includes("rounded-")),
22
- "text-black": !(t != null && t.includes("text-")),
23
- "bg-saffron": !(t != null && t.includes("bg-"))
21
+ "rounded-full": !i?.includes("rounded-"),
22
+ "text-black": !i?.includes("text-"),
23
+ "bg-saffron": !i?.includes("bg-")
24
24
  },
25
- t
25
+ i
26
26
  ),
27
27
  style: {
28
28
  width: "48px",
29
29
  height: "48px",
30
- ...o
30
+ ...r
31
31
  },
32
- children: /* @__PURE__ */ d("span", { className: "flex items-center justify-center font-bold uppercase text-h6 h-full", children: [
33
- i || n ? /* @__PURE__ */ r(
32
+ children: /* @__PURE__ */ f("span", { className: "flex items-center justify-center font-bold uppercase text-h6 h-full", children: [
33
+ t || n ? /* @__PURE__ */ l(
34
34
  "img",
35
35
  {
36
36
  srcSet: n,
37
- src: i,
37
+ src: t,
38
38
  alt: e,
39
39
  className: "w-full h-full object-cover transparent indent-[1000px]"
40
40
  }
41
- ) : p(e),
42
- f
41
+ ) : a(e),
42
+ o
43
43
  ] })
44
44
  }
45
45
  );
46
46
  }
47
47
  export {
48
- b as Avatar
48
+ p as Avatar
49
49
  };
50
50
  //# sourceMappingURL=Avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sources":["../../lib/molecules/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react';\nimport classnames from 'classnames';\n\nconst initial = (text = '') => {\n return text\n .split(' ')\n .map((text) => text.slice(0, 1))\n .join('');\n};\n\ninterface AvatarProps extends HTMLAttributes<HTMLDivElement> {\n alt?: string;\n src?: string | undefined;\n srcSet?: string | undefined;\n}\n\nexport function Avatar({\n alt,\n src,\n srcSet,\n style,\n children,\n className,\n ...props\n}: PropsWithChildren<AvatarProps>) {\n return (\n <div\n {...props}\n {...(src || srcSet ? { role: 'figure', 'aria-label': alt } : {})}\n className={classnames(\n 'flex items-center justify-center relative overflow-hidden',\n {\n 'rounded-full': !className?.includes('rounded-'),\n 'text-black': !className?.includes('text-'),\n 'bg-saffron': !className?.includes('bg-'),\n },\n className,\n )}\n style={{\n width: '48px',\n height: '48px',\n ...style,\n }}\n >\n <span className=\"flex items-center justify-center font-bold uppercase text-h6 h-full\">\n {src || srcSet ? (\n <img\n srcSet={srcSet}\n src={src}\n alt={alt}\n className={'w-full h-full object-cover transparent indent-[1000px]'}\n />\n ) : (\n initial(alt)\n )}\n {children}\n </span>\n </div>\n );\n}\n"],"names":["initial","text","Avatar","alt","src","srcSet","style","children","className","props","jsx","classnames","jsxs"],"mappings":";;AAGA,MAAMA,IAAU,CAACC,IAAO,OACfA,EACJ,MAAM,GAAG,EACT,IAAI,CAACA,MAASA,EAAK,MAAM,GAAG,CAAC,CAAC,EAC9B,KAAK,EAAE;AASL,SAASC,EAAO;AAAA,EACrB,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACH,GAAIL,KAAOC,IAAS,EAAE,MAAM,UAAU,cAAcF,EAAA,IAAQ,CAAA;AAAA,MAC7D,WAAWQ;AAAA,QACT;AAAA,QACA;AAAA,UACE,gBAAgB,EAACH,KAAA,QAAAA,EAAW,SAAS;AAAA,UACrC,cAAc,EAACA,KAAA,QAAAA,EAAW,SAAS;AAAA,UACnC,cAAc,EAACA,KAAA,QAAAA,EAAW,SAAS;AAAA,QAAK;AAAA,QAE1CA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,GAAGF;AAAA,MAAA;AAAA,MAGL,UAAA,gBAAAM,EAAC,QAAA,EAAK,WAAU,uEACb,UAAA;AAAA,QAAAR,KAAOC,IACN,gBAAAK;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,QAAAL;AAAA,YACA,KAAAD;AAAA,YACA,KAAAD;AAAA,YACA,WAAW;AAAA,UAAA;AAAA,QAAA,IAGbH,EAAQG,CAAG;AAAA,QAEZI;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Avatar.js","sources":["../../lib/molecules/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes, PropsWithChildren } from 'react';\nimport classnames from 'classnames';\n\nconst initial = (text = '') => {\n return text\n .split(' ')\n .map((text) => text.slice(0, 1))\n .join('');\n};\n\ninterface AvatarProps extends HTMLAttributes<HTMLDivElement> {\n alt?: string;\n src?: string | undefined;\n srcSet?: string | undefined;\n}\n\nexport function Avatar({\n alt,\n src,\n srcSet,\n style,\n children,\n className,\n ...props\n}: PropsWithChildren<AvatarProps>) {\n return (\n <div\n {...props}\n {...(src || srcSet ? { role: 'figure', 'aria-label': alt } : {})}\n className={classnames(\n 'flex items-center justify-center relative overflow-hidden',\n {\n 'rounded-full': !className?.includes('rounded-'),\n 'text-black': !className?.includes('text-'),\n 'bg-saffron': !className?.includes('bg-'),\n },\n className,\n )}\n style={{\n width: '48px',\n height: '48px',\n ...style,\n }}\n >\n <span className=\"flex items-center justify-center font-bold uppercase text-h6 h-full\">\n {src || srcSet ? (\n <img\n srcSet={srcSet}\n src={src}\n alt={alt}\n className={'w-full h-full object-cover transparent indent-[1000px]'}\n />\n ) : (\n initial(alt)\n )}\n {children}\n </span>\n </div>\n );\n}\n"],"names":["initial","text","Avatar","alt","src","srcSet","style","children","className","props","jsx","classnames","jsxs"],"mappings":";;AAGA,MAAMA,IAAU,CAACC,IAAO,OACfA,EACJ,MAAM,GAAG,EACT,IAAI,CAACA,MAASA,EAAK,MAAM,GAAG,CAAC,CAAC,EAC9B,KAAK,EAAE;AASL,SAASC,EAAO;AAAA,EACrB,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,GAAmC;AACjC,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACH,GAAIL,KAAOC,IAAS,EAAE,MAAM,UAAU,cAAcF,EAAA,IAAQ,CAAA;AAAA,MAC7D,WAAWQ;AAAA,QACT;AAAA,QACA;AAAA,UACE,gBAAgB,CAACH,GAAW,SAAS,UAAU;AAAA,UAC/C,cAAc,CAACA,GAAW,SAAS,OAAO;AAAA,UAC1C,cAAc,CAACA,GAAW,SAAS,KAAK;AAAA,QAAA;AAAA,QAE1CA;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,GAAGF;AAAA,MAAA;AAAA,MAGL,UAAA,gBAAAM,EAAC,QAAA,EAAK,WAAU,uEACb,UAAA;AAAA,QAAAR,KAAOC,IACN,gBAAAK;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,QAAAL;AAAA,YACA,KAAAD;AAAA,YACA,KAAAD;AAAA,YACA,WAAW;AAAA,UAAA;AAAA,QAAA,IAGbH,EAAQG,CAAG;AAAA,QAEZI;AAAA,MAAA,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,4 @@
1
- import type { FunctionComponent, MouseEvent, PropsWithChildren } from 'react';
1
+ import { FunctionComponent, MouseEvent, PropsWithChildren } from 'react';
2
2
  interface BackdropProps {
3
3
  /**
4
4
  * On close
@@ -1,6 +1,5 @@
1
- import type { ComponentPropsWithoutRef, FunctionComponent } from 'react';
2
- import type { Theme } from '../types/Theme';
3
- import './Breadcrumb.css';
1
+ import { ComponentPropsWithoutRef, FunctionComponent } from 'react';
2
+ import { Theme } from '../types/Theme';
4
3
  export interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {
5
4
  items: ({
6
5
  href: string;
@@ -1,61 +1,50 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { createElement as B } from "react";
3
- import { c as o } from "../chunks/index.js";
4
- import { getTheme as k } from "./Breadcrumb.themes.js";
5
- import { Icon as w } from "@clubmed/trident-icons";
6
- const y = ({
7
- className: c,
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { createElement as k } from "react";
3
+ import { c as l } from "../chunks/index.js";
4
+ import { getTheme as w } from "./Breadcrumb.themes.js";
5
+ import { Icon as B } from "@clubmed/trident-icons";
6
+ const j = ({
7
+ className: m,
8
8
  items: e,
9
- theme: m = "light",
10
- ...i
9
+ theme: i = "light",
10
+ ...h
11
11
  }) => {
12
12
  if (e.length == 0)
13
13
  return null;
14
- const [d, h, , ...a] = e, u = a.length ? a[a.length - 1] : e[e.length - 1], f = { label: "", href: "", className: "breadcrumb-spacer" }, s = a.length ? [d, h, f, u] : e, { thStart: p, thEnd: g } = k(m);
15
- return /* @__PURE__ */ t(
14
+ const [d, f, , ...t] = e, p = t.length ? t[t.length - 1] : e[e.length - 1], g = { label: "", href: "", className: "breadcrumb-spacer" }, s = t.length ? [d, f, g, p] : e, { thStart: u, thEnd: b } = w(i);
15
+ return /* @__PURE__ */ a(
16
16
  "nav",
17
17
  {
18
18
  role: "navigation",
19
19
  "aria-label": "Breadcrumb",
20
- ...i,
21
- className: o(c, "overflow-hidden"),
20
+ ...h,
21
+ className: l(m, "overflow-hidden"),
22
22
  "data-name": "Breadcrumb",
23
- children: /* @__PURE__ */ t("ol", { className: "scrollbar-hidden flex items-center overflow-x-auto font-sans text-b4", children: s.map(({ label: n, href: l, className: b, ...x }, N) => {
24
- const r = N === s.length - 1, v = l && !r;
25
- return /* @__PURE__ */ B(
23
+ children: /* @__PURE__ */ a("ol", { className: "scrollbar-hidden flex items-center overflow-x-auto font-sans text-b4", children: s.map(({ label: n, href: o, className: x, ...N }, c) => {
24
+ const r = c === s.length - 1, v = o && !r;
25
+ return /* @__PURE__ */ k(
26
26
  "li",
27
27
  {
28
- ...x,
28
+ ...N,
29
29
  ...r && { "aria-current": "page" },
30
- className: o(
30
+ className: l(
31
31
  "flex shrink-0 items-center",
32
32
  {
33
- [p]: !r,
34
- [g]: r
33
+ [u]: !r,
34
+ [b]: r
35
35
  },
36
- b
36
+ x
37
37
  ),
38
- key: n
38
+ key: `${n}-${c}`
39
39
  },
40
- v ? /* @__PURE__ */ t("a", { href: l, children: n }) : n,
41
- !r && /* @__PURE__ */ t(
42
- w,
43
- {
44
- "data-testid": "BreadcrumbIcon",
45
- className: "mx-4",
46
- name: "Diamond",
47
- width: "14px",
48
- "aria-hidden": "true",
49
- "aria-label": null,
50
- role: null
51
- }
52
- )
40
+ v ? /* @__PURE__ */ a("a", { href: o, children: n }) : n,
41
+ !r && /* @__PURE__ */ a(B, { className: "mx-4", name: "Diamond", width: "14px" })
53
42
  );
54
43
  }) })
55
44
  }
56
45
  );
57
46
  };
58
47
  export {
59
- y as Breadcrumb
48
+ j as Breadcrumb
60
49
  };
61
50
  //# sourceMappingURL=Breadcrumb.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","sources":["../../lib/molecules/Breadcrumb.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { ComponentPropsWithoutRef, FunctionComponent } from 'react';\n\nimport { getTheme } from './Breadcrumb.themes';\n\nimport type { Theme } from '@/types/Theme';\nimport { Icon } from '@clubmed/trident-icons';\nimport './Breadcrumb.css';\n\nexport interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {\n items: ({\n href: string;\n label: string;\n } & ComponentPropsWithoutRef<'li'>)[];\n theme?: Theme;\n}\n\nexport const Breadcrumb: FunctionComponent<BreadcrumbProps> = ({\n className,\n items,\n theme = 'light',\n ...attrs\n}) => {\n if (items.length == 0) {\n return null;\n }\n\n const [first, second, , ...rest] = items;\n const lastItem = rest.length ? rest[rest.length - 1] : items[items.length - 1];\n const spacer = { label: '', href: '', className: 'breadcrumb-spacer' };\n const itemsToRender = !rest.length ? items : [first, second, spacer, lastItem];\n\n const { thStart, thEnd } = getTheme(theme);\n\n return (\n <nav\n role=\"navigation\"\n aria-label=\"Breadcrumb\"\n {...attrs}\n className={classnames(className, 'overflow-hidden')}\n data-name=\"Breadcrumb\"\n >\n <ol className=\"scrollbar-hidden flex items-center overflow-x-auto font-sans text-b4\">\n {itemsToRender.map(({ label, href, className, ...attrs }, index) => {\n const isLast = index === itemsToRender.length - 1;\n const isLink = href && !isLast;\n return (\n <li\n {...attrs}\n {...(isLast && { 'aria-current': 'page' })}\n className={classnames(\n 'flex shrink-0 items-center',\n {\n [thStart]: !isLast,\n [thEnd]: isLast,\n },\n className,\n )}\n key={label}\n >\n {isLink ? <a href={href}>{label}</a> : label}\n {!isLast && (\n <Icon\n data-testid=\"BreadcrumbIcon\"\n className=\"mx-4\"\n name=\"Diamond\"\n width=\"14px\"\n aria-hidden=\"true\"\n aria-label={null}\n role={null}\n />\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n"],"names":["Breadcrumb","className","items","theme","attrs","first","second","rest","lastItem","spacer","itemsToRender","thStart","thEnd","getTheme","jsx","classnames","label","href","index","isLast","isLink","createElement","Icon"],"mappings":";;;;;AAiBO,MAAMA,IAAiD,CAAC;AAAA,EAC7D,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACL,MAAM;AACJ,MAAIF,EAAM,UAAU;AAClB,WAAO;AAGT,QAAM,CAACG,GAAOC,KAAU,GAAGC,CAAI,IAAIL,GAC7BM,IAAWD,EAAK,SAASA,EAAKA,EAAK,SAAS,CAAC,IAAIL,EAAMA,EAAM,SAAS,CAAC,GACvEO,IAAS,EAAE,OAAO,IAAI,MAAM,IAAI,WAAW,oBAAA,GAC3CC,IAAiBH,EAAK,SAAiB,CAACF,GAAOC,GAAQG,GAAQD,CAAQ,IAAxCN,GAE/B,EAAE,SAAAS,GAAS,OAAAC,MAAUC,EAASV,CAAK;AAEzC,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACV,GAAGV;AAAA,MACJ,WAAWW,EAAWd,GAAW,iBAAiB;AAAA,MAClD,aAAU;AAAA,MAEV,UAAA,gBAAAa,EAAC,MAAA,EAAG,WAAU,wEACX,YAAc,IAAI,CAAC,EAAE,OAAAE,GAAO,MAAAC,GAAM,WAAAhB,GAAW,GAAGG,EAAAA,GAASc,MAAU;AAClE,cAAMC,IAASD,MAAUR,EAAc,SAAS,GAC1CU,IAASH,KAAQ,CAACE;AACxB,eACE,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAGjB;AAAAA,YACH,GAAIe,KAAU,EAAE,gBAAgB,OAAA;AAAA,YACjC,WAAWJ;AAAA,cACT;AAAA,cACA;AAAA,gBACE,CAACJ,CAAO,GAAG,CAACQ;AAAA,gBACZ,CAACP,CAAK,GAAGO;AAAA,cAAA;AAAA,cAEXlB;AAAAA,YAAA;AAAA,YAEF,KAAKe;AAAA,UAAA;AAAA,UAEJI,IAAS,gBAAAN,EAAC,KAAA,EAAE,MAAAG,GAAa,aAAM,IAAOD;AAAA,UACtC,CAACG,KACA,gBAAAL;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,eAAY;AAAA,cACZ,WAAU;AAAA,cACV,MAAK;AAAA,cACL,OAAM;AAAA,cACN,eAAY;AAAA,cACZ,cAAY;AAAA,cACZ,MAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QACR;AAAA,MAIR,CAAC,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Breadcrumb.js","sources":["../../lib/molecules/Breadcrumb.tsx"],"sourcesContent":["import classnames from 'classnames';\nimport type { ComponentPropsWithoutRef, FunctionComponent } from 'react';\n\nimport { getTheme } from './Breadcrumb.themes';\n\nimport type { Theme } from '@/types/Theme';\nimport { Icon } from '@clubmed/trident-icons';\nimport './Breadcrumb.css';\n\nexport interface BreadcrumbProps extends ComponentPropsWithoutRef<'nav'> {\n items: ({\n href: string;\n label: string;\n } & ComponentPropsWithoutRef<'li'>)[];\n theme?: Theme;\n}\n\nexport const Breadcrumb: FunctionComponent<BreadcrumbProps> = ({\n className,\n items,\n theme = 'light',\n ...attrs\n}) => {\n if (items.length == 0) {\n return null;\n }\n\n const [first, second, , ...rest] = items;\n const lastItem = rest.length ? rest[rest.length - 1] : items[items.length - 1];\n const spacer = { label: '', href: '', className: 'breadcrumb-spacer' };\n const itemsToRender = !rest.length ? items : [first, second, spacer, lastItem];\n\n const { thStart, thEnd } = getTheme(theme);\n\n return (\n <nav\n role=\"navigation\"\n aria-label=\"Breadcrumb\"\n {...attrs}\n className={classnames(className, 'overflow-hidden')}\n data-name=\"Breadcrumb\"\n >\n <ol className=\"scrollbar-hidden flex items-center overflow-x-auto font-sans text-b4\">\n {itemsToRender.map(({ label, href, className, ...attrs }, index) => {\n const isLast = index === itemsToRender.length - 1;\n const isLink = href && !isLast;\n return (\n <li\n {...attrs}\n {...(isLast && { 'aria-current': 'page' })}\n className={classnames(\n 'flex shrink-0 items-center',\n {\n [thStart]: !isLast,\n [thEnd]: isLast,\n },\n className,\n )}\n key={`${label}-${index}`}\n >\n {isLink ? <a href={href}>{label}</a> : label}\n {!isLast && <Icon className=\"mx-4\" name=\"Diamond\" width=\"14px\" />}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n};\n"],"names":["Breadcrumb","className","items","theme","attrs","first","second","rest","lastItem","spacer","itemsToRender","thStart","thEnd","getTheme","jsx","classnames","label","href","index","isLast","isLink","createElement","Icon"],"mappings":";;;;;AAiBO,MAAMA,IAAiD,CAAC;AAAA,EAC7D,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,GAAGC;AACL,MAAM;AACJ,MAAIF,EAAM,UAAU;AAClB,WAAO;AAGT,QAAM,CAACG,GAAOC,KAAU,GAAGC,CAAI,IAAIL,GAC7BM,IAAWD,EAAK,SAASA,EAAKA,EAAK,SAAS,CAAC,IAAIL,EAAMA,EAAM,SAAS,CAAC,GACvEO,IAAS,EAAE,OAAO,IAAI,MAAM,IAAI,WAAW,oBAAA,GAC3CC,IAAiBH,EAAK,SAAiB,CAACF,GAAOC,GAAQG,GAAQD,CAAQ,IAAxCN,GAE/B,EAAE,SAAAS,GAAS,OAAAC,MAAUC,EAASV,CAAK;AAEzC,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACV,GAAGV;AAAA,MACJ,WAAWW,EAAWd,GAAW,iBAAiB;AAAA,MAClD,aAAU;AAAA,MAEV,UAAA,gBAAAa,EAAC,MAAA,EAAG,WAAU,wEACX,YAAc,IAAI,CAAC,EAAE,OAAAE,GAAO,MAAAC,GAAM,WAAAhB,GAAW,GAAGG,EAAAA,GAASc,MAAU;AAClE,cAAMC,IAASD,MAAUR,EAAc,SAAS,GAC1CU,IAASH,KAAQ,CAACE;AACxB,eACE,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACE,GAAGjB;AAAAA,YACH,GAAIe,KAAU,EAAE,gBAAgB,OAAA;AAAA,YACjC,WAAWJ;AAAA,cACT;AAAA,cACA;AAAA,gBACE,CAACJ,CAAO,GAAG,CAACQ;AAAA,gBACZ,CAACP,CAAK,GAAGO;AAAA,cAAA;AAAA,cAEXlB;AAAAA,YAAA;AAAA,YAEF,KAAK,GAAGe,CAAK,IAAIE,CAAK;AAAA,UAAA;AAAA,UAErBE,IAAS,gBAAAN,EAAC,KAAA,EAAE,MAAAG,GAAa,aAAM,IAAOD;AAAA,UACtC,CAACG,KAAU,gBAAAL,EAACQ,GAAA,EAAK,WAAU,QAAO,MAAK,WAAU,OAAM,OAAA,CAAO;AAAA,QAAA;AAAA,MAGrE,CAAC,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,4 @@
1
- import type { Theme } from '../types/Theme';
1
+ import { Theme } from '../types/Theme';
2
2
  export declare const getTheme: (theme: Theme) => {
3
3
  thStart: string;
4
4
  thEnd: string;
@@ -1,4 +1,4 @@
1
- import type { ComponentProps, FunctionComponent } from 'react';
1
+ import { ComponentProps, FunctionComponent } from 'react';
2
2
  import { Button } from './Button';
3
3
  interface Props extends ComponentProps<typeof Button> {
4
4
  icon: 'ArrowDefaultLeft' | 'ArrowDefaultRight' | 'ArrowTailLeft' | 'ArrowTailRight';
@@ -1,6 +1,6 @@
1
- import { type ButtonHTMLAttributes, type FunctionComponent, type ReactNode } from 'react';
2
- import { type ButtonProps as ButtonPropsV2 } from './v2/Button.js';
3
- import type { IconicNames, IconicTypes } from '@clubmed/trident-icons';
1
+ import { ButtonHTMLAttributes, FunctionComponent, ReactNode } from 'react';
2
+ import { ButtonProps as ButtonPropsV2 } from './v2/Button.js';
3
+ import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
4
4
  export declare const BUTTON_THEME_LEGACY: any;
5
5
  export declare const BUTTON_VARIANT_LEGACY: any;
6
6
  export type ButtonPropsLegacy = {
@@ -1,5 +1,5 @@
1
- import type { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
2
- import { type CommonButtonProps } from './Button';
1
+ import { AnchorHTMLAttributes, FunctionComponent, PropsWithChildren } from 'react';
2
+ import { CommonButtonProps } from './Button';
3
3
  type ButtonAnchorProps = CommonButtonProps & {
4
4
  component?: FunctionComponent<PropsWithChildren<any>> | string;
5
5
  } & AnchorHTMLAttributes<HTMLAnchorElement>;
@@ -1,5 +1,5 @@
1
- import type { FunctionComponent, ReactNode } from 'react';
2
- import { type IconicNames, type IconicTypes } from '@clubmed/trident-icons';
1
+ import { FunctionComponent, ReactNode } from 'react';
2
+ import { IconicNames, IconicTypes } from '@clubmed/trident-icons';
3
3
  export type ButtonContentProps = {
4
4
  /**
5
5
  * @deprecated
@@ -1,6 +1,5 @@
1
- import type { FunctionComponent } from 'react';
2
- import './v2/Button.css';
3
- import { type FakeButtonProps } from './v2/Button';
1
+ import { FunctionComponent } from 'react';
2
+ import { FakeButtonProps } from './v2/Button';
4
3
  /**
5
4
  * @deprecated use Button with `component="span"` instead
6
5
  * @param props
@@ -1,5 +1,5 @@
1
- import type { FunctionComponent } from 'react';
2
- import { type CommonButtonProps } from './Button';
1
+ import { FunctionComponent } from 'react';
2
+ import { CommonButtonProps } from './Button';
3
3
  /**
4
4
  * @deprecated use Button with `component="span"` instead
5
5
  * @param props