@solibo/solibo-ui 2.1.2 → 2.2.0

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 (288) 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/index3.css +1 -1
  22. package/dist/assets/index31.css +1 -1
  23. package/dist/assets/index32.css +1 -1
  24. package/dist/assets/index33.css +1 -1
  25. package/dist/assets/index34.css +1 -1
  26. package/dist/assets/index39.css +1 -1
  27. package/dist/assets/index41.css +1 -1
  28. package/dist/assets/index43.css +1 -1
  29. package/dist/assets/index46.css +1 -1
  30. package/dist/assets/index48.css +1 -1
  31. package/dist/assets/index49.css +1 -1
  32. package/dist/assets/index50.css +1 -1
  33. package/dist/assets/index51.css +1 -1
  34. package/dist/assets/index52.css +1 -1
  35. package/dist/assets/index53.css +1 -1
  36. package/dist/assets/index54.css +1 -1
  37. package/dist/assets/index55.css +1 -1
  38. package/dist/assets/index56.css +1 -0
  39. package/dist/assets/index6.css +1 -1
  40. package/dist/assets/index8.css +1 -1
  41. package/dist/assets/index9.css +1 -1
  42. package/dist/assets/menu-popover.css +1 -1
  43. package/dist/components/app-link/index.cjs +1 -1
  44. package/dist/components/app-link/index.js +1 -1
  45. package/dist/components/app-shell/index.cjs +1 -1
  46. package/dist/components/app-shell/index.js +3 -3
  47. package/dist/components/aside/index.cjs +1 -1
  48. package/dist/components/aside/index.js +5 -5
  49. package/dist/components/avatar/index.cjs +1 -1
  50. package/dist/components/avatar/index.js +30 -30
  51. package/dist/components/badge/index.cjs +1 -1
  52. package/dist/components/badge/index.js +1 -1
  53. package/dist/components/banner/index.cjs +1 -1
  54. package/dist/components/banner/index.js +4 -4
  55. package/dist/components/branding/index.cjs +1 -1
  56. package/dist/components/branding/index.js +2 -2
  57. package/dist/components/button/index.cjs +1 -1
  58. package/dist/components/button/index.js +29 -29
  59. package/dist/components/card/index.cjs +1 -1
  60. package/dist/components/card/index.js +54 -46
  61. package/dist/components/checkbox/index.cjs +1 -1
  62. package/dist/components/checkbox/index.js +4 -4
  63. package/dist/components/chip/index.cjs +1 -1
  64. package/dist/components/chip/index.js +25 -25
  65. package/dist/components/collapsible/index.cjs +1 -1
  66. package/dist/components/collapsible/index.js +34 -18
  67. package/dist/components/controls/index.cjs +2 -2
  68. package/dist/components/controls/index.js +11 -11
  69. package/dist/components/croppable/index.cjs +1 -1
  70. package/dist/components/croppable/index.js +1 -1
  71. package/dist/components/dialog/index.cjs +1 -1
  72. package/dist/components/dialog/index.js +38 -38
  73. package/dist/components/divider/index.cjs +1 -1
  74. package/dist/components/divider/index.js +3 -3
  75. package/dist/components/dropdown/index.cjs +1 -1
  76. package/dist/components/dropdown/index.js +89 -89
  77. package/dist/components/dropzone/index.cjs +1 -1
  78. package/dist/components/dropzone/index.js +11 -11
  79. package/dist/components/editor/index.cjs +1 -55
  80. package/dist/components/editor/index.js +403 -16299
  81. package/dist/components/fieldset/index.cjs +1 -1
  82. package/dist/components/fieldset/index.js +3 -3
  83. package/dist/components/figure/index.cjs +1 -1
  84. package/dist/components/figure/index.js +14 -12
  85. package/dist/components/file/index.cjs +1 -1
  86. package/dist/components/file/index.js +1 -1
  87. package/dist/components/footer/index.cjs +1 -1
  88. package/dist/components/footer/index.js +12 -8
  89. package/dist/components/form/index.cjs +1 -1
  90. package/dist/components/form/index.js +9 -9
  91. package/dist/components/graph/index.cjs +1 -1
  92. package/dist/components/graph/index.js +12 -12
  93. package/dist/components/group/index.cjs +1 -1
  94. package/dist/components/group/index.js +38 -11
  95. package/dist/components/header/index.cjs +1 -1
  96. package/dist/components/header/index.js +49 -32
  97. package/dist/components/icon/index.cjs +1 -1
  98. package/dist/components/icon/index.js +6 -6
  99. package/dist/components/iframe/index.cjs +1 -1
  100. package/dist/components/iframe/index.js +71 -66
  101. package/dist/components/image/index.cjs +1 -1
  102. package/dist/components/image/index.js +1 -1
  103. package/dist/components/input/index.cjs +1 -1
  104. package/dist/components/input/index.js +2 -2
  105. package/dist/components/link/index.cjs +1 -1
  106. package/dist/components/link/index.js +27 -14
  107. package/dist/components/list/index.cjs +1 -1
  108. package/dist/components/list/index.js +62 -58
  109. package/dist/components/loading/index.cjs +1 -1
  110. package/dist/components/loading/index.js +5 -5
  111. package/dist/components/menu/index.cjs +1 -1
  112. package/dist/components/menu/index.js +1 -1
  113. package/dist/components/message/index.cjs +1 -1
  114. package/dist/components/message/index.js +2 -2
  115. package/dist/components/messages/index.cjs +1 -1
  116. package/dist/components/messages/index.js +6 -6
  117. package/dist/components/nav/index.cjs +1 -1
  118. package/dist/components/nav/index.js +31 -29
  119. package/dist/components/object/index.cjs +1 -1
  120. package/dist/components/object/index.js +1 -1
  121. package/dist/components/page-layout/index.cjs +1 -1
  122. package/dist/components/page-layout/index.js +33 -20
  123. package/dist/components/panel/index.cjs +2 -0
  124. package/dist/components/panel/index.js +25 -0
  125. package/dist/components/popover/index.cjs +1 -1
  126. package/dist/components/popover/index.js +35 -35
  127. package/dist/components/portal/index.cjs +1 -1
  128. package/dist/components/portal/index.js +22 -22
  129. package/dist/components/search/index.cjs +1 -1
  130. package/dist/components/search/index.js +50 -50
  131. package/dist/components/select/index.cjs +1 -1
  132. package/dist/components/select/index.js +2 -2
  133. package/dist/components/sortable/index.cjs +1 -1
  134. package/dist/components/sortable/index.js +49 -49
  135. package/dist/components/textarea/index.cjs +1 -1
  136. package/dist/components/textarea/index.js +29 -27
  137. package/dist/components/toast/index.cjs +1 -1
  138. package/dist/components/toast/index.js +1 -1
  139. package/dist/components/toggle/index.cjs +1 -1
  140. package/dist/components/toggle/index.js +10 -10
  141. package/dist/components/toolbar/index.cjs +1 -1
  142. package/dist/components/toolbar/index.js +4 -4
  143. package/dist/components/tooltip/index.cjs +1 -1
  144. package/dist/components/tooltip/index.js +2 -2
  145. package/dist/components/widget/index.cjs +1 -1
  146. package/dist/components/widget/index.js +22 -13
  147. package/dist/{index-CMPTHneU.js → index-BlirPoN9.js} +8 -8
  148. package/dist/{index-BIpgkB-u.js → index-C3NJXvlq.js} +11 -11
  149. package/dist/index-CireNaZt.cjs +2 -0
  150. package/dist/index-O1kh8Vnq.cjs +2 -0
  151. package/dist/index.cjs +1 -1
  152. package/dist/index.d.ts +379 -14
  153. package/dist/index.js +59 -56
  154. package/dist/menu-popover-Ceb_9V67.js +77 -0
  155. package/dist/menu-popover-bqblnK6P.cjs +2 -0
  156. package/dist/styles/fonts.css +11 -0
  157. package/dist/tokens.json +1 -1
  158. package/package.json +15 -8
  159. package/dist/classix-5H4IWnMA.cjs +0 -2
  160. package/dist/classix-5H4IWnMA.cjs.map +0 -1
  161. package/dist/classix-DG18itHa.js +0 -9
  162. package/dist/classix-DG18itHa.js.map +0 -1
  163. package/dist/components/app-link/index.cjs.map +0 -1
  164. package/dist/components/app-link/index.js.map +0 -1
  165. package/dist/components/app-shell/index.cjs.map +0 -1
  166. package/dist/components/app-shell/index.js.map +0 -1
  167. package/dist/components/aside/index.cjs.map +0 -1
  168. package/dist/components/aside/index.js.map +0 -1
  169. package/dist/components/avatar/index.cjs.map +0 -1
  170. package/dist/components/avatar/index.js.map +0 -1
  171. package/dist/components/badge/index.cjs.map +0 -1
  172. package/dist/components/badge/index.js.map +0 -1
  173. package/dist/components/banner/index.cjs.map +0 -1
  174. package/dist/components/banner/index.js.map +0 -1
  175. package/dist/components/branding/index.cjs.map +0 -1
  176. package/dist/components/branding/index.js.map +0 -1
  177. package/dist/components/button/index.cjs.map +0 -1
  178. package/dist/components/button/index.js.map +0 -1
  179. package/dist/components/card/index.cjs.map +0 -1
  180. package/dist/components/card/index.js.map +0 -1
  181. package/dist/components/checkbox/index.cjs.map +0 -1
  182. package/dist/components/checkbox/index.js.map +0 -1
  183. package/dist/components/chip/index.cjs.map +0 -1
  184. package/dist/components/chip/index.js.map +0 -1
  185. package/dist/components/clipboard/index.cjs.map +0 -1
  186. package/dist/components/clipboard/index.js.map +0 -1
  187. package/dist/components/collapsible/index.cjs.map +0 -1
  188. package/dist/components/collapsible/index.js.map +0 -1
  189. package/dist/components/controls/index.cjs.map +0 -1
  190. package/dist/components/controls/index.js.map +0 -1
  191. package/dist/components/croppable/index.cjs.map +0 -1
  192. package/dist/components/croppable/index.js.map +0 -1
  193. package/dist/components/dialog/index.cjs.map +0 -1
  194. package/dist/components/dialog/index.js.map +0 -1
  195. package/dist/components/divider/index.cjs.map +0 -1
  196. package/dist/components/divider/index.js.map +0 -1
  197. package/dist/components/dropdown/index.cjs.map +0 -1
  198. package/dist/components/dropdown/index.js.map +0 -1
  199. package/dist/components/dropzone/index.cjs.map +0 -1
  200. package/dist/components/dropzone/index.js.map +0 -1
  201. package/dist/components/editor/index.cjs.map +0 -1
  202. package/dist/components/editor/index.js.map +0 -1
  203. package/dist/components/empty-state/index.cjs.map +0 -1
  204. package/dist/components/empty-state/index.js.map +0 -1
  205. package/dist/components/fieldset/index.cjs.map +0 -1
  206. package/dist/components/fieldset/index.js.map +0 -1
  207. package/dist/components/figure/index.cjs.map +0 -1
  208. package/dist/components/figure/index.js.map +0 -1
  209. package/dist/components/file/index.cjs.map +0 -1
  210. package/dist/components/file/index.js.map +0 -1
  211. package/dist/components/footer/index.cjs.map +0 -1
  212. package/dist/components/footer/index.js.map +0 -1
  213. package/dist/components/form/index.cjs.map +0 -1
  214. package/dist/components/form/index.js.map +0 -1
  215. package/dist/components/graph/index.cjs.map +0 -1
  216. package/dist/components/graph/index.js.map +0 -1
  217. package/dist/components/group/index.cjs.map +0 -1
  218. package/dist/components/group/index.js.map +0 -1
  219. package/dist/components/header/index.cjs.map +0 -1
  220. package/dist/components/header/index.js.map +0 -1
  221. package/dist/components/icon/index.cjs.map +0 -1
  222. package/dist/components/icon/index.js.map +0 -1
  223. package/dist/components/iframe/index.cjs.map +0 -1
  224. package/dist/components/iframe/index.js.map +0 -1
  225. package/dist/components/image/index.cjs.map +0 -1
  226. package/dist/components/image/index.js.map +0 -1
  227. package/dist/components/input/index.cjs.map +0 -1
  228. package/dist/components/input/index.js.map +0 -1
  229. package/dist/components/link/index.cjs.map +0 -1
  230. package/dist/components/link/index.js.map +0 -1
  231. package/dist/components/list/index.cjs.map +0 -1
  232. package/dist/components/list/index.js.map +0 -1
  233. package/dist/components/loading/index.cjs.map +0 -1
  234. package/dist/components/loading/index.js.map +0 -1
  235. package/dist/components/menu/index.cjs.map +0 -1
  236. package/dist/components/menu/index.js.map +0 -1
  237. package/dist/components/message/index.cjs.map +0 -1
  238. package/dist/components/message/index.js.map +0 -1
  239. package/dist/components/messages/index.cjs.map +0 -1
  240. package/dist/components/messages/index.js.map +0 -1
  241. package/dist/components/nav/index.cjs.map +0 -1
  242. package/dist/components/nav/index.js.map +0 -1
  243. package/dist/components/object/index.cjs.map +0 -1
  244. package/dist/components/object/index.js.map +0 -1
  245. package/dist/components/page-layout/index.cjs.map +0 -1
  246. package/dist/components/page-layout/index.js.map +0 -1
  247. package/dist/components/popover/index.cjs.map +0 -1
  248. package/dist/components/popover/index.js.map +0 -1
  249. package/dist/components/portal/index.cjs.map +0 -1
  250. package/dist/components/portal/index.js.map +0 -1
  251. package/dist/components/search/index.cjs.map +0 -1
  252. package/dist/components/search/index.js.map +0 -1
  253. package/dist/components/select/index.cjs.map +0 -1
  254. package/dist/components/select/index.js.map +0 -1
  255. package/dist/components/sortable/index.cjs.map +0 -1
  256. package/dist/components/sortable/index.js.map +0 -1
  257. package/dist/components/table/index.cjs.map +0 -1
  258. package/dist/components/table/index.js.map +0 -1
  259. package/dist/components/textarea/index.cjs.map +0 -1
  260. package/dist/components/textarea/index.js.map +0 -1
  261. package/dist/components/toast/index.cjs.map +0 -1
  262. package/dist/components/toast/index.js.map +0 -1
  263. package/dist/components/toasts/index.cjs.map +0 -1
  264. package/dist/components/toasts/index.js.map +0 -1
  265. package/dist/components/toggle/index.cjs.map +0 -1
  266. package/dist/components/toggle/index.js.map +0 -1
  267. package/dist/components/toolbar/index.cjs.map +0 -1
  268. package/dist/components/toolbar/index.js.map +0 -1
  269. package/dist/components/tooltip/index.cjs.map +0 -1
  270. package/dist/components/tooltip/index.js.map +0 -1
  271. package/dist/components/widget/index.cjs.map +0 -1
  272. package/dist/components/widget/index.js.map +0 -1
  273. package/dist/icons-B3hIY9Bm.cjs.map +0 -1
  274. package/dist/icons-CTtWkF6z.js.map +0 -1
  275. package/dist/index-BIpgkB-u.js.map +0 -1
  276. package/dist/index-Bbauu1No.cjs +0 -2
  277. package/dist/index-Bbauu1No.cjs.map +0 -1
  278. package/dist/index-CMPTHneU.js.map +0 -1
  279. package/dist/index-DAjU2bTe.cjs +0 -2
  280. package/dist/index-DAjU2bTe.cjs.map +0 -1
  281. package/dist/index.cjs.map +0 -1
  282. package/dist/index.js.map +0 -1
  283. package/dist/menu-popover-BV7nUXlb.js +0 -77
  284. package/dist/menu-popover-BV7nUXlb.js.map +0 -1
  285. package/dist/menu-popover-fGpFDJTo.cjs +0 -2
  286. package/dist/menu-popover-fGpFDJTo.cjs.map +0 -1
  287. package/dist/use-touched-B999bBr8.js.map +0 -1
  288. package/dist/use-touched-Bq5Gjbpz.cjs.map +0 -1
@@ -1,32 +1,32 @@
1
- import { jsx as t, Fragment as m, jsxs as s } from "react/jsx-runtime";
2
- import { t as c } from "../../classix-DG18itHa.js";
3
- import { Icon as d } from "../icon/index.js";
4
- import { Button as _ } from "../button/index.js";
5
- import { Link as k } from "../link/index.js";
6
- import '../../assets/index34.css';const h = "_chip_1apyw_3", y = "_clickable_1apyw_24", b = "_divider_1apyw_45", f = "_link_1apyw_53", i = {
7
- chip: h,
8
- clickable: y,
9
- delete: "_delete_1apyw_41",
10
- divider: b,
11
- link: f
1
+ import { jsx as c, Fragment as s, jsxs as p } from "react/jsx-runtime";
2
+ import e from "classix";
3
+ import { Icon as m } from "../icon/index.js";
4
+ import { Button as h } from "../button/index.js";
5
+ import { Link as _ } from "../link/index.js";
6
+ import '../../assets/index34.css';const k = "_chip_zhdgo_1", g = "_clickable_zhdgo_22", z = "_divider_zhdgo_39", b = "_link_zhdgo_47", i = {
7
+ chip: k,
8
+ clickable: g,
9
+ delete: "_delete_zhdgo_35",
10
+ divider: z,
11
+ link: b
12
12
  }, N = ({
13
- accessibleLabel: o,
14
- className: n,
15
- label: a,
13
+ accessibleLabel: n,
14
+ className: a,
15
+ label: t,
16
16
  link: l,
17
17
  onDelete: r,
18
- ...p
19
- }) => /* @__PURE__ */ t(m, { children: l ? /* @__PURE__ */ s("span", { className: c(i.chip, n), ...p, children: [
20
- /* @__PURE__ */ t(k, { className: c(i.link, i.clickable), onClick: (e) => e.stopPropagation(), to: l, children: a }),
21
- /* @__PURE__ */ t("span", { "aria-hidden": "true", className: i.divider }),
22
- /* @__PURE__ */ t(_, { "aria-label": o ?? `Delete ${a}`, className: c(i.delete, i.clickable), icon: "X", onClick: (e) => {
23
- e.stopPropagation(), r();
18
+ ...d
19
+ }) => /* @__PURE__ */ c(s, { children: l ? /* @__PURE__ */ p("span", { className: e(i.chip, a), ...d, "data-component": "chip", children: [
20
+ /* @__PURE__ */ c(_, { className: e(i.link, i.clickable), onClick: (o) => o.stopPropagation(), to: l, children: t }),
21
+ /* @__PURE__ */ c("span", { "aria-hidden": "true", className: i.divider }),
22
+ /* @__PURE__ */ c(h, { "aria-label": n ?? `Delete ${t}`, className: e(i.delete, i.clickable), icon: "X", onClick: (o) => {
23
+ o.stopPropagation(), r();
24
24
  }, variant: "simple" })
25
- ] }) : /* @__PURE__ */ s("button", { ...p, "aria-label": o ?? `Delete ${a}`, className: c(i.chip, i.clickable, n), onClick: (e) => {
26
- e.stopPropagation(), r();
27
- }, type: "button", children: [
28
- a,
29
- /* @__PURE__ */ t(d, { name: "X", size: "small" })
25
+ ] }) : /* @__PURE__ */ p("button", { ...d, "aria-label": n ?? `Delete ${t}`, className: e(i.chip, i.clickable, a), onClick: (o) => {
26
+ o.stopPropagation(), r();
27
+ }, type: "button", "data-component": "chip", children: [
28
+ t,
29
+ /* @__PURE__ */ c(m, { name: "X", size: "small" })
30
30
  ] }) });
31
31
  export {
32
32
  N as Chip
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const n=require("react/jsx-runtime"),l=require("../icon/index.cjs"),a="_collapsible_1nzgt_1",i="_content_1nzgt_12",r="_indicator_1nzgt_16",e={collapsible:a,content:i,indicator:r},d=({children:o,disabled:t,open:s,summary:c})=>n.jsxs("details",{className:e.collapsible,open:t||s||void 0,"data-component":"collapsible",children:[n.jsxs("summary",{children:[n.jsx("span",{className:e.content,"data-content":"collapsible-summary",children:c}),!t&&n.jsx("span",{className:e.indicator,"data-content":"collapsible-indicator",children:n.jsx(l.Icon,{name:"CaretDown",size:"medium"})})]}),o]});exports.Collapsible=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index36.css');const n=require("react/jsx-runtime"),l=require("react"),u=require("../icon/index.cjs"),f="_collapsible_1nzgt_1",m="_content_1nzgt_12",b="_indicator_1nzgt_16",i={collapsible:f,content:m,indicator:b},v=({children:a,disabled:r,open:d,summary:p})=>{const s=l.useRef(null);return l.useEffect(()=>{const t=s.current;if(!t)return;let e;const c=()=>{e===void 0&&(e=t.open,t.open=!0)},o=()=>{e!==void 0&&(t.open=e,e=void 0)};return window.addEventListener("beforeprint",c),window.addEventListener("afterprint",o),()=>{window.removeEventListener("beforeprint",c),window.removeEventListener("afterprint",o),o()}},[]),n.jsxs("details",{ref:s,className:i.collapsible,open:r||d||void 0,"data-component":"collapsible",children:[n.jsxs("summary",{children:[n.jsx("span",{className:i.content,"data-content":"collapsible-summary",children:p}),!r&&n.jsx("span",{className:i.indicator,"data-content":"collapsible-indicator",children:n.jsx(u.Icon,{name:"CaretDown",size:"medium"})})]}),a]})};exports.Collapsible=v;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,22 +1,38 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
- import { Icon as s } from "../icon/index.js";
3
- import '../../assets/index36.css';const i = "_collapsible_1nzgt_1", r = "_content_1nzgt_12", m = "_indicator_1nzgt_16", t = {
4
- collapsible: i,
5
- content: r,
6
- indicator: m
7
- }, _ = ({
1
+ import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
+ import { useRef as m, useEffect as f } from "react";
3
+ import { Icon as u } from "../icon/index.js";
4
+ import '../../assets/index36.css';const b = "_collapsible_1nzgt_1", v = "_content_1nzgt_12", w = "_indicator_1nzgt_16", r = {
5
+ collapsible: b,
6
+ content: v,
7
+ indicator: w
8
+ }, z = ({
8
9
  children: l,
9
- disabled: o,
10
- open: a,
11
- summary: e
12
- }) => /* @__PURE__ */ c("details", { className: t.collapsible, open: o || a || void 0, "data-component": "collapsible", children: [
13
- /* @__PURE__ */ c("summary", { children: [
14
- /* @__PURE__ */ n("span", { className: t.content, "data-content": "collapsible-summary", children: e }),
15
- !o && /* @__PURE__ */ n("span", { className: t.indicator, "data-content": "collapsible-indicator", children: /* @__PURE__ */ n(s, { name: "CaretDown", size: "medium" }) })
16
- ] }),
17
- l
18
- ] });
10
+ disabled: i,
11
+ open: d,
12
+ summary: p
13
+ }) => {
14
+ const s = m(null);
15
+ return f(() => {
16
+ const n = s.current;
17
+ if (!n) return;
18
+ let e;
19
+ const a = () => {
20
+ e === void 0 && (e = n.open, n.open = !0);
21
+ }, t = () => {
22
+ e !== void 0 && (n.open = e, e = void 0);
23
+ };
24
+ return window.addEventListener("beforeprint", a), window.addEventListener("afterprint", t), () => {
25
+ window.removeEventListener("beforeprint", a), window.removeEventListener("afterprint", t), t();
26
+ };
27
+ }, []), /* @__PURE__ */ c("details", { ref: s, className: r.collapsible, open: i || d || void 0, "data-component": "collapsible", children: [
28
+ /* @__PURE__ */ c("summary", { children: [
29
+ /* @__PURE__ */ o("span", { className: r.content, "data-content": "collapsible-summary", children: p }),
30
+ !i && /* @__PURE__ */ o("span", { className: r.indicator, "data-content": "collapsible-indicator", children: /* @__PURE__ */ o(u, { name: "CaretDown", size: "medium" }) })
31
+ ] }),
32
+ l
33
+ ] });
34
+ };
19
35
  export {
20
- _ as Collapsible
36
+ z as Collapsible
21
37
  };
22
38
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index37.css');const b=require("react/jsx-runtime"),Z=require("../../classix-5H4IWnMA.cjs"),l=require("react"),ee=require("../button/index.cjs"),A=require("../../menu-popover-fGpFDJTo.cjs"),te="_controls_t1re6_13",ne="_inline_t1re6_43",ie="_embedded_t1re6_48",re="_fixed_t1re6_49",oe="_adaptive_t1re6_60",se="_measurement_t1re6_65",h={controls:te,default:"_default_t1re6_28",inline:ne,embedded:ie,fixed:re,adaptive:oe,measurement:se,"non-button-content":"_non-button-content_t1re6_99","overflow-trigger":"_overflow-trigger_t1re6_128"},de={primary:2,secondary:1,tertiary:0,simple:0},ce={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},ae=s=>de[s.props.variant??"secondary"];function le({buttons:s,menuAccessibleLabel:i,triggerAccessibleLabel:n}){const x=s.map(o=>({button:o,isDanger:o.props.intent==="danger",value:o}));return b.jsx(A.MenuPopover,{triggerAccessibleLabel:n,"data-component":"overflowmenu",children:({close:o,initialFocus:r})=>b.jsx(A.MenuActionList,{actions:x,initialFocus:r,menuAccessibleLabel:i,onSelect:()=>o(),usesMenuSemantics:!0})})}const p=(s,i)=>{const n=Number.parseFloat(String(s[i]));return Number.isFinite(n)?n:0},ue=s=>{if(!s.trim().endsWith("px"))return;const i=Number.parseFloat(s);return Number.isFinite(i)?i:void 0},me=(s,i)=>{const n=s.parentElement;if(!n)return;const x=n.getBoundingClientRect(),o=getComputedStyle(n),r=x.width||n.clientWidth,S=x.left+p(o,"borderLeftWidth")+p(o,"paddingLeft"),M=x.left+r-p(o,"borderRightWidth")-p(o,"paddingRight"),_=Array.from(n.children).slice(0,Array.from(n.children).indexOf(s)),y=_.reduce((f,u)=>Math.max(f,u.getBoundingClientRect().right),S),c=_.length>0?p(o,"columnGap"):0,a=Math.max(0,M-y-c),R=(i==null?void 0:i.parent)===n?Math.max(0,r-i.parentWidth):0;return{availableWidth:R>0?Math.max(a,((i==null?void 0:i.availableWidth)??0)+R):a,parent:n,parentWidth:r}},fe=({children:s,className:i,maxVisibleButtons:n,overflow:x,overflowAccessibleLabel:o="More actions",variant:r="default",...S})=>{const M=l.Children.toArray(s),_=[],y=[];M.forEach(e=>{l.isValidElement(e)&&e.type===ee.Button?_.push(e):y.push(e)});const c=_.map((e,d)=>({button:e,index:d,rank:ae(e)})).sort((e,d)=>e.rank-d.rank||e.index-d.index).map(({button:e,index:d})=>l.cloneElement(e,{key:e.key??d})),a=r==="embedded"||r==="fixed"&&x==="menu",R=typeof n=="number"&&Number.isFinite(n)?Math.floor(n):0,f=r==="embedded"&&R>0?Math.min(c.length,R):c.length,u=l.useRef(null),N=l.useRef(void 0),z=l.useRef(null),E=l.useRef(null),[F,C]=l.useState(f),k=c.map(e=>String(e.key)).join(`
2
- `),[D,G]=l.useState(k);D!==k&&(G(k),C(f));const g=l.useCallback(()=>{var L,I,T;if(!a){C(f);return}const e=u.current,d=z.current;if(!e||!d)return;const W=Array.from(d.querySelectorAll('[data-component="button"]')),w=W.at(-1);if(!w)return;const v=W.slice(0,c.length).map(t=>t.getBoundingClientRect().width);if(v.length!==c.length)return;const m=getComputedStyle(e),H=p(m,"paddingLeft")+p(m,"paddingRight")+p(m,"borderLeftWidth")+p(m,"borderRightWidth"),J=ue(m.maxWidth),B=r==="embedded"?me(e,N.current):void 0;B&&(N.current=B);const Q=(B==null?void 0:B.availableWidth)??((L=e.parentElement)==null?void 0:L.clientWidth)??0,U=((I=window.visualViewport)==null?void 0:I.width)??document.documentElement.clientWidth,V=Math.min(...[J,Q,U].filter(t=>typeof t=="number"&&Number.isFinite(t)&&t>0));if(!Number.isFinite(V))return;const q=Math.max(0,V-H),P=((T=E.current)==null?void 0:T.getBoundingClientRect().width)??0,X=v.reduce((t,Y)=>t+Y,0);if(f===c.length&&P+X<=q){C(t=>t===f?t:f);return}let K=P+w.getBoundingClientRect().width,j=0;for(let t=0;t<f&&!(K+v[t]>q);t+=1)K+=v[t],j=t+1;C(t=>t===j?t:j)},[a,c.length,r,f]);if(l.useLayoutEffect(()=>{var d,W,w,v;if(g(),!a)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(g);return u.current&&(e==null||e.observe(u.current)),(d=u.current)!=null&&d.parentElement&&(e==null||e.observe(u.current.parentElement)),r==="embedded"&&((W=u.current)!=null&&W.parentElement)&&Array.from(u.current.parentElement.children).forEach(m=>{m!==u.current&&(e==null||e.observe(m))}),E.current&&(e==null||e.observe(E.current)),window.addEventListener("resize",g),(w=window.visualViewport)==null||w.addEventListener("resize",g),(v=document.fonts)==null||v.ready.then(g),()=>{var m;e==null||e.disconnect(),window.removeEventListener("resize",g),(m=window.visualViewport)==null||m.removeEventListener("resize",g)}},[a,s,g,r]),M.length===0)return null;const $=a?c.slice(0,F):c,O=a?c.slice(F):[];return b.jsxs("div",{"data-component":"controls","data-dynamic-position":r==="fixed"?!0:void 0,"data-adaptive":a?!0:void 0,className:Z.t(h.controls,ce[r],a&&h.adaptive,i),ref:u,...S,children:[a&&b.jsxs("div",{"aria-hidden":"true",className:h.measurement,ref:z,children:[c.map((e,d)=>l.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??d)}`,onClick:void 0,ref:void 0,tabIndex:-1})),b.jsx(A.MenuPopover,{triggerAccessibleLabel:o,children:null})]}),r!=="embedded"&&y.length>0&&b.jsx("span",{className:h["non-button-content"],ref:E,children:y}),$,O.length>0&&b.jsx("span",{className:h["overflow-trigger"],children:b.jsx(le,{buttons:O,menuAccessibleLabel:o,triggerAccessibleLabel:o})})]})};exports.Controls=fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index37.css');const b=require("react/jsx-runtime"),Z=require("classix"),l=require("react"),ee=require("../button/index.cjs"),A=require("../../menu-popover-bqblnK6P.cjs"),te="_controls_t1re6_13",ne="_inline_t1re6_43",ie="_embedded_t1re6_48",re="_fixed_t1re6_49",oe="_adaptive_t1re6_60",se="_measurement_t1re6_65",h={controls:te,default:"_default_t1re6_28",inline:ne,embedded:ie,fixed:re,adaptive:oe,measurement:se,"non-button-content":"_non-button-content_t1re6_99","overflow-trigger":"_overflow-trigger_t1re6_128"},de={primary:2,secondary:1,tertiary:0,simple:0},ce={default:h.default,embedded:h.embedded,fixed:h.fixed,inline:h.inline},ae=s=>de[s.props.variant??"secondary"];function le({buttons:s,menuAccessibleLabel:i,triggerAccessibleLabel:n}){const x=s.map(o=>({button:o,isDanger:o.props.intent==="danger",value:o}));return b.jsx(A.MenuPopover,{triggerAccessibleLabel:n,"data-component":"overflowmenu",children:({close:o,initialFocus:r})=>b.jsx(A.MenuActionList,{actions:x,initialFocus:r,menuAccessibleLabel:i,onSelect:()=>o(),usesMenuSemantics:!0})})}const p=(s,i)=>{const n=Number.parseFloat(String(s[i]));return Number.isFinite(n)?n:0},ue=s=>{if(!s.trim().endsWith("px"))return;const i=Number.parseFloat(s);return Number.isFinite(i)?i:void 0},me=(s,i)=>{const n=s.parentElement;if(!n)return;const x=n.getBoundingClientRect(),o=getComputedStyle(n),r=x.width||n.clientWidth,S=x.left+p(o,"borderLeftWidth")+p(o,"paddingLeft"),M=x.left+r-p(o,"borderRightWidth")-p(o,"paddingRight"),_=Array.from(n.children).slice(0,Array.from(n.children).indexOf(s)),y=_.reduce((f,u)=>Math.max(f,u.getBoundingClientRect().right),S),c=_.length>0?p(o,"columnGap"):0,a=Math.max(0,M-y-c),R=(i==null?void 0:i.parent)===n?Math.max(0,r-i.parentWidth):0;return{availableWidth:R>0?Math.max(a,((i==null?void 0:i.availableWidth)??0)+R):a,parent:n,parentWidth:r}},fe=({children:s,className:i,maxVisibleButtons:n,overflow:x,overflowAccessibleLabel:o="More actions",variant:r="default",...S})=>{const M=l.Children.toArray(s),_=[],y=[];M.forEach(e=>{l.isValidElement(e)&&e.type===ee.Button?_.push(e):y.push(e)});const c=_.map((e,d)=>({button:e,index:d,rank:ae(e)})).sort((e,d)=>e.rank-d.rank||e.index-d.index).map(({button:e,index:d})=>l.cloneElement(e,{key:e.key??d})),a=r==="embedded"||r==="fixed"&&x==="menu",R=typeof n=="number"&&Number.isFinite(n)?Math.floor(n):0,f=r==="embedded"&&R>0?Math.min(c.length,R):c.length,u=l.useRef(null),N=l.useRef(void 0),z=l.useRef(null),E=l.useRef(null),[F,C]=l.useState(f),k=c.map(e=>String(e.key)).join(`
2
+ `),[D,G]=l.useState(k);D!==k&&(G(k),C(f));const g=l.useCallback(()=>{var L,I,T;if(!a){C(f);return}const e=u.current,d=z.current;if(!e||!d)return;const W=Array.from(d.querySelectorAll('[data-component="button"]')),w=W.at(-1);if(!w)return;const v=W.slice(0,c.length).map(t=>t.getBoundingClientRect().width);if(v.length!==c.length)return;const m=getComputedStyle(e),H=p(m,"paddingLeft")+p(m,"paddingRight")+p(m,"borderLeftWidth")+p(m,"borderRightWidth"),J=ue(m.maxWidth),B=r==="embedded"?me(e,N.current):void 0;B&&(N.current=B);const Q=(B==null?void 0:B.availableWidth)??((L=e.parentElement)==null?void 0:L.clientWidth)??0,U=((I=window.visualViewport)==null?void 0:I.width)??document.documentElement.clientWidth,V=Math.min(...[J,Q,U].filter(t=>typeof t=="number"&&Number.isFinite(t)&&t>0));if(!Number.isFinite(V))return;const q=Math.max(0,V-H),P=((T=E.current)==null?void 0:T.getBoundingClientRect().width)??0,X=v.reduce((t,Y)=>t+Y,0);if(f===c.length&&P+X<=q){C(t=>t===f?t:f);return}let K=P+w.getBoundingClientRect().width,j=0;for(let t=0;t<f&&!(K+v[t]>q);t+=1)K+=v[t],j=t+1;C(t=>t===j?t:j)},[a,c.length,r,f]);if(l.useLayoutEffect(()=>{var d,W,w,v;if(g(),!a)return;const e=typeof ResizeObserver>"u"?void 0:new ResizeObserver(g);return u.current&&(e==null||e.observe(u.current)),(d=u.current)!=null&&d.parentElement&&(e==null||e.observe(u.current.parentElement)),r==="embedded"&&((W=u.current)!=null&&W.parentElement)&&Array.from(u.current.parentElement.children).forEach(m=>{m!==u.current&&(e==null||e.observe(m))}),E.current&&(e==null||e.observe(E.current)),window.addEventListener("resize",g),(w=window.visualViewport)==null||w.addEventListener("resize",g),(v=document.fonts)==null||v.ready.then(g),()=>{var m;e==null||e.disconnect(),window.removeEventListener("resize",g),(m=window.visualViewport)==null||m.removeEventListener("resize",g)}},[a,s,g,r]),M.length===0)return null;const $=a?c.slice(0,F):c,O=a?c.slice(F):[];return b.jsxs("div",{"data-dynamic-position":r==="fixed"?!0:void 0,"data-adaptive":a?!0:void 0,className:Z(h.controls,ce[r],a&&h.adaptive,i),ref:u,...S,"data-component":"controls",children:[a&&b.jsxs("div",{"aria-hidden":"true",className:h.measurement,ref:z,children:[c.map((e,d)=>l.cloneElement(e,{"aria-hidden":!0,id:void 0,key:`measure-${String(e.key??d)}`,onClick:void 0,ref:void 0,tabIndex:-1})),b.jsx(A.MenuPopover,{triggerAccessibleLabel:o,children:null})]}),r!=="embedded"&&y.length>0&&b.jsx("span",{className:h["non-button-content"],ref:E,children:y}),$,O.length>0&&b.jsx("span",{className:h["overflow-trigger"],children:b.jsx(le,{buttons:O,menuAccessibleLabel:o,triggerAccessibleLabel:o})})]})};exports.Controls=fe;
3
3
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { jsxs as G, jsx as v } from "react/jsx-runtime";
2
- import { t as ne } from "../../classix-DG18itHa.js";
2
+ import ne from "classix";
3
3
  import { Children as ie, isValidElement as re, cloneElement as P, useRef as C, useState as T, useCallback as oe, useLayoutEffect as de } from "react";
4
4
  import { Button as se } from "../button/index.js";
5
- import { a as $, M as ce } from "../../menu-popover-BV7nUXlb.js";
5
+ import { a as $, M as ce } from "../../menu-popover-Ceb_9V67.js";
6
6
  import '../../assets/index37.css';const ae = "_controls_t1re6_13", le = "_inline_t1re6_43", ue = "_embedded_t1re6_48", me = "_fixed_t1re6_49", fe = "_adaptive_t1re6_60", he = "_measurement_t1re6_65", f = {
7
7
  controls: ae,
8
8
  default: "_default_t1re6_28",
@@ -46,12 +46,12 @@ const h = (d, i) => {
46
46
  if (!d.trim().endsWith("px")) return;
47
47
  const i = Number.parseFloat(d);
48
48
  return Number.isFinite(i) ? i : void 0;
49
- }, We = (d, i) => {
49
+ }, xe = (d, i) => {
50
50
  const n = d.parentElement;
51
51
  if (!n) return;
52
- const g = n.getBoundingClientRect(), o = getComputedStyle(n), r = g.width || n.clientWidth, S = g.left + h(o, "borderLeftWidth") + h(o, "paddingLeft"), B = g.left + r - h(o, "borderRightWidth") - h(o, "paddingRight"), _ = Array.from(n.children).slice(0, Array.from(n.children).indexOf(d)), W = _.reduce((m, l) => Math.max(m, l.getBoundingClientRect().right), S), c = _.length > 0 ? h(o, "columnGap") : 0, a = Math.max(0, B - W - c), x = (i == null ? void 0 : i.parent) === n ? Math.max(0, r - i.parentWidth) : 0;
52
+ const g = n.getBoundingClientRect(), o = getComputedStyle(n), r = g.width || n.clientWidth, S = g.left + h(o, "borderLeftWidth") + h(o, "paddingLeft"), B = g.left + r - h(o, "borderRightWidth") - h(o, "paddingRight"), _ = Array.from(n.children).slice(0, Array.from(n.children).indexOf(d)), x = _.reduce((m, l) => Math.max(m, l.getBoundingClientRect().right), S), c = _.length > 0 ? h(o, "columnGap") : 0, a = Math.max(0, B - x - c), W = (i == null ? void 0 : i.parent) === n ? Math.max(0, r - i.parentWidth) : 0;
53
53
  return {
54
- availableWidth: x > 0 ? Math.max(a, ((i == null ? void 0 : i.availableWidth) ?? 0) + x) : a,
54
+ availableWidth: W > 0 ? Math.max(a, ((i == null ? void 0 : i.availableWidth) ?? 0) + W) : a,
55
55
  parent: n,
56
56
  parentWidth: r
57
57
  };
@@ -64,9 +64,9 @@ const h = (d, i) => {
64
64
  variant: r = "default",
65
65
  ...S
66
66
  }) => {
67
- const B = ie.toArray(d), _ = [], W = [];
67
+ const B = ie.toArray(d), _ = [], x = [];
68
68
  B.forEach((e) => {
69
- re(e) && e.type === se ? _.push(e) : W.push(e);
69
+ re(e) && e.type === se ? _.push(e) : x.push(e);
70
70
  });
71
71
  const c = _.map((e, s) => ({
72
72
  button: e,
@@ -77,7 +77,7 @@ const h = (d, i) => {
77
77
  index: s
78
78
  }) => P(e, {
79
79
  key: e.key ?? s
80
- })), a = r === "embedded" || r === "fixed" && g === "menu", x = typeof n == "number" && Number.isFinite(n) ? Math.floor(n) : 0, m = r === "embedded" && x > 0 ? Math.min(c.length, x) : c.length, l = C(null), N = C(void 0), z = C(null), M = C(null), [F, E] = T(m), k = c.map((e) => String(e.key)).join(`
80
+ })), a = r === "embedded" || r === "fixed" && g === "menu", W = typeof n == "number" && Number.isFinite(n) ? Math.floor(n) : 0, m = r === "embedded" && W > 0 ? Math.min(c.length, W) : c.length, l = C(null), N = C(void 0), z = C(null), M = C(null), [F, E] = T(m), k = c.map((e) => String(e.key)).join(`
81
81
  `), [H, J] = T(k);
82
82
  H !== k && (J(k), E(m));
83
83
  const p = oe(() => {
@@ -92,7 +92,7 @@ const h = (d, i) => {
92
92
  if (!w) return;
93
93
  const b = y.slice(0, c.length).map((t) => t.getBoundingClientRect().width);
94
94
  if (b.length !== c.length) return;
95
- const u = getComputedStyle(e), U = h(u, "paddingLeft") + h(u, "paddingRight") + h(u, "borderLeftWidth") + h(u, "borderRightWidth"), X = _e(u.maxWidth), R = r === "embedded" ? We(e, N.current) : void 0;
95
+ const u = getComputedStyle(e), U = h(u, "paddingLeft") + h(u, "paddingRight") + h(u, "borderLeftWidth") + h(u, "borderRightWidth"), X = _e(u.maxWidth), R = r === "embedded" ? xe(e, N.current) : void 0;
96
96
  R && (N.current = R);
97
97
  const Y = (R == null ? void 0 : R.availableWidth) ?? ((I = e.parentElement) == null ? void 0 : I.clientWidth) ?? 0, Z = ((q = window.visualViewport) == null ? void 0 : q.width) ?? document.documentElement.clientWidth, O = Math.min(...[X, Y, Z].filter((t) => typeof t == "number" && Number.isFinite(t) && t > 0));
98
98
  if (!Number.isFinite(O)) return;
@@ -119,7 +119,7 @@ const h = (d, i) => {
119
119
  }, [a, d, p, r]), B.length === 0)
120
120
  return null;
121
121
  const Q = a ? c.slice(0, F) : c, V = a ? c.slice(F) : [];
122
- return /* @__PURE__ */ G("div", { "data-component": "controls", "data-dynamic-position": r === "fixed" ? !0 : void 0, "data-adaptive": a ? !0 : void 0, className: ne(f.controls, ge[r], a && f.adaptive, i), ref: l, ...S, children: [
122
+ return /* @__PURE__ */ G("div", { "data-dynamic-position": r === "fixed" ? !0 : void 0, "data-adaptive": a ? !0 : void 0, className: ne(f.controls, ge[r], a && f.adaptive, i), ref: l, ...S, "data-component": "controls", children: [
123
123
  a && /* @__PURE__ */ G("div", { "aria-hidden": "true", className: f.measurement, ref: z, children: [
124
124
  c.map((e, s) => P(e, {
125
125
  "aria-hidden": !0,
@@ -131,7 +131,7 @@ const h = (d, i) => {
131
131
  })),
132
132
  /* @__PURE__ */ v($, { triggerAccessibleLabel: o, children: null })
133
133
  ] }),
134
- r !== "embedded" && W.length > 0 && /* @__PURE__ */ v("span", { className: f["non-button-content"], ref: M, children: W }),
134
+ r !== "embedded" && x.length > 0 && /* @__PURE__ */ v("span", { className: f["non-button-content"], ref: M, children: x }),
135
135
  Q,
136
136
  V.length > 0 && /* @__PURE__ */ v("span", { className: f["overflow-trigger"], children: /* @__PURE__ */ v(ve, { buttons: V, menuAccessibleLabel: o, triggerAccessibleLabel: o }) })
137
137
  ] });
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const d=require("react/jsx-runtime"),tt=require("../../classix-5H4IWnMA.cjs"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),I=10,A=.1,kt=.92,m=(h,x,R)=>Math.min(R,Math.max(x,h)),It=h=>new Promise((x,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),x(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),Ot=async({file:h,fill:x,transform:R,viewport:f})=>{const a=await It(h),O=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(O,M),D=a.naturalWidth*y,E=a.naturalHeight*y,Q=x==="width"?Math.max(A,O/y):x==="height"?Math.max(A,M/y):A,j=m(R.zoom,Q,I),w=y*j,b=D*j,B=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-B)/2+R.offset.y,S=m(-p/w,0,a.naturalWidth),T=m(-L/w,0,a.naturalHeight),v=m(f.width/w,1,Math.max(1,a.naturalWidth-S)),s=m(f.height/w,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,S,T,v,s,0,0,_.width,_.height);const U=h.type.startsWith("image/")?h.type:"image/jpeg",P=await new Promise(N=>{_.toBlob(N,U,kt)});if(!P)throw new Error("croppable-image-export-failed");return new globalThis.File([P],h.name,{lastModified:Date.now(),type:P.type||U})},St="_croppable_1kqo4_1",Ut="_empty_1kqo4_14",Pt="_media_1kqo4_22",qt="_overlay_1kqo4_33",Yt="_viewport_1kqo4_41",Xt="_draggable_1kqo4_53",At="_dragging_1kqo4_57",Dt="_inner_1kqo4_61",Wt="_standalone_1kqo4_77",z={croppable:St,empty:Ut,media:Pt,overlay:qt,viewport:Yt,draggable:Xt,dragging:At,inner:Dt,standalone:Wt},Ht=192,Z={offset:{x:0,y:0},zoom:1},xt="Select image",Zt=({children:h,fill:x="none",height:R,image:f,label:a,onCroppableChange:O,onFileChange:M,onImageChange:y,onTransformChange:D,transform:E,standalone:Q})=>{const j=c.useRef(null),w=c.useRef(null),b=c.useRef(null),B=c.useRef(null),p=c.useRef(y),L=c.useRef(null),S=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(Z),_=c.useRef(null),[u,U]=c.useState(null),[P,N]=c.useState(null),[et,V]=c.useState(!1),[wt,nt]=c.useState(Z),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),W=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:A};if(!u)return{width:t,height:n,minZoom:A};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=x==="width"?o/r:x==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(A,i)}})(),q=W.minZoom,H=E??wt,Y=m(H.zoom,q,I),$=P??f??null,rt=!h&&!!f&&!P&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&U({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),X=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,q,I),i=m(o,q,I);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,q,I),i=s.current.offset,l=o?bt(i,e,r,o):n,k=J(l,r);s.current={zoom:r,offset:k},E||nt({zoom:r,offset:k}),D==null||D({zoom:r,offset:k})},K=(t,n,o)=>{S.current={zoom:t,offset:n,anchor:o??null},w.current==null&&(w.current=window.requestAnimationFrame(()=>{w.current=null;const e=S.current;S.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(X||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,q,I),r=W.width*e,i=W.height*e,l=Math.max(0,(r-n)/2),k=Math.max(0,(i-o)/2);return{maxX:l,maxY:k}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){N(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,N(e),U(null),ot(o),K(Z.zoom,Z.offset),s.current=Z,M==null||M(o),n.value=""},Mt=t=>{if(!(X||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(X||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),k=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(k,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,q,I);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),O&&O(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[O]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,Y);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[Y,u,g.width,g.height]),c.useEffect(()=>{$||U(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{Ot({file:F,fill:x,transform:{zoom:Y,offset:H.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,Y,H.offset,x,F,g]),c.useEffect(()=>()=>{w.current!=null&&(window.cancelAnimationFrame(w.current),w.current=null)},[]);const ut=it(Y),C=!X&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=B.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt.t(z.croppable,Q&&z.standalone),onClick:()=>{X&&lt()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:B,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Ht}px`,"--croppable-zoom":Y,"--croppable-x":`${H.offset.x}px`,"--croppable-y":`${H.offset.y}px`,...u?{"--croppable-image-width":`${W.width}px`,"--croppable-image-height":`${W.height}px`}:null},children:X?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]}):d.jsxs("div",{className:tt.t(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt.t(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]})})]})})]})};exports.Croppable=Zt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index38.css');const d=require("react/jsx-runtime"),tt=require("classix"),c=require("react"),mt=require("../button/index.cjs"),pt=require("../figure/index.cjs"),gt=require("../icon/index.cjs"),I=10,A=.1,kt=.92,m=(h,x,R)=>Math.min(R,Math.max(x,h)),It=h=>new Promise((x,R)=>{const f=URL.createObjectURL(h),a=new globalThis.Image;a.onload=()=>{URL.revokeObjectURL(f),x(a)},a.onerror=()=>{URL.revokeObjectURL(f),R(new Error("croppable-image-load-failed"))},a.src=f}),Ot=async({file:h,fill:x,transform:R,viewport:f})=>{const a=await It(h),O=f.width/a.naturalWidth,M=f.height/a.naturalHeight,y=Math.max(O,M),D=a.naturalWidth*y,E=a.naturalHeight*y,Q=x==="width"?Math.max(A,O/y):x==="height"?Math.max(A,M/y):A,j=m(R.zoom,Q,I),w=y*j,b=D*j,B=E*j,p=(f.width-b)/2+R.offset.x,L=(f.height-B)/2+R.offset.y,S=m(-p/w,0,a.naturalWidth),T=m(-L/w,0,a.naturalHeight),v=m(f.width/w,1,Math.max(1,a.naturalWidth-S)),s=m(f.height/w,1,Math.max(1,a.naturalHeight-T)),_=document.createElement("canvas"),u=_.getContext("2d");if(!u)throw new Error("croppable-image-context-missing");_.width=Math.max(1,Math.round(v)),_.height=Math.max(1,Math.round(s)),u.drawImage(a,S,T,v,s,0,0,_.width,_.height);const U=h.type.startsWith("image/")?h.type:"image/jpeg",P=await new Promise(N=>{_.toBlob(N,U,kt)});if(!P)throw new Error("croppable-image-export-failed");return new globalThis.File([P],h.name,{lastModified:Date.now(),type:P.type||U})},St="_croppable_1kqo4_1",Ut="_empty_1kqo4_14",Pt="_media_1kqo4_22",qt="_overlay_1kqo4_33",Yt="_viewport_1kqo4_41",Xt="_draggable_1kqo4_53",At="_dragging_1kqo4_57",Dt="_inner_1kqo4_61",Wt="_standalone_1kqo4_77",z={croppable:St,empty:Ut,media:Pt,overlay:qt,viewport:Yt,draggable:Xt,dragging:At,inner:Dt,standalone:Wt},Ht=192,Z={offset:{x:0,y:0},zoom:1},xt="Select image",Zt=({children:h,fill:x="none",height:R,image:f,label:a,onCroppableChange:O,onFileChange:M,onImageChange:y,onTransformChange:D,transform:E,standalone:Q})=>{const j=c.useRef(null),w=c.useRef(null),b=c.useRef(null),B=c.useRef(null),p=c.useRef(y),L=c.useRef(null),S=c.useRef(null),T=c.useRef(null),v=c.useRef(new Map),s=c.useRef(Z),_=c.useRef(null),[u,U]=c.useState(null),[P,N]=c.useState(null),[et,V]=c.useState(!1),[wt,nt]=c.useState(Z),[F,ot]=c.useState(null),[g,yt]=c.useState({width:0,height:0}),W=(()=>{const t=g.width,n=g.height;if(!t||!n)return{width:0,height:0,minZoom:A};if(!u)return{width:t,height:n,minZoom:A};const o=t/u.width,e=n/u.height,r=Math.max(o,e),i=x==="width"?o/r:x==="height"?e/r:0;return{width:u.width*r,height:u.height*r,minZoom:Math.max(A,i)}})(),q=W.minZoom,H=E??wt,Y=m(H.zoom,q,I),$=P??f??null,rt=!h&&!!f&&!P&&!F,G=!rt,ct=h??($?d.jsx("img",{alt:"",draggable:!1,onLoad:t=>{const n=t.currentTarget;n.naturalWidth&&n.naturalHeight&&U({width:n.naturalWidth,height:n.naturalHeight})},src:$}):null),X=ct==null,J=(t,n)=>{const{maxX:o,maxY:e}=it(n);return{x:m(t.x,-o,o),y:m(t.y,-e,e)}},st=(t,n)=>{const o=_.current;if(!o)return null;const e=o.getBoundingClientRect(),r=t-e.left-e.width/2,i=n-e.top-e.height/2;return{x:r,y:i}},bt=(t,n,o,e)=>{const r=m(n,q,I),i=m(o,q,I);if(r===0)return t;const l=i/r;return{x:(1-l)*e.x+l*t.x,y:(1-l)*e.y+l*t.y}},_t=(t,n,o)=>{const e=s.current.zoom,r=m(t,q,I),i=s.current.offset,l=o?bt(i,e,r,o):n,k=J(l,r);s.current={zoom:r,offset:k},E||nt({zoom:r,offset:k}),D==null||D({zoom:r,offset:k})},K=(t,n,o)=>{S.current={zoom:t,offset:n,anchor:o??null},w.current==null&&(w.current=window.requestAnimationFrame(()=>{w.current=null;const e=S.current;S.current=null;const r=(e==null?void 0:e.zoom)??s.current.zoom,i=(e==null?void 0:e.offset)??s.current.offset,l=(e==null?void 0:e.anchor)??null;_t(r,i,l)}))},zt=t=>{if(X||!G)return;const n=t.ctrlKey?.001:25e-5,o=s.current.zoom*Math.exp(-t.deltaY*n),e=st(t.clientX,t.clientY);K(o,s.current.offset,e)},it=t=>{const n=g.width,o=g.height;if(!n||!o)return{maxX:0,maxY:0};const e=m(t,q,I),r=W.width*e,i=W.height*e,l=Math.max(0,(r-n)/2),k=Math.max(0,(i-o)/2);return{maxX:l,maxY:k}},Rt=t=>{var r;const n=t.target,o=((r=n.files)==null?void 0:r[0])??null;if(L.current&&(URL.revokeObjectURL(L.current),L.current=null),!o){N(null),ot(null),M==null||M(null),n.value="";return}const e=URL.createObjectURL(o);L.current=e,N(e),U(null),ot(o),K(Z.zoom,Z.offset),s.current=Z,M==null||M(o),n.value=""},Mt=t=>{if(!(X||!G||t.pointerType==="mouse"&&t.button!==0)){if(t.currentTarget.setPointerCapture(t.pointerId),t.pointerType==="touch"){const n=v.current;if(n.set(t.pointerId,{x:t.clientX,y:t.clientY}),n.size===2){b.current=null,j.current=null,V(!1);const[o,e]=Array.from(n.values());T.current=Math.hypot(o.x-e.x,o.y-e.y);return}}j.current=t.pointerId,b.current={x:t.clientX,y:t.clientY,originX:s.current.offset.x,originY:s.current.offset.y}}},Et=t=>{if(X||!G)return;if(t.pointerType==="touch"){const r=v.current;if(!r.has(t.pointerId))return;if(r.set(t.pointerId,{x:t.clientX,y:t.clientY}),r.size===2){const[i,l]=Array.from(r.values()),k=i.x-l.x,jt=i.y-l.y,ht=Math.hypot(k,jt),ft={x:(i.x+l.x)/2,y:(i.y+l.y)/2};if(T.current){const Lt=ht/T.current,Tt=s.current.zoom*Lt,vt=st(ft.x,ft.y);K(Tt,s.current.offset,vt)}T.current=ht;return}}if(j.current!==t.pointerId||!b.current||!C)return;const n=t.clientX-b.current.x,o=t.clientY-b.current.y,e=Math.abs(n)+Math.abs(o);!et&&e>2&&V(!0),!(e<=1)&&K(s.current.zoom,{x:b.current.originX+n,y:b.current.originY+o})},at=t=>{t.pointerType==="touch"&&(v.current.delete(t.pointerId),v.current.size<2&&(T.current=null)),j.current===t.pointerId&&(j.current=null,b.current=null,V(!1))};c.useEffect(()=>{if(!E)return;const t=m(E.zoom,q,I);s.current={zoom:t,offset:J(E.offset,t)}},[E,g.width,g.height,u==null?void 0:u.width,u==null?void 0:u.height]),c.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]),c.useEffect(()=>{const t=_.current;if(!t)return;const n=()=>{const r=t.getBoundingClientRect();yt(i=>i.width===r.width&&i.height===r.height?i:{width:r.width,height:r.height}),O&&O(r)};n();const o=()=>n();if(window.addEventListener("scroll",o,!0),typeof ResizeObserver>"u"){const r=()=>n();return window.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}const e=new ResizeObserver(()=>n());return e.observe(t),()=>{e.disconnect(),window.removeEventListener("scroll",o,!0)}},[O]),c.useEffect(()=>{if(E)return;const t=s.current.offset,n=J(t,Y);t.x===n.x&&t.y===n.y||(s.current={zoom:s.current.zoom,offset:n},nt(o=>({...o,offset:n})))},[Y,u,g.width,g.height]),c.useEffect(()=>{$||U(null)},[$]),c.useEffect(()=>{p.current=y},[y]),c.useEffect(()=>{var o;if(!y)return;if(!F||!g.width||!g.height||h){(o=p.current)==null||o.call(p,null);return}let t=!0;const n=window.setTimeout(()=>{Ot({file:F,fill:x,transform:{zoom:Y,offset:H.offset},viewport:g}).then(e=>{var r;t&&((r=p.current)==null||r.call(p,e))}).catch(()=>{var e;t&&((e=p.current)==null||e.call(p,null))})},75);return()=>{t=!1,window.clearTimeout(n)}},[h,Y,H.offset,x,F,g]),c.useEffect(()=>()=>{w.current!=null&&(window.cancelAnimationFrame(w.current),w.current=null)},[]);const ut=it(Y),C=!X&&G&&(ut.maxX>0||ut.maxY>0),lt=()=>{var t;return(t=B.current)==null?void 0:t.click()},dt=t=>{t.preventDefault(),t.stopPropagation(),lt()};return d.jsxs("div",{className:tt(z.croppable,Q&&z.standalone),onClick:()=>{X&&lt()},"data-component":"croppable",children:[d.jsx("input",{accept:"image/*",onChange:Rt,ref:B,type:"file"}),d.jsx("div",{className:z.viewport,ref:_,onDragStart:t=>t.preventDefault(),onPointerDown:Mt,onPointerMove:Et,onPointerUp:at,onPointerCancel:at,onWheel:zt,style:{"--croppable-height":`${R??Ht}px`,"--croppable-zoom":Y,"--croppable-x":`${H.offset.x}px`,"--croppable-y":`${H.offset.y}px`,...u?{"--croppable-image-width":`${W.width}px`,"--croppable-image-height":`${W.height}px`}:null},children:X?d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]}):d.jsxs("div",{className:tt(z.media,C&&z.draggable,C&&et&&z.dragging),children:[d.jsx("div",{className:tt(z.inner),children:ct}),rt&&d.jsx("div",{className:z.overlay,children:d.jsxs("div",{className:z.empty,children:[d.jsx(pt.Figure,{children:d.jsx(gt.Icon,{name:"Image",size:"large"})}),d.jsx(mt.Button,{onClick:dt,children:a??xt})]})})]})})]})};exports.Croppable=Zt;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as J, jsx as w } from "react/jsx-runtime";
2
- import { t as ot } from "../../classix-DG18itHa.js";
2
+ import ot from "classix";
3
3
  import { useRef as x, useState as S, useEffect as E } from "react";
4
4
  import { Button as wt } from "../button/index.js";
5
5
  import { Figure as xt } from "../figure/index.js";
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const e=require("react/jsx-runtime"),k=require("../../classix-5H4IWnMA.cjs"),a=require("react"),j=require("../button/index.cjs"),p=require("../icon/index.cjs"),P="_dialog_9zw0o_3",T="_close_9zw0o_34",X="_fullscreen_9zw0o_45",E="_structured_9zw0o_66",F="_header_9zw0o_72",M="_content_9zw0o_83",S="_controls_9zw0o_94",s={dialog:P,close:T,fullscreen:X,structured:E,header:F,content:M,controls:S},w=c=>a.Children.toArray(c).some(o=>a.isValidElement(o)?o.type===j.Button&&o.props.intent==="danger"?!0:w(o.props.children):!1),Y=({children:c,className:o,controls:l,fullscreen:f=!1,header:_,onCancel:i,onClick:u,onClose:d,open:n=!1,setOpen:r,...z})=>{const g=a.useRef(null),m=w(l),h=f||_!=null||l!=null;a.useEffect(()=>{const t=g.current;t&&(n&&!t.open?t.showModal():!n&&t.open&&t.close())},[n]);const B=t=>{i==null||i(t),!(t.defaultPrevented||!r)&&(t.preventDefault(),r(!1))},b=t=>{if(u==null||u(t),m||t.defaultPrevented||t.target!==t.currentTarget||!r)return;const{bottom:y,left:N,right:R,top:D}=t.currentTarget.getBoundingClientRect();(t.clientX<N||t.clientX>R||t.clientY<D||t.clientY>y)&&r(!1)},q=t=>{d==null||d(t),n&&(r==null||r(!1))},x=r&&!m?e.jsx(j.Button,{"aria-label":"Close dialog",className:s.close,onClick:()=>r(!1),variant:"simple",children:e.jsx(p.Icon,{name:"X"})}):null;return e.jsx("dialog",{className:k.t(s.dialog,h&&s.structured,f&&s.fullscreen,o),onCancel:B,onClick:b,onClose:q,ref:g,...z,"data-component":"dialog",children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:s.header,children:[_,x]}),e.jsx("div",{className:s.content,children:c}),l!=null&&e.jsx("div",{className:s.controls,children:l})]}):e.jsxs(e.Fragment,{children:[x,c]})})};exports.Dialog=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const e=require("react/jsx-runtime"),p=require("classix"),a=require("react"),j=require("../button/index.cjs"),P=require("../icon/index.cjs"),T="_dialog_cz5d0_3",X="_close_cz5d0_34",E="_fullscreen_cz5d0_45",F="_structured_cz5d0_87",M="_content_cz5d0_87",S="_header_cz5d0_96",Y="_controls_cz5d0_101",r={dialog:T,close:X,fullscreen:E,structured:F,content:M,header:S,controls:Y},z=l=>a.Children.toArray(l).some(s=>a.isValidElement(s)?s.type===j.Button&&s.props.intent==="danger"?!0:z(s.props.children):!1),w=({children:l,className:s,controls:n,fullscreen:f=!1,header:_,onCancel:i,onClick:d,onClose:u,open:o=!1,setOpen:c,...B})=>{const g=a.useRef(null),m=z(n),h=f||_!=null||n!=null;a.useEffect(()=>{const t=g.current;t&&(o&&!t.open?t.showModal():!o&&t.open&&t.close())},[o]);const b=t=>{i==null||i(t),!(t.defaultPrevented||!c)&&(t.preventDefault(),c(!1))},q=t=>{if(d==null||d(t),m||t.defaultPrevented||t.target!==t.currentTarget||!c)return;const{bottom:N,left:R,right:D,top:k}=t.currentTarget.getBoundingClientRect();(t.clientX<R||t.clientX>D||t.clientY<k||t.clientY>N)&&c(!1)},y=t=>{u==null||u(t),o&&(c==null||c(!1))},x=c&&!m?e.jsx(j.Button,{"aria-label":"Close dialog",className:r.close,onClick:()=>c(!1),variant:"simple",children:e.jsx(P.Icon,{name:"X"})}):null;return e.jsx("dialog",{className:p(r.dialog,h&&r.structured,f&&r.fullscreen,s),onCancel:b,onClick:q,onClose:y,ref:g,...B,"data-component":"dialog",children:h?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:r.header,children:[_,x]}),e.jsx("div",{className:r.content,children:l}),n!=null&&e.jsx("div",{className:r.controls,children:n})]}):e.jsxs(e.Fragment,{children:[x,l]})})};exports.Dialog=w;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -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-B3hIY9Bm.cjs"),X=require("../../index-O1kh8Vnq.cjs"),pe=require("../list/index.cjs"),V=require("../../index-CireNaZt.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