@wface/pixel-ui 0.3.6 → 0.3.7
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/providers/Pixel.d.ts +2 -0
- package/dist/providers/Pixel.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),iI=require("wface"),u=require("react"),DC=require("react-dom");function ne(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 re=ne(iI),P=ne(u),oe=u.createContext(void 0),ie=({children:A})=>{const[g,C]=u.useState("light"),[I,B]=u.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 u.useEffect(()=>{const n=localStorage.getItem("theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");C(n),document.body.setAttribute("data-theme",n)},[]),u.useEffect(()=>{const t=localStorage.getItem("expanded");t!==null?B(JSON.parse(t)):localStorage.setItem("expanded",JSON.stringify(!0))},[]),s.jsx(oe.Provider,{value:{theme:g,setTheme:E,toggleTheme:Q,expanded:I,toggleExpand:e},children:A})},Qo=()=>{const A=u.useContext(oe);if(!A)throw new Error("useTheme must be used within ThemeProvider");return A},eo="_region_jo93y_1",to="_stack_jo93y_10",no="_toast_jo93y_16",ro="_body_jo93y_29",oo="_icon_jo93y_35",io="_neutral_jo93y_42",ao="_message_jo93y_48",so="_success_jo93y_51",co="_warning_jo93y_60",lo="_danger_jo93y_69",uo="_info_jo93y_78",bg={region:eo,stack:to,toast:no,body:ro,icon:oo,neutral:io,message:ao,success:so,warning:co,danger:lo,info:uo};function ae(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=ae(A[g]))&&(I&&(I+=" "),I+=C);else for(g in A)A[g]&&(I&&(I+=" "),I+=g);return I}function cA(){for(var A,g,C=0,I="";C<arguments.length;)(A=arguments[C++])&&(g=ae(A))&&(I&&(I+=" "),I+=g);return I}var se={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},yE=u.createContext&&u.createContext(se),fo=["attr","size","title"];function po(A,g){if(A==null)return{};var C=ho(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 ho(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 $C(){return $C=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},$C.apply(this,arguments)}function SE(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 AI(A){for(var g=1;g<arguments.length;g++){var C=arguments[g]!=null?arguments[g]:{};g%2?SE(Object(C),!0).forEach(function(I){vo(A,I,C[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(C)):SE(Object(C)).forEach(function(I){Object.defineProperty(A,I,Object.getOwnPropertyDescriptor(C,I))})}return A}function vo(A,g,C){return g=bo(g),g in A?Object.defineProperty(A,g,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[g]=C,A}function bo(A){var g=mo(A,"string");return typeof g=="symbol"?g:g+""}function mo(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 ce(A){return A&&A.map((g,C)=>u.createElement(g.tag,AI({key:C},g.attr),ce(g.child)))}function PA(A){return g=>u.createElement(wo,$C({attr:AI({},A.attr)},g),ce(A.child))}function wo(A){var g=C=>{var{attr:I,size:B,title:E}=A,Q=po(A,fo),e=B||C.size||"1em",t;return C.className&&(t=C.className),A.className&&(t=(t?t+" ":"")+A.className),u.createElement("svg",$C({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},C.attr,I,Q,{className:t,style:AI(AI({color:A.color||C.color},C.style),A.style),height:e,width:e,xmlns:"http://www.w3.org/2000/svg"}),E&&u.createElement("title",null,E),A.children)};return yE!==void 0?u.createElement(yE.Consumer,null,C=>g(C)):g(se)}function Do(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 mB(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 le(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 ue=u.createContext(null),yo=()=>Math.random().toString(36).slice(2,9);function de({children:A,defaultDuration:g=3e3,maxVisible:C=3}){const[I,B]=u.useState([]),E=u.useRef({}),Q=u.useCallback(o=>{B(r=>r.filter(i=>i.id!==o)),E.current[o]&&(clearTimeout(E.current[o]),delete E.current[o])},[]),e=u.useCallback((o,r)=>{const i=r?.id??yo(),a={id:i,message:o,variant:r?.variant??"neutral",duration:r?.duration===void 0?g:r.duration,actionLabel:r?.actionLabel,onAction:r?.onAction};return B(l=>{const d=[...l,a];return d.length>C&&d.shift(),d}),a.duration&&a.duration>0&&(E.current[i]=window.setTimeout(()=>Q(i),a.duration)),i},[g,C,Q]),t=u.useCallback(()=>{Object.values(E.current).forEach(o=>clearTimeout(o)),E.current={},B([])},[]),n=u.useMemo(()=>({show:e,dismiss:Q,clear:t}),[e,Q,t]);return s.jsxs(ue.Provider,{value:n,children:[A,DC.createPortal(s.jsx("div",{className:bg.region,children:s.jsx("div",{className:bg.stack,children:I.map(o=>s.jsxs("div",{className:cA(bg.toast,o.variant?bg[o.variant]:""),role:"status",children:[s.jsxs("div",{className:bg.body,children:[s.jsx("span",{className:bg.icon,children:s.jsx(mB,{size:18})}),s.jsx(XA,{size:"sm",weight:"regular",className:bg.message,children:o.message})]}),o.actionLabel&&o.onAction&&s.jsx(aI,{variant:"subtle",onClick:()=>{o.onAction?.(),Q(o.id)},children:o.actionLabel})]},o.id))})}),document.body)]})}function So(){const A=u.useContext(ue);if(!A)throw new Error("useToast must be used within <ToastProvider>");return A}const fe=A=>{const{config:g}=A;return s.jsx(ie,{children:s.jsx(de,{children:s.jsx(iI.WFace,{configuration:g})})})};fe.displayName="Pixel";const Po="_alert_1scdn_1",No="_wrapper_1scdn_5",xo="_icon_1scdn_11",Fo="_content_1scdn_18",Ro="_success_1scdn_23",Oo="_bold_1scdn_29",Mo="_warning_1scdn_35",ko="_info_1scdn_47",Uo="_danger_1scdn_59",Rg={alert:Po,wrapper:No,icon:xo,content:Fo,success:Ro,bold:Oo,warning:Mo,info:ko,danger:Uo};function PE(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 Go(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 Jo(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 pe(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 he(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 Ho(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 ve(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 To(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 Ko(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 Yo(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 Vo(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 jo(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 be(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 me=A=>{const{variant:g,appearance:C="default",content:I,className:B}=A,E={success:s.jsx(he,{}),info:s.jsx(PE,{}),warning:s.jsx(Go,{}),danger:s.jsx(PE,{})};return s.jsx("div",{className:cA(Rg.alert,B,Rg[g],Rg[C]),children:s.jsx("div",{className:Rg.wrapper,children:u.isValidElement(I)?I:s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Rg.icon,children:E[g]}),s.jsx("div",{className:Rg.content,children:I})]})})})};me.displayName="PiAlert";const Lo="_badge_13roa_1",Xo="_danger_13roa_13",zo="_filled_13roa_17",Wo="_success_13roa_21",qo="_warning_13roa_29",Zo="_info_13roa_37",_o="_red_13roa_45",$o="_orange_13roa_54",Ai="_purple_13roa_62",gi="_disabled_13roa_70",GC={badge:Lo,danger:Xo,filled:zo,success:Wo,warning:qo,info:Zo,red:_o,orange:$o,purple:Ai,disabled:gi},we=A=>{const{variant:g,filled:C=!1,content:I,disabled:B,className:E=""}=A;return s.jsx("span",{className:cA(GC.badge,GC[g],C?GC.filled:"",E,B?GC.disabled:""),children:I})};we.displayName="PiBadge";const Ci="_body_5fzmn_1",Ii="_left_5fzmn_6",Bi="_center_5fzmn_10",Ei="_right_5fzmn_14",Qi="_truncate_5fzmn_18",ei="_muted_5fzmn_24",ti="_xxl_5fzmn_28",ni="_xl_5fzmn_33",ri="_lg_5fzmn_38",oi="_md_5fzmn_43",ii="_sm_5fzmn_48",ai="_light_5fzmn_53",si="_regular_5fzmn_57",ci="_medium_5fzmn_61",li="_semibold_5fzmn_65",Og={body:Ci,left:Ii,center:Bi,right:Ei,truncate:Qi,muted:ei,xxl:ti,xl:ni,lg:ri,md:oi,sm:ii,light:ai,regular:si,medium:ci,semibold:li},ui={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},XA=A=>{const{children:g,className:C="",as:I,size:B="md",weight:E="regular",align:Q="inherit",muted:e,truncate:t}=A,n=I||ui[B],o=[Og.body,Og[B],Og[E],Og[Q],e?Og.muted:"",t?Og.truncate:"",C].filter(Boolean).join(" ");return s.jsx(n,{className:o,children:g})};XA.displayName="PiBody";const di="_wrapper_thhtr_1",fi="_list_thhtr_5",pi="_item_thhtr_12",hi="_link_thhtr_16",vi="_label_thhtr_25",bi="_current_thhtr_28",mi="_separator_thhtr_32",mg={wrapper:di,list:fi,item:pi,link:hi,label:vi,current:bi,separator:mi},De=({items:A,separator:g="/",className:C})=>s.jsx("nav",{className:cA(mg.wrapper,C),"aria-label":"Breadcrumb",children:s.jsx("ol",{className:mg.list,children:A.map((I,B)=>{const E=B===A.length-1;return s.jsxs("li",{className:mg.item,children:[I.href&&!E?s.jsx("a",{href:I.href,className:mg.link,children:I.label}):s.jsx("span",{className:cA(mg.label,E&&mg.current),children:I.label}),!E&&s.jsx("span",{className:mg.separator,children:g})]},B)})})});De.displayName="PiBreadcrumb";const wi="_button_ih3sx_1",Di="_primary_ih3sx_14",yi="_secondary_ih3sx_26",Si="_tertiary_ih3sx_39",Pi="_subtle_ih3sx_53",Ni="_destructive_ih3sx_65",xi="_success_ih3sx_77",Fi="_fullWidth_ih3sx_89",Ri="_link_ih3sx_96",Oi="_iconButton_ih3sx_113",wg={button:wi,primary:Di,secondary:yi,tertiary:Si,subtle:Pi,destructive:Ni,success:xi,fullWidth:Fi,link:Ri,iconButton:Oi},aI=A=>{const{children:g,variant:C="primary",className:I="",fullWidth:B=!1,link:E=!1,prefixIcon:Q,suffixIcon:e,iconButton:t,...n}=A;return s.jsxs("button",{...n,className:`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),iI=require("wface"),u=require("react"),DC=require("react-dom");function ne(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 re=ne(iI),P=ne(u),oe=u.createContext(void 0),ie=({children:A})=>{const[g,C]=u.useState("light"),[I,B]=u.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 u.useEffect(()=>{const n=localStorage.getItem("theme")||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");C(n),document.body.setAttribute("data-theme",n)},[]),u.useEffect(()=>{const t=localStorage.getItem("expanded");t!==null?B(JSON.parse(t)):localStorage.setItem("expanded",JSON.stringify(!0))},[]),s.jsx(oe.Provider,{value:{theme:g,setTheme:E,toggleTheme:Q,expanded:I,toggleExpand:e},children:A})},Qo=()=>{const A=u.useContext(oe);if(!A)throw new Error("useTheme must be used within ThemeProvider");return A},eo="_region_jo93y_1",to="_stack_jo93y_10",no="_toast_jo93y_16",ro="_body_jo93y_29",oo="_icon_jo93y_35",io="_neutral_jo93y_42",ao="_message_jo93y_48",so="_success_jo93y_51",co="_warning_jo93y_60",lo="_danger_jo93y_69",uo="_info_jo93y_78",bg={region:eo,stack:to,toast:no,body:ro,icon:oo,neutral:io,message:ao,success:so,warning:co,danger:lo,info:uo};function ae(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=ae(A[g]))&&(I&&(I+=" "),I+=C);else for(g in A)A[g]&&(I&&(I+=" "),I+=g);return I}function cA(){for(var A,g,C=0,I="";C<arguments.length;)(A=arguments[C++])&&(g=ae(A))&&(I&&(I+=" "),I+=g);return I}var se={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},yE=u.createContext&&u.createContext(se),fo=["attr","size","title"];function po(A,g){if(A==null)return{};var C=ho(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 ho(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 $C(){return $C=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},$C.apply(this,arguments)}function SE(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 AI(A){for(var g=1;g<arguments.length;g++){var C=arguments[g]!=null?arguments[g]:{};g%2?SE(Object(C),!0).forEach(function(I){vo(A,I,C[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(C)):SE(Object(C)).forEach(function(I){Object.defineProperty(A,I,Object.getOwnPropertyDescriptor(C,I))})}return A}function vo(A,g,C){return g=bo(g),g in A?Object.defineProperty(A,g,{value:C,enumerable:!0,configurable:!0,writable:!0}):A[g]=C,A}function bo(A){var g=mo(A,"string");return typeof g=="symbol"?g:g+""}function mo(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 ce(A){return A&&A.map((g,C)=>u.createElement(g.tag,AI({key:C},g.attr),ce(g.child)))}function PA(A){return g=>u.createElement(wo,$C({attr:AI({},A.attr)},g),ce(A.child))}function wo(A){var g=C=>{var{attr:I,size:B,title:E}=A,Q=po(A,fo),e=B||C.size||"1em",t;return C.className&&(t=C.className),A.className&&(t=(t?t+" ":"")+A.className),u.createElement("svg",$C({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},C.attr,I,Q,{className:t,style:AI(AI({color:A.color||C.color},C.style),A.style),height:e,width:e,xmlns:"http://www.w3.org/2000/svg"}),E&&u.createElement("title",null,E),A.children)};return yE!==void 0?u.createElement(yE.Consumer,null,C=>g(C)):g(se)}function Do(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 mB(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 le(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 ue=u.createContext(null),yo=()=>Math.random().toString(36).slice(2,9);function de({children:A,defaultDuration:g=3e3,maxVisible:C=3}){const[I,B]=u.useState([]),E=u.useRef({}),Q=u.useCallback(o=>{B(r=>r.filter(i=>i.id!==o)),E.current[o]&&(clearTimeout(E.current[o]),delete E.current[o])},[]),e=u.useCallback((o,r)=>{const i=r?.id??yo(),a={id:i,message:o,variant:r?.variant??"neutral",duration:r?.duration===void 0?g:r.duration,actionLabel:r?.actionLabel,onAction:r?.onAction};return B(l=>{const d=[...l,a];return d.length>C&&d.shift(),d}),a.duration&&a.duration>0&&(E.current[i]=window.setTimeout(()=>Q(i),a.duration)),i},[g,C,Q]),t=u.useCallback(()=>{Object.values(E.current).forEach(o=>clearTimeout(o)),E.current={},B([])},[]),n=u.useMemo(()=>({show:e,dismiss:Q,clear:t}),[e,Q,t]);return s.jsxs(ue.Provider,{value:n,children:[A,DC.createPortal(s.jsx("div",{className:bg.region,children:s.jsx("div",{className:bg.stack,children:I.map(o=>s.jsxs("div",{className:cA(bg.toast,o.variant?bg[o.variant]:""),role:"status",children:[s.jsxs("div",{className:bg.body,children:[s.jsx("span",{className:bg.icon,children:s.jsx(mB,{size:18})}),s.jsx(XA,{size:"sm",weight:"regular",className:bg.message,children:o.message})]}),o.actionLabel&&o.onAction&&s.jsx(aI,{variant:"subtle",onClick:()=>{o.onAction?.(),Q(o.id)},children:o.actionLabel})]},o.id))})}),document.body)]})}function So(){const A=u.useContext(ue);if(!A)throw new Error("useToast must be used within <ToastProvider>");return A}const fe=A=>{const{config:g,children:C}=A;return s.jsx(ie,{children:s.jsxs(de,{children:[s.jsx(iI.WFace,{configuration:g}),C]})})};fe.displayName="Pixel";const Po="_alert_1scdn_1",No="_wrapper_1scdn_5",xo="_icon_1scdn_11",Fo="_content_1scdn_18",Ro="_success_1scdn_23",Oo="_bold_1scdn_29",Mo="_warning_1scdn_35",ko="_info_1scdn_47",Uo="_danger_1scdn_59",Rg={alert:Po,wrapper:No,icon:xo,content:Fo,success:Ro,bold:Oo,warning:Mo,info:ko,danger:Uo};function PE(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 Go(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 Jo(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 pe(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 he(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 Ho(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 ve(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 To(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 Ko(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 Yo(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 Vo(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 jo(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 be(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 me=A=>{const{variant:g,appearance:C="default",content:I,className:B}=A,E={success:s.jsx(he,{}),info:s.jsx(PE,{}),warning:s.jsx(Go,{}),danger:s.jsx(PE,{})};return s.jsx("div",{className:cA(Rg.alert,B,Rg[g],Rg[C]),children:s.jsx("div",{className:Rg.wrapper,children:u.isValidElement(I)?I:s.jsxs(s.Fragment,{children:[s.jsx("div",{className:Rg.icon,children:E[g]}),s.jsx("div",{className:Rg.content,children:I})]})})})};me.displayName="PiAlert";const Lo="_badge_13roa_1",Xo="_danger_13roa_13",zo="_filled_13roa_17",Wo="_success_13roa_21",qo="_warning_13roa_29",Zo="_info_13roa_37",_o="_red_13roa_45",$o="_orange_13roa_54",Ai="_purple_13roa_62",gi="_disabled_13roa_70",GC={badge:Lo,danger:Xo,filled:zo,success:Wo,warning:qo,info:Zo,red:_o,orange:$o,purple:Ai,disabled:gi},we=A=>{const{variant:g,filled:C=!1,content:I,disabled:B,className:E=""}=A;return s.jsx("span",{className:cA(GC.badge,GC[g],C?GC.filled:"",E,B?GC.disabled:""),children:I})};we.displayName="PiBadge";const Ci="_body_5fzmn_1",Ii="_left_5fzmn_6",Bi="_center_5fzmn_10",Ei="_right_5fzmn_14",Qi="_truncate_5fzmn_18",ei="_muted_5fzmn_24",ti="_xxl_5fzmn_28",ni="_xl_5fzmn_33",ri="_lg_5fzmn_38",oi="_md_5fzmn_43",ii="_sm_5fzmn_48",ai="_light_5fzmn_53",si="_regular_5fzmn_57",ci="_medium_5fzmn_61",li="_semibold_5fzmn_65",Og={body:Ci,left:Ii,center:Bi,right:Ei,truncate:Qi,muted:ei,xxl:ti,xl:ni,lg:ri,md:oi,sm:ii,light:ai,regular:si,medium:ci,semibold:li},ui={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},XA=A=>{const{children:g,className:C="",as:I,size:B="md",weight:E="regular",align:Q="inherit",muted:e,truncate:t}=A,n=I||ui[B],o=[Og.body,Og[B],Og[E],Og[Q],e?Og.muted:"",t?Og.truncate:"",C].filter(Boolean).join(" ");return s.jsx(n,{className:o,children:g})};XA.displayName="PiBody";const di="_wrapper_thhtr_1",fi="_list_thhtr_5",pi="_item_thhtr_12",hi="_link_thhtr_16",vi="_label_thhtr_25",bi="_current_thhtr_28",mi="_separator_thhtr_32",mg={wrapper:di,list:fi,item:pi,link:hi,label:vi,current:bi,separator:mi},De=({items:A,separator:g="/",className:C})=>s.jsx("nav",{className:cA(mg.wrapper,C),"aria-label":"Breadcrumb",children:s.jsx("ol",{className:mg.list,children:A.map((I,B)=>{const E=B===A.length-1;return s.jsxs("li",{className:mg.item,children:[I.href&&!E?s.jsx("a",{href:I.href,className:mg.link,children:I.label}):s.jsx("span",{className:cA(mg.label,E&&mg.current),children:I.label}),!E&&s.jsx("span",{className:mg.separator,children:g})]},B)})})});De.displayName="PiBreadcrumb";const wi="_button_ih3sx_1",Di="_primary_ih3sx_14",yi="_secondary_ih3sx_26",Si="_tertiary_ih3sx_39",Pi="_subtle_ih3sx_53",Ni="_destructive_ih3sx_65",xi="_success_ih3sx_77",Fi="_fullWidth_ih3sx_89",Ri="_link_ih3sx_96",Oi="_iconButton_ih3sx_113",wg={button:wi,primary:Di,secondary:yi,tertiary:Si,subtle:Pi,destructive:Ni,success:xi,fullWidth:Fi,link:Ri,iconButton:Oi},aI=A=>{const{children:g,variant:C="primary",className:I="",fullWidth:B=!1,link:E=!1,prefixIcon:Q,suffixIcon:e,iconButton:t,...n}=A;return s.jsxs("button",{...n,className:`
|
|
2
2
|
${wg.button}
|
|
3
3
|
${wg[C]}
|
|
4
4
|
${I}
|