@solibo/solibo-ui 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/assets/index12.css +1 -1
  2. package/dist/assets/index15.css +1 -1
  3. package/dist/assets/index17.css +1 -1
  4. package/dist/assets/index20.css +1 -1
  5. package/dist/assets/index28.css +1 -1
  6. package/dist/assets/index34.css +1 -1
  7. package/dist/assets/index36.css +1 -1
  8. package/dist/assets/index39.css +1 -1
  9. package/dist/assets/index4.css +1 -1
  10. package/dist/assets/index41.css +1 -1
  11. package/dist/assets/index47.css +1 -1
  12. package/dist/assets/index9.css +1 -1
  13. package/dist/components/badge/index.cjs +1 -1
  14. package/dist/components/badge/index.js +37 -37
  15. package/dist/components/checkbox/index.cjs +1 -1
  16. package/dist/components/checkbox/index.cjs.map +1 -1
  17. package/dist/components/checkbox/index.js +1 -1
  18. package/dist/components/checkbox/index.js.map +1 -1
  19. package/dist/components/chip/index.cjs +1 -1
  20. package/dist/components/chip/index.cjs.map +1 -1
  21. package/dist/components/chip/index.js +21 -14
  22. package/dist/components/chip/index.js.map +1 -1
  23. package/dist/components/controls/index.cjs +1 -1
  24. package/dist/components/controls/index.cjs.map +1 -1
  25. package/dist/components/controls/index.js +20 -20
  26. package/dist/components/controls/index.js.map +1 -1
  27. package/dist/components/dropdown/index.cjs +1 -1
  28. package/dist/components/dropdown/index.js +65 -65
  29. package/dist/components/editor/index.cjs +16 -16
  30. package/dist/components/editor/index.js +4 -4
  31. package/dist/components/header/index.cjs +1 -1
  32. package/dist/components/header/index.js +9 -9
  33. package/dist/components/icon/index.cjs +1 -1
  34. package/dist/components/icon/index.js +1 -1
  35. package/dist/components/input/index.cjs +1 -1
  36. package/dist/components/input/index.js +2 -2
  37. package/dist/components/menu/index.cjs +1 -1
  38. package/dist/components/menu/index.cjs.map +1 -1
  39. package/dist/components/menu/index.js +70 -58
  40. package/dist/components/menu/index.js.map +1 -1
  41. package/dist/components/message/index.cjs +1 -1
  42. package/dist/components/message/index.js +21 -21
  43. package/dist/components/nav/index.cjs +1 -1
  44. package/dist/components/nav/index.js +19 -19
  45. package/dist/components/popover/index.cjs +1 -1
  46. package/dist/components/popover/index.cjs.map +1 -1
  47. package/dist/components/popover/index.js +79 -80
  48. package/dist/components/popover/index.js.map +1 -1
  49. package/dist/components/search/index.cjs +1 -1
  50. package/dist/components/search/index.cjs.map +1 -1
  51. package/dist/components/search/index.js +75 -45
  52. package/dist/components/search/index.js.map +1 -1
  53. package/dist/components/select/index.cjs +1 -1
  54. package/dist/components/select/index.js +2 -2
  55. package/dist/components/toasts/index.cjs +1 -1
  56. package/dist/components/toasts/index.js +4 -4
  57. package/dist/{icons-BFgf_lJN.js → icons-Bq3diTRm.js} +11 -2
  58. package/dist/icons-Bq3diTRm.js.map +1 -0
  59. package/dist/icons-ovA21Oao.cjs +2 -0
  60. package/dist/icons-ovA21Oao.cjs.map +1 -0
  61. package/dist/index-BcY9DZZ8.cjs +2 -0
  62. package/dist/{index-CEzqxRIu.cjs.map → index-BcY9DZZ8.cjs.map} +1 -1
  63. package/dist/{index-BPIK2dxs.cjs → index-CjI8oRpS.cjs} +2 -2
  64. package/dist/{index-BPIK2dxs.cjs.map → index-CjI8oRpS.cjs.map} +1 -1
  65. package/dist/index-ClZkChEh.js +73 -0
  66. package/dist/{index-BHgGZxsR.js.map → index-ClZkChEh.js.map} +1 -1
  67. package/dist/{index-C_YiNpZP.js → index-DwzLUapm.js} +2 -2
  68. package/dist/{index-C_YiNpZP.js.map → index-DwzLUapm.js.map} +1 -1
  69. package/dist/index.cjs +1 -1
  70. package/dist/index.d.ts +46 -16
  71. package/dist/index.js +2 -2
  72. package/dist/tokens.json +1 -1
  73. package/package.json +1 -1
  74. package/dist/icons-BFgf_lJN.js.map +0 -1
  75. package/dist/icons-Dx0NQYLH.cjs +0 -2
  76. package/dist/icons-Dx0NQYLH.cjs.map +0 -1
  77. package/dist/index-BHgGZxsR.js +0 -73
  78. package/dist/index-CEzqxRIu.cjs +0 -2
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const s=require("react/jsx-runtime"),N=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),ce=require("../../icons-Dx0NQYLH.cjs"),X=require("../../index-CEzqxRIu.cjs"),ue=require("../list/index.cjs"),V=require("../../index-BPIK2dxs.cjs");function L(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(L).join(" "):a.isValidElement(t)?L(t.props.children):""}function de(t){return a.isValidElement(t)&&t.type==="option"}function pe(t){return a.isValidElement(t)&&t.type==="optgroup"}function fe(t){return a.isValidElement(t)&&t.type===a.Fragment}function me(t){return a.isValidElement(t)&&t.type===V.Select}function W(t,i,r=!1){const l=[];return a.Children.forEach(t,n=>{if(fe(n))l.push(...W(n.props.children,i,r));else if(de(n)){const c=L(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;l.push({disabled:r||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else pe(n)&&l.push(...W(n.props.children,n.props.label,r||!!n.props.disabled))}),l}function _e(t){const i=t.trim();if(!i)return null;const l=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${l}$`,"i")}function he(t,i){const r=_e(i),l=t.filter(n=>!n.hidden&&!n.isPlaceholder);return r?l.filter(n=>r.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):l}function ye(t,i){return t.find(r=>r.value===i)??t.find(r=>r.isPlaceholder)??t[0]}function xe(t,i,r){var l,n;return i!=null?String(i):r!=null?String(r):((l=t.find(c=>c.selected))==null?void 0:l.value)??((n=t[0])==null?void 0:n.value)??""}function be(t){if(me(t)){const{children:i,placeholder:r,...l}=t.props;return{children:s.jsxs(s.Fragment,{children:[r&&s.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:l}}return{children:t.props.children,props:t.props}}const ge="_combobox_18jwy_3",je="_dropdown_18jwy_27",we="_empty_18jwy_30",ve="_group_18jwy_31",Se="_placeholder_18jwy_32",Ce="_filter_18jwy_40",Ee="_native_18jwy_52",Ne="_option_18jwy_62",Ve="_options_18jwy_84",Le="_panel_18jwy_108",Re="_selected_18jwy_132",$e="_text_18jwy_136",Be="_trigger_18jwy_145",Ie="_minimal_18jwy_181",qe="_inline_18jwy_236",De="_label_18jwy_268",o={combobox:ge,"combobox-input":"_combobox-input_18jwy_12",dropdown:je,empty:we,group:ve,placeholder:Se,filter:Ce,native:Ee,option:Ne,options:Ve,panel:Le,selected:Re,text:$e,trigger:Be,minimal:Ie,inline:qe,label:De,"inline-field":"_inline-field_18jwy_274"};function Y(t,i){return{"--icon-svg":ce.iconSVG(t).replace("currentColor",i)}}const Pe=({children:t,className:i,combobox:r=!1,createOption:l,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:y="default",...ee})=>{const $=be(t),{defaultValue:te,onChange:B,value:I,...ne}=$.props,g=V.sanitizeSelectProps(ne),M=a.useRef(null),Q=a.useRef(null),j=a.useId(),z=a.useRef(null),m=a.useRef(null),x=W($.children),b=I!=null,q=xe(x,I,te),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[w,v]=a.useState(""),S=b?String(I):D,O={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},T=y==="minimal"?O.white:O.default,C=ye(x,S),re=Y("chevron",T),le=Y("search",T),A=he(x,w),_=w.trim(),E=!!(r&&l&&_&&l.isValid(_)),se=c&&y==="inline"?X.formatInlineLabel(c):c,G=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===S,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){v("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=Q.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const oe=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),r||(e=M.current)==null||e.focus()},K=()=>{var e;v(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!l||!E||(l.onCreate(_),K())},ie=e=>{var U;b||P(e);const d=z.current;if(!d){k();return}const h=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;h==null||h.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),r?K():k()},ae=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=s.jsxs("div",{className:N.t(o.dropdown,y==="inline"&&o.inline,y==="minimal"&&o.minimal,i),onKeyDown:ae,ref:Q,...ee,children:[s.jsx("select",{...g,"aria-hidden":"true",className:o.native,onChange:oe,ref:z,tabIndex:-1,value:S,children:$.children}),r?s.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,s.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":g["aria-label"]??c??R,className:o["combobox-input"],disabled:g.disabled,onChange:e=>{v(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:w})]}):s.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${j} ${j}-value`:void 0,className:N.t(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:g.disabled,onClick:()=>p(e=>!e),ref:M,style:re,variant:"tertiary",children:s.jsx("span",{className:o.text,id:`${j}-value`,children:G(C)})}),u&&s.jsxs("div",{className:o.panel,children:[!r&&s.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"search",onChange:e=>v(e.target.value),placeholder:R,ref:m,style:le,type:"search",value:w}),s.jsxs(ue.List,{"aria-label":"Dropdown",className:o.options,children:[A.map(e=>{const d=e.value===S;return s.jsx("li",{"data-component":"dropdown",children:s.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:N.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ie(e.value),variant:"tertiary",children:[s.jsx("span",{className:o.text,children:G(e)}),e.groupLabel&&s.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&l&&s.jsx("li",{children:s.jsx(F.Button,{"aria-label":L(l.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:s.jsx("span",{className:o.text,children:l.render(_)})})}),A.length===0&&!E&&s.jsx("li",{className:o.empty,children:n})]})]})]});return c?s.jsxs("div",{className:N.t(o.label,y==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[s.jsx("span",{id:j,children:se}),J]}):J};exports.Dropdown=Pe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index39.css');const s=require("react/jsx-runtime"),E=require("../../classix-5H4IWnMA.cjs"),a=require("react"),F=require("../button/index.cjs"),ce=require("../../icons-ovA21Oao.cjs"),X=require("../../index-BcY9DZZ8.cjs"),ue=require("../list/index.cjs"),N=require("../../index-CjI8oRpS.cjs");function V(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(V).join(" "):a.isValidElement(t)?V(t.props.children):""}function de(t){return a.isValidElement(t)&&t.type==="option"}function pe(t){return a.isValidElement(t)&&t.type==="optgroup"}function fe(t){return a.isValidElement(t)&&t.type===a.Fragment}function me(t){return a.isValidElement(t)&&t.type===N.Select}function W(t,i,r=!1){const l=[];return a.Children.forEach(t,n=>{if(fe(n))l.push(...W(n.props.children,i,r));else if(de(n)){const c=V(n.props.children).trim(),f=n.props.value!=null?String(n.props.value):c;l.push({disabled:r||!!n.props.disabled,groupLabel:i,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&f===""),label:n.props.children,selected:!!n.props.selected,text:c,value:f})}else pe(n)&&l.push(...W(n.props.children,n.props.label,r||!!n.props.disabled))}),l}function be(t){const i=t.trim();if(!i)return null;const l=[.../[*?]/.test(i)?i:`*${i}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${l}$`,"i")}function _e(t,i){const r=be(i),l=t.filter(n=>!n.hidden&&!n.isPlaceholder);return r?l.filter(n=>r.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):l}function he(t,i){return t.find(r=>r.value===i)??t.find(r=>r.isPlaceholder)??t[0]}function ye(t,i,r){var l,n;return i!=null?String(i):r!=null?String(r):((l=t.find(c=>c.selected))==null?void 0:l.value)??((n=t[0])==null?void 0:n.value)??""}function xe(t){if(me(t)){const{children:i,placeholder:r,...l}=t.props;return{children:s.jsxs(s.Fragment,{children:[r&&s.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:l}}return{children:t.props.children,props:t.props}}const ge="_combobox_1bqyf_3",ve="_dropdown_1bqyf_27",je="_empty_1bqyf_30",qe="_group_1bqyf_31",we="_placeholder_1bqyf_32",Se="_filter_1bqyf_40",Ce="_native_1bqyf_52",Ee="_option_1bqyf_62",Ne="_options_1bqyf_84",Ve="_panel_1bqyf_108",Le="_selected_1bqyf_132",Re="_text_1bqyf_136",$e="_trigger_1bqyf_144",Be="_minimal_1bqyf_180",Ie="_inline_1bqyf_235",De="_label_1bqyf_267",o={combobox:ge,"combobox-input":"_combobox-input_1bqyf_12",dropdown:ve,empty:je,group:qe,placeholder:we,filter:Se,native:Ce,option:Ee,options:Ne,panel:Ve,selected:Le,text:Re,trigger:$e,minimal:Be,inline:Ie,label:De,"inline-field":"_inline-field_1bqyf_273"};function Y(t,i){return{"--icon-svg":ce.iconSVG(t).replace("currentColor",i)}}const Pe=({children:t,className:i,combobox:r=!1,createOption:l,emptyLabel:n="No matches found",label:c,renderOption:f,searchPlaceholder:L="Filter",selectedItems:Z,variant:h="default",...ee})=>{const R=xe(t),{defaultValue:te,onChange:$,value:B,...ne}=R.props,g=N.sanitizeSelectProps(ne),M=a.useRef(null),Q=a.useRef(null),v=a.useId(),z=a.useRef(null),m=a.useRef(null),y=W(R.children),x=B!=null,I=ye(y,B,te),[D,P]=a.useState(()=>I),[u,p]=a.useState(!1),[j,q]=a.useState(""),w=x?String(B):D,O={default:N.resolveColor("--colors-semantic-content-secondary"),white:N.resolveColor("--color-white","white")},T=h==="minimal"?O.white:O.default,S=he(y,w),re=Y("chevron",T),le=Y("search",T),A=_e(y,j),b=j.trim(),C=!!(r&&l&&b&&l.isValid(b)),se=c&&h==="inline"?X.formatInlineLabel(c):c,G=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===w,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!x&&!y.some(e=>e.value===D)&&P(I)},[I,D,x,y]),a.useEffect(()=>{var e;if(!u){q("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var _;(_=Q.current)!=null&&_.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const oe=e=>{x||P(e.target.value),$==null||$(e)},k=()=>{var e;p(!1),r||(e=M.current)==null||e.focus()},K=()=>{var e;q(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!l||!C||(l.onCreate(b),K())},ie=e=>{var U;x||P(e);const d=z.current;if(!d){k();return}const _=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;_==null||_.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),r?K():k()},ae=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&C&&(e.preventDefault(),H())},J=s.jsxs("div",{className:E.t(o.dropdown,h==="inline"&&o.inline,h==="minimal"&&o.minimal,i),onKeyDown:ae,ref:Q,...ee,children:[s.jsx("select",{...g,"aria-hidden":"true",className:o.native,onChange:oe,ref:z,tabIndex:-1,value:w,children:R.children}),r?s.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,s.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":g["aria-label"]??c??L,className:o["combobox-input"],disabled:g.disabled,onChange:e=>{q(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:L||void 0,ref:m,role:"combobox",type:"text",value:j})]}):s.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${v} ${v}-value`:void 0,className:E.t(o.trigger,(S==null?void 0:S.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:g.disabled,onClick:()=>p(e=>!e),ref:M,style:re,variant:"tertiary",children:s.jsx("span",{className:o.text,id:`${v}-value`,children:G(S)})}),u&&s.jsxs("div",{className:o.panel,children:[!r&&s.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"search",onChange:e=>q(e.target.value),placeholder:L,ref:m,style:le,type:"search",value:j}),s.jsxs(ue.List,{"aria-label":"Dropdown",className:o.options,children:[A.map(e=>{const d=e.value===w;return s.jsx("li",{"data-component":"dropdown",children:s.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:E.t(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ie(e.value),variant:"tertiary",children:[s.jsx("span",{className:o.text,children:G(e)}),e.groupLabel&&s.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),C&&l&&s.jsx("li",{children:s.jsx(F.Button,{"aria-label":V(l.render(b))||b,className:o.option,onClick:H,variant:"tertiary",children:s.jsx("span",{className:o.text,children:l.render(b)})})}),A.length===0&&!C&&s.jsx("li",{className:o.empty,children:n})]})]})]});return c?s.jsxs("div",{className:E.t(o.label,h==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[s.jsx("span",{id:v,children:se}),J]}):J};exports.Dropdown=Pe;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,32 +1,32 @@
1
1
  import { jsxs as p, Fragment as pe, jsx as s } from "react/jsx-runtime";
2
2
  import { t as V } from "../../classix-DG18itHa.js";
3
- import fe, { Children as me, isValidElement as w, useRef as I, useId as he, useState as Q, useEffect as z } from "react";
4
- import { Button as M } from "../button/index.js";
5
- import { i as _e } from "../../icons-BFgf_lJN.js";
6
- import { f as ye, I as be } from "../../index-BHgGZxsR.js";
3
+ import fe, { Children as me, isValidElement as v, useRef as I, useId as be, useState as W, useEffect as Q } from "react";
4
+ import { Button as z } from "../button/index.js";
5
+ import { i as he } from "../../icons-Bq3diTRm.js";
6
+ import { f as _e, I as ye } from "../../index-ClZkChEh.js";
7
7
  import { List as ge } from "../list/index.js";
8
- import { S as we, s as ve, r as ee } from "../../index-C_YiNpZP.js";
8
+ import { S as ve, s as xe, r as ee } from "../../index-DwzLUapm.js";
9
9
  import '../../assets/index39.css';function L(t) {
10
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(L).join(" ") : w(t) ? L(t.props.children) : "";
10
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(L).join(" ") : v(t) ? L(t.props.children) : "";
11
11
  }
12
- function xe(t) {
13
- return w(t) && t.type === "option";
14
- }
15
- function je(t) {
16
- return w(t) && t.type === "optgroup";
12
+ function we(t) {
13
+ return v(t) && t.type === "option";
17
14
  }
18
15
  function Se(t) {
19
- return w(t) && t.type === fe.Fragment;
16
+ return v(t) && t.type === "optgroup";
17
+ }
18
+ function qe(t) {
19
+ return v(t) && t.type === fe.Fragment;
20
20
  }
21
21
  function Ne(t) {
22
- return w(t) && t.type === we;
22
+ return v(t) && t.type === ve;
23
23
  }
24
- function A(t, i, r = !1) {
24
+ function M(t, i, r = !1) {
25
25
  const l = [];
26
26
  return me.forEach(t, (n) => {
27
- if (Se(n))
28
- l.push(...A(n.props.children, i, r));
29
- else if (xe(n)) {
27
+ if (qe(n))
28
+ l.push(...M(n.props.children, i, r));
29
+ else if (we(n)) {
30
30
  const a = L(n.props.children).trim(), f = n.props.value != null ? String(n.props.value) : a;
31
31
  l.push({
32
32
  disabled: r || !!n.props.disabled,
@@ -38,7 +38,7 @@ function A(t, i, r = !1) {
38
38
  text: a,
39
39
  value: f
40
40
  });
41
- } else je(n) && l.push(...A(n.props.children, n.props.label, r || !!n.props.disabled));
41
+ } else Se(n) && l.push(...M(n.props.children, n.props.label, r || !!n.props.disabled));
42
42
  }), l;
43
43
  }
44
44
  function Ce(t) {
@@ -78,29 +78,29 @@ function Le(t) {
78
78
  props: t.props
79
79
  };
80
80
  }
81
- const $e = "_combobox_18jwy_3", Be = "_dropdown_18jwy_27", ke = "_empty_18jwy_30", De = "_group_18jwy_31", Pe = "_placeholder_18jwy_32", Re = "_filter_18jwy_40", Fe = "_native_18jwy_52", We = "_option_18jwy_62", Qe = "_options_18jwy_84", ze = "_panel_18jwy_108", Me = "_selected_18jwy_132", Ae = "_text_18jwy_136", Ge = "_trigger_18jwy_145", Ke = "_minimal_18jwy_181", Oe = "_inline_18jwy_236", Te = "_label_18jwy_268", o = {
81
+ const $e = "_combobox_1bqyf_3", Be = "_dropdown_1bqyf_27", ke = "_empty_1bqyf_30", De = "_group_1bqyf_31", Pe = "_placeholder_1bqyf_32", Re = "_filter_1bqyf_40", je = "_native_1bqyf_52", Fe = "_option_1bqyf_62", We = "_options_1bqyf_84", Qe = "_panel_1bqyf_108", ze = "_selected_1bqyf_132", Me = "_text_1bqyf_136", Ae = "_trigger_1bqyf_144", Ge = "_minimal_1bqyf_180", Ke = "_inline_1bqyf_235", Oe = "_label_1bqyf_267", o = {
82
82
  combobox: $e,
83
- "combobox-input": "_combobox-input_18jwy_12",
83
+ "combobox-input": "_combobox-input_1bqyf_12",
84
84
  dropdown: Be,
85
85
  empty: ke,
86
86
  group: De,
87
87
  placeholder: Pe,
88
88
  filter: Re,
89
- native: Fe,
90
- option: We,
91
- options: Qe,
92
- panel: ze,
93
- selected: Me,
94
- text: Ae,
95
- trigger: Ge,
96
- minimal: Ke,
97
- inline: Oe,
98
- label: Te,
99
- "inline-field": "_inline-field_18jwy_274"
89
+ native: je,
90
+ option: Fe,
91
+ options: We,
92
+ panel: Qe,
93
+ selected: ze,
94
+ text: Me,
95
+ trigger: Ae,
96
+ minimal: Ge,
97
+ inline: Ke,
98
+ label: Oe,
99
+ "inline-field": "_inline-field_1bqyf_273"
100
100
  };
101
101
  function te(t, i) {
102
102
  return {
103
- "--icon-svg": _e(t).replace("currentColor", i)
103
+ "--icon-svg": he(t).replace("currentColor", i)
104
104
  };
105
105
  }
106
106
  const tt = ({
@@ -113,7 +113,7 @@ const tt = ({
113
113
  renderOption: f,
114
114
  searchPlaceholder: $ = "Filter",
115
115
  selectedItems: ne,
116
- variant: y = "default",
116
+ variant: _ = "default",
117
117
  ...re
118
118
  }) => {
119
119
  const B = Le(t), {
@@ -121,88 +121,88 @@ const tt = ({
121
121
  onChange: k,
122
122
  value: D,
123
123
  ...oe
124
- } = B.props, v = ve(oe), G = I(null), K = I(null), x = he(), O = I(null), m = I(null), b = A(B.children), g = D != null, P = Ie(b, D, le), [R, F] = Q(() => P), [c, d] = Q(!1), [j, S] = Q(""), N = g ? String(D) : R, T = {
124
+ } = B.props, x = xe(oe), A = I(null), G = I(null), w = be(), K = I(null), m = I(null), y = M(B.children), g = D != null, P = Ie(y, D, le), [R, j] = W(() => P), [c, d] = W(!1), [S, q] = W(""), N = g ? String(D) : R, O = {
125
125
  default: ee("--colors-semantic-content-secondary"),
126
126
  white: ee("--color-white", "white")
127
- }, q = y === "minimal" ? T.white : T.default, C = Ve(b, N), ie = te("chevron", q), se = te("search", q), H = Ee(b, j), h = j.trim(), E = !!(r && l && h && l.isValid(h)), ae = a && y === "inline" ? ye(a) : a, J = (e) => e ? (f == null ? void 0 : f({
127
+ }, T = _ === "minimal" ? O.white : O.default, C = Ve(y, N), ie = te("chevron", T), se = te("search", T), H = Ee(y, S), b = S.trim(), E = !!(r && l && b && l.isValid(b)), ae = a && _ === "inline" ? _e(a) : a, J = (e) => e ? (f == null ? void 0 : f({
128
128
  groupLabel: e.groupLabel,
129
129
  isSelected: e.value === N,
130
130
  label: e.label,
131
131
  text: e.text,
132
132
  value: e.value
133
133
  })) ?? e.label : "Select an option";
134
- z(() => {
135
- !g && !b.some((e) => e.value === R) && F(P);
136
- }, [P, R, g, b]), z(() => {
134
+ Q(() => {
135
+ !g && !y.some((e) => e.value === R) && j(P);
136
+ }, [P, R, g, y]), Q(() => {
137
137
  var e;
138
138
  if (!c) {
139
- S("");
139
+ q("");
140
140
  return;
141
141
  }
142
142
  (e = m.current) == null || e.focus();
143
- }, [c]), z(() => {
143
+ }, [c]), Q(() => {
144
144
  if (!c)
145
145
  return;
146
146
  const e = (u) => {
147
- var _;
148
- (_ = K.current) != null && _.contains(u.target) || d(!1);
147
+ var h;
148
+ (h = G.current) != null && h.contains(u.target) || d(!1);
149
149
  };
150
150
  return document.addEventListener("mousedown", e), () => {
151
151
  document.removeEventListener("mousedown", e);
152
152
  };
153
153
  }, [c]);
154
154
  const ce = (e) => {
155
- g || F(e.target.value), k == null || k(e);
156
- }, W = () => {
155
+ g || j(e.target.value), k == null || k(e);
156
+ }, F = () => {
157
157
  var e;
158
- d(!1), r || (e = G.current) == null || e.focus();
158
+ d(!1), r || (e = A.current) == null || e.focus();
159
159
  }, U = () => {
160
160
  var e;
161
- S(""), d(!0), (e = m.current) == null || e.focus();
161
+ q(""), d(!0), (e = m.current) == null || e.focus();
162
162
  }, X = () => {
163
- !l || !E || (l.onCreate(h), U());
163
+ !l || !E || (l.onCreate(b), U());
164
164
  }, ue = (e) => {
165
165
  var Z;
166
- g || F(e);
167
- const u = O.current;
166
+ g || j(e);
167
+ const u = K.current;
168
168
  if (!u) {
169
- W();
169
+ F();
170
170
  return;
171
171
  }
172
- const _ = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
173
- _ == null || _.call(u, e), u.dispatchEvent(new Event("change", {
172
+ const h = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
173
+ h == null || h.call(u, e), u.dispatchEvent(new Event("change", {
174
174
  bubbles: !0
175
- })), r ? U() : W();
175
+ })), r ? U() : F();
176
176
  }, de = (e) => {
177
- e.key === "Escape" && W(), e.key === "Enter" && e.target === m.current && E && (e.preventDefault(), X());
178
- }, Y = /* @__PURE__ */ p("div", { className: V(o.dropdown, y === "inline" && o.inline, y === "minimal" && o.minimal, i), onKeyDown: de, ref: K, ...re, children: [
179
- /* @__PURE__ */ s("select", { ...v, "aria-hidden": "true", className: o.native, onChange: ce, ref: O, tabIndex: -1, value: N, children: B.children }),
177
+ e.key === "Escape" && F(), e.key === "Enter" && e.target === m.current && E && (e.preventDefault(), X());
178
+ }, Y = /* @__PURE__ */ p("div", { className: V(o.dropdown, _ === "inline" && o.inline, _ === "minimal" && o.minimal, i), onKeyDown: de, ref: G, ...re, children: [
179
+ /* @__PURE__ */ s("select", { ...x, "aria-hidden": "true", className: o.native, onChange: ce, ref: K, tabIndex: -1, value: N, children: B.children }),
180
180
  r ? /* @__PURE__ */ p("div", { className: o.combobox, onClick: () => {
181
181
  var e;
182
182
  return (e = m.current) == null ? void 0 : e.focus();
183
183
  }, children: [
184
184
  ne,
185
- /* @__PURE__ */ s("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": v["aria-label"] ?? a ?? $, className: o["combobox-input"], disabled: v.disabled, onChange: (e) => {
186
- S(e.target.value), d(!0);
187
- }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: $ || void 0, ref: m, role: "combobox", type: "text", value: j })
188
- ] }) : /* @__PURE__ */ s(M, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${x} ${x}-value` : void 0, className: V(o.trigger, (C == null ? void 0 : C.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: v.disabled, onClick: () => d((e) => !e), ref: G, style: ie, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, id: `${x}-value`, children: J(C) }) }),
185
+ /* @__PURE__ */ s("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": x["aria-label"] ?? a ?? $, className: o["combobox-input"], disabled: x.disabled, onChange: (e) => {
186
+ q(e.target.value), d(!0);
187
+ }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: $ || void 0, ref: m, role: "combobox", type: "text", value: S })
188
+ ] }) : /* @__PURE__ */ s(z, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${w} ${w}-value` : void 0, className: V(o.trigger, (C == null ? void 0 : C.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: x.disabled, onClick: () => d((e) => !e), ref: A, style: ie, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, id: `${w}-value`, children: J(C) }) }),
189
189
  c && /* @__PURE__ */ p("div", { className: o.panel, children: [
190
- !r && /* @__PURE__ */ s(be, { "aria-label": "Filter", className: o.filter, icon: "search", onChange: (e) => S(e.target.value), placeholder: $, ref: m, style: se, type: "search", value: j }),
190
+ !r && /* @__PURE__ */ s(ye, { "aria-label": "Filter", className: o.filter, icon: "search", onChange: (e) => q(e.target.value), placeholder: $, ref: m, style: se, type: "search", value: S }),
191
191
  /* @__PURE__ */ p(ge, { "aria-label": "Dropdown", className: o.options, children: [
192
192
  H.map((e) => {
193
193
  const u = e.value === N;
194
- return /* @__PURE__ */ s("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(M, { "aria-label": u ? `${e.text}, selected` : e.text, className: V(o.option, u && o.selected), disabled: e.disabled, onClick: () => ue(e.value), variant: "tertiary", children: [
194
+ return /* @__PURE__ */ s("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(z, { "aria-label": u ? `${e.text}, selected` : e.text, className: V(o.option, u && o.selected), disabled: e.disabled, onClick: () => ue(e.value), variant: "tertiary", children: [
195
195
  /* @__PURE__ */ s("span", { className: o.text, children: J(e) }),
196
196
  e.groupLabel && /* @__PURE__ */ s("small", { className: o.group, children: e.groupLabel })
197
197
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
198
198
  }),
199
- E && l && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(M, { "aria-label": L(l.render(h)) || h, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, children: l.render(h) }) }) }),
199
+ E && l && /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(z, { "aria-label": L(l.render(b)) || b, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ s("span", { className: o.text, children: l.render(b) }) }) }),
200
200
  H.length === 0 && !E && /* @__PURE__ */ s("li", { className: o.empty, children: n })
201
201
  ] })
202
202
  ] })
203
203
  ] });
204
- return a ? /* @__PURE__ */ p("div", { className: V(o.label, y === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
205
- /* @__PURE__ */ s("span", { id: x, children: ae }),
204
+ return a ? /* @__PURE__ */ p("div", { className: V(o.label, _ === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
205
+ /* @__PURE__ */ s("span", { id: w, children: ae }),
206
206
  Y
207
207
  ] }) : Y;
208
208
  };