@solibo/solibo-ui 2.2.21 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const n=require("react/jsx-runtime"),V=require("classix"),s=require("react"),B=require("../button/index.cjs"),Ze=require("../form/index.cjs"),et=require("../../icons-BSfBrPs3.cjs"),we=require("../../index-D3gtJMYv.cjs"),tt=require("../label/index.cjs"),nt=require("../list/index.cjs"),Ee=require("../loading/index.cjs"),$=require("../../index-Ct84TXGv.cjs");function G(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(G).join(" "):s.isValidElement(t)?G(t.props.children):""}function st(t){return s.isValidElement(t)&&t.type==="option"}function it(t){return s.isValidElement(t)&&t.type==="optgroup"}function lt(t){return s.isValidElement(t)&&t.type===s.Fragment}function rt(t){return s.isValidElement(t)&&t.type===$.Select}function le(t,o,r=!1){const a=[];return s.Children.forEach(t,i=>{if(lt(i))a.push(...le(i.props.children,o,r));else if(st(i)){const x=G(i.props.children).trim(),k=i.props.value!=null?String(i.props.value):x;a.push({disabled:r||!!i.props.disabled,groupLabel:o,hidden:!!i.props.hidden,isPlaceholder:!!(i.props.hidden&&k===""),label:i.props.children,selected:!!i.props.selected,text:x,value:k})}else it(i)&&a.push(...le(i.props.children,i.props.label,r||!!i.props.disabled))}),a}function ot(t){const o=t.trim();if(!o)return null;const a=[.../[*?]/.test(o)?o:`*${o}*`].map(i=>i==="*"?".*":i==="?"?".":i.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${a}$`,"i")}function at(t,o){const r=ot(o),a=t.filter(i=>!i.hidden&&!i.isPlaceholder);return r?a.filter(i=>r.test([i.groupLabel,i.text,i.value].filter(Boolean).join(" "))):a}function ct(t,o){return t.find(r=>r.value===o)??t.find(r=>r.isPlaceholder)??t[0]}function ut(t,o,r){var a,i;return o!=null?String(o):r!=null?String(r):((a=t.find(x=>x.selected))==null?void 0:a.value)??((i=t[0])==null?void 0:i.value)??""}function dt(t){if(rt(t)){const{children:o,placeholder:r,...a}=t.props;return{children:n.jsxs(n.Fragment,{children:[r&&n.jsx("option",{hidden:!0,value:"",children:r}),o]}),props:a}}return{children:t.props.children,props:t.props}}const ft="_combobox_7iy0q_3",pt="_dropdown_7iy0q_21",mt="_empty_7iy0q_29",_t="_group_7iy0q_30",bt="_placeholder_7iy0q_31",yt="_filter_7iy0q_39",vt="_native_7iy0q_71",xt="_option_7iy0q_81",ht="_options_7iy0q_107",jt="_panel_7iy0q_117",qt="_selected_7iy0q_142",gt="_text_7iy0q_146",wt="_trigger_7iy0q_154",Et="_minimal_7iy0q_199",St="_inline_7iy0q_259",Rt="_field_7iy0q_293",Nt="_label_7iy0q_297",l={combobox:ft,"combobox-input":"_combobox-input_7iy0q_12",dropdown:pt,empty:mt,group:_t,placeholder:bt,filter:yt,"filter-controls":"_filter-controls_7iy0q_46","loading-status":"_loading-status_7iy0q_57",native:vt,option:xt,options:ht,panel:jt,selected:qt,text:gt,trigger:wt,minimal:Et,inline:St,field:Rt,label:Nt,"inline-field":"_inline-field_7iy0q_302"};function Se(t,o){return{"--icon-svg":et.iconSVG(t,o)}}const It=({children:t,className:o,combobox:r=!1,description:a,errorMessage:i,invalid:x=!1,searchable:k,createOption:h,emptyLabel:Re="No matches found",errorLabel:m,onRetry:re,retryLabel:Ne="Retry",label:y,filterOptions:Ie=!0,hasNextPage:b=!1,loading:d=!1,loadingLabel:oe="Loading",loadMoreLabel:Ce="Load more",onLoadMore:R,onOpenChange:D,onSearchChange:F,searchValue:M,renderOption:A,searchPlaceholder:L="Filter",selectedItems:Ve,variant:j="default",...Be})=>{const O=dt(t),{defaultValue:$e,onChange:T,value:K,...ke}=O.props,c=$.sanitizeSelectProps(ke),{className:De,...Fe}=c,ae=s.useRef(null),ce=s.useRef(null),q=s.useId(),H=x&&i?`${q}-error`:void 0,ue=a?`${q}-description`:void 0,de=[c["aria-describedby"],ue,H].filter(Boolean).join(" ")||void 0,fe=x?!0:c["aria-invalid"],pe=s.useRef(null),g=s.useRef(null),P=s.useRef(null),me=s.useRef(null),J=s.useRef(!1),U=s.useRef(!1),X=s.useRef(R),_e=!!R,w=le(O.children),N=K!=null,Y=ut(w,K,$e),[Z,ee]=s.useState(()=>Y),[u,We]=s.useState(!1),[ze,be]=s.useState(!1),[Qe,Ge]=s.useState(null),[Me,Ae]=s.useState(""),v=M??Me,te=w.filter(e=>!e.hidden).length,Le=Qe??(d||!!m||b||te>8),E=k??(Le||ze||v.length>0),I=s.useCallback(e=>{M===void 0&&Ae(e),F==null||F(e)},[F,M]),_=s.useCallback(e=>{J.current===e||e&&c.disabled||(J.current=e,We(e),D==null||D(e),e||I(""))},[D,c.disabled,I]),W=N?String(K):Z,ye={default:$.resolveColor("--colors-semantic-content-secondary"),white:$.resolveColor("--color-white","white")},ve=c.disabled?$.resolveColor("--colors-semantic-content-disabled"):j==="minimal"?ye.white:ye.default,z=ct(w,W),Oe=Se("CaretDown",ve),Te=Se("MagnifyingGlass",ve),ne=at(w,Ie?v:""),S=v.trim(),Q=!!(r&&h&&S&&h.isValid(S)),Ke=y&&j==="inline"?we.formatInlineLabel(y):y,xe=e=>e?(A==null?void 0:A({groupLabel:e.groupLabel,isSelected:e.value===W,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";s.useEffect(()=>{u&&!v&&!d&&!m&&Ge(b||te>8)},[u,v,d,m,b,te]),s.useEffect(()=>{!N&&!w.some(e=>e.value===Z)&&ee(Y)},[Y,Z,N,w]),s.useEffect(()=>{u?E&&be(!0):be(!1)},[u,E]),s.useEffect(()=>{var e,f,p;u&&(r||E?(e=g.current)==null||e.focus():(p=(f=P.current)==null?void 0:f.querySelector("button:not(:disabled)"))==null||p.focus())},[u,r,E]),s.useEffect(()=>{if(!u)return;const e=f=>{var p;(p=ce.current)!=null&&p.contains(f.target)||_(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[_,u]),s.useEffect(()=>{X.current=R},[R]),s.useEffect(()=>{c.disabled&&_(!1)},[_,c.disabled]);const se=s.useCallback(()=>{!J.current||c.disabled||d||m||!b||!X.current||U.current||(U.current=!0,X.current())},[m,b,d,c.disabled]);s.useEffect(()=>{if(U.current=!1,!u||c.disabled||d||m||!b||!_e)return;const e=me.current,f=P.current;if(!e||!f||typeof IntersectionObserver>"u")return;let p=!0;const C=new IntersectionObserver(Xe=>{p&&Xe.some(Ye=>Ye.isIntersecting)&&se()},{root:f});return C.observe(e),()=>{p=!1,C.disconnect()}},[u,d,m,b,_e,se,ne.length,v,c.disabled]);const He=e=>{N||ee(e.target.value),T==null||T(e)},ie=()=>{var e;_(!1),r||(e=ae.current)==null||e.focus()},he=()=>{var e;I(""),_(!0),(e=g.current)==null||e.focus()},je=()=>{!h||!Q||(h.onCreate(S),he())},Pe=e=>{var C;N||ee(e);const f=pe.current;if(!f){ie();return}const p=(C=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:C.set;p==null||p.call(f,e),f.dispatchEvent(new Event("change",{bubbles:!0})),r?he():ie()},Je=e=>{e.key==="Escape"&&ie(),e.key==="Enter"&&e.target===g.current&&Q&&(e.preventDefault(),je())},qe=n.jsx("div",{"aria-hidden":!d,"aria-label":oe,className:l["loading-status"],role:"status",children:d&&n.jsx(Ee.Loading,{size:"small"})}),ge=n.jsxs("div",{className:V(l.dropdown,j==="inline"&&l.inline,j==="minimal"&&l.minimal,o),onKeyDown:Je,ref:ce,...Be,children:[n.jsx("select",{...Fe,"aria-hidden":"true",className:V(l.native,De),onChange:He,ref:pe,tabIndex:-1,value:W,children:O.children}),r?n.jsxs("div",{className:l.combobox,onClick:()=>{var e;return(e=g.current)==null?void 0:e.focus()},children:[Ve,n.jsx("input",{"aria-describedby":de,"aria-invalid":fe,"aria-autocomplete":"list","aria-expanded":u,"aria-label":c["aria-label"]??y??L,className:l["combobox-input"],disabled:c.disabled,onChange:e=>{I(e.target.value),_(!0)},onClick:()=>_(!0),onFocus:()=>_(!0),placeholder:L||void 0,ref:g,role:"combobox",type:"text",value:v}),qe]}):n.jsx(B.Button,{"aria-describedby":de,"aria-invalid":fe,"aria-label":y?void 0:c["aria-label"],"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":y?`${q} ${q}-value`:void 0,className:V(l.trigger,(z==null?void 0:z.isPlaceholder)&&l.placeholder),"data-open":u?"true":void 0,disabled:c.disabled,onClick:()=>_(!u),ref:ae,style:Oe,variant:"simple",children:n.jsx("span",{className:l.text,id:`${q}-value`,children:xe(z)})}),u&&n.jsxs("div",{className:l.panel,children:[!r&&E&&n.jsxs("div",{className:l["filter-controls"],children:[n.jsx(we.Input,{"aria-label":"Filter",className:l.filter,icon:"MagnifyingGlass",onChange:e=>I(e.target.value),placeholder:L,ref:g,style:Te,type:"search",value:v}),qe]}),n.jsxs(nt.List,{"aria-label":"Dropdown","aria-busy":d||void 0,className:l.options,ref:P,children:[ne.map(e=>{const f=e.value===W;return n.jsx("li",{"data-component":"dropdown",children:n.jsxs(B.Button,{"aria-label":f?`${e.text}, selected`:e.text,className:V(l.option,f&&l.selected),disabled:e.disabled,onClick:()=>Pe(e.value),variant:"tertiary",children:[n.jsx("span",{className:l.text,children:xe(e)}),e.groupLabel&&n.jsx("small",{className:l.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),Q&&h&&n.jsx("li",{children:n.jsx(B.Button,{"aria-label":G(h.render(S))||S,className:l.option,onClick:je,variant:"tertiary",children:n.jsx("span",{className:l.text,children:h.render(S)})})}),ne.length===0&&!Q&&!d&&!m&&!b&&n.jsx("li",{className:l.empty,children:Re}),m&&n.jsxs("li",{className:l.empty,children:[n.jsx("span",{role:"alert",children:m}),re&&n.jsx(B.Button,{disabled:d,onClick:re,variant:"tertiary",children:Ne})]}),d&&!r&&!E&&n.jsx("li",{"aria-label":oe,className:l.empty,role:"status",children:n.jsx(Ee.Loading,{size:"small"})}),b&&R&&!m&&n.jsx("li",{ref:me,children:n.jsx(B.Button,{className:l.option,disabled:d,onClick:se,variant:"tertiary",children:Ce})})]})]})]}),Ue=y||a?n.jsxs("div",{className:V(l.label,j==="inline"&&l["inline-field"]),children:[n.jsx(tt.Label,{label:Ke,labelId:y?q:void 0,description:a,descriptionId:ue,inline:j==="inline"}),ge]}):ge;return n.jsxs("div",{className:l.field,"data-component":"dropdown",children:[Ue,H&&n.jsx(Ze.FieldError,{errorId:H,errorMessage:i})]})};exports.Dropdown=It;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const n=require("react/jsx-runtime"),V=require("classix"),s=require("react"),B=require("../button/index.cjs"),Ze=require("../form/index.cjs"),et=require("../../icons-BSfBrPs3.cjs"),Ee=require("../../index-D3gtJMYv.cjs"),tt=require("../label/index.cjs"),nt=require("../list/index.cjs"),Se=require("../loading/index.cjs"),$=require("../../index-Ct84TXGv.cjs");function G(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(G).join(" "):s.isValidElement(t)?G(t.props.children):""}function st(t){return s.isValidElement(t)&&t.type==="option"}function it(t){return s.isValidElement(t)&&t.type==="optgroup"}function lt(t){return s.isValidElement(t)&&t.type===s.Fragment}function rt(t){return s.isValidElement(t)&&t.type===$.Select}function le(t,o,r=!1){const a=[];return s.Children.forEach(t,i=>{if(lt(i))a.push(...le(i.props.children,o,r));else if(st(i)){const x=G(i.props.children).trim(),k=i.props.value!=null?String(i.props.value):x;a.push({disabled:r||!!i.props.disabled,groupLabel:o,hidden:!!i.props.hidden,isPlaceholder:!!(i.props.hidden&&k===""),label:i.props.children,selected:!!i.props.selected,text:x,value:k})}else it(i)&&a.push(...le(i.props.children,i.props.label,r||!!i.props.disabled))}),a}function ot(t){const o=t.trim();if(!o)return null;const a=[.../[*?]/.test(o)?o:`*${o}*`].map(i=>i==="*"?".*":i==="?"?".":i.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${a}$`,"i")}function at(t,o){const r=ot(o),a=t.filter(i=>!i.hidden&&!i.isPlaceholder);return r?a.filter(i=>r.test([i.groupLabel,i.text,i.value].filter(Boolean).join(" "))):a}function ct(t,o){return t.find(r=>r.value===o)??t.find(r=>r.isPlaceholder)??t[0]}function ut(t,o,r){var a,i;return o!=null?String(o):r!=null?String(r):((a=t.find(x=>x.selected))==null?void 0:a.value)??((i=t[0])==null?void 0:i.value)??""}function dt(t){if(rt(t)){const{children:o,placeholder:r,...a}=t.props;return{children:n.jsxs(n.Fragment,{children:[r&&n.jsx("option",{hidden:!0,value:"",children:r}),o]}),props:a}}return{children:t.props.children,props:t.props}}const ft="_combobox_7iy0q_3",pt="_dropdown_7iy0q_21",mt="_empty_7iy0q_29",_t="_group_7iy0q_30",bt="_placeholder_7iy0q_31",yt="_filter_7iy0q_39",vt="_native_7iy0q_71",xt="_option_7iy0q_81",ht="_options_7iy0q_107",jt="_panel_7iy0q_117",qt="_selected_7iy0q_142",gt="_text_7iy0q_146",wt="_trigger_7iy0q_154",Et="_minimal_7iy0q_199",St="_inline_7iy0q_259",Rt="_field_7iy0q_293",Nt="_label_7iy0q_297",l={combobox:ft,"combobox-input":"_combobox-input_7iy0q_12",dropdown:pt,empty:mt,group:_t,placeholder:bt,filter:yt,"filter-controls":"_filter-controls_7iy0q_46","loading-status":"_loading-status_7iy0q_57",native:vt,option:xt,options:ht,panel:jt,selected:qt,text:gt,trigger:wt,minimal:Et,inline:St,field:Rt,label:Nt,"inline-field":"_inline-field_7iy0q_302"};function Re(t,o){return{"--icon-svg":et.iconSVG(t,o)}}const It=({children:t,className:o,combobox:r=!1,description:a,errorMessage:i,invalid:x=!1,searchable:k,createOption:h,emptyLabel:Ne="No matches found",errorLabel:m,onRetry:re,retryLabel:Ie="Retry",label:y,filterOptions:Ce=!0,hasNextPage:b=!1,loading:d=!1,loadingLabel:oe="Loading",loadMoreLabel:Ve="Load more",onLoadMore:R,onOpenChange:D,onSearchChange:F,searchValue:M,renderOption:A,searchPlaceholder:L="Filter",selectedItems:Be,variant:j="default",...ae})=>{const O=dt(t),{defaultValue:$e,onChange:T,value:K,...ke}=O.props,c=$.sanitizeSelectProps(ke),{className:De,...Fe}=c,ce=s.useRef(null),ue=s.useRef(null),q=s.useId(),H=x&&i?`${q}-error`:void 0,de=a?`${q}-description`:void 0,fe=[c["aria-describedby"],de,H].filter(Boolean).join(" ")||void 0,pe=x?!0:c["aria-invalid"],me=s.useRef(null),g=s.useRef(null),P=s.useRef(null),_e=s.useRef(null),J=s.useRef(!1),U=s.useRef(!1),X=s.useRef(R),be=!!R,w=le(O.children),N=K!=null,Y=ut(w,K,$e),[Z,ee]=s.useState(()=>Y),[u,We]=s.useState(!1),[ze,ye]=s.useState(!1),[Qe,Ge]=s.useState(null),[Me,Ae]=s.useState(""),v=M??Me,te=w.filter(e=>!e.hidden).length,Le=Qe??(d||!!m||b||te>8),E=k??(Le||ze||v.length>0),I=s.useCallback(e=>{M===void 0&&Ae(e),F==null||F(e)},[F,M]),_=s.useCallback(e=>{J.current===e||e&&c.disabled||(J.current=e,We(e),D==null||D(e),e||I(""))},[D,c.disabled,I]),W=N?String(K):Z,ve={default:$.resolveColor("--colors-semantic-content-secondary"),white:$.resolveColor("--color-white","white")},xe=c.disabled?$.resolveColor("--colors-semantic-content-disabled"):j==="minimal"?ve.white:ve.default,z=ct(w,W),Oe=Re("CaretDown",xe),Te=Re("MagnifyingGlass",xe),ne=at(w,Ce?v:""),S=v.trim(),Q=!!(r&&h&&S&&h.isValid(S)),Ke=y&&j==="inline"?Ee.formatInlineLabel(y):y,he=e=>e?(A==null?void 0:A({groupLabel:e.groupLabel,isSelected:e.value===W,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";s.useEffect(()=>{u&&!v&&!d&&!m&&Ge(b||te>8)},[u,v,d,m,b,te]),s.useEffect(()=>{!N&&!w.some(e=>e.value===Z)&&ee(Y)},[Y,Z,N,w]),s.useEffect(()=>{u?E&&ye(!0):ye(!1)},[u,E]),s.useEffect(()=>{var e,f,p;u&&(r||E?(e=g.current)==null||e.focus():(p=(f=P.current)==null?void 0:f.querySelector("button:not(:disabled)"))==null||p.focus())},[u,r,E]),s.useEffect(()=>{if(!u)return;const e=f=>{var p;(p=ue.current)!=null&&p.contains(f.target)||_(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[_,u]),s.useEffect(()=>{X.current=R},[R]),s.useEffect(()=>{c.disabled&&_(!1)},[_,c.disabled]);const se=s.useCallback(()=>{!J.current||c.disabled||d||m||!b||!X.current||U.current||(U.current=!0,X.current())},[m,b,d,c.disabled]);s.useEffect(()=>{if(U.current=!1,!u||c.disabled||d||m||!b||!be)return;const e=_e.current,f=P.current;if(!e||!f||typeof IntersectionObserver>"u")return;let p=!0;const C=new IntersectionObserver(Xe=>{p&&Xe.some(Ye=>Ye.isIntersecting)&&se()},{root:f});return C.observe(e),()=>{p=!1,C.disconnect()}},[u,d,m,b,be,se,ne.length,v,c.disabled]);const He=e=>{N||ee(e.target.value),T==null||T(e)},ie=()=>{var e;_(!1),r||(e=ce.current)==null||e.focus()},je=()=>{var e;I(""),_(!0),(e=g.current)==null||e.focus()},qe=()=>{!h||!Q||(h.onCreate(S),je())},Pe=e=>{var C;N||ee(e);const f=me.current;if(!f){ie();return}const p=(C=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:C.set;p==null||p.call(f,e),f.dispatchEvent(new Event("change",{bubbles:!0})),r?je():ie()},Je=e=>{e.key==="Escape"&&ie(),e.key==="Enter"&&e.target===g.current&&Q&&(e.preventDefault(),qe())},ge=n.jsx("div",{"aria-hidden":!d,"aria-label":oe,className:l["loading-status"],role:"status",children:d&&n.jsx(Se.Loading,{size:"small"})}),we=n.jsxs("div",{className:V(l.dropdown,j==="inline"&&l.inline,j==="minimal"&&l.minimal,o),onKeyDown:Je,ref:ue,...ae,children:[n.jsx("select",{...Fe,"aria-hidden":"true",className:V(l.native,De),onChange:He,ref:me,tabIndex:-1,value:W,children:O.children}),r?n.jsxs("div",{className:l.combobox,onClick:()=>{var e;return(e=g.current)==null?void 0:e.focus()},children:[Be,n.jsx("input",{"aria-describedby":fe,"aria-invalid":pe,"aria-autocomplete":"list","aria-expanded":u,"aria-label":c["aria-label"]??y??L,className:l["combobox-input"],disabled:c.disabled,onChange:e=>{I(e.target.value),_(!0)},onClick:()=>_(!0),onFocus:()=>_(!0),placeholder:L||void 0,ref:g,role:"combobox",type:"text",value:v}),ge]}):n.jsx(B.Button,{"aria-describedby":fe,"aria-invalid":pe,"aria-label":y?void 0:c["aria-label"],"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":y?`${q} ${q}-value`:void 0,className:V(l.trigger,(z==null?void 0:z.isPlaceholder)&&l.placeholder),"data-open":u?"true":void 0,disabled:c.disabled,onClick:()=>_(!u),ref:ce,style:Oe,variant:"simple",children:n.jsx("span",{className:l.text,id:`${q}-value`,children:he(z)})}),u&&n.jsxs("div",{className:l.panel,children:[!r&&E&&n.jsxs("div",{className:l["filter-controls"],children:[n.jsx(Ee.Input,{"aria-label":"Filter",className:l.filter,icon:"MagnifyingGlass",onChange:e=>I(e.target.value),placeholder:L,ref:g,style:Te,type:"search",value:v}),ge]}),n.jsxs(nt.List,{"aria-label":"Dropdown","aria-busy":d||void 0,className:l.options,ref:P,children:[ne.map(e=>{const f=e.value===W;return n.jsx("li",{"data-component":"dropdown",children:n.jsxs(B.Button,{"aria-label":f?`${e.text}, selected`:e.text,className:V(l.option,f&&l.selected),disabled:e.disabled,onClick:()=>Pe(e.value),variant:"tertiary",children:[n.jsx("span",{className:l.text,children:he(e)}),e.groupLabel&&n.jsx("small",{className:l.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),Q&&h&&n.jsx("li",{children:n.jsx(B.Button,{"aria-label":G(h.render(S))||S,className:l.option,onClick:qe,variant:"tertiary",children:n.jsx("span",{className:l.text,children:h.render(S)})})}),ne.length===0&&!Q&&!d&&!m&&!b&&n.jsx("li",{className:l.empty,children:Ne}),m&&n.jsxs("li",{className:l.empty,children:[n.jsx("span",{role:"alert",children:m}),re&&n.jsx(B.Button,{disabled:d,onClick:re,variant:"tertiary",children:Ie})]}),d&&!r&&!E&&n.jsx("li",{"aria-label":oe,className:l.empty,role:"status",children:n.jsx(Se.Loading,{size:"small"})}),b&&R&&!m&&n.jsx("li",{ref:_e,children:n.jsx(B.Button,{className:l.option,disabled:d,onClick:se,variant:"tertiary",children:Ve})})]})]})]}),Ue=y||a?n.jsxs("div",{className:V(l.label,j==="inline"&&l["inline-field"]),children:[n.jsx(tt.Label,{label:Ke,labelId:y?q:void 0,description:a,descriptionId:de,inline:j==="inline",required:ae.required}),we]}):we;return n.jsxs("div",{className:l.field,"data-component":"dropdown",children:[Ue,H&&n.jsx(Ze.FieldError,{errorId:H,errorMessage:i})]})};exports.Dropdown=It;
@@ -7,7 +7,7 @@ import { i as ot } from "../../icons-DtAsxlep.js";
7
7
  import { f as ct, I as dt } from "../../index-DpkXKD1Z.js";
8
8
  import { Label as ut } from "../label/index.js";
9
9
  import { List as ft } from "../list/index.js";
10
- import { Loading as Re } from "../loading/index.js";
10
+ import { Loading as Ve } from "../loading/index.js";
11
11
  import { S as pt, s as mt, r as ce } from "../../index-CWeknFzO.js";
12
12
  import '../../assets/index41.css';function K(t) {
13
13
  return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(K).join(" ") : F(t) ? K(t.props.children) : "";
@@ -104,7 +104,7 @@ const It = "_combobox_7iy0q_3", Nt = "_dropdown_7iy0q_21", xt = "_empty_7iy0q_29
104
104
  label: Gt,
105
105
  "inline-field": "_inline-field_7iy0q_302"
106
106
  };
107
- function Ve(t, s) {
107
+ function $e(t, s) {
108
108
  return {
109
109
  "--icon-svg": ot(t, s)
110
110
  };
@@ -118,25 +118,25 @@ const Yt = ({
118
118
  invalid: w = !1,
119
119
  searchable: W,
120
120
  createOption: q,
121
- emptyLabel: $e = "No matches found",
121
+ emptyLabel: Be = "No matches found",
122
122
  errorLabel: p,
123
123
  onRetry: ue,
124
- retryLabel: Be = "Retry",
124
+ retryLabel: ke = "Retry",
125
125
  label: v,
126
- filterOptions: ke = !0,
126
+ filterOptions: De = !0,
127
127
  hasNextPage: y = !1,
128
128
  loading: d = !1,
129
129
  loadingLabel: fe = "Loading",
130
- loadMoreLabel: De = "Load more",
130
+ loadMoreLabel: je = "Load more",
131
131
  onLoadMore: R,
132
132
  onOpenChange: z,
133
133
  onSearchChange: Q,
134
134
  searchValue: L,
135
135
  renderOption: O,
136
136
  searchPlaceholder: T = "Filter",
137
- selectedItems: je,
137
+ selectedItems: Fe,
138
138
  variant: S = "default",
139
- ...Fe
139
+ ...pe
140
140
  }) => {
141
141
  const H = St(t), {
142
142
  defaultValue: We,
@@ -146,14 +146,14 @@ const Yt = ({
146
146
  } = H.props, o = mt(ze), {
147
147
  className: Qe,
148
148
  ...Ge
149
- } = o, pe = _(null), me = _(null), I = st(), U = w && n ? `${I}-error` : void 0, be = a ? `${I}-description` : void 0, ye = [o["aria-describedby"], be, U].filter(Boolean).join(" ") || void 0, _e = w ? !0 : o["aria-invalid"], ve = _(null), N = _(null), X = _(null), he = _(null), Y = _(!1), Z = _(!1), ee = _(R), ge = !!R, x = de(H.children), V = P != null, te = qt(x, P, We), [ne, ie] = D(() => te), [c, Ae] = D(!1), [Me, we] = D(!1), [Ke, Le] = D(null), [Oe, Te] = D(""), h = L ?? Oe, re = x.filter((e) => !e.hidden).length, He = Ke ?? (d || !!p || y || re > 8), E = W ?? (He || Me || h.length > 0), $ = oe((e) => {
149
+ } = o, me = _(null), be = _(null), I = st(), U = w && n ? `${I}-error` : void 0, ye = a ? `${I}-description` : void 0, _e = [o["aria-describedby"], ye, U].filter(Boolean).join(" ") || void 0, ve = w ? !0 : o["aria-invalid"], he = _(null), N = _(null), X = _(null), ge = _(null), Y = _(!1), Z = _(!1), ee = _(R), we = !!R, x = de(H.children), V = P != null, te = qt(x, P, We), [ne, ie] = D(() => te), [c, Ae] = D(!1), [Me, qe] = D(!1), [Ke, Le] = D(null), [Oe, Te] = D(""), h = L ?? Oe, re = x.filter((e) => !e.hidden).length, He = Ke ?? (d || !!p || y || re > 8), E = W ?? (He || Me || h.length > 0), $ = oe((e) => {
150
150
  L === void 0 && Te(e), Q == null || Q(e);
151
151
  }, [Q, L]), m = oe((e) => {
152
152
  Y.current === e || e && o.disabled || (Y.current = e, Ae(e), z == null || z(e), e || $(""));
153
- }, [z, o.disabled, $]), G = V ? String(P) : ne, qe = {
153
+ }, [z, o.disabled, $]), G = V ? String(P) : ne, Se = {
154
154
  default: ce("--colors-semantic-content-secondary"),
155
155
  white: ce("--color-white", "white")
156
- }, Se = o.disabled ? ce("--colors-semantic-content-disabled") : S === "minimal" ? qe.white : qe.default, A = wt(x, G), Je = Ve("CaretDown", Se), Pe = Ve("MagnifyingGlass", Se), le = gt(x, ke ? h : ""), C = h.trim(), M = !!(r && q && C && q.isValid(C)), Ue = v && S === "inline" ? ct(v) : v, Ie = (e) => e ? (O == null ? void 0 : O({
156
+ }, Ie = o.disabled ? ce("--colors-semantic-content-disabled") : S === "minimal" ? Se.white : Se.default, A = wt(x, G), Je = $e("CaretDown", Ie), Pe = $e("MagnifyingGlass", Ie), le = gt(x, De ? h : ""), C = h.trim(), M = !!(r && q && C && q.isValid(C)), Ue = v && S === "inline" ? ct(v) : v, Ne = (e) => e ? (O == null ? void 0 : O({
157
157
  groupLabel: e.groupLabel,
158
158
  isSelected: e.value === G,
159
159
  label: e.label,
@@ -165,7 +165,7 @@ const Yt = ({
165
165
  }, [c, h, d, p, y, re]), g(() => {
166
166
  !V && !x.some((e) => e.value === ne) && ie(te);
167
167
  }, [te, ne, V, x]), g(() => {
168
- c ? E && we(!0) : we(!1);
168
+ c ? E && qe(!0) : qe(!1);
169
169
  }, [c, E]), g(() => {
170
170
  var e, u, f;
171
171
  c && (r || E ? (e = N.current) == null || e.focus() : (f = (u = X.current) == null ? void 0 : u.querySelector("button:not(:disabled)")) == null || f.focus());
@@ -174,7 +174,7 @@ const Yt = ({
174
174
  return;
175
175
  const e = (u) => {
176
176
  var f;
177
- (f = me.current) != null && f.contains(u.target) || m(!1);
177
+ (f = be.current) != null && f.contains(u.target) || m(!1);
178
178
  };
179
179
  return document.addEventListener("mousedown", e), () => {
180
180
  document.removeEventListener("mousedown", e);
@@ -188,8 +188,8 @@ const Yt = ({
188
188
  !Y.current || o.disabled || d || p || !y || !ee.current || Z.current || (Z.current = !0, ee.current());
189
189
  }, [p, y, d, o.disabled]);
190
190
  g(() => {
191
- if (Z.current = !1, !c || o.disabled || d || p || !y || !ge) return;
192
- const e = he.current, u = X.current;
191
+ if (Z.current = !1, !c || o.disabled || d || p || !y || !we) return;
192
+ const e = ge.current, u = X.current;
193
193
  if (!e || !u || typeof IntersectionObserver > "u") return;
194
194
  let f = !0;
195
195
  const B = new IntersectionObserver((tt) => {
@@ -200,21 +200,21 @@ const Yt = ({
200
200
  return B.observe(e), () => {
201
201
  f = !1, B.disconnect();
202
202
  };
203
- }, [c, d, p, y, ge, se, le.length, h, o.disabled]);
203
+ }, [c, d, p, y, we, se, le.length, h, o.disabled]);
204
204
  const Xe = (e) => {
205
205
  V || ie(e.target.value), J == null || J(e);
206
206
  }, ae = () => {
207
207
  var e;
208
- m(!1), r || (e = pe.current) == null || e.focus();
209
- }, Ne = () => {
208
+ m(!1), r || (e = me.current) == null || e.focus();
209
+ }, xe = () => {
210
210
  var e;
211
211
  $(""), m(!0), (e = N.current) == null || e.focus();
212
- }, xe = () => {
213
- !q || !M || (q.onCreate(C), Ne());
212
+ }, Ee = () => {
213
+ !q || !M || (q.onCreate(C), xe());
214
214
  }, Ye = (e) => {
215
215
  var B;
216
216
  V || ie(e);
217
- const u = ve.current;
217
+ const u = he.current;
218
218
  if (!u) {
219
219
  ae();
220
220
  return;
@@ -222,48 +222,48 @@ const Yt = ({
222
222
  const f = (B = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : B.set;
223
223
  f == null || f.call(u, e), u.dispatchEvent(new Event("change", {
224
224
  bubbles: !0
225
- })), r ? Ne() : ae();
225
+ })), r ? xe() : ae();
226
226
  }, Ze = (e) => {
227
- e.key === "Escape" && ae(), e.key === "Enter" && e.target === N.current && M && (e.preventDefault(), xe());
228
- }, Ee = /* @__PURE__ */ l("div", { "aria-hidden": !d, "aria-label": fe, className: i["loading-status"], role: "status", children: d && /* @__PURE__ */ l(Re, { size: "small" }) }), Ce = /* @__PURE__ */ b("div", { className: k(i.dropdown, S === "inline" && i.inline, S === "minimal" && i.minimal, s), onKeyDown: Ze, ref: me, ...Fe, children: [
229
- /* @__PURE__ */ l("select", { ...Ge, "aria-hidden": "true", className: k(i.native, Qe), onChange: Xe, ref: ve, tabIndex: -1, value: G, children: H.children }),
227
+ e.key === "Escape" && ae(), e.key === "Enter" && e.target === N.current && M && (e.preventDefault(), Ee());
228
+ }, Ce = /* @__PURE__ */ l("div", { "aria-hidden": !d, "aria-label": fe, className: i["loading-status"], role: "status", children: d && /* @__PURE__ */ l(Ve, { size: "small" }) }), Re = /* @__PURE__ */ b("div", { className: k(i.dropdown, S === "inline" && i.inline, S === "minimal" && i.minimal, s), onKeyDown: Ze, ref: be, ...pe, children: [
229
+ /* @__PURE__ */ l("select", { ...Ge, "aria-hidden": "true", className: k(i.native, Qe), onChange: Xe, ref: he, tabIndex: -1, value: G, children: H.children }),
230
230
  r ? /* @__PURE__ */ b("div", { className: i.combobox, onClick: () => {
231
231
  var e;
232
232
  return (e = N.current) == null ? void 0 : e.focus();
233
233
  }, children: [
234
- je,
235
- /* @__PURE__ */ l("input", { "aria-describedby": ye, "aria-invalid": _e, "aria-autocomplete": "list", "aria-expanded": c, "aria-label": o["aria-label"] ?? v ?? T, className: i["combobox-input"], disabled: o.disabled, onChange: (e) => {
234
+ Fe,
235
+ /* @__PURE__ */ l("input", { "aria-describedby": _e, "aria-invalid": ve, "aria-autocomplete": "list", "aria-expanded": c, "aria-label": o["aria-label"] ?? v ?? T, className: i["combobox-input"], disabled: o.disabled, onChange: (e) => {
236
236
  $(e.target.value), m(!0);
237
237
  }, onClick: () => m(!0), onFocus: () => m(!0), placeholder: T || void 0, ref: N, role: "combobox", type: "text", value: h }),
238
- Ee
239
- ] }) : /* @__PURE__ */ l(j, { "aria-describedby": ye, "aria-invalid": _e, "aria-label": v ? void 0 : o["aria-label"], "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": v ? `${I} ${I}-value` : void 0, className: k(i.trigger, (A == null ? void 0 : A.isPlaceholder) && i.placeholder), "data-open": c ? "true" : void 0, disabled: o.disabled, onClick: () => m(!c), ref: pe, style: Je, variant: "simple", children: /* @__PURE__ */ l("span", { className: i.text, id: `${I}-value`, children: Ie(A) }) }),
238
+ Ce
239
+ ] }) : /* @__PURE__ */ l(j, { "aria-describedby": _e, "aria-invalid": ve, "aria-label": v ? void 0 : o["aria-label"], "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": v ? `${I} ${I}-value` : void 0, className: k(i.trigger, (A == null ? void 0 : A.isPlaceholder) && i.placeholder), "data-open": c ? "true" : void 0, disabled: o.disabled, onClick: () => m(!c), ref: me, style: Je, variant: "simple", children: /* @__PURE__ */ l("span", { className: i.text, id: `${I}-value`, children: Ne(A) }) }),
240
240
  c && /* @__PURE__ */ b("div", { className: i.panel, children: [
241
241
  !r && E && /* @__PURE__ */ b("div", { className: i["filter-controls"], children: [
242
242
  /* @__PURE__ */ l(dt, { "aria-label": "Filter", className: i.filter, icon: "MagnifyingGlass", onChange: (e) => $(e.target.value), placeholder: T, ref: N, style: Pe, type: "search", value: h }),
243
- Ee
243
+ Ce
244
244
  ] }),
245
245
  /* @__PURE__ */ b(ft, { "aria-label": "Dropdown", "aria-busy": d || void 0, className: i.options, ref: X, children: [
246
246
  le.map((e) => {
247
247
  const u = e.value === G;
248
248
  return /* @__PURE__ */ l("li", { "data-component": "dropdown", children: /* @__PURE__ */ b(j, { "aria-label": u ? `${e.text}, selected` : e.text, className: k(i.option, u && i.selected), disabled: e.disabled, onClick: () => Ye(e.value), variant: "tertiary", children: [
249
- /* @__PURE__ */ l("span", { className: i.text, children: Ie(e) }),
249
+ /* @__PURE__ */ l("span", { className: i.text, children: Ne(e) }),
250
250
  e.groupLabel && /* @__PURE__ */ l("small", { className: i.group, children: e.groupLabel })
251
251
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
252
252
  }),
253
- M && q && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(j, { "aria-label": K(q.render(C)) || C, className: i.option, onClick: xe, variant: "tertiary", children: /* @__PURE__ */ l("span", { className: i.text, children: q.render(C) }) }) }),
254
- le.length === 0 && !M && !d && !p && !y && /* @__PURE__ */ l("li", { className: i.empty, children: $e }),
253
+ M && q && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(j, { "aria-label": K(q.render(C)) || C, className: i.option, onClick: Ee, variant: "tertiary", children: /* @__PURE__ */ l("span", { className: i.text, children: q.render(C) }) }) }),
254
+ le.length === 0 && !M && !d && !p && !y && /* @__PURE__ */ l("li", { className: i.empty, children: Be }),
255
255
  p && /* @__PURE__ */ b("li", { className: i.empty, children: [
256
256
  /* @__PURE__ */ l("span", { role: "alert", children: p }),
257
- ue && /* @__PURE__ */ l(j, { disabled: d, onClick: ue, variant: "tertiary", children: Be })
257
+ ue && /* @__PURE__ */ l(j, { disabled: d, onClick: ue, variant: "tertiary", children: ke })
258
258
  ] }),
259
- d && !r && !E && /* @__PURE__ */ l("li", { "aria-label": fe, className: i.empty, role: "status", children: /* @__PURE__ */ l(Re, { size: "small" }) }),
260
- y && R && !p && /* @__PURE__ */ l("li", { ref: he, children: /* @__PURE__ */ l(j, { className: i.option, disabled: d, onClick: se, variant: "tertiary", children: De }) })
259
+ d && !r && !E && /* @__PURE__ */ l("li", { "aria-label": fe, className: i.empty, role: "status", children: /* @__PURE__ */ l(Ve, { size: "small" }) }),
260
+ y && R && !p && /* @__PURE__ */ l("li", { ref: ge, children: /* @__PURE__ */ l(j, { className: i.option, disabled: d, onClick: se, variant: "tertiary", children: je }) })
261
261
  ] })
262
262
  ] })
263
263
  ] }), et = v || a ? /* @__PURE__ */ b("div", { className: k(i.label, S === "inline" && i["inline-field"]), children: [
264
- /* @__PURE__ */ l(ut, { label: Ue, labelId: v ? I : void 0, description: a, descriptionId: be, inline: S === "inline" }),
265
- Ce
266
- ] }) : Ce;
264
+ /* @__PURE__ */ l(ut, { label: Ue, labelId: v ? I : void 0, description: a, descriptionId: ye, inline: S === "inline", required: pe.required }),
265
+ Re
266
+ ] }) : Re;
267
267
  return /* @__PURE__ */ b("div", { className: i.field, "data-component": "dropdown", children: [
268
268
  et,
269
269
  U && /* @__PURE__ */ l(at, { errorId: U, errorMessage: n })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index21.css');const t=require("react/jsx-runtime"),l=require("classix"),m="_header_tbj7k_1",p="_controls_tbj7k_58",v="_cta_tbj7k_85",k="_sized_tbj7k_135",g="_details_tbj7k_139",x="_description_tbj7k_146",f="_warning_tbj7k_154",N="_value_tbj7k_159",y="_jumbo_tbj7k_164",w="_inset_tbj7k_174",z="_panel_tbj7k_178",e={header:m,controls:p,cta:v,"header-content":"_header-content_tbj7k_97",sized:k,details:g,description:x,warning:f,value:N,jumbo:y,inset:w,panel:z},q={default:e.default,jumbo:e.jumbo,panel:e.panel},H=({backButton:i,capitalize:d=!1,children:_,controls:a,details:n,cta:c,header:j,inset:h=!1,size:s,subHeader:u,variant:b="default"})=>{const o=t.jsxs("div",{className:e["header-content"],children:[i,j,u,n&&t.jsxs("div",{className:e.details,children:[t.jsx("div",{className:l(e.description,n.tone==="warning"&&e.warning),children:n.description}),n.value!=null&&t.jsx("strong",{className:e.value,children:n.value})]})]}),r=a?t.jsxs("div",{className:e.controls,children:[o,a]}):o;return t.jsxs("header",{className:l(e.header,q[b],d&&e.capitalize,h&&e.inset,s&&e.sized),style:s?{"--header-heading-size":`var(--typography-font-sizes-${s==="label"?"label-lg":s})`}:void 0,"data-component":"header",children:[c?t.jsxs("div",{className:e.cta,children:[r,c]}):r,_]})};exports.Header=H;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index21.css');const a=require("react/jsx-runtime"),o=require("classix"),p="_header_lg3ad_1",v="_controls_lg3ad_62",j="_cta_lg3ad_89",b="_sized_lg3ad_139",x="_details_lg3ad_143",f="_description_lg3ad_150",N="_warning_lg3ad_158",y="_value_lg3ad_163",w="_jumbo_lg3ad_168",z="_inset_lg3ad_178",q="_panel_lg3ad_182",e={header:p,controls:v,cta:j,"header-content":"_header-content_lg3ad_101",sized:b,details:x,description:f,warning:N,value:y,jumbo:w,inset:z,panel:q},H={default:e.default,jumbo:e.jumbo,panel:e.panel},S=({backButton:r,capitalize:i=!1,children:_,controls:t,details:n,cta:l,header:g,inset:h=!1,size:s,subHeader:u,variant:m="default"})=>{const d=a.jsxs("div",{className:e["header-content"],children:[r,g,u,n&&a.jsxs("div",{className:e.details,children:[a.jsx("div",{className:o(e.description,n.tone==="warning"&&e.warning),children:n.description}),n.value!=null&&a.jsx("strong",{className:e.value,children:n.value})]})]}),c=t?a.jsxs("div",{className:e.controls,children:[d,t]}):d;return a.jsxs("header",{className:o(e.header,H[m],i&&e.capitalize,h&&e.inset,s&&e.sized),style:s?{"--header-heading-size":`var(--typography-font-sizes-${s==="label"?"label-lg":s})`}:void 0,"data-component":"header",children:[l?a.jsxs("div",{className:e.cta,children:[c,l]}):c,_]})};exports.Header=S;
@@ -1,57 +1,57 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import i from "classix";
3
- import '../../assets/index21.css';const u = "_header_tbj7k_1", v = "_controls_tbj7k_58", k = "_cta_tbj7k_85", g = "_sized_tbj7k_135", f = "_details_tbj7k_139", N = "_description_tbj7k_146", w = "_warning_tbj7k_154", x = "_value_tbj7k_159", y = "_jumbo_tbj7k_164", z = "_inset_tbj7k_174", C = "_panel_tbj7k_178", e = {
4
- header: u,
5
- controls: v,
6
- cta: k,
7
- "header-content": "_header-content_tbj7k_97",
8
- sized: g,
9
- details: f,
10
- description: N,
11
- warning: w,
12
- value: x,
13
- jumbo: y,
14
- inset: z,
15
- panel: C
16
- }, E = {
1
+ import { jsxs as n, jsx as c } from "react/jsx-runtime";
2
+ import r from "classix";
3
+ import '../../assets/index21.css';const v = "_header_lg3ad_1", f = "_controls_lg3ad_62", b = "_cta_lg3ad_89", j = "_sized_lg3ad_139", N = "_details_lg3ad_143", w = "_description_lg3ad_150", x = "_warning_lg3ad_158", y = "_value_lg3ad_163", z = "_jumbo_lg3ad_168", C = "_inset_lg3ad_178", E = "_panel_lg3ad_182", e = {
4
+ header: v,
5
+ controls: f,
6
+ cta: b,
7
+ "header-content": "_header-content_lg3ad_101",
8
+ sized: j,
9
+ details: N,
10
+ description: w,
11
+ warning: x,
12
+ value: y,
13
+ jumbo: z,
14
+ inset: C,
15
+ panel: E
16
+ }, H = {
17
17
  default: e.default,
18
18
  jumbo: e.jumbo,
19
19
  panel: e.panel
20
- }, $ = ({
21
- backButton: d,
20
+ }, k = ({
21
+ backButton: i,
22
22
  capitalize: _ = !1,
23
23
  children: h,
24
24
  controls: s,
25
- details: t,
26
- cta: o,
27
- header: b,
28
- inset: j = !1,
29
- size: a,
30
- subHeader: m,
31
- variant: p = "default"
25
+ details: a,
26
+ cta: t,
27
+ header: g,
28
+ inset: m = !1,
29
+ size: l,
30
+ subHeader: p,
31
+ variant: u = "default"
32
32
  }) => {
33
- const c = /* @__PURE__ */ n("div", { className: e["header-content"], children: [
34
- d,
35
- b,
36
- m,
37
- t && /* @__PURE__ */ n("div", { className: e.details, children: [
38
- /* @__PURE__ */ r("div", { className: i(e.description, t.tone === "warning" && e.warning), children: t.description }),
39
- t.value != null && /* @__PURE__ */ r("strong", { className: e.value, children: t.value })
33
+ const d = /* @__PURE__ */ n("div", { className: e["header-content"], children: [
34
+ i,
35
+ g,
36
+ p,
37
+ a && /* @__PURE__ */ n("div", { className: e.details, children: [
38
+ /* @__PURE__ */ c("div", { className: r(e.description, a.tone === "warning" && e.warning), children: a.description }),
39
+ a.value != null && /* @__PURE__ */ c("strong", { className: e.value, children: a.value })
40
40
  ] })
41
- ] }), l = s ? /* @__PURE__ */ n("div", { className: e.controls, children: [
42
- c,
41
+ ] }), o = s ? /* @__PURE__ */ n("div", { className: e.controls, children: [
42
+ d,
43
43
  s
44
- ] }) : c;
45
- return /* @__PURE__ */ n("header", { className: i(e.header, E[p], _ && e.capitalize, j && e.inset, a && e.sized), style: a ? {
46
- "--header-heading-size": `var(--typography-font-sizes-${a === "label" ? "label-lg" : a})`
44
+ ] }) : d;
45
+ return /* @__PURE__ */ n("header", { className: r(e.header, H[u], _ && e.capitalize, m && e.inset, l && e.sized), style: l ? {
46
+ "--header-heading-size": `var(--typography-font-sizes-${l === "label" ? "label-lg" : l})`
47
47
  } : void 0, "data-component": "header", children: [
48
- o ? /* @__PURE__ */ n("div", { className: e.cta, children: [
49
- l,
50
- o
51
- ] }) : l,
48
+ t ? /* @__PURE__ */ n("div", { className: e.cta, children: [
49
+ o,
50
+ t
51
+ ] }) : o,
52
52
  h
53
53
  ] });
54
54
  };
55
55
  export {
56
- $ as Header
56
+ k as Header
57
57
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index54.css');const e=require("react/jsx-runtime"),a=require("classix"),o="_label_bfjte_1",d="_description_bfjte_10",b="_inline_bfjte_18",n={label:o,description:d,inline:b},u=({description:i,descriptionId:l,inline:c,label:t,labelId:s,required:r})=>e.jsxs("div",{className:a(c&&n.inline,n.label),"data-required":r?!0:void 0,"data-component":"label",children:[s?e.jsx("span",{id:s,children:t}):t,i&&e.jsx("span",{className:n.description,id:l,children:i})]});exports.Label=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index54.css');const e=require("react/jsx-runtime"),r=require("classix"),o="_label_w39pq_1",d="_description_w39pq_13",p="_inline_w39pq_21",n={label:o,description:d,inline:p},b=({description:i,descriptionId:l,inline:s,label:t,labelId:a,required:c})=>e.jsxs("div",{className:r(s&&n.inline,n.label),"data-component":"label",children:[e.jsx("span",{"data-required":c?!0:void 0,id:a,children:t}),i&&e.jsx("span",{className:n.description,id:l,children:i})]});exports.Label=b;
@@ -1,20 +1,20 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
- import a from "classix";
3
- import '../../assets/index54.css';const d = "_label_bfjte_1", p = "_description_bfjte_10", _ = "_inline_bfjte_18", e = {
1
+ import { jsxs as r, jsx as n } from "react/jsx-runtime";
2
+ import c from "classix";
3
+ import '../../assets/index54.css';const d = "_label_w39pq_1", p = "_description_w39pq_13", _ = "_inline_w39pq_21", e = {
4
4
  label: d,
5
5
  description: p,
6
6
  inline: _
7
- }, f = ({
7
+ }, q = ({
8
8
  description: i,
9
9
  descriptionId: l,
10
- inline: o,
11
- label: n,
12
- labelId: t,
13
- required: r
14
- }) => /* @__PURE__ */ c("div", { className: a(o && e.inline, e.label), "data-required": r ? !0 : void 0, "data-component": "label", children: [
15
- t ? /* @__PURE__ */ s("span", { id: t, children: n }) : n,
16
- i && /* @__PURE__ */ s("span", { className: e.description, id: l, children: i })
10
+ inline: s,
11
+ label: t,
12
+ labelId: a,
13
+ required: o
14
+ }) => /* @__PURE__ */ r("div", { className: c(s && e.inline, e.label), "data-component": "label", children: [
15
+ /* @__PURE__ */ n("span", { "data-required": o ? !0 : void 0, id: a, children: t }),
16
+ i && /* @__PURE__ */ n("span", { className: e.description, id: l, children: i })
17
17
  ] });
18
18
  export {
19
- f as Label
19
+ q as Label
20
20
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const m=require("react/jsx-runtime"),H=require("classix"),r=require("react");function T(e){return r.isValidElement(e)&&e.type===r.Fragment}function O(e,n=[]){return r.Children.forEach(e,i=>{T(i)?O(i.props.children,n):n.push(i)}),n}function F(e,{wrapper:n="li"}={}){return O(e).filter(o=>o!==null).map((o,c)=>{if(r.isValidElement(o)&&o.type===n)return o;const d=r.isValidElement(o)&&o.key!=null?o.key:c;return r.createElement(n,{key:d,"data-component":"wrapchildren"},o)})}const V="_controls_uue68_1",A="_horizontal_uue68_9",I="_list_uue68_20",D="_columns_uue68_61",P="_masonry_uue68_71",$="_scrollable_uue68_81",G="_overflowing_uue68_88",J="_sized_uue68_111",K="_compact_uue68_123",l={controls:V,horizontal:A,list:I,columns:D,masonry:P,scrollable:$,overflowing:G,sized:J,compact:K},M=(e,n)=>{typeof e=="function"?e(n):e&&(e.current=n)};function Q({children:e,className:n,columns:i=1,columnWidth:b,compact:o=!1,controls:c,horizontal:d,layout:f="grid",maxVisibleItems:_,ordered:B,ref:p,style:S,...y}){const a=Number.isFinite(i)?Math.max(1,Math.floor(i)):1,h=r.useRef(null),[u,k]=r.useState(),s=f==="grid"&&a===1&&!d&&_!=null&&Number.isFinite(_)&&_>=1?Math.floor(_):void 0,w=!!s&&u!=null;r.useLayoutEffect(()=>{const t=h.current;if(!t||!s)return;const R=()=>{const v=Array.from(t.children).filter(j=>j instanceof HTMLElement&&getComputedStyle(j).display!=="none"),N=v[s-1],q=v.length>s&&N?N.getBoundingClientRect().bottom-t.getBoundingClientRect().top+t.scrollTop+(parseFloat(getComputedStyle(t).paddingBottom)||0):void 0;k(q)},g=new ResizeObserver(R),C=()=>{g.disconnect(),g.observe(t),Array.from(t.children).forEach(v=>g.observe(v)),R()},L=new MutationObserver(C);return L.observe(t,{childList:!0,subtree:!0,characterData:!0}),C(),()=>{g.disconnect(),L.disconnect()}},[e,s,w]);const x=H(n,l.list,f==="masonry"?l.masonry:a>1&&l.columns,!!s&&l.scrollable,w&&l.overflowing,d&&l.horizontal,o&&l.compact,b&&l.sized),z={...S,"--list-columns":a,"--list-column-width":b,"--list-max-height":s&&u!=null?`${u}px`:void 0},E=B?m.jsx("ol",{className:x,ref:t=>{h.current=t,M(p,t)},style:z,...y,"data-layout":f==="masonry"?"masonry":a>1?"columns":void 0,tabIndex:y.tabIndex??(s&&u!=null?0:void 0),"data-component":"list",children:F(e)}):m.jsx("ul",{className:x,ref:t=>{h.current=t,M(p,t)},style:z,...y,"data-layout":f==="masonry"?"masonry":a>1?"columns":void 0,tabIndex:y.tabIndex??(s&&u!=null?0:void 0),"data-component":"list",children:F(e)});return c==null?E:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:l.controls,"data-component":"list",children:c}),E]})}exports.List=Q;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index56.css');const v=require("react/jsx-runtime"),j=require("classix"),s=require("react");function k(t){const[e,r]=s.useState(null),[d,o]=s.useState(),a=!!t&&d!=null,f=s.useCallback(n=>r(n),[]),l=s.useCallback(()=>{if(!e||!t){o(void 0);return}const n=Array.from(e.children).filter(m=>m instanceof HTMLElement&&getComputedStyle(m).display!=="none"),i=t?n[t-1]:void 0,u=t&&n.length>t&&i?i.getBoundingClientRect().bottom-e.getBoundingClientRect().top+e.scrollTop+(parseFloat(getComputedStyle(e).paddingBottom)||0):void 0;o(u)},[e,t]);return s.useLayoutEffect(l),s.useLayoutEffect(()=>{if(!e||!t)return;const n=typeof ResizeObserver>"u"?void 0:new ResizeObserver(l),i=()=>{n==null||n.disconnect(),n==null||n.observe(e),Array.from(e.children).forEach(m=>n==null?void 0:n.observe(m)),l()},u=new MutationObserver(i);return u.observe(e,{childList:!0,subtree:!0,characterData:!0,attributes:!0,attributeFilter:["class","style","hidden"]}),window.addEventListener("resize",l),i(),()=>{n==null||n.disconnect(),u.disconnect(),window.removeEventListener("resize",l)}},[e,t,l]),{ref:f,isOverflowing:a,visibleHeight:d}}function M(t){return s.isValidElement(t)&&t.type===s.Fragment}function F(t,e=[]){return s.Children.forEach(t,r=>{M(r)?F(r.props.children,e):e.push(r)}),e}function N(t,{wrapper:e="li"}={}){return F(t).filter(o=>o!==null).map((o,a)=>{if(s.isValidElement(o)&&o.type===e)return o;const f=s.isValidElement(o)&&o.key!=null?o.key:a;return s.createElement(e,{key:f,"data-component":"wrapchildren"},o)})}const S="_controls_uue68_1",B="_horizontal_uue68_9",z="_list_uue68_20",H="_columns_uue68_61",q="_masonry_uue68_71",T="_scrollable_uue68_81",V="_overflowing_uue68_88",A="_sized_uue68_111",I="_compact_uue68_123",c={controls:S,horizontal:B,list:z,columns:H,masonry:q,scrollable:T,overflowing:V,sized:A,compact:I},L=(t,e)=>{typeof t=="function"?t(e):t&&(t.current=e)};function D({children:t,className:e,columns:r=1,columnWidth:d,compact:o=!1,controls:a,horizontal:f,layout:l="grid",maxVisibleItems:n,ordered:i,ref:u,style:m,..._}){const y=Number.isFinite(r)?Math.max(1,Math.floor(r)):1,g=l==="grid"&&y===1&&!f&&n!=null&&Number.isFinite(n)&&n>=1?Math.floor(n):void 0,{ref:b,isOverflowing:h,visibleHeight:p}=k(g),w=s.useCallback(R=>{b(R),L(u,R)},[b,u]),E=j(e,c.list,l==="masonry"?c.masonry:y>1&&c.columns,!!g&&c.scrollable,h&&c.overflowing,f&&c.horizontal,o&&c.compact,d&&c.sized),x={...m,"--list-columns":y,"--list-column-width":d,"--list-max-height":g&&p!=null?`${p}px`:void 0},C=i?v.jsx("ol",{className:E,ref:w,style:x,..._,"data-layout":l==="masonry"?"masonry":y>1?"columns":void 0,tabIndex:_.tabIndex??(h?0:void 0),"data-component":"list",children:N(t)}):v.jsx("ul",{className:E,ref:w,style:x,..._,"data-layout":l==="masonry"?"masonry":y>1?"columns":void 0,tabIndex:_.tabIndex??(h?0:void 0),"data-component":"list",children:N(t)});return a==null?C:v.jsxs(v.Fragment,{children:[v.jsx("div",{className:c.controls,"data-component":"list",children:a}),C]})}exports.List=D;
@@ -1,88 +1,101 @@
1
- import { jsx as b, jsxs as j, Fragment as A } from "react/jsx-runtime";
2
- import I from "classix";
3
- import i, { useRef as T, useState as D, useLayoutEffect as $ } from "react";
4
- import '../../assets/index56.css';function q(t) {
5
- return i.isValidElement(t) && t.type === i.Fragment;
1
+ import { jsx as h, jsxs as z, Fragment as H } from "react/jsx-runtime";
2
+ import S from "classix";
3
+ import m, { useState as F, useCallback as p, useLayoutEffect as B } from "react";
4
+ import '../../assets/index56.css';function V(t) {
5
+ const [n, l] = F(null), [u, o] = F(), c = !!t && u != null, d = p((e) => l(e), []), s = p(() => {
6
+ if (!n || !t) {
7
+ o(void 0);
8
+ return;
9
+ }
10
+ const e = Array.from(n.children).filter((f) => f instanceof HTMLElement && getComputedStyle(f).display !== "none"), a = t ? e[t - 1] : void 0, i = t && e.length > t && a ? a.getBoundingClientRect().bottom - n.getBoundingClientRect().top + n.scrollTop + (parseFloat(getComputedStyle(n).paddingBottom) || 0) : void 0;
11
+ o(i);
12
+ }, [n, t]);
13
+ return B(s), B(() => {
14
+ if (!n || !t) return;
15
+ const e = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(s), a = () => {
16
+ e == null || e.disconnect(), e == null || e.observe(n), Array.from(n.children).forEach((f) => e == null ? void 0 : e.observe(f)), s();
17
+ }, i = new MutationObserver(a);
18
+ return i.observe(n, {
19
+ childList: !0,
20
+ subtree: !0,
21
+ characterData: !0,
22
+ attributes: !0,
23
+ attributeFilter: ["class", "style", "hidden"]
24
+ }), window.addEventListener("resize", s), a(), () => {
25
+ e == null || e.disconnect(), i.disconnect(), window.removeEventListener("resize", s);
26
+ };
27
+ }, [n, t, s]), {
28
+ ref: d,
29
+ isOverflowing: c,
30
+ visibleHeight: u
31
+ };
32
+ }
33
+ function j(t) {
34
+ return m.isValidElement(t) && t.type === m.Fragment;
6
35
  }
7
- function O(t, n = []) {
8
- return i.Children.forEach(t, (r) => {
9
- q(r) ? O(r.props.children, n) : n.push(r);
36
+ function k(t, n = []) {
37
+ return m.Children.forEach(t, (l) => {
38
+ j(l) ? k(l.props.children, n) : n.push(l);
10
39
  }), n;
11
40
  }
12
- function B(t, {
41
+ function M(t, {
13
42
  wrapper: n = "li"
14
43
  } = {}) {
15
- return O(t).filter((o) => o !== null).map((o, c) => {
16
- if (i.isValidElement(o) && o.type === n)
44
+ return k(t).filter((o) => o !== null).map((o, c) => {
45
+ if (m.isValidElement(o) && o.type === n)
17
46
  return o;
18
- const m = i.isValidElement(o) && o.key != null ? o.key : c;
19
- return i.createElement(n, {
20
- key: m,
47
+ const d = m.isValidElement(o) && o.key != null ? o.key : c;
48
+ return m.createElement(n, {
49
+ key: d,
21
50
  "data-component": "wrapchildren"
22
51
  }, o);
23
52
  });
24
53
  }
25
- const G = "_controls_uue68_1", J = "_horizontal_uue68_9", K = "_list_uue68_20", P = "_columns_uue68_61", Q = "_masonry_uue68_71", U = "_scrollable_uue68_81", X = "_overflowing_uue68_88", Y = "_sized_uue68_111", Z = "_compact_uue68_123", l = {
26
- controls: G,
27
- horizontal: J,
28
- list: K,
29
- columns: P,
30
- masonry: Q,
31
- scrollable: U,
32
- overflowing: X,
33
- sized: Y,
34
- compact: Z
35
- }, M = (t, n) => {
54
+ const A = "_controls_uue68_1", I = "_horizontal_uue68_9", T = "_list_uue68_20", D = "_columns_uue68_61", $ = "_masonry_uue68_71", q = "_scrollable_uue68_81", G = "_overflowing_uue68_88", J = "_sized_uue68_111", K = "_compact_uue68_123", r = {
55
+ controls: A,
56
+ horizontal: I,
57
+ list: T,
58
+ columns: D,
59
+ masonry: $,
60
+ scrollable: q,
61
+ overflowing: G,
62
+ sized: J,
63
+ compact: K
64
+ }, L = (t, n) => {
36
65
  typeof t == "function" ? t(n) : t && (t.current = n);
37
66
  };
38
- function nt({
67
+ function U({
39
68
  children: t,
40
69
  className: n,
41
- columns: r = 1,
42
- columnWidth: g,
70
+ columns: l = 1,
71
+ columnWidth: u,
43
72
  compact: o = !1,
44
73
  controls: c,
45
- horizontal: m,
46
- layout: f = "grid",
47
- maxVisibleItems: d,
48
- ordered: k,
49
- ref: h,
50
- style: H,
51
- ..._
74
+ horizontal: d,
75
+ layout: s = "grid",
76
+ maxVisibleItems: e,
77
+ ordered: a,
78
+ ref: i,
79
+ style: f,
80
+ ...v
52
81
  }) {
53
- const a = Number.isFinite(r) ? Math.max(1, Math.floor(r)) : 1, p = T(null), [u, S] = D(), s = f === "grid" && a === 1 && !m && d != null && Number.isFinite(d) && d >= 1 ? Math.floor(d) : void 0, w = !!s && u != null;
54
- $(() => {
55
- const e = p.current;
56
- if (!e || !s) return;
57
- const C = () => {
58
- const y = Array.from(e.children).filter((L) => L instanceof HTMLElement && getComputedStyle(L).display !== "none"), F = y[s - 1], V = y.length > s && F ? F.getBoundingClientRect().bottom - e.getBoundingClientRect().top + e.scrollTop + (parseFloat(getComputedStyle(e).paddingBottom) || 0) : void 0;
59
- S(V);
60
- }, v = new ResizeObserver(C), N = () => {
61
- v.disconnect(), v.observe(e), Array.from(e.children).forEach((y) => v.observe(y)), C();
62
- }, R = new MutationObserver(N);
63
- return R.observe(e, {
64
- childList: !0,
65
- subtree: !0,
66
- characterData: !0
67
- }), N(), () => {
68
- v.disconnect(), R.disconnect();
69
- };
70
- }, [t, s, w]);
71
- const z = I(n, l.list, f === "masonry" ? l.masonry : a > 1 && l.columns, !!s && l.scrollable, w && l.overflowing, m && l.horizontal, o && l.compact, g && l.sized), E = {
72
- ...H,
73
- "--list-columns": a,
74
- "--list-column-width": g,
75
- "--list-max-height": s && u != null ? `${u}px` : void 0
76
- }, x = k ? /* @__PURE__ */ b("ol", { className: z, ref: (e) => {
77
- p.current = e, M(h, e);
78
- }, style: E, ..._, "data-layout": f === "masonry" ? "masonry" : a > 1 ? "columns" : void 0, tabIndex: _.tabIndex ?? (s && u != null ? 0 : void 0), "data-component": "list", children: B(t) }) : /* @__PURE__ */ b("ul", { className: z, ref: (e) => {
79
- p.current = e, M(h, e);
80
- }, style: E, ..._, "data-layout": f === "masonry" ? "masonry" : a > 1 ? "columns" : void 0, tabIndex: _.tabIndex ?? (s && u != null ? 0 : void 0), "data-component": "list", children: B(t) });
81
- return c == null ? x : /* @__PURE__ */ j(A, { children: [
82
- /* @__PURE__ */ b("div", { className: l.controls, "data-component": "list", children: c }),
83
- x
82
+ const _ = Number.isFinite(l) ? Math.max(1, Math.floor(l)) : 1, y = s === "grid" && _ === 1 && !d && e != null && Number.isFinite(e) && e >= 1 ? Math.floor(e) : void 0, {
83
+ ref: b,
84
+ isOverflowing: g,
85
+ visibleHeight: w
86
+ } = V(y), E = p((R) => {
87
+ b(R), L(i, R);
88
+ }, [b, i]), x = S(n, r.list, s === "masonry" ? r.masonry : _ > 1 && r.columns, !!y && r.scrollable, g && r.overflowing, d && r.horizontal, o && r.compact, u && r.sized), C = {
89
+ ...f,
90
+ "--list-columns": _,
91
+ "--list-column-width": u,
92
+ "--list-max-height": y && w != null ? `${w}px` : void 0
93
+ }, N = a ? /* @__PURE__ */ h("ol", { className: x, ref: E, style: C, ...v, "data-layout": s === "masonry" ? "masonry" : _ > 1 ? "columns" : void 0, tabIndex: v.tabIndex ?? (g ? 0 : void 0), "data-component": "list", children: M(t) }) : /* @__PURE__ */ h("ul", { className: x, ref: E, style: C, ...v, "data-layout": s === "masonry" ? "masonry" : _ > 1 ? "columns" : void 0, tabIndex: v.tabIndex ?? (g ? 0 : void 0), "data-component": "list", children: M(t) });
94
+ return c == null ? N : /* @__PURE__ */ z(H, { children: [
95
+ /* @__PURE__ */ h("div", { className: r.controls, "data-component": "list", children: c }),
96
+ N
84
97
  ] });
85
98
  }
86
99
  export {
87
- nt as List
100
+ U as List
88
101
  };