@solibo/solibo-ui 2.2.2 → 2.2.5

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,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const l=require("react/jsx-runtime"),v=require("classix"),a=require("react"),F=require("../button/index.cjs"),de=require("../../icons-BIdcCH-v.cjs"),X=require("../../index-7blZaPiA.cjs"),pe=require("../list/index.cjs"),V=require("../../index-VLDsM9it.cjs");function L(n){return typeof n=="string"||typeof n=="number"?String(n):Array.isArray(n)?n.map(L).join(" "):a.isValidElement(n)?L(n.props.children):""}function fe(n){return a.isValidElement(n)&&n.type==="option"}function me(n){return a.isValidElement(n)&&n.type==="optgroup"}function _e(n){return a.isValidElement(n)&&n.type===a.Fragment}function he(n){return a.isValidElement(n)&&n.type===V.Select}function M(n,i,r=!1){const s=[];return a.Children.forEach(n,t=>{if(_e(t))s.push(...M(t.props.children,i,r));else if(fe(t)){const c=L(t.props.children).trim(),f=t.props.value!=null?String(t.props.value):c;s.push({disabled:r||!!t.props.disabled,groupLabel:i,hidden:!!t.props.hidden,isPlaceholder:!!(t.props.hidden&&f===""),label:t.props.children,selected:!!t.props.selected,text:c,value:f})}else me(t)&&s.push(...M(t.props.children,t.props.label,r||!!t.props.disabled))}),s}function ge(n){const i=n.trim();if(!i)return null;const s=[.../[*?]/.test(i)?i:`*${i}*`].map(t=>t==="*"?".*":t==="?"?".":t.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${s}$`,"i")}function xe(n,i){const r=ge(i),s=n.filter(t=>!t.hidden&&!t.isPlaceholder);return r?s.filter(t=>r.test([t.groupLabel,t.text,t.value].filter(Boolean).join(" "))):s}function be(n,i){return n.find(r=>r.value===i)??n.find(r=>r.isPlaceholder)??n[0]}function ve(n,i,r){var s,t;return i!=null?String(i):r!=null?String(r):((s=n.find(c=>c.selected))==null?void 0:s.value)??((t=n[0])==null?void 0:t.value)??""}function ye(n){if(he(n)){const{children:i,placeholder:r,...s}=n.props;return{children:l.jsxs(l.Fragment,{children:[r&&l.jsx("option",{hidden:!0,value:"",children:r}),i]}),props:s}}return{children:n.props.children,props:n.props}}const we="_combobox_5r227_3",je="_dropdown_5r227_20",Se="_empty_5r227_25",Ne="_group_5r227_26",Ce="_placeholder_5r227_27",Ee="_filter_5r227_35",Ve="_native_5r227_45",Le="_option_5r227_55",Re="_options_5r227_76",$e="_panel_5r227_83",Be="_selected_5r227_108",Ie="_text_5r227_112",qe="_trigger_5r227_120",De="_minimal_5r227_157",Pe="_inline_5r227_217",ke="_label_5r227_249",o={combobox:we,"combobox-input":"_combobox-input_5r227_12",dropdown:je,empty:Se,group:Ne,placeholder:Ce,filter:Ee,native:Ve,option:Le,options:Re,panel:$e,selected:Be,text:Ie,trigger:qe,minimal:De,inline:Pe,label:ke,"inline-field":"_inline-field_5r227_255"};function Y(n,i){return{"--icon-svg":de.iconSVG(n,i)}}const Fe=({children:n,className:i,combobox:r=!1,createOption:s,emptyLabel:t="No matches found",label:c,renderOption:f,searchPlaceholder:R="Filter",selectedItems:Z,variant:g="default",...ee})=>{const $=ye(n),{defaultValue:ne,onChange:B,value:I,...te}=$.props,y=V.sanitizeSelectProps(te),{className:re,...se}=y,W=a.useRef(null),G=a.useRef(null),w=a.useId(),Q=a.useRef(null),m=a.useRef(null),x=M($.children),b=I!=null,q=ve(x,I,ne),[D,P]=a.useState(()=>q),[u,p]=a.useState(!1),[j,S]=a.useState(""),N=b?String(I):D,z={default:V.resolveColor("--colors-semantic-content-secondary"),white:V.resolveColor("--color-white","white")},O=g==="minimal"?z.white:z.default,C=be(x,N),le=Y("CaretDown",O),oe=Y("MagnifyingGlass",O),T=xe(x,j),_=j.trim(),E=!!(r&&s&&_&&s.isValid(_)),ie=c&&g==="inline"?X.formatInlineLabel(c):c,A=e=>e?(f==null?void 0:f({groupLabel:e.groupLabel,isSelected:e.value===N,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";a.useEffect(()=>{!b&&!x.some(e=>e.value===D)&&P(q)},[q,D,b,x]),a.useEffect(()=>{var e;if(!u){S("");return}(e=m.current)==null||e.focus()},[u]),a.useEffect(()=>{if(!u)return;const e=d=>{var h;(h=G.current)!=null&&h.contains(d.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[u]);const ae=e=>{b||P(e.target.value),B==null||B(e)},k=()=>{var e;p(!1),r||(e=W.current)==null||e.focus()},K=()=>{var e;S(""),p(!0),(e=m.current)==null||e.focus()},H=()=>{!s||!E||(s.onCreate(_),K())},ce=e=>{var U;b||P(e);const d=Q.current;if(!d){k();return}const h=(U=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:U.set;h==null||h.call(d,e),d.dispatchEvent(new Event("change",{bubbles:!0})),r?K():k()},ue=e=>{e.key==="Escape"&&k(),e.key==="Enter"&&e.target===m.current&&E&&(e.preventDefault(),H())},J=l.jsxs("div",{className:v(o.dropdown,g==="inline"&&o.inline,g==="minimal"&&o.minimal,i),onKeyDown:ue,ref:G,...ee,"data-component":"dropdown",children:[l.jsx("select",{...se,"aria-hidden":"true",className:v(o.native,re),onChange:ae,ref:Q,tabIndex:-1,value:N,children:$.children}),r?l.jsxs("div",{className:o.combobox,onClick:()=>{var e;return(e=m.current)==null?void 0:e.focus()},children:[Z,l.jsx("input",{"aria-autocomplete":"list","aria-expanded":u,"aria-label":y["aria-label"]??c??R,className:o["combobox-input"],disabled:y.disabled,onChange:e=>{S(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:R||void 0,ref:m,role:"combobox",type:"text",value:j})]}):l.jsx(F.Button,{"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":c?`${w} ${w}-value`:void 0,className:v(o.trigger,(C==null?void 0:C.isPlaceholder)&&o.placeholder),"data-open":u?"true":void 0,disabled:y.disabled,onClick:()=>p(e=>!e),ref:W,style:le,variant:"simple",children:l.jsx("span",{className:o.text,id:`${w}-value`,children:A(C)})}),u&&l.jsxs("div",{className:o.panel,children:[!r&&l.jsx(X.Input,{"aria-label":"Filter",className:o.filter,icon:"MagnifyingGlass",onChange:e=>S(e.target.value),placeholder:R,ref:m,style:oe,type:"search",value:j}),l.jsxs(pe.List,{"aria-label":"Dropdown",className:o.options,children:[T.map(e=>{const d=e.value===N;return l.jsx("li",{"data-component":"dropdown",children:l.jsxs(F.Button,{"aria-label":d?`${e.text}, selected`:e.text,className:v(o.option,d&&o.selected),disabled:e.disabled,onClick:()=>ce(e.value),variant:"tertiary",children:[l.jsx("span",{className:o.text,children:A(e)}),e.groupLabel&&l.jsx("small",{className:o.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),E&&s&&l.jsx("li",{children:l.jsx(F.Button,{"aria-label":L(s.render(_))||_,className:o.option,onClick:H,variant:"tertiary",children:l.jsx("span",{className:o.text,children:s.render(_)})})}),T.length===0&&!E&&l.jsx("li",{className:o.empty,children:t})]})]})]});return c?l.jsxs("div",{className:v(o.label,g==="inline"&&o["inline-field"]),"data-component":"dropdown",children:[l.jsx("span",{id:w,children:ie}),J]}):J};exports.Dropdown=Fe;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const s=require("react/jsx-runtime"),C=require("classix"),r=require("react"),V=require("../button/index.cjs"),$e=require("../../icons-BIdcCH-v.cjs"),fe=require("../../index-7blZaPiA.cjs"),De=require("../list/index.cjs"),Fe=require("../loading/index.cjs"),F=require("../../index-VLDsM9it.cjs");function L(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(L).join(" "):r.isValidElement(t)?L(t.props.children):""}function Le(t){return r.isValidElement(t)&&t.type==="option"}function Me(t){return r.isValidElement(t)&&t.type==="optgroup"}function Qe(t){return r.isValidElement(t)&&t.type===r.Fragment}function We(t){return r.isValidElement(t)&&t.type===F.Select}function Z(t,c,i=!1){const o=[];return r.Children.forEach(t,n=>{if(Qe(n))o.push(...Z(n.props.children,c,i));else if(Le(n)){const a=L(n.props.children).trim(),h=n.props.value!=null?String(n.props.value):a;o.push({disabled:i||!!n.props.disabled,groupLabel:c,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&h===""),label:n.props.children,selected:!!n.props.selected,text:a,value:h})}else Me(n)&&o.push(...Z(n.props.children,n.props.label,i||!!n.props.disabled))}),o}function ze(t){const c=t.trim();if(!c)return null;const o=[.../[*?]/.test(c)?c:`*${c}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${o}$`,"i")}function Ge(t,c){const i=ze(c),o=t.filter(n=>!n.hidden&&!n.isPlaceholder);return i?o.filter(n=>i.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):o}function Pe(t,c){return t.find(i=>i.value===c)??t.find(i=>i.isPlaceholder)??t[0]}function Te(t,c,i){var o,n;return c!=null?String(c):i!=null?String(i):((o=t.find(a=>a.selected))==null?void 0:o.value)??((n=t[0])==null?void 0:n.value)??""}function Ae(t){if(We(t)){const{children:c,placeholder:i,...o}=t.props;return{children:s.jsxs(s.Fragment,{children:[i&&s.jsx("option",{hidden:!0,value:"",children:i}),c]}),props:o}}return{children:t.props.children,props:t.props}}const Ke="_combobox_5r227_3",Oe="_dropdown_5r227_20",He="_empty_5r227_25",Je="_group_5r227_26",Ue="_placeholder_5r227_27",Xe="_filter_5r227_35",Ye="_native_5r227_45",Ze="_option_5r227_55",et="_options_5r227_76",tt="_panel_5r227_83",nt="_selected_5r227_108",st="_text_5r227_112",rt="_trigger_5r227_120",lt="_minimal_5r227_157",it="_inline_5r227_217",ot="_label_5r227_249",l={combobox:Ke,"combobox-input":"_combobox-input_5r227_12",dropdown:Oe,empty:He,group:Je,placeholder:Ue,filter:Xe,native:Ye,option:Ze,options:et,panel:tt,selected:nt,text:st,trigger:rt,minimal:lt,inline:it,label:ot,"inline-field":"_inline-field_5r227_255"};function pe(t,c){return{"--icon-svg":$e.iconSVG(t,c)}}const ct=({children:t,className:c,combobox:i=!1,createOption:o,emptyLabel:n="No matches found",errorLabel:a,onRetry:h,retryLabel:me="Retry",label:b,filterOptions:_e=!0,hasNextPage:v=!1,loading:m=!1,loadMoreLabel:be="Load more",onLoadMore:g,onOpenChange:I,onSearchChange:B,searchValue:M,renderOption:Q,searchPlaceholder:W="Filter",selectedItems:ve,variant:j="default",...xe})=>{const z=Ae(t),{defaultValue:ye,onChange:G,value:P,...he}=z.props,u=F.sanitizeSelectProps(he),{className:ge,...je}=u,ee=r.useRef(null),te=r.useRef(null),k=r.useId(),ne=r.useRef(null),x=r.useRef(null),se=r.useRef(null),re=r.useRef(null),T=r.useRef(!1),A=r.useRef(!1),K=r.useRef(g),le=!!g,w=Z(z.children),E=P!=null,O=Te(w,P,ye),[H,J]=r.useState(()=>O),[d,we]=r.useState(!1),[Ee,Re]=r.useState(""),R=M??Ee,N=r.useCallback(e=>{M===void 0&&Re(e),B==null||B(e)},[B,M]),p=r.useCallback(e=>{T.current===e||e&&u.disabled||(T.current=e,we(e),I==null||I(e),e||N(""))},[I,u.disabled,N]),q=E?String(P):H,ie={default:F.resolveColor("--colors-semantic-content-secondary"),white:F.resolveColor("--color-white","white")},oe=j==="minimal"?ie.white:ie.default,$=Pe(w,q),Ne=pe("CaretDown",oe),Se=pe("MagnifyingGlass",oe),U=Ge(w,_e?R:""),y=R.trim(),D=!!(i&&o&&y&&o.isValid(y)),Ce=b&&j==="inline"?fe.formatInlineLabel(b):b,ce=e=>e?(Q==null?void 0:Q({groupLabel:e.groupLabel,isSelected:e.value===q,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";r.useEffect(()=>{!E&&!w.some(e=>e.value===H)&&J(O)},[O,H,E,w]),r.useEffect(()=>{var e;d&&((e=x.current)==null||e.focus())},[d]),r.useEffect(()=>{if(!d)return;const e=f=>{var _;(_=te.current)!=null&&_.contains(f.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[p,d]),r.useEffect(()=>{K.current=g},[g]),r.useEffect(()=>{u.disabled&&p(!1)},[p,u.disabled]);const X=r.useCallback(()=>{!T.current||u.disabled||m||a||!v||!K.current||A.current||(A.current=!0,K.current())},[a,v,m,u.disabled]);r.useEffect(()=>{if(A.current=!1,!d||u.disabled||m||a||!v||!le)return;const e=re.current,f=se.current;if(!e||!f||typeof IntersectionObserver>"u")return;let _=!0;const S=new IntersectionObserver(ke=>{_&&ke.some(qe=>qe.isIntersecting)&&X()},{root:f});return S.observe(e),()=>{_=!1,S.disconnect()}},[d,m,a,v,le,X,U.length,R,u.disabled]);const Ve=e=>{E||J(e.target.value),G==null||G(e)},Y=()=>{var e;p(!1),i||(e=ee.current)==null||e.focus()},ae=()=>{var e;N(""),p(!0),(e=x.current)==null||e.focus()},ue=()=>{!o||!D||(o.onCreate(y),ae())},Ie=e=>{var S;E||J(e);const f=ne.current;if(!f){Y();return}const _=(S=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:S.set;_==null||_.call(f,e),f.dispatchEvent(new Event("change",{bubbles:!0})),i?ae():Y()},Be=e=>{e.key==="Escape"&&Y(),e.key==="Enter"&&e.target===x.current&&D&&(e.preventDefault(),ue())},de=s.jsxs("div",{className:C(l.dropdown,j==="inline"&&l.inline,j==="minimal"&&l.minimal,c),onKeyDown:Be,ref:te,...xe,"data-component":"dropdown",children:[s.jsx("select",{...je,"aria-hidden":"true",className:C(l.native,ge),onChange:Ve,ref:ne,tabIndex:-1,value:q,children:z.children}),i?s.jsxs("div",{className:l.combobox,onClick:()=>{var e;return(e=x.current)==null?void 0:e.focus()},children:[ve,s.jsx("input",{"aria-autocomplete":"list","aria-expanded":d,"aria-label":u["aria-label"]??b??W,className:l["combobox-input"],disabled:u.disabled,onChange:e=>{N(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:W||void 0,ref:x,role:"combobox",type:"text",value:R})]}):s.jsx(V.Button,{"aria-expanded":d,"aria-haspopup":"dialog","aria-labelledby":b?`${k} ${k}-value`:void 0,className:C(l.trigger,($==null?void 0:$.isPlaceholder)&&l.placeholder),"data-open":d?"true":void 0,disabled:u.disabled,onClick:()=>p(!d),ref:ee,style:Ne,variant:"simple",children:s.jsx("span",{className:l.text,id:`${k}-value`,children:ce($)})}),d&&s.jsxs("div",{className:l.panel,children:[!i&&s.jsx(fe.Input,{"aria-label":"Filter",className:l.filter,icon:"MagnifyingGlass",onChange:e=>N(e.target.value),placeholder:W,ref:x,style:Se,type:"search",value:R}),s.jsxs(De.List,{"aria-label":"Dropdown","aria-busy":m||void 0,className:l.options,ref:se,children:[U.map(e=>{const f=e.value===q;return s.jsx("li",{"data-component":"dropdown",children:s.jsxs(V.Button,{"aria-label":f?`${e.text}, selected`:e.text,className:C(l.option,f&&l.selected),disabled:e.disabled,onClick:()=>Ie(e.value),variant:"tertiary",children:[s.jsx("span",{className:l.text,children:ce(e)}),e.groupLabel&&s.jsx("small",{className:l.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),D&&o&&s.jsx("li",{children:s.jsx(V.Button,{"aria-label":L(o.render(y))||y,className:l.option,onClick:ue,variant:"tertiary",children:s.jsx("span",{className:l.text,children:o.render(y)})})}),U.length===0&&!D&&!m&&!a&&!v&&s.jsx("li",{className:l.empty,children:n}),a&&s.jsxs("li",{className:l.empty,children:[s.jsx("span",{role:"alert",children:a}),h&&s.jsx(V.Button,{disabled:m,onClick:h,variant:"tertiary",children:me})]}),m&&s.jsx("li",{"aria-label":"Loading",className:l.empty,role:"status",children:s.jsx(Fe.Loading,{size:"small"})}),v&&g&&!a&&s.jsx("li",{ref:re,children:s.jsx(V.Button,{className:l.option,disabled:m,onClick:X,variant:"tertiary",children:be})})]})]})]});return b?s.jsxs("div",{className:C(l.label,j==="inline"&&l["inline-field"]),"data-component":"dropdown",children:[s.jsx("span",{id:k,children:Ce}),de]}):de};exports.Dropdown=ct;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,76 +1,77 @@
1
- import { jsxs as p, Fragment as fe, jsx as i } from "react/jsx-runtime";
2
- import y from "classix";
3
- import he, { Children as _e, isValidElement as x, useRef as L, useId as ge, useState as W, useEffect as G } from "react";
4
- import { Button as Q } from "../button/index.js";
5
- import { i as be } from "../../icons-DVeBguFb.js";
6
- import { f as ve, I as ye } from "../../index-Dd20d_9U.js";
7
- import { List as xe } from "../list/index.js";
8
- import { S as we, s as Ne, r as ee } from "../../index-Dx-KtGBg.js";
9
- import '../../assets/index41.css';function $(t) {
10
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map($).join(" ") : x(t) ? $(t.props.children) : "";
1
+ import { jsxs as _, Fragment as We, jsx as o } from "react/jsx-runtime";
2
+ import $ from "classix";
3
+ import ze, { Children as Ge, isValidElement as B, useRef as b, useId as Me, useState as te, useCallback as ne, useEffect as w } from "react";
4
+ import { Button as k } from "../button/index.js";
5
+ import { i as Pe } from "../../icons-DVeBguFb.js";
6
+ import { f as qe, I as Ae } from "../../index-Dd20d_9U.js";
7
+ import { List as Ke } from "../list/index.js";
8
+ import { Loading as Te } from "../loading/index.js";
9
+ import { S as He, s as Oe, r as _e } from "../../index-Dx-KtGBg.js";
10
+ import '../../assets/index41.css';function z(t) {
11
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(z).join(" ") : B(t) ? z(t.props.children) : "";
11
12
  }
12
- function Se(t) {
13
- return x(t) && t.type === "option";
13
+ function Je(t) {
14
+ return B(t) && t.type === "option";
14
15
  }
15
- function Ce(t) {
16
- return x(t) && t.type === "optgroup";
16
+ function Ue(t) {
17
+ return B(t) && t.type === "optgroup";
17
18
  }
18
- function Ee(t) {
19
- return x(t) && t.type === he.Fragment;
19
+ function Xe(t) {
20
+ return B(t) && t.type === ze.Fragment;
20
21
  }
21
- function Ve(t) {
22
- return x(t) && t.type === we;
22
+ function Ye(t) {
23
+ return B(t) && t.type === He;
23
24
  }
24
- function z(t, s, r = !1) {
25
- const l = [];
26
- return _e.forEach(t, (n) => {
27
- if (Ee(n))
28
- l.push(...z(n.props.children, s, r));
29
- else if (Se(n)) {
30
- const a = $(n.props.children).trim(), m = n.props.value != null ? String(n.props.value) : a;
31
- l.push({
32
- disabled: r || !!n.props.disabled,
33
- groupLabel: s,
25
+ function re(t, i, l = !1) {
26
+ const s = [];
27
+ return Ge.forEach(t, (n) => {
28
+ if (Xe(n))
29
+ s.push(...re(n.props.children, i, l));
30
+ else if (Je(n)) {
31
+ const a = z(n.props.children).trim(), x = n.props.value != null ? String(n.props.value) : a;
32
+ s.push({
33
+ disabled: l || !!n.props.disabled,
34
+ groupLabel: i,
34
35
  hidden: !!n.props.hidden,
35
- isPlaceholder: !!(n.props.hidden && m === ""),
36
+ isPlaceholder: !!(n.props.hidden && x === ""),
36
37
  label: n.props.children,
37
38
  selected: !!n.props.selected,
38
39
  text: a,
39
- value: m
40
+ value: x
40
41
  });
41
- } else Ce(n) && l.push(...z(n.props.children, n.props.label, r || !!n.props.disabled));
42
- }), l;
42
+ } else Ue(n) && s.push(...re(n.props.children, n.props.label, l || !!n.props.disabled));
43
+ }), s;
43
44
  }
44
- function Ie(t) {
45
- const s = t.trim();
46
- if (!s) return null;
47
- const l = [.../[*?]/.test(s) ? s : `*${s}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
48
- return new RegExp(`^${l}$`, "i");
45
+ function Ze(t) {
46
+ const i = t.trim();
47
+ if (!i) return null;
48
+ const s = [.../[*?]/.test(i) ? i : `*${i}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
49
+ return new RegExp(`^${s}$`, "i");
49
50
  }
50
- function Le(t, s) {
51
- const r = Ie(s), l = t.filter((n) => !n.hidden && !n.isPlaceholder);
52
- return r ? l.filter((n) => r.test([n.groupLabel, n.text, n.value].filter(Boolean).join(" "))) : l;
51
+ function et(t, i) {
52
+ const l = Ze(i), s = t.filter((n) => !n.hidden && !n.isPlaceholder);
53
+ return l ? s.filter((n) => l.test([n.groupLabel, n.text, n.value].filter(Boolean).join(" "))) : s;
53
54
  }
54
- function $e(t, s) {
55
- return t.find((r) => r.value === s) ?? t.find((r) => r.isPlaceholder) ?? t[0];
55
+ function tt(t, i) {
56
+ return t.find((l) => l.value === i) ?? t.find((l) => l.isPlaceholder) ?? t[0];
56
57
  }
57
- function Be(t, s, r) {
58
- var l, n;
59
- return s != null ? String(s) : r != null ? String(r) : ((l = t.find((a) => a.selected)) == null ? void 0 : l.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
58
+ function nt(t, i, l) {
59
+ var s, n;
60
+ return i != null ? String(i) : l != null ? String(l) : ((s = t.find((a) => a.selected)) == null ? void 0 : s.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
60
61
  }
61
- function De(t) {
62
- if (Ve(t)) {
62
+ function rt(t) {
63
+ if (Ye(t)) {
63
64
  const {
64
- children: s,
65
- placeholder: r,
66
- ...l
65
+ children: i,
66
+ placeholder: l,
67
+ ...s
67
68
  } = t.props;
68
69
  return {
69
- children: /* @__PURE__ */ p(fe, { children: [
70
- r && /* @__PURE__ */ i("option", { hidden: !0, value: "", children: r }),
71
- s
70
+ children: /* @__PURE__ */ _(We, { children: [
71
+ l && /* @__PURE__ */ o("option", { hidden: !0, value: "", children: l }),
72
+ i
72
73
  ] }),
73
- props: l
74
+ props: s
74
75
  };
75
76
  }
76
77
  return {
@@ -78,138 +79,176 @@ function De(t) {
78
79
  props: t.props
79
80
  };
80
81
  }
81
- const Pe = "_combobox_5r227_3", ke = "_dropdown_5r227_20", Re = "_empty_5r227_25", je = "_group_5r227_26", Fe = "_placeholder_5r227_27", Me = "_filter_5r227_35", We = "_native_5r227_45", Ge = "_option_5r227_55", Qe = "_options_5r227_76", ze = "_panel_5r227_83", Ae = "_selected_5r227_108", Ke = "_text_5r227_112", Oe = "_trigger_5r227_120", Te = "_minimal_5r227_157", qe = "_inline_5r227_217", He = "_label_5r227_249", o = {
82
- combobox: Pe,
82
+ const lt = "_combobox_5r227_3", st = "_dropdown_5r227_20", it = "_empty_5r227_25", ot = "_group_5r227_26", at = "_placeholder_5r227_27", ct = "_filter_5r227_35", ut = "_native_5r227_45", dt = "_option_5r227_55", pt = "_options_5r227_76", ft = "_panel_5r227_83", mt = "_selected_5r227_108", bt = "_text_5r227_112", _t = "_trigger_5r227_120", vt = "_minimal_5r227_157", yt = "_inline_5r227_217", ht = "_label_5r227_249", r = {
83
+ combobox: lt,
83
84
  "combobox-input": "_combobox-input_5r227_12",
84
- dropdown: ke,
85
- empty: Re,
86
- group: je,
87
- placeholder: Fe,
88
- filter: Me,
89
- native: We,
90
- option: Ge,
91
- options: Qe,
92
- panel: ze,
93
- selected: Ae,
94
- text: Ke,
95
- trigger: Oe,
96
- minimal: Te,
97
- inline: qe,
98
- label: He,
85
+ dropdown: st,
86
+ empty: it,
87
+ group: ot,
88
+ placeholder: at,
89
+ filter: ct,
90
+ native: ut,
91
+ option: dt,
92
+ options: pt,
93
+ panel: ft,
94
+ selected: mt,
95
+ text: bt,
96
+ trigger: _t,
97
+ minimal: vt,
98
+ inline: yt,
99
+ label: ht,
99
100
  "inline-field": "_inline-field_5r227_255"
100
101
  };
101
- function te(t, s) {
102
+ function ve(t, i) {
102
103
  return {
103
- "--icon-svg": be(t, s)
104
+ "--icon-svg": Pe(t, i)
104
105
  };
105
106
  }
106
- const rt = ({
107
+ const Vt = ({
107
108
  children: t,
108
- className: s,
109
- combobox: r = !1,
110
- createOption: l,
109
+ className: i,
110
+ combobox: l = !1,
111
+ createOption: s,
111
112
  emptyLabel: n = "No matches found",
112
- label: a,
113
- renderOption: m,
114
- searchPlaceholder: B = "Filter",
115
- selectedItems: ne,
116
- variant: g = "default",
117
- ...re
113
+ errorLabel: a,
114
+ onRetry: x,
115
+ retryLabel: ye = "Retry",
116
+ label: v,
117
+ filterOptions: he = !0,
118
+ hasNextPage: y = !1,
119
+ loading: f = !1,
120
+ loadMoreLabel: ge = "Load more",
121
+ onLoadMore: N,
122
+ onOpenChange: D,
123
+ onSearchChange: j,
124
+ searchValue: G,
125
+ renderOption: M,
126
+ searchPlaceholder: P = "Filter",
127
+ selectedItems: we,
128
+ variant: S = "default",
129
+ ...xe
118
130
  }) => {
119
- const D = De(t), {
120
- defaultValue: le,
121
- onChange: P,
122
- value: k,
123
- ...oe
124
- } = D.props, w = Ne(oe), {
125
- className: se,
126
- ...ie
127
- } = w, A = L(null), K = L(null), N = ge(), O = L(null), f = L(null), b = z(D.children), v = k != null, R = Be(b, k, le), [j, F] = W(() => R), [c, d] = W(!1), [S, C] = W(""), E = v ? String(k) : j, T = {
128
- default: ee("--colors-semantic-content-secondary"),
129
- white: ee("--color-white", "white")
130
- }, q = g === "minimal" ? T.white : T.default, V = $e(b, E), ae = te("CaretDown", q), ce = te("MagnifyingGlass", q), H = Le(b, S), h = S.trim(), I = !!(r && l && h && l.isValid(h)), ue = a && g === "inline" ? ve(a) : a, J = (e) => e ? (m == null ? void 0 : m({
131
+ const q = rt(t), {
132
+ defaultValue: Ne,
133
+ onChange: A,
134
+ value: K,
135
+ ...Se
136
+ } = q.props, c = Oe(Se), {
137
+ className: Ie,
138
+ ...Ee
139
+ } = c, le = b(null), se = b(null), F = Me(), ie = b(null), h = b(null), oe = b(null), ae = b(null), T = b(!1), H = b(!1), O = b(N), ce = !!N, I = re(q.children), E = K != null, J = nt(I, K, Ne), [U, X] = te(() => J), [u, Re] = te(!1), [Ce, Ve] = te(""), R = G ?? Ce, C = ne((e) => {
140
+ G === void 0 && Ve(e), j == null || j(e);
141
+ }, [j, G]), p = ne((e) => {
142
+ T.current === e || e && c.disabled || (T.current = e, Re(e), D == null || D(e), e || C(""));
143
+ }, [D, c.disabled, C]), L = E ? String(K) : U, ue = {
144
+ default: _e("--colors-semantic-content-secondary"),
145
+ white: _e("--color-white", "white")
146
+ }, de = S === "minimal" ? ue.white : ue.default, Q = tt(I, L), $e = ve("CaretDown", de), ke = ve("MagnifyingGlass", de), Y = et(I, he ? R : ""), g = R.trim(), W = !!(l && s && g && s.isValid(g)), Be = v && S === "inline" ? qe(v) : v, pe = (e) => e ? (M == null ? void 0 : M({
131
147
  groupLabel: e.groupLabel,
132
- isSelected: e.value === E,
148
+ isSelected: e.value === L,
133
149
  label: e.label,
134
150
  text: e.text,
135
151
  value: e.value
136
152
  })) ?? e.label : "Select an option";
137
- G(() => {
138
- !v && !b.some((e) => e.value === j) && F(R);
139
- }, [R, j, v, b]), G(() => {
153
+ w(() => {
154
+ !E && !I.some((e) => e.value === U) && X(J);
155
+ }, [J, U, E, I]), w(() => {
140
156
  var e;
141
- if (!c) {
142
- C("");
157
+ u && ((e = h.current) == null || e.focus());
158
+ }, [u]), w(() => {
159
+ if (!u)
143
160
  return;
144
- }
145
- (e = f.current) == null || e.focus();
146
- }, [c]), G(() => {
147
- if (!c)
148
- return;
149
- const e = (u) => {
150
- var _;
151
- (_ = K.current) != null && _.contains(u.target) || d(!1);
161
+ const e = (d) => {
162
+ var m;
163
+ (m = se.current) != null && m.contains(d.target) || p(!1);
152
164
  };
153
165
  return document.addEventListener("mousedown", e), () => {
154
166
  document.removeEventListener("mousedown", e);
155
167
  };
156
- }, [c]);
157
- const de = (e) => {
158
- v || F(e.target.value), P == null || P(e);
159
- }, M = () => {
168
+ }, [p, u]), w(() => {
169
+ O.current = N;
170
+ }, [N]), w(() => {
171
+ c.disabled && p(!1);
172
+ }, [p, c.disabled]);
173
+ const Z = ne(() => {
174
+ !T.current || c.disabled || f || a || !y || !O.current || H.current || (H.current = !0, O.current());
175
+ }, [a, y, f, c.disabled]);
176
+ w(() => {
177
+ if (H.current = !1, !u || c.disabled || f || a || !y || !ce) return;
178
+ const e = ae.current, d = oe.current;
179
+ if (!e || !d || typeof IntersectionObserver > "u") return;
180
+ let m = !0;
181
+ const V = new IntersectionObserver((Le) => {
182
+ m && Le.some((Qe) => Qe.isIntersecting) && Z();
183
+ }, {
184
+ root: d
185
+ });
186
+ return V.observe(e), () => {
187
+ m = !1, V.disconnect();
188
+ };
189
+ }, [u, f, a, y, ce, Z, Y.length, R, c.disabled]);
190
+ const De = (e) => {
191
+ E || X(e.target.value), A == null || A(e);
192
+ }, ee = () => {
160
193
  var e;
161
- d(!1), r || (e = A.current) == null || e.focus();
162
- }, U = () => {
194
+ p(!1), l || (e = le.current) == null || e.focus();
195
+ }, fe = () => {
163
196
  var e;
164
- C(""), d(!0), (e = f.current) == null || e.focus();
165
- }, X = () => {
166
- !l || !I || (l.onCreate(h), U());
167
- }, pe = (e) => {
168
- var Z;
169
- v || F(e);
170
- const u = O.current;
171
- if (!u) {
172
- M();
197
+ C(""), p(!0), (e = h.current) == null || e.focus();
198
+ }, me = () => {
199
+ !s || !W || (s.onCreate(g), fe());
200
+ }, je = (e) => {
201
+ var V;
202
+ E || X(e);
203
+ const d = ie.current;
204
+ if (!d) {
205
+ ee();
173
206
  return;
174
207
  }
175
- const _ = (Z = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : Z.set;
176
- _ == null || _.call(u, e), u.dispatchEvent(new Event("change", {
208
+ const m = (V = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : V.set;
209
+ m == null || m.call(d, e), d.dispatchEvent(new Event("change", {
177
210
  bubbles: !0
178
- })), r ? U() : M();
179
- }, me = (e) => {
180
- e.key === "Escape" && M(), e.key === "Enter" && e.target === f.current && I && (e.preventDefault(), X());
181
- }, Y = /* @__PURE__ */ p("div", { className: y(o.dropdown, g === "inline" && o.inline, g === "minimal" && o.minimal, s), onKeyDown: me, ref: K, ...re, "data-component": "dropdown", children: [
182
- /* @__PURE__ */ i("select", { ...ie, "aria-hidden": "true", className: y(o.native, se), onChange: de, ref: O, tabIndex: -1, value: E, children: D.children }),
183
- r ? /* @__PURE__ */ p("div", { className: o.combobox, onClick: () => {
211
+ })), l ? fe() : ee();
212
+ }, Fe = (e) => {
213
+ e.key === "Escape" && ee(), e.key === "Enter" && e.target === h.current && W && (e.preventDefault(), me());
214
+ }, be = /* @__PURE__ */ _("div", { className: $(r.dropdown, S === "inline" && r.inline, S === "minimal" && r.minimal, i), onKeyDown: Fe, ref: se, ...xe, "data-component": "dropdown", children: [
215
+ /* @__PURE__ */ o("select", { ...Ee, "aria-hidden": "true", className: $(r.native, Ie), onChange: De, ref: ie, tabIndex: -1, value: L, children: q.children }),
216
+ l ? /* @__PURE__ */ _("div", { className: r.combobox, onClick: () => {
184
217
  var e;
185
- return (e = f.current) == null ? void 0 : e.focus();
218
+ return (e = h.current) == null ? void 0 : e.focus();
186
219
  }, children: [
187
- ne,
188
- /* @__PURE__ */ i("input", { "aria-autocomplete": "list", "aria-expanded": c, "aria-label": w["aria-label"] ?? a ?? B, className: o["combobox-input"], disabled: w.disabled, onChange: (e) => {
189
- C(e.target.value), d(!0);
190
- }, onClick: () => d(!0), onFocus: () => d(!0), placeholder: B || void 0, ref: f, role: "combobox", type: "text", value: S })
191
- ] }) : /* @__PURE__ */ i(Q, { "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": a ? `${N} ${N}-value` : void 0, className: y(o.trigger, (V == null ? void 0 : V.isPlaceholder) && o.placeholder), "data-open": c ? "true" : void 0, disabled: w.disabled, onClick: () => d((e) => !e), ref: A, style: ae, variant: "simple", children: /* @__PURE__ */ i("span", { className: o.text, id: `${N}-value`, children: J(V) }) }),
192
- c && /* @__PURE__ */ p("div", { className: o.panel, children: [
193
- !r && /* @__PURE__ */ i(ye, { "aria-label": "Filter", className: o.filter, icon: "MagnifyingGlass", onChange: (e) => C(e.target.value), placeholder: B, ref: f, style: ce, type: "search", value: S }),
194
- /* @__PURE__ */ p(xe, { "aria-label": "Dropdown", className: o.options, children: [
195
- H.map((e) => {
196
- const u = e.value === E;
197
- return /* @__PURE__ */ i("li", { "data-component": "dropdown", children: /* @__PURE__ */ p(Q, { "aria-label": u ? `${e.text}, selected` : e.text, className: y(o.option, u && o.selected), disabled: e.disabled, onClick: () => pe(e.value), variant: "tertiary", children: [
198
- /* @__PURE__ */ i("span", { className: o.text, children: J(e) }),
199
- e.groupLabel && /* @__PURE__ */ i("small", { className: o.group, children: e.groupLabel })
220
+ we,
221
+ /* @__PURE__ */ o("input", { "aria-autocomplete": "list", "aria-expanded": u, "aria-label": c["aria-label"] ?? v ?? P, className: r["combobox-input"], disabled: c.disabled, onChange: (e) => {
222
+ C(e.target.value), p(!0);
223
+ }, onClick: () => p(!0), onFocus: () => p(!0), placeholder: P || void 0, ref: h, role: "combobox", type: "text", value: R })
224
+ ] }) : /* @__PURE__ */ o(k, { "aria-expanded": u, "aria-haspopup": "dialog", "aria-labelledby": v ? `${F} ${F}-value` : void 0, className: $(r.trigger, (Q == null ? void 0 : Q.isPlaceholder) && r.placeholder), "data-open": u ? "true" : void 0, disabled: c.disabled, onClick: () => p(!u), ref: le, style: $e, variant: "simple", children: /* @__PURE__ */ o("span", { className: r.text, id: `${F}-value`, children: pe(Q) }) }),
225
+ u && /* @__PURE__ */ _("div", { className: r.panel, children: [
226
+ !l && /* @__PURE__ */ o(Ae, { "aria-label": "Filter", className: r.filter, icon: "MagnifyingGlass", onChange: (e) => C(e.target.value), placeholder: P, ref: h, style: ke, type: "search", value: R }),
227
+ /* @__PURE__ */ _(Ke, { "aria-label": "Dropdown", "aria-busy": f || void 0, className: r.options, ref: oe, children: [
228
+ Y.map((e) => {
229
+ const d = e.value === L;
230
+ return /* @__PURE__ */ o("li", { "data-component": "dropdown", children: /* @__PURE__ */ _(k, { "aria-label": d ? `${e.text}, selected` : e.text, className: $(r.option, d && r.selected), disabled: e.disabled, onClick: () => je(e.value), variant: "tertiary", children: [
231
+ /* @__PURE__ */ o("span", { className: r.text, children: pe(e) }),
232
+ e.groupLabel && /* @__PURE__ */ o("small", { className: r.group, children: e.groupLabel })
200
233
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
201
234
  }),
202
- I && l && /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(Q, { "aria-label": $(l.render(h)) || h, className: o.option, onClick: X, variant: "tertiary", children: /* @__PURE__ */ i("span", { className: o.text, children: l.render(h) }) }) }),
203
- H.length === 0 && !I && /* @__PURE__ */ i("li", { className: o.empty, children: n })
235
+ W && s && /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(k, { "aria-label": z(s.render(g)) || g, className: r.option, onClick: me, variant: "tertiary", children: /* @__PURE__ */ o("span", { className: r.text, children: s.render(g) }) }) }),
236
+ Y.length === 0 && !W && !f && !a && !y && /* @__PURE__ */ o("li", { className: r.empty, children: n }),
237
+ a && /* @__PURE__ */ _("li", { className: r.empty, children: [
238
+ /* @__PURE__ */ o("span", { role: "alert", children: a }),
239
+ x && /* @__PURE__ */ o(k, { disabled: f, onClick: x, variant: "tertiary", children: ye })
240
+ ] }),
241
+ f && /* @__PURE__ */ o("li", { "aria-label": "Loading", className: r.empty, role: "status", children: /* @__PURE__ */ o(Te, { size: "small" }) }),
242
+ y && N && !a && /* @__PURE__ */ o("li", { ref: ae, children: /* @__PURE__ */ o(k, { className: r.option, disabled: f, onClick: Z, variant: "tertiary", children: ge }) })
204
243
  ] })
205
244
  ] })
206
245
  ] });
207
- return a ? /* @__PURE__ */ p("div", { className: y(o.label, g === "inline" && o["inline-field"]), "data-component": "dropdown", children: [
208
- /* @__PURE__ */ i("span", { id: N, children: ue }),
209
- Y
210
- ] }) : Y;
246
+ return v ? /* @__PURE__ */ _("div", { className: $(r.label, S === "inline" && r["inline-field"]), "data-component": "dropdown", children: [
247
+ /* @__PURE__ */ o("span", { id: F, children: Be }),
248
+ be
249
+ ] }) : be;
211
250
  };
212
251
  export {
213
- rt as Dropdown
252
+ Vt as Dropdown
214
253
  };
215
254
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index53.css');const n=require("react/jsx-runtime"),l=require("classix"),o="_loading_107mr_23",c="_spin_107mr_1",m="_small_107mr_40",r="_large_107mr_46",_="_ping_107mr_52",d="_sticky_107mr_78",s={loading:o,default:"_default_107mr_29",spin:c,small:m,large:r,ping:_,sticky:d},g={large:s.large,medium:s.medium,small:s.small},u=({variant:a="default",size:e="medium",sticky:i=!1,...t})=>n.jsx("div",{className:l.cx(s.loading,i&&s.sticky),"data-component":"loading",children:n.jsx("span",{className:l.cx(s.loading,s[a],g[e]),...t})});exports.Loading=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index53.css');const l=require("react/jsx-runtime"),e=require("classix"),t="_loading_1jrs1_23",r="_spin_1jrs1_1",o="_small_1jrs1_40",_="_large_1jrs1_46",d="_ping_1jrs1_52",g="_fullscreen_1jrs1_78",u="_sticky_1jrs1_86",s={loading:t,default:"_default_1jrs1_29",spin:r,small:o,large:_,ping:d,fullscreen:g,sticky:u},m={fullscreen:s.fullscreen,large:s.large,medium:s.medium,small:s.small},j=({variant:n="default",size:a="medium",sticky:c=!1,...i})=>l.jsx("div",{className:e.cx(s.loading,c&&s.sticky),"data-component":"loading",children:l.jsx("span",{className:e.cx(s.loading,s[n],m[a]),...i})});exports.Loading=j;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,24 +1,26 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import { cx as a } from "classix";
3
- import '../../assets/index53.css';const t = "_loading_107mr_23", _ = "_spin_107mr_1", e = "_small_107mr_40", r = "_large_107mr_46", c = "_ping_107mr_52", d = "_sticky_107mr_78", s = {
4
- loading: t,
5
- default: "_default_107mr_29",
6
- spin: _,
7
- small: e,
8
- large: r,
9
- ping: c,
10
- sticky: d
11
- }, g = {
2
+ import { cx as n } from "classix";
3
+ import '../../assets/index53.css';const c = "_loading_1jrs1_23", o = "_spin_1jrs1_1", t = "_small_1jrs1_40", _ = "_large_1jrs1_46", m = "_ping_1jrs1_52", d = "_fullscreen_1jrs1_78", g = "_sticky_1jrs1_86", s = {
4
+ loading: c,
5
+ default: "_default_1jrs1_29",
6
+ spin: o,
7
+ small: t,
8
+ large: _,
9
+ ping: m,
10
+ fullscreen: d,
11
+ sticky: g
12
+ }, u = {
13
+ fullscreen: s.fullscreen,
12
14
  large: s.large,
13
15
  medium: s.medium,
14
16
  small: s.small
15
- }, f = ({
16
- variant: n = "default",
17
- size: i = "medium",
18
- sticky: m = !1,
19
- ...o
20
- }) => /* @__PURE__ */ l("div", { className: a(s.loading, m && s.sticky), "data-component": "loading", children: /* @__PURE__ */ l("span", { className: a(s.loading, s[n], g[i]), ...o }) });
17
+ }, j = ({
18
+ variant: e = "default",
19
+ size: a = "medium",
20
+ sticky: r = !1,
21
+ ...i
22
+ }) => /* @__PURE__ */ l("div", { className: n(s.loading, r && s.sticky), "data-component": "loading", children: /* @__PURE__ */ l("span", { className: n(s.loading, s[e], u[a]), ...i }) });
21
23
  export {
22
- f as Loading
24
+ j as Loading
23
25
  };
24
26
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const g=require("react/jsx-runtime"),y=require("classix"),m="_layout_15smo_1",p="_constrained_15smo_10",w="_reading_15smo_15",f="_loading_15smo_43",t={layout:m,constrained:p,reading:w,"with-sidebar":"_with-sidebar_15smo_27","fill-viewport":"_fill-viewport_15smo_37",loading:f,"without-padding":"_without-padding_15smo_74"},h=({"aria-busy":n,children:s,className:l,contentLayout:a="default",contentMaxWidth:o,fillViewport:d=!1,loading:e=!1,padding:r="default",sidebar:i,style:u,..._})=>{const c={...u,"--page-content-max-width":o};return g.jsxs("main",{"aria-busy":n??(e||void 0),className:y(t.layout,!!i&&t["with-sidebar"],d&&t["fill-viewport"],o&&a==="default"&&t.constrained,a==="reading"&&t.reading,r==="none"&&t["without-padding"],e&&t.loading,l),style:c,..._,"data-component":"pagelayout",children:[i,s]})};exports.PageLayout=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index12.css');const e=require("react/jsx-runtime"),y=require("classix"),p=require("../loading/index.cjs"),w="_layout_1nh7z_1",f="_constrained_1nh7z_7",z="_reading_1nh7z_12",m="_loading_1nh7z_40",n={layout:w,constrained:f,reading:z,"with-sidebar":"_with-sidebar_1nh7z_24","fill-viewport":"_fill-viewport_1nh7z_34",loading:m,"loading-content":"_loading-content_1nh7z_48","without-padding":"_without-padding_1nh7z_87"},b=({"aria-busy":l,children:s,className:d,contentLayout:t="default",contentMaxWidth:i,fillViewport:r=!1,loading:a=!1,loadingLabel:_="Loading",padding:c="default",sidebar:o,style:u,...g})=>{const h={...u,"--page-content-max-width":i};return e.jsxs("main",{"aria-busy":l??(a||void 0),className:y(n.layout,!!o&&n["with-sidebar"],r&&n["fill-viewport"],i&&t==="default"&&n.constrained,t==="reading"&&n.reading,c==="none"&&n["without-padding"],a&&n.loading,d),style:h,...g,"data-component":"pagelayout",children:[o,a?e.jsx("div",{className:n["loading-content"],role:"status","aria-label":_,children:e.jsx(p.Loading,{size:"large"})}):s]})};exports.PageLayout=b;
2
2
  //# sourceMappingURL=index.cjs.map