@udixio/ui-react 1.6.1 → 1.6.3
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/CHANGELOG.md +21 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## 1.6.3 (2025-09-04)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- change theme variant and remove free-brands-svg-icons ([b5f5468](https://github.com/Udixio/UI/commit/b5f5468))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated @udixio/tailwind to 1.7.2
|
|
10
|
+
- Updated @udixio/theme to 1.3.0
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- Joël VIGREUX
|
|
15
|
+
|
|
16
|
+
## 1.6.2 (2025-08-31)
|
|
17
|
+
|
|
18
|
+
### 🧱 Updated Dependencies
|
|
19
|
+
|
|
20
|
+
- Updated @udixio/tailwind to 1.7.1
|
|
21
|
+
|
|
1
22
|
## 1.6.1 (2025-08-31)
|
|
2
23
|
|
|
3
24
|
### 🩹 Fixes
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),le=require("clsx"),De=require("tailwind-merge"),i=require("react"),E=require("motion/react"),$e=require("throttle-debounce"),oe=require("react-dom"),Fe=require("@udixio/theme"),qe=require("@udixio/tailwind"),Ue=require("react-textarea-autosize"),ae=De.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),d=(...e)=>ae(le.clsx(e)),ce=(...e)=>ae(le.clsx(e));function Oe(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const ie=e=>{const t={};e.classNameList.forEach(l=>{var n;if(l)if(typeof l=="string")(t[n=e.default]??(t[n]=[])).push(l);else{const a=l(e.states);Object.entries(a).map(f=>{const[c,m]=f;(t[c]??(t[c]=[])).push(m)})}});const r=t;return Object.entries(t).map(l=>{let[n,a]=l;a=a.reverse(),n==e.default&&a.unshift("relative"),a.unshift(Oe(n)),r[n]=ce(...a)}),r},q=(e,t)=>r=>ie({classNameList:[r.className,t],default:e,states:r}),ue=q("button",({variant:e,disableTextMargins:t,disabled:r,iconPosition:l,icon:n,isActive:a,loading:f,shape:c,onToggle:m,size:s,allowShapeTransformation:h})=>({button:d(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||h&&a)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},h&&!r&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!r,"bg-surface-container-low text-primary":!r&&!a,"bg-primary text-on-primary":!r&&a,"text-on-surface/[38%]":r},e==="filled"&&{"hover:shadow-1":!r,"bg-surface-container text-on-surface-variant":!r&&!a&&m,"bg-primary text-on-primary":!r&&(a&&m||!m),"text-on-surface/[38%]":r},e==="tonal"&&{"hover:shadow-1":!r,"bg-secondary-container text-on-secondary-container":!r&&!a,"bg-secondary text-on-secondary":!r&&a,"text-on-surface/[0.38]":r},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":r,"text-primary border-outline focus:border-primary":!r&&!a,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!r&&a}],e==="text"&&["w-fit",{"text-primary":!r,"text-on-surface/[0.38]":r},t&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],r&&"cursor-default"),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":r,"group-state-primary":!r},e==="filled"&&{"bg-on-surface/[0.12]":r,"group-state-on-primary":!r&&!m,"group-state-on-surface-variant":!r&&m},c==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(c==="squared"||h&&a)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},h&&!r&&{"group-active:rounded-[12px]":s==="xSmall"||s=="small","group-active:rounded-[16px]":s==="medium","group-active:rounded-[28px]":s==="large"||s=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":r,"group-state-on-secondary-container ":!r},e==="outlined"&&{"group-state-primary group-state-primary":!r},e==="text"&&{"group-state-primary":!r}),label:d({invisible:f}),icon:d({invisible:f},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")})),fe=q("card",({variant:e,isInteractive:t})=>({card:d("card group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest"),stateLayer:d(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),de=q("carouselItem",()=>({carouselItem:d("rounded-[28px] overflow-hidden flex-none")})),me=q("carousel",()=>({carousel:d(["w-full h-[400px]"]),track:d("grid grid-flow-col h-full transition-transform ease-out w-fit")})),pe=q("divider",({orientation:e})=>({divider:d("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),he=q("fab",({size:e,variant:t,isExtended:r})=>({fab:d("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!r,"rounded-[16px]":e=="medium"||r,"rounded-[28px]":e=="large"&&!r},{"p-2":e=="small"&&!r,"p-4":e=="medium"||r,"p-[30px]":e=="large"&&!r},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:d({"size-6":e=="small"||e=="medium"||r,"size-9":e=="large"&&!r},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:d("text-title-medium text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),xe=q("iconButton",({variant:e,disabled:t,onToggle:r,isActive:l,size:n,width:a,shape:f,allowShapeTransformation:c})=>({iconButton:d("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&r&&!t&&l&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&l&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!l&&!!r,"bg-primary":l||!r},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!l&&!!r,"bg-secondary-container":l||!r},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!l,"border border-transparent bg-inverse-surface":l},!!t&&{"border border-on-surface/[0.12]":!l,"border border-transparent bg-on-surface/[0.12]":l}]),touchTarget:d("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:d("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&r&&!t&&l&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&l&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!l,"state-primary":l},e==="filled"&&{"state-primary":!l&&!!r,"state-inverse-on-surface":l||!r},e==="tonal"&&{"state-on-surface-variant":!l&&!!r,"state-on-secondary-container":l||!r},e==="outlined"&&{"state-on-surface-variant":!l,"state-on-primary":l}]),icon:d(" transition-all duration-300",{"size-5 p-1.5":n==="xSmall"},{"size-6 p-2":n==="small"},{"size-6 p-4":n==="medium"},{"size-8 p-8":n==="large"},{"size-10 p-12":n==="xLarge"},a=="narrow"&&[{"px-1":n==="xSmall"},{"px-1":n==="small"},{"px-3":n==="medium"},{"px-4":n==="large"},{"px-8":n==="xLarge"}],a=="wide"&&[{"px-2.5":n==="xSmall"},{"px-3.5":n==="small"},{"px-6":n==="medium"},{"px-12":n==="large"},{"px-[72px]":n==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!l,"text-primary":l},e==="filled"&&{"text-primary":!l&&!!r,"text-on-primary":l||!r},e==="tonal"&&{"text-on-surface-variant":!l&&!!r,"text-on-secondary-container":l||!r},e==="outlined"&&{"text-on-surface-variant":!l,"text-inverse-on-surface":l}],!!t&&"text-on-surface/[0.38]")})),ye=q("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:d((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:d("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:d({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:d("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),ge=q("slideSheet",({variant:e,position:t})=>({slideSheet:d("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:d("w-full overflow-hidden",{}),content:d("w-fit "),header:d("p-4 flex items-center gap-2"),title:d("text-on-surface-variant text-title-large"),closeButton:d("ml-auto"),divider:d({hidden:e=="modal"}),overlay:d("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")})),we=q("slider",({isChanging:e})=>({slider:d(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:d(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:d(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:d(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:d(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:d(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ve=q("snackbar",()=>({snackbar:d(" rounded bg-inverse-surface "),container:d("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:d("text-body-medium text-inverse-on-surface "),icon:d(" ml-auto mr-0 text-inverse-on-surface block dark")})),be=q("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:d("group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:d("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:d("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!r},{"w-[24px] h-[24px]":!(!e&&!r)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:d("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:d("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),je=q("tab",({isSelected:e,icon:t,label:r,variant:l})=>({tab:d("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&r)&&l==="primary"&&"h-16",!(t&&r&&l==="primary")&&"h-12"),stateLayer:d("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",l==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},l==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:d("flex gap-0.5 h-full justify-center",{relative:l=="primary"},{"":!!(r&&!t)},l==="primary"&&"flex-col items-center",l==="secondary"&&{"flex-col items-center":!(r&&t),"flex-row items-center gap-2":!!(r&&t)}),icon:d("h-6 w-6 p-0.5 !box-border",l==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},l==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:d("text-title-small text-nowrap",l==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},l==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:d("bg-primary absolute w-full left-0 bottom-0",l==="primary"&&"h-[3px] rounded-t",l==="secondary"&&"h-0.5")})),Se=q("tabs",({scrollable:e})=>({tabs:d("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),Ne=q("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:l,errorText:n,isFocused:a,value:f,suffix:c,textLine:m})=>({textField:d({"opacity-[.38]":e}),content:d("group transition-border duration-200 relative flex items-center ",{"h-14":m=="singleLine"},{"border-on-surface-variant":!(n!=null&&n.length)&&!a&&l=="filled","border-outline":!(n!=null&&n.length)&&!a&&l=="outlined","border-primary":!(n!=null&&n.length)&&a,"border-error":!!(n!=null&&n.length)},{"bg-on-surface/[0.04]":e},l=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],l=="outlined"&&["border rounded box-border",{"border-[3px]":a}]),stateLayer:d("absolute -z-10 w-full h-full top-0 left-0",{hidden:l=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":a}),label:d("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"text-error":!!(n!=null&&n.length)},{"text-primary":!(n!=null&&n.length)&&a}),input:d("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!c},l=="filled"&&" pb-2 pt-6",l=="outlined"&&"py-4 relative z-10"),activeIndicator:d("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",l=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(n!=null&&n.length)},{"bg-error":!!(n!=null&&n.length)},{"!w-full":a}]),supportingText:d(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"!w-full":a},{"text-error":!!(n!=null&&n.length)}),leadingIcon:d(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!i.isValidElement(t)}]),trailingIcon:d("h-12 w-12 flex items-center justify-center",{"cursor-text":!i.isValidElement(r)}),suffix:d("text-on-surface-variant pl-0 pr-4",l=="filled"&&" pb-2 pt-6",l=="outlined"&&"py-4 relative z-10")})),Ee=q("toolTip",({position:e,variant:t})=>({toolTip:d(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:d("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:d("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:d("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:d("")})),K=({icon:e,colors:t=[],className:r})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),o.jsx("div",{className:d("size-5 box-content inline-flex fill-current",r),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return o.jsx("img",{src:s.src,width:s.width,height:s.height,className:d("size-5 box-content",r),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const l=e;if(!(l!=null&&l.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:n}=l,[a,f,,,c]=n||[],m=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return o.jsx("svg",{className:d("size-5 box-content",r),style:{...m(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${a} ${f}`,role:"img","aria-hidden":"true",children:typeof c=="string"?o.jsx("path",{className:"fill-current",d:c}):c.map((s,h)=>o.jsx("path",{d:s},h))})},Le=({variant:e="linear-determinate",value:t=0,transitionDuration:r=1e3,className:l,...n})=>{const[a,f]=i.useState(t),[c]=i.useState(1.5);i.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[m,s]=i.useState(!0),h=()=>m?c:c*.5;i.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&a!==100){const b=setInterval(()=>{f(m?10:90),s(!m)},h()*1e3);return()=>clearInterval(b)}},[e,m,a]);const[p,u]=i.useState(!1);i.useEffect(()=>{if(a>=100){const b=setTimeout(()=>{u(!1)},r);return()=>{clearTimeout(b)}}else u(!0)},[a,r]);const x=ye({className:l,variant:e,value:t,transitionDuration:r,isVisible:p});return o.jsxs(o.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&o.jsxs("div",{className:x.progressIndicator,...n,children:[o.jsx("div",{style:{width:`${a}%`,transition:`width ${r}ms ease-in-out ${a==100?", max-height 200ms 0.5s ease-in-out":""}`},className:x.track}),o.jsx("div",{style:{marginLeft:a!=100?"6px":"0px",transition:`width ${r}ms ease-in-out ${a==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r/1.5}ms`:""}`},className:x.activeIndicator}),o.jsx("div",{style:{width:"4 px",transition:`width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:x.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&o.jsx(E.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:h(),ease:"linear"},className:x.progressIndicator,...n,children:o.jsx(E.motion.circle,{cx:"50%",cy:"50%",r:p?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:x.activeIndicator,variants:{hidden:{pathLength:m?10/100:90/100},visible:{pathLength:m?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:h(),bounce:0}}})},m+"")]})},Z=({colorName:e="on-surface",triggerRef:t})=>{const r={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[l,n]=i.useState(!0),[a,f]=i.useState(!1),[c,m]=i.useState({x:0,y:0});i.useEffect(()=>{a&&(n(!0),n(!1))},[a]),i.useEffect(()=>{const u=t==null?void 0:t.current;if(u)return u.addEventListener("mousedown",s),u.addEventListener("mouseup",p),u.addEventListener("mouseleave",h),()=>{u.removeEventListener("mousedown",s),u.removeEventListener("mouseup",p),u.removeEventListener("mouseleave",h)}},[t]);const s=u=>{const x=t==null?void 0:t.current,b=x.getBoundingClientRect();f(!0),m({x:(u.clientX-b.left)/x.clientWidth*100,y:(u.clientY-b.top)/x.clientHeight*100})},h=u=>{f(!1)},p=u=>{f(!1)};return o.jsx(E.AnimatePresence,{mode:"wait",children:(a||!a&&!l)&&o.jsx(E.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:c.y+"%",left:c.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:r,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>n(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Ie=q("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:d("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":r,"[&::-webkit-scrollbar-thumb]:bg-transparent":!r},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!r,"cursor-grabbing":t&&r}),track:d("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),ee=({children:e,orientation:t="vertical",scrollSize:r,onScroll:l,className:n,draggable:a=!1,throttleDuration:f=75})=>{var V,D;const c=i.useRef(null),m=i.useRef(null),[s,h]=i.useState({width:null,height:null});i.useEffect(()=>{if(!c.current)return;const k=new ResizeObserver($=>{for(const F of $)F.target===c.current&&h({width:F.contentRect.width,height:F.contentRect.height})});return k.observe(c.current),()=>{k.disconnect()}},[c]);const p=i.useRef(null),u=i.useRef(null),x=()=>{const k=m.current;return k?{width:r??k.scrollWidth,height:r??k.scrollHeight}:null},b=()=>{const k=c.current;return k?{width:k.clientWidth,height:k.clientHeight}:null},{scrollYProgress:j,scrollXProgress:N}=E.useScroll({container:c}),L=i.useRef(null);L.current||(L.current=$e.throttle(f,(k,$)=>{!u.current||!p.current||l&&(t==="horizontal"&&$==="x"&&l({scrollProgress:k,scroll:k*p.current.width,scrollTotal:p.current.width,scrollVisible:u.current.width}),t==="vertical"&&$==="y"&&l({scrollProgress:k,scroll:k*p.current.height,scrollTotal:p.current.height,scrollVisible:u.current.height}))}));const v=(k,$)=>{L.current&&L.current(k,$)};i.useEffect(()=>{s.width&&v(N.get(),"x"),s.height&&v(j.get(),"y")},[s]),E.useMotionValueEvent(N,"change",k=>{v(k,"x")}),E.useMotionValueEvent(j,"change",k=>{v(k,"y")});const[B,S]=i.useState(!1);i.useLayoutEffect(()=>{B||!u.current||!p.current||!l||(l({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?p.current.height:p.current.width,scrollVisible:t=="vertical"?u.current.height:u.current.width}),S(!0))},[u,p,l]),p.current=x(),u.current=b();const[I,C]=i.useState(!1),W=Ie({isDragging:I,children:e,className:n,onScroll:l,orientation:t,scrollSize:r,draggable:a,throttleDuration:f}),[P,R]=i.useState(0),[y,M]=i.useState(0),U=k=>{if(!a)return;const $=c.current;if(!$||P==null)return;const G=(k.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=y-G},X=k=>{const $=c.current;$&&(C(!0),R(k.pageX-$.offsetLeft),M($.scrollLeft))},_=k=>{I&&(k.preventDefault(),U(k))},O=()=>{C(!1)},Y=()=>{C(!1)},w=k=>{k.preventDefault()},g=i.useRef(null);return i.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),o.jsxs("div",{className:W.customScroll,ref:c,onMouseDown:X,onMouseMove:_,onMouseUp:O,onMouseLeave:Y,onDragStart:w,onScroll:k=>{I||(R(null),C(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{C(!1)},1e3))},children:[o.jsx("div",{ref:m,style:t==="vertical"?{height:((V=u==null?void 0:u.current)==null?void 0:V.height)??"100%"}:{width:((D=u==null?void 0:u.current)==null?void 0:D.width)??"100%"},className:W.track,children:e}),u.current&&p.current&&o.jsxs(o.Fragment,{children:[t==="vertical"&&p.current.height>u.current.height&&o.jsx(E.motion.div,{className:"flex-none",style:{height:p.current.height-u.current.height}}),t==="horizontal"&&p.current.width>u.current.width&&o.jsx(E.motion.div,{className:"flex-none",style:{width:p.current.width-u.current.width}})]})]})},Xe=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:l=25,...n})=>{const[a,f]=i.useState(null),c=E.motionValue((a==null?void 0:a.scrollProgress)??0),m=E.useTransform(c,[0,1],[0,1-((a==null?void 0:a.scrollVisible)??0)/((a==null?void 0:a.scrollTotal)??0)]),s=E.useTransform(m,u=>`${-u*100}%`),h=u=>{c.set(u.scrollProgress),u.scrollTotal>0&&f(u)},p=i.useRef(null);return E.useMotionValueEvent(s,"change",u=>{const x=performance.now();if(p.current!==null){const b=x-p.current;console.log(`Delta temps : ${b} ms`)}p.current=x,console.log(u)}),o.jsx(ee,{onScroll:h,throttleDuration:l,...n,children:o.jsx(E.motion.div,{className:d("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:s}:{x:s}},children:e})})},Re=({targetRef:e,children:t})=>{const[r,l]=i.useState(null),n=i.useRef(null),a=()=>{const f=e.current;if(!f)return;const c=f.getBoundingClientRect();l({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return i.useEffect(()=>{const f=e.current;if(f)return a(),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),n.current=new ResizeObserver(a),n.current.observe(f),()=>{var c;window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a),(c=n.current)==null||c.disconnect()}},[e]),r?oe.createPortal(o.jsx("div",{style:r,children:t}),document.body):null};function He(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const _e=({config:e,throttleDelay:t=100,onLoad:r})=>{const[l,n]=i.useState(null),a=i.useRef(null),f=i.useRef(e.sourceColor),c=i.useRef(!0);i.useEffect(()=>{if(c.current){c.current=!1,f.current=e.sourceColor,m(e.sourceColor);return}if(e.sourceColor!==f.current)return a.current&&clearTimeout(a.current),a.current=setTimeout(async()=>{f.current=e.sourceColor,await m(e.sourceColor),a.current=null},t),()=>{a.current&&(clearTimeout(a.current),a.current=null)}},[e.sourceColor,t]);const m=async s=>{if(!He(s))throw new Error("Invalid hex color");try{const h=await Fe.loader({...e,sourceColor:s});r==null||r(h);const p=h.plugins.getPlugin(qe.TailwindPlugin).getInstance().outputCss;p&&n(p)}catch(h){throw new Error(h instanceof Error?h.message:"Theme loading failed")}};return i.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),l?o.jsx("style",{dangerouslySetInnerHTML:{__html:l}}):null},ke=({variant:e="filled",disabled:t=!1,icon:r,href:l,label:n,disableTextMargins:a,className:f,iconPosition:c="left",loading:m=!1,shape:s="rounded",onClick:h,onToggle:p,activated:u,ref:x,size:b="medium",allowShapeTransformation:j=!0,transition:N,children:L,...v})=>{if(L&&(n=L),!n)throw new Error("Button component requires either a label prop or children content");const B=l?"a":"button",S=i.useRef(null),I=x||S,[C,W]=i.useState(u);i.useEffect(()=>{W(u)},[u]),N={duration:.3,...N};let P;p?p&&(P=M=>{t&&M.preventDefault();const U=!C;W(U),p(U)}):P=M=>{t&&M.preventDefault(),h&&h(M)};const R=ue({allowShapeTransformation:j,size:b,disableTextMargins:a,shape:s,href:l,disabled:t,icon:r,iconPosition:c,loading:m,variant:e,transition:N,className:f,isActive:C??!1,onToggle:p,activated:C,label:n,children:n}),y=r?o.jsx(K,{icon:r,className:R.icon}):o.jsx(o.Fragment,{});return o.jsxs(B,{ref:I,href:l,className:R.button,...v,onClick:P,disabled:t,"aria-pressed":p?C:void 0,style:{transition:N.duration+"s"},children:[o.jsx("div",{className:R.touchTarget}),o.jsx("div",{className:R.stateLayer,style:{transition:N.duration+"s"},children:!t&&o.jsx(Z,{colorName:e==="filled"&&p&&"on-surface-variant"||e==="filled"&&!p&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:I})}),c==="left"&&y,m&&o.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:o.jsx(Le,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:d({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),o.jsx("span",{className:R.label,children:n}),c==="right"&&y]})},Ge=({variant:e="outlined",className:t,children:r,isInteractive:l=!1,ref:n,...a})=>{const f=fe({className:t,isInteractive:l,variant:e,children:r}),c=i.useRef(null),m=n||c;return o.jsxs("div",{...a,ref:m,className:f.card,children:[o.jsx("div",{className:f.stateLayer,children:l&&o.jsx(Z,{colorName:"on-surface",triggerRef:m})}),r]})},Ce=(e,t,r=[0,1])=>{const[l,n]=t,[a,f]=r,m=(Math.max(l,Math.min(e,n))-l)/(n-l);return a+m*(f-a)},Me=({className:e,children:t,width:r=1,index:l=0,ref:n,...a})=>{const f=i.useRef(null),c=n||f,m=de({className:e,index:l,width:r,children:t});return o.jsx(E.motion.div,{ref:c,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:m.carouselItem,...a,children:t})},Ke=({variant:e="hero",className:t,children:r,ref:l,marginPourcent:n=0,inputRange:a=[.21,.65],outputRange:f=[42,300],gap:c=8,onChange:m,scrollSensitivity:s=1.25,...h})=>{var O,Y;const p=i.useRef(null),u=l||p,x=me({className:t,children:r,variant:e,inputRange:a,outputRange:f,marginPourcent:n,onChange:m,gap:c,scrollSensitivity:s}),b=i.Children.toArray(r).filter(w=>i.isValidElement(w)&&w.type===Me),j=i.useRef(null),[N,L]=i.useState([]),[v,B]=i.useState(null),S=()=>{var $;if(!j.current||!u.current||!v)return[];const{scrollVisible:w,scrollProgress:g}=v;function V(F,G){return F.map(A=>(A-G)/Math.abs(F[1]-F[0]))}let D=b.map((F,G)=>{if(!I[G].current||!j.current)return 0;let J=G/(b.length-1);return J>1&&(J=1),J<0&&(J=0),J});D=V(D,g);let k=(((($=u.current)==null?void 0:$.clientWidth)??w)-(f[0]+c))/(f[1]+c);return D.map((F,G)=>({value:Math.abs(F),originalIndex:G})).sort((F,G)=>F.value-G.value).forEach((F,G)=>{G===0&&W(F.originalIndex);let A=Ce(k,[0,1],[0,f[1]]);A<f[0]&&(A=f[0]),k--,D[F.originalIndex]=A}),D},I=i.useRef([]).current,[C,W]=i.useState(0);i.useEffect(()=>{m&&m(C)},[C]),I.length!==b.length&&b.forEach((w,g)=>{I[g]||(I[g]=i.createRef())});const P=b.map((w,g)=>i.cloneElement(w,{width:N[g],ref:I[g],key:g,index:g})),R=E.motionValue((v==null?void 0:v.scrollProgress)??0),y=E.useTransform(R,[0,1],[0,1-(((O=u.current)==null?void 0:O.clientWidth)??0)/(((Y=j==null?void 0:j.current)==null?void 0:Y.clientWidth)??0)]),M=E.useTransform(y,w=>`${-w*100}%`),U=w=>{w.scrollTotal>0&&B(w)};i.useEffect(()=>{const w=S();L(w)},[v]);const[X,_]=i.useState(0);return i.useLayoutEffect(()=>{let w=f[1];v&&w>v.scrollVisible&&(w=v.scrollVisible);const g=(w+c)*P.length/s;_(g)},[u,I,v]),o.jsx("div",{className:x.carousel,ref:u,...h,children:o.jsx(ee,{draggable:!0,orientation:"horizontal",onScroll:U,scrollSize:X,children:o.jsx(E.motion.div,{className:x.track,ref:j,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${c}px`,x:M},children:P})})})},Be=({orientation:e="horizontal",className:t,...r})=>{const l=pe({orientation:e,className:t});return o.jsx("hr",{className:l.divider,...r})},H=[];for(let e=0;e<256;++e)H.push((e+256).toString(16).slice(1));function Ye(e,t=0){return(H[e[t+0]]+H[e[t+1]]+H[e[t+2]]+H[e[t+3]]+"-"+H[e[t+4]]+H[e[t+5]]+"-"+H[e[t+6]]+H[e[t+7]]+"-"+H[e[t+8]]+H[e[t+9]]+"-"+H[e[t+10]]+H[e[t+11]]+H[e[t+12]]+H[e[t+13]]+H[e[t+14]]+H[e[t+15]]).toLowerCase()}let z;const Ae=new Uint8Array(16);function Ze(){if(!z){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");z=crypto.getRandomValues.bind(crypto)}return z(Ae)}const Je=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),se={randomUUID:Je};function te(e,t,r){var n;if(se.randomUUID&&!e)return se.randomUUID();e=e||{};const l=e.random??((n=e.rng)==null?void 0:n.call(e))??Ze();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Ye(l)}const re=({variant:e="plain",buttons:t,className:r,children:l,title:n,text:a,position:f,targetRef:c,ref:m,trigger:s=["hover","focus"],...h})=>{if(!l&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const p=i.useRef(null),u=c||p,[x,b]=i.useState(null),[j]=i.useState(te()),[N,L]=i.useState(!1),v=i.useRef(null);i.useEffect(()=>{const y=M=>{b(M.detail)};return document.addEventListener("tooltip-update",y),()=>{document.removeEventListener("tooltip-update",y)}},[]),i.useEffect(()=>{v.current&&clearTimeout(v.current),x?L(x===j):v.current=setTimeout(()=>{L(!1)},1200)},[x,j]);const B=()=>{if(s.includes("hover")){const y=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(y)}},S=()=>{if(s.includes("hover")){const y=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(y)}},I=()=>{if(s.includes("click")){const y=new CustomEvent("tooltip-update",{detail:N?null:j});document.dispatchEvent(y)}},C=()=>{if(s.includes("focus")){const y=new CustomEvent("tooltip-update",{detail:j});document.dispatchEvent(y)}},W=()=>{if(s.includes("focus")){const y=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(y)}};i.useEffect(()=>{if(u!=null&&u.current){const y=u.current;return y.addEventListener("mouseenter",B),y.addEventListener("mouseleave",S),y.addEventListener("click",I),y.addEventListener("focus",C),y.addEventListener("blur",W),()=>{y.removeEventListener("mouseenter",B),y.removeEventListener("mouseleave",S),y.removeEventListener("click",I),y.removeEventListener("focus",C),y.removeEventListener("blur",W)}}},[u,s,j,N]);const P=!c&&i.isValidElement(l)?i.cloneElement(l,{ref:p}):l;if(!f&&typeof window<"u"&&u!=null&&u.current&&!f){const y=u.current.getBoundingClientRect(),M=window.innerWidth,U=window.innerHeight,X=y.left/M,_=y.top/U;e==="plain"?X<1/3?f="right":X>2/3?f="left":f=_>.5?"top":"bottom":X<1/2&&_<1/2?f="bottom-right":X>1/2&&_<1/2?f="bottom-left":X>1/2&&_>1/2?f="top-left":X<1/2&&_>1/2&&(f="top-right")}const R=Ee({variant:e,buttons:t,className:r,title:n,text:a,position:f,trigger:s,targetRef:c,children:l});return o.jsxs(o.Fragment,{children:[P,o.jsx(E.AnimatePresence,{children:N&&o.jsx(Re,{targetRef:u,children:o.jsx(E.motion.div,{initial:{opacity:x?1:0},animate:{opacity:1},transition:{duration:x?0:.3},exit:{opacity:x?1:0},className:R.toolTip,...h,onMouseEnter:B,onMouseLeave:S,children:o.jsxs(E.motion.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[n&&o.jsx("div",{className:R.subHead,children:n}),o.jsx("div",{className:R.supportingText,children:a}),t&&o.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((y,M)=>o.jsx(ke,{size:"small",variant:"text",...y},M))})]})})})})]})},T=({className:e,label:t,variant:r="primary",size:l="medium",href:n,type:a,icon:f,isExtended:c=!1,ref:m,transition:s,children:h,...p})=>{if(h&&(t=h),!t)throw new Error("FAB component requires either a label prop or children content");const u=n?"a":"button",x=he({href:n,icon:f,isExtended:c,label:t,size:l,variant:r,className:e,transition:s,children:t});s={duration:.3,...s};const b=i.useRef(null),j=m||b,N={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return o.jsxs(u,{...p,ref:j,href:n,"aria-label":c?void 0:t,className:x.fab,children:[o.jsx(re,{trigger:c?null:void 0,text:t,targetRef:j}),o.jsx("span",{className:x.stateLayer,children:o.jsx(Z,{colorName:d({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:j})}),o.jsx(K,{icon:f,className:x.icon}),o.jsx(E.AnimatePresence,{children:c&&o.jsx(E.motion.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:x.label,children:t})})]})},Q=({variant:e="standard",href:t,disabled:r=!1,type:l="button",title:n,label:a,onToggle:f,activated:c=!1,onClick:m,icon:s,size:h="medium",iconSelected:p,className:u,ref:x,width:b="default",shape:j="rounded",allowShapeTransformation:N=!0,transition:L,children:v,...B})=>{if(v&&(a=v),!a)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");n||(n=a);const[S,I]=i.useState(c);let C;f?f&&(C=M=>{r&&M.preventDefault(),I(!S),f(!!S)},s=S&&p||s):C=M=>{r&&M.preventDefault(),m&&m(M)},i.useEffect(()=>{I(c)},[c]);const W=t?"a":"button",P=xe({transition:L,shape:j,allowShapeTransformation:N,width:b,href:t,activated:S,label:a,iconSelected:p,isActive:S,onToggle:f,disabled:r,icon:s,variant:e,className:u,size:h,children:a,...B}),R=i.useRef(null),y=x||R;return L={duration:.3,...L},o.jsxs(W,{disabled:r,href:t,style:{transition:L.duration+"s"},className:P.iconButton,"aria-label":a,...B,title:void 0,onClick:C,ref:y,children:[o.jsx(re,{targetRef:y,trigger:r?null:void 0,text:n}),o.jsx("div",{className:P.touchTarget}),o.jsx("div",{className:P.stateLayer,style:{transition:L.duration+"s"},children:!r&&o.jsx(Z,{colorName:d(e==="standard"&&{"on-surface-variant":!S,primary:S},e==="filled"&&{primary:!S&&!!f,"inverse-on-surface":S||!f},e==="tonal"&&{"on-surface-variant":!S&&!!f,"on-secondary-container":S||!f},e==="outlined"&&{"on-surface-variant":!S,"on-primary":S}),triggerRef:y})}),s&&o.jsx(K,{icon:s,className:P.icon})]})},Qe=({className:e,valueFormatter:t,step:r=10,name:l,value:n=0,min:a=0,max:f=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:m,onChange:s,...h})=>{const p=w=>{const g=x(),V=u();return w===1/0?100:w===-1/0?0:(w-g)/(V-g)*100},u=(w=!1)=>w?f:f==1/0?c[(c==null?void 0:c.length)-1].value:f,x=(w=!1)=>w?a:a==-1/0?c[0].value:a,b=w=>{const g=x(!1);return(u(!1)-g)*w/100+g},[j,N]=i.useState(!1),L=i.useRef(null),v=m||L,[B,S]=i.useState(n),[I,C]=i.useState(p(n)),[W,P]=i.useState(!1),R=w=>{P(!0),N(!0),U(w)},y=()=>{P(!1),N(!1)};i.useEffect(()=>(W?(window.addEventListener("mouseup",y),window.addEventListener("mousemove",U),window.addEventListener("touchend",y),window.addEventListener("touchmove",U)):(window.removeEventListener("mouseup",y),window.removeEventListener("mousemove",U),window.removeEventListener("touchend",y),window.removeEventListener("touchmove",U)),()=>{window.removeEventListener("mouseup",y),window.removeEventListener("mousemove",U),window.removeEventListener("touchend",y),window.removeEventListener("touchmove",U)}),[W]);const M=we({className:e,isChanging:j,marks:c,max:f,min:a,name:l,step:r,value:B,valueFormatter:t,onChange:s}),U=w=>{const g=v==null?void 0:v.current;if(g){const V=g.getBoundingClientRect().left,k=((w.type==="touchmove"||w.type==="touchstart"?w.touches[0].clientX:w.clientX)-V)/g.offsetWidth*100;X({pourcent:k})}},X=({pourcent:w,value:g})=>{if(w){if(w>=100){S(u(!0)),C(100);return}if(w<=0){S(x(!0)),C(0);return}g=b(w),g==x()&&(g=x(!0)),g==u()&&(g=u(!0))}else if(g!=null){if(g>=u()){S(u(!0)),C(100);return}if(g<=x()){S(x(!0)),C(0);return}w=p(g)}else return;r!=null?g=Math.round((g-x())/r)*r+x():c&&(g=c.reduce((V,D,k)=>{let $=D.value===1/0?u():D.value===-1/0?x():D.value,F=V.value===1/0?u():V.value===-1/0?x():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?D:V}).value),g>=u()&&(g=u(!0)),g<=x()&&(g=x(!0)),w=p(g),S(g),C(w),s&&s(g)},[_,O]=i.useState(0);i.useEffect(()=>{const w=()=>{v.current&&O(v.current.offsetWidth)};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[]);const Y=w=>{switch(w.key){case"ArrowRight":if(r)X({value:B+r});else if(c){const g=c.find(V=>V.value>B);g&&X({value:g.value})}break;case"ArrowLeft":if(r)X({value:B-r});else if(c){const g=c.slice(0).reverse().find((V,D,k)=>B===1/0?D===1:V.value<B);g&&X({value:g.value})}break;default:return}};return o.jsxs("div",{tabIndex:0,onKeyDown:Y,role:"slider","aria-valuemin":x(!0),"aria-valuemax":u(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:M.slider,onMouseDown:R,onClick:U,ref:v,onTouchStart:R,onDragStart:w=>w.preventDefault(),...h,children:[o.jsx("input",{type:"hidden",name:l,value:B}),o.jsx("div",{className:M.activeTrack,style:{flex:I/100}}),o.jsx("div",{className:M.handle,children:o.jsx(E.AnimatePresence,{children:j&&o.jsx(E.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(B):B})})}),o.jsx("div",{className:M.inactiveTrack,style:{flex:1-I/100}}),o.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((w,g)=>{let V=null;const D=(j?9:10)/_*100,k=p(w.value);return k<=I-D?V=!0:k>=I+D&&(V=!1),o.jsx("div",{className:d(M.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${p(w.value)}%`}},g)})})]})};/*!
|
|
2
|
-
* Font Awesome Free 7.0.
|
|
2
|
+
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
|
|
3
3
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
4
|
* Copyright 2025 Fonticons, Inc.
|
|
5
|
-
*/var ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]},ne={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Te={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const et=({variant:e="standard",className:t,children:r,title:l,position:n="right",extended:a,divider:f,onExtendedChange:c,closeIcon:m=ne,transition:s,...h})=>{s={duration:.3,...s};const[p,u]=i.useState(a??!0),x=ge({transition:s,title:l,position:n,closeIcon:m,className:t,children:r,onExtendedChange:c,divider:f,isExtended:p,extended:p,variant:e});i.useEffect(()=>{c==null||c(p??!1)},[p]),i.useEffect(()=>{a!=null&&u(a)},[a]);const b={close:{width:0},open:{width:"auto"}},j=()=>o.jsxs(o.Fragment,{children:[o.jsx(E.AnimatePresence,{children:e=="modal"&&p&&o.jsx(E.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>u(!1),className:x.overlay})}),o.jsx(E.AnimatePresence,{children:p&&o.jsxs("div",{...h,className:x.slideSheet,style:{transition:s.duration+"s"},children:[o.jsxs(E.motion.div,{variants:b,initial:a===!1?"open":"close",animate:"open",exit:"close",className:x.container,children:[o.jsxs("div",{className:x.header,children:[l&&o.jsx("p",{className:x.title,children:l}),o.jsx(Q,{size:"small",label:"close",icon:m,onClick:()=>u(!1),className:x.closeButton})]}),o.jsx("div",{className:x.content,style:{transition:s.duration+"s"},children:r})]}),(f==null&&e=="standard"?!0:f)&&o.jsx(Be,{className:x.divider,orientation:"vertical"})]})})]});return e=="modal"?oe.createPortal(j(),document.body):j()},tt=({message:e,className:t,duration:r,closeIcon:l=ne,onClose:n,...a})=>{const[f,c]=i.useState(!0),m=ve({className:t,closeIcon:l,duration:r,isVisible:f,onClose:n,message:e});i.useEffect(()=>{r&&setTimeout(()=>{s()},r)},[r]);const s=()=>{c(!1),n==null||n()};return o.jsx(E.AnimatePresence,{children:f&&o.jsx(E.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...a,children:o.jsxs("div",{className:m.container,children:[o.jsx("p",{className:m.supportingText,children:e}),o.jsx(Q,{onClick:()=>s(),className:m.icon,icon:l,label:"close the snackbar"})]})})})},rt=({selected:e=!1,className:t,activeIcon:r,disabled:l=!1,inactiveIcon:n,onChange:a,onClick:f,onKeyDown:c,ref:m,...s})=>{const[h,p]=i.useState(e),u=v=>{l||(b(),f&&f(v))},x=v=>{l||((v.key===" "||v.key==="Enter")&&(v.preventDefault(),b()),c&&c(v))},b=()=>{p(!h),a==null||a(!h)},j=be({className:t,isSelected:h,activeIcon:r,inactiveIcon:n,disabled:l,selected:h,onChange:a}),N=i.useRef(null),L=m||N;return o.jsxs(E.motion.div,{role:"switch","aria-checked":h,tabIndex:l?-1:0,onKeyDown:x,onClick:u,ref:L,className:j.switch,...s,children:[o.jsx("input",{type:"hidden",value:h?"1":"0"}),o.jsxs(E.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:j.handleContainer,children:[o.jsx("div",{className:j.handle,children:(h?r:n)&&o.jsx(K,{className:j.icon,icon:h?r:n})}),o.jsx("div",{className:j.handleStateLayer})]})]})},Pe=({className:e,onClick:t,label:r,variant:l="primary",href:n,icon:a,selectedTab:f,setSelectedTab:c,tabsId:m,index:s,onTabSelected:h,scrollable:p=!1,selected:u=!1,ref:x,...b})=>{const j=i.useRef(null),N=x||j,[L,v]=i.useState(u);i.useEffect(()=>{u&&f==null?v(!0):v(f==s&&s!=null)},[f]),i.useEffect(()=>{f==s&&h&&h({ref:N,index:s||0,label:r,icon:a})},[f]);const B=n?"a":"button",S=C=>{c&&c(s??null),t&&t(C)},I=je({className:e,onTabSelected:h,scrollable:p,selectedTab:f,index:s,tabsId:m,selected:L,variant:l,icon:a,label:r,isSelected:L,setSelectedTab:c,href:n});return o.jsxs(B,{...b,role:"tab","aria-selected":L,ref:N,href:n,className:I.tab,onClick:S,...b,children:[o.jsx("span",{className:I.stateLayer,children:o.jsx(Z,{colorName:l==="primary"&&L?"primary":"on-surface",triggerRef:N})}),o.jsxs("span",{className:I.content,children:[a&&o.jsx(K,{icon:a,className:I.icon}),o.jsx("span",{className:I.label,children:r}),L&&o.jsx(E.motion.span,{layoutId:`underline-${m}`,className:I.underline,transition:{duration:.3}})]})]})},nt=({variant:e="primary",onTabSelected:t,children:r,className:l,selectedTab:n,setSelectedTab:a,scrollable:f=!1})=>{const[c,m]=i.useState(null);let s;n==0||n!=null?s=n:s=c;const h=a||m,p=i.Children.toArray(r).filter(N=>i.isValidElement(N)&&N.type===Pe),u=i.useRef(null),x=N=>{if(t==null||t(N),f){const L=u.current,v=N.ref.current;if(L&&v){const B=v.offsetLeft+v.offsetWidth/2-L.offsetWidth/2;L.scrollTo({left:B,behavior:"smooth"})}}},b=i.useMemo(()=>te(),[]),j=Se({children:r,onTabSelected:t,scrollable:f,selectedTab:s,setSelectedTab:h,className:l,variant:e});return o.jsx("div",{ref:u,role:"tablist",className:j.tabs,children:p.map((N,L)=>i.cloneElement(N,{key:L,index:L,variant:e,selectedTab:s,setSelectedTab:h,tabsId:b,onTabSelected:x,scrollable:f}))})},st=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:l,suffix:n,name:a,label:f,className:c,supportingText:m,trailingIcon:s,leadingIcon:h,type:p="text",textLine:u="singleLine",autoComplete:x="on",onChange:b,value:j,showSupportingText:N=!1,...L})=>{const[v,B]=i.useState(j??""),[S,I]=i.useState(!1),[C,W]=i.useState(!1),[P,R]=i.useState(N);i.useEffect(()=>{B(j??"")},[j]),i.useEffect(()=>{r!=null&&r.length?W(!0):W(!1)},[r]),i.useEffect(()=>{N?R(N):m!=null&&m.length?R(!0):R(!1)},[P,m]),i.useEffect(()=>{S&&W(!1)},[S]);const y=i.useRef(null),M=()=>{y.current&&!S&&y.current.focus()},U=()=>{I(!0)},X=V=>{const D=V.target.value;B(D),W(!1),typeof b=="function"&&b(D)},_=()=>{I(!1)},O=Ne({showSupportingText:P,isFocused:S,showErrorIcon:C,disabled:t,name:a,label:f,autoComplete:x,className:c,onChange:b,placeholder:l,supportingText:m,type:p,leadingIcon:h,trailingIcon:s,variant:e,errorText:r,value:v,suffix:n,textLine:u}),[Y]=i.useState(te());let w,g;switch(u){case"multiLine":g=Ue,w={};break;case"textAreas":g="textarea",w={};break;case"singleLine":default:g="input",w={type:p};break}return o.jsxs("div",{className:O.textField,...L,children:[o.jsxs("fieldset",{onClick:M,className:O.content,children:[o.jsx("div",{className:O.stateLayer}),h&&o.jsx("div",{className:O.leadingIcon,children:i.isValidElement(h)?h:o.jsx(K,{className:"w-5 h-5",icon:h})}),!(!S&&!v.length||e=="filled")&&o.jsx(E.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!S&&!v.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:o.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:Y,children:f})})}),o.jsxs("div",{className:"flex-1 relative",children:[(!S&&!v.length||e=="filled")&&o.jsx(E.motion.label,{htmlFor:a,className:d("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!S&&!v.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!S&&!v.length))}),transition:{duration:.3},children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),o.jsx(g,{ref:y,value:v,onChange:X,className:O.input,id:a,name:a,placeholder:S?l??void 0:"",onFocus:U,onBlur:_,disabled:t,autoComplete:x,"aria-invalid":!!(r!=null&&r.length),"aria-label":f,...w})]}),o.jsx("div",{className:O.activeIndicator}),!C&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{onClick:V=>{V.stopPropagation()},className:O.trailingIcon,children:i.isValidElement(s)?s:o.jsx(K,{className:"h-5",icon:s})}),!s&&n&&o.jsx("span",{className:O.suffix,children:n})]}),C&&o.jsx("div",{className:d(O.trailingIcon,{" absolute right-0":!s}),children:o.jsx(K,{className:"h-5 text-error",icon:ze})})]}),P&&o.jsx("p",{className:O.supportingText,children:r!=null&&r.length?r:m!=null&&m.length?m:" "})]})},lt=q("navigationRailItem",({isSelected:e,icon:t,label:r,variant:l})=>({navigationRailItem:d(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":l=="vertical","gap-0 h-[66px]":l=="horizontal"}),container:d(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":l=="horizontal","gap-0 ":l=="vertical","p-4":!r},r&&["px-4",{"py-1 ":l=="vertical","py-4 ":l=="horizontal"}]),stateLayer:d(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:d("size-6 flex"),label:d("w-fit mx-auto text-nowrap",{"text-label-large ":l=="horizontal","text-label-medium":l=="vertical"})})),Ve=({label:e})=>o.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:o.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),We=({className:e,onClick:t,label:r,variant:l="vertical",href:n,icon:a,selectedItem:f,setSelectedItem:c,index:m,onItemSelected:s,selected:h=!1,ref:p,transition:u,isExtended:x,iconSelected:b,style:j,extendedOnly:N,children:L,...v})=>{L&&(r=L);const B=i.useRef(null),S=p||B,[I,C]=i.useState(h);i.useEffect(()=>{h&&f==null?C(!0):C(f==m&&m!=null)},[f]),i.useEffect(()=>{f==m&&s&&s({ref:S,index:m||0,label:r,icon:a})},[f]);const W=n?"a":"button",P=y=>{c&&c(m??null),t&&t(y)},R=lt({isExtended:x,extendedOnly:N,className:e,onItemSelected:s,selectedItem:f,index:m,transition:u,selected:I,variant:l,icon:a,label:r,isSelected:I,setSelectedItem:c,href:n,children:r,iconSelected:b});return u={duration:.3,...u},N&&!x?null:o.jsxs(W,{...v,role:"tab","aria-selected":I,ref:S,href:n,className:R.navigationRailItem,onClick:P,style:{transition:u.duration+"s",...j},children:[o.jsxs(E.motion.div,{style:{transition:l=="horizontal"?u.duration+`s, gap ${u.duration/2}s ${u.duration-u.duration/2}s`:u.duration+`s, gap ${u.duration/3}s ${u.duration-u.duration/3}s`},transition:u,className:R.container,children:[o.jsx(E.motion.div,{layout:!0,className:R.stateLayer}),a&&o.jsx(K,{icon:I?b:a,className:R.icon}),o.jsx(E.AnimatePresence,{children:l=="horizontal"&&(()=>{const y={width:0,opacity:0,transition:{...u}},M={width:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/2,delay:u.duration-u.duration/2}}};return o.jsx(E.motion.span,{initial:y,animate:M,exit:y,className:R.label,children:r})})()})]}),o.jsx(E.AnimatePresence,{children:l=="vertical"&&(()=>{const y={height:0,opacity:0,transition:{...u,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/3,delay:u.duration-u.duration/3}}};return o.jsx(E.motion.span,{initial:M,animate:M,exit:y,className:R.label,transition:u,children:r})})()})]})},ot=q("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:d("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:d("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:d(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),at=({variant:e="standard",onItemSelected:t,children:r,className:l,selectedItem:n,extended:a,alignment:f="top",menu:c={closed:{icon:Te,label:"Open menu"},opened:{icon:ne,label:"Close menu"}},style:m,onExtendedChange:s,transition:h,setSelectedItem:p})=>{const[u,x]=i.useState(null),[b,j]=i.useState(a);let N;n==0||n!=null?N=n:N=u;const L=p||x,v=i.useRef(null),B=R=>{t==null||t(R)};function S(R){const y=[];return i.Children.forEach(R,M=>{i.isValidElement(M)&&M.type===i.Fragment?y.push(...S(M.props.children)):y.push(M)}),y}const I=S(r),C=I.filter(R=>i.isValidElement(R)&&R.type===T),W=ot({children:r,onItemSelected:t,selectedItem:N,setSelectedItem:L,className:l,variant:e,extended:b,isExtended:b,alignment:f,menu:c,transition:h,onExtendedChange:s});h={duration:.3,...h};const P=i.useRef(!1);return P.current=!1,i.useEffect(()=>{s==null||s(b??!1)},[b]),o.jsxs("div",{style:{transition:h.duration+"s",...m},ref:v,className:W.navigationRail,children:[o.jsxs("div",{className:W.header,children:[o.jsx(Q,{onClick:()=>j(!b),label:b?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:W.menuIcon,icon:b?c.opened.icon:c==null?void 0:c.closed.icon}),C.length>0&&i.cloneElement(C[0],{transition:h,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),o.jsx("div",{className:W.segments,children:(()=>{let R=0;return I.map(y=>i.isValidElement(y)&&y.type===We?i.cloneElement(y,{key:R,index:R++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:L,onItemSelected:B,transition:h,extendedOnly:P.current,isExtended:b}):i.isValidElement(y)&&y.type===T?null:i.isValidElement(y)&&y.type===Ve?(P.current=!0,b?i.cloneElement(y,{}):null):y)})()}),o.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=ke;exports.Card=Ge;exports.Carousel=Ke;exports.CarouselItem=Me;exports.CustomScroll=ee;exports.Divider=Be;exports.Fab=T;exports.Icon=K;exports.IconButton=Q;exports.NavigationRail=at;exports.NavigationRailItem=We;exports.NavigationRailSection=Ve;exports.ProgressIndicator=Le;exports.RippleEffect=Z;exports.SideSheet=et;exports.Slider=Qe;exports.SmoothScroll=Xe;exports.Snackbar=tt;exports.Switch=rt;exports.SyncedFixedWrapper=Re;exports.Tab=Pe;exports.Tabs=nt;exports.TextField=st;exports.ThemeProvider=_e;exports.ToolTip=re;exports.buttonStyle=ue;exports.cardStyle=fe;exports.carouselItemStyle=de;exports.carouselStyle=me;exports.classNames=d;exports.classnames=ce;exports.customScrollStyle=Ie;exports.defaultClassNames=q;exports.dividerStyle=pe;exports.fabStyle=he;exports.getClassNames=ie;exports.iconButtonStyle=xe;exports.normalize=Ce;exports.progressIndicatorStyle=ye;exports.sideSheetStyle=ge;exports.sliderStyle=we;exports.snackbarStyle=ve;exports.switchStyle=be;exports.tabStyle=je;exports.tabsStyle=Se;exports.textFieldStyle=Ne;exports.toolStyle=Ee;
|
|
5
|
+
*/var ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},ne={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},Te={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const et=({variant:e="standard",className:t,children:r,title:l,position:n="right",extended:a,divider:f,onExtendedChange:c,closeIcon:m=ne,transition:s,...h})=>{s={duration:.3,...s};const[p,u]=i.useState(a??!0),x=ge({transition:s,title:l,position:n,closeIcon:m,className:t,children:r,onExtendedChange:c,divider:f,isExtended:p,extended:p,variant:e});i.useEffect(()=>{c==null||c(p??!1)},[p]),i.useEffect(()=>{a!=null&&u(a)},[a]);const b={close:{width:0},open:{width:"auto"}},j=()=>o.jsxs(o.Fragment,{children:[o.jsx(E.AnimatePresence,{children:e=="modal"&&p&&o.jsx(E.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>u(!1),className:x.overlay})}),o.jsx(E.AnimatePresence,{children:p&&o.jsxs("div",{...h,className:x.slideSheet,style:{transition:s.duration+"s"},children:[o.jsxs(E.motion.div,{variants:b,initial:a===!1?"open":"close",animate:"open",exit:"close",className:x.container,children:[o.jsxs("div",{className:x.header,children:[l&&o.jsx("p",{className:x.title,children:l}),o.jsx(Q,{size:"small",label:"close",icon:m,onClick:()=>u(!1),className:x.closeButton})]}),o.jsx("div",{className:x.content,style:{transition:s.duration+"s"},children:r})]}),(f==null&&e=="standard"?!0:f)&&o.jsx(Be,{className:x.divider,orientation:"vertical"})]})})]});return e=="modal"?oe.createPortal(j(),document.body):j()},tt=({message:e,className:t,duration:r,closeIcon:l=ne,onClose:n,...a})=>{const[f,c]=i.useState(!0),m=ve({className:t,closeIcon:l,duration:r,isVisible:f,onClose:n,message:e});i.useEffect(()=>{r&&setTimeout(()=>{s()},r)},[r]);const s=()=>{c(!1),n==null||n()};return o.jsx(E.AnimatePresence,{children:f&&o.jsx(E.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:m.snackbar,...a,children:o.jsxs("div",{className:m.container,children:[o.jsx("p",{className:m.supportingText,children:e}),o.jsx(Q,{onClick:()=>s(),className:m.icon,icon:l,label:"close the snackbar"})]})})})},rt=({selected:e=!1,className:t,activeIcon:r,disabled:l=!1,inactiveIcon:n,onChange:a,onClick:f,onKeyDown:c,ref:m,...s})=>{const[h,p]=i.useState(e),u=v=>{l||(b(),f&&f(v))},x=v=>{l||((v.key===" "||v.key==="Enter")&&(v.preventDefault(),b()),c&&c(v))},b=()=>{p(!h),a==null||a(!h)},j=be({className:t,isSelected:h,activeIcon:r,inactiveIcon:n,disabled:l,selected:h,onChange:a}),N=i.useRef(null),L=m||N;return o.jsxs(E.motion.div,{role:"switch","aria-checked":h,tabIndex:l?-1:0,onKeyDown:x,onClick:u,ref:L,className:j.switch,...s,children:[o.jsx("input",{type:"hidden",value:h?"1":"0"}),o.jsxs(E.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:j.handleContainer,children:[o.jsx("div",{className:j.handle,children:(h?r:n)&&o.jsx(K,{className:j.icon,icon:h?r:n})}),o.jsx("div",{className:j.handleStateLayer})]})]})},Pe=({className:e,onClick:t,label:r,variant:l="primary",href:n,icon:a,selectedTab:f,setSelectedTab:c,tabsId:m,index:s,onTabSelected:h,scrollable:p=!1,selected:u=!1,ref:x,...b})=>{const j=i.useRef(null),N=x||j,[L,v]=i.useState(u);i.useEffect(()=>{u&&f==null?v(!0):v(f==s&&s!=null)},[f]),i.useEffect(()=>{f==s&&h&&h({ref:N,index:s||0,label:r,icon:a})},[f]);const B=n?"a":"button",S=C=>{c&&c(s??null),t&&t(C)},I=je({className:e,onTabSelected:h,scrollable:p,selectedTab:f,index:s,tabsId:m,selected:L,variant:l,icon:a,label:r,isSelected:L,setSelectedTab:c,href:n});return o.jsxs(B,{...b,role:"tab","aria-selected":L,ref:N,href:n,className:I.tab,onClick:S,...b,children:[o.jsx("span",{className:I.stateLayer,children:o.jsx(Z,{colorName:l==="primary"&&L?"primary":"on-surface",triggerRef:N})}),o.jsxs("span",{className:I.content,children:[a&&o.jsx(K,{icon:a,className:I.icon}),o.jsx("span",{className:I.label,children:r}),L&&o.jsx(E.motion.span,{layoutId:`underline-${m}`,className:I.underline,transition:{duration:.3}})]})]})},nt=({variant:e="primary",onTabSelected:t,children:r,className:l,selectedTab:n,setSelectedTab:a,scrollable:f=!1})=>{const[c,m]=i.useState(null);let s;n==0||n!=null?s=n:s=c;const h=a||m,p=i.Children.toArray(r).filter(N=>i.isValidElement(N)&&N.type===Pe),u=i.useRef(null),x=N=>{if(t==null||t(N),f){const L=u.current,v=N.ref.current;if(L&&v){const B=v.offsetLeft+v.offsetWidth/2-L.offsetWidth/2;L.scrollTo({left:B,behavior:"smooth"})}}},b=i.useMemo(()=>te(),[]),j=Se({children:r,onTabSelected:t,scrollable:f,selectedTab:s,setSelectedTab:h,className:l,variant:e});return o.jsx("div",{ref:u,role:"tablist",className:j.tabs,children:p.map((N,L)=>i.cloneElement(N,{key:L,index:L,variant:e,selectedTab:s,setSelectedTab:h,tabsId:b,onTabSelected:x,scrollable:f}))})},st=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:l,suffix:n,name:a,label:f,className:c,supportingText:m,trailingIcon:s,leadingIcon:h,type:p="text",textLine:u="singleLine",autoComplete:x="on",onChange:b,value:j,showSupportingText:N=!1,...L})=>{const[v,B]=i.useState(j??""),[S,I]=i.useState(!1),[C,W]=i.useState(!1),[P,R]=i.useState(N);i.useEffect(()=>{B(j??"")},[j]),i.useEffect(()=>{r!=null&&r.length?W(!0):W(!1)},[r]),i.useEffect(()=>{N?R(N):m!=null&&m.length?R(!0):R(!1)},[P,m]),i.useEffect(()=>{S&&W(!1)},[S]);const y=i.useRef(null),M=()=>{y.current&&!S&&y.current.focus()},U=()=>{I(!0)},X=V=>{const D=V.target.value;B(D),W(!1),typeof b=="function"&&b(D)},_=()=>{I(!1)},O=Ne({showSupportingText:P,isFocused:S,showErrorIcon:C,disabled:t,name:a,label:f,autoComplete:x,className:c,onChange:b,placeholder:l,supportingText:m,type:p,leadingIcon:h,trailingIcon:s,variant:e,errorText:r,value:v,suffix:n,textLine:u}),[Y]=i.useState(te());let w,g;switch(u){case"multiLine":g=Ue,w={};break;case"textAreas":g="textarea",w={};break;case"singleLine":default:g="input",w={type:p};break}return o.jsxs("div",{className:O.textField,...L,children:[o.jsxs("fieldset",{onClick:M,className:O.content,children:[o.jsx("div",{className:O.stateLayer}),h&&o.jsx("div",{className:O.leadingIcon,children:i.isValidElement(h)?h:o.jsx(K,{className:"w-5 h-5",icon:h})}),!(!S&&!v.length||e=="filled")&&o.jsx(E.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!S&&!v.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:o.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:Y,children:f})})}),o.jsxs("div",{className:"flex-1 relative",children:[(!S&&!v.length||e=="filled")&&o.jsx(E.motion.label,{htmlFor:a,className:d("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!S&&!v.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!S&&!v.length))}),transition:{duration:.3},children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),o.jsx(g,{ref:y,value:v,onChange:X,className:O.input,id:a,name:a,placeholder:S?l??void 0:"",onFocus:U,onBlur:_,disabled:t,autoComplete:x,"aria-invalid":!!(r!=null&&r.length),"aria-label":f,...w})]}),o.jsx("div",{className:O.activeIndicator}),!C&&o.jsxs(o.Fragment,{children:[s&&o.jsx("div",{onClick:V=>{V.stopPropagation()},className:O.trailingIcon,children:i.isValidElement(s)?s:o.jsx(K,{className:"h-5",icon:s})}),!s&&n&&o.jsx("span",{className:O.suffix,children:n})]}),C&&o.jsx("div",{className:d(O.trailingIcon,{" absolute right-0":!s}),children:o.jsx(K,{className:"h-5 text-error",icon:ze})})]}),P&&o.jsx("p",{className:O.supportingText,children:r!=null&&r.length?r:m!=null&&m.length?m:" "})]})},lt=q("navigationRailItem",({isSelected:e,icon:t,label:r,variant:l})=>({navigationRailItem:d(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":l=="vertical","gap-0 h-[66px]":l=="horizontal"}),container:d(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":l=="horizontal","gap-0 ":l=="vertical","p-4":!r},r&&["px-4",{"py-1 ":l=="vertical","py-4 ":l=="horizontal"}]),stateLayer:d(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:d("size-6 flex"),label:d("w-fit mx-auto text-nowrap",{"text-label-large ":l=="horizontal","text-label-medium":l=="vertical"})})),Ve=({label:e})=>o.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:o.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),We=({className:e,onClick:t,label:r,variant:l="vertical",href:n,icon:a,selectedItem:f,setSelectedItem:c,index:m,onItemSelected:s,selected:h=!1,ref:p,transition:u,isExtended:x,iconSelected:b,style:j,extendedOnly:N,children:L,...v})=>{L&&(r=L);const B=i.useRef(null),S=p||B,[I,C]=i.useState(h);i.useEffect(()=>{h&&f==null?C(!0):C(f==m&&m!=null)},[f]),i.useEffect(()=>{f==m&&s&&s({ref:S,index:m||0,label:r,icon:a})},[f]);const W=n?"a":"button",P=y=>{c&&c(m??null),t&&t(y)},R=lt({isExtended:x,extendedOnly:N,className:e,onItemSelected:s,selectedItem:f,index:m,transition:u,selected:I,variant:l,icon:a,label:r,isSelected:I,setSelectedItem:c,href:n,children:r,iconSelected:b});return u={duration:.3,...u},N&&!x?null:o.jsxs(W,{...v,role:"tab","aria-selected":I,ref:S,href:n,className:R.navigationRailItem,onClick:P,style:{transition:u.duration+"s",...j},children:[o.jsxs(E.motion.div,{style:{transition:l=="horizontal"?u.duration+`s, gap ${u.duration/2}s ${u.duration-u.duration/2}s`:u.duration+`s, gap ${u.duration/3}s ${u.duration-u.duration/3}s`},transition:u,className:R.container,children:[o.jsx(E.motion.div,{layout:!0,className:R.stateLayer}),a&&o.jsx(K,{icon:I?b:a,className:R.icon}),o.jsx(E.AnimatePresence,{children:l=="horizontal"&&(()=>{const y={width:0,opacity:0,transition:{...u}},M={width:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/2,delay:u.duration-u.duration/2}}};return o.jsx(E.motion.span,{initial:y,animate:M,exit:y,className:R.label,children:r})})()})]}),o.jsx(E.AnimatePresence,{children:l=="vertical"&&(()=>{const y={height:0,opacity:0,transition:{...u,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/3,delay:u.duration-u.duration/3}}};return o.jsx(E.motion.span,{initial:M,animate:M,exit:y,className:R.label,transition:u,children:r})})()})]})},ot=q("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:d("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:d("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:d(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),at=({variant:e="standard",onItemSelected:t,children:r,className:l,selectedItem:n,extended:a,alignment:f="top",menu:c={closed:{icon:Te,label:"Open menu"},opened:{icon:ne,label:"Close menu"}},style:m,onExtendedChange:s,transition:h,setSelectedItem:p})=>{const[u,x]=i.useState(null),[b,j]=i.useState(a);let N;n==0||n!=null?N=n:N=u;const L=p||x,v=i.useRef(null),B=R=>{t==null||t(R)};function S(R){const y=[];return i.Children.forEach(R,M=>{i.isValidElement(M)&&M.type===i.Fragment?y.push(...S(M.props.children)):y.push(M)}),y}const I=S(r),C=I.filter(R=>i.isValidElement(R)&&R.type===T),W=ot({children:r,onItemSelected:t,selectedItem:N,setSelectedItem:L,className:l,variant:e,extended:b,isExtended:b,alignment:f,menu:c,transition:h,onExtendedChange:s});h={duration:.3,...h};const P=i.useRef(!1);return P.current=!1,i.useEffect(()=>{s==null||s(b??!1)},[b]),o.jsxs("div",{style:{transition:h.duration+"s",...m},ref:v,className:W.navigationRail,children:[o.jsxs("div",{className:W.header,children:[o.jsx(Q,{onClick:()=>j(!b),label:b?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:W.menuIcon,icon:b?c.opened.icon:c==null?void 0:c.closed.icon}),C.length>0&&i.cloneElement(C[0],{transition:h,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),o.jsx("div",{className:W.segments,children:(()=>{let R=0;return I.map(y=>i.isValidElement(y)&&y.type===We?i.cloneElement(y,{key:R,index:R++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:L,onItemSelected:B,transition:h,extendedOnly:P.current,isExtended:b}):i.isValidElement(y)&&y.type===T?null:i.isValidElement(y)&&y.type===Ve?(P.current=!0,b?i.cloneElement(y,{}):null):y)})()}),o.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=ke;exports.Card=Ge;exports.Carousel=Ke;exports.CarouselItem=Me;exports.CustomScroll=ee;exports.Divider=Be;exports.Fab=T;exports.Icon=K;exports.IconButton=Q;exports.NavigationRail=at;exports.NavigationRailItem=We;exports.NavigationRailSection=Ve;exports.ProgressIndicator=Le;exports.RippleEffect=Z;exports.SideSheet=et;exports.Slider=Qe;exports.SmoothScroll=Xe;exports.Snackbar=tt;exports.Switch=rt;exports.SyncedFixedWrapper=Re;exports.Tab=Pe;exports.Tabs=nt;exports.TextField=st;exports.ThemeProvider=_e;exports.ToolTip=re;exports.buttonStyle=ue;exports.cardStyle=fe;exports.carouselItemStyle=de;exports.carouselStyle=me;exports.classNames=d;exports.classnames=ce;exports.customScrollStyle=Ie;exports.defaultClassNames=q;exports.dividerStyle=pe;exports.fabStyle=he;exports.getClassNames=ie;exports.iconButtonStyle=xe;exports.normalize=Ce;exports.progressIndicatorStyle=ye;exports.sideSheetStyle=ge;exports.sliderStyle=we;exports.snackbarStyle=ve;exports.switchStyle=be;exports.tabStyle=je;exports.tabsStyle=Se;exports.textFieldStyle=Ne;exports.toolStyle=Ee;
|
package/dist/index.js
CHANGED
|
@@ -2141,14 +2141,14 @@ const we = ({
|
|
|
2141
2141
|
);
|
|
2142
2142
|
};
|
|
2143
2143
|
/*!
|
|
2144
|
-
* Font Awesome Free 7.0.
|
|
2144
|
+
* Font Awesome Free 7.0.1 by @fontawesome - https://fontawesome.com
|
|
2145
2145
|
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
2146
2146
|
* Copyright 2025 Fonticons, Inc.
|
|
2147
2147
|
*/
|
|
2148
2148
|
var at = {
|
|
2149
2149
|
prefix: "fas",
|
|
2150
2150
|
iconName: "circle-exclamation",
|
|
2151
|
-
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1
|
|
2151
|
+
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
|
|
2152
2152
|
}, ue = {
|
|
2153
2153
|
prefix: "fas",
|
|
2154
2154
|
iconName: "xmark",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@udixio/ui-react",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"tailwind-merge": "^3.3.1",
|
|
28
28
|
"uuid": "^11.0.3",
|
|
29
29
|
"@fortawesome/fontawesome-svg-core": "^7.0.0",
|
|
30
|
-
"@fortawesome/free-brands-svg-icons": "^7.0.0",
|
|
31
30
|
"@fortawesome/free-regular-svg-icons": "^7.0.0",
|
|
32
31
|
"@fortawesome/free-solid-svg-icons": "^7.0.0",
|
|
33
32
|
"@fortawesome/react-fontawesome": "^3.0.0"
|
|
@@ -35,8 +34,8 @@
|
|
|
35
34
|
"devDependencies": {
|
|
36
35
|
"react": "^19.1.1",
|
|
37
36
|
"react-dom": "^19.1.1",
|
|
38
|
-
"@udixio/theme": "1.
|
|
39
|
-
"@udixio/tailwind": "1.7.
|
|
37
|
+
"@udixio/theme": "1.3.0",
|
|
38
|
+
"@udixio/tailwind": "1.7.2"
|
|
40
39
|
},
|
|
41
40
|
"repository": {
|
|
42
41
|
"type": "git",
|