@solibo/solibo-ui 1.0.4 → 1.0.6

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 (105) hide show
  1. package/dist/assets/index.css +1 -1
  2. package/dist/assets/index10.css +1 -1
  3. package/dist/assets/index11.css +1 -1
  4. package/dist/assets/index12.css +1 -1
  5. package/dist/assets/index13.css +1 -1
  6. package/dist/assets/index14.css +1 -1
  7. package/dist/assets/index15.css +1 -1
  8. package/dist/assets/index17.css +1 -1
  9. package/dist/assets/index20.css +1 -1
  10. package/dist/assets/index26.css +1 -1
  11. package/dist/assets/index3.css +1 -1
  12. package/dist/assets/index31.css +1 -1
  13. package/dist/assets/index32.css +1 -1
  14. package/dist/assets/index39.css +1 -1
  15. package/dist/assets/index4.css +1 -1
  16. package/dist/assets/index41.css +1 -1
  17. package/dist/assets/index42.css +1 -1
  18. package/dist/assets/index47.css +1 -1
  19. package/dist/assets/index5.css +1 -1
  20. package/dist/assets/index6.css +1 -1
  21. package/dist/assets/index7.css +1 -1
  22. package/dist/assets/index8.css +1 -1
  23. package/dist/assets/index9.css +1 -1
  24. package/dist/components/aside/index.cjs +1 -1
  25. package/dist/components/aside/index.js +15 -15
  26. package/dist/components/button/index.cjs +1 -1
  27. package/dist/components/button/index.js +10 -10
  28. package/dist/components/card/index.cjs +1 -1
  29. package/dist/components/card/index.cjs.map +1 -1
  30. package/dist/components/card/index.js +44 -34
  31. package/dist/components/card/index.js.map +1 -1
  32. package/dist/components/checkbox/index.cjs +1 -1
  33. package/dist/components/checkbox/index.js +1 -1
  34. package/dist/components/dropdown/index.cjs +1 -1
  35. package/dist/components/dropdown/index.js +101 -101
  36. package/dist/components/editor/index.cjs +21 -21
  37. package/dist/components/editor/index.cjs.map +1 -1
  38. package/dist/components/editor/index.js +1646 -1636
  39. package/dist/components/editor/index.js.map +1 -1
  40. package/dist/components/header/index.cjs +1 -1
  41. package/dist/components/header/index.js +10 -10
  42. package/dist/components/icon/index.cjs +1 -1
  43. package/dist/components/icon/index.js +1 -1
  44. package/dist/components/input/index.cjs +1 -1
  45. package/dist/components/input/index.js +2 -2
  46. package/dist/components/menu/index.cjs +1 -1
  47. package/dist/components/menu/index.cjs.map +1 -1
  48. package/dist/components/menu/index.js +14 -13
  49. package/dist/components/menu/index.js.map +1 -1
  50. package/dist/components/message/index.cjs +1 -1
  51. package/dist/components/message/index.cjs.map +1 -1
  52. package/dist/components/message/index.js +22 -21
  53. package/dist/components/message/index.js.map +1 -1
  54. package/dist/components/messages/index.cjs +1 -1
  55. package/dist/components/messages/index.cjs.map +1 -1
  56. package/dist/components/messages/index.js +34 -31
  57. package/dist/components/messages/index.js.map +1 -1
  58. package/dist/components/nav/index.cjs +1 -1
  59. package/dist/components/nav/index.cjs.map +1 -1
  60. package/dist/components/nav/index.js +34 -29
  61. package/dist/components/nav/index.js.map +1 -1
  62. package/dist/components/object/index.cjs +1 -1
  63. package/dist/components/object/index.js +1 -1
  64. package/dist/components/popover/index.cjs +1 -1
  65. package/dist/components/popover/index.cjs.map +1 -1
  66. package/dist/components/popover/index.js +83 -39
  67. package/dist/components/popover/index.js.map +1 -1
  68. package/dist/components/portal/index.cjs +1 -1
  69. package/dist/components/portal/index.js +17 -17
  70. package/dist/components/search/index.cjs +1 -1
  71. package/dist/components/search/index.js +37 -37
  72. package/dist/components/select/index.cjs +1 -1
  73. package/dist/components/select/index.js +2 -2
  74. package/dist/components/sortable/index.cjs +1 -1
  75. package/dist/components/sortable/index.js +1 -1
  76. package/dist/components/table/index.cjs +1 -1
  77. package/dist/components/table/index.js +1 -1
  78. package/dist/components/textarea/index.cjs +1 -1
  79. package/dist/components/textarea/index.js +1 -1
  80. package/dist/components/toast/index.cjs +1 -1
  81. package/dist/components/toast/index.js +1 -1
  82. package/dist/components/toasts/index.cjs +1 -1
  83. package/dist/components/toasts/index.js +1 -1
  84. package/dist/components/toggle/index.cjs +1 -1
  85. package/dist/components/toggle/index.js +1 -1
  86. package/dist/components/tooltip/index.cjs +1 -1
  87. package/dist/components/tooltip/index.js +6 -6
  88. package/dist/{icons-DYCSlAoX.cjs → icons-BoBeAmLe.cjs} +2 -2
  89. package/dist/{icons-DYCSlAoX.cjs.map → icons-BoBeAmLe.cjs.map} +1 -1
  90. package/dist/{icons-CKzd_L4D.js → icons-Dhj9mAkR.js} +9 -2
  91. package/dist/{icons-CKzd_L4D.js.map → icons-Dhj9mAkR.js.map} +1 -1
  92. package/dist/{index-N4IMha5Q.cjs → index-Ct0mJ-KK.cjs} +2 -2
  93. package/dist/{index-N4IMha5Q.cjs.map → index-Ct0mJ-KK.cjs.map} +1 -1
  94. package/dist/{index-DFXqYJat.js → index-D4LZQ-JF.js} +2 -2
  95. package/dist/{index-DFXqYJat.js.map → index-D4LZQ-JF.js.map} +1 -1
  96. package/dist/{index-CP5A_BGJ.cjs → index-D9Hq7ewF.cjs} +2 -2
  97. package/dist/{index-CP5A_BGJ.cjs.map → index-D9Hq7ewF.cjs.map} +1 -1
  98. package/dist/{index-B9xtLe2w.js → index-uQRsVtP-.js} +2 -2
  99. package/dist/{index-B9xtLe2w.js.map → index-uQRsVtP-.js.map} +1 -1
  100. package/dist/index.cjs +1 -1
  101. package/dist/index.d.ts +37 -11
  102. package/dist/index.js +39 -38
  103. package/dist/tokens.css +7 -2
  104. package/dist/tokens.json +105 -33
  105. package/package.json +1 -1
@@ -1,49 +1,59 @@
1
- import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
- import { t as i } from "../../classix-DG18itHa.js";
3
- import { Badge as g } from "../badge/index.js";
4
- import { Checkbox as N } from "../checkbox/index.js";
5
- import { Figure as f } from "../figure/index.js";
6
- import { Icon as h } from "../icon/index.js";
7
- import '../../assets/index32.css';const y = "_card_tv1p7_1", j = "_head_tv1p7_27", D = "_center_tv1p7_39", E = "_content_tv1p7_51", I = "_margin_tv1p7_57", T = "_clickable_tv1p7_93", $ = "_muted_tv1p7_108", k = "_selected_tv1p7_113", t = {
8
- card: y,
9
- head: j,
10
- center: D,
11
- content: E,
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import { t as s } from "../../classix-DG18itHa.js";
3
+ import { Badge as z } from "../badge/index.js";
4
+ import { Checkbox as w } from "../checkbox/index.js";
5
+ import { Figure as u } from "../figure/index.js";
6
+ import { Icon as v } from "../icon/index.js";
7
+ import '../../assets/index32.css';const N = "_card_zhirg_1", y = "_head_zhirg_27", j = "_center_zhirg_39", D = "_content_zhirg_51", E = "_preview_zhirg_57", I = "_margin_zhirg_97", T = "_clickable_zhirg_142", $ = "_muted_zhirg_157", k = "_selected_zhirg_162", e = {
8
+ card: N,
9
+ head: y,
10
+ center: j,
11
+ content: D,
12
+ preview: E,
13
+ "preview-leading": "_preview-leading_zhirg_68",
14
+ "preview-trailing": "_preview-trailing_zhirg_69",
15
+ "preview-content": "_preview-content_zhirg_89",
12
16
  margin: I,
13
17
  clickable: T,
14
18
  muted: $,
15
19
  selected: k,
16
- "image-top": "_image-top_tv1p7_118",
17
- "image-left": "_image-left_tv1p7_129"
18
- }, A = ({
19
- actions: v,
20
- badge: s,
21
- checkbox: m,
22
- children: _,
23
- emphasis: o = "default",
24
- header: p,
25
- icon: u,
20
+ "image-top": "_image-top_zhirg_167",
21
+ "image-left": "_image-left_zhirg_178"
22
+ }, G = ({
23
+ actions: f,
24
+ badge: g,
25
+ checkbox: n,
26
+ children: o,
27
+ emphasis: p = "default",
28
+ header: _,
29
+ icon: h,
26
30
  image: a,
27
31
  imagePosition: c = "top",
28
32
  onClick: l,
29
- variant: r = "default"
30
- }) => /* @__PURE__ */ d("article", { className: i(t.card, o === "muted" && t.muted, l && t.clickable, (m == null ? void 0 : m.checked) && t.selected), "data-emphasis": o, "data-minimal": r === "minimal", onClick: l, onKeyDown: (e) => {
31
- l && e.currentTarget === document.activeElement && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.currentTarget.click());
33
+ preview: m,
34
+ variant: t = "default"
35
+ }) => /* @__PURE__ */ d("article", { className: s(e.card, p === "muted" && e.muted, l && e.clickable, (n == null ? void 0 : n.checked) && e.selected), "data-emphasis": p, "data-minimal": t === "minimal", onClick: l, onKeyDown: (i) => {
36
+ l && i.currentTarget === document.activeElement && (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.currentTarget.click());
32
37
  }, tabIndex: l ? 0 : -1, "data-component": "card", children: [
33
- a && r !== "minimal" && c === "top" && /* @__PURE__ */ n(f, { className: t[`image-${c}`], children: a }),
38
+ a && t !== "minimal" && c === "top" && /* @__PURE__ */ r(u, { className: e[`image-${c}`], children: a }),
34
39
  /* @__PURE__ */ d("section", { children: [
35
- /* @__PURE__ */ d("div", { className: i(t.head, r === "minimal" && t.center), children: [
36
- m && /* @__PURE__ */ n("span", { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ n(N, { ...m }) }),
37
- a && r !== "minimal" && c === "left" && /* @__PURE__ */ n(f, { className: t[`image-${c}`], children: a }),
38
- p,
39
- s && /* @__PURE__ */ n(g, { ...s }),
40
- u && /* @__PURE__ */ n(h, { name: u, size: "medium" }),
41
- v
40
+ /* @__PURE__ */ d("div", { className: s(e.head, t === "minimal" && e.center), children: [
41
+ n && /* @__PURE__ */ r("span", { onClick: (i) => i.stopPropagation(), children: /* @__PURE__ */ r(w, { ...n }) }),
42
+ a && t !== "minimal" && c === "left" && /* @__PURE__ */ r(u, { className: e[`image-${c}`], children: a }),
43
+ _,
44
+ g && /* @__PURE__ */ r(z, { ...g }),
45
+ h && /* @__PURE__ */ r(v, { name: h, size: "medium" }),
46
+ f
42
47
  ] }),
43
- _ && r !== "minimal" && /* @__PURE__ */ n("div", { className: i(t.content, !!p && t.margin), children: _ })
48
+ o && t !== "minimal" && /* @__PURE__ */ r("div", { className: s(e.content, !!_ && e.margin), children: o }),
49
+ m && t !== "minimal" && /* @__PURE__ */ d("div", { className: s(e.preview, !!_ && e.margin), children: [
50
+ /* @__PURE__ */ r("span", { className: e["preview-leading"], children: m.leading }),
51
+ /* @__PURE__ */ r("span", { className: e["preview-content"], children: m.children }),
52
+ /* @__PURE__ */ r("span", { className: e["preview-trailing"], children: m.trailing })
53
+ ] })
44
54
  ] })
45
55
  ] });
46
56
  export {
47
- A as Card
57
+ G as Card
48
58
  };
49
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/card/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Badge, BadgeProps } from '@/components/badge';\nimport { Checkbox, CheckboxProps } from '@/components/checkbox';\nimport { Figure } from '@/components/figure';\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\ntype BaseCardProps = {\n actions?: React.ReactNode;\n badge?: BadgeProps;\n checkbox?: CheckboxProps;\n emphasis?: 'default' | 'muted';\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLElement>;\n};\n\ntype DefaultCardProps = BaseCardProps & {\n children?: React.ReactNode;\n header?: React.ReactNode;\n image?: React.ReactNode;\n imagePosition?: 'top' | 'left';\n variant?: 'default';\n};\n\ntype MinimalCardProps = BaseCardProps & {\n children?: never;\n header: React.ReactNode;\n image?: never;\n imagePosition?: never;\n variant: 'minimal';\n};\n\nexport type CardProps = DefaultCardProps | MinimalCardProps;\n\nexport const Card = ({\n actions,\n badge,\n checkbox,\n children,\n emphasis = 'default',\n header,\n icon,\n image,\n imagePosition = 'top',\n onClick,\n variant = 'default',\n}: CardProps) => {\n return (\n <article\n className={cx(\n styles.card,\n emphasis === 'muted' && styles.muted,\n onClick && styles.clickable,\n checkbox?.checked && styles.selected\n )}\n data-emphasis={emphasis}\n data-minimal={variant === 'minimal'}\n onClick={onClick}\n onKeyDown={(e) => {\n if (!onClick) return;\n\n if (e.currentTarget !== document.activeElement) {\n return;\n }\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n }}\n tabIndex={onClick ? 0 : -1}\n >\n {image && variant !== 'minimal' && imagePosition === 'top' && (\n <Figure className={styles[`image-${imagePosition}`]}>{image}</Figure>\n )}\n <section>\n <div className={cx(styles.head, variant === 'minimal' && styles.center)}>\n {checkbox && (\n <span onClick={(e) => e.stopPropagation()}>\n <Checkbox {...checkbox} />\n </span>\n )}\n {image && variant !== 'minimal' && imagePosition === 'left' && (\n <Figure className={styles[`image-${imagePosition}`]}>{image}</Figure>\n )}\n {header}\n {badge && <Badge {...badge} />}\n {icon && (\n <Icon\n name={icon}\n size='medium'\n />\n )}\n {actions}\n </div>\n {children && variant !== 'minimal' && (\n <div className={cx(styles.content, !!header && styles.margin)}>{children}</div>\n )}\n </section>\n </article>\n );\n};\n"],"names":["Card","actions","badge","checkbox","children","emphasis","header","icon","image","imagePosition","onClick","variant","jsxs","cx","styles","card","muted","clickable","checked","selected","e","currentTarget","document","activeElement","key","preventDefault","click","jsx","Figure","head","center","stopPropagation","Checkbox","Badge","Icon","content","margin"],"mappings":";;;;;;;;;;;;;;;;;GAqCaA,IAAOA,CAAC;AAAA,EACnBC,SAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,QAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,SAAAA;AAAAA,EACAC,SAAAA,IAAU;AACD,MAEP,gBAAAC,EAAC,WAAA,EACC,WAAWC,EACTC,EAAOC,MACPV,MAAa,WAAWS,EAAOE,OAC/BN,KAAWI,EAAOG,YAClBd,KAAAA,gBAAAA,EAAUe,YAAWJ,EAAOK,QAC9B,GACA,iBAAed,GACf,gBAAcM,MAAY,WAC1B,SAAAD,GACA,WAAYU,CAAAA,MAAM;AAChB,EAAKV,KAEDU,EAAEC,kBAAkBC,SAASC,kBAI7BH,EAAEI,QAAQ,WAAWJ,EAAEI,QAAQ,SACjCJ,EAAEK,eAAAA,GACFL,EAAEC,cAAcK,MAAAA;AAEpB,GACA,UAAUhB,IAAU,IAAI,IAAG,kBAAA,QAE1BF,UAAAA;AAAAA,EAAAA,KAASG,MAAY,aAAaF,MAAkB,SACnD,gBAAAkB,EAACC,GAAA,EAAO,WAAWd,EAAO,SAASL,CAAa,EAAE,GAAID,UAAAA,GAAM;AAAA,oBAE7D,WAAA,EACC,UAAA;AAAA,IAAA,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAOe,MAAMlB,MAAY,aAAaG,EAAOgB,MAAM,GACnE3B,UAAAA;AAAAA,MAAAA,KACC,gBAAAwB,EAAC,QAAA,EAAK,SAAUP,CAAAA,MAAMA,EAAEW,gBAAAA,GACtB,UAAA,gBAAAJ,EAACK,GAAA,EAAS,GAAI7B,EAAAA,CAAS,GACzB;AAAA,MAEDK,KAASG,MAAY,aAAaF,MAAkB,UACnD,gBAAAkB,EAACC,GAAA,EAAO,WAAWd,EAAO,SAASL,CAAa,EAAE,GAAID,UAAAA,GAAM;AAAA,MAE7DF;AAAAA,MACAJ,KAAS,gBAAAyB,EAACM,GAAA,EAAM,GAAI/B,EAAAA,CAAM;AAAA,MAC1BK,KACC,gBAAAoB,EAACO,GAAA,EACC,MAAM3B,GACN,MAAK,UAAQ;AAAA,MAGhBN;AAAAA,IAAAA,GACH;AAAA,IACCG,KAAYO,MAAY,aACvB,gBAAAgB,EAAC,SAAI,WAAWd,EAAGC,EAAOqB,SAAS,CAAC,CAAC7B,KAAUQ,EAAOsB,MAAM,GAAIhC,UAAAA,EAAAA,CAAS;AAAA,EAAA,EAAA,CAE7E;AAAA,GACF;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/card/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport { Badge, BadgeProps } from '@/components/badge';\nimport { Checkbox, CheckboxProps } from '@/components/checkbox';\nimport { Figure } from '@/components/figure';\nimport { Icon } from '@/components/icon';\nimport { IconName } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\ntype BaseCardProps = {\n actions?: React.ReactNode;\n badge?: BadgeProps;\n checkbox?: CheckboxProps;\n emphasis?: 'default' | 'muted';\n icon?: IconName;\n onClick?: React.MouseEventHandler<HTMLElement>;\n};\n\nexport type CardPreviewProps = {\n children: React.ReactNode;\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n};\n\ntype DefaultCardProps = BaseCardProps & {\n children?: React.ReactNode;\n header?: React.ReactNode;\n image?: React.ReactNode;\n imagePosition?: 'top' | 'left';\n preview?: CardPreviewProps;\n variant?: 'default';\n};\n\ntype MinimalCardProps = BaseCardProps & {\n children?: never;\n header: React.ReactNode;\n image?: never;\n imagePosition?: never;\n preview?: never;\n variant: 'minimal';\n};\n\nexport type CardProps = DefaultCardProps | MinimalCardProps;\n\nexport const Card = ({\n actions,\n badge,\n checkbox,\n children,\n emphasis = 'default',\n header,\n icon,\n image,\n imagePosition = 'top',\n onClick,\n preview,\n variant = 'default',\n}: CardProps) => {\n return (\n <article\n className={cx(\n styles.card,\n emphasis === 'muted' && styles.muted,\n onClick && styles.clickable,\n checkbox?.checked && styles.selected\n )}\n data-emphasis={emphasis}\n data-minimal={variant === 'minimal'}\n onClick={onClick}\n onKeyDown={(e) => {\n if (!onClick) return;\n\n if (e.currentTarget !== document.activeElement) {\n return;\n }\n\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n e.currentTarget.click();\n }\n }}\n tabIndex={onClick ? 0 : -1}\n >\n {image && variant !== 'minimal' && imagePosition === 'top' && (\n <Figure className={styles[`image-${imagePosition}`]}>{image}</Figure>\n )}\n <section>\n <div className={cx(styles.head, variant === 'minimal' && styles.center)}>\n {checkbox && (\n <span onClick={(e) => e.stopPropagation()}>\n <Checkbox {...checkbox} />\n </span>\n )}\n {image && variant !== 'minimal' && imagePosition === 'left' && (\n <Figure className={styles[`image-${imagePosition}`]}>{image}</Figure>\n )}\n {header}\n {badge && <Badge {...badge} />}\n {icon && (\n <Icon\n name={icon}\n size='medium'\n />\n )}\n {actions}\n </div>\n {children && variant !== 'minimal' && (\n <div className={cx(styles.content, !!header && styles.margin)}>{children}</div>\n )}\n {preview && variant !== 'minimal' && (\n <div className={cx(styles.preview, !!header && styles.margin)}>\n <span className={styles['preview-leading']}>{preview.leading}</span>\n <span className={styles['preview-content']}>{preview.children}</span>\n <span className={styles['preview-trailing']}>{preview.trailing}</span>\n </div>\n )}\n </section>\n </article>\n );\n};\n"],"names":["Card","actions","badge","checkbox","children","emphasis","header","icon","image","imagePosition","onClick","preview","variant","jsxs","cx","styles","card","muted","clickable","checked","selected","e","currentTarget","document","activeElement","key","preventDefault","click","jsx","Figure","head","center","stopPropagation","Checkbox","Badge","Icon","content","margin","leading","trailing"],"mappings":";;;;;;;;;;;;;;;;;;;;;GA6CaA,IAAOA,CAAC;AAAA,EACnBC,SAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAC,UAAAA,IAAW;AAAA,EACXC,QAAAA;AAAAA,EACAC,MAAAA;AAAAA,EACAC,OAAAA;AAAAA,EACAC,eAAAA,IAAgB;AAAA,EAChBC,SAAAA;AAAAA,EACAC,SAAAA;AAAAA,EACAC,SAAAA,IAAU;AACD,MAEP,gBAAAC,EAAC,WAAA,EACC,WAAWC,EACTC,EAAOC,MACPX,MAAa,WAAWU,EAAOE,OAC/BP,KAAWK,EAAOG,YAClBf,KAAAA,gBAAAA,EAAUgB,YAAWJ,EAAOK,QAC9B,GACA,iBAAef,GACf,gBAAcO,MAAY,WAC1B,SAAAF,GACA,WAAYW,CAAAA,MAAM;AAChB,EAAKX,KAEDW,EAAEC,kBAAkBC,SAASC,kBAI7BH,EAAEI,QAAQ,WAAWJ,EAAEI,QAAQ,SACjCJ,EAAEK,eAAAA,GACFL,EAAEC,cAAcK,MAAAA;AAEpB,GACA,UAAUjB,IAAU,IAAI,IAAG,kBAAA,QAE1BF,UAAAA;AAAAA,EAAAA,KAASI,MAAY,aAAaH,MAAkB,SACnD,gBAAAmB,EAACC,GAAA,EAAO,WAAWd,EAAO,SAASN,CAAa,EAAE,GAAID,UAAAA,GAAM;AAAA,oBAE7D,WAAA,EACC,UAAA;AAAA,IAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWC,EAAGC,EAAOe,MAAMlB,MAAY,aAAaG,EAAOgB,MAAM,GACnE5B,UAAAA;AAAAA,MAAAA,KACC,gBAAAyB,EAAC,QAAA,EAAK,SAAUP,CAAAA,MAAMA,EAAEW,gBAAAA,GACtB,UAAA,gBAAAJ,EAACK,GAAA,EAAS,GAAI9B,EAAAA,CAAS,GACzB;AAAA,MAEDK,KAASI,MAAY,aAAaH,MAAkB,UACnD,gBAAAmB,EAACC,GAAA,EAAO,WAAWd,EAAO,SAASN,CAAa,EAAE,GAAID,UAAAA,GAAM;AAAA,MAE7DF;AAAAA,MACAJ,KAAS,gBAAA0B,EAACM,GAAA,EAAM,GAAIhC,EAAAA,CAAM;AAAA,MAC1BK,KACC,gBAAAqB,EAACO,GAAA,EACC,MAAM5B,GACN,MAAK,UAAQ;AAAA,MAGhBN;AAAAA,IAAAA,GACH;AAAA,IACCG,KAAYQ,MAAY,aACvB,gBAAAgB,EAAC,SAAI,WAAWd,EAAGC,EAAOqB,SAAS,CAAC,CAAC9B,KAAUS,EAAOsB,MAAM,GAAIjC,UAAAA,GAAS;AAAA,IAE1EO,KAAWC,MAAY,aACtB,gBAAAC,EAAC,SAAI,WAAWC,EAAGC,EAAOJ,SAAS,CAAC,CAACL,KAAUS,EAAOsB,MAAM,GAC1D,UAAA;AAAA,MAAA,gBAAAT,EAAC,UAAK,WAAWb,EAAO,iBAAiB,GAAIJ,YAAQ2B,SAAQ;AAAA,wBAC5D,QAAA,EAAK,WAAWvB,EAAO,iBAAiB,GAAIJ,YAAQP,UAAS;AAAA,wBAC7D,QAAA,EAAK,WAAWW,EAAO,kBAAkB,GAAIJ,YAAQ4B,SAAAA,CAAS;AAAA,IAAA,EAAA,CACjE;AAAA,EAAA,EAAA,CAEJ;AAAA,GACF;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const e=require("react/jsx-runtime"),x=require("../../icons-DYCSlAoX.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1glqu_3",u={checkbox:h},k=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:u.checkbox,"data-component":"checkbox",children:[e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),c&&e.jsx(b.Loading,{size:16,sticky:!0}),o&&o]})};exports.Checkbox=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index33.css');const e=require("react/jsx-runtime"),x=require("../../icons-BoBeAmLe.cjs"),b=require("../loading/index.cjs"),h="_checkbox_1glqu_3",u={checkbox:h},k=({checked:s,disabled:t,isLoading:c,label:o,onChange:n,...i})=>{const r={"--icon-svg":x.iconSVG("check")};return e.jsxs("label",{className:u.checkbox,"data-component":"checkbox",children:[e.jsx("input",{checked:s,disabled:t||c,onChange:n,type:"checkbox",style:r,...i}),c&&e.jsx(b.Loading,{size:16,sticky:!0}),o&&o]})};exports.Checkbox=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
- import { i as x } from "../../icons-CKzd_L4D.js";
2
+ import { i as x } from "../../icons-Dhj9mAkR.js";
3
3
  import { Loading as k } from "../loading/index.js";
4
4
  import '../../assets/index33.css';const b = "_checkbox_1glqu_3", m = {
5
5
  checkbox: b
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const r=require("react/jsx-runtime"),E=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),ce=require("../../icons-DYCSlAoX.cjs"),X=require("../../index-CP5A_BGJ.cjs"),ue=require("../list/index.cjs"),N=require("../../index-N4IMha5Q.cjs");function V(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(V).join(" "):a.isValidElement(t)?V(t.props.children):""}function de(t){return a.isValidElement(t)&&t.type==="option"}function pe(t){return a.isValidElement(t)&&t.type==="optgroup"}function fe(t){return a.isValidElement(t)&&t.type===a.Fragment}function me(t){return a.isValidElement(t)&&t.type===N.Select}function W(t,i,l=!1){const s=[];return a.Children.forEach(t,n=>{if(fe(n))s.push(...W(n.props.children,i,l));else if(de(n)){const c=V(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;s.push({disabled:l||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else pe(n)&&s.push(...W(n.props.children,n.props.label,l||!!n.props.disabled))}),s}function _e(t){const i=t.trim();if(!i)return null;const s=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${s}$`,"i")}function he(t,i){const l=_e(i),s=t.filter(n=>!n.hidden&&!n.isPlaceholder);return l?s.filter(n=>l.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):s}function ye(t,i){return t.find(l=>l.value===i)??t.find(l=>l.isPlaceholder)??t[0]}function xe(t,i,l){var s,n;return i!=null?String(i):l!=null?String(l):((s=t.find(c=>c.selected))==null?void 0:s.value)??((n=t[0])==null?void 0:n.value)??""}function be(t){if(me(t)){const{children:i,placeholder:l,...s}=t.props;return{children:r.jsxs(r.Fragment,{children:[l&&r.jsx("option",{hidden:!0,value:"",children:l}),i]}),props:s}}return{children:t.props.children,props:t.props}}const ge="_combobox_qsl6y_3",ve="_dropdown_qsl6y_27",je="_empty_qsl6y_30",qe="_group_qsl6y_31",we="_placeholder_qsl6y_32",Se="_filter_qsl6y_40",Ce="_native_qsl6y_52",Ee="_option_qsl6y_62",Ne="_options_qsl6y_84",Ve="_panel_qsl6y_108",Le="_selected_qsl6y_131",Re="_text_qsl6y_135",$e="_trigger_qsl6y_145",Be="_minimal_qsl6y_164",Ie="_inline_qsl6y_221",De="_label_qsl6y_253",o={combobox:ge,"combobox-input":"_combobox-input_qsl6y_12",dropdown:ve,empty:je,group:qe,placeholder:we,filter:Se,native:Ce,option:Ee,options:Ne,panel:Ve,selected:Le,text:Re,trigger:$e,minimal:Be,inline:Ie,label:De,"inline-field":"_inline-field_qsl6y_259"};function Y(t,i){return{"--icon-svg":ce.iconSVG(t).replace("currentColor",i)}}const Pe=({children:t,className:i,combobox:l=!1,createOption:s,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:L="Filter",selectedItems:Z,variant:y="default",...ee})=>{const R=be(t),{defaultValue:te,onChange:$,value:B,...ne}=R.props,g=N.sanitizeSelectProps(ne),M=a.useRef(null),Q=a.useRef(null),v=a.useId(),z=a.useRef(null),m=a.useRef(null),x=W(R.children),b=B!=null,I=xe(x,B,te),[D,P]=a.useState(()=>I),[u,p]=a.useState(!1),[j,q]=a.useState(""),w=b?String(B):D,O={default:N.resolveColor("--colors-semantic-content-secondary"),white:N.resolveColor("--color-white","white")},T=y==="minimal"?O.white:O.default,S=ye(x,w),le=Y("chevron",T),se=Y("search",T),A=he(x,j),_=j.trim(),C=!!(l&&s&&_&&s.isValid(_)),re=c&&y==="inline"?X.formatInlineLabel(c):c,G=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===w,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(I)},[I,D,b,x]),a.useEffect(()=>{var e;if(!u){q("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=Q.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const oe=e=>{b||P(e.target.value),$==null||$(e)},k=()=>{var e;p(!1),l||(e=M.current)==null||e.focus()},K=()=>{var e;q(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!s||!C||(s.onCreate(_),K())},ie=e=>{var U;b||P(e);const d=z.current;if(!d){k();return}const h=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;h==null||h.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),l?K():k()},ae=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&C&&(e.preventDefault(),H())},J=r.jsxs("div",{className:E.t(o.dropdown,y==="inline"&&o.inline,y==="minimal"&&o.minimal,i),onKeyDown:ae,ref:Q,...ee,children:[r.jsx("select",{...g,"aria-hidden":"true",className:o.native,onChange:oe,ref:z,tabIndex:-1,value:w,children:R.children}),l?r.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,r.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":g["aria-label"]??c??L,className:o["combobox-input"],disabled:g.disabled,onChange:e=>{q(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:L||void 0,ref:m,role:"combobox",type:"text",value:j})]}):r.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${v} ${v}-value`:void 0,className:E.t(o.trigger,(S==null?void 0:S.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:g.disabled,onClick:()=>p(e=>!e),ref:M,style:le,variant:"tertiary",children:r.jsx("span",{className:o.text,id:`${v}-value`,children:G(S)})}),u&&r.jsxs("div",{className:o.panel,children:[!l&&r.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"search",onChange:e=>q(e.target.value),placeholder:L,ref:m,style:se,type:"search",value:j}),r.jsxs(ue.List,{"aria-label":"Dropdown",className:o.options,children:[A.map(e=>{const d=e.value===w;return r.jsx("li",{"data-component":"dropdown",children:r.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:E.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ie(e.value),variant:"tertiary",children:[r.jsx("span",{className:o.text,children:G(e)}),e.groupLabel&&r.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),C&&s&&r.jsx("li",{children:r.jsx(F.Button,{"aria-label":V(s.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:r.jsx("span",{className:o.text,children:s.render(_)})})}),A.length===0&&!C&&r.jsx("li",{className:o.empty,children:n})]})]})]});return c?r.jsxs("div",{className:E.t(o.label,y==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[r.jsx("span",{id:v,children:re}),J]}):J};exports.Dropdown=Pe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const s=require("react/jsx-runtime"),N=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),ce=require("../../icons-BoBeAmLe.cjs"),X=require("../../index-D9Hq7ewF.cjs"),ue=require("../list/index.cjs"),V=require("../../index-Ct0mJ-KK.cjs");function L(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(L).join(" "):a.isValidElement(t)?L(t.props.children):""}function de(t){return a.isValidElement(t)&&t.type==="option"}function pe(t){return a.isValidElement(t)&&t.type==="optgroup"}function fe(t){return a.isValidElement(t)&&t.type===a.Fragment}function me(t){return a.isValidElement(t)&&t.type===V.Select}function W(t,i,r=!1){const l=[];return a.Children.forEach(t,n=>{if(fe(n))l.push(...W(n.props.children,i,r));else if(de(n)){const c=L(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;l.push({disabled:r||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else pe(n)&&l.push(...W(n.props.children,n.props.label,r||!!n.props.disabled))}),l}function xe(t){const i=t.trim();if(!i)return null;const l=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${l}$`,"i")}function ge(t,i){const r=xe(i),l=t.filter(n=>!n.hidden&&!n.isPlaceholder);return r?l.filter(n=>r.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):l}function _e(t,i){return t.find(r=>r.value===i)??t.find(r=>r.isPlaceholder)??t[0]}function he(t,i,r){var l,n;return i!=null?String(i):r!=null?String(r):((l=t.find(c=>c.selected))==null?void 0:l.value)??((n=t[0])==null?void 0:n.value)??""}function be(t){if(me(t)){const{children:i,placeholder:r,...l}=t.props;return{children:s.jsxs(s.Fragment,{children:[r&&s.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:l}}return{children:t.props.children,props:t.props}}const ve="_combobox_1x1gr_3",ye="_dropdown_1x1gr_27",je="_empty_1x1gr_30",we="_group_1x1gr_31",Se="_placeholder_1x1gr_32",Ce="_filter_1x1gr_40",Ee="_native_1x1gr_52",Ne="_option_1x1gr_62",Ve="_options_1x1gr_84",Le="_panel_1x1gr_108",Re="_selected_1x1gr_132",$e="_text_1x1gr_136",Be="_trigger_1x1gr_145",Ie="_minimal_1x1gr_164",qe="_inline_1x1gr_219",De="_label_1x1gr_251",o={combobox:ve,"combobox-input":"_combobox-input_1x1gr_12",dropdown:ye,empty:je,group:we,placeholder:Se,filter:Ce,native:Ee,option:Ne,options:Ve,panel:Le,selected:Re,text:$e,trigger:Be,minimal:Ie,inline:qe,label:De,"inline-field":"_inline-field_1x1gr_257"};function Y(t,i){return{"--icon-svg":ce.iconSVG(t).replace("currentColor",i)}}const Pe=({children:t,className:i,combobox:r=!1,createOption:l,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:_="default",...ee})=>{const $=be(t),{defaultValue:te,onChange:B,value:I,...ne}=$.props,v=V.sanitizeSelectProps(ne),M=a.useRef(null),Q=a.useRef(null),y=a.useId(),z=a.useRef(null),m=a.useRef(null),h=W($.children),b=I!=null,q=he(h,I,te),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[j,w]=a.useState(""),S=b?String(I):D,O={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},T=_==="minimal"?O.white:O.default,C=_e(h,S),re=Y("chevron",T),le=Y("search",T),A=ge(h,j),x=j.trim(),E=!!(r&&l&&x&&l.isValid(x)),se=c&&_==="inline"?X.formatInlineLabel(c):c,G=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===S,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!h.some(e=>e.value===D)&&P(q)},[q,D,b,h]),a.useEffect(()=>{var e;if(!u){w("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var g;(g=Q.current)!=null&&g.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const oe=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),r||(e=M.current)==null||e.focus()},K=()=>{var e;w(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!l||!E||(l.onCreate(x),K())},ie=e=>{var U;b||P(e);const d=z.current;if(!d){k();return}const g=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;g==null||g.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),r?K():k()},ae=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=s.jsxs("div",{className:N.t(o.dropdown,_==="inline"&&o.inline,_==="minimal"&&o.minimal,i),onKeyDown:ae,ref:Q,...ee,children:[s.jsx("select",{...v,"aria-hidden":"true",className:o.native,onChange:oe,ref:z,tabIndex:-1,value:S,children:$.children}),r?s.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,s.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":v["aria-label"]??c??R,className:o["combobox-input"],disabled:v.disabled,onChange:e=>{w(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:j})]}):s.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${y} ${y}-value`:void 0,className:N.t(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:v.disabled,onClick:()=>p(e=>!e),ref:M,style:re,variant:"tertiary",children:s.jsx("span",{className:o.text,id:`${y}-value`,children:G(C)})}),u&&s.jsxs("div",{className:o.panel,children:[!r&&s.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"search",onChange:e=>w(e.target.value),placeholder:R,ref:m,style:le,type:"search",value:j}),s.jsxs(ue.List,{"aria-label":"Dropdown",className:o.options,children:[A.map(e=>{const d=e.value===S;return s.jsx("li",{"data-component":"dropdown",children:s.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:N.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ie(e.value),variant:"tertiary",children:[s.jsx("span",{className:o.text,children:G(e)}),e.groupLabel&&s.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&l&&s.jsx("li",{children:s.jsx(F.Button,{"aria-label":L(l.render(x))||x,className:o.option,onClick:H,variant:"tertiary",children:s.jsx("span",{className:o.text,children:l.render(x)})})}),A.length===0&&!E&&s.jsx("li",{className:o.empty,children:n})]})]})]});return c?s.jsxs("div",{className:N.t(o.label,_==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[s.jsx("span",{id:y,children:se}),J]}):J};exports.Dropdown=Pe;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,13 +1,13 @@
1
- import { jsxs as p, Fragment as pe, jsx as i } from "react/jsx-runtime";
2
- import { t as V } from "../../classix-DG18itHa.js";
3
- import fe, { Children as me, isValidElement as v, useRef as I, useId as he, useState as W, useEffect as Q } from "react";
4
- import { Button as z } from "../button/index.js";
5
- import { i as _e } from "../../icons-CKzd_L4D.js";
6
- import { f as ye, I as be } from "../../index-DFXqYJat.js";
7
- import { List as ge } from "../list/index.js";
8
- import { S as ve, s as xe, r as ee } from "../../index-B9xtLe2w.js";
9
- import '../../assets/index39.css';function L(t) {
10
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(L).join(" ") : v(t) ? L(t.props.children) : "";
1
+ import { jsxs as p, Fragment as pe, jsx as s } from "react/jsx-runtime";
2
+ import { t as I } from "../../classix-DG18itHa.js";
3
+ import fe, { Children as me, isValidElement as v, useRef as L, useId as ge, useState as Q, useEffect as z } from "react";
4
+ import { Button as M } from "../button/index.js";
5
+ import { i as he } from "../../icons-Dhj9mAkR.js";
6
+ import { f as _e, I as be } from "../../index-D4LZQ-JF.js";
7
+ import { List as xe } from "../list/index.js";
8
+ import { S as ve, s as ye, r as ee } from "../../index-uQRsVtP-.js";
9
+ import '../../assets/index39.css';function $(t) {
10
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map($).join(" ") : v(t) ? $(t.props.children) : "";
11
11
  }
12
12
  function we(t) {
13
13
  return v(t) && t.type === "option";
@@ -15,22 +15,22 @@ function we(t) {
15
15
  function Se(t) {
16
16
  return v(t) && t.type === "optgroup";
17
17
  }
18
- function qe(t) {
18
+ function Ne(t) {
19
19
  return v(t) && t.type === fe.Fragment;
20
20
  }
21
- function Ne(t) {
21
+ function Ce(t) {
22
22
  return v(t) && t.type === ve;
23
23
  }
24
- function M(t, o, r = !1) {
24
+ function A(t, i, r = !1) {
25
25
  const l = [];
26
26
  return me.forEach(t, (n) => {
27
- if (qe(n))
28
- l.push(...M(n.props.children, o, r));
27
+ if (Ne(n))
28
+ l.push(...A(n.props.children, i, r));
29
29
  else if (we(n)) {
30
- const a = L(n.props.children).trim(), f = n.props.value != null ? String(n.props.value) : a;
30
+ const a = $(n.props.children).trim(), f = n.props.value != null ? String(n.props.value) : a;
31
31
  l.push({
32
32
  disabled: r || !!n.props.disabled,
33
- groupLabel: o,
33
+ groupLabel: i,
34
34
  hidden: !!n.props.hidden,
35
35
  isPlaceholder: !!(n.props.hidden && f === ""),
36
36
  label: n.props.children,
@@ -38,37 +38,37 @@ function M(t, o, r = !1) {
38
38
  text: a,
39
39
  value: f
40
40
  });
41
- } else Se(n) && l.push(...M(n.props.children, n.props.label, r || !!n.props.disabled));
41
+ } else Se(n) && l.push(...A(n.props.children, n.props.label, r || !!n.props.disabled));
42
42
  }), l;
43
43
  }
44
- function Ce(t) {
45
- const o = t.trim();
46
- if (!o) return null;
47
- const l = [.../[*?]/.test(o) ? o : `*${o}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
44
+ function Ee(t) {
45
+ const i = t.trim();
46
+ if (!i) return null;
47
+ const l = [.../[*?]/.test(i) ? i : `*${i}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
48
48
  return new RegExp(`^${l}$`, "i");
49
49
  }
50
- function Ee(t, o) {
51
- const r = Ce(o), l = t.filter((n) => !n.hidden && !n.isPlaceholder);
50
+ function Ve(t, i) {
51
+ const r = Ee(i), l = t.filter((n) => !n.hidden && !n.isPlaceholder);
52
52
  return r ? l.filter((n) => r.test([n.groupLabel, n.text, n.value].filter(Boolean).join(" "))) : l;
53
53
  }
54
- function Ve(t, o) {
55
- return t.find((r) => r.value === o) ?? t.find((r) => r.isPlaceholder) ?? t[0];
54
+ function Ie(t, i) {
55
+ return t.find((r) => r.value === i) ?? t.find((r) => r.isPlaceholder) ?? t[0];
56
56
  }
57
- function Ie(t, o, r) {
57
+ function Le(t, i, r) {
58
58
  var l, n;
59
- return o != null ? String(o) : r != null ? String(r) : ((l = t.find((a) => a.selected)) == null ? void 0 : l.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
59
+ return i != null ? String(i) : r != null ? String(r) : ((l = t.find((a) => a.selected)) == null ? void 0 : l.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
60
60
  }
61
- function Le(t) {
62
- if (Ne(t)) {
61
+ function $e(t) {
62
+ if (Ce(t)) {
63
63
  const {
64
- children: o,
64
+ children: i,
65
65
  placeholder: r,
66
66
  ...l
67
67
  } = t.props;
68
68
  return {
69
69
  children: /* @__PURE__ */ p(pe, { children: [
70
- r && /* @__PURE__ */ i("option", { hidden: !0, value: "", children: r }),
71
- o
70
+ r && /* @__PURE__ */ s("option", { hidden: !0, value: "", children: r }),
71
+ i
72
72
  ] }),
73
73
  props: l
74
74
  };
@@ -78,131 +78,131 @@ function Le(t) {
78
78
  props: t.props
79
79
  };
80
80
  }
81
- const $e = "_combobox_qsl6y_3", Be = "_dropdown_qsl6y_27", ke = "_empty_qsl6y_30", De = "_group_qsl6y_31", Pe = "_placeholder_qsl6y_32", Re = "_filter_qsl6y_40", je = "_native_qsl6y_52", Fe = "_option_qsl6y_62", We = "_options_qsl6y_84", Qe = "_panel_qsl6y_108", ze = "_selected_qsl6y_131", Me = "_text_qsl6y_135", Ae = "_trigger_qsl6y_145", Ge = "_minimal_qsl6y_164", Ke = "_inline_qsl6y_221", Oe = "_label_qsl6y_253", s = {
82
- combobox: $e,
83
- "combobox-input": "_combobox-input_qsl6y_12",
84
- dropdown: Be,
85
- empty: ke,
86
- group: De,
87
- placeholder: Pe,
88
- filter: Re,
89
- native: je,
90
- option: Fe,
91
- options: We,
92
- panel: Qe,
93
- selected: ze,
94
- text: Me,
95
- trigger: Ae,
96
- minimal: Ge,
97
- inline: Ke,
98
- label: Oe,
99
- "inline-field": "_inline-field_qsl6y_259"
81
+ const Be = "_combobox_1x1gr_3", ke = "_dropdown_1x1gr_27", De = "_empty_1x1gr_30", Pe = "_group_1x1gr_31", Re = "_placeholder_1x1gr_32", je = "_filter_1x1gr_40", Fe = "_native_1x1gr_52", We = "_option_1x1gr_62", Qe = "_options_1x1gr_84", ze = "_panel_1x1gr_108", Me = "_selected_1x1gr_132", Ae = "_text_1x1gr_136", Ge = "_trigger_1x1gr_145", Ke = "_minimal_1x1gr_164", Oe = "_inline_1x1gr_219", Te = "_label_1x1gr_251", o = {
82
+ combobox: Be,
83
+ "combobox-input": "_combobox-input_1x1gr_12",
84
+ dropdown: ke,
85
+ empty: De,
86
+ group: Pe,
87
+ placeholder: Re,
88
+ filter: je,
89
+ native: Fe,
90
+ option: We,
91
+ options: Qe,
92
+ panel: ze,
93
+ selected: Me,
94
+ text: Ae,
95
+ trigger: Ge,
96
+ minimal: Ke,
97
+ inline: Oe,
98
+ label: Te,
99
+ "inline-field": "_inline-field_1x1gr_257"
100
100
  };
101
- function te(t, o) {
101
+ function te(t, i) {
102
102
  return {
103
- "--icon-svg": _e(t).replace("currentColor", o)
103
+ "--icon-svg": he(t).replace("currentColor", i)
104
104
  };
105
105
  }
106
106
  const tt = ({
107
107
  children: t,
108
- className: o,
108
+ className: i,
109
109
  combobox: r = !1,
110
110
  createOption: l,
111
111
  emptyLabel: n = "No matches found",
112
112
  label: a,
113
113
  renderOption: f,
114
- searchPlaceholder: $ = "Filter",
114
+ searchPlaceholder: B = "Filter",
115
115
  selectedItems: ne,
116
- variant: y = "default",
116
+ variant: _ = "default",
117
117
  ...re
118
118
  }) => {
119
- const B = Le(t), {
119
+ const k = $e(t), {
120
120
  defaultValue: le,
121
- onChange: k,
122
- value: D,
123
- ...se
124
- } = B.props, x = xe(se), A = I(null), G = I(null), w = he(), K = I(null), m = I(null), b = M(B.children), g = D != null, P = Ie(b, D, le), [R, j] = W(() => P), [c, d] = W(!1), [S, q] = W(""), N = g ? String(D) : R, O = {
121
+ onChange: D,
122
+ value: P,
123
+ ...oe
124
+ } = k.props, y = ye(oe), G = L(null), K = L(null), w = ge(), O = L(null), m = L(null), b = A(k.children), x = P != null, R = Le(b, P, le), [j, F] = Q(() => R), [c, d] = Q(!1), [S, N] = Q(""), C = x ? String(P) : j, T = {
125
125
  default: ee("--colors-semantic-content-secondary"),
126
126
  white: ee("--color-white", "white")
127
- }, T = y === "minimal" ? O.white : O.default, C = Ve(b, N), oe = te("chevron", T), ie = te("search", T), H = Ee(b, S), h = S.trim(), E = !!(r && l && h && l.isValid(h)), ae = a && y === "inline" ? ye(a) : a, J = (e) => e ? (f == null ? void 0 : f({
127
+ }, q = _ === "minimal" ? T.white : T.default, E = Ie(b, C), ie = te("chevron", q), se = te("search", q), H = Ve(b, S), g = S.trim(), V = !!(r && l && g && l.isValid(g)), ae = a && _ === "inline" ? _e(a) : a, J = (e) => e ? (f == null ? void 0 : f({
128
128
  groupLabel: e.groupLabel,
129
- isSelected: e.value === N,
129
+ isSelected: e.value === C,
130
130
  label: e.label,
131
131
  text: e.text,
132
132
  value: e.value
133
133
  })) ?? e.label : "Select an option";
134
- Q(() => {
135
- !g && !b.some((e) => e.value === R) && j(P);
136
- }, [P, R, g, b]), Q(() => {
134
+ z(() => {
135
+ !x && !b.some((e) => e.value === j) && F(R);
136
+ }, [R, j, x, b]), z(() => {
137
137
  var e;
138
138
  if (!c) {
139
- q("");
139
+ N("");
140
140
  return;
141
141
  }
142
142
  (e = m.current) == null || e.focus();
143
- }, [c]), Q(() => {
143
+ }, [c]), z(() => {
144
144
  if (!c)
145
145
  return;
146
146
  const e = (u) => {
147
- var _;
148
- (_ = G.current) != null && _.contains(u.target) || d(!1);
147
+ var h;
148
+ (h = K.current) != null && h.contains(u.target) || d(!1);
149
149
  };
150
150
  return document.addEventListener("mousedown", e), () => {
151
151
  document.removeEventListener("mousedown", e);
152
152
  };
153
153
  }, [c]);
154
154
  const ce = (e) => {
155
- g || j(e.target.value), k == null || k(e);
156
- }, F = () => {
155
+ x || F(e.target.value), D == null || D(e);
156
+ }, W = () => {
157
157
  var e;
158
- d(!1), r || (e = A.current) == null || e.focus();
158
+ d(!1), r || (e = G.current) == null || e.focus();
159
159
  }, U = () => {
160
160
  var e;
161
- q(""), d(!0), (e = m.current) == null || e.focus();
161
+ N(""), d(!0), (e = m.current) == null || e.focus();
162
162
  }, X = () => {
163
- !l || !E || (l.onCreate(h), U());
163
+ !l || !V || (l.onCreate(g), U());
164
164
  }, ue = (e) => {
165
165
  var Z;
166
- g || j(e);
167
- const u = K.current;
166
+ x || F(e);
167
+ const u = O.current;
168
168
  if (!u) {
169
- F();
169
+ W();
170
170
  return;
171
171
  }
172
- const _ = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
173
- _ == null || _.call(u, e), u.dispatchEvent(new Event("change", {
172
+ const h = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
173
+ h == null || h.call(u, e), u.dispatchEvent(new Event("change", {
174
174
  bubbles: !0
175
- })), r ? U() : F();
175
+ })), r ? U() : W();
176
176
  }, de = (e) => {
177
- e.key === "Escape" && F(), e.key === "Enter" && e.target === m.current && E && (e.preventDefault(), X());
178
- }, Y = /* @__PURE__ */ p("div", { className: V(s.dropdown, y === "inline" && s.inline, y === "minimal" && s.minimal, o), onKeyDown: de, ref: G, ...re, children: [
179
- /* @__PURE__ */ i("select", { ...x, "aria-hidden": "true", className: s.native, onChange: ce, ref: K, tabIndex: -1, value: N, children: B.children }),
180
- r ? /* @__PURE__ */ p("div", { className: s.combobox, onClick: () => {
177
+ e.key === "Escape" && W(), e.key === "Enter" && e.target === m.current && V && (e.preventDefault(), X());
178
+ }, Y = /* @__PURE__ */ p("div", { className: I(o.dropdown, _ === "inline" && o.inline, _ === "minimal" && o.minimal, i), onKeyDown: de, ref: K, ...re, children: [
179
+ /* @__PURE__ */ s("select", { ...y, "aria-hidden": "true", className: o.native, onChange: ce, ref: O, tabIndex: -1, value: C, children: k.children }),
180
+ r ? /* @__PURE__ */ p("div", { className: o.combobox, onClick: () => {
181
181
  var e;
182
182
  return (e = m.current) == null ? void 0 : e.focus();
183
183
  }, children: [
184
184
  ne,
185
- /* @__PURE__ */ i("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": x["aria-label"] ?? a ?? $, className: s["combobox-input"], disabled: x.disabled, onChange: (e) => {
186
- q(e.target.value), d(!0);
187
- }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: $ || void 0, ref: m, role: "combobox", type: "text", value: S })
188
- ] }) : /* @__PURE__ */ i(z, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${w} ${w}-value` : void 0, className: V(s.trigger, (C == null ? void 0 : C.isPlaceholder) && s.placeholder), "data-open": c ? "true" : void 0, disabled: x.disabled, onClick: () => d((e) => !e), ref: A, style: oe, variant: "tertiary", children: /* @__PURE__ */ i("span", { className: s.text, id: `${w}-value`, children: J(C) }) }),
189
- c && /* @__PURE__ */ p("div", { className: s.panel, children: [
190
- !r && /* @__PURE__ */ i(be, { "aria-label": "Filter", className: s.filter, icon: "search", onChange: (e) => q(e.target.value), placeholder: $, ref: m, style: ie, type: "search", value: S }),
191
- /* @__PURE__ */ p(ge, { "aria-label": "Dropdown", className: s.options, children: [
185
+ /* @__PURE__ */ s("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": y["aria-label"] ?? a ?? B, className: o["combobox-input"], disabled: y.disabled, onChange: (e) => {
186
+ N(e.target.value), d(!0);
187
+ }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: B || void 0, ref: m, role: "combobox", type: "text", value: S })
188
+ ] }) : /* @__PURE__ */ s(M, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${w} ${w}-value` : void 0, className: I(o.trigger, (E == null ? void 0 : E.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: y.disabled, onClick: () => d((e) => !e), ref: G, style: ie, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, id: `${w}-value`, children: J(E) }) }),
189
+ c && /* @__PURE__ */ p("div", { className: o.panel, children: [
190
+ !r && /* @__PURE__ */ s(be, { "aria-label": "Filter", className: o.filter, icon: "search", onChange: (e) => N(e.target.value), placeholder: B, ref: m, style: se, type: "search", value: S }),
191
+ /* @__PURE__ */ p(xe, { "aria-label": "Dropdown", className: o.options, children: [
192
192
  H.map((e) => {
193
- const u = e.value === N;
194
- return /* @__PURE__ */ i("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(z, { "aria-label": u ? `${e.text}, selected` : e.text, className: V(s.option, u && s.selected), disabled: e.disabled, onClick: () => ue(e.value), variant: "tertiary", children: [
195
- /* @__PURE__ */ i("span", { className: s.text, children: J(e) }),
196
- e.groupLabel && /* @__PURE__ */ i("small", { className: s.group, children: e.groupLabel })
193
+ const u = e.value === C;
194
+ return /* @__PURE__ */ s("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(M, { "aria-label": u ? `${e.text}, selected` : e.text, className: I(o.option, u && o.selected), disabled: e.disabled, onClick: () => ue(e.value), variant: "tertiary", children: [
195
+ /* @__PURE__ */ s("span", { className: o.text, children: J(e) }),
196
+ e.groupLabel && /* @__PURE__ */ s("small", { className: o.group, children: e.groupLabel })
197
197
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
198
198
  }),
199
- E && l && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(z, { "aria-label": L(l.render(h)) || h, className: s.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ i("span", { className: s.text, children: l.render(h) }) }) }),
200
- H.length === 0 && !E && /* @__PURE__ */ i("li", { className: s.empty, children: n })
199
+ V && l && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(M, { "aria-label": $(l.render(g)) || g, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, children: l.render(g) }) }) }),
200
+ H.length === 0 && !V && /* @__PURE__ */ s("li", { className: o.empty, children: n })
201
201
  ] })
202
202
  ] })
203
203
  ] });
204
- return a ? /* @__PURE__ */ p("div", { className: V(s.label, y === "inline" && s["inline-field"]), "data-component": "dropdown", children: [
205
- /* @__PURE__ */ i("span", { id: w, children: ae }),
204
+ return a ? /* @__PURE__ */ p("div", { className: I(o.label, _ === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
205
+ /* @__PURE__ */ s("span", { id: w, children: ae }),
206
206
  Y
207
207
  ] }) : Y;
208
208
  };