@wface/pixel-ui 0.3.1 → 0.3.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.
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ type Props = {
3
+ header?: {
4
+ title?: string | React.ReactNode;
5
+ subtitle?: string | React.ReactNode;
6
+ icon?: React.ReactNode;
7
+ };
8
+ children: React.ReactNode;
9
+ footer?: React.ReactNode;
10
+ className?: string;
11
+ };
12
+ declare const Card: (props: Props) => import("react/jsx-runtime").JSX.Element;
13
+ export default Card;
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,KAAK,GAAG;IACT,MAAM,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;QAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;QACnC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KACzB,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,QAAA,MAAM,IAAI,GAAI,OAAO,KAAK,4CAoCzB,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type WGridProps } from "wface";
2
+ declare const Grid: {
3
+ (props: WGridProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export default Grid;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/grid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAC,MAAM,OAAO,CAAC;AAE7C,QAAA,MAAM,IAAI;YAAW,UAAU;;CAI9B,CAAC;AAGF,eAAe,IAAI,CAAC"}
@@ -4,6 +4,8 @@ interface ThemeContextValue {
4
4
  theme: Theme;
5
5
  setTheme: (theme: Theme) => void;
6
6
  toggleTheme: () => void;
7
+ expanded: boolean;
8
+ toggleExpand: () => void;
7
9
  }
8
10
  export declare const ThemeProvider: ({ children }: {
9
11
  children: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/theme-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9B,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB;AAID,eAAO,MAAM,aAAa,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CA4BxE,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAMpB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/theme-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAE9E,KAAK,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9B,UAAU,iBAAiB;IACzB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B;AAID,eAAO,MAAM,aAAa,GAAI,cAAc;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,4CAwCxE,CAAC;AAEF,eAAO,MAAM,QAAQ,yBAMpB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ToastContextValue } from "../../types/toast";
2
+ import type { ToastContextValue } from '@/types/toast.ts';
3
3
  export declare function ToastProvider({ children, defaultDuration, maxVisible }: {
4
4
  children: React.ReactNode;
5
5
  defaultDuration?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/toast-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,mBAAmB,CAAC;AAStE,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,eAAsB,EAAE,UAAc,EAAE,EAAE;IAClF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CAwFA;AAED,wBAAgB,QAAQ,sBAIvB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contexts/toast-context/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,iBAAiB,EAAa,MAAM,kBAAkB,CAAC;AASrE,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,eAAsB,EAAE,UAAc,EAAE,EAAE;IAClF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,2CAwFA;AAED,wBAAgB,QAAQ,sBAIvB"}
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),Pn=require("wface"),f=require("react"),jr=require("react-dom");function Hr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ri=Hr(Pn),F=Hr(f),Lr=f.createContext(void 0),zr=({children:e})=>{const[t,n]=f.useState("light"),r=o=>{n(o),document.body.setAttribute("data-theme",o),localStorage.setItem("theme",o)},a=()=>{r(t==="light"?"dark":"light")};return f.useEffect(()=>{const o=localStorage.getItem("theme");if(o)r(o);else{const i=window.matchMedia("(prefers-color-scheme: dark)").matches;r(i?"dark":"light")}},[]),v.jsx(Lr.Provider,{value:{theme:t,setTheme:r,toggleTheme:a},children:e})},ai=()=>{const e=f.useContext(Lr);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e},oi="_region_jo93y_1",ii="_stack_jo93y_10",si="_toast_jo93y_16",ui="_body_jo93y_29",ci="_icon_jo93y_35",li="_neutral_jo93y_42",di="_message_jo93y_48",fi="_success_jo93y_51",mi="_warning_jo93y_60",hi="_danger_jo93y_69",gi="_info_jo93y_78",Le={region:oi,stack:ii,toast:si,body:ui,icon:ci,neutral:li,message:di,success:fi,warning:mi,danger:hi,info:gi};function Jr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Jr(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ie(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Jr(e))&&(r&&(r+=" "),r+=t);return r}var $r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Kn=f.createContext&&f.createContext($r),bi=["attr","size","title"];function pi(e,t){if(e==null)return{};var n=vi(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vi(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yt.apply(this,arguments)}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?er(Object(n),!0).forEach(function(r){yi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yi(e,t,n){return t=Ci(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ci(e){var t=Ii(e,"string");return typeof t=="symbol"?t:t+""}function Ii(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ur(e){return e&&e.map((t,n)=>f.createElement(t.tag,Zt({key:n},t.attr),Ur(t.child)))}function ye(e){return t=>f.createElement(xi,Yt({attr:Zt({},e.attr)},t),Ur(e.child))}function xi(e){var t=n=>{var{attr:r,size:a,title:o}=e,i=pi(e,bi),s=a||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),f.createElement("svg",Yt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:u,style:Zt(Zt({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&f.createElement("title",null,o),e.children)};return Kn!==void 0?f.createElement(Kn.Consumer,null,n=>t(n)):t($r)}function wi(e){return ye({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:[]}]})(e)}function On(e){return ye({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:[]}]})(e)}function Qr(e){return ye({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:[]}]})(e)}const qr=f.createContext(null),Si=()=>Math.random().toString(36).slice(2,9);function Kr({children:e,defaultDuration:t=3e3,maxVisible:n=3}){const[r,a]=f.useState([]),o=f.useRef({}),i=f.useCallback(c=>{a(d=>d.filter(h=>h.id!==c)),o.current[c]&&(clearTimeout(o.current[c]),delete o.current[c])},[]),s=f.useCallback((c,d)=>{const h=d?.id??Si(),g={id:h,message:c,variant:d?.variant??"neutral",duration:d?.duration===void 0?t:d.duration,actionLabel:d?.actionLabel,onAction:d?.onAction};return a(b=>{const C=[...b,g];return C.length>n&&C.shift(),C}),g.duration&&g.duration>0&&(o.current[h]=window.setTimeout(()=>i(h),g.duration)),h},[t,n,i]),u=f.useCallback(()=>{Object.values(o.current).forEach(c=>clearTimeout(c)),o.current={},a([])},[]),l=f.useMemo(()=>({show:s,dismiss:i,clear:u}),[s,i,u]);return v.jsxs(qr.Provider,{value:l,children:[e,jr.createPortal(v.jsx("div",{className:Le.region,children:v.jsx("div",{className:Le.stack,children:r.map(c=>v.jsxs("div",{className:ie(Le.toast,c.variant?Le[c.variant]:""),role:"status",children:[v.jsxs("div",{className:Le.body,children:[v.jsx("span",{className:Le.icon,children:v.jsx(On,{size:18})}),v.jsx(Ke,{size:"sm",weight:"regular",className:Le.message,children:c.message})]}),c.actionLabel&&c.onAction&&v.jsx(Gn,{variant:"subtle",onClick:()=>{c.onAction?.(),i(c.id)},children:c.actionLabel})]},c.id))})}),document.body)]})}function Ai(){const e=f.useContext(qr);if(!e)throw new Error("useToast must be used within <ToastProvider>");return e}const ea=e=>{const{config:t}=e;return v.jsx(zr,{children:v.jsx(Kr,{children:v.jsx(Pn.WFace,{configuration:t})})})};ea.displayName="Pixel";const Mi="_alert_1scdn_1",Ni="_wrapper_1scdn_5",Ei="_icon_1scdn_11",Pi="_content_1scdn_18",Oi="_success_1scdn_23",Gi="_bold_1scdn_29",Di="_warning_1scdn_35",Wi="_info_1scdn_47",Fi="_danger_1scdn_59",tt={alert:Mi,wrapper:Ni,icon:Ei,content:Pi,success:Oi,bold:Gi,warning:Di,info:Wi,danger:Fi};function tr(e){return ye({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:[]}]})(e)}function Bi(e){return ye({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:[]}]})(e)}function ta(e){return ye({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:[]}]})(e)}function ki(e){return ye({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:[]}]})(e)}function Ti(e){return ye({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:[]}]})(e)}function _i(e){return ye({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:[]}]})(e)}function Vi(e){return ye({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:[]}]})(e)}function Ri(e){return ye({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:[]}]})(e)}function Xi(e){return ye({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:[]}]})(e)}function Yi(e){return ye({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:[]}]})(e)}function Zi(e){return ye({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:[]}]})(e)}const na=e=>{const{variant:t,appearance:n="default",content:r,className:a}=e,o={success:v.jsx(ki,{}),info:v.jsx(tr,{}),warning:v.jsx(Bi,{}),danger:v.jsx(tr,{})};return v.jsx("div",{className:ie(tt.alert,a,tt[t],tt[n]),children:v.jsx("div",{className:tt.wrapper,children:f.isValidElement(r)?r:v.jsxs(v.Fragment,{children:[v.jsx("div",{className:tt.icon,children:o[t]}),v.jsx("div",{className:tt.content,children:r})]})})})};na.displayName="PiAlert";const ji="_badge_13roa_1",Hi="_danger_13roa_13",Li="_filled_13roa_17",zi="_success_13roa_21",Ji="_warning_13roa_29",$i="_info_13roa_37",Ui="_red_13roa_45",Qi="_orange_13roa_54",qi="_purple_13roa_62",Ki="_disabled_13roa_70",Dt={badge:ji,danger:Hi,filled:Li,success:zi,warning:Ji,info:$i,red:Ui,orange:Qi,purple:qi,disabled:Ki},ra=e=>{const{variant:t,filled:n=!1,content:r,disabled:a,className:o=""}=e;return v.jsx("span",{className:ie(Dt.badge,Dt[t],n?Dt.filled:"",o,a?Dt.disabled:""),children:r})};ra.displayName="PiBadge";const es="_body_5fzmn_1",ts="_left_5fzmn_6",ns="_center_5fzmn_10",rs="_right_5fzmn_14",as="_truncate_5fzmn_18",os="_muted_5fzmn_24",is="_xxl_5fzmn_28",ss="_xl_5fzmn_33",us="_lg_5fzmn_38",cs="_md_5fzmn_43",ls="_sm_5fzmn_48",ds="_light_5fzmn_53",fs="_regular_5fzmn_57",ms="_medium_5fzmn_61",hs="_semibold_5fzmn_65",nt={body:es,left:ts,center:ns,right:rs,truncate:as,muted:os,xxl:is,xl:ss,lg:us,md:cs,sm:ls,light:ds,regular:fs,medium:ms,semibold:hs},gs={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},Ke=e=>{const{children:t,className:n="",as:r,size:a="md",weight:o="regular",align:i="inherit",muted:s,truncate:u}=e,l=r||gs[a],c=[nt.body,nt[a],nt[o],nt[i],s?nt.muted:"",u?nt.truncate:"",n].filter(Boolean).join(" ");return v.jsx(l,{className:c,children:t})};Ke.displayName="PiBody";const bs="_wrapper_thhtr_1",ps="_list_thhtr_5",vs="_item_thhtr_12",ys="_link_thhtr_16",Cs="_label_thhtr_25",Is="_current_thhtr_28",xs="_separator_thhtr_32",ze={wrapper:bs,list:ps,item:vs,link:ys,label:Cs,current:Is,separator:xs},aa=({items:e,separator:t="/",className:n})=>v.jsx("nav",{className:ie(ze.wrapper,n),"aria-label":"Breadcrumb",children:v.jsx("ol",{className:ze.list,children:e.map((r,a)=>{const o=a===e.length-1;return v.jsxs("li",{className:ze.item,children:[r.href&&!o?v.jsx("a",{href:r.href,className:ze.link,children:r.label}):v.jsx("span",{className:ie(ze.label,o&&ze.current),children:r.label}),!o&&v.jsx("span",{className:ze.separator,children:t})]},a)})})});aa.displayName="PiBreadcrumb";const ws="_button_8xndd_1",Ss="_primary_8xndd_13",As="_secondary_8xndd_25",Ms="_tertiary_8xndd_38",Ns="_subtle_8xndd_52",Es="_destructive_8xndd_64",Ps="_success_8xndd_76",Os="_fullWidth_8xndd_88",Gs="_link_8xndd_95",Ds="_iconButton_8xndd_112",Je={button:ws,primary:Ss,secondary:As,tertiary:Ms,subtle:Ns,destructive:Es,success:Ps,fullWidth:Os,link:Gs,iconButton:Ds},Gn=e=>{const{children:t,variant:n="primary",className:r="",fullWidth:a=!1,link:o=!1,prefixIcon:i,suffixIcon:s,iconButton:u,...l}=e;return v.jsxs("button",{...l,className:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),Pn=require("wface"),f=require("react"),jr=require("react-dom");function Hr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ri=Hr(Pn),F=Hr(f),Lr=f.createContext(void 0),zr=({children:e})=>{const[t,n]=f.useState("light"),[r,a]=f.useState(!0),o=u=>{n(u),document.body.setAttribute("data-theme",u),localStorage.setItem("theme",u)},i=()=>{o(t==="light"?"dark":"light")},s=()=>{a(!r),localStorage.setItem("expanded",JSON.stringify(!r))};return f.useEffect(()=>{const u=localStorage.getItem("theme");if(u)o(u);else{const l=window.matchMedia("(prefers-color-scheme: dark)").matches;o(l?"dark":"light")}},[]),f.useEffect(()=>{const u=localStorage.getItem("expanded")==="true";a(u)},[]),v.jsx(Lr.Provider,{value:{theme:t,setTheme:o,toggleTheme:i,expanded:r,toggleExpand:s},children:e})},ai=()=>{const e=f.useContext(Lr);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e},oi="_region_jo93y_1",ii="_stack_jo93y_10",si="_toast_jo93y_16",ui="_body_jo93y_29",ci="_icon_jo93y_35",li="_neutral_jo93y_42",di="_message_jo93y_48",fi="_success_jo93y_51",mi="_warning_jo93y_60",hi="_danger_jo93y_69",gi="_info_jo93y_78",Le={region:oi,stack:ii,toast:si,body:ui,icon:ci,neutral:li,message:di,success:fi,warning:mi,danger:hi,info:gi};function Jr(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Jr(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ie(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Jr(e))&&(r&&(r+=" "),r+=t);return r}var $r={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Kn=f.createContext&&f.createContext($r),bi=["attr","size","title"];function pi(e,t){if(e==null)return{};var n=vi(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a<o.length;a++)r=o[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vi(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Yt(){return Yt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yt.apply(this,arguments)}function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?er(Object(n),!0).forEach(function(r){yi(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):er(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yi(e,t,n){return t=Ci(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ci(e){var t=Ii(e,"string");return typeof t=="symbol"?t:t+""}function Ii(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ur(e){return e&&e.map((t,n)=>f.createElement(t.tag,Zt({key:n},t.attr),Ur(t.child)))}function ye(e){return t=>f.createElement(xi,Yt({attr:Zt({},e.attr)},t),Ur(e.child))}function xi(e){var t=n=>{var{attr:r,size:a,title:o}=e,i=pi(e,bi),s=a||n.size||"1em",u;return n.className&&(u=n.className),e.className&&(u=(u?u+" ":"")+e.className),f.createElement("svg",Yt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,i,{className:u,style:Zt(Zt({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),o&&f.createElement("title",null,o),e.children)};return Kn!==void 0?f.createElement(Kn.Consumer,null,n=>t(n)):t($r)}function wi(e){return ye({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:[]}]})(e)}function On(e){return ye({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:[]}]})(e)}function Qr(e){return ye({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:[]}]})(e)}const qr=f.createContext(null),Si=()=>Math.random().toString(36).slice(2,9);function Kr({children:e,defaultDuration:t=3e3,maxVisible:n=3}){const[r,a]=f.useState([]),o=f.useRef({}),i=f.useCallback(c=>{a(d=>d.filter(h=>h.id!==c)),o.current[c]&&(clearTimeout(o.current[c]),delete o.current[c])},[]),s=f.useCallback((c,d)=>{const h=d?.id??Si(),g={id:h,message:c,variant:d?.variant??"neutral",duration:d?.duration===void 0?t:d.duration,actionLabel:d?.actionLabel,onAction:d?.onAction};return a(b=>{const C=[...b,g];return C.length>n&&C.shift(),C}),g.duration&&g.duration>0&&(o.current[h]=window.setTimeout(()=>i(h),g.duration)),h},[t,n,i]),u=f.useCallback(()=>{Object.values(o.current).forEach(c=>clearTimeout(c)),o.current={},a([])},[]),l=f.useMemo(()=>({show:s,dismiss:i,clear:u}),[s,i,u]);return v.jsxs(qr.Provider,{value:l,children:[e,jr.createPortal(v.jsx("div",{className:Le.region,children:v.jsx("div",{className:Le.stack,children:r.map(c=>v.jsxs("div",{className:ie(Le.toast,c.variant?Le[c.variant]:""),role:"status",children:[v.jsxs("div",{className:Le.body,children:[v.jsx("span",{className:Le.icon,children:v.jsx(On,{size:18})}),v.jsx(Ke,{size:"sm",weight:"regular",className:Le.message,children:c.message})]}),c.actionLabel&&c.onAction&&v.jsx(Gn,{variant:"subtle",onClick:()=>{c.onAction?.(),i(c.id)},children:c.actionLabel})]},c.id))})}),document.body)]})}function Ai(){const e=f.useContext(qr);if(!e)throw new Error("useToast must be used within <ToastProvider>");return e}const ea=e=>{const{config:t}=e;return v.jsx(zr,{children:v.jsx(Kr,{children:v.jsx(Pn.WFace,{configuration:t})})})};ea.displayName="Pixel";const Mi="_alert_1scdn_1",Ni="_wrapper_1scdn_5",Ei="_icon_1scdn_11",Pi="_content_1scdn_18",Oi="_success_1scdn_23",Gi="_bold_1scdn_29",Di="_warning_1scdn_35",Wi="_info_1scdn_47",Fi="_danger_1scdn_59",tt={alert:Mi,wrapper:Ni,icon:Ei,content:Pi,success:Oi,bold:Gi,warning:Di,info:Wi,danger:Fi};function tr(e){return ye({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:[]}]})(e)}function Bi(e){return ye({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:[]}]})(e)}function ta(e){return ye({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:[]}]})(e)}function ki(e){return ye({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:[]}]})(e)}function Ti(e){return ye({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:[]}]})(e)}function _i(e){return ye({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:[]}]})(e)}function Vi(e){return ye({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:[]}]})(e)}function Ri(e){return ye({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:[]}]})(e)}function Xi(e){return ye({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:[]}]})(e)}function Yi(e){return ye({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:[]}]})(e)}function Zi(e){return ye({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:[]}]})(e)}const na=e=>{const{variant:t,appearance:n="default",content:r,className:a}=e,o={success:v.jsx(ki,{}),info:v.jsx(tr,{}),warning:v.jsx(Bi,{}),danger:v.jsx(tr,{})};return v.jsx("div",{className:ie(tt.alert,a,tt[t],tt[n]),children:v.jsx("div",{className:tt.wrapper,children:f.isValidElement(r)?r:v.jsxs(v.Fragment,{children:[v.jsx("div",{className:tt.icon,children:o[t]}),v.jsx("div",{className:tt.content,children:r})]})})})};na.displayName="PiAlert";const ji="_badge_13roa_1",Hi="_danger_13roa_13",Li="_filled_13roa_17",zi="_success_13roa_21",Ji="_warning_13roa_29",$i="_info_13roa_37",Ui="_red_13roa_45",Qi="_orange_13roa_54",qi="_purple_13roa_62",Ki="_disabled_13roa_70",Dt={badge:ji,danger:Hi,filled:Li,success:zi,warning:Ji,info:$i,red:Ui,orange:Qi,purple:qi,disabled:Ki},ra=e=>{const{variant:t,filled:n=!1,content:r,disabled:a,className:o=""}=e;return v.jsx("span",{className:ie(Dt.badge,Dt[t],n?Dt.filled:"",o,a?Dt.disabled:""),children:r})};ra.displayName="PiBadge";const es="_body_5fzmn_1",ts="_left_5fzmn_6",ns="_center_5fzmn_10",rs="_right_5fzmn_14",as="_truncate_5fzmn_18",os="_muted_5fzmn_24",is="_xxl_5fzmn_28",ss="_xl_5fzmn_33",us="_lg_5fzmn_38",cs="_md_5fzmn_43",ls="_sm_5fzmn_48",ds="_light_5fzmn_53",fs="_regular_5fzmn_57",ms="_medium_5fzmn_61",hs="_semibold_5fzmn_65",nt={body:es,left:ts,center:ns,right:rs,truncate:as,muted:os,xxl:is,xl:ss,lg:us,md:cs,sm:ls,light:ds,regular:fs,medium:ms,semibold:hs},gs={xxl:"p",xl:"p",lg:"p",md:"p",sm:"p"},Ke=e=>{const{children:t,className:n="",as:r,size:a="md",weight:o="regular",align:i="inherit",muted:s,truncate:u}=e,l=r||gs[a],c=[nt.body,nt[a],nt[o],nt[i],s?nt.muted:"",u?nt.truncate:"",n].filter(Boolean).join(" ");return v.jsx(l,{className:c,children:t})};Ke.displayName="PiBody";const bs="_wrapper_thhtr_1",ps="_list_thhtr_5",vs="_item_thhtr_12",ys="_link_thhtr_16",Cs="_label_thhtr_25",Is="_current_thhtr_28",xs="_separator_thhtr_32",ze={wrapper:bs,list:ps,item:vs,link:ys,label:Cs,current:Is,separator:xs},aa=({items:e,separator:t="/",className:n})=>v.jsx("nav",{className:ie(ze.wrapper,n),"aria-label":"Breadcrumb",children:v.jsx("ol",{className:ze.list,children:e.map((r,a)=>{const o=a===e.length-1;return v.jsxs("li",{className:ze.item,children:[r.href&&!o?v.jsx("a",{href:r.href,className:ze.link,children:r.label}):v.jsx("span",{className:ie(ze.label,o&&ze.current),children:r.label}),!o&&v.jsx("span",{className:ze.separator,children:t})]},a)})})});aa.displayName="PiBreadcrumb";const ws="_button_8xndd_1",Ss="_primary_8xndd_13",As="_secondary_8xndd_25",Ms="_tertiary_8xndd_38",Ns="_subtle_8xndd_52",Es="_destructive_8xndd_64",Ps="_success_8xndd_76",Os="_fullWidth_8xndd_88",Gs="_link_8xndd_95",Ds="_iconButton_8xndd_112",Je={button:ws,primary:Ss,secondary:As,tertiary:Ms,subtle:Ns,destructive:Es,success:Ps,fullWidth:Os,link:Gs,iconButton:Ds},Gn=e=>{const{children:t,variant:n="primary",className:r="",fullWidth:a=!1,link:o=!1,prefixIcon:i,suffixIcon:s,iconButton:u,...l}=e;return v.jsxs("button",{...l,className:`
2
2
  ${Je.button}
3
3
  ${Je[n]}
4
4
  ${r}