@wface/pixel-ui 0.7.1 → 0.7.2

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.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),NC=require("wface"),l=require("react"),wg=require("react-dom");function fe(A){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(A){for(const C in A)if(C!=="default"){const I=Object.getOwnPropertyDescriptor(A,C);Object.defineProperty(g,C,I.get?I:{enumerable:!0,get:()=>A[C]})}}return g.default=A,Object.freeze(g)}const pe=fe(NC),N=fe(l),he=l.createContext(void 0),ve=({children:A})=>{const[g,C]=l.useState("light"),[I,B]=l.useState(!0),E=t=>{C(t),document.body.setAttribute("data-theme",t),localStorage.setItem("theme",t)},Q=()=>{C(t=>{const n=t==="light"?"dark":"light";return document.body.setAttribute("data-theme",n),localStorage.setItem("theme",n),n})},e=()=>{B(t=>{const n=!t;return localStorage.setItem("expanded",JSON.stringify(n)),n})};return l.useEffect(()=>{const n=localStorage.getItem("theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");C(n),document.body.setAttribute("data-theme",n)},[]),l.useEffect(()=>{const t=localStorage.getItem("expanded");t!==null?B(JSON.parse(t)):localStorage.setItem("expanded",JSON.stringify(!0))},[]),a.jsx(he.Provider,{value:{theme:g,setTheme:E,toggleTheme:Q,expanded:I,toggleExpand:e},children:A})},ho=()=>{const A=l.useContext(he);if(!A)throw new Error("useTheme must be used within ThemeProvider");return A},vo="_region_jo93y_1",bo="_stack_jo93y_10",mo="_toast_jo93y_16",wo="_body_jo93y_29",Do="_icon_jo93y_35",yo="_neutral_jo93y_42",So="_message_jo93y_48",Po="_success_jo93y_51",xo="_warning_jo93y_60",No="_danger_jo93y_69",Ro="_info_jo93y_78",Sg={region:vo,stack:bo,toast:mo,body:wo,icon:Do,neutral:yo,message:So,success:Po,warning:xo,danger:No,info:Ro};function be(A){var g,C,I="";if(typeof A=="string"||typeof A=="number")I+=A;else if(typeof A=="object")if(Array.isArray(A))for(g=0;g<A.length;g++)A[g]&&(C=be(A[g]))&&(I&&(I+=" "),I+=C);else for(g in A)A[g]&&(I&&(I+=" "),I+=g);return I}function lA(){for(var A,g,C=0,I="";C<arguments.length;)(A=arguments[C++])&&(g=be(A))&&(I&&(I+=" "),I+=g);return I}var me={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},kE=l.createContext&&l.createContext(me),Fo=["attr","size","title"];function Oo(A,g){if(A==null)return{};var C=Mo(A,g),I,B;if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(A);for(B=0;B<E.length;B++)I=E[B],!(g.indexOf(I)>=0)&&Object.prototype.propertyIsEnumerable.call(A,I)&&(C[I]=A[I])}return C}function Mo(A,g){if(A==null)return{};var C={};for(var I in A)if(Object.prototype.hasOwnProperty.call(A,I)){if(g.indexOf(I)>=0)continue;C[I]=A[I]}return C}function QI(){return QI=Object.assign?Object.assign.bind():function(A){for(var g=1;g<arguments.length;g++){var C=arguments[g];for(var I in C)Object.prototype.hasOwnProperty.call(C,I)&&(A[I]=C[I])}return A},QI.apply(this,arguments)}function UE(A,g){var C=Object.keys(A);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(A);g&&(I=I.filter(function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable})),C.push.apply(C,I)}return C}function eI(A){for(var g=1;g<arguments.length;g++){var C=arguments[g]!=null?arguments[g]:{};g%2?UE(Object(C),!0).forEach(function(I){ko(A,I,C[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(C)):UE(Object(C)).forEach(function(I){Object.defineProperty(A,I,Object.getOwnPropertyDescriptor(C,I))})}return A}function ko(A,g,C){return g=Uo(g),g in A?Object.defineProperty(A,g,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[g]=C,A}function Uo(A){var g=Go(A,"string");return typeof g=="symbol"?g:g+""}function Go(A,g){if(typeof A!="object"||!A)return A;var C=A[Symbol.toPrimitive];if(C!==void 0){var I=C.call(A,g);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(A)}function we(A){return A&&A.map((g,C)=>l.createElement(g.tag,eI({key:C},g.attr),we(g.child)))}function PA(A){return g=>l.createElement(Jo,QI({attr:eI({},A.attr)},g),we(A.child))}function Jo(A){var g=C=>{var{attr:I,size:B,title:E}=A,Q=Oo(A,Fo),e=B||C.size||"1em",t;return C.className&&(t=C.className),A.className&&(t=(t?t+" ":"")+A.className),l.createElement("svg",QI({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},C.attr,I,Q,{className:t,style:eI(eI({color:A.color||C.color},C.style),A.style),height:e,width:e,xmlns:"http://www.w3.org/2000/svg"}),E&&l.createElement("title",null,E),A.children)};return kE!==void 0?l.createElement(kE.Consumer,null,C=>g(C)):g(me)}function Ho(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(A)}function NB(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(A)}function De(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(A)}const ye=l.createContext(null),To=()=>Math.random().toString(36).slice(2,9);function Se({children:A,defaultDuration:g=3e3,maxVisible:C=3}){const[I,B]=l.useState([]),E=l.useRef({}),Q=l.useCallback(o=>{B(r=>r.filter(i=>i.id!==o)),E.current[o]&&(clearTimeout(E.current[o]),delete E.current[o])},[]),e=l.useCallback((o,r)=>{const i=r?.id??To(),s={id:i,message:o,variant:r?.variant??"neutral",duration:r?.duration===void 0?g:r.duration,actionLabel:r?.actionLabel,onAction:r?.onAction};return B(u=>{const d=[...u,s];return d.length>C&&d.shift(),d}),s.duration&&s.duration>0&&(E.current[i]=window.setTimeout(()=>Q(i),s.duration)),i},[g,C,Q]),t=l.useCallback(()=>{Object.values(E.current).forEach(o=>clearTimeout(o)),E.current={},B([])},[]),n=l.useMemo(()=>({show:e,dismiss:Q,clear:t}),[e,Q,t]);return a.jsxs(ye.Provider,{value:n,children:[A,wg.createPortal(a.jsx("div",{className:Sg.region,children:a.jsx("div",{className:Sg.stack,children:I.map(o=>a.jsxs("div",{className:lA(Sg.toast,o.variant?Sg[o.variant]:""),role:"status",children:[a.jsxs("div",{className:Sg.body,children:[a.jsx("span",{className:Sg.icon,children:a.jsx(NB,{size:18})}),a.jsx(DA,{size:"sm",weight:"regular",className:Sg.message,children:o.message})]}),o.actionLabel&&o.onAction&&a.jsx(fI,{variant:"subtle",onClick:()=>{o.onAction?.(),Q(o.id)},children:o.actionLabel})]},o.id))})}),document.body)]})}function Ko(){const A=l.useContext(ye);if(!A)throw new Error("useToast must be used within <ToastProvider>");return A}const Pe=A=>{const{config:g}=A;return a.jsx(ve,{children:a.jsx(Se,{children:a.jsx(NC.WFace,{configuration:g})})})};Pe.displayName="Pixel";const Yo="_alert_1scdn_1",Vo="_wrapper_1scdn_5",Lo="_icon_1scdn_11",jo="_content_1scdn_18",Xo="_success_1scdn_23",zo="_bold_1scdn_29",Wo="_warning_1scdn_35",qo="_info_1scdn_47",Zo="_danger_1scdn_59",Gg={alert:Yo,wrapper:Vo,icon:Lo,content:jo,success:Xo,bold:zo,warning:Wo,info:qo,danger:Zo};function GE(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(A)}function _o(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(A)}function $o(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(A)}function RB(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"},child:[]},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"},child:[]}]})(A)}function Ai(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(A)}function gi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(A)}function xe(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(A)}function Ci(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"polyline",attr:{points:"12 6 12 12 16 14"},child:[]}]})(A)}function Ii(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},child:[]},{tag:"line",attr:{x1:"1",y1:"1",x2:"23",y2:"23"},child:[]}]})(A)}function Bi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(A)}function Ei(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"12",cy:"5",r:"1"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"1"},child:[]}]})(A)}function Qi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(A)}function Ne(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(A)}const Re=A=>{const{variant:g,appearance:C="default",content:I,className:B}=A,E={success:a.jsx(Ai,{}),info:a.jsx(GE,{}),warning:a.jsx(_o,{}),danger:a.jsx(GE,{})};return a.jsx("div",{className:lA(Gg.alert,B,Gg[g],Gg[C]),children:a.jsx("div",{className:Gg.wrapper,children:l.isValidElement(I)?I:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Gg.icon,children:E[g]}),a.jsx("div",{className:Gg.content,children:I})]})})})};Re.displayName="PiAlert";const ei="_badge_13roa_1",ti="_danger_13roa_13",ni="_filled_13roa_17",ri="_success_13roa_21",oi="_warning_13roa_29",ii="_info_13roa_37",ai="_red_13roa_45",si="_orange_13roa_54",ci="_purple_13roa_62",li="_disabled_13roa_70",VC={badge:ei,danger:ti,filled:ni,success:ri,warning:oi,info:ii,red:ai,orange:si,purple:ci,disabled:li},Fe=A=>{const{variant:g,filled:C=!1,content:I,disabled:B,className:E=""}=A;return a.jsx("span",{className:lA(VC.badge,VC[g],C?VC.filled:"",E,B?VC.disabled:""),children:I})};Fe.displayName="PiBadge";const ui="_body_5fzmn_1",di="_left_5fzmn_6",fi="_center_5fzmn_10",pi="_right_5fzmn_14",hi="_truncate_5fzmn_18",vi="_muted_5fzmn_24",bi="_xxl_5fzmn_28",mi="_xl_5fzmn_33",wi="_lg_5fzmn_38",Di="_md_5fzmn_43",yi="_sm_5fzmn_48",Si="_light_5fzmn_53",Pi="_regular_5fzmn_57",xi="_medium_5fzmn_61",Ni="_semibold_5fzmn_65",Jg={body:ui,left:di,center:fi,right:pi,truncate:hi,muted:vi,xxl:bi,xl:mi,lg:wi,md:Di,sm:yi,light:Si,regular:Pi,medium:xi,semibold:Ni},Ri={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},DA=A=>{const{children:g,className:C="",as:I,size:B="md",weight:E="regular",align:Q="inherit",muted:e,truncate:t}=A,n=I||Ri[B],o=[Jg.body,Jg[B],Jg[E],Jg[Q],e?Jg.muted:"",t?Jg.truncate:"",C].filter(Boolean).join(" ");return a.jsx(n,{className:o,children:g})};DA.displayName="PiBody";const Fi="_wrapper_thhtr_1",Oi="_list_thhtr_5",Mi="_item_thhtr_12",ki="_link_thhtr_16",Ui="_label_thhtr_25",Gi="_current_thhtr_28",Ji="_separator_thhtr_32",Pg={wrapper:Fi,list:Oi,item:Mi,link:ki,label:Ui,current:Gi,separator:Ji},Oe=({items:A,separator:g="/",className:C})=>a.jsx("nav",{className:lA(Pg.wrapper,C),"aria-label":"Breadcrumb",children:a.jsx("ol",{className:Pg.list,children:A.map((I,B)=>{const E=B===A.length-1;return a.jsxs("li",{className:Pg.item,children:[I.href&&!E?a.jsx("a",{href:I.href,className:Pg.link,children:I.label}):a.jsx("span",{className:lA(Pg.label,E&&Pg.current),children:I.label}),!E&&a.jsx("span",{className:Pg.separator,children:g})]},B)})})});Oe.displayName="PiBreadcrumb";const Hi="_button_1xylc_1",Ti="_primary_1xylc_14",Ki="_secondary_1xylc_26",Yi="_tertiary_1xylc_39",Vi="_subtle_1xylc_53",Li="_destructive_1xylc_65",ji="_success_1xylc_77",Xi="_warning_1xylc_89",zi="_fullWidth_1xylc_96",Wi="_link_1xylc_103",qi="_iconButton_1xylc_120",xg={button:Hi,primary:Ti,secondary:Ki,tertiary:Yi,subtle:Vi,destructive:Li,success:ji,warning:Xi,fullWidth:zi,link:Wi,iconButton:qi},fI=A=>{const{children:g,variant:C="primary",className:I="",fullWidth:B=!1,link:E=!1,prefixIcon:Q,suffixIcon:e,iconButton:t,...n}=A;return a.jsxs("button",{...n,className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),NC=require("wface"),l=require("react"),wg=require("react-dom");function fe(A){const g=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(A){for(const C in A)if(C!=="default"){const I=Object.getOwnPropertyDescriptor(A,C);Object.defineProperty(g,C,I.get?I:{enumerable:!0,get:()=>A[C]})}}return g.default=A,Object.freeze(g)}const pe=fe(NC),N=fe(l),he=l.createContext(void 0),ve=({children:A})=>{const[g,C]=l.useState("light"),[I,B]=l.useState(!0),E=t=>{C(t),document.body.setAttribute("data-theme",t),localStorage.setItem("theme",t)},Q=()=>{C(t=>{const n=t==="light"?"dark":"light";return document.body.setAttribute("data-theme",n),localStorage.setItem("theme",n),n})},e=()=>{B(t=>{const n=!t;return localStorage.setItem("expanded",JSON.stringify(n)),n})};return l.useEffect(()=>{const n=localStorage.getItem("theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");C(n),document.body.setAttribute("data-theme",n)},[]),l.useEffect(()=>{const t=localStorage.getItem("expanded");t!==null?B(JSON.parse(t)):localStorage.setItem("expanded",JSON.stringify(!0))},[]),a.jsx(he.Provider,{value:{theme:g,setTheme:E,toggleTheme:Q,expanded:I,toggleExpand:e},children:A})},ho=()=>{const A=l.useContext(he);if(!A)throw new Error("useTheme must be used within ThemeProvider");return A},vo="_region_jo93y_1",bo="_stack_jo93y_10",mo="_toast_jo93y_16",wo="_body_jo93y_29",Do="_icon_jo93y_35",yo="_neutral_jo93y_42",So="_message_jo93y_48",Po="_success_jo93y_51",xo="_warning_jo93y_60",No="_danger_jo93y_69",Ro="_info_jo93y_78",Sg={region:vo,stack:bo,toast:mo,body:wo,icon:Do,neutral:yo,message:So,success:Po,warning:xo,danger:No,info:Ro};function be(A){var g,C,I="";if(typeof A=="string"||typeof A=="number")I+=A;else if(typeof A=="object")if(Array.isArray(A))for(g=0;g<A.length;g++)A[g]&&(C=be(A[g]))&&(I&&(I+=" "),I+=C);else for(g in A)A[g]&&(I&&(I+=" "),I+=g);return I}function lA(){for(var A,g,C=0,I="";C<arguments.length;)(A=arguments[C++])&&(g=be(A))&&(I&&(I+=" "),I+=g);return I}var me={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},kE=l.createContext&&l.createContext(me),Fo=["attr","size","title"];function Oo(A,g){if(A==null)return{};var C=Mo(A,g),I,B;if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(A);for(B=0;B<E.length;B++)I=E[B],!(g.indexOf(I)>=0)&&Object.prototype.propertyIsEnumerable.call(A,I)&&(C[I]=A[I])}return C}function Mo(A,g){if(A==null)return{};var C={};for(var I in A)if(Object.prototype.hasOwnProperty.call(A,I)){if(g.indexOf(I)>=0)continue;C[I]=A[I]}return C}function QI(){return QI=Object.assign?Object.assign.bind():function(A){for(var g=1;g<arguments.length;g++){var C=arguments[g];for(var I in C)Object.prototype.hasOwnProperty.call(C,I)&&(A[I]=C[I])}return A},QI.apply(this,arguments)}function UE(A,g){var C=Object.keys(A);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(A);g&&(I=I.filter(function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable})),C.push.apply(C,I)}return C}function eI(A){for(var g=1;g<arguments.length;g++){var C=arguments[g]!=null?arguments[g]:{};g%2?UE(Object(C),!0).forEach(function(I){ko(A,I,C[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(C)):UE(Object(C)).forEach(function(I){Object.defineProperty(A,I,Object.getOwnPropertyDescriptor(C,I))})}return A}function ko(A,g,C){return g=Uo(g),g in A?Object.defineProperty(A,g,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[g]=C,A}function Uo(A){var g=Go(A,"string");return typeof g=="symbol"?g:g+""}function Go(A,g){if(typeof A!="object"||!A)return A;var C=A[Symbol.toPrimitive];if(C!==void 0){var I=C.call(A,g);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(A)}function we(A){return A&&A.map((g,C)=>l.createElement(g.tag,eI({key:C},g.attr),we(g.child)))}function PA(A){return g=>l.createElement(Jo,QI({attr:eI({},A.attr)},g),we(A.child))}function Jo(A){var g=C=>{var{attr:I,size:B,title:E}=A,Q=Oo(A,Fo),e=B||C.size||"1em",t;return C.className&&(t=C.className),A.className&&(t=(t?t+" ":"")+A.className),l.createElement("svg",QI({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},C.attr,I,Q,{className:t,style:eI(eI({color:A.color||C.color},C.style),A.style),height:e,width:e,xmlns:"http://www.w3.org/2000/svg"}),E&&l.createElement("title",null,E),A.children)};return kE!==void 0?l.createElement(kE.Consumer,null,C=>g(C)):g(me)}function Ho(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"},child:[]}]})(A)}function NB(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(A)}function De(A){return PA({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(A)}const ye=l.createContext(null),To=()=>Math.random().toString(36).slice(2,9);function Se({children:A,defaultDuration:g=6e3,maxVisible:C=3}){const[I,B]=l.useState([]),E=l.useRef({}),Q=l.useCallback(o=>{B(r=>r.filter(i=>i.id!==o)),E.current[o]&&(clearTimeout(E.current[o]),delete E.current[o])},[]),e=l.useCallback((o,r)=>{const i=r?.id??To(),s={id:i,message:o,variant:r?.variant??"neutral",duration:r?.duration===void 0?g:r.duration,actionLabel:r?.actionLabel,onAction:r?.onAction};return B(u=>{const d=[...u,s];return d.length>C&&d.shift(),d}),s.duration&&s.duration>0&&(E.current[i]=window.setTimeout(()=>Q(i),s.duration)),i},[g,C,Q]),t=l.useCallback(()=>{Object.values(E.current).forEach(o=>clearTimeout(o)),E.current={},B([])},[]),n=l.useMemo(()=>({show:e,dismiss:Q,clear:t}),[e,Q,t]);return a.jsxs(ye.Provider,{value:n,children:[A,wg.createPortal(a.jsx("div",{className:Sg.region,children:a.jsx("div",{className:Sg.stack,children:I.map(o=>a.jsxs("div",{className:lA(Sg.toast,o.variant?Sg[o.variant]:""),role:"status",children:[a.jsxs("div",{className:Sg.body,children:[a.jsx("span",{className:Sg.icon,children:a.jsx(NB,{size:18})}),a.jsx(DA,{size:"sm",weight:"regular",className:Sg.message,children:o.message})]}),o.actionLabel&&o.onAction&&a.jsx(fI,{variant:"subtle",onClick:()=>{o.onAction?.(),Q(o.id)},children:o.actionLabel})]},o.id))})}),document.body)]})}function Ko(){const A=l.useContext(ye);if(!A)throw new Error("useToast must be used within <ToastProvider>");return A}const Pe=A=>{const{config:g}=A;return a.jsx(ve,{children:a.jsx(Se,{defaultDuration:5e3,children:a.jsx(NC.WFace,{configuration:g})})})};Pe.displayName="Pixel";const Yo="_alert_1scdn_1",Vo="_wrapper_1scdn_5",Lo="_icon_1scdn_11",jo="_content_1scdn_18",Xo="_success_1scdn_23",zo="_bold_1scdn_29",Wo="_warning_1scdn_35",qo="_info_1scdn_47",Zo="_danger_1scdn_59",Gg={alert:Yo,wrapper:Vo,icon:Lo,content:jo,success:Xo,bold:zo,warning:Wo,info:qo,danger:Zo};function GE(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"line",attr:{x1:"12",y1:"8",x2:"12",y2:"12"},child:[]},{tag:"line",attr:{x1:"12",y1:"16",x2:"12.01",y2:"16"},child:[]}]})(A)}function _o(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"},child:[]},{tag:"line",attr:{x1:"12",y1:"9",x2:"12",y2:"13"},child:[]},{tag:"line",attr:{x1:"12",y1:"17",x2:"12.01",y2:"17"},child:[]}]})(A)}function $o(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(A)}function RB(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"16",y1:"2",x2:"16",y2:"6"},child:[]},{tag:"line",attr:{x1:"8",y1:"2",x2:"8",y2:"6"},child:[]},{tag:"line",attr:{x1:"3",y1:"10",x2:"21",y2:"10"},child:[]}]})(A)}function Ai(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"20 6 9 17 4 12"},child:[]}]})(A)}function gi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"15 18 9 12 15 6"},child:[]}]})(A)}function xe(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"9 18 15 12 9 6"},child:[]}]})(A)}function Ci(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]},{tag:"polyline",attr:{points:"12 6 12 12 16 14"},child:[]}]})(A)}function Ii(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"},child:[]},{tag:"line",attr:{x1:"1",y1:"1",x2:"23",y2:"23"},child:[]}]})(A)}function Bi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"12",r:"3"},child:[]}]})(A)}function Ei(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"12",cy:"5",r:"1"},child:[]},{tag:"circle",attr:{cx:"12",cy:"19",r:"1"},child:[]}]})(A)}function Qi(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"12",cy:"7",r:"4"},child:[]}]})(A)}function Ne(A){return PA({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(A)}const Re=A=>{const{variant:g,appearance:C="default",content:I,className:B}=A,E={success:a.jsx(Ai,{}),info:a.jsx(GE,{}),warning:a.jsx(_o,{}),danger:a.jsx(GE,{})};return a.jsx("div",{className:lA(Gg.alert,B,Gg[g],Gg[C]),children:a.jsx("div",{className:Gg.wrapper,children:l.isValidElement(I)?I:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:Gg.icon,children:E[g]}),a.jsx("div",{className:Gg.content,children:I})]})})})};Re.displayName="PiAlert";const ei="_badge_13roa_1",ti="_danger_13roa_13",ni="_filled_13roa_17",ri="_success_13roa_21",oi="_warning_13roa_29",ii="_info_13roa_37",ai="_red_13roa_45",si="_orange_13roa_54",ci="_purple_13roa_62",li="_disabled_13roa_70",VC={badge:ei,danger:ti,filled:ni,success:ri,warning:oi,info:ii,red:ai,orange:si,purple:ci,disabled:li},Fe=A=>{const{variant:g,filled:C=!1,content:I,disabled:B,className:E=""}=A;return a.jsx("span",{className:lA(VC.badge,VC[g],C?VC.filled:"",E,B?VC.disabled:""),children:I})};Fe.displayName="PiBadge";const ui="_body_5fzmn_1",di="_left_5fzmn_6",fi="_center_5fzmn_10",pi="_right_5fzmn_14",hi="_truncate_5fzmn_18",vi="_muted_5fzmn_24",bi="_xxl_5fzmn_28",mi="_xl_5fzmn_33",wi="_lg_5fzmn_38",Di="_md_5fzmn_43",yi="_sm_5fzmn_48",Si="_light_5fzmn_53",Pi="_regular_5fzmn_57",xi="_medium_5fzmn_61",Ni="_semibold_5fzmn_65",Jg={body:ui,left:di,center:fi,right:pi,truncate:hi,muted:vi,xxl:bi,xl:mi,lg:wi,md:Di,sm:yi,light:Si,regular:Pi,medium:xi,semibold:Ni},Ri={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},DA=A=>{const{children:g,className:C="",as:I,size:B="md",weight:E="regular",align:Q="inherit",muted:e,truncate:t}=A,n=I||Ri[B],o=[Jg.body,Jg[B],Jg[E],Jg[Q],e?Jg.muted:"",t?Jg.truncate:"",C].filter(Boolean).join(" ");return a.jsx(n,{className:o,children:g})};DA.displayName="PiBody";const Fi="_wrapper_thhtr_1",Oi="_list_thhtr_5",Mi="_item_thhtr_12",ki="_link_thhtr_16",Ui="_label_thhtr_25",Gi="_current_thhtr_28",Ji="_separator_thhtr_32",Pg={wrapper:Fi,list:Oi,item:Mi,link:ki,label:Ui,current:Gi,separator:Ji},Oe=({items:A,separator:g="/",className:C})=>a.jsx("nav",{className:lA(Pg.wrapper,C),"aria-label":"Breadcrumb",children:a.jsx("ol",{className:Pg.list,children:A.map((I,B)=>{const E=B===A.length-1;return a.jsxs("li",{className:Pg.item,children:[I.href&&!E?a.jsx("a",{href:I.href,className:Pg.link,children:I.label}):a.jsx("span",{className:lA(Pg.label,E&&Pg.current),children:I.label}),!E&&a.jsx("span",{className:Pg.separator,children:g})]},B)})})});Oe.displayName="PiBreadcrumb";const Hi="_button_1xylc_1",Ti="_primary_1xylc_14",Ki="_secondary_1xylc_26",Yi="_tertiary_1xylc_39",Vi="_subtle_1xylc_53",Li="_destructive_1xylc_65",ji="_success_1xylc_77",Xi="_warning_1xylc_89",zi="_fullWidth_1xylc_96",Wi="_link_1xylc_103",qi="_iconButton_1xylc_120",xg={button:Hi,primary:Ti,secondary:Ki,tertiary:Yi,subtle:Vi,destructive:Li,success:ji,warning:Xi,fullWidth:zi,link:Wi,iconButton:qi},fI=A=>{const{children:g,variant:C="primary",className:I="",fullWidth:B=!1,link:E=!1,prefixIcon:Q,suffixIcon:e,iconButton:t,...n}=A;return a.jsxs("button",{...n,className:`
2
2
  ${xg.button}
3
3
  ${xg[C]}
4
4
  ${I}