@solibo/solibo-ui 1.1.7 → 1.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 (164) hide show
  1. package/dist/assets/index10.css +1 -1
  2. package/dist/assets/index11.css +1 -1
  3. package/dist/assets/index12.css +1 -1
  4. package/dist/assets/index13.css +1 -1
  5. package/dist/assets/index14.css +1 -1
  6. package/dist/assets/index15.css +1 -1
  7. package/dist/assets/index16.css +1 -1
  8. package/dist/assets/index17.css +1 -1
  9. package/dist/assets/index18.css +1 -1
  10. package/dist/assets/index19.css +1 -0
  11. package/dist/assets/index20.css +0 -1
  12. package/dist/assets/index21.css +1 -1
  13. package/dist/assets/index22.css +1 -1
  14. package/dist/assets/index23.css +1 -1
  15. package/dist/assets/index24.css +1 -1
  16. package/dist/assets/index25.css +1 -1
  17. package/dist/assets/index26.css +1 -1
  18. package/dist/assets/index27.css +1 -1
  19. package/dist/assets/index28.css +1 -1
  20. package/dist/assets/index29.css +1 -1
  21. package/dist/assets/index30.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/index35.css +1 -1
  27. package/dist/assets/index36.css +1 -1
  28. package/dist/assets/index37.css +1 -1
  29. package/dist/assets/index38.css +1 -1
  30. package/dist/assets/index39.css +1 -1
  31. package/dist/assets/index40.css +1 -1
  32. package/dist/assets/index41.css +1 -1
  33. package/dist/assets/index42.css +1 -1
  34. package/dist/assets/index43.css +1 -1
  35. package/dist/assets/index44.css +1 -1
  36. package/dist/assets/index45.css +1 -1
  37. package/dist/assets/index46.css +1 -1
  38. package/dist/assets/index47.css +1 -1
  39. package/dist/assets/index48.css +1 -1
  40. package/dist/assets/index49.css +1 -1
  41. package/dist/assets/index50.css +1 -1
  42. package/dist/assets/index51.css +1 -1
  43. package/dist/assets/index52.css +1 -0
  44. package/dist/assets/index53.css +1 -0
  45. package/dist/assets/index54.css +1 -0
  46. package/dist/assets/index9.css +1 -1
  47. package/dist/components/app-link/index.cjs +1 -1
  48. package/dist/components/app-link/index.js +1 -1
  49. package/dist/components/app-shell/index.cjs +2 -0
  50. package/dist/components/app-shell/index.cjs.map +1 -0
  51. package/dist/components/app-shell/index.js +18 -0
  52. package/dist/components/app-shell/index.js.map +1 -0
  53. package/dist/components/aside/index.cjs +1 -1
  54. package/dist/components/aside/index.js +1 -1
  55. package/dist/components/avatar/index.cjs +1 -1
  56. package/dist/components/avatar/index.js +1 -1
  57. package/dist/components/badge/index.cjs +1 -1
  58. package/dist/components/badge/index.js +1 -1
  59. package/dist/components/banner/index.cjs +1 -1
  60. package/dist/components/banner/index.js +1 -1
  61. package/dist/components/branding/index.cjs +1 -1
  62. package/dist/components/branding/index.js +1 -1
  63. package/dist/components/button/index.cjs +1 -1
  64. package/dist/components/button/index.js +1 -1
  65. package/dist/components/card/index.cjs +1 -1
  66. package/dist/components/card/index.js +1 -1
  67. package/dist/components/checkbox/index.cjs +1 -1
  68. package/dist/components/checkbox/index.js +1 -1
  69. package/dist/components/chip/index.cjs +1 -1
  70. package/dist/components/chip/index.js +1 -1
  71. package/dist/components/collapsible/index.cjs +1 -1
  72. package/dist/components/collapsible/index.js +1 -1
  73. package/dist/components/controls/index.cjs +1 -1
  74. package/dist/components/controls/index.js +1 -1
  75. package/dist/components/croppable/index.cjs +1 -1
  76. package/dist/components/croppable/index.js +1 -1
  77. package/dist/components/dialog/index.cjs +1 -1
  78. package/dist/components/dialog/index.js +1 -1
  79. package/dist/components/divider/index.cjs +2 -0
  80. package/dist/components/divider/index.cjs.map +1 -0
  81. package/dist/components/divider/index.js +12 -0
  82. package/dist/components/divider/index.js.map +1 -0
  83. package/dist/components/dropdown/index.cjs +1 -1
  84. package/dist/components/dropdown/index.js +3 -3
  85. package/dist/components/dropzone/index.cjs +1 -1
  86. package/dist/components/dropzone/index.js +1 -1
  87. package/dist/components/editor/index.cjs +1 -1
  88. package/dist/components/editor/index.js +2 -2
  89. package/dist/components/empty-state/index.cjs +1 -1
  90. package/dist/components/empty-state/index.js +1 -1
  91. package/dist/components/fieldset/index.cjs +1 -1
  92. package/dist/components/fieldset/index.js +1 -1
  93. package/dist/components/figure/index.cjs +1 -1
  94. package/dist/components/figure/index.js +1 -1
  95. package/dist/components/file/index.cjs +1 -1
  96. package/dist/components/file/index.js +19 -19
  97. package/dist/components/footer/index.cjs +1 -1
  98. package/dist/components/footer/index.js +1 -1
  99. package/dist/components/form/index.cjs +1 -1
  100. package/dist/components/form/index.js +1 -1
  101. package/dist/components/graph/index.cjs +1 -1
  102. package/dist/components/graph/index.js +1 -1
  103. package/dist/components/group/index.cjs +1 -1
  104. package/dist/components/group/index.js +1 -1
  105. package/dist/components/header/index.cjs +1 -1
  106. package/dist/components/header/index.js +1 -1
  107. package/dist/components/icon/index.cjs +1 -1
  108. package/dist/components/icon/index.js +1 -1
  109. package/dist/components/iframe/index.cjs +1 -1
  110. package/dist/components/iframe/index.js +1 -1
  111. package/dist/components/image/index.cjs +1 -1
  112. package/dist/components/image/index.js +1 -1
  113. package/dist/components/input/index.cjs +1 -1
  114. package/dist/components/input/index.js +1 -1
  115. package/dist/components/link/index.cjs +1 -1
  116. package/dist/components/link/index.js +1 -1
  117. package/dist/components/list/index.cjs +1 -1
  118. package/dist/components/list/index.js +1 -1
  119. package/dist/components/loading/index.cjs +1 -1
  120. package/dist/components/loading/index.js +1 -1
  121. package/dist/components/message/index.cjs +1 -1
  122. package/dist/components/message/index.js +28 -28
  123. package/dist/components/messages/index.cjs +1 -1
  124. package/dist/components/messages/index.js +1 -1
  125. package/dist/components/nav/index.cjs +1 -1
  126. package/dist/components/nav/index.cjs.map +1 -1
  127. package/dist/components/nav/index.js +47 -34
  128. package/dist/components/nav/index.js.map +1 -1
  129. package/dist/components/object/index.cjs +1 -1
  130. package/dist/components/object/index.js +1 -1
  131. package/dist/components/page-layout/index.cjs +2 -0
  132. package/dist/components/page-layout/index.cjs.map +1 -0
  133. package/dist/components/page-layout/index.js +23 -0
  134. package/dist/components/page-layout/index.js.map +1 -0
  135. package/dist/components/popover/index.cjs +1 -1
  136. package/dist/components/popover/index.js +1 -1
  137. package/dist/components/portal/index.cjs +1 -1
  138. package/dist/components/portal/index.js +11 -11
  139. package/dist/components/search/index.cjs +1 -1
  140. package/dist/components/search/index.js +1 -1
  141. package/dist/components/select/index.cjs +1 -1
  142. package/dist/components/select/index.js +1 -1
  143. package/dist/components/toolbar/index.cjs +1 -1
  144. package/dist/components/toolbar/index.js +1 -1
  145. package/dist/components/tooltip/index.cjs +1 -1
  146. package/dist/components/tooltip/index.js +1 -1
  147. package/dist/{index-CwIzKfBo.js → index-BLb3JiCr.js} +2 -2
  148. package/dist/{index-CwIzKfBo.js.map → index-BLb3JiCr.js.map} +1 -1
  149. package/dist/{index-CXaYq0By.cjs → index-Bt7vnwji.cjs} +2 -2
  150. package/dist/{index-CXaYq0By.cjs.map → index-Bt7vnwji.cjs.map} +1 -1
  151. package/dist/index-CQlMdqOp.cjs +2 -0
  152. package/dist/index-CQlMdqOp.cjs.map +1 -0
  153. package/dist/index-CbJ2-IPc.js +83 -0
  154. package/dist/index-CbJ2-IPc.js.map +1 -0
  155. package/dist/index.cjs +1 -1
  156. package/dist/index.d.ts +29 -2
  157. package/dist/index.js +109 -102
  158. package/dist/index.js.map +1 -1
  159. package/dist/tokens.json +1 -1
  160. package/package.json +1 -1
  161. package/dist/index-5yOssOic.cjs +0 -2
  162. package/dist/index-5yOssOic.cjs.map +0 -1
  163. package/dist/index-Cv6TtBnd.js +0 -76
  164. package/dist/index-Cv6TtBnd.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index15.css');const e=require("react/jsx-runtime"),j=require("../../classix-5H4IWnMA.cjs"),h=require("../avatar/index.cjs"),w=require("../icon/index.cjs"),S="_attachments_sg3ov_1",b="_message_sg3ov_11",f="_timestamp_sg3ov_144",q="_preview_sg3ov_149",a={attachments:S,"message-group":"_message-group_sg3ov_11",message:b,timestamp:f,preview:q},y=({appearance:c="default",attachments:m,author:t,authorColor:r,authorImageUrl:g,authorLink:l,authorRole:d,content:_,iconName:p="Info",id:v,preview:u,timestamp:o,timestampText:x,type:s="default"})=>{const n=o?new Date(o):void 0,i=n?e.jsx("time",{className:a.timestamp,dateTime:n.toISOString(),children:x??n.toLocaleString()}):null;return e.jsxs("div",{className:a["message-group"],"data-message-type":s,"data-component":"message",children:[t&&e.jsx(h.Avatar,{accessibleLabel:t,color:r,imageUrl:g,link:l,name:t,role:d}),s==="system"&&i,e.jsxs("div",{className:j.t(a.message,u&&a.preview),"data-appearance":c,"data-id":v,"data-type":s,children:[s=="system"&&e.jsx(w.Icon,{gap:"right",name:p}),_]}),m&&e.jsx("div",{className:a.attachments,children:m}),s!=="system"&&i]})};exports.Message=y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index16.css');const e=require("react/jsx-runtime"),x=require("../../classix-5H4IWnMA.cjs"),j=require("../avatar/index.cjs"),h=require("../icon/index.cjs"),k="_attachments_1tffk_1",w="_message_1tffk_11",S="_timestamp_1tffk_144",b="_preview_1tffk_149",t={attachments:k,"message-group":"_message-group_1tffk_11",message:w,timestamp:S,preview:b},q=({appearance:o="default",attachments:m,author:a,authorColor:r,authorImageUrl:l,authorLink:d,authorRole:g,content:_,iconName:p="Info",id:f,preview:u,timestamp:i,timestampText:v,type:s="default"})=>{const n=i?new Date(i):void 0,c=n?e.jsx("time",{className:t.timestamp,dateTime:n.toISOString(),children:v??n.toLocaleString()}):null;return e.jsxs("div",{className:t["message-group"],"data-message-type":s,"data-component":"message",children:[a&&e.jsx(j.Avatar,{accessibleLabel:a,color:r,imageUrl:l,link:d,name:a,role:g}),s==="system"&&c,e.jsxs("div",{className:x.t(t.message,u&&t.preview),"data-appearance":o,"data-id":f,"data-type":s,children:[s=="system"&&e.jsx(h.Icon,{gap:"right",name:p}),_]}),m&&e.jsx("div",{className:t.attachments,children:m}),s!=="system"&&c]})};exports.Message=q;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,39 +1,39 @@
1
- import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
- import { t as w } from "../../classix-DG18itHa.js";
3
- import { Avatar as N } from "../avatar/index.js";
4
- import { Icon as x } from "../icon/index.js";
5
- import '../../assets/index15.css';const I = "_attachments_sg3ov_1", S = "_message_sg3ov_11", b = "_timestamp_sg3ov_144", j = "_preview_sg3ov_149", s = {
6
- attachments: I,
7
- "message-group": "_message-group_sg3ov_11",
8
- message: S,
9
- timestamp: b,
10
- preview: j
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { t as u } from "../../classix-DG18itHa.js";
3
+ import { Avatar as w } from "../avatar/index.js";
4
+ import { Icon as N } from "../icon/index.js";
5
+ import '../../assets/index16.css';const x = "_attachments_1tffk_1", I = "_message_1tffk_11", S = "_timestamp_1tffk_144", b = "_preview_1tffk_149", s = {
6
+ attachments: x,
7
+ "message-group": "_message-group_1tffk_11",
8
+ message: I,
9
+ timestamp: S,
10
+ preview: b
11
11
  }, D = ({
12
12
  appearance: c = "default",
13
- attachments: o,
14
- author: t,
15
- authorColor: g,
16
- authorImageUrl: l,
17
- authorLink: d,
13
+ attachments: i,
14
+ author: a,
15
+ authorColor: l,
16
+ authorImageUrl: d,
17
+ authorLink: g,
18
18
  authorRole: p,
19
- content: _,
20
- iconName: v = "Info",
21
- id: f,
19
+ content: f,
20
+ iconName: _ = "Info",
21
+ id: v,
22
22
  preview: h,
23
- timestamp: i,
24
- timestampText: u,
23
+ timestamp: n,
24
+ timestampText: k,
25
25
  type: e = "default"
26
26
  }) => {
27
- const m = i ? new Date(i) : void 0, n = m ? /* @__PURE__ */ a("time", { className: s.timestamp, dateTime: m.toISOString(), children: u ?? m.toLocaleString() }) : null;
27
+ const m = n ? new Date(n) : void 0, o = m ? /* @__PURE__ */ t("time", { className: s.timestamp, dateTime: m.toISOString(), children: k ?? m.toLocaleString() }) : null;
28
28
  return /* @__PURE__ */ r("div", { className: s["message-group"], "data-message-type": e, "data-component": "message", children: [
29
- t && /* @__PURE__ */ a(N, { accessibleLabel: t, color: g, imageUrl: l, link: d, name: t, role: p }),
30
- e === "system" && n,
31
- /* @__PURE__ */ r("div", { className: w(s.message, h && s.preview), "data-appearance": c, "data-id": f, "data-type": e, children: [
32
- e == "system" && /* @__PURE__ */ a(x, { gap: "right", name: v }),
33
- _
29
+ a && /* @__PURE__ */ t(w, { accessibleLabel: a, color: l, imageUrl: d, link: g, name: a, role: p }),
30
+ e === "system" && o,
31
+ /* @__PURE__ */ r("div", { className: u(s.message, h && s.preview), "data-appearance": c, "data-id": v, "data-type": e, children: [
32
+ e == "system" && /* @__PURE__ */ t(N, { gap: "right", name: _ }),
33
+ f
34
34
  ] }),
35
- o && /* @__PURE__ */ a("div", { className: s.attachments, children: o }),
36
- e !== "system" && n
35
+ i && /* @__PURE__ */ t("div", { className: s.attachments, children: i }),
36
+ e !== "system" && o
37
37
  ] });
38
38
  };
39
39
  export {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const r=require("react/jsx-runtime"),D=require("../../classix-5H4IWnMA.cjs"),n=require("react"),G=require("../editor/index.cjs"),I=require("../list/index.cjs"),J=require("../tooltip/index.cjs"),K=require("../message/index.cjs"),Q="_messages_pqp89_1",V="_fill_pqp89_20",j={messages:Q,fill:V},X=({fill:M=!1,files:u,handleUpload:y,inlineImages:c,maxEditorRows:Y=5,message:d="",messages:l,minEditorRows:b=1,onChange:H,onFilesChange:a,onInlineImagesChange:B,onSubmit:N,placeholder:O,sending:m,submitLabel:P="Send message",tooltipLabel:f})=>{var L;const v=n.useRef(null),o=n.useRef(!0),h=n.useRef(!1),[U,W]=n.useState([]),p=u??U,g=(L=l[l.length-1])==null?void 0:L.id,k=d.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim()==="";return n.useLayoutEffect(()=>{var R;const e=(R=v.current)==null?void 0:R.querySelector("[data-message-list]");if(!e||g===void 0)return;const z=e.scrollHeight-e.scrollTop-e.clientHeight<450,_=!h.current||z;o.current=_,h.current=!0;const A=window.setTimeout(()=>{o.current=!1},5e3),E=()=>{e.scrollTop=e.scrollHeight};_&&E();const T=t=>{o.current&&t.target instanceof HTMLImageElement&&E()},q=t=>{t.deltaY<0&&(o.current=!1)};let i;const x=t=>{var s;i=(s=t.touches[0])==null?void 0:s.clientY},w=t=>{var S;const s=(S=t.touches[0])==null?void 0:S.clientY;s!==void 0&&i!==void 0&&s>i&&(o.current=!1),i=s};return e.addEventListener("load",T,!0),e.addEventListener("wheel",q,{passive:!0}),e.addEventListener("touchstart",x,{passive:!0}),e.addEventListener("touchmove",w,{passive:!0}),()=>{window.clearTimeout(A),e.removeEventListener("load",T,!0),e.removeEventListener("wheel",q),e.removeEventListener("touchstart",x),e.removeEventListener("touchmove",w)}},[g]),r.jsxs("div",{className:D.t(j.messages,M&&j.fill),"data-component":"messages",ref:v,children:[r.jsx(I.List,{"data-message-list":!0,children:l.map(e=>r.jsx(K.Message,{...e},e.id))}),f&&r.jsx(J.Tooltip,{variant:"static",children:f}),r.jsx(G.Editor,{autofocus:!0,content:d,disabled:m||k&&p.length===0&&!(c!=null&&c.length),files:p,inlineImages:c,isSubmitting:m,maxRows:Y,minRows:b,onChange:H,onFilesChange:e=>{u===void 0&&W(e),a==null||a(e)},onInlineImagesChange:B,onSubmit:N,onUpload:y,placeholder:O,submitLabel:P})]})};exports.Messages=X;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const r=require("react/jsx-runtime"),D=require("../../classix-5H4IWnMA.cjs"),n=require("react"),G=require("../editor/index.cjs"),I=require("../list/index.cjs"),J=require("../tooltip/index.cjs"),K=require("../message/index.cjs"),Q="_messages_pqp89_1",V="_fill_pqp89_20",j={messages:Q,fill:V},X=({fill:M=!1,files:u,handleUpload:y,inlineImages:c,maxEditorRows:Y=5,message:d="",messages:l,minEditorRows:b=1,onChange:H,onFilesChange:a,onInlineImagesChange:B,onSubmit:N,placeholder:O,sending:m,submitLabel:P="Send message",tooltipLabel:f})=>{var L;const v=n.useRef(null),o=n.useRef(!0),h=n.useRef(!1),[U,W]=n.useState([]),p=u??U,g=(L=l[l.length-1])==null?void 0:L.id,k=d.replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").trim()==="";return n.useLayoutEffect(()=>{var R;const e=(R=v.current)==null?void 0:R.querySelector("[data-message-list]");if(!e||g===void 0)return;const z=e.scrollHeight-e.scrollTop-e.clientHeight<450,_=!h.current||z;o.current=_,h.current=!0;const A=window.setTimeout(()=>{o.current=!1},5e3),E=()=>{e.scrollTop=e.scrollHeight};_&&E();const T=t=>{o.current&&t.target instanceof HTMLImageElement&&E()},q=t=>{t.deltaY<0&&(o.current=!1)};let i;const x=t=>{var s;i=(s=t.touches[0])==null?void 0:s.clientY},w=t=>{var S;const s=(S=t.touches[0])==null?void 0:S.clientY;s!==void 0&&i!==void 0&&s>i&&(o.current=!1),i=s};return e.addEventListener("load",T,!0),e.addEventListener("wheel",q,{passive:!0}),e.addEventListener("touchstart",x,{passive:!0}),e.addEventListener("touchmove",w,{passive:!0}),()=>{window.clearTimeout(A),e.removeEventListener("load",T,!0),e.removeEventListener("wheel",q),e.removeEventListener("touchstart",x),e.removeEventListener("touchmove",w)}},[g]),r.jsxs("div",{className:D.t(j.messages,M&&j.fill),"data-component":"messages",ref:v,children:[r.jsx(I.List,{"data-message-list":!0,children:l.map(e=>r.jsx(K.Message,{...e},e.id))}),f&&r.jsx(J.Tooltip,{variant:"static",children:f}),r.jsx(G.Editor,{autofocus:!0,content:d,disabled:m||k&&p.length===0&&!(c!=null&&c.length),files:p,inlineImages:c,isSubmitting:m,maxRows:Y,minRows:b,onChange:H,onFilesChange:e=>{u===void 0&&W(e),a==null||a(e)},onInlineImagesChange:B,onSubmit:N,onUpload:y,placeholder:O,submitLabel:P})]})};exports.Messages=X;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -5,7 +5,7 @@ import { Editor as P } from "../editor/index.js";
5
5
  import { List as Q } from "../list/index.js";
6
6
  import { Tooltip as V } from "../tooltip/index.js";
7
7
  import { Message as X } from "../message/index.js";
8
- import '../../assets/index13.css';const Z = "_messages_pqp89_1", $ = "_fill_pqp89_20", q = {
8
+ import '../../assets/index14.css';const Z = "_messages_pqp89_1", $ = "_fill_pqp89_20", q = {
9
9
  messages: Z,
10
10
  fill: $
11
11
  }, ne = ({
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const o=require("react/jsx-runtime"),r=require("../../classix-5H4IWnMA.cjs"),p=require("react"),h=require("../../icons-Dv_p0bUF.cjs"),v="_nav_1hgi7_3",f="_label_1hgi7_9",g="_horizontal_1hgi7_17",m="_sidebar_1hgi7_27",w="_tabs_1hgi7_66",N="_pills_1hgi7_86",t={nav:v,label:f,horizontal:g,sidebar:m,tabs:w,pills:N},x={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},j=({className:e,...n})=>o.jsx("span",{className:r.t(e,t.label),...n,"data-component":"navlabel"}),q=({animation:e,children:n,className:c,horizontal:i=!1,variant:s="default",...d})=>{const[b,l]=p.useState(!1),u={"--icon-svg":h.iconSVG("CaretDown")};return o.jsx("nav",{className:r.t(c,i&&t.horizontal,t.nav,x[s]),"data-animation":e,"data-open":b?"true":"false","data-orientation":i?"horizontal":"vertical",onBlurCapture:a=>{if(s!=="pills"||window.innerWidth>960)return;const _=a.relatedTarget;a.currentTarget.contains(_)||l(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||l(a=>!a)},style:u,...d,"data-component":"nav",children:n})};exports.Nav=q;exports.NavLabel=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index13.css');const l=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),b=require("react"),m=require("../../icons-Dv_p0bUF.cjs"),v="_nav_1h1i0_3",p="_label_1h1i0_9",g="_item_1h1i0_17",f="_actions_1h1i0_36",N="_highlighted_1h1i0_48",x="_horizontal_1h1i0_52",j="_sidebar_1h1i0_62",w="_tabs_1h1i0_101",q="_pills_1h1i0_121",t={nav:v,label:p,item:g,actions:f,highlighted:N,horizontal:x,sidebar:j,tabs:w,pills:q},y={default:t.default,pills:t.pills,sidebar:t.sidebar,tabs:t.tabs},z=({className:a,...e})=>l.jsx("span",{className:c.t(a,t.label),...e,"data-component":"navlabel"}),S=({actions:a,children:e,className:o,highlighted:n=!1,...s})=>l.jsxs("div",{className:c.t(t.item,n&&t.highlighted,o),"data-nav-item":!0,...s,"data-component":"navitem",children:[e,a&&l.jsx("span",{className:t.actions,children:a})]}),C=({animation:a,children:e,className:o,horizontal:n=!1,variant:s="default",...h})=>{const[d,r]=b.useState(!1),_={"--icon-svg":m.iconSVG("CaretDown")};return l.jsx("nav",{className:c.t(o,n&&t.horizontal,t.nav,y[s]),"data-animation":a,"data-open":d?"true":"false","data-orientation":n?"horizontal":"vertical",onBlurCapture:i=>{if(s!=="pills"||window.innerWidth>960)return;const u=i.relatedTarget;i.currentTarget.contains(u)||r(!1)},onClick:()=>{s!=="pills"||window.innerWidth>960||r(i=>!i)},style:_,...h,"data-component":"nav",children:e})};exports.Nav=C;exports.NavItem=S;exports.NavLabel=z;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n sidebar: styles.sidebar,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('CaretDown'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","Nav","animation","children","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":"wYAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,QAASF,EAAOE,QAChBC,KAAMH,EAAOG,IACf,EAYaC,EAAWA,CAAC,CAAEC,UAAAA,EAAW,GAAGC,CAAqB,IAC5DC,MAAC,OAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWL,EAAOS,KAAK,EACrC,GAAIH,EAAM,iBAAA,UAAA,CAAA,EAIDI,EAAMA,CAAC,CAClBC,UAAAA,EACAC,SAAAA,EACAP,UAAAA,EACAQ,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGR,CACK,IAAM,CACd,KAAM,CAACS,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,WAAW,CAAA,EAGnC,OACEZ,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWQ,GAAcb,EAAOa,WAAYb,EAAOoB,IAAKtB,EAASgB,CAAO,CAAC,EACvF,iBAAgBH,EAChB,YAAWI,EAAO,OAAS,QAC3B,mBAAkBF,EAAa,aAAe,WAC9C,cAAgBQ,GAAM,CACpB,GAAIP,IAAY,SAAWQ,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCR,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTF,IAAY,SAAWQ,OAAOC,WAAa,KAE/CP,EAASY,GAAM,CAACA,CAAC,CACnB,EACA,MAAOV,EACP,GAAIZ,EAAM,iBAAA,MAETM,SAAAA,EACH,CAEJ"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n sidebar: styles.sidebar,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport type NavItemProps = React.HTMLAttributes<HTMLDivElement> & {\n actions?: React.ReactNode;\n highlighted?: boolean;\n};\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const NavItem = ({\n actions,\n children,\n className,\n highlighted = false,\n ...props\n}: NavItemProps) => (\n <div\n className={cx(styles.item, highlighted && styles.highlighted, className)}\n data-nav-item\n {...props}\n >\n {children}\n {actions && <span className={styles.actions}>{actions}</span>}\n </div>\n);\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('CaretDown'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","NavItem","actions","children","highlighted","item","Nav","animation","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":"4eAOMA,EAAW,CACfC,QAASC,EAAOD,QAChBE,MAAOD,EAAOC,MACdC,QAASF,EAAOE,QAChBC,KAAMH,EAAOG,IACf,EAiBaC,EAAWA,CAAC,CAAEC,UAAAA,EAAW,GAAGC,CAAqB,IAC5DC,MAAC,OAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWL,EAAOS,KAAK,EACrC,GAAIH,EAAM,iBAAA,UAAA,CAAA,EAIDI,EAAUA,CAAC,CACtBC,QAAAA,EACAC,SAAAA,EACAP,UAAAA,EACAQ,YAAAA,EAAc,GACd,GAAGP,CACS,WACX,MAAA,CACC,UAAWE,EAAAA,EAAGR,EAAOc,KAAMD,GAAeb,EAAOa,YAAaR,CAAS,EACvE,gBAAa,GACb,GAAIC,EAAM,iBAAA,UAETM,SAAAA,CAAAA,EACAD,GAAWJ,EAAAA,IAAC,OAAA,CAAK,UAAWP,EAAOW,QAAUA,SAAAA,CAAAA,CAAQ,CAAA,CAAA,CACxD,EAGWI,EAAMA,CAAC,CAClBC,UAAAA,EACAJ,SAAAA,EACAP,UAAAA,EACAY,WAAAA,EAAa,GACbC,QAAAA,EAAU,UACV,GAAGZ,CACK,IAAM,CACd,KAAM,CAACa,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAKhCC,EAAqB,CACzB,aAAcC,EAAAA,QAAQ,WAAW,CAAA,EAGnC,OACEhB,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,EAAGH,EAAWY,GAAcjB,EAAOiB,WAAYjB,EAAOwB,IAAK1B,EAASoB,CAAO,CAAC,EACvF,iBAAgBF,EAChB,YAAWG,EAAO,OAAS,QAC3B,mBAAkBF,EAAa,aAAe,WAC9C,cAAgBQ,GAAM,CACpB,GAAIP,IAAY,SAAWQ,OAAOC,WAAa,IAAK,OAEpD,MAAMC,EAAOH,EAAEI,cACVJ,EAAEK,cAAcC,SAASH,CAAI,GAChCR,EAAQ,EAAK,CAEjB,EACA,QAAS,IAAM,CACTF,IAAY,SAAWQ,OAAOC,WAAa,KAE/CP,EAASY,GAAM,CAACA,CAAC,CACnB,EACA,MAAOV,EACP,GAAIhB,EAAM,iBAAA,MAETM,SAAAA,EACH,CAEJ"}
@@ -1,43 +1,56 @@
1
- import { jsx as l } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as p } from "react/jsx-runtime";
2
2
  import { t as r } from "../../classix-DG18itHa.js";
3
- import { useState as f } from "react";
4
- import { i as h } from "../../icons-dUP7sKyt.js";
5
- import '../../assets/index12.css';const m = "_nav_1hgi7_3", u = "_label_1hgi7_9", v = "_horizontal_1hgi7_17", g = "_sidebar_1hgi7_27", w = "_tabs_1hgi7_66", z = "_pills_1hgi7_86", a = {
6
- nav: m,
3
+ import { useState as b } from "react";
4
+ import { i as f } from "../../icons-dUP7sKyt.js";
5
+ import '../../assets/index13.css';const v = "_nav_1h1i0_3", u = "_label_1h1i0_9", g = "_item_1h1i0_17", N = "_actions_1h1i0_36", w = "_highlighted_1h1i0_48", x = "_horizontal_1h1i0_52", z = "_sidebar_1h1i0_62", C = "_tabs_1h1i0_101", j = "_pills_1h1i0_121", t = {
6
+ nav: v,
7
7
  label: u,
8
- horizontal: v,
9
- sidebar: g,
10
- tabs: w,
11
- pills: z
12
- }, N = {
13
- default: a.default,
14
- pills: a.pills,
15
- sidebar: a.sidebar,
16
- tabs: a.tabs
17
- }, T = ({
18
- className: n,
19
- ...s
20
- }) => /* @__PURE__ */ l("span", { className: r(n, a.label), ...s, "data-component": "navlabel" }), V = ({
21
- animation: n,
22
- children: s,
23
- className: c,
24
- horizontal: e = !1,
25
- variant: o = "default",
26
- ...p
8
+ item: g,
9
+ actions: N,
10
+ highlighted: w,
11
+ horizontal: x,
12
+ sidebar: z,
13
+ tabs: C,
14
+ pills: j
15
+ }, y = {
16
+ default: t.default,
17
+ pills: t.pills,
18
+ sidebar: t.sidebar,
19
+ tabs: t.tabs
20
+ }, k = ({
21
+ className: a,
22
+ ...i
23
+ }) => /* @__PURE__ */ l("span", { className: r(a, t.label), ...i, "data-component": "navlabel" }), B = ({
24
+ actions: a,
25
+ children: i,
26
+ className: o,
27
+ highlighted: s = !1,
28
+ ...n
29
+ }) => /* @__PURE__ */ p("div", { className: r(t.item, s && t.highlighted, o), "data-nav-item": !0, ...n, "data-component": "navitem", children: [
30
+ i,
31
+ a && /* @__PURE__ */ l("span", { className: t.actions, children: a })
32
+ ] }), D = ({
33
+ animation: a,
34
+ children: i,
35
+ className: o,
36
+ horizontal: s = !1,
37
+ variant: n = "default",
38
+ ...h
27
39
  }) => {
28
- const [d, i] = f(!1), _ = {
29
- "--icon-svg": h("CaretDown")
40
+ const [d, c] = b(!1), _ = {
41
+ "--icon-svg": f("CaretDown")
30
42
  };
31
- return /* @__PURE__ */ l("nav", { className: r(c, e && a.horizontal, a.nav, N[o]), "data-animation": n, "data-open": d ? "true" : "false", "data-orientation": e ? "horizontal" : "vertical", onBlurCapture: (t) => {
32
- if (o !== "pills" || window.innerWidth > 960) return;
33
- const b = t.relatedTarget;
34
- t.currentTarget.contains(b) || i(!1);
43
+ return /* @__PURE__ */ l("nav", { className: r(o, s && t.horizontal, t.nav, y[n]), "data-animation": a, "data-open": d ? "true" : "false", "data-orientation": s ? "horizontal" : "vertical", onBlurCapture: (e) => {
44
+ if (n !== "pills" || window.innerWidth > 960) return;
45
+ const m = e.relatedTarget;
46
+ e.currentTarget.contains(m) || c(!1);
35
47
  }, onClick: () => {
36
- o !== "pills" || window.innerWidth > 960 || i((t) => !t);
37
- }, style: _, ...p, "data-component": "nav", children: s });
48
+ n !== "pills" || window.innerWidth > 960 || c((e) => !e);
49
+ }, style: _, ...h, "data-component": "nav", children: i });
38
50
  };
39
51
  export {
40
- V as Nav,
41
- T as NavLabel
52
+ D as Nav,
53
+ B as NavItem,
54
+ k as NavLabel
42
55
  };
43
56
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n sidebar: styles.sidebar,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('CaretDown'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","Nav","animation","children","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":";;;;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,SAASF,EAAOE;AAAAA,EAChBC,MAAMH,EAAOG;AACf,GAYaC,IAAWA,CAAC;AAAA,EAAEC,WAAAA;AAAAA,EAAW,GAAGC;AAAqB,MAC5D,gBAAAC,EAAC,QAAA,EACC,WAAWC,EAAGH,GAAWL,EAAOS,KAAK,GACrC,GAAIH,GAAM,kBAAA,WAAA,CAAA,GAIDI,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAP,WAAAA;AAAAA,EACAQ,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGR;AACK,MAAM;AACd,QAAM,CAACS,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,WAAW;AAAA,EAAA;AAGnC,SACE,gBAAAZ,EAAC,OAAA,EACC,WAAWC,EAAGH,GAAWQ,KAAcb,EAAOa,YAAYb,EAAOoB,KAAKtB,EAASgB,CAAO,CAAC,GACvF,kBAAgBH,GAChB,aAAWI,IAAO,SAAS,SAC3B,oBAAkBF,IAAa,eAAe,YAC9C,eAAgBQ,CAAAA,MAAM;AACpB,QAAIP,MAAY,WAAWQ,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCR,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIF,MAAY,WAAWQ,OAAOC,aAAa,OAE/CP,EAASY,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,OAAOV,GACP,GAAIZ,GAAM,kBAAA,OAETM,UAAAA,GACH;AAEJ;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/nav/index.tsx"],"sourcesContent":["import cx from 'classix';\nimport { useState } from 'react';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\n\nimport styles from './styles.module.css';\n\nconst variants = {\n default: styles.default,\n pills: styles.pills,\n sidebar: styles.sidebar,\n tabs: styles.tabs,\n};\n\nexport type NavProps = React.HTMLAttributes<HTMLElement> & {\n animation?: string;\n children?: React.ReactNode;\n className?: string;\n horizontal?: boolean;\n variant?: keyof typeof variants;\n};\n\nexport type NavLabelProps = React.HTMLAttributes<HTMLSpanElement>;\n\nexport type NavItemProps = React.HTMLAttributes<HTMLDivElement> & {\n actions?: React.ReactNode;\n highlighted?: boolean;\n};\n\nexport const NavLabel = ({ className, ...props }: NavLabelProps) => (\n <span\n className={cx(className, styles.label)}\n {...props}\n />\n);\n\nexport const NavItem = ({\n actions,\n children,\n className,\n highlighted = false,\n ...props\n}: NavItemProps) => (\n <div\n className={cx(styles.item, highlighted && styles.highlighted, className)}\n data-nav-item\n {...props}\n >\n {children}\n {actions && <span className={styles.actions}>{actions}</span>}\n </div>\n);\n\nexport const Nav = ({\n animation,\n children,\n className,\n horizontal = false,\n variant = 'default',\n ...props\n}: NavProps) => {\n const [open, setOpen] = useState(false);\n\n type withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n };\n const withVars: withVars = {\n '--icon-svg': iconSVG('CaretDown'),\n };\n\n return (\n <nav\n className={cx(className, horizontal && styles.horizontal, styles.nav, variants[variant])}\n data-animation={animation}\n data-open={open ? 'true' : 'false'}\n data-orientation={horizontal ? 'horizontal' : 'vertical'}\n onBlurCapture={(e) => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n const next = e.relatedTarget as Node | null;\n if (!e.currentTarget.contains(next)) {\n setOpen(false);\n }\n }}\n onClick={() => {\n if (variant !== 'pills' || window.innerWidth > 960) return;\n\n setOpen((v) => !v);\n }}\n style={withVars}\n {...props}\n >\n {children}\n </nav>\n );\n};\n"],"names":["variants","default","styles","pills","sidebar","tabs","NavLabel","className","props","jsx","cx","label","NavItem","actions","children","highlighted","item","Nav","animation","horizontal","variant","open","setOpen","useState","withVars","iconSVG","nav","e","window","innerWidth","next","relatedTarget","currentTarget","contains","v"],"mappings":";;;;;;;;;;;;;;GAOMA,IAAW;AAAA,EACfC,SAASC,EAAOD;AAAAA,EAChBE,OAAOD,EAAOC;AAAAA,EACdC,SAASF,EAAOE;AAAAA,EAChBC,MAAMH,EAAOG;AACf,GAiBaC,IAAWA,CAAC;AAAA,EAAEC,WAAAA;AAAAA,EAAW,GAAGC;AAAqB,MAC5D,gBAAAC,EAAC,QAAA,EACC,WAAWC,EAAGH,GAAWL,EAAOS,KAAK,GACrC,GAAIH,GAAM,kBAAA,WAAA,CAAA,GAIDI,IAAUA,CAAC;AAAA,EACtBC,SAAAA;AAAAA,EACAC,UAAAA;AAAAA,EACAP,WAAAA;AAAAA,EACAQ,aAAAA,IAAc;AAAA,EACd,GAAGP;AACS,wBACX,OAAA,EACC,WAAWE,EAAGR,EAAOc,MAAMD,KAAeb,EAAOa,aAAaR,CAAS,GACvE,iBAAa,IACb,GAAIC,GAAM,kBAAA,WAETM,UAAAA;AAAAA,EAAAA;AAAAA,EACAD,KAAW,gBAAAJ,EAAC,QAAA,EAAK,WAAWP,EAAOW,SAAUA,UAAAA,EAAAA,CAAQ;AAAA,EAAA,CACxD,GAGWI,IAAMA,CAAC;AAAA,EAClBC,WAAAA;AAAAA,EACAJ,UAAAA;AAAAA,EACAP,WAAAA;AAAAA,EACAY,YAAAA,IAAa;AAAA,EACbC,SAAAA,IAAU;AAAA,EACV,GAAGZ;AACK,MAAM;AACd,QAAM,CAACa,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAKhCC,IAAqB;AAAA,IACzB,cAAcC,EAAQ,WAAW;AAAA,EAAA;AAGnC,SACE,gBAAAhB,EAAC,OAAA,EACC,WAAWC,EAAGH,GAAWY,KAAcjB,EAAOiB,YAAYjB,EAAOwB,KAAK1B,EAASoB,CAAO,CAAC,GACvF,kBAAgBF,GAChB,aAAWG,IAAO,SAAS,SAC3B,oBAAkBF,IAAa,eAAe,YAC9C,eAAgBQ,CAAAA,MAAM;AACpB,QAAIP,MAAY,WAAWQ,OAAOC,aAAa,IAAK;AAEpD,UAAMC,IAAOH,EAAEI;AACf,IAAKJ,EAAEK,cAAcC,SAASH,CAAI,KAChCR,EAAQ,EAAK;AAAA,EAEjB,GACA,SAAS,MAAM;AACb,IAAIF,MAAY,WAAWQ,OAAOC,aAAa,OAE/CP,EAASY,CAAAA,MAAM,CAACA,CAAC;AAAA,EACnB,GACA,OAAOV,GACP,GAAIhB,GAAM,kBAAA,OAETM,UAAAA,GACH;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const e=require("react/jsx-runtime"),n="_object_xxgm1_1",s={object:n},a=({accessibleLabel:c,url:t,...o})=>e.jsx("object",{"aria-label":c,className:s.object,data:t,type:"application/pdf",...o,"data-component":"objectcomponent",children:t&&e.jsxs(e.Fragment,{children:["We cannot show this file. You can try accessing it directly:",e.jsx("br",{}),e.jsx("a",{href:t,children:t})]})});exports.Object=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const e=require("react/jsx-runtime"),n="_object_xxgm1_1",s={object:n},a=({accessibleLabel:c,url:t,...o})=>e.jsx("object",{"aria-label":c,className:s.object,data:t,type:"application/pdf",...o,"data-component":"objectcomponent",children:t&&e.jsxs(e.Fragment,{children:["We cannot show this file. You can try accessing it directly:",e.jsx("br",{}),e.jsx("a",{href:t,children:t})]})});exports.Object=a;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as n, Fragment as a } from "react/jsx-runtime";
2
- import '../../assets/index11.css';const s = "_object_xxgm1_1", i = {
2
+ import '../../assets/index12.css';const s = "_object_xxgm1_1", i = {
3
3
  object: s
4
4
  }, b = ({
5
5
  accessibleLabel: c,
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index11.css');const n=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),u="_layout_1clzr_1",y="_loading_1clzr_26",a={layout:u,"with-sidebar":"_with-sidebar_1clzr_10","fill-viewport":"_fill-viewport_1clzr_20",loading:y},_=({"aria-busy":o,children:e,className:i,fillViewport:s=!1,loading:t=!1,sidebar:l,...r})=>n.jsxs("main",{"aria-busy":o??(t||void 0),className:c.t(a.layout,!!l&&a["with-sidebar"],s&&a["fill-viewport"],t&&a.loading,i),...r,"data-component":"pagelayout",children:[l,e]});exports.PageLayout=_;
2
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../../../src/components/page-layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {\n fillViewport?: boolean;\n loading?: boolean;\n sidebar?: React.ReactNode;\n};\n\nexport const PageLayout = ({\n 'aria-busy': ariaBusy,\n children,\n className,\n fillViewport = false,\n loading = false,\n sidebar,\n ...props\n}: PageLayoutProps) => (\n <main\n aria-busy={ariaBusy ?? (loading || undefined)}\n className={cx(\n styles.layout,\n Boolean(sidebar) && styles['with-sidebar'],\n fillViewport && styles['fill-viewport'],\n loading && styles.loading,\n className\n )}\n {...props}\n >\n {sidebar}\n {children}\n </main>\n);\n"],"names":["PageLayout","ariaBusy","children","className","fillViewport","loading","sidebar","props","jsxs","undefined","cx","styles","layout","Boolean"],"mappings":"gTAUaA,EAAaA,CAAC,CACzB,YAAaC,EACbC,SAAAA,EACAC,UAAAA,EACAC,aAAAA,EAAe,GACfC,QAAAA,EAAU,GACVC,QAAAA,EACA,GAAGC,CACY,IACfC,EAAAA,KAAC,OAAA,CACC,YAAWP,IAAaI,GAAWI,QACnC,UAAWC,EAAAA,EACTC,EAAOC,OACPC,EAAQP,GAAYK,EAAO,cAAc,EACzCP,GAAgBO,EAAO,eAAe,EACtCN,GAAWM,EAAON,QAClBF,CACF,EACA,GAAII,EAAM,iBAAA,aAETD,SAAAA,CAAAA,EACAJ,CAAAA,CAAAA,CACH"}
@@ -0,0 +1,23 @@
1
+ import { jsxs as n } from "react/jsx-runtime";
2
+ import { t as _ } from "../../classix-DG18itHa.js";
3
+ import '../../assets/index11.css';const c = "_layout_1clzr_1", y = "_loading_1clzr_26", o = {
4
+ layout: c,
5
+ "with-sidebar": "_with-sidebar_1clzr_10",
6
+ "fill-viewport": "_fill-viewport_1clzr_20",
7
+ loading: y
8
+ }, u = ({
9
+ "aria-busy": t,
10
+ children: i,
11
+ className: r,
12
+ fillViewport: s = !1,
13
+ loading: a = !1,
14
+ sidebar: l,
15
+ ...e
16
+ }) => /* @__PURE__ */ n("main", { "aria-busy": t ?? (a || void 0), className: _(o.layout, !!l && o["with-sidebar"], s && o["fill-viewport"], a && o.loading, r), ...e, "data-component": "pagelayout", children: [
17
+ l,
18
+ i
19
+ ] });
20
+ export {
21
+ u as PageLayout
22
+ };
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/page-layout/index.tsx"],"sourcesContent":["import cx from 'classix';\n\nimport styles from './styles.module.css';\n\nexport type PageLayoutProps = React.ComponentPropsWithoutRef<'main'> & {\n fillViewport?: boolean;\n loading?: boolean;\n sidebar?: React.ReactNode;\n};\n\nexport const PageLayout = ({\n 'aria-busy': ariaBusy,\n children,\n className,\n fillViewport = false,\n loading = false,\n sidebar,\n ...props\n}: PageLayoutProps) => (\n <main\n aria-busy={ariaBusy ?? (loading || undefined)}\n className={cx(\n styles.layout,\n Boolean(sidebar) && styles['with-sidebar'],\n fillViewport && styles['fill-viewport'],\n loading && styles.loading,\n className\n )}\n {...props}\n >\n {sidebar}\n {children}\n </main>\n);\n"],"names":["PageLayout","ariaBusy","children","className","fillViewport","loading","sidebar","props","jsxs","undefined","cx","styles","layout","Boolean"],"mappings":";;;;;;;GAUaA,IAAaA,CAAC;AAAA,EACzB,aAAaC;AAAAA,EACbC,UAAAA;AAAAA,EACAC,WAAAA;AAAAA,EACAC,cAAAA,IAAe;AAAA,EACfC,SAAAA,IAAU;AAAA,EACVC,SAAAA;AAAAA,EACA,GAAGC;AACY,MACf,gBAAAC,EAAC,QAAA,EACC,aAAWP,MAAaI,KAAWI,SACnC,WAAWC,EACTC,EAAOC,QACPC,EAAQP,KAAYK,EAAO,cAAc,GACzCP,KAAgBO,EAAO,eAAe,GACtCN,KAAWM,EAAON,SAClBF,CACF,GACA,GAAII,GAAM,kBAAA,cAETD,UAAAA;AAAAA,EAAAA;AAAAA,EACAJ;AAAAA,EAAAA,CACH;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index49.css');const m=require("react/jsx-runtime"),k=require("../../classix-5H4IWnMA.cjs"),o=require("react"),S=require("react-dom"),K=require("../button/index.cjs"),O="_popover_14bo5_1",I="_inline_14bo5_6",N="_below_14bo5_47",H="_above_14bo5_52",W="_left_14bo5_62",M="_right_14bo5_67",U="_trigger_14bo5_72",r={popover:O,inline:I,"popover-panel":"_popover-panel_14bo5_26",below:N,above:H,"inline-panel":"_inline-panel_14bo5_57",left:W,right:M,trigger:U,"inline-trigger":"_inline-trigger_14bo5_76"},X=({children:v,inline:s=!1,triggerAccessibleLabel:C,triggerAriaHasPopup:T,triggerButtonContent:z})=>{var B;const h=o.useRef(null),y=o.useRef(void 0),b=o.useRef(null),P=o.useId(),p=o.useRef(null),[t,R]=o.useState(!1),[f,D]=o.useState(!1),[d,x]=o.useState("right"),_=({initialFocus:e}={})=>{y.current=e,D(!1),x("right"),R(!0)},l=o.useCallback(({restoreFocus:e=!0}={})=>{var i;R(!1),e&&((i=p.current)==null||i.focus())},[]),L=e=>{t&&e.key==="Escape"&&l()},j=e=>{if(!t){if(e.key==="ArrowDown"){e.preventDefault(),_({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),_({initialFocus:"last"}))}};o.useEffect(()=>{if(!t)return;const e=i=>{var n,g;const u=i.target;(n=h.current)!=null&&n.contains(u)||(g=b.current)!=null&&g.contains(u)||l({restoreFocus:!1})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,t]);const a=o.useCallback(()=>{const e=b.current,i=p.current;if(!e||!i)return;const u=e.getBoundingClientRect(),n=i.getBoundingClientRect(),g=n.top,E=window.innerHeight-n.bottom;D(u.height>E&&g>E),x(u.width>window.innerWidth-n.left&&n.right>window.innerWidth-n.left?"left":"right")},[]);o.useLayoutEffect(()=>{if(t)return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[t,a]);const F=e=>{e.preventDefault(),e.stopPropagation(),t?l({restoreFocus:!1}):_()},q={"aria-controls":t?P:void 0,"aria-expanded":t,"aria-haspopup":T,"aria-label":C,className:s?r["inline-trigger"]:r.trigger,onClick:F,onKeyDown:j},c=s?(B=p.current)==null?void 0:B.getBoundingClientRect():void 0,A=[d==="left"?"translateX(-100%)":"",f?"translateY(calc(-100% - var(--shape-spacing-2xs)))":""].filter(Boolean).join(" "),w=t?m.jsx("div",{className:k.t(r["popover-panel"],r[f?"above":"below"],s&&r["inline-panel"],!s&&r[d]),"data-horizontal-placement":d,"data-placement":f?"above":"below",id:P,ref:b,style:c?{left:d==="left"?c.right:c.left,position:"fixed",top:f?c.top:c.bottom,transform:A||void 0}:void 0,children:typeof v=="function"?v({close:l,initialFocus:y.current,isOpen:t}):v}):null;return m.jsxs("div",{className:k.t(r.popover,s&&r.inline),"data-open":t,onKeyDown:L,onClick:e=>{e.preventDefault(),e.stopPropagation()},ref:h,"data-component":"popover",children:[m.jsx(K.Button,{...q,ref:p,variant:"simple",children:z}),s&&w&&typeof document<"u"?S.createPortal(w,document.body):w]})};exports.Popover=X;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index52.css');const m=require("react/jsx-runtime"),k=require("../../classix-5H4IWnMA.cjs"),o=require("react"),S=require("react-dom"),K=require("../button/index.cjs"),O="_popover_14bo5_1",I="_inline_14bo5_6",N="_below_14bo5_47",H="_above_14bo5_52",W="_left_14bo5_62",M="_right_14bo5_67",U="_trigger_14bo5_72",r={popover:O,inline:I,"popover-panel":"_popover-panel_14bo5_26",below:N,above:H,"inline-panel":"_inline-panel_14bo5_57",left:W,right:M,trigger:U,"inline-trigger":"_inline-trigger_14bo5_76"},X=({children:v,inline:s=!1,triggerAccessibleLabel:C,triggerAriaHasPopup:T,triggerButtonContent:z})=>{var B;const h=o.useRef(null),y=o.useRef(void 0),b=o.useRef(null),P=o.useId(),p=o.useRef(null),[t,R]=o.useState(!1),[f,D]=o.useState(!1),[d,x]=o.useState("right"),_=({initialFocus:e}={})=>{y.current=e,D(!1),x("right"),R(!0)},l=o.useCallback(({restoreFocus:e=!0}={})=>{var i;R(!1),e&&((i=p.current)==null||i.focus())},[]),L=e=>{t&&e.key==="Escape"&&l()},j=e=>{if(!t){if(e.key==="ArrowDown"){e.preventDefault(),_({initialFocus:"first"});return}e.key==="ArrowUp"&&(e.preventDefault(),_({initialFocus:"last"}))}};o.useEffect(()=>{if(!t)return;const e=i=>{var n,g;const u=i.target;(n=h.current)!=null&&n.contains(u)||(g=b.current)!=null&&g.contains(u)||l({restoreFocus:!1})};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[l,t]);const a=o.useCallback(()=>{const e=b.current,i=p.current;if(!e||!i)return;const u=e.getBoundingClientRect(),n=i.getBoundingClientRect(),g=n.top,E=window.innerHeight-n.bottom;D(u.height>E&&g>E),x(u.width>window.innerWidth-n.left&&n.right>window.innerWidth-n.left?"left":"right")},[]);o.useLayoutEffect(()=>{if(t)return a(),window.addEventListener("resize",a),window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",a,!0)}},[t,a]);const F=e=>{e.preventDefault(),e.stopPropagation(),t?l({restoreFocus:!1}):_()},q={"aria-controls":t?P:void 0,"aria-expanded":t,"aria-haspopup":T,"aria-label":C,className:s?r["inline-trigger"]:r.trigger,onClick:F,onKeyDown:j},c=s?(B=p.current)==null?void 0:B.getBoundingClientRect():void 0,A=[d==="left"?"translateX(-100%)":"",f?"translateY(calc(-100% - var(--shape-spacing-2xs)))":""].filter(Boolean).join(" "),w=t?m.jsx("div",{className:k.t(r["popover-panel"],r[f?"above":"below"],s&&r["inline-panel"],!s&&r[d]),"data-horizontal-placement":d,"data-placement":f?"above":"below",id:P,ref:b,style:c?{left:d==="left"?c.right:c.left,position:"fixed",top:f?c.top:c.bottom,transform:A||void 0}:void 0,children:typeof v=="function"?v({close:l,initialFocus:y.current,isOpen:t}):v}):null;return m.jsxs("div",{className:k.t(r.popover,s&&r.inline),"data-open":t,onKeyDown:L,onClick:e=>{e.preventDefault(),e.stopPropagation()},ref:h,"data-component":"popover",children:[m.jsx(K.Button,{...q,ref:p,variant:"simple",children:z}),s&&w&&typeof document<"u"?S.createPortal(w,document.body):w]})};exports.Popover=X;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -3,7 +3,7 @@ import { t as C } from "../../classix-DG18itHa.js";
3
3
  import { useRef as g, useId as H, useState as b, useCallback as L, useEffect as W, useLayoutEffect as S } from "react";
4
4
  import { createPortal as U } from "react-dom";
5
5
  import { Button as X } from "../button/index.js";
6
- import '../../assets/index49.css';const Y = "_popover_14bo5_1", q = "_inline_14bo5_6", G = "_below_14bo5_47", J = "_above_14bo5_52", M = "_left_14bo5_62", Q = "_right_14bo5_67", V = "_trigger_14bo5_72", n = {
6
+ import '../../assets/index52.css';const Y = "_popover_14bo5_1", q = "_inline_14bo5_6", G = "_below_14bo5_47", J = "_above_14bo5_52", M = "_left_14bo5_62", Q = "_right_14bo5_67", V = "_trigger_14bo5_72", n = {
7
7
  popover: Y,
8
8
  inline: q,
9
9
  "popover-panel": "_popover-panel_14bo5_26",
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),u=require("../figure/index.cjs"),d=require("../nav/index.cjs"),p="_portal_1uwzy_41",g="_content_1uwzy_264",m="_toggle_1uwzy_271",x="_open_1uwzy_324",n={portal:p,content:g,toggle:m,open:x},j=({children:t,portals:o,open:s,setOpen:r})=>e.jsxs(l.Aside,{className:i.t(n.portal,s&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(c.Button,{className:n.toggle,onClick:()=>r(!s),variant:"tertiary",children:e.jsx(a.Icon,{name:"SidebarSimple"})}),e.jsx(u.Figure,{children:e.jsx(_.Branding,{name:"logo",size:48,variant:"white"})}),e.jsxs("div",{className:n.content,children:[o&&e.jsx(d.Nav,{horizontal:!0,children:o}),t&&t]})]});exports.Portal=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index10.css');const e=require("react/jsx-runtime"),i=require("../../classix-5H4IWnMA.cjs"),c=require("../button/index.cjs"),a=require("../icon/index.cjs"),l=require("../aside/index.cjs"),_=require("../branding/index.cjs"),d=require("../figure/index.cjs"),u=require("../nav/index.cjs"),p="_portal_korl3_41",g="_content_korl3_260",m="_toggle_korl3_267",x="_open_korl3_320",n={portal:p,content:g,toggle:m,open:x},j=({children:o,portals:t,open:r,setOpen:s})=>e.jsxs(l.Aside,{className:i.t(n.portal,r&&n.open),sticky:!0,"data-component":"portal",children:[e.jsx(c.Button,{className:n.toggle,onClick:()=>s(!r),variant:"tertiary",children:e.jsx(a.Icon,{name:"SidebarSimple"})}),e.jsx(d.Figure,{children:e.jsx(_.Branding,{name:"logo",size:48,variant:"white"})}),e.jsxs("div",{className:n.content,children:[t&&e.jsx(u.Nav,{horizontal:!0,children:t}),o&&o]})]});exports.Portal=j;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,23 +1,23 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { t as m } from "../../classix-DG18itHa.js";
3
- import { Button as c } from "../button/index.js";
4
- import { Icon as l } from "../icon/index.js";
2
+ import { t as a } from "../../classix-DG18itHa.js";
3
+ import { Button as m } from "../button/index.js";
4
+ import { Icon as c } from "../icon/index.js";
5
5
  import { Aside as s } from "../aside/index.js";
6
6
  import { Branding as p } from "../branding/index.js";
7
7
  import { Figure as _ } from "../figure/index.js";
8
8
  import { Nav as g } from "../nav/index.js";
9
- import '../../assets/index10.css';const d = "_portal_1uwzy_41", f = "_content_1uwzy_264", u = "_toggle_1uwzy_271", y = "_open_1uwzy_324", t = {
9
+ import '../../assets/index10.css';const d = "_portal_korl3_41", f = "_content_korl3_260", h = "_toggle_korl3_267", k = "_open_korl3_320", t = {
10
10
  portal: d,
11
11
  content: f,
12
- toggle: u,
13
- open: y
14
- }, B = ({
12
+ toggle: h,
13
+ open: k
14
+ }, S = ({
15
15
  children: r,
16
16
  portals: n,
17
17
  open: e,
18
- setOpen: a
19
- }) => /* @__PURE__ */ i(s, { className: m(t.portal, e && t.open), sticky: !0, "data-component": "portal", children: [
20
- /* @__PURE__ */ o(c, { className: t.toggle, onClick: () => a(!e), variant: "tertiary", children: /* @__PURE__ */ o(l, { name: "SidebarSimple" }) }),
18
+ setOpen: l
19
+ }) => /* @__PURE__ */ i(s, { className: a(t.portal, e && t.open), sticky: !0, "data-component": "portal", children: [
20
+ /* @__PURE__ */ o(m, { className: t.toggle, onClick: () => l(!e), variant: "tertiary", children: /* @__PURE__ */ o(c, { name: "SidebarSimple" }) }),
21
21
  /* @__PURE__ */ o(_, { children: /* @__PURE__ */ o(p, { name: "logo", size: 48, variant: "white" }) }),
22
22
  /* @__PURE__ */ i("div", { className: t.content, children: [
23
23
  n && /* @__PURE__ */ o(g, { horizontal: !0, children: n }),
@@ -25,6 +25,6 @@ import '../../assets/index10.css';const d = "_portal_1uwzy_41", f = "_content_1u
25
25
  ] })
26
26
  ] });
27
27
  export {
28
- B as Portal
28
+ S as Portal
29
29
  };
30
30
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-5yOssOic.cjs"),J="_search_1rde5_3",K="_controls_1rde5_15",Q="_chips_1rde5_35",S="_radio_1rde5_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_1rde5_42","filter-groups":"_filter-groups_1rde5_47","filter-group":"_filter-group_1rde5_47","filter-option":"_filter-option_1rde5_83","option-copy":"_option-copy_1rde5_89",radio:S,"collapsible-options":"_collapsible-options_1rde5_128"},U=({filterButtonLabel:x="Filters",filterDialogColumns:k=1,filterDialogTitle:q="Filters",filterGroups:d=[],onChange:M,onSelectedFiltersChange:i,removeFilterLabel:$=c=>`Remove ${c.label} filter`,resetLabel:j="Reset",searchLabel:O="Search",searchPlaceholder:w="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=b.useId(),[v,r]=b.useState(!1),R=b.useMemo(()=>new Map(d.flatMap(e=>{var n;return[...e.options,...((n=e.collapsible)==null?void 0:n.options)??[]]}).map(e=>[e.value,e])),[d]),p=t.flatMap(e=>{const n=R.get(e);return n?[n]:[]}),_=(e,n,s)=>{var f;if(!i)return;const m=new Set([...(s==null?void 0:s.options.map(o=>o.value))??[],...((f=s==null?void 0:s.collapsible)==null?void 0:f.options.map(o=>o.value))??[]]),N=t.filter(o=>!m.has(o));if(n&&(s==null?void 0:s.defaultValue)===e){i(N);return}i(n?(s==null?void 0:s.control)==="radio"||(s==null?void 0:s.selectionMode)==="single"?[...N,e]:[...new Set([...t,e])]:t.filter(o=>o!==e))},u=(e,n)=>{var s;return t.includes(e)||n.defaultValue===e&&![...n.options,...((s=n.collapsible)==null?void 0:s.options)??[]].some(m=>t.includes(m.value))},y=(e,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:u(e.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:s=>_(e.value,s.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]})]}):a.jsx(I.Checkbox,{checked:u(e.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]}),onChange:s=>_(e.value,s.target.checked,n)})},e.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":O,icon:"MagnifyingGlass",onChange:e=>M(e.target.value),placeholder:w,type:"search",value:D}),d.length>0&&a.jsx(h.Button,{"aria-expanded":v,"aria-haspopup":"dialog",badge:p.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),p.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[p.map(e=>a.jsx(T.Chip,{accessibleLabel:$(e),label:e.label,onDelete:()=>_(e.value,!1)},e.value)),a.jsx(h.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:j})]}),v&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(h.Button,{onClick:()=>{i==null||i([]),r(!1)},children:j}),a.jsx(h.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:q})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":k,children:d.map((e,n)=>a.jsxs("section",{"aria-labelledby":e.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":e.columnSpan??1,role:e.control==="radio"?"radiogroup":"group",children:[e.label&&a.jsx("h3",{id:`${c}-${n}`,children:e.label}),e.options.map(s=>y(s,e)),e.collapsible&&a.jsx(H.Collapsible,{summary:e.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:e.collapsible.options.map(s=>y(s,e))})})]},e.label??n))})})]})};exports.Search=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../controls/index.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-CQlMdqOp.cjs"),J="_search_1rde5_3",K="_controls_1rde5_15",Q="_chips_1rde5_35",S="_radio_1rde5_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_1rde5_42","filter-groups":"_filter-groups_1rde5_47","filter-group":"_filter-group_1rde5_47","filter-option":"_filter-option_1rde5_83","option-copy":"_option-copy_1rde5_89",radio:S,"collapsible-options":"_collapsible-options_1rde5_128"},U=({filterButtonLabel:x="Filters",filterDialogColumns:k=1,filterDialogTitle:q="Filters",filterGroups:d=[],onChange:M,onSelectedFiltersChange:i,removeFilterLabel:$=c=>`Remove ${c.label} filter`,resetLabel:j="Reset",searchLabel:O="Search",searchPlaceholder:w="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=b.useId(),[v,r]=b.useState(!1),R=b.useMemo(()=>new Map(d.flatMap(e=>{var n;return[...e.options,...((n=e.collapsible)==null?void 0:n.options)??[]]}).map(e=>[e.value,e])),[d]),p=t.flatMap(e=>{const n=R.get(e);return n?[n]:[]}),_=(e,n,s)=>{var f;if(!i)return;const m=new Set([...(s==null?void 0:s.options.map(o=>o.value))??[],...((f=s==null?void 0:s.collapsible)==null?void 0:f.options.map(o=>o.value))??[]]),N=t.filter(o=>!m.has(o));if(n&&(s==null?void 0:s.defaultValue)===e){i(N);return}i(n?(s==null?void 0:s.control)==="radio"||(s==null?void 0:s.selectionMode)==="single"?[...N,e]:[...new Set([...t,e])]:t.filter(o=>o!==e))},u=(e,n)=>{var s;return t.includes(e)||n.defaultValue===e&&![...n.options,...((s=n.collapsible)==null?void 0:s.options)??[]].some(m=>t.includes(m.value))},y=(e,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:u(e.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:s=>_(e.value,s.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]})]}):a.jsx(I.Checkbox,{checked:u(e.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[e.label,e.description&&a.jsx("sub",{children:e.description})]}),onChange:s=>_(e.value,s.target.checked,n)})},e.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":O,icon:"MagnifyingGlass",onChange:e=>M(e.target.value),placeholder:w,type:"search",value:D}),d.length>0&&a.jsx(h.Button,{"aria-expanded":v,"aria-haspopup":"dialog",badge:p.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),p.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[p.map(e=>a.jsx(T.Chip,{accessibleLabel:$(e),label:e.label,onDelete:()=>_(e.value,!1)},e.value)),a.jsx(h.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:j})]}),v&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(h.Button,{onClick:()=>{i==null||i([]),r(!1)},children:j}),a.jsx(h.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:q})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":k,children:d.map((e,n)=>a.jsxs("section",{"aria-labelledby":e.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":e.columnSpan??1,role:e.control==="radio"?"radiogroup":"group",children:[e.label&&a.jsx("h3",{id:`${c}-${n}`,children:e.label}),e.options.map(s=>y(s,e)),e.collapsible&&a.jsx(H.Collapsible,{summary:e.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:e.collapsible.options.map(s=>y(s,e))})})]},e.label??n))})})]})};exports.Search=U;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -7,7 +7,7 @@ import { Collapsible as E } from "../collapsible/index.js";
7
7
  import { Controls as J } from "../controls/index.js";
8
8
  import { Dialog as K } from "../dialog/index.js";
9
9
  import { Header as P } from "../header/index.js";
10
- import { I as Q } from "../../index-Cv6TtBnd.js";
10
+ import { I as Q } from "../../index-CbJ2-IPc.js";
11
11
  import '../../assets/index9.css';const U = "_search_1rde5_3", V = "_controls_1rde5_15", W = "_chips_1rde5_35", X = "_radio_1rde5_101", o = {
12
12
  search: U,
13
13
  controls: V,
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-Dv_p0bUF.cjs");const e=require("../../index-CXaYq0By.cjs");require("../../use-touched-Bq5Gjbpz.cjs");exports.Select=e.Select;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../classix-5H4IWnMA.cjs");require("../../icons-Dv_p0bUF.cjs");const e=require("../../index-Bt7vnwji.cjs");require("../../use-touched-Bq5Gjbpz.cjs");exports.Select=e.Select;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../classix-DG18itHa.js";
3
3
  import "../../icons-dUP7sKyt.js";
4
- import { S as e } from "../../index-CwIzKfBo.js";
4
+ import { S as e } from "../../index-BLb3JiCr.js";
5
5
  import "../../use-touched-B999bBr8.js";
6
6
  export {
7
7
  e as Select
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index51.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_vp38k_1",n="_editor_vp38k_34",o={toolbar:s,default:"_default_vp38k_28",editor:n},i=({children:t,variant:e="default"})=>a.jsx("div",{className:l.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index54.css');const a=require("react/jsx-runtime"),l=require("../../classix-5H4IWnMA.cjs"),s="_toolbar_vp38k_1",n="_editor_vp38k_34",o={toolbar:s,default:"_default_vp38k_28",editor:n},i=({children:t,variant:e="default"})=>a.jsx("div",{className:l.t(o.toolbar,o[e]),onClick:r=>r.stopPropagation(),"data-component":"toolbar",children:t});exports.Toolbar=i;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { t as e } from "../../classix-DG18itHa.js";
3
- import '../../assets/index51.css';const s = "_toolbar_vp38k_1", n = "_editor_vp38k_34", o = {
3
+ import '../../assets/index54.css';const s = "_toolbar_vp38k_1", n = "_editor_vp38k_34", o = {
4
4
  toolbar: s,
5
5
  default: "_default_vp38k_28",
6
6
  editor: n
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index14.css');const s=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_r8l1k_1"},r={default:t.default,static:t.static},l=({variant:o="default",children:i,iconName:e,...n})=>s.jsxs("div",{className:c.t(t.tooltip,r[o]),...n,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{gap:"right",name:e}),i]});exports.Tooltip=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index15.css');const s=require("react/jsx-runtime"),c=require("../../classix-5H4IWnMA.cjs"),a=require("../icon/index.cjs"),t={static:"_static_r8l1k_1"},r={default:t.default,static:t.static},l=({variant:o="default",children:i,iconName:e,...n})=>s.jsxs("div",{className:c.t(t.tooltip,r[o]),...n,"data-component":"tooltip",children:[e&&s.jsx(a.Icon,{gap:"right",name:e}),i]});exports.Tooltip=l;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
2
  import { t as l } from "../../classix-DG18itHa.js";
3
3
  import { Icon as e } from "../icon/index.js";
4
- import '../../assets/index14.css';const t = {
4
+ import '../../assets/index15.css';const t = {
5
5
  static: "_static_r8l1k_1"
6
6
  }, n = {
7
7
  default: t.default,
@@ -2,7 +2,7 @@ import { jsxs as m, jsx as p } from "react/jsx-runtime";
2
2
  import { t as v } from "./classix-DG18itHa.js";
3
3
  import { i as w } from "./icons-dUP7sKyt.js";
4
4
  import { u as C, c as S } from "./use-touched-B999bBr8.js";
5
- import './assets/index50.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
5
+ import './assets/index53.css';const P = /* @__PURE__ */ new Set(["aria-activedescendant", "aria-autocomplete", "aria-busy", "aria-controls", "aria-describedby", "aria-details", "aria-disabled", "aria-errormessage", "aria-expanded", "aria-haspopup", "aria-hidden", "aria-invalid", "aria-keyshortcuts", "aria-label", "aria-labelledby", "aria-live", "aria-owns", "aria-required", "aria-roledescription", "autoComplete", "autoFocus", "className", "defaultValue", "dir", "disabled", "form", "id", "multiple", "name", "onBlur", "onChange", "onClick", "onFocus", "onInput", "onInvalid", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseUp", "onPointerDown", "onPointerUp", "required", "role", "size", "style", "tabIndex", "title", "value"]);
6
6
  function _(n) {
7
7
  return Object.fromEntries(Object.entries(n).filter(([e]) => e.startsWith("data-") || e.startsWith("aria-") || P.has(e)));
8
8
  }
@@ -71,4 +71,4 @@ export {
71
71
  N as r,
72
72
  _ as s
73
73
  };
74
- //# sourceMappingURL=index-CwIzKfBo.js.map
74
+ //# sourceMappingURL=index-BLb3JiCr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-CwIzKfBo.js","sources":["../src/components/select/sanitize-select-props.ts","../src/utils/color.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","const cssVariablePattern = /^--[\\w-]+$/;\nconst cssVariableReferencePattern = /^var\\(\\s*(--[\\w-]+)\\s*(?:,\\s*(.+))?\\)$/;\n\nconst unresolvedColorKeywords = new Set([\n 'currentcolor',\n 'inherit',\n 'initial',\n 'revert',\n 'revert-layer',\n 'unset',\n]);\n\nconst probe = typeof document !== 'undefined' ? document.createElement('span') : null;\n\nfunction normalizeColorValue(input: string): string {\n const value = input.trim();\n\n if (!value || !probe || unresolvedColorKeywords.has(value.toLowerCase())) {\n return value;\n }\n\n const mountNode = document.body ?? document.documentElement;\n\n if (!mountNode) {\n return value;\n }\n\n probe.style.color = value;\n\n if (!probe.style.color) {\n return value;\n }\n\n mountNode.appendChild(probe);\n\n const normalized = getComputedStyle(probe).color.trim();\n probe.remove();\n\n return normalized || value;\n}\n\nexport function resolveColor(input: `--${string}` | string, fallback = 'currentColor'): string {\n if (typeof document === 'undefined') {\n return fallback;\n }\n\n const styles = getComputedStyle(document.documentElement);\n const seen = new Set<string>();\n let current = input.trim();\n\n while (current) {\n const match = current.match(cssVariableReferencePattern);\n const variableName = match?.[1] ?? (cssVariablePattern.test(current) ? current : null);\n const nestedFallback = match?.[2]?.trim();\n\n if (!variableName) {\n return normalizeColorValue(current);\n }\n\n if (seen.has(variableName)) {\n current = nestedFallback ?? '';\n continue;\n }\n\n seen.add(variableName);\n\n current = styles.getPropertyValue(variableName).trim() || nestedFallback || '';\n }\n\n return normalizeColorValue(fallback);\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor } from '@/utils/color';\nimport { composeEventHandlers } from '@/utils/compose-event-handlers';\nimport { useTouched } from '@/utils/use-touched';\n\nimport { sanitizeSelectProps } from './sanitize-select-props';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { className, onBlur: onBlurProp, style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('CaretDown', resolveColor('--colors-semantic-content-secondary')),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, className, touched && styles.touched)}\n onBlur={composeEventHandlers(onBlur, onBlurProp)}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span\n className={styles.label}\n data-required={props.required || undefined}\n >\n {label}\n </span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","cssVariablePattern","cssVariableReferencePattern","unresolvedColorKeywords","probe","document","createElement","normalizeColorValue","input","value","trim","toLowerCase","mountNode","body","documentElement","style","color","appendChild","normalized","getComputedStyle","remove","resolveColor","fallback","styles","seen","current","match","variableName","test","nestedFallback","add","getPropertyValue","Select","children","label","placeholder","touched","onBlur","useTouched","selectProps","className","onBlurProp","restSelectProps","withVars","iconSVG","selectElement","cx","select","composeEventHandlers","jsxs","jsx","required","undefined"],"mappings":"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"}
1
+ {"version":3,"file":"index-BLb3JiCr.js","sources":["../src/components/select/sanitize-select-props.ts","../src/utils/color.ts","../src/components/select/index.tsx"],"sourcesContent":["const selectKeys = new Set([\n 'aria-activedescendant',\n 'aria-autocomplete',\n 'aria-busy',\n 'aria-controls',\n 'aria-describedby',\n 'aria-details',\n 'aria-disabled',\n 'aria-errormessage',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-invalid',\n 'aria-keyshortcuts',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-owns',\n 'aria-required',\n 'aria-roledescription',\n 'autoComplete',\n 'autoFocus',\n 'className',\n 'defaultValue',\n 'dir',\n 'disabled',\n 'form',\n 'id',\n 'multiple',\n 'name',\n 'onBlur',\n 'onChange',\n 'onClick',\n 'onFocus',\n 'onInput',\n 'onInvalid',\n 'onKeyDown',\n 'onKeyUp',\n 'onMouseDown',\n 'onMouseUp',\n 'onPointerDown',\n 'onPointerUp',\n 'required',\n 'role',\n 'size',\n 'style',\n 'tabIndex',\n 'title',\n 'value',\n]);\n\nexport function sanitizeSelectProps<T extends Record<string, unknown>>(props: T) {\n return Object.fromEntries(\n Object.entries(props).filter(\n ([key]) => key.startsWith('data-') || key.startsWith('aria-') || selectKeys.has(key)\n )\n ) as Partial<T>;\n}\n","const cssVariablePattern = /^--[\\w-]+$/;\nconst cssVariableReferencePattern = /^var\\(\\s*(--[\\w-]+)\\s*(?:,\\s*(.+))?\\)$/;\n\nconst unresolvedColorKeywords = new Set([\n 'currentcolor',\n 'inherit',\n 'initial',\n 'revert',\n 'revert-layer',\n 'unset',\n]);\n\nconst probe = typeof document !== 'undefined' ? document.createElement('span') : null;\n\nfunction normalizeColorValue(input: string): string {\n const value = input.trim();\n\n if (!value || !probe || unresolvedColorKeywords.has(value.toLowerCase())) {\n return value;\n }\n\n const mountNode = document.body ?? document.documentElement;\n\n if (!mountNode) {\n return value;\n }\n\n probe.style.color = value;\n\n if (!probe.style.color) {\n return value;\n }\n\n mountNode.appendChild(probe);\n\n const normalized = getComputedStyle(probe).color.trim();\n probe.remove();\n\n return normalized || value;\n}\n\nexport function resolveColor(input: `--${string}` | string, fallback = 'currentColor'): string {\n if (typeof document === 'undefined') {\n return fallback;\n }\n\n const styles = getComputedStyle(document.documentElement);\n const seen = new Set<string>();\n let current = input.trim();\n\n while (current) {\n const match = current.match(cssVariableReferencePattern);\n const variableName = match?.[1] ?? (cssVariablePattern.test(current) ? current : null);\n const nestedFallback = match?.[2]?.trim();\n\n if (!variableName) {\n return normalizeColorValue(current);\n }\n\n if (seen.has(variableName)) {\n current = nestedFallback ?? '';\n continue;\n }\n\n seen.add(variableName);\n\n current = styles.getPropertyValue(variableName).trim() || nestedFallback || '';\n }\n\n return normalizeColorValue(fallback);\n}\n","import cx from 'classix';\n\nimport { iconSVG } from '@/components/icon/icons.ts';\nimport { resolveColor } from '@/utils/color';\nimport { composeEventHandlers } from '@/utils/compose-event-handlers';\nimport { useTouched } from '@/utils/use-touched';\n\nimport { sanitizeSelectProps } from './sanitize-select-props';\nimport styles from './styles.module.css';\n\nexport type SelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {\n children: React.ReactNode;\n label?: string;\n placeholder?: string;\n};\n\ntype withVars = React.CSSProperties & {\n '--icon-svg'?: string;\n};\n\nexport const Select = ({ children, label, placeholder, ...props }: SelectProps) => {\n const { touched, onBlur } = useTouched(props.value === '');\n const selectProps = sanitizeSelectProps(props);\n const { className, onBlur: onBlurProp, style, ...restSelectProps } = selectProps;\n const withVars = {\n ...style,\n '--icon-svg': iconSVG('CaretDown', resolveColor('--colors-semantic-content-secondary')),\n } satisfies withVars;\n\n const selectElement = (\n <select\n className={cx(styles.select, className, touched && styles.touched)}\n onBlur={composeEventHandlers(onBlur, onBlurProp)}\n style={withVars}\n {...restSelectProps}\n >\n {placeholder && (\n <option\n key='placeholder'\n value={''}\n hidden\n >\n {placeholder}\n </option>\n )}\n {children}\n </select>\n );\n\n if (!label) {\n return selectElement;\n }\n\n return (\n <label>\n <span\n className={styles.label}\n data-required={props.required || undefined}\n >\n {label}\n </span>\n {selectElement}\n </label>\n );\n};\n"],"names":["selectKeys","Set","sanitizeSelectProps","props","Object","fromEntries","entries","filter","key","startsWith","has","cssVariablePattern","cssVariableReferencePattern","unresolvedColorKeywords","probe","document","createElement","normalizeColorValue","input","value","trim","toLowerCase","mountNode","body","documentElement","style","color","appendChild","normalized","getComputedStyle","remove","resolveColor","fallback","styles","seen","current","match","variableName","test","nestedFallback","add","getPropertyValue","Select","children","label","placeholder","touched","onBlur","useTouched","selectProps","className","onBlurProp","restSelectProps","withVars","iconSVG","selectElement","cx","select","composeEventHandlers","jsxs","jsx","required","undefined"],"mappings":"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"}
@@ -1,2 +1,2 @@
1
- "use strict";require('./assets/index50.css');const u=require("react/jsx-runtime"),C=require("./classix-5H4IWnMA.cjs"),S=require("./icons-Dv_p0bUF.cjs"),p=require("./use-touched-Bq5Gjbpz.cjs"),P=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function h(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||P.has(e)))}const _=/^--[\w-]+$/,q=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,x=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),l=typeof document<"u"?document.createElement("span"):null;function b(r){const e=r.trim();if(!e||!l||x.has(e.toLowerCase()))return e;const s=document.body??document.documentElement;if(!s||(l.style.color=e,!l.style.color))return e;s.appendChild(l);const n=getComputedStyle(l).color.trim();return l.remove(),n||e}function y(r,e="currentColor"){var i;if(typeof document>"u")return e;const s=getComputedStyle(document.documentElement),n=new Set;let t=r.trim();for(;t;){const o=t.match(q),a=(o==null?void 0:o[1])??(_.test(t)?t:null),c=(i=o==null?void 0:o[2])==null?void 0:i.trim();if(!a)return b(t);if(n.has(a)){t=c??"";continue}n.add(a),t=s.getPropertyValue(a).trim()||c||""}return b(e)}const j="_select_1bm47_3",V="_touched_1bm47_24",g="_label_1bm47_29",d={select:j,touched:V,label:g},E=({children:r,label:e,placeholder:s,...n})=>{const{touched:t,onBlur:i}=p.useTouched(n.value===""),o=h(n),{className:a,onBlur:c,style:v,...f}=o,w={...v,"--icon-svg":S.iconSVG("CaretDown",y("--colors-semantic-content-secondary"))},m=u.jsxs("select",{className:C.t(d.select,a,t&&d.touched),onBlur:p.composeEventHandlers(i,c),style:w,...f,children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),r]});return e?u.jsxs("label",{"data-component":"select",children:[u.jsx("span",{className:d.label,"data-required":n.required||void 0,children:e}),m]}):m};exports.Select=E;exports.resolveColor=y;exports.sanitizeSelectProps=h;
2
- //# sourceMappingURL=index-CXaYq0By.cjs.map
1
+ "use strict";require('./assets/index53.css');const u=require("react/jsx-runtime"),C=require("./classix-5H4IWnMA.cjs"),S=require("./icons-Dv_p0bUF.cjs"),p=require("./use-touched-Bq5Gjbpz.cjs"),P=new Set(["aria-activedescendant","aria-autocomplete","aria-busy","aria-controls","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-live","aria-owns","aria-required","aria-roledescription","autoComplete","autoFocus","className","defaultValue","dir","disabled","form","id","multiple","name","onBlur","onChange","onClick","onFocus","onInput","onInvalid","onKeyDown","onKeyUp","onMouseDown","onMouseUp","onPointerDown","onPointerUp","required","role","size","style","tabIndex","title","value"]);function h(r){return Object.fromEntries(Object.entries(r).filter(([e])=>e.startsWith("data-")||e.startsWith("aria-")||P.has(e)))}const _=/^--[\w-]+$/,q=/^var\(\s*(--[\w-]+)\s*(?:,\s*(.+))?\)$/,x=new Set(["currentcolor","inherit","initial","revert","revert-layer","unset"]),l=typeof document<"u"?document.createElement("span"):null;function b(r){const e=r.trim();if(!e||!l||x.has(e.toLowerCase()))return e;const s=document.body??document.documentElement;if(!s||(l.style.color=e,!l.style.color))return e;s.appendChild(l);const n=getComputedStyle(l).color.trim();return l.remove(),n||e}function y(r,e="currentColor"){var i;if(typeof document>"u")return e;const s=getComputedStyle(document.documentElement),n=new Set;let t=r.trim();for(;t;){const o=t.match(q),a=(o==null?void 0:o[1])??(_.test(t)?t:null),c=(i=o==null?void 0:o[2])==null?void 0:i.trim();if(!a)return b(t);if(n.has(a)){t=c??"";continue}n.add(a),t=s.getPropertyValue(a).trim()||c||""}return b(e)}const j="_select_1bm47_3",V="_touched_1bm47_24",g="_label_1bm47_29",d={select:j,touched:V,label:g},E=({children:r,label:e,placeholder:s,...n})=>{const{touched:t,onBlur:i}=p.useTouched(n.value===""),o=h(n),{className:a,onBlur:c,style:v,...f}=o,w={...v,"--icon-svg":S.iconSVG("CaretDown",y("--colors-semantic-content-secondary"))},m=u.jsxs("select",{className:C.t(d.select,a,t&&d.touched),onBlur:p.composeEventHandlers(i,c),style:w,...f,children:[s&&u.jsx("option",{value:"",hidden:!0,children:s},"placeholder"),r]});return e?u.jsxs("label",{"data-component":"select",children:[u.jsx("span",{className:d.label,"data-required":n.required||void 0,children:e}),m]}):m};exports.Select=E;exports.resolveColor=y;exports.sanitizeSelectProps=h;
2
+ //# sourceMappingURL=index-Bt7vnwji.cjs.map