@solibo/solibo-ui 2.1.2 → 2.2.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.
Files changed (293) hide show
  1. package/dist/assets/Degular.woff2 +0 -0
  2. package/dist/assets/Geist.woff2 +0 -0
  3. package/dist/assets/index.css +1 -1
  4. package/dist/assets/index10.css +1 -1
  5. package/dist/assets/index11.css +1 -1
  6. package/dist/assets/index12.css +1 -1
  7. package/dist/assets/index13.css +1 -1
  8. package/dist/assets/index14.css +1 -1
  9. package/dist/assets/index15.css +1 -1
  10. package/dist/assets/index16.css +1 -1
  11. package/dist/assets/index17.css +1 -1
  12. package/dist/assets/index18.css +1 -1
  13. package/dist/assets/index19.css +1 -1
  14. package/dist/assets/index2.css +1 -1
  15. package/dist/assets/index20.css +1 -0
  16. package/dist/assets/index21.css +1 -1
  17. package/dist/assets/index22.css +1 -1
  18. package/dist/assets/index23.css +1 -1
  19. package/dist/assets/index26.css +1 -1
  20. package/dist/assets/index27.css +1 -1
  21. package/dist/assets/index28.css +1 -1
  22. package/dist/assets/index3.css +1 -1
  23. package/dist/assets/index31.css +1 -1
  24. package/dist/assets/index32.css +1 -1
  25. package/dist/assets/index33.css +1 -1
  26. package/dist/assets/index34.css +1 -1
  27. package/dist/assets/index38.css +1 -1
  28. package/dist/assets/index39.css +1 -1
  29. package/dist/assets/index41.css +1 -1
  30. package/dist/assets/index43.css +1 -1
  31. package/dist/assets/index46.css +1 -1
  32. package/dist/assets/index48.css +1 -1
  33. package/dist/assets/index49.css +1 -1
  34. package/dist/assets/index50.css +1 -1
  35. package/dist/assets/index51.css +1 -1
  36. package/dist/assets/index52.css +1 -1
  37. package/dist/assets/index53.css +1 -1
  38. package/dist/assets/index54.css +1 -1
  39. package/dist/assets/index55.css +1 -1
  40. package/dist/assets/index56.css +1 -0
  41. package/dist/assets/index6.css +1 -1
  42. package/dist/assets/index8.css +1 -1
  43. package/dist/assets/index9.css +1 -1
  44. package/dist/assets/menu-popover.css +1 -1
  45. package/dist/components/app-link/index.cjs +1 -1
  46. package/dist/components/app-link/index.js +1 -1
  47. package/dist/components/app-shell/index.cjs +1 -1
  48. package/dist/components/app-shell/index.js +3 -3
  49. package/dist/components/aside/index.cjs +1 -1
  50. package/dist/components/aside/index.js +5 -5
  51. package/dist/components/avatar/index.cjs +1 -1
  52. package/dist/components/avatar/index.js +30 -30
  53. package/dist/components/badge/index.cjs +1 -1
  54. package/dist/components/badge/index.js +41 -39
  55. package/dist/components/banner/index.cjs +1 -1
  56. package/dist/components/banner/index.js +4 -4
  57. package/dist/components/branding/index.cjs +1 -1
  58. package/dist/components/branding/index.js +2 -2
  59. package/dist/components/button/index.cjs +1 -1
  60. package/dist/components/button/index.js +29 -29
  61. package/dist/components/card/index.cjs +1 -1
  62. package/dist/components/card/index.js +57 -49
  63. package/dist/components/checkbox/index.cjs +1 -1
  64. package/dist/components/checkbox/index.js +5 -5
  65. package/dist/components/chip/index.cjs +1 -1
  66. package/dist/components/chip/index.js +25 -25
  67. package/dist/components/collapsible/index.cjs +1 -1
  68. package/dist/components/collapsible/index.js +34 -18
  69. package/dist/components/controls/index.cjs +2 -2
  70. package/dist/components/controls/index.js +11 -11
  71. package/dist/components/croppable/index.cjs +1 -1
  72. package/dist/components/croppable/index.js +269 -233
  73. package/dist/components/dialog/index.cjs +1 -1
  74. package/dist/components/dialog/index.js +38 -38
  75. package/dist/components/divider/index.cjs +1 -1
  76. package/dist/components/divider/index.js +3 -3
  77. package/dist/components/dropdown/index.cjs +1 -1
  78. package/dist/components/dropdown/index.js +90 -90
  79. package/dist/components/dropzone/index.cjs +1 -1
  80. package/dist/components/dropzone/index.js +11 -11
  81. package/dist/components/editor/index.cjs +1 -55
  82. package/dist/components/editor/index.js +403 -16299
  83. package/dist/components/fieldset/index.cjs +1 -1
  84. package/dist/components/fieldset/index.js +3 -3
  85. package/dist/components/figure/index.cjs +1 -1
  86. package/dist/components/figure/index.js +14 -12
  87. package/dist/components/file/index.cjs +1 -1
  88. package/dist/components/file/index.js +1 -1
  89. package/dist/components/footer/index.cjs +1 -1
  90. package/dist/components/footer/index.js +12 -8
  91. package/dist/components/form/index.cjs +1 -1
  92. package/dist/components/form/index.js +9 -9
  93. package/dist/components/graph/index.cjs +1 -1
  94. package/dist/components/graph/index.js +12 -12
  95. package/dist/components/group/index.cjs +1 -1
  96. package/dist/components/group/index.js +38 -11
  97. package/dist/components/header/index.cjs +1 -1
  98. package/dist/components/header/index.js +49 -32
  99. package/dist/components/icon/index.cjs +1 -1
  100. package/dist/components/icon/index.js +7 -7
  101. package/dist/components/iframe/index.cjs +1 -1
  102. package/dist/components/iframe/index.js +71 -66
  103. package/dist/components/image/index.cjs +1 -1
  104. package/dist/components/image/index.js +1 -1
  105. package/dist/components/input/index.cjs +1 -1
  106. package/dist/components/input/index.js +3 -3
  107. package/dist/components/link/index.cjs +1 -1
  108. package/dist/components/link/index.js +27 -14
  109. package/dist/components/list/index.cjs +1 -1
  110. package/dist/components/list/index.js +62 -58
  111. package/dist/components/loading/index.cjs +1 -1
  112. package/dist/components/loading/index.js +5 -5
  113. package/dist/components/menu/index.cjs +1 -1
  114. package/dist/components/menu/index.js +1 -1
  115. package/dist/components/message/index.cjs +1 -1
  116. package/dist/components/message/index.js +2 -2
  117. package/dist/components/messages/index.cjs +1 -1
  118. package/dist/components/messages/index.js +6 -6
  119. package/dist/components/nav/index.cjs +1 -1
  120. package/dist/components/nav/index.js +31 -29
  121. package/dist/components/object/index.cjs +1 -1
  122. package/dist/components/object/index.js +1 -1
  123. package/dist/components/page-layout/index.cjs +1 -1
  124. package/dist/components/page-layout/index.js +33 -20
  125. package/dist/components/panel/index.cjs +2 -0
  126. package/dist/components/panel/index.js +25 -0
  127. package/dist/components/popover/index.cjs +1 -1
  128. package/dist/components/popover/index.js +35 -35
  129. package/dist/components/portal/index.cjs +1 -1
  130. package/dist/components/portal/index.js +22 -22
  131. package/dist/components/search/index.cjs +1 -1
  132. package/dist/components/search/index.js +50 -50
  133. package/dist/components/select/index.cjs +1 -1
  134. package/dist/components/select/index.js +3 -3
  135. package/dist/components/sortable/index.cjs +1 -1
  136. package/dist/components/sortable/index.js +49 -49
  137. package/dist/components/textarea/index.cjs +1 -1
  138. package/dist/components/textarea/index.js +29 -27
  139. package/dist/components/toast/index.cjs +1 -1
  140. package/dist/components/toast/index.js +1 -1
  141. package/dist/components/toggle/index.cjs +1 -1
  142. package/dist/components/toggle/index.js +10 -10
  143. package/dist/components/toolbar/index.cjs +1 -1
  144. package/dist/components/toolbar/index.js +3 -3
  145. package/dist/components/tooltip/index.cjs +1 -1
  146. package/dist/components/tooltip/index.js +2 -2
  147. package/dist/components/widget/index.cjs +1 -1
  148. package/dist/components/widget/index.js +22 -13
  149. package/dist/icons-BIdcCH-v.cjs +2 -0
  150. package/dist/{icons-CTtWkF6z.js → icons-DVeBguFb.js} +6 -3
  151. package/dist/index-7blZaPiA.cjs +2 -0
  152. package/dist/{index-CMPTHneU.js → index-Dd20d_9U.js} +9 -9
  153. package/dist/{index-BIpgkB-u.js → index-Dx-KtGBg.js} +12 -12
  154. package/dist/index-VLDsM9it.cjs +2 -0
  155. package/dist/index.cjs +1 -1
  156. package/dist/index.d.ts +391 -17
  157. package/dist/index.js +59 -56
  158. package/dist/menu-popover-Ceb_9V67.js +77 -0
  159. package/dist/menu-popover-bqblnK6P.cjs +2 -0
  160. package/dist/styles/fonts.css +11 -0
  161. package/dist/tokens.json +1 -1
  162. package/package.json +15 -8
  163. package/dist/classix-5H4IWnMA.cjs +0 -2
  164. package/dist/classix-5H4IWnMA.cjs.map +0 -1
  165. package/dist/classix-DG18itHa.js +0 -9
  166. package/dist/classix-DG18itHa.js.map +0 -1
  167. package/dist/components/app-link/index.cjs.map +0 -1
  168. package/dist/components/app-link/index.js.map +0 -1
  169. package/dist/components/app-shell/index.cjs.map +0 -1
  170. package/dist/components/app-shell/index.js.map +0 -1
  171. package/dist/components/aside/index.cjs.map +0 -1
  172. package/dist/components/aside/index.js.map +0 -1
  173. package/dist/components/avatar/index.cjs.map +0 -1
  174. package/dist/components/avatar/index.js.map +0 -1
  175. package/dist/components/badge/index.cjs.map +0 -1
  176. package/dist/components/badge/index.js.map +0 -1
  177. package/dist/components/banner/index.cjs.map +0 -1
  178. package/dist/components/banner/index.js.map +0 -1
  179. package/dist/components/branding/index.cjs.map +0 -1
  180. package/dist/components/branding/index.js.map +0 -1
  181. package/dist/components/button/index.cjs.map +0 -1
  182. package/dist/components/button/index.js.map +0 -1
  183. package/dist/components/card/index.cjs.map +0 -1
  184. package/dist/components/card/index.js.map +0 -1
  185. package/dist/components/checkbox/index.cjs.map +0 -1
  186. package/dist/components/checkbox/index.js.map +0 -1
  187. package/dist/components/chip/index.cjs.map +0 -1
  188. package/dist/components/chip/index.js.map +0 -1
  189. package/dist/components/clipboard/index.cjs.map +0 -1
  190. package/dist/components/clipboard/index.js.map +0 -1
  191. package/dist/components/collapsible/index.cjs.map +0 -1
  192. package/dist/components/collapsible/index.js.map +0 -1
  193. package/dist/components/controls/index.cjs.map +0 -1
  194. package/dist/components/controls/index.js.map +0 -1
  195. package/dist/components/croppable/index.cjs.map +0 -1
  196. package/dist/components/croppable/index.js.map +0 -1
  197. package/dist/components/dialog/index.cjs.map +0 -1
  198. package/dist/components/dialog/index.js.map +0 -1
  199. package/dist/components/divider/index.cjs.map +0 -1
  200. package/dist/components/divider/index.js.map +0 -1
  201. package/dist/components/dropdown/index.cjs.map +0 -1
  202. package/dist/components/dropdown/index.js.map +0 -1
  203. package/dist/components/dropzone/index.cjs.map +0 -1
  204. package/dist/components/dropzone/index.js.map +0 -1
  205. package/dist/components/editor/index.cjs.map +0 -1
  206. package/dist/components/editor/index.js.map +0 -1
  207. package/dist/components/empty-state/index.cjs.map +0 -1
  208. package/dist/components/empty-state/index.js.map +0 -1
  209. package/dist/components/fieldset/index.cjs.map +0 -1
  210. package/dist/components/fieldset/index.js.map +0 -1
  211. package/dist/components/figure/index.cjs.map +0 -1
  212. package/dist/components/figure/index.js.map +0 -1
  213. package/dist/components/file/index.cjs.map +0 -1
  214. package/dist/components/file/index.js.map +0 -1
  215. package/dist/components/footer/index.cjs.map +0 -1
  216. package/dist/components/footer/index.js.map +0 -1
  217. package/dist/components/form/index.cjs.map +0 -1
  218. package/dist/components/form/index.js.map +0 -1
  219. package/dist/components/graph/index.cjs.map +0 -1
  220. package/dist/components/graph/index.js.map +0 -1
  221. package/dist/components/group/index.cjs.map +0 -1
  222. package/dist/components/group/index.js.map +0 -1
  223. package/dist/components/header/index.cjs.map +0 -1
  224. package/dist/components/header/index.js.map +0 -1
  225. package/dist/components/icon/index.cjs.map +0 -1
  226. package/dist/components/icon/index.js.map +0 -1
  227. package/dist/components/iframe/index.cjs.map +0 -1
  228. package/dist/components/iframe/index.js.map +0 -1
  229. package/dist/components/image/index.cjs.map +0 -1
  230. package/dist/components/image/index.js.map +0 -1
  231. package/dist/components/input/index.cjs.map +0 -1
  232. package/dist/components/input/index.js.map +0 -1
  233. package/dist/components/link/index.cjs.map +0 -1
  234. package/dist/components/link/index.js.map +0 -1
  235. package/dist/components/list/index.cjs.map +0 -1
  236. package/dist/components/list/index.js.map +0 -1
  237. package/dist/components/loading/index.cjs.map +0 -1
  238. package/dist/components/loading/index.js.map +0 -1
  239. package/dist/components/menu/index.cjs.map +0 -1
  240. package/dist/components/menu/index.js.map +0 -1
  241. package/dist/components/message/index.cjs.map +0 -1
  242. package/dist/components/message/index.js.map +0 -1
  243. package/dist/components/messages/index.cjs.map +0 -1
  244. package/dist/components/messages/index.js.map +0 -1
  245. package/dist/components/nav/index.cjs.map +0 -1
  246. package/dist/components/nav/index.js.map +0 -1
  247. package/dist/components/object/index.cjs.map +0 -1
  248. package/dist/components/object/index.js.map +0 -1
  249. package/dist/components/page-layout/index.cjs.map +0 -1
  250. package/dist/components/page-layout/index.js.map +0 -1
  251. package/dist/components/popover/index.cjs.map +0 -1
  252. package/dist/components/popover/index.js.map +0 -1
  253. package/dist/components/portal/index.cjs.map +0 -1
  254. package/dist/components/portal/index.js.map +0 -1
  255. package/dist/components/search/index.cjs.map +0 -1
  256. package/dist/components/search/index.js.map +0 -1
  257. package/dist/components/select/index.cjs.map +0 -1
  258. package/dist/components/select/index.js.map +0 -1
  259. package/dist/components/sortable/index.cjs.map +0 -1
  260. package/dist/components/sortable/index.js.map +0 -1
  261. package/dist/components/table/index.cjs.map +0 -1
  262. package/dist/components/table/index.js.map +0 -1
  263. package/dist/components/textarea/index.cjs.map +0 -1
  264. package/dist/components/textarea/index.js.map +0 -1
  265. package/dist/components/toast/index.cjs.map +0 -1
  266. package/dist/components/toast/index.js.map +0 -1
  267. package/dist/components/toasts/index.cjs.map +0 -1
  268. package/dist/components/toasts/index.js.map +0 -1
  269. package/dist/components/toggle/index.cjs.map +0 -1
  270. package/dist/components/toggle/index.js.map +0 -1
  271. package/dist/components/toolbar/index.cjs.map +0 -1
  272. package/dist/components/toolbar/index.js.map +0 -1
  273. package/dist/components/tooltip/index.cjs.map +0 -1
  274. package/dist/components/tooltip/index.js.map +0 -1
  275. package/dist/components/widget/index.cjs.map +0 -1
  276. package/dist/components/widget/index.js.map +0 -1
  277. package/dist/icons-B3hIY9Bm.cjs +0 -2
  278. package/dist/icons-B3hIY9Bm.cjs.map +0 -1
  279. package/dist/icons-CTtWkF6z.js.map +0 -1
  280. package/dist/index-BIpgkB-u.js.map +0 -1
  281. package/dist/index-Bbauu1No.cjs +0 -2
  282. package/dist/index-Bbauu1No.cjs.map +0 -1
  283. package/dist/index-CMPTHneU.js.map +0 -1
  284. package/dist/index-DAjU2bTe.cjs +0 -2
  285. package/dist/index-DAjU2bTe.cjs.map +0 -1
  286. package/dist/index.cjs.map +0 -1
  287. package/dist/index.js.map +0 -1
  288. package/dist/menu-popover-BV7nUXlb.js +0 -77
  289. package/dist/menu-popover-BV7nUXlb.js.map +0 -1
  290. package/dist/menu-popover-fGpFDJTo.cjs +0 -2
  291. package/dist/menu-popover-fGpFDJTo.cjs.map +0 -1
  292. package/dist/use-touched-B999bBr8.js.map +0 -1
  293. package/dist/use-touched-Bq5Gjbpz.cjs.map +0 -1
@@ -1,58 +1,58 @@
1
- import { jsx as e, jsxs as u, Fragment as z } from "react/jsx-runtime";
2
- import { t as E } from "../../classix-DG18itHa.js";
3
- import p, { useRef as P, useEffect as T } from "react";
4
- import { Button as B } from "../button/index.js";
5
- import { Icon as Y } from "../icon/index.js";
6
- import '../../assets/index39.css';const A = "_dialog_9zw0o_3", F = "_close_9zw0o_34", I = "_fullscreen_9zw0o_45", M = "_structured_9zw0o_66", V = "_header_9zw0o_72", q = "_content_9zw0o_83", G = "_controls_9zw0o_94", o = {
1
+ import { jsx as e, jsxs as u, Fragment as p } from "react/jsx-runtime";
2
+ import P from "classix";
3
+ import B, { useRef as T, useEffect as Y } from "react";
4
+ import { Button as N } from "../button/index.js";
5
+ import { Icon as w } from "../icon/index.js";
6
+ import '../../assets/index39.css';const A = "_dialog_cz5d0_3", F = "_close_cz5d0_34", I = "_fullscreen_cz5d0_45", M = "_structured_cz5d0_87", V = "_content_cz5d0_87", q = "_header_cz5d0_96", G = "_controls_cz5d0_101", c = {
7
7
  dialog: A,
8
8
  close: F,
9
9
  fullscreen: I,
10
10
  structured: M,
11
- header: V,
12
- content: q,
11
+ content: V,
12
+ header: q,
13
13
  controls: G
14
- }, N = (c) => p.Children.toArray(c).some((l) => p.isValidElement(l) ? l.type === B && l.props.intent === "danger" ? !0 : N(l.props.children) : !1), U = ({
15
- children: c,
14
+ }, x = (o) => B.Children.toArray(o).some((l) => B.isValidElement(l) ? l.type === N && l.props.intent === "danger" ? !0 : x(l.props.children) : !1), U = ({
15
+ children: o,
16
16
  className: l,
17
17
  controls: s,
18
18
  fullscreen: f = !1,
19
19
  header: m,
20
20
  onCancel: n,
21
- onClick: i,
22
- onClose: d,
21
+ onClick: d,
22
+ onClose: i,
23
23
  open: a = !1,
24
- setOpen: r,
24
+ setOpen: t,
25
25
  ...R
26
26
  }) => {
27
- const _ = P(null), g = N(s), h = f || m != null || s != null;
28
- T(() => {
29
- const t = _.current;
30
- t && (a && !t.open ? t.showModal() : !a && t.open && t.close());
27
+ const _ = T(null), g = x(s), h = f || m != null || s != null;
28
+ Y(() => {
29
+ const r = _.current;
30
+ r && (a && !r.open ? r.showModal() : !a && r.open && r.close());
31
31
  }, [a]);
32
- const k = (t) => {
33
- n == null || n(t), !(t.defaultPrevented || !r) && (t.preventDefault(), r(!1));
34
- }, x = (t) => {
35
- if (i == null || i(t), g || t.defaultPrevented || t.target !== t.currentTarget || !r) return;
32
+ const k = (r) => {
33
+ n == null || n(r), !(r.defaultPrevented || !t) && (r.preventDefault(), t(!1));
34
+ }, y = (r) => {
35
+ if (d == null || d(r), g || r.defaultPrevented || r.target !== r.currentTarget || !t) return;
36
36
  const {
37
- bottom: D,
38
- left: X,
39
- right: b,
40
- top: j
41
- } = t.currentTarget.getBoundingClientRect();
42
- (t.clientX < X || t.clientX > b || t.clientY < j || t.clientY > D) && r(!1);
43
- }, y = (t) => {
44
- d == null || d(t), a && (r == null || r(!1));
45
- }, w = r && !g ? /* @__PURE__ */ e(B, { "aria-label": "Close dialog", className: o.close, onClick: () => r(!1), variant: "simple", children: /* @__PURE__ */ e(Y, { name: "X" }) }) : null;
46
- return /* @__PURE__ */ e("dialog", { className: E(o.dialog, h && o.structured, f && o.fullscreen, l), onCancel: k, onClick: x, onClose: y, ref: _, ...R, "data-component": "dialog", children: h ? /* @__PURE__ */ u(z, { children: [
47
- /* @__PURE__ */ u("div", { className: o.header, children: [
37
+ bottom: X,
38
+ left: b,
39
+ right: j,
40
+ top: E
41
+ } = r.currentTarget.getBoundingClientRect();
42
+ (r.clientX < b || r.clientX > j || r.clientY < E || r.clientY > X) && t(!1);
43
+ }, D = (r) => {
44
+ i == null || i(r), a && (t == null || t(!1));
45
+ }, z = t && !g ? /* @__PURE__ */ e(N, { "aria-label": "Close dialog", className: c.close, onClick: () => t(!1), variant: "simple", children: /* @__PURE__ */ e(w, { name: "X" }) }) : null;
46
+ return /* @__PURE__ */ e("dialog", { className: P(c.dialog, h && c.structured, f && c.fullscreen, l), onCancel: k, onClick: y, onClose: D, ref: _, ...R, "data-component": "dialog", children: h ? /* @__PURE__ */ u(p, { children: [
47
+ /* @__PURE__ */ u("div", { className: c.header, children: [
48
48
  m,
49
- w
49
+ z
50
50
  ] }),
51
- /* @__PURE__ */ e("div", { className: o.content, children: c }),
52
- s != null && /* @__PURE__ */ e("div", { className: o.controls, children: s })
53
- ] }) : /* @__PURE__ */ u(z, { children: [
54
- w,
55
- c
51
+ /* @__PURE__ */ e("div", { className: c.content, children: o }),
52
+ s != null && /* @__PURE__ */ e("div", { className: c.controls, children: s })
53
+ ] }) : /* @__PURE__ */ u(p, { children: [
54
+ z,
55
+ o
56
56
  ] }) });
57
57
  };
58
58
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const r=require("react/jsx-runtime"),t=require("../../classix-5H4IWnMA.cjs"),d="_divider_1oie5_1",s={divider:d},o=({className:e,...i})=>r.jsx("hr",{className:t.t(s.divider,e),...i,"data-component":"divider"});exports.Divider=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index40.css');const r=require("react/jsx-runtime"),d=require("classix"),t="_divider_1oie5_1",s={divider:t},o=({className:e,...i})=>r.jsx("hr",{className:d(s.divider,e),...i,"data-component":"divider"});exports.Divider=o;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,12 +1,12 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { t as e } from "../../classix-DG18itHa.js";
2
+ import e from "classix";
3
3
  import '../../assets/index40.css';const o = "_divider_1oie5_1", t = {
4
4
  divider: o
5
- }, v = ({
5
+ }, m = ({
6
6
  className: i,
7
7
  ...d
8
8
  }) => /* @__PURE__ */ r("hr", { className: e(t.divider, i), ...d, "data-component": "divider" });
9
9
  export {
10
- v as Divider
10
+ m as Divider
11
11
  };
12
12
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),v=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-B3hIY9Bm.cjs"),X=require("../../index-Bbauu1No.cjs"),pe=require("../list/index.cjs"),E=require("../../index-DAjU2bTe.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 fe(t){return a.isValidElement(t)&&t.type==="option"}function me(t){return a.isValidElement(t)&&t.type==="optgroup"}function _e(t){return a.isValidElement(t)&&t.type===a.Fragment}function he(t){return a.isValidElement(t)&&t.type===E.Select}function M(t,i,s=!1){const r=[];return a.Children.forEach(t,n=>{if(_e(n))r.push(...M(n.props.children,i,s));else if(fe(n)){const c=V(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;r.push({disabled:s||!!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 me(n)&&r.push(...M(n.props.children,n.props.label,s||!!n.props.disabled))}),r}function ge(t){const i=t.trim();if(!i)return null;const r=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${r}$`,"i")}function xe(t,i){const s=ge(i),r=t.filter(n=>!n.hidden&&!n.isPlaceholder);return s?r.filter(n=>s.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):r}function be(t,i){return t.find(s=>s.value===i)??t.find(s=>s.isPlaceholder)??t[0]}function ve(t,i,s){var r,n;return i!=null?String(i):s!=null?String(s):((r=t.find(c=>c.selected))==null?void 0:r.value)??((n=t[0])==null?void 0:n.value)??""}function ye(t){if(he(t)){const{children:i,placeholder:s,...r}=t.props;return{children:l.jsxs(l.Fragment,{children:[s&&l.jsx("option",{hidden:!0,value:"",children:s}),i]}),props:r}}return{children:t.props.children,props:t.props}}const je="_combobox_13pqc_3",qe="_dropdown_13pqc_27",we="_empty_13pqc_32",Se="_group_13pqc_33",Ne="_placeholder_13pqc_34",Ce="_filter_13pqc_42",Ee="_native_13pqc_52",Ve="_option_13pqc_62",Le="_options_13pqc_83",Re="_panel_13pqc_107",$e="_selected_13pqc_132",Be="_text_13pqc_136",Ie="_trigger_13pqc_144",De="_minimal_13pqc_181",Pe="_inline_13pqc_241",ke="_label_13pqc_273",o={combobox:je,"combobox-input":"_combobox-input_13pqc_12",dropdown:qe,empty:we,group:Se,placeholder:Ne,filter:Ce,native:Ee,option:Ve,options:Le,panel:Re,selected:$e,text:Be,trigger:Ie,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_13pqc_279"};function Y(t,i){return{"--icon-svg":de.iconSVG(t,i)}}const Fe=({children:t,className:i,combobox:s=!1,createOption:r,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:L="Filter",selectedItems:Z,variant:g="default",...ee})=>{const R=ye(t),{defaultValue:te,onChange:$,value:B,...ne}=R.props,y=E.sanitizeSelectProps(ne),{className:se,...re}=y,W=a.useRef(null),G=a.useRef(null),j=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M(R.children),b=B!=null,I=ve(x,B,te),[D,P]=a.useState(()=>I),[u,p]=a.useState(!1),[q,w]=a.useState(""),S=b?String(B):D,z={default:E.resolveColor("--colors-semantic-content-secondary"),white:E.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,N=be(x,S),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,q),_=q.trim(),C=!!(s&&r&&_&&r.isValid(_)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=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&&!x.some(e=>e.value===D)&&P(I)},[I,D,b,x]),a.useEffect(()=>{var e;if(!u){w("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=G.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),$==null||$(e)},k=()=>{var e;p(!1),s||(e=W.current)==null||e.focus()},K=()=>{var e;w(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!r||!C||(r.onCreate(_),K())},ce=e=>{var U;b||P(e);const d=Q.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})),s?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&C&&(e.preventDefault(),H())},J=l.jsxs("div",{className:v.t(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,children:[l.jsx("select",{...re,"aria-hidden":"true",className:v.t(o.native,se),onChange:ae,ref:Q,tabIndex:-1,value:S,children:R.children}),s?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":y["aria-label"]??c??L,className:o["combobox-input"],disabled:y.disabled,onChange:e=>{w(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:L||void 0,ref:m,role:"combobox",type:"text",value:q})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${j} ${j}-value`:void 0,className:v.t(o.trigger,(N==null?void 0:N.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:y.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${j}-value`,children:A(N)})}),u&&l.jsxs("div",{className:o.panel,children:[!s&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>w(e.target.value),placeholder:L,ref:m,style:oe,type:"search",value:q}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===S;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:v.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),C&&r&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":V(r.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:r.render(_)})})}),T.length===0&&!C&&l.jsx("li",{className:o.empty,children:n})]})]})]});return c?l.jsxs("div",{className:v.t(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:j,children:ie}),J]}):J};exports.Dropdown=Fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),v=require("classix"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-BIdcCH-v.cjs"),X=require("../../index-7blZaPiA.cjs"),pe=require("../list/index.cjs"),V=require("../../index-VLDsM9it.cjs");function L(n){return typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(L).join(" "):a.isValidElement(n)?L(n.props.children):""}function fe(n){return a.isValidElement(n)&&n.type==="option"}function me(n){return a.isValidElement(n)&&n.type==="optgroup"}function _e(n){return a.isValidElement(n)&&n.type===a.Fragment}function he(n){return a.isValidElement(n)&&n.type===V.Select}function M(n,i,r=!1){const s=[];return a.Children.forEach(n,t=>{if(_e(t))s.push(...M(t.props.children,i,r));else if(fe(t)){const c=L(t.props.children).trim(),f=t.props.value!=null?String(t.props.value):c;s.push({disabled:r||!!t.props.disabled,groupLabel:i,hidden:!!t.props.hidden,isPlaceholder:!!(t.props.hidden&&f===""),label:t.props.children,selected:!!t.props.selected,text:c,value:f})}else me(t)&&s.push(...M(t.props.children,t.props.label,r||!!t.props.disabled))}),s}function ge(n){const i=n.trim();if(!i)return null;const s=[.../[*?]/.test(i)?i:`*${i}*`].map(t=>t==="*"?".*":t==="?"?".":t.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${s}$`,"i")}function xe(n,i){const r=ge(i),s=n.filter(t=>!t.hidden&&!t.isPlaceholder);return r?s.filter(t=>r.test([t.groupLabel,t.text,t.value].filter(Boolean).join(" "))):s}function be(n,i){return n.find(r=>r.value===i)??n.find(r=>r.isPlaceholder)??n[0]}function ve(n,i,r){var s,t;return i!=null?String(i):r!=null?String(r):((s=n.find(c=>c.selected))==null?void 0:s.value)??((t=n[0])==null?void 0:t.value)??""}function ye(n){if(he(n)){const{children:i,placeholder:r,...s}=n.props;return{children:l.jsxs(l.Fragment,{children:[r&&l.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:s}}return{children:n.props.children,props:n.props}}const we="_combobox_5r227_3",je="_dropdown_5r227_20",Se="_empty_5r227_25",Ne="_group_5r227_26",Ce="_placeholder_5r227_27",Ee="_filter_5r227_35",Ve="_native_5r227_45",Le="_option_5r227_55",Re="_options_5r227_76",$e="_panel_5r227_83",Be="_selected_5r227_108",Ie="_text_5r227_112",qe="_trigger_5r227_120",De="_minimal_5r227_157",Pe="_inline_5r227_217",ke="_label_5r227_249",o={combobox:we,"combobox-input":"_combobox-input_5r227_12",dropdown:je,empty:Se,group:Ne,placeholder:Ce,filter:Ee,native:Ve,option:Le,options:Re,panel:$e,selected:Be,text:Ie,trigger:qe,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_5r227_255"};function Y(n,i){return{"--icon-svg":de.iconSVG(n,i)}}const Fe=({children:n,className:i,combobox:r=!1,createOption:s,emptyLabel:t="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:g="default",...ee})=>{const $=ye(n),{defaultValue:ne,onChange:B,value:I,...te}=$.props,y=V.sanitizeSelectProps(te),{className:re,...se}=y,W=a.useRef(null),G=a.useRef(null),w=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M($.children),b=I!=null,q=ve(x,I,ne),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[j,S]=a.useState(""),N=b?String(I):D,z={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,C=be(x,N),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,j),_=j.trim(),E=!!(r&&s&&_&&s.isValid(_)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===N,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){S("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=G.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),r||(e=W.current)==null||e.focus()},K=()=>{var e;S(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!s||!E||(s.onCreate(_),K())},ce=e=>{var U;b||P(e);const d=Q.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})),r?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=l.jsxs("div",{className:v(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,"data-component":"dropdown",children:[l.jsx("select",{...se,"aria-hidden":"true",className:v(o.native,re),onChange:ae,ref:Q,tabIndex:-1,value:N,children:$.children}),r?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":y["aria-label"]??c??R,className:o["combobox-input"],disabled:y.disabled,onChange:e=>{S(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:j})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${w} ${w}-value`:void 0,className:v(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:y.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${w}-value`,children:A(C)})}),u&&l.jsxs("div",{className:o.panel,children:[!r&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>S(e.target.value),placeholder:R,ref:m,style:oe,type:"search",value:j}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===N;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:v(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&s&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":L(s.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:s.render(_)})})}),T.length===0&&!E&&l.jsx("li",{className:o.empty,children:t})]})]})]});return c?l.jsxs("div",{className:v(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:w,children:ie}),J]}):J};exports.Dropdown=Fe;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,72 +1,72 @@
1
- import { jsxs as d, Fragment as me, jsx as i } from "react/jsx-runtime";
2
- import { t as y } from "../../classix-DG18itHa.js";
3
- import he, { Children as _e, isValidElement as x, useRef as I, useId as ge, useState as M, useEffect as W } from "react";
4
- import { Button as G } from "../button/index.js";
5
- import { i as be } from "../../icons-CTtWkF6z.js";
6
- import { f as ve, I as ye } from "../../index-CMPTHneU.js";
1
+ import { jsxs as p, Fragment as fe, jsx as i } from "react/jsx-runtime";
2
+ import y from "classix";
3
+ import he, { Children as _e, isValidElement as x, useRef as L, useId as ge, useState as W, useEffect as G } from "react";
4
+ import { Button as Q } from "../button/index.js";
5
+ import { i as be } from "../../icons-DVeBguFb.js";
6
+ import { f as ve, I as ye } from "../../index-Dd20d_9U.js";
7
7
  import { List as xe } from "../list/index.js";
8
- import { S as we, s as Ne, r as ee } from "../../index-BIpgkB-u.js";
9
- import '../../assets/index41.css';function L(t) {
10
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(L).join(" ") : x(t) ? L(t.props.children) : "";
8
+ import { S as we, s as Ne, r as ee } from "../../index-Dx-KtGBg.js";
9
+ import '../../assets/index41.css';function $(t) {
10
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map($).join(" ") : x(t) ? $(t.props.children) : "";
11
11
  }
12
12
  function Se(t) {
13
13
  return x(t) && t.type === "option";
14
14
  }
15
- function qe(t) {
15
+ function Ce(t) {
16
16
  return x(t) && t.type === "optgroup";
17
17
  }
18
- function Ce(t) {
18
+ function Ee(t) {
19
19
  return x(t) && t.type === he.Fragment;
20
20
  }
21
- function Ee(t) {
21
+ function Ve(t) {
22
22
  return x(t) && t.type === we;
23
23
  }
24
- function Q(t, s, r = !1) {
24
+ function z(t, s, r = !1) {
25
25
  const l = [];
26
26
  return _e.forEach(t, (n) => {
27
- if (Ce(n))
28
- l.push(...Q(n.props.children, s, r));
27
+ if (Ee(n))
28
+ l.push(...z(n.props.children, s, r));
29
29
  else if (Se(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(), m = n.props.value != null ? String(n.props.value) : a;
31
31
  l.push({
32
32
  disabled: r || !!n.props.disabled,
33
33
  groupLabel: s,
34
34
  hidden: !!n.props.hidden,
35
- isPlaceholder: !!(n.props.hidden && f === ""),
35
+ isPlaceholder: !!(n.props.hidden && m === ""),
36
36
  label: n.props.children,
37
37
  selected: !!n.props.selected,
38
38
  text: a,
39
- value: f
39
+ value: m
40
40
  });
41
- } else qe(n) && l.push(...Q(n.props.children, n.props.label, r || !!n.props.disabled));
41
+ } else Ce(n) && l.push(...z(n.props.children, n.props.label, r || !!n.props.disabled));
42
42
  }), l;
43
43
  }
44
- function Ve(t) {
44
+ function Ie(t) {
45
45
  const s = t.trim();
46
46
  if (!s) return null;
47
47
  const l = [.../[*?]/.test(s) ? s : `*${s}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
48
48
  return new RegExp(`^${l}$`, "i");
49
49
  }
50
- function Ie(t, s) {
51
- const r = Ve(s), l = t.filter((n) => !n.hidden && !n.isPlaceholder);
50
+ function Le(t, s) {
51
+ const r = Ie(s), 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 Le(t, s) {
54
+ function $e(t, s) {
55
55
  return t.find((r) => r.value === s) ?? t.find((r) => r.isPlaceholder) ?? t[0];
56
56
  }
57
- function $e(t, s, r) {
57
+ function Be(t, s, r) {
58
58
  var l, n;
59
59
  return s != null ? String(s) : 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 Be(t) {
62
- if (Ee(t)) {
61
+ function De(t) {
62
+ if (Ve(t)) {
63
63
  const {
64
64
  children: s,
65
65
  placeholder: r,
66
66
  ...l
67
67
  } = t.props;
68
68
  return {
69
- children: /* @__PURE__ */ d(me, { children: [
69
+ children: /* @__PURE__ */ p(fe, { children: [
70
70
  r && /* @__PURE__ */ i("option", { hidden: !0, value: "", children: r }),
71
71
  s
72
72
  ] }),
@@ -78,25 +78,25 @@ function Be(t) {
78
78
  props: t.props
79
79
  };
80
80
  }
81
- const De = "_combobox_13pqc_3", Pe = "_dropdown_13pqc_27", ke = "_empty_13pqc_32", Re = "_group_13pqc_33", je = "_placeholder_13pqc_34", Fe = "_filter_13pqc_42", Me = "_native_13pqc_52", We = "_option_13pqc_62", Ge = "_options_13pqc_83", Qe = "_panel_13pqc_107", ze = "_selected_13pqc_132", Ae = "_text_13pqc_136", Ke = "_trigger_13pqc_144", Oe = "_minimal_13pqc_181", Te = "_inline_13pqc_241", He = "_label_13pqc_273", o = {
82
- combobox: De,
83
- "combobox-input": "_combobox-input_13pqc_12",
84
- dropdown: Pe,
85
- empty: ke,
86
- group: Re,
87
- placeholder: je,
88
- filter: Fe,
89
- native: Me,
90
- option: We,
91
- options: Ge,
92
- panel: Qe,
93
- selected: ze,
94
- text: Ae,
95
- trigger: Ke,
96
- minimal: Oe,
97
- inline: Te,
81
+ const Pe = "_combobox_5r227_3", ke = "_dropdown_5r227_20", Re = "_empty_5r227_25", je = "_group_5r227_26", Fe = "_placeholder_5r227_27", Me = "_filter_5r227_35", We = "_native_5r227_45", Ge = "_option_5r227_55", Qe = "_options_5r227_76", ze = "_panel_5r227_83", Ae = "_selected_5r227_108", Ke = "_text_5r227_112", Oe = "_trigger_5r227_120", Te = "_minimal_5r227_157", qe = "_inline_5r227_217", He = "_label_5r227_249", o = {
82
+ combobox: Pe,
83
+ "combobox-input": "_combobox-input_5r227_12",
84
+ dropdown: ke,
85
+ empty: Re,
86
+ group: je,
87
+ placeholder: Fe,
88
+ filter: Me,
89
+ native: We,
90
+ option: Ge,
91
+ options: Qe,
92
+ panel: ze,
93
+ selected: Ae,
94
+ text: Ke,
95
+ trigger: Oe,
96
+ minimal: Te,
97
+ inline: qe,
98
98
  label: He,
99
- "inline-field": "_inline-field_13pqc_279"
99
+ "inline-field": "_inline-field_5r227_255"
100
100
  };
101
101
  function te(t, s) {
102
102
  return {
@@ -110,101 +110,101 @@ const rt = ({
110
110
  createOption: l,
111
111
  emptyLabel: n = "No matches found",
112
112
  label: a,
113
- renderOption: f,
114
- searchPlaceholder: $ = "Filter",
113
+ renderOption: m,
114
+ searchPlaceholder: B = "Filter",
115
115
  selectedItems: ne,
116
116
  variant: g = "default",
117
117
  ...re
118
118
  }) => {
119
- const B = Be(t), {
119
+ const D = De(t), {
120
120
  defaultValue: le,
121
- onChange: D,
122
- value: P,
121
+ onChange: P,
122
+ value: k,
123
123
  ...oe
124
- } = B.props, w = Ne(oe), {
124
+ } = D.props, w = Ne(oe), {
125
125
  className: se,
126
126
  ...ie
127
- } = w, z = I(null), A = I(null), N = ge(), K = I(null), m = I(null), b = Q(B.children), v = P != null, k = $e(b, P, le), [R, j] = M(() => k), [c, p] = M(!1), [S, q] = M(""), C = v ? String(P) : R, O = {
127
+ } = w, A = L(null), K = L(null), N = ge(), O = L(null), f = L(null), b = z(D.children), v = k != null, R = Be(b, k, le), [j, F] = W(() => R), [c, d] = W(!1), [S, C] = W(""), E = v ? String(k) : j, T = {
128
128
  default: ee("--colors-semantic-content-secondary"),
129
129
  white: ee("--color-white", "white")
130
- }, T = g === "minimal" ? O.white : O.default, E = Le(b, C), ae = te("CaretDown", T), ce = te("MagnifyingGlass", T), H = Ie(b, S), h = S.trim(), V = !!(r && l && h && l.isValid(h)), ue = a && g === "inline" ? ve(a) : a, J = (e) => e ? (f == null ? void 0 : f({
130
+ }, q = g === "minimal" ? T.white : T.default, V = $e(b, E), ae = te("CaretDown", q), ce = te("MagnifyingGlass", q), H = Le(b, S), h = S.trim(), I = !!(r && l && h && l.isValid(h)), ue = a && g === "inline" ? ve(a) : a, J = (e) => e ? (m == null ? void 0 : m({
131
131
  groupLabel: e.groupLabel,
132
- isSelected: e.value === C,
132
+ isSelected: e.value === E,
133
133
  label: e.label,
134
134
  text: e.text,
135
135
  value: e.value
136
136
  })) ?? e.label : "Select an option";
137
- W(() => {
138
- !v && !b.some((e) => e.value === R) && j(k);
139
- }, [k, R, v, b]), W(() => {
137
+ G(() => {
138
+ !v && !b.some((e) => e.value === j) && F(R);
139
+ }, [R, j, v, b]), G(() => {
140
140
  var e;
141
141
  if (!c) {
142
- q("");
142
+ C("");
143
143
  return;
144
144
  }
145
- (e = m.current) == null || e.focus();
146
- }, [c]), W(() => {
145
+ (e = f.current) == null || e.focus();
146
+ }, [c]), G(() => {
147
147
  if (!c)
148
148
  return;
149
149
  const e = (u) => {
150
150
  var _;
151
- (_ = A.current) != null && _.contains(u.target) || p(!1);
151
+ (_ = K.current) != null && _.contains(u.target) || d(!1);
152
152
  };
153
153
  return document.addEventListener("mousedown", e), () => {
154
154
  document.removeEventListener("mousedown", e);
155
155
  };
156
156
  }, [c]);
157
- const pe = (e) => {
158
- v || j(e.target.value), D == null || D(e);
159
- }, F = () => {
157
+ const de = (e) => {
158
+ v || F(e.target.value), P == null || P(e);
159
+ }, M = () => {
160
160
  var e;
161
- p(!1), r || (e = z.current) == null || e.focus();
161
+ d(!1), r || (e = A.current) == null || e.focus();
162
162
  }, U = () => {
163
163
  var e;
164
- q(""), p(!0), (e = m.current) == null || e.focus();
164
+ C(""), d(!0), (e = f.current) == null || e.focus();
165
165
  }, X = () => {
166
- !l || !V || (l.onCreate(h), U());
167
- }, de = (e) => {
166
+ !l || !I || (l.onCreate(h), U());
167
+ }, pe = (e) => {
168
168
  var Z;
169
- v || j(e);
170
- const u = K.current;
169
+ v || F(e);
170
+ const u = O.current;
171
171
  if (!u) {
172
- F();
172
+ M();
173
173
  return;
174
174
  }
175
175
  const _ = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
176
176
  _ == null || _.call(u, e), u.dispatchEvent(new Event("change", {
177
177
  bubbles: !0
178
- })), r ? U() : F();
179
- }, fe = (e) => {
180
- e.key === "Escape" && F(), e.key === "Enter" && e.target === m.current && V && (e.preventDefault(), X());
181
- }, Y = /* @__PURE__ */ d("div", { className: y(o.dropdown, g === "inline" && o.inline, g === "minimal" && o.minimal, s), onKeyDown: fe, ref: A, ...re, children: [
182
- /* @__PURE__ */ i("select", { ...ie, "aria-hidden": "true", className: y(o.native, se), onChange: pe, ref: K, tabIndex: -1, value: C, children: B.children }),
183
- r ? /* @__PURE__ */ d("div", { className: o.combobox, onClick: () => {
178
+ })), r ? U() : M();
179
+ }, me = (e) => {
180
+ e.key === "Escape" && M(), e.key === "Enter" && e.target === f.current && I && (e.preventDefault(), X());
181
+ }, Y = /* @__PURE__ */ p("div", { className: y(o.dropdown, g === "inline" && o.inline, g === "minimal" && o.minimal, s), onKeyDown: me, ref: K, ...re, "data-component": "dropdown", children: [
182
+ /* @__PURE__ */ i("select", { ...ie, "aria-hidden": "true", className: y(o.native, se), onChange: de, ref: O, tabIndex: -1, value: E, children: D.children }),
183
+ r ? /* @__PURE__ */ p("div", { className: o.combobox, onClick: () => {
184
184
  var e;
185
- return (e = m.current) == null ? void 0 : e.focus();
185
+ return (e = f.current) == null ? void 0 : e.focus();
186
186
  }, children: [
187
187
  ne,
188
- /* @__PURE__ */ i("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": w["aria-label"] ?? a ?? $, className: o["combobox-input"], disabled: w.disabled, onChange: (e) => {
189
- q(e.target.value), p(!0);
190
- }, onClick: () => p(!0), onFocus: () => p(!0), placeholder: $ || void 0, ref: m, role: "combobox", type: "text", value: S })
191
- ] }) : /* @__PURE__ */ i(G, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${N} ${N}-value` : void 0, className: y(o.trigger, (E == null ? void 0 : E.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: w.disabled, onClick: () => p((e) => !e), ref: z, style: ae, variant: "simple", children: /* @__PURE__ */ i("span", { className: o.text, id: `${N}-value`, children: J(E) }) }),
192
- c && /* @__PURE__ */ d("div", { className: o.panel, children: [
193
- !r && /* @__PURE__ */ i(ye, { "aria-label": "Filter", className: o.filter, icon: "MagnifyingGlass", onChange: (e) => q(e.target.value), placeholder: $, ref: m, style: ce, type: "search", value: S }),
194
- /* @__PURE__ */ d(xe, { "aria-label": "Dropdown", className: o.options, children: [
188
+ /* @__PURE__ */ i("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": w["aria-label"] ?? a ?? B, className: o["combobox-input"], disabled: w.disabled, onChange: (e) => {
189
+ C(e.target.value), d(!0);
190
+ }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: B || void 0, ref: f, role: "combobox", type: "text", value: S })
191
+ ] }) : /* @__PURE__ */ i(Q, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${N} ${N}-value` : void 0, className: y(o.trigger, (V == null ? void 0 : V.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: w.disabled, onClick: () => d((e) => !e), ref: A, style: ae, variant: "simple", children: /* @__PURE__ */ i("span", { className: o.text, id: `${N}-value`, children: J(V) }) }),
192
+ c && /* @__PURE__ */ p("div", { className: o.panel, children: [
193
+ !r && /* @__PURE__ */ i(ye, { "aria-label": "Filter", className: o.filter, icon: "MagnifyingGlass", onChange: (e) => C(e.target.value), placeholder: B, ref: f, style: ce, type: "search", value: S }),
194
+ /* @__PURE__ */ p(xe, { "aria-label": "Dropdown", className: o.options, children: [
195
195
  H.map((e) => {
196
- const u = e.value === C;
197
- return /* @__PURE__ */ i("li", { "data-component": "dropdown", children: /* @__PURE__ */ d(G, { "aria-label": u ? `${e.text}, selected` : e.text, className: y(o.option, u && o.selected), disabled: e.disabled, onClick: () => de(e.value), variant: "tertiary", children: [
196
+ const u = e.value === E;
197
+ return /* @__PURE__ */ i("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(Q, { "aria-label": u ? `${e.text}, selected` : e.text, className: y(o.option, u && o.selected), disabled: e.disabled, onClick: () => pe(e.value), variant: "tertiary", children: [
198
198
  /* @__PURE__ */ i("span", { className: o.text, children: J(e) }),
199
199
  e.groupLabel && /* @__PURE__ */ i("small", { className: o.group, children: e.groupLabel })
200
200
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
201
201
  }),
202
- V && l && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(G, { "aria-label": L(l.render(h)) || h, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ i("span", { className: o.text, children: l.render(h) }) }) }),
203
- H.length === 0 && !V && /* @__PURE__ */ i("li", { className: o.empty, children: n })
202
+ I && l && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(Q, { "aria-label": $(l.render(h)) || h, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ i("span", { className: o.text, children: l.render(h) }) }) }),
203
+ H.length === 0 && !I && /* @__PURE__ */ i("li", { className: o.empty, children: n })
204
204
  ] })
205
205
  ] })
206
206
  ] });
207
- return a ? /* @__PURE__ */ d("div", { className: y(o.label, g === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
207
+ return a ? /* @__PURE__ */ p("div", { className: y(o.label, g === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
208
208
  /* @__PURE__ */ i("span", { id: N, children: ue }),
209
209
  Y
210
210
  ] }) : Y;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const i=require("react/jsx-runtime"),b=require("../../classix-5H4IWnMA.cjs"),F=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1rpsf_1",S="_dragging_1rpsf_19",T="_minimal_1rpsf_23",g={dropzone:R,dragging:S,minimal:T},k=({accepts:D,label:m="Select files",maxFileSize:_,multiple:u=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=F.useRef(null),[x,o]=F.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},v=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},z=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((d,l)=>(l.size===0?d.emptyFiles.push(l):_&&l.size>_?d.oversizedFiles.push(l):d.validFiles.push(l),d),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),o(!1);const t=Array.from(e.dataTransfer.files??[]),s=z(t);if(s.length===0)return;const r=u?s:s.slice(0,1);v(r)},h=e=>{const t=Array.from(e.target.files??[]),s=z(t);if(s.length===t.length){n==null||n(e);return}const r=u?s:s.slice(0,1);v(r)};return i.jsx("div",{className:b.t(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),o(!0)},onDragOver:e=>{c(e),o(!0)},onDragLeave:e=>{c(e),o(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:D,"aria-label":m,hidden:!0,multiple:u,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"UploadSimple",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:m})]})})};exports.Dropzone=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index42.css');const i=require("react/jsx-runtime"),b=require("classix"),F=require("react"),q=require("../button/index.cjs"),I=require("../icon/index.cjs"),R="_dropzone_1rpsf_1",S="_dragging_1rpsf_19",T="_minimal_1rpsf_23",g={dropzone:R,dragging:S,minimal:T},k=({accepts:D,label:m="Select files",maxFileSize:_,multiple:u=!1,onChange:n,onValidation:a,variant:p="default",...y})=>{const f=F.useRef(null),[x,l]=F.useState(!1),c=e=>{e.preventDefault(),e.stopPropagation()},v=e=>{const t=f.current;if(!t)return;const s=new DataTransfer;for(const r of e)s.items.add(r);t.files=s.files,n==null||n({target:t,currentTarget:t})},z=e=>{const{validFiles:t,emptyFiles:s,oversizedFiles:r}=e.reduce((d,o)=>(o.size===0?d.emptyFiles.push(o):_&&o.size>_?d.oversizedFiles.push(o):d.validFiles.push(o),d),{validFiles:[],emptyFiles:[],oversizedFiles:[]});return(s.length>0||r.length>0)&&(a==null||a(s,r)),t},j=e=>{c(e),l(!1);const t=Array.from(e.dataTransfer.files??[]),s=z(t);if(s.length===0)return;const r=u?s:s.slice(0,1);v(r)},h=e=>{const t=Array.from(e.target.files??[]),s=z(t);if(s.length===t.length){n==null||n(e);return}const r=u?s:s.slice(0,1);v(r)};return i.jsx("div",{className:b(g.dropzone,g[p],x&&g.dragging),onDragEnter:e=>{c(e),l(!0)},onDragOver:e=>{c(e),l(!0)},onDragLeave:e=>{c(e),l(!1)},onDrop:j,...y,"data-component":"dropzone",children:i.jsxs("label",{children:[i.jsx("input",{accept:D,"aria-label":m,hidden:!0,multiple:u,onChange:h,ref:f,type:"file"}),i.jsx(I.Icon,{name:"UploadSimple",size:p==="minimal"?"medium":"large"}),i.jsx("br",{}),p!=="minimal"&&i.jsx(q.Button,{onClick:()=>{var e;return(e=f.current)==null?void 0:e.click()},type:"button",children:m})]})})};exports.Dropzone=k;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { jsx as l, jsxs as b } from "react/jsx-runtime";
2
- import { t as T } from "../../classix-DG18itHa.js";
3
- import { useRef as j, useState as k } from "react";
4
- import { Button as x } from "../button/index.js";
2
+ import x from "classix";
3
+ import { useRef as T, useState as j } from "react";
4
+ import { Button as k } from "../button/index.js";
5
5
  import { Icon as A } from "../icon/index.js";
6
6
  import '../../assets/index42.css';const R = "_dropzone_1rpsf_1", S = "_dragging_1rpsf_19", w = "_minimal_1rpsf_23", u = {
7
7
  dropzone: R,
@@ -17,7 +17,7 @@ import '../../assets/index42.css';const R = "_dropzone_1rpsf_1", S = "_dragging_
17
17
  variant: a = "default",
18
18
  ..._
19
19
  }) => {
20
- const m = j(null), [y, o] = k(!1), p = (e) => {
20
+ const m = T(null), [y, o] = j(!1), c = (e) => {
21
21
  e.preventDefault(), e.stopPropagation();
22
22
  }, v = (e) => {
23
23
  const s = m.current;
@@ -33,14 +33,14 @@ import '../../assets/index42.css';const R = "_dropzone_1rpsf_1", S = "_dragging_
33
33
  validFiles: s,
34
34
  emptyFiles: r,
35
35
  oversizedFiles: t
36
- } = e.reduce((c, n) => (n.size === 0 ? c.emptyFiles.push(n) : F && n.size > F ? c.oversizedFiles.push(n) : c.validFiles.push(n), c), {
36
+ } = e.reduce((p, n) => (n.size === 0 ? p.emptyFiles.push(n) : F && n.size > F ? p.oversizedFiles.push(n) : p.validFiles.push(n), p), {
37
37
  validFiles: [],
38
38
  emptyFiles: [],
39
39
  oversizedFiles: []
40
40
  });
41
41
  return (r.length > 0 || t.length > 0) && (f == null || f(r, t)), s;
42
42
  }, h = (e) => {
43
- p(e), o(!1);
43
+ c(e), o(!1);
44
44
  const s = Array.from(e.dataTransfer.files ?? []), r = z(s);
45
45
  if (r.length === 0) return;
46
46
  const t = d ? r : r.slice(0, 1);
@@ -54,17 +54,17 @@ import '../../assets/index42.css';const R = "_dropzone_1rpsf_1", S = "_dragging_
54
54
  const t = d ? r : r.slice(0, 1);
55
55
  v(t);
56
56
  };
57
- return /* @__PURE__ */ l("div", { className: T(u.dropzone, u[a], y && u.dragging), onDragEnter: (e) => {
58
- p(e), o(!0);
57
+ return /* @__PURE__ */ l("div", { className: x(u.dropzone, u[a], y && u.dragging), onDragEnter: (e) => {
58
+ c(e), o(!0);
59
59
  }, onDragOver: (e) => {
60
- p(e), o(!0);
60
+ c(e), o(!0);
61
61
  }, onDragLeave: (e) => {
62
- p(e), o(!1);
62
+ c(e), o(!1);
63
63
  }, onDrop: h, ..._, "data-component": "dropzone", children: /* @__PURE__ */ b("label", { children: [
64
64
  /* @__PURE__ */ l("input", { accept: D, "aria-label": g, hidden: !0, multiple: d, onChange: I, ref: m, type: "file" }),
65
65
  /* @__PURE__ */ l(A, { name: "UploadSimple", size: a === "minimal" ? "medium" : "large" }),
66
66
  /* @__PURE__ */ l("br", {}),
67
- a !== "minimal" && /* @__PURE__ */ l(x, { onClick: () => {
67
+ a !== "minimal" && /* @__PURE__ */ l(k, { onClick: () => {
68
68
  var e;
69
69
  return (e = m.current) == null ? void 0 : e.click();
70
70
  }, type: "button", children: g })