@infinityfx/fluid 1.4.1 → 1.4.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.
Files changed (107) hide show
  1. package/dist/bin/commands.js +1 -1
  2. package/dist/bin/commands.js.map +1 -1
  3. package/dist/bin/compile.js +1 -1
  4. package/dist/bin/compile.js.map +1 -1
  5. package/dist/bin/core.js +1 -1
  6. package/dist/bin/core.js.map +1 -1
  7. package/dist/bin/utils.js +1 -1
  8. package/dist/bin/utils.js.map +1 -1
  9. package/dist/components/display/action-menu/group.js +1 -1
  10. package/dist/components/display/action-menu/heading.js +1 -1
  11. package/dist/components/display/action-menu/item.js +1 -1
  12. package/dist/components/display/action-menu/menu.js +1 -1
  13. package/dist/components/display/action-menu/root.js +1 -1
  14. package/dist/components/display/action-menu/trigger.js +1 -1
  15. package/dist/components/display/annotation.js +1 -1
  16. package/dist/components/display/annotation.js.map +1 -1
  17. package/dist/components/display/badge.js +1 -1
  18. package/dist/components/display/badge.js.map +1 -1
  19. package/dist/components/display/code.js +1 -1
  20. package/dist/components/display/combobox/content.js +1 -1
  21. package/dist/components/display/combobox/option.js +1 -1
  22. package/dist/components/display/combobox/root.js +1 -1
  23. package/dist/components/display/combobox/trigger.js +1 -1
  24. package/dist/components/display/frame.js +1 -1
  25. package/dist/components/display/frame.js.map +1 -1
  26. package/dist/components/display/key.js +1 -1
  27. package/dist/components/display/key.js.map +1 -1
  28. package/dist/components/display/swatch.js +1 -1
  29. package/dist/components/display/swatch.js.map +1 -1
  30. package/dist/components/display/table.js +1 -1
  31. package/dist/components/display/ticker.js +1 -1
  32. package/dist/components/display/timeline.js +1 -1
  33. package/dist/components/display/timeline.js.map +1 -1
  34. package/dist/components/display/toast.js +1 -1
  35. package/dist/components/display/toast.js.map +1 -1
  36. package/dist/components/display/tooltip.js +1 -1
  37. package/dist/components/feedback/circular-progress.js +1 -1
  38. package/dist/components/feedback/halo.js +1 -1
  39. package/dist/components/feedback/indicator.js +1 -1
  40. package/dist/components/feedback/progress-bar.js +1 -1
  41. package/dist/components/feedback/skeleton.js +1 -1
  42. package/dist/components/feedback/skeleton.js.map +1 -1
  43. package/dist/components/feedback/spinner.js +1 -1
  44. package/dist/components/feedback/spinner.js.map +1 -1
  45. package/dist/components/input/autocomplete.js +1 -1
  46. package/dist/components/input/button.js +1 -1
  47. package/dist/components/input/button.js.map +1 -1
  48. package/dist/components/input/calendar.js +1 -1
  49. package/dist/components/input/checkbox.js +1 -1
  50. package/dist/components/input/chip.js +1 -1
  51. package/dist/components/input/color-field.js +1 -1
  52. package/dist/components/input/color-picker.js +1 -1
  53. package/dist/components/input/date-field.js +1 -1
  54. package/dist/components/input/drop-zone.js +1 -1
  55. package/dist/components/input/field.js +1 -1
  56. package/dist/components/input/file-field.js +1 -1
  57. package/dist/components/input/hamburger.js +1 -1
  58. package/dist/components/input/number-field.js +1 -1
  59. package/dist/components/input/password-field.js +1 -1
  60. package/dist/components/input/pincode.js +1 -1
  61. package/dist/components/input/radio.js +1 -1
  62. package/dist/components/input/radio.js.map +1 -1
  63. package/dist/components/input/segmented.js +1 -1
  64. package/dist/components/input/select.js +1 -1
  65. package/dist/components/input/slider.js +1 -1
  66. package/dist/components/input/switch.js +1 -1
  67. package/dist/components/input/textarea.js +1 -1
  68. package/dist/components/input/theme-toggle.js +1 -1
  69. package/dist/components/input/toggle.js +1 -1
  70. package/dist/components/layout/accordion/item.js +1 -1
  71. package/dist/components/layout/accordion/root.js +1 -1
  72. package/dist/components/layout/collapsible.js +1 -1
  73. package/dist/components/layout/collapsible.js.map +1 -1
  74. package/dist/components/layout/cull.js +1 -1
  75. package/dist/components/layout/divider.js +1 -1
  76. package/dist/components/layout/divider.js.map +1 -1
  77. package/dist/components/layout/drawer.js +1 -1
  78. package/dist/components/layout/group.js +1 -1
  79. package/dist/components/layout/group.js.map +1 -1
  80. package/dist/components/layout/modal.js +1 -1
  81. package/dist/components/layout/panel.js +1 -1
  82. package/dist/components/layout/popover/content.js +1 -1
  83. package/dist/components/layout/popover/root.js +1 -1
  84. package/dist/components/layout/popover/trigger.js +1 -1
  85. package/dist/components/layout/scrollarea.js +1 -1
  86. package/dist/components/layout/sidebar/heading.js +1 -1
  87. package/dist/components/layout/sidebar/item.js +1 -1
  88. package/dist/components/layout/sidebar/root.js +1 -1
  89. package/dist/components/layout/sidebar/toggle.js +1 -1
  90. package/dist/components/layout/sidebar/user.js +1 -1
  91. package/dist/components/navigation/navigation-menu/group.js +1 -1
  92. package/dist/components/navigation/navigation-menu/link.js +1 -1
  93. package/dist/components/navigation/navigation-menu/root.js +1 -1
  94. package/dist/components/navigation/pagination.js +1 -1
  95. package/dist/components/navigation/stepper.js +1 -1
  96. package/dist/components/navigation/tabs.js +1 -1
  97. package/dist/context/fluid.js +1 -1
  98. package/dist/core/style.js +1 -1
  99. package/dist/core/style.js.map +1 -1
  100. package/dist/core/utils.js +1 -1
  101. package/dist/core/utils.js.map +1 -1
  102. package/dist/hooks/use-click-outside.js +1 -1
  103. package/dist/hooks/use-focus-trap.js +1 -1
  104. package/dist/hooks/use-focus-trap.js.map +1 -1
  105. package/dist/tsconfig.tsbuildinfo +1 -0
  106. package/package.json +3 -3
  107. package/tsconfig.json +4 -2
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{createContext as t,useId as n,useRef as r,useState as o,useLayoutEffect as i,useImperativeHandle as c,useEffect as s,use as l}from"react";import d from"../../../hooks/use-fluid.js";import u from"../../../hooks/use-media-query.js";const a=t(null);function w(e){const t=l(a);if(!e&&!t)throw new Error("Unable to access PopoverRoot context");return t}function m({children:t,ref:l,position:m="auto",mobileContainer:p="popover",stretch:v,onClose:f}){const h=n(),g=d(),x=r([]),b=r(null),y=r(null),[E,L]=o(!1),[j,k]=o(!1),$=w(!0),C=u(`(max-width: ${g.breakpoints.mob}px)`)&&"modal"===p;function R(){if(C||!j||!b.current||!y.current)return;const{w:e,style:t,centered:n,overflow:r}=function(e,t,n="0px"){const{x:r,y:o,width:i,bottom:c}=e.getBoundingClientRect(),s=r+i/2,l=o>window.innerHeight-c,d=s>window.innerWidth/2,u=d?window.innerWidth-i-r:r;return{w:i+"px",style:{left:(d?r+i:u)+"px",top:l?"auto":`calc(${c}px + ${n})`,bottom:l?`calc(${window.innerHeight-o}px + ${n})`:"auto",transform:d?"translateX(-100%)":""},centered:{left:s+"px",right:"auto",transform:"translateX(-50%)"},overflow:u<(t.getBoundingClientRect().width-i)/2}}(b.current,y.current,"var(--f-spacing-xsm)"),o="center"===m&&!r;Object.assign(y.current.style,t),o&&Object.assign(y.current.style,n),v&&(y.current.style.minWidth=e)}return i(R,[j,v,C]),c(l,(()=>({open:k.bind({},!0),close:k.bind({},!1)})),[]),s((()=>(L(!0),window.addEventListener("resize",R),window.addEventListener("scroll",R),E&&!j&&(null==f||f()),!E&&$&&$.children.current.push(y),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R)})),[j,$]),s((()=>{function e(e){var t,n;C||(null===(t=y.current)||void 0===t?void 0:t.contains(e.target))||(null===(n=b.current)||void 0===n?void 0:n.contains(e.target))||x.current.some((t=>{var n;return null===(n=t.current)||void 0===n?void 0:n.contains(e.target)}))||k(!1)}return window.addEventListener("click",e),()=>window.removeEventListener("click",e)}),[C]),e(a,{value:{id:h,mounted:E,isModal:C,trigger:b,content:y,opened:j,toggle:k,children:x},children:t})}m.displayName="Popover.Root";export{a as PopoverContext,m as default,w as usePopover};
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as t,useId as n,useRef as r,useState as o,useLayoutEffect as i,useImperativeHandle as c,useEffect as s,use as l}from"react";import d from"../../../hooks/use-fluid.js";import a from"../../../hooks/use-media-query.js";const u=t(null);function w(e){const t=l(u);if(!e&&!t)throw new Error("Unable to access PopoverRoot context");return t}function m({children:t,ref:l,position:m="auto",mobileContainer:p="popover",stretch:f,onClose:h}){const g=n(),v=d(),x=r([]),b=r(null),y=r(null),[E,L]=o(!1),[j,k]=o(!1),$=w(!0),C=a(`(max-width: ${v.breakpoints.mob}px)`)&&"modal"===p;function R(){if(C||!j||!b.current||!y.current)return;const{w:e,style:t,centered:n,overflow:r}=function(e,t,n="0px"){const{x:r,y:o,width:i,bottom:c}=e.getBoundingClientRect(),s=r+i/2,l=o>window.innerHeight-c,d=s>window.innerWidth/2,a=d?window.innerWidth-i-r:r;return{w:i+"px",style:{left:(d?r+i:a)+"px",top:l?"auto":`calc(${c}px + ${n})`,bottom:l?`calc(${window.innerHeight-o}px + ${n})`:"auto",transform:d?"translateX(-100%)":""},centered:{left:s+"px",right:"auto",transform:"translateX(-50%)"},overflow:a<(t.getBoundingClientRect().width-i)/2}}(b.current,y.current,"var(--f-spacing-xsm)"),o="center"===m&&!r;Object.assign(y.current.style,t),o&&Object.assign(y.current.style,n),f&&(y.current.style.minWidth=e)}return i(R,[j,f,C]),c(l,(()=>({open:k.bind({},!0),close:k.bind({},!1)})),[]),s((()=>(L(!0),window.addEventListener("resize",R),window.addEventListener("scroll",R),E&&!j&&h?.(),!E&&$&&$.children.current.push(y),()=>{window.removeEventListener("resize",R),window.removeEventListener("scroll",R)})),[j,$]),s((()=>{function e(e){C||y.current?.contains(e.target)||b.current?.contains(e.target)||x.current.some((t=>t.current?.contains(e.target)))||k(!1)}return window.addEventListener("click",e),()=>window.removeEventListener("click",e)}),[C]),e(u,{value:{id:g,mounted:E,isModal:C,trigger:b,content:y,opened:j,toggle:k,children:x},children:t})}m.displayName="Popover.Root";export{u as PopoverContext,m as default,w as usePopover};
3
3
  //# sourceMappingURL=root.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{combineRefs as n}from"../../../core/utils.js";import{useRef as t,useEffect as r,cloneElement as i}from"react";import{usePopover as o}from"./root.js";function s(s){var{children:c,longpress:a,disabled:u}=s,d=e(s,["children","longpress","disabled"]);const{id:l,trigger:g,opened:p,toggle:b}=o(),h=t(void 0),m=t({clientX:0,clientY:0}),f=t(!1),v=t(!1),y=u||c.props.disabled;return r((()=>{const e=g.current,n=new AbortController,t=n.signal;if(e)return e.addEventListener("mousedown",i,{signal:t}),e.addEventListener("mouseup",o,{signal:t}),e.addEventListener("touchstart",i,{signal:t}),e.addEventListener("touchend",o,{signal:t}),e.addEventListener("keydown",i,{signal:t}),e.addEventListener("keyup",o,{signal:t}),()=>n.abort();function r(e){y||(clearTimeout(h.current),e?h.current=setTimeout(r,e):b(!p))}function i(e){const n="changedTouches"in e,t="key"in e&&("Enter"===e.key||" "===e.key),i="button"in e&&0===e.button&&!v.current;n&&(v.current=!0,m.current=e.changedTouches[0]),a&&(i||n||t)&&(f.current=!0,r(400))}function o(e){const n="changedTouches"in e&&Math.abs(m.current.clientX-e.changedTouches[0].clientX)+Math.abs(m.current.clientY-e.changedTouches[0].clientY)<8,t="key"in e&&("Enter"===e.key||" "===e.key),i="button"in e&&0===e.button&&!v.current;!a&&(i||n||t)&&r(),clearTimeout(h.current),"button"in e&&(v.current=!1),f.current=!1}}),[b,y,p]),i(c,Object.assign(Object.assign({},d),{ref:n(g,c.props.ref),"aria-expanded":p,"aria-controls":l,"aria-disabled":y}))}s.displayName="Popover.Trigger";export{s as default};
2
+ import{combineRefs as e}from"../../../core/utils.js";import{useRef as n,useEffect as t,cloneElement as r}from"react";import{usePopover as o}from"./root.js";function i({children:i,longpress:c,disabled:a,...s}){const{id:u,trigger:d,opened:l,toggle:g}=o(),h=n(void 0),p=n({clientX:0,clientY:0}),b=n(!1),m=n(!1),f=a||i.props.disabled;return t((()=>{const e=d.current,n=new AbortController,t=n.signal;if(e)return e.addEventListener("mousedown",o,{signal:t}),e.addEventListener("mouseup",i,{signal:t}),e.addEventListener("touchstart",o,{signal:t}),e.addEventListener("touchend",i,{signal:t}),e.addEventListener("keydown",o,{signal:t}),e.addEventListener("keyup",i,{signal:t}),()=>n.abort();function r(e){f||(clearTimeout(h.current),e?h.current=setTimeout(r,e):g(!l))}function o(e){const n="changedTouches"in e,t="key"in e&&("Enter"===e.key||" "===e.key),o="button"in e&&0===e.button&&!m.current;n&&(m.current=!0,p.current=e.changedTouches[0]),c&&(o||n||t)&&(b.current=!0,r(400))}function i(e){const n="changedTouches"in e&&Math.abs(p.current.clientX-e.changedTouches[0].clientX)+Math.abs(p.current.clientY-e.changedTouches[0].clientY)<8,t="key"in e&&("Enter"===e.key||" "===e.key),o="button"in e&&0===e.button&&!m.current;!c&&(o||n||t)&&r(),clearTimeout(h.current),"button"in e&&(m.current=!1),b.current=!1}}),[g,f,l]),r(i,{...s,ref:e(d,i.props.ref),"aria-expanded":l,"aria-controls":u,"aria-disabled":f})}i.displayName="Popover.Trigger";export{i as default};
3
3
  //# sourceMappingURL=trigger.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as t}from"tslib";import{jsxs as e,jsx as r}from"react/jsx-runtime";import{combineClasses as n,classes as o,combineRefs as a}from"../../core/utils.js";import{useRef as i,useState as l,useLayoutEffect as c,useId as s}from"react";import{createStyles as d}from"../../core/style.js";const u=d("scrollarea",{".area":{position:"relative",overflow:"hidden"},".track":{position:"absolute",userSelect:"none",zIndex:99,transition:"opacity .2s"},".v__hover > .track":{opacity:0},".v__hover:hover > .track":{opacity:1},".handle":{width:".5rem",height:".5rem",backgroundColor:"var(--f-clr-grey-500)",opacity:.35,borderRadius:"99px",transition:"opacity .2s"},".track:hover .handle":{opacity:.8},'.area[data-horizontal="false"] > .track':{top:0,right:0,height:"100%"},'.area[data-horizontal="true"] > .track':{bottom:0,left:0,width:"100%"},'.v__permanent[data-horizontal="false"] > .track':{backgroundColor:"var(--f-clr-fg-100)",paddingInline:"2px"},'.v__permanent[data-horizontal="true"] > .track':{backgroundColor:"var(--f-clr-fg-100)",paddingBlock:"2px"},'.v__permanent[data-horizontal="false"]':{paddingRight:"calc(.5rem + 4px)"},'.v__permanent[data-horizontal="true"]':{paddingBottom:"calc(.5rem + 4px)"},'.area[data-scrollable="false"] > .track, .area[data-disabled="true"] > .track':{display:"none"},"@media (pointer: coarse)":{".track":{display:"none"},".area":{overflow:"auto"}}});function h(d){var{children:h,cc:p={},horizontal:f=!1,variant:m="hover",behavior:v="normal",disabled:g=!1,ref:x}=d,b=t(d,["children","cc","horizontal","variant","behavior","disabled","ref"]);const y=n(u,p),w=i(!1),k=i(0),_=i(null),z=i(null),H=i(null),W=i(null),[L,E]=l(!1);function M(t){const e=_.current;if(!e||!t.shiftKey&&"shift"===v)return;const r=100*Math.sign(t.deltaY),n=e[f?"scrollLeft":"scrollTop"],o=e[f?"scrollWidth":"scrollHeight"]-e[f?"offsetWidth":"offsetHeight"];((r>0?n<o:n>0)||t.timeStamp-k.current<350)&&(t.stopPropagation(),t.preventDefault(),k.current=t.timeStamp),$(r)}function S(t){if("mouseup"===t.type)return W.current=null;if("mousedown"===t.type)return t.stopPropagation(),W.current=t;const e=_.current;if(!e||!W.current)return;$(f?(t.x-W.current.x)/((1-e.clientWidth/e.scrollWidth)*e.clientWidth)*(e.scrollWidth-e.clientWidth):(t.y-W.current.y)/((1-e.clientHeight/e.scrollHeight)*e.clientHeight)*(e.scrollHeight-e.clientHeight)),W.current=t}function $(t){const e=_.current;if(!e||!H.current||!z.current||matchMedia("(pointer: coarse)").matches||g)return;const r=f?"offsetWidth":"offsetHeight",n=f?"scrollLeft":"scrollTop",o=Math.max(e[f?"scrollWidth":"scrollHeight"]-e[r],1),a=Math.max(Math.min(e[n]+Math.round(t),o),0);e[n]!==a&&(e[n]=a,w.current=!0);const i=a/o*(e[r]-H.current[r]);H.current.style.translate=f?`${i}px 0px`:`0px ${i}px`,H.current.setAttribute("aria-valuenow",(a/o*100).toString()),z.current.style.translate=`${f?a:e.scrollLeft}px ${f?e.scrollTop:a}px`}function j(){const t=_.current;if(!t||!H.current||!z.current)return;const e=f?t.offsetWidth/t.scrollWidth:t.offsetHeight/t.scrollHeight;H.current.style[f?"width":"height"]=100*e+"%",H.current.style[f?"height":"width"]="",z.current.style.translate="0px 0px",H.current.style.translate="0px 0px",E(e<1),$(0)}c((()=>{j();const t=new ResizeObserver(j),e=_.current;if(e)return t.observe(e),e.children.length&&t.observe(e.children[0]),e.addEventListener("wheel",M),window.addEventListener("mousemove",S),window.addEventListener("mouseup",S),()=>{t.disconnect(),window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",S),e.removeEventListener("wheel",M)}}),[g,f,v]);const N=s();return e("div",Object.assign({},b,{ref:a(x,_),id:N,className:o(y.area,y[`v__${m}`],b.className),onScroll:t=>{var e;if(null===(e=b.onScroll)||void 0===e||e.call(b,t),w.current)return w.current=!1;$(0)},"data-horizontal":f,"data-scrollable":L,"data-disabled":g,children:[h,r("div",{ref:z,className:y.track,children:r("div",{ref:H,className:y.handle,onMouseDown:t=>S(t.nativeEvent),role:"scrollbar","aria-controls":N})})]}))}export{h as default};
2
+ import{jsxs as t,jsx as e}from"react/jsx-runtime";import{combineClasses as r,classes as n,combineRefs as o}from"../../core/utils.js";import{useRef as a,useState as i,useLayoutEffect as l,useId as c}from"react";import{createStyles as s}from"../../core/style.js";const d=s("scrollarea",{".area":{position:"relative",overflow:"hidden"},".track":{position:"absolute",userSelect:"none",zIndex:99,transition:"opacity .2s"},".v__hover > .track":{opacity:0},".v__hover:hover > .track":{opacity:1},".handle":{width:".5rem",height:".5rem",backgroundColor:"var(--f-clr-grey-500)",opacity:.35,borderRadius:"99px",transition:"opacity .2s"},".track:hover .handle":{opacity:.8},'.area[data-horizontal="false"] > .track':{top:0,right:0,height:"100%"},'.area[data-horizontal="true"] > .track':{bottom:0,left:0,width:"100%"},'.v__permanent[data-horizontal="false"] > .track':{backgroundColor:"var(--f-clr-fg-100)",paddingInline:"2px"},'.v__permanent[data-horizontal="true"] > .track':{backgroundColor:"var(--f-clr-fg-100)",paddingBlock:"2px"},'.v__permanent[data-horizontal="false"]':{paddingRight:"calc(.5rem + 4px)"},'.v__permanent[data-horizontal="true"]':{paddingBottom:"calc(.5rem + 4px)"},'.area[data-scrollable="false"] > .track, .area[data-disabled="true"] > .track':{display:"none"},"@media (pointer: coarse)":{".track":{display:"none"},".area":{overflow:"auto"}}});function u({children:s,cc:u={},horizontal:h=!1,variant:p="hover",behavior:f="normal",disabled:m=!1,ref:v,...g}){const x=r(d,u),y=a(!1),w=a(0),b=a(null),k=a(null),_=a(null),H=a(null),[W,z]=i(!1);function L(t){const e=b.current;if(!e||!t.shiftKey&&"shift"===f)return;const r=100*Math.sign(t.deltaY),n=e[h?"scrollLeft":"scrollTop"],o=e[h?"scrollWidth":"scrollHeight"]-e[h?"offsetWidth":"offsetHeight"];((r>0?n<o:n>0)||t.timeStamp-w.current<350)&&(t.stopPropagation(),t.preventDefault(),w.current=t.timeStamp),M(r)}function E(t){if("mouseup"===t.type)return H.current=null;if("mousedown"===t.type)return t.stopPropagation(),H.current=t;const e=b.current;if(!e||!H.current)return;M(h?(t.x-H.current.x)/((1-e.clientWidth/e.scrollWidth)*e.clientWidth)*(e.scrollWidth-e.clientWidth):(t.y-H.current.y)/((1-e.clientHeight/e.scrollHeight)*e.clientHeight)*(e.scrollHeight-e.clientHeight)),H.current=t}function M(t){const e=b.current;if(!e||!_.current||!k.current||matchMedia("(pointer: coarse)").matches||m)return;const r=h?"offsetWidth":"offsetHeight",n=h?"scrollLeft":"scrollTop",o=Math.max(e[h?"scrollWidth":"scrollHeight"]-e[r],1),a=Math.max(Math.min(e[n]+Math.round(t),o),0);e[n]!==a&&(e[n]=a,y.current=!0);const i=a/o*(e[r]-_.current[r]);_.current.style.translate=h?`${i}px 0px`:`0px ${i}px`,_.current.setAttribute("aria-valuenow",(a/o*100).toString()),k.current.style.translate=`${h?a:e.scrollLeft}px ${h?e.scrollTop:a}px`}function S(){const t=b.current;if(!t||!_.current||!k.current)return;const e=h?t.offsetWidth/t.scrollWidth:t.offsetHeight/t.scrollHeight;_.current.style[h?"width":"height"]=100*e+"%",_.current.style[h?"height":"width"]="",k.current.style.translate="0px 0px",_.current.style.translate="0px 0px",z(e<1),M(0)}l((()=>{S();const t=new ResizeObserver(S),e=b.current;if(e)return t.observe(e),e.children.length&&t.observe(e.children[0]),e.addEventListener("wheel",L),window.addEventListener("mousemove",E),window.addEventListener("mouseup",E),()=>{t.disconnect(),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",E),e.removeEventListener("wheel",L)}}),[m,h,f]);const $=c();return t("div",{...g,ref:o(v,b),id:$,className:n(x.area,x[`v__${p}`],g.className),onScroll:t=>{if(g.onScroll?.(t),y.current)return y.current=!1;M(0)},"data-horizontal":h,"data-scrollable":W,"data-disabled":m,children:[s,e("div",{ref:k,className:x.track,children:e("div",{ref:_,className:x.handle,onMouseDown:t=>E(t.nativeEvent),role:"scrollbar","aria-controls":$})})]})}export{u as default};
3
3
  //# sourceMappingURL=scrollarea.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsx as i}from"react/jsx-runtime";import{combineClasses as o,classes as r}from"../../../core/utils.js";import{createStyles as t}from"../../../core/style.js";import{useSidebar as a}from"./root.js";const n=t("sidebar.heading",{".heading":{color:"var(--f-clr-text-100)",fontSize:"var(--f-font-size-xsm)",fontWeight:800,width:"max-content",transition:"opacity .3s",paddingInline:"1rem"},".heading.collapsed":{opacity:0}});function s(t){var{children:s,cc:c={}}=t,d=e(t,["children","cc"]);const l=o(n,c),{collapsed:m}=a();return i("div",Object.assign({},d,{role:"heading",className:r(l.heading,m&&l.collapsed,d.className),children:s}))}s.displayName="Sidebar.Heading";export{s as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{combineClasses as i,classes as o}from"../../../core/utils.js";import{createStyles as t}from"../../../core/style.js";import{useSidebar as a}from"./root.js";const r=t("sidebar.heading",{".heading":{color:"var(--f-clr-text-100)",fontSize:"var(--f-font-size-xsm)",fontWeight:800,width:"max-content",transition:"opacity .3s",paddingInline:"1rem"},".heading.collapsed":{opacity:0}});function n({children:t,cc:n={},...s}){const c=i(r,n),{collapsed:d}=a();return e("div",{...s,role:"heading",className:o(c.heading,d&&c.collapsed,s.className),children:t})}n.displayName="Sidebar.Heading";export{n as default};
3
3
  //# sourceMappingURL=heading.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsxs as t,Fragment as i,jsx as a}from"react/jsx-runtime";import{useState as o,Children as r}from"react";import n from"../../feedback/halo.js";import{combineClasses as c,classes as l}from"../../../core/utils.js";import d from"../../input/toggle.js";import s from"../collapsible.js";import{createStyles as m}from"../../../core/style.js";import{useSidebar as p}from"./root.js";import f from"../../../hooks/use-fluid.js";import g from"../../../hooks/use-media-query.js";import{Icon as h}from"../../../core/icons.js";const u=m("sidebar.item",{".item":{position:"relative",fontWeight:600,borderRadius:"var(--f-radius-sml)",color:"var(--f-clr-text-100)",display:"flex",transition:"background-color .25s, color .25s",outline:"none",overflow:"hidden",WebkitTapHighlightColor:"transparent"},".item:not(.compact)":{height:"3em",flexShrink:0},".s__sml":{fontSize:"var(--f-font-size-xsm)"},".s__med":{fontSize:"var(--f-font-size-sml)"},".icon":{height:"inherit",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},".item:not(.compact) .icon":{width:"3em"},'.item[data-disabled="false"]':{cursor:"pointer"},".item.round":{borderRadius:"999px"},'.item[data-active="true"]':{backgroundColor:"var(--f-clr-primary-100)",color:"var(--f-clr-text-200)"},'.v__light[data-active="true"]':{backgroundColor:"var(--f-clr-primary-600)",color:"var(--f-clr-primary-100)"},'.item[data-disabled="true"]':{color:"var(--f-clr-grey-500)"},".item .toggle":{marginRight:"-.3em"},".item.compact .toggle":{background:"transparent",color:"var(--f-clr-text-100)",pointerEvents:"none",marginRight:0},".item.compact .toggle__content":{padding:0},'.v__default[data-active="true"] .toggle':{color:"var(--f-clr-text-200)"},".content":{paddingRight:"1em",display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",justifyContent:"space-between",transition:"opacity .3s",flexGrow:1,flexShrink:0},".item.compact .icon":{padding:".6em",lineHeight:1},".item.compact .content":{paddingRight:".6em",paddingBlock:".6em",lineHeight:1},'.content[data-hasicon="false"]':{paddingLeft:"1em"},'.item.compact .content[data-hasicon="false"]':{paddingLeft:".6em"},".children":{paddingLeft:"1.5em",transition:"padding-left .3s",flexShrink:0},".children > *":{flexShrink:0},".item.collapsed .content":{opacity:0},'.children[data-collapsed="true"]':{paddingLeft:"0em"}});function v(m){var{children:v,cc:b={},size:x="med",label:k,icon:y,right:_,active:j=!1,round:S,compact:w,variant:z="default",disabled:C=!1,defaultOpen:R=!1}=m,N=e(m,["children","cc","size","label","icon","right","active","round","compact","variant","disabled","defaultOpen"]);const O=c(u,b),[I,L]=o(R),H=r.count(v),{collapsed:$}=p(),W=f(),q=g(`(max-width: ${W.breakpoints.mob}px)`);return t(i,{children:[a(n,{color:j?void 0:"var(--f-clr-primary-300)",disabled:C,children:t("div",Object.assign({},N,{tabIndex:0,role:"button",className:l(O.item,O[`s__${x}`],O[`v__${z}`],S&&O.round,w&&O.compact,$&&O.collapsed,N.className),"data-disabled":C,"data-active":j,onClick:()=>L(!I),children:[void 0!==y&&a("div",{className:O.icon,children:y}),t("span",{className:O.content,"data-hasicon":void 0!==y,children:[k,H?a(d,{cc:Object.assign({toggle:O.toggle,content:O.toggle__content},b),"aria-label":k,disabled:w,compact:!0,variant:"minimal",size:"med"===x?"sml":"xsm",round:S,checked:I,checkedContent:a(h,{type:"collapseUp"}),children:a(h,{type:"expandDown"})}):_]})]}))}),H?a(s,{shown:I&&(q||!$),cc:Object.assign({content:O.children},b),"data-collapsed":$,children:v}):null]})}v.displayName="Sidebar.Item";export{v as default};
2
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import{useState as o,Children as a}from"react";import r from"../../feedback/halo.js";import{combineClasses as n,classes as c}from"../../../core/utils.js";import l from"../../input/toggle.js";import d from"../collapsible.js";import{createStyles as s}from"../../../core/style.js";import{useSidebar as m}from"./root.js";import p from"../../../hooks/use-fluid.js";import f from"../../../hooks/use-media-query.js";import{Icon as g}from"../../../core/icons.js";const h=s("sidebar.item",{".item":{position:"relative",fontWeight:600,borderRadius:"var(--f-radius-sml)",color:"var(--f-clr-text-100)",display:"flex",transition:"background-color .25s, color .25s",outline:"none",overflow:"hidden",WebkitTapHighlightColor:"transparent"},".item:not(.compact)":{height:"3em",flexShrink:0},".s__sml":{fontSize:"var(--f-font-size-xsm)"},".s__med":{fontSize:"var(--f-font-size-sml)"},".icon":{height:"inherit",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},".item:not(.compact) .icon":{width:"3em"},'.item[data-disabled="false"]':{cursor:"pointer"},".item.round":{borderRadius:"999px"},'.item[data-active="true"]':{backgroundColor:"var(--f-clr-primary-100)",color:"var(--f-clr-text-200)"},'.v__light[data-active="true"]':{backgroundColor:"var(--f-clr-primary-600)",color:"var(--f-clr-primary-100)"},'.item[data-disabled="true"]':{color:"var(--f-clr-grey-500)"},".item .toggle":{marginRight:"-.3em"},".item.compact .toggle":{background:"transparent",color:"var(--f-clr-text-100)",pointerEvents:"none",marginRight:0},".item.compact .toggle__content":{padding:0},'.v__default[data-active="true"] .toggle':{color:"var(--f-clr-text-200)"},".content":{paddingRight:"1em",display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",justifyContent:"space-between",transition:"opacity .3s",flexGrow:1,flexShrink:0},".item.compact .icon":{padding:".6em",lineHeight:1},".item.compact .content":{paddingRight:".6em",paddingBlock:".6em",lineHeight:1},'.content[data-hasicon="false"]':{paddingLeft:"1em"},'.item.compact .content[data-hasicon="false"]':{paddingLeft:".6em"},".children":{paddingLeft:"1.5em",transition:"padding-left .3s",flexShrink:0},".children > *":{flexShrink:0},".item.collapsed .content":{opacity:0},'.children[data-collapsed="true"]':{paddingLeft:"0em"}});function u({children:s,cc:u={},size:v="med",label:b,icon:x,right:k,active:y=!1,round:_,compact:j,variant:S="default",disabled:w=!1,defaultOpen:C=!1,...z}){const R=n(h,u),[N,I]=o(C),L=a.count(s),{collapsed:H}=m(),$=p(),W=f(`(max-width: ${$.breakpoints.mob}px)`);return e(t,{children:[i(r,{color:y?void 0:"var(--f-clr-primary-300)",disabled:w,children:e("div",{...z,tabIndex:0,role:"button",className:c(R.item,R[`s__${v}`],R[`v__${S}`],_&&R.round,j&&R.compact,H&&R.collapsed,z.className),"data-disabled":w,"data-active":y,onClick:()=>I(!N),children:[void 0!==x&&i("div",{className:R.icon,children:x}),e("span",{className:R.content,"data-hasicon":void 0!==x,children:[b,L?i(l,{cc:{toggle:R.toggle,content:R.toggle__content,...u},"aria-label":b,disabled:j,compact:!0,variant:"minimal",size:"med"===v?"sml":"xsm",round:_,checked:N,checkedContent:i(g,{type:"collapseUp"}),children:i(g,{type:"expandDown"})}):k]})]})}),L?i(d,{shown:N&&(W||!H),cc:{content:R.children,...u},"data-collapsed":H,children:s}):null]})}u.displayName="Sidebar.Item";export{u as default};
3
3
  //# sourceMappingURL=item.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsx as s}from"react/jsx-runtime";import{createContext as l,use as o}from"react";import{createStyles as r}from"../../../core/style.js";import{combineClasses as t,classes as a}from"../../../core/utils.js";const i=l({collapsed:!1,setCollapsed:()=>{}});function d(){return o(i)}const c=r("sidebar.root",{".sidebar":{display:"flex",flexDirection:"column",paddingInline:"1em",overflow:"hidden",transition:"width .3s, translate .3s"},".sidebar.collapsed":{width:"5em !important"}});function n(l){var{children:o,cc:r={},collapsed:d,setCollapsed:n}=l,p=e(l,["children","cc","collapsed","setCollapsed"]);const m=t(c,r);return s(i,{value:{collapsed:d,setCollapsed:n},children:s("aside",Object.assign({},p,{className:a(m.sidebar,d&&m.collapsed,p.className),children:o}))})}n.displayName="Sidebar.Root";export{i as SidebarContext,n as default,d as useSidebar};
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as s,use as o}from"react";import{createStyles as l}from"../../../core/style.js";import{combineClasses as r,classes as t}from"../../../core/utils.js";const a=s({collapsed:!1,setCollapsed:()=>{}});function i(){return o(a)}const d=l("sidebar.root",{".sidebar":{display:"flex",flexDirection:"column",paddingInline:"1em",overflow:"hidden",transition:"width .3s, translate .3s"},".sidebar.collapsed":{width:"5em !important"}});function c({children:s,cc:o={},collapsed:l,setCollapsed:i,...c}){const n=r(d,o);return e(a,{value:{collapsed:l,setCollapsed:i},children:e("aside",{...c,className:t(n.sidebar,l&&n.collapsed,c.className),children:s})})}c.displayName="Sidebar.Root";export{a as SidebarContext,c as default,i as useSidebar};
3
3
  //# sourceMappingURL=root.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{combineClasses as r,classes as l}from"../../../core/utils.js";import{createStyles as a}from"../../../core/style.js";import{Icon as i}from"../../../core/icons.js";import{useSidebar as n}from"./root.js";import s from"../../input/button.js";import c from"../../feedback/halo.js";const d=a("sidebar.toggle",{".wrapper":{display:"flex",justifyContent:"space-between",alignItems:"center",overflow:"hidden",flexShrink:0},".toggle":{position:"relative",overflow:"hidden",background:"none",outline:"none",border:"none",color:"var(--f-clr-text-100)",borderRadius:"var(--f-radius-sml)",flexShrink:0,WebkitTapHighlightColor:"transparent"},".toggle:enabled":{cursor:"pointer"},".logo":{width:"3rem",height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"translate .25s"},".icon":{inset:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",translate:"-100% 0%",transition:"translate .25s"},".toggle:enabled:hover .logo, .toggle:enabled:focus-visible .logo":{translate:"100% 0%"},".toggle:enabled:hover .icon, .toggle:enabled:focus-visible .icon":{translate:"0% 0%"},'.button[data-collapsed="true"]':{opacity:0}});function p(a){var{children:p,cc:g={},toggle:m="square"}=a,b=e(a,["children","cc","toggle"]);const f=r(d,g),{collapsed:u,setCollapsed:h}=n();return t("div",Object.assign({},b,{className:l(f.wrapper,b.className),children:[o(c,{disabled:!u,color:"var(--f-clr-primary-300)",children:t("button",{type:"button",className:f.toggle,onClick:()=>h(!1),disabled:!u,children:[o("div",{className:f.logo,children:p}),o("div",{className:f.icon,children:o(i,{type:"expandSidebar"})})]})}),o(s,{size:"sml",compact:!0,variant:"light",onClick:()=>h(!0),className:f.button,tabIndex:u?-1:0,"data-collapsed":u,children:o(i,{type:"collapseSidebar"})})]}))}p.displayName="Sidebar.Toggle";export{p as default};
2
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{combineClasses as o,classes as l}from"../../../core/utils.js";import{createStyles as r}from"../../../core/style.js";import{Icon as a}from"../../../core/icons.js";import{useSidebar as i}from"./root.js";import n from"../../input/button.js";import s from"../../feedback/halo.js";const c=r("sidebar.toggle",{".wrapper":{display:"flex",justifyContent:"space-between",alignItems:"center",overflow:"hidden",flexShrink:0},".toggle":{position:"relative",overflow:"hidden",background:"none",outline:"none",border:"none",color:"var(--f-clr-text-100)",borderRadius:"var(--f-radius-sml)",flexShrink:0,WebkitTapHighlightColor:"transparent"},".toggle:enabled":{cursor:"pointer"},".logo":{width:"3rem",height:"3rem",display:"flex",alignItems:"center",justifyContent:"center",transition:"translate .25s"},".icon":{inset:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",translate:"-100% 0%",transition:"translate .25s"},".toggle:enabled:hover .logo, .toggle:enabled:focus-visible .logo":{translate:"100% 0%"},".toggle:enabled:hover .icon, .toggle:enabled:focus-visible .icon":{translate:"0% 0%"},'.button[data-collapsed="true"]':{opacity:0}});function d({children:r,cc:d={},toggle:p="square",...g}){const m=o(c,d),{collapsed:b,setCollapsed:f}=i();return e("div",{...g,className:l(m.wrapper,g.className),children:[t(s,{disabled:!b,color:"var(--f-clr-primary-300)",children:e("button",{type:"button",className:m.toggle,onClick:()=>f(!1),disabled:!b,children:[t("div",{className:m.logo,children:r}),t("div",{className:m.icon,children:t(a,{type:"expandSidebar"})})]})}),t(n,{size:"sml",compact:!0,variant:"light",onClick:()=>f(!0),className:m.button,tabIndex:b?-1:0,"data-collapsed":b,children:t(a,{type:"collapseSidebar"})})]})}d.displayName="Sidebar.Toggle";export{d as default};
3
3
  //# sourceMappingURL=toggle.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{combineClasses as o,classes as t}from"../../../core/utils.js";import a from"../../feedback/halo.js";import n from"../../feedback/indicator.js";import{createStyles as s}from"../../../core/style.js";import{useSidebar as l}from"./root.js";import{Icon as c}from"../../../core/icons.js";const d=s("sidebar.user",{".user":{position:"relative",outline:"none",border:"none",borderRadius:"var(--f-radius-sml)",background:"none",display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",textAlign:"left",color:"var(--f-clr-text-100)",height:"3em",paddingRight:".5em",fontSize:"var(--f-font-size-sml)"},".user.round":{borderRadius:"999px"},".user:enabled":{cursor:"pointer"},".avatar":{position:"relative",width:"2.5em",height:"2.5em",fontWeight:700,textTransform:"uppercase",fontSize:"1.2em",flexShrink:0},".frame":{position:"absolute",inset:0,borderRadius:"var(--f-radius-sml)",overflow:"hidden",backgroundColor:"var(--f-clr-primary-400)",display:"flex",alignItems:"center",justifyContent:"center"},".user.round .frame":{borderRadius:"999px"},".name":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:600},".status":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:".8em",color:"var(--f-clr-grey-500)"},".content":{flexShrink:1,flexGrow:1,width:0,transition:"opacity .3s"},".icon":{fontSize:"1.1em",display:"flex",alignItems:"center",marginLeft:"auto",transition:"opacity .3s"},".user.collapsed .content, .user.collapsed .icon":{opacity:0}});function m(s){var{children:m,cc:f={},name:p,status:u,indicator:h=!1,round:v=!1,icon:b=r(c,{type:"more"})}=s,g=e(s,["children","cc","name","status","indicator","round","icon"]);const x=o(d,f),{collapsed:y}=l();return r(a,{disabled:g.disabled,color:"var(--f-clr-primary-400)",children:i("button",Object.assign({},g,{type:"button",className:t(x.user,v&&x.round,y&&x.collapsed,g.className),children:[r(n,{outline:"var(--f-clr-bg-100)",content:h,children:r("div",{className:x.avatar,children:r("div",{className:x.frame,children:m||p.slice(0,2)})})}),i("div",{className:x.content,children:[r("div",{className:x.name,children:p}),r("div",{className:x.status,children:u})]}),b&&r("div",{className:x.icon,children:b})]}))})}m.displayName="Sidebar.User";export{m as default};
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{combineClasses as i,classes as o}from"../../../core/utils.js";import t from"../../feedback/halo.js";import a from"../../feedback/indicator.js";import{createStyles as n}from"../../../core/style.js";import{useSidebar as s}from"./root.js";import{Icon as l}from"../../../core/icons.js";const c=n("sidebar.user",{".user":{position:"relative",outline:"none",border:"none",borderRadius:"var(--f-radius-sml)",background:"none",display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",textAlign:"left",color:"var(--f-clr-text-100)",height:"3em",paddingRight:".5em",fontSize:"var(--f-font-size-sml)"},".user.round":{borderRadius:"999px"},".user:enabled":{cursor:"pointer"},".avatar":{position:"relative",width:"2.5em",height:"2.5em",fontWeight:700,textTransform:"uppercase",fontSize:"1.2em",flexShrink:0},".frame":{position:"absolute",inset:0,borderRadius:"var(--f-radius-sml)",overflow:"hidden",backgroundColor:"var(--f-clr-primary-400)",display:"flex",alignItems:"center",justifyContent:"center"},".user.round .frame":{borderRadius:"999px"},".name":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:600},".status":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:".8em",color:"var(--f-clr-grey-500)"},".content":{flexShrink:1,flexGrow:1,width:0,transition:"opacity .3s"},".icon":{fontSize:"1.1em",display:"flex",alignItems:"center",marginLeft:"auto",transition:"opacity .3s"},".user.collapsed .content, .user.collapsed .icon":{opacity:0}});function d({children:n,cc:d={},name:m,status:f,indicator:p=!1,round:u=!1,icon:h=e(l,{type:"more"}),...v}){const b=i(c,d),{collapsed:g}=s();return e(t,{disabled:v.disabled,color:"var(--f-clr-primary-400)",children:r("button",{...v,type:"button",className:o(b.user,u&&b.round,g&&b.collapsed,v.className),children:[e(a,{outline:"var(--f-clr-bg-100)",content:p,children:e("div",{className:b.avatar,children:e("div",{className:b.frame,children:n||m.slice(0,2)})})}),r("div",{className:b.content,children:[e("div",{className:b.name,children:m}),e("div",{className:b.status,children:f})]}),h&&e("div",{className:b.icon,children:h})]})})}d.displayName="Sidebar.User";export{d as default};
3
3
  //# sourceMappingURL=user.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsxs as i,jsx as r}from"react/jsx-runtime";import{useId as o,Children as n}from"react";import{createStyles as t}from"../../../core/style.js";import{combineClasses as a,classes as s}from"../../../core/utils.js";import{LayoutGroup as l,Morph as d}from"@infinityfx/lively/layout";import{useNavigationMenu as c}from"./root.js";import{Animatable as u}from"@infinityfx/lively";import{Icon as m}from"../../../core/icons.js";const p=t("navigation-menu.group",{".group":{position:"relative",display:"flex",justifyContent:"center"},".link":{position:"relative",padding:".4em .6em",borderRadius:"var(--f-radius-sml)",fontWeight:600,color:"var(--f-clr-text-100)",outline:"none",cursor:"pointer",lineHeight:1.25,display:"flex",alignItems:"center",gap:"var(--f-spacing-xsm)",WebkitTapHighlightColor:"transparent"},".link.round":{borderRadius:"1em"},".arrow":{display:"flex",transition:"rotate .35s",fontSize:".8em"},".selection":{position:"absolute",inset:0,borderRadius:"inherit",backgroundColor:"var(--f-clr-primary-400)",zIndex:-1},".menu":{position:"absolute",top:"calc(100% + var(--f-spacing-sml))",borderRadius:"calc(.25em + var(--f-radius-sml))",padding:".25em",backgroundColor:"var(--f-clr-fg-100)",border:"solid 1px var(--f-clr-fg-200)",boxShadow:"var(--f-shadow-med)",overflow:"hidden",zIndex:99}});function g(t){var{children:g,cc:f={},label:v,round:h=!1,href:x,target:y,active:b=!1,position:j="center",Link:k="a"}=t,N=e(t,["children","cc","label","round","href","target","active","position","Link"]);const w=a(p,f),R=o(),{root:C,id:z,selection:I,select:O}=c(),H=n.count(g)>0;return i("div",{className:w.group,children:[i(k,{className:s(w.link,h&&w.round),role:"menuitem",href:x,target:y,"aria-haspopup":H?"menu":void 0,"aria-expanded":H?R===I:void 0,"aria-controls":H?z+R:void 0,onMouseEnter:()=>O(R),onFocus:()=>O(R),onBlur:e=>{var i;(null===(i=C.current)||void 0===i?void 0:i.contains(e.relatedTarget))||O(void 0)},children:[v,H&&r("div",{className:w.arrow,style:{rotate:R===I?"180deg":"0deg"},children:r(m,{type:"down"})}),r(l,{children:(I?R===I:b)&&r(d,{id:"fluid-navigation-menu-selection",group:`fluid-navigation-menu-selection-${z}`,cachable:["x","sx","borderRadius"],deform:!1,transition:{duration:.35},animate:{opacity:[1,0],duration:.25},triggers:[{on:"mount",reverse:!0},{on:"unmount"}],children:r("div",{className:w.selection})})})]}),r(l,{children:H&&R===I&&r(d,{id:"fluid-navigation-menu-group",group:`fluid-navigation-menu-group-${z}`,cachable:["x","y","sx","sy"],deform:!1,transition:{duration:.35},animate:{opacity:[1,0],translate:["0px 0px","0px -8px"],duration:.25},triggers:[{on:"mount",reverse:!0},{on:"unmount"}],children:r("div",Object.assign({},N,{id:z+R,role:"menu",className:s(w.menu,N.className),style:Object.assign(Object.assign({},N.style),{left:"start"===j?0:void 0,right:"end"===j?0:void 0}),children:r(u,{stagger:.06,triggers:[{on:"mount",delay:.25}],children:g})}))})})]})}g.displayName="NavigationMenu.Group";export{g as default};
2
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useId as i,Children as o}from"react";import{createStyles as n}from"../../../core/style.js";import{combineClasses as t,classes as a}from"../../../core/utils.js";import{LayoutGroup as s,Morph as l}from"@infinityfx/lively/layout";import{useNavigationMenu as d}from"./root.js";import{Animatable as u}from"@infinityfx/lively";import{Icon as c}from"../../../core/icons.js";const m=n("navigation-menu.group",{".group":{position:"relative",display:"flex",justifyContent:"center"},".link":{position:"relative",padding:".4em .6em",borderRadius:"var(--f-radius-sml)",fontWeight:600,color:"var(--f-clr-text-100)",outline:"none",cursor:"pointer",lineHeight:1.25,display:"flex",alignItems:"center",gap:"var(--f-spacing-xsm)",WebkitTapHighlightColor:"transparent"},".link.round":{borderRadius:"1em"},".arrow":{display:"flex",transition:"rotate .35s",fontSize:".8em"},".selection":{position:"absolute",inset:0,borderRadius:"inherit",backgroundColor:"var(--f-clr-primary-400)",zIndex:-1},".menu":{position:"absolute",top:"calc(100% + var(--f-spacing-sml))",borderRadius:"calc(.25em + var(--f-radius-sml))",padding:".25em",backgroundColor:"var(--f-clr-fg-100)",border:"solid 1px var(--f-clr-fg-200)",boxShadow:"var(--f-shadow-med)",overflow:"hidden",zIndex:99}});function p({children:n,cc:p={},label:f,round:g=!1,href:v,target:h,active:x=!1,position:y="center",Link:b="a",...N}){const k=t(m,p),j=i(),{root:w,id:R,selection:C,select:z}=d(),I=o.count(n)>0;return e("div",{className:k.group,children:[e(b,{className:a(k.link,g&&k.round),role:"menuitem",href:v,target:h,"aria-haspopup":I?"menu":void 0,"aria-expanded":I?j===C:void 0,"aria-controls":I?R+j:void 0,onMouseEnter:()=>z(j),onFocus:()=>z(j),onBlur:e=>{w.current?.contains(e.relatedTarget)||z(void 0)},children:[f,I&&r("div",{className:k.arrow,style:{rotate:j===C?"180deg":"0deg"},children:r(c,{type:"down"})}),r(s,{children:(C?j===C:x)&&r(l,{id:"fluid-navigation-menu-selection",group:`fluid-navigation-menu-selection-${R}`,cachable:["x","sx","borderRadius"],deform:!1,transition:{duration:.35},animate:{opacity:[1,0],duration:.25},triggers:[{on:"mount",reverse:!0},{on:"unmount"}],children:r("div",{className:k.selection})})})]}),r(s,{children:I&&j===C&&r(l,{id:"fluid-navigation-menu-group",group:`fluid-navigation-menu-group-${R}`,cachable:["x","y","sx","sy"],deform:!1,transition:{duration:.35},animate:{opacity:[1,0],translate:["0px 0px","0px -8px"],duration:.25},triggers:[{on:"mount",reverse:!0},{on:"unmount"}],children:r("div",{...N,id:R+j,role:"menu",className:a(k.menu,N.className),style:{...N.style,left:"start"===y?0:void 0,right:"end"===y?0:void 0},children:r(u,{stagger:.06,triggers:[{on:"mount",delay:.25}],children:n})})})})]})}p.displayName="NavigationMenu.Group";export{p as default};
3
3
  //# sourceMappingURL=group.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as r}from"tslib";import{jsx as o}from"react/jsx-runtime";import{createStyles as i}from"../../../core/style.js";import{combineClasses as e,classes as t}from"../../../core/utils.js";import n from"../../feedback/halo.js";import{useNavigationMenu as l}from"./root.js";const a=i("navigation-menu.link",{".link":{position:"relative",display:"block",padding:".4em",borderRadius:"var(--f-radius-sml)",fontWeight:600,color:"var(--f-clr-text-100)",outline:"none",WebkitTapHighlightColor:"transparent"}});function c(i){var{children:c,cc:s={},Link:m="a"}=i,d=r(i,["children","cc","Link"]);const u=e(a,s),{root:p,select:f}=l();return o(n,{color:"var(--f-clr-primary-400)",children:o(m,Object.assign({},d,{role:"menuitem",className:t(u.link,d.className),onBlur:r=>{var o,i;null===(o=d.onBlur)||void 0===o||o.call(d,r),(null===(i=p.current)||void 0===i?void 0:i.contains(r.relatedTarget))||f(void 0)},children:c}))})}c.displayName="NavigationMenu.Link";export{c as default};
2
+ import{jsx as r}from"react/jsx-runtime";import{createStyles as o}from"../../../core/style.js";import{combineClasses as e,classes as i}from"../../../core/utils.js";import t from"../../feedback/halo.js";import{useNavigationMenu as n}from"./root.js";const a=o("navigation-menu.link",{".link":{position:"relative",display:"block",padding:".4em",borderRadius:"var(--f-radius-sml)",fontWeight:600,color:"var(--f-clr-text-100)",outline:"none",WebkitTapHighlightColor:"transparent"}});function l({children:o,cc:l={},Link:s="a",...c}){const m=e(a,l),{root:d,select:u}=n();return r(t,{color:"var(--f-clr-primary-400)",children:r(s,{...c,role:"menuitem",className:i(m.link,c.className),onBlur:r=>{c.onBlur?.(r),d.current?.contains(r.relatedTarget)||u(void 0)},children:o})})}l.displayName="NavigationMenu.Link";export{l as default};
3
3
  //# sourceMappingURL=link.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as o}from"tslib";import{jsx as e}from"react/jsx-runtime";import{combineClasses as n,combineRefs as t,classes as a}from"../../../core/utils.js";import{createContext as i,useId as r,useRef as l,useState as s,use as c}from"react";import{createStyles as m}from"../../../core/style.js";const u=i(null);function v(){const o=c(u);if(!o)throw new Error("Unable to access NavigationMenuRoot context");return o}const f=m("navigation-menu.root",{".navigation":{display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",height:"100%",isolation:"isolate",paddingBlock:"var(--f-spacing-sml)"}});function d(i){var{children:c,cc:m={},ref:v}=i,d=o(i,["children","cc","ref"]);const g=n(f,m),p=r(),h=l(null),[N,b]=s(void 0);return e("nav",Object.assign({ref:t(v,h)},d,{role:"menubar",className:a(g.navigation,d.className),onMouseLeave:o=>{var e;null===(e=d.onMouseLeave)||void 0===e||e.call(d,o),b(void 0)},children:e(u,{value:{root:h,id:p,selection:N,select:b},children:c})}))}d.displayName="NavigationMenu.Root";export{u as NavigationMenuContext,d as default,v as useNavigationMenu};
2
+ import{jsx as o}from"react/jsx-runtime";import{combineClasses as e,classes as n,combineRefs as t}from"../../../core/utils.js";import{createContext as a,useId as i,useRef as r,useState as s,use as c}from"react";import{createStyles as l}from"../../../core/style.js";const m=a(null);function u(){const o=c(m);if(!o)throw new Error("Unable to access NavigationMenuRoot context");return o}const f=l("navigation-menu.root",{".navigation":{display:"flex",alignItems:"center",gap:"var(--f-spacing-sml)",height:"100%",isolation:"isolate",paddingBlock:"var(--f-spacing-sml)"}});function v({children:a,cc:c={},ref:l,...u}){const v=e(f,c),d=i(),g=r(null),[p,h]=s(void 0);return o("nav",{ref:t(l,g),...u,role:"menubar",className:n(v.navigation,u.className),onMouseLeave:o=>{u.onMouseLeave?.(o),h(void 0)},children:o(m,{value:{root:g,id:d,selection:p,select:h},children:a})})}v.displayName="NavigationMenu.Root";export{m as NavigationMenuContext,v as default,u as useNavigationMenu};
3
3
  //# sourceMappingURL=root.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as a}from"tslib";import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useId as r,useState as t,useRef as o,Fragment as n}from"react";import{combineClasses as l,classes as s}from"../../core/utils.js";import{createStyles as d}from"../../core/style.js";import{Icon as c}from"../../core/icons.js";import m from"../feedback/halo.js";import{Morph as u}from"@infinityfx/lively/layout";import{Animatable as b}from"@infinityfx/lively";import{useTrigger as f}from"@infinityfx/lively/hooks";const p=d("pagination",{".pagination":{display:"flex",gap:"var(--f-spacing-xsm)"},".pill":{gap:"var(--f-spacing-xxs)"},".s__xsm":{fontSize:"var(--f-font-size-xxs)"},".s__sml":{fontSize:"var(--f-font-size-xsm)"},".s__med":{fontSize:"var(--f-font-size-sml)"},".s__lrg":{fontSize:"var(--f-font-size-med)"},".buttons":{display:"grid",gap:"inherit",gridAutoFlow:"column"},".buttons .layer":{width:"100%",height:"100%",borderRadius:"var(--f-radius-sml)",transition:"background-color .35s"},".pagination:not(.v__minimal) .layer":{backgroundColor:"var(--f-clr-fg-100)"},'.pagination[aria-disabled="true"] .layer':{backgroundColor:"var(--f-clr-grey-100)"},".button":{overflow:"hidden",position:"relative",border:"none",outline:"none",background:"none",color:"var(--f-clr-text-100)",width:"2.6em",height:"2.6em",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--f-radius-sml)",fontWeight:500,transition:"background-color .35s, color .35s",WebkitTapHighlightColor:"transparent"},".buttons .button":{backgroundColor:"transparent !important"},".pagination:not(.v__minimal) .button:enabled":{backgroundColor:"var(--f-clr-fg-100)"},".button:enabled":{cursor:"pointer"},".button:disabled":{backgroundColor:"var(--f-clr-grey-100)",color:"var(--f-clr-grey-500)"},'.button[aria-current="page"]':{color:"var(--f-clr-text-200)"},".pagination .layer.selection":{backgroundColor:"var(--color, var(--f-clr-primary-100))",boxShadow:"var(--f-shadow-sml)"},".v__neutral .layer.selection":{backgroundColor:"var(--f-clr-text-100)"},'.pagination[aria-disabled="true"] .layer.selection':{backgroundColor:"var(--f-clr-grey-200)"},".round .button":{borderRadius:"99px"},".round .layer":{borderRadius:"99px"},".pill > .button:first-child":{borderTopLeftRadius:"1.3em",borderBottomLeftRadius:"1.3em"},".pill > .button:last-child":{borderTopRightRadius:"1.3em",borderBottomRightRadius:"1.3em"},".indices":{width:"7.8em",height:"2.6em",display:"flex"},".indices > *":{width:"2.6em",height:"2.6em",display:"flex",alignItems:"center",justifyContent:"center"}});function g(d){var{cc:g={},pages:h,defaultPage:v=0,page:y,onChange:x,compact:k,skipable:C,shape:_="square",size:w,variant:N,disabled:R,color:j}=d,z=a(d,["cc","pages","defaultPage","page","onChange","compact","skipable","shape","size","variant","disabled","color"]);const M=l(p,g),S=r(),O=f(),[T,$]=void 0!==y?[y,x]:t(v);function A(){const a=Math.min(h,3);return new Array(a).fill(0).map(((e,i)=>i?i<a-1?Math.min(Math.max(T,1),h-2):C?Math.max(Math.min(T+1,h-1),2):h-1:C?Math.min(Math.max(T-1,0),h-3):0))}const B=o(A()),I=a=>{B.current=A(),null==$||$(a),null==x||x(a),O()},L=T<1||R,P=T>=h-1||R;return e("div",Object.assign({},z,{style:Object.assign(Object.assign({},z.style),{"--color":j}),role:"navigation","aria-disabled":R,className:s(M.pagination,M[`s__${w}`],M[`v__${N}`],M[_],z.className),children:[C&&i(m,{disabled:L,children:i("button",{disabled:L,"aria-label":"1",className:M.button,onClick:()=>I(0),children:i(c,{type:"first"})})}),i(m,{disabled:L,children:i("button",{disabled:L,"aria-label":T+"",className:M.button,onClick:()=>I(T-1),children:i(c,{type:"left"})})}),!k&&i("div",{className:M.buttons,children:A().map(((a,r)=>{const t=B.current[r],o={gridColumn:r+1,gridRow:1};return e(n,{children:[i("div",{className:M.layer,style:o}),a===T&&i(u,{group:`${S}-pagination-selection`,cachable:["x"],transition:{duration:.35},children:i("div",{className:s(M.layer,M.selection),style:o})}),i(m,{disabled:R,children:i("button",{type:"button",disabled:R,className:s(M.button,M.index),style:o,"aria-current":a===T?"page":void 0,onClick:()=>I(a),children:i(b,{animations:{forward:{translate:["33.3% 0%","0% 0%"],duration:.35},back:{translate:["-33.3% 0%","0% 0%"],duration:.35}},triggers:[{name:"forward",on:t-a<0&&O,immediate:!0},{name:"back",on:t-a>0&&O,immediate:!0}],children:e("div",{className:M.indices,children:[i("span",{children:t+1}),i("span",{children:a+1}),i("span",{children:t+1})]})})})})]},r)}))}),i(m,{disabled:P,children:i("button",{disabled:P,"aria-label":T+2+"",className:M.button,onClick:()=>I(T+1),children:i(c,{type:"right"})})}),C&&i(m,{disabled:P,children:i("button",{disabled:P,"aria-label":h+"",className:M.button,onClick:()=>I(h-1),children:i(c,{type:"last"})})})]}))}export{g as default};
2
+ import{jsxs as a,jsx as r}from"react/jsx-runtime";import{useId as e,useState as i,useRef as t,Fragment as o}from"react";import{combineClasses as n,classes as l}from"../../core/utils.js";import{createStyles as s}from"../../core/style.js";import{Icon as d}from"../../core/icons.js";import c from"../feedback/halo.js";import{Morph as m}from"@infinityfx/lively/layout";import{Animatable as u}from"@infinityfx/lively";import{useTrigger as b}from"@infinityfx/lively/hooks";const f=s("pagination",{".pagination":{display:"flex",gap:"var(--f-spacing-xsm)"},".pill":{gap:"var(--f-spacing-xxs)"},".s__xsm":{fontSize:"var(--f-font-size-xxs)"},".s__sml":{fontSize:"var(--f-font-size-xsm)"},".s__med":{fontSize:"var(--f-font-size-sml)"},".s__lrg":{fontSize:"var(--f-font-size-med)"},".buttons":{display:"grid",gap:"inherit",gridAutoFlow:"column"},".buttons .layer":{width:"100%",height:"100%",borderRadius:"var(--f-radius-sml)",transition:"background-color .35s"},".pagination:not(.v__minimal) .layer":{backgroundColor:"var(--f-clr-fg-100)"},'.pagination[aria-disabled="true"] .layer':{backgroundColor:"var(--f-clr-grey-100)"},".button":{overflow:"hidden",position:"relative",border:"none",outline:"none",background:"none",color:"var(--f-clr-text-100)",width:"2.6em",height:"2.6em",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--f-radius-sml)",fontWeight:500,transition:"background-color .35s, color .35s",WebkitTapHighlightColor:"transparent"},".buttons .button":{backgroundColor:"transparent !important"},".pagination:not(.v__minimal) .button:enabled":{backgroundColor:"var(--f-clr-fg-100)"},".button:enabled":{cursor:"pointer"},".button:disabled":{backgroundColor:"var(--f-clr-grey-100)",color:"var(--f-clr-grey-500)"},'.button[aria-current="page"]':{color:"var(--f-clr-text-200)"},".pagination .layer.selection":{backgroundColor:"var(--color, var(--f-clr-primary-100))",boxShadow:"var(--f-shadow-sml)"},".v__neutral .layer.selection":{backgroundColor:"var(--f-clr-text-100)"},'.pagination[aria-disabled="true"] .layer.selection':{backgroundColor:"var(--f-clr-grey-200)"},".round .button":{borderRadius:"99px"},".round .layer":{borderRadius:"99px"},".pill > .button:first-child":{borderTopLeftRadius:"1.3em",borderBottomLeftRadius:"1.3em"},".pill > .button:last-child":{borderTopRightRadius:"1.3em",borderBottomRightRadius:"1.3em"},".indices":{width:"7.8em",height:"2.6em",display:"flex"},".indices > *":{width:"2.6em",height:"2.6em",display:"flex",alignItems:"center",justifyContent:"center"}});function p({cc:s={},pages:p,defaultPage:g=0,page:h,onChange:y,compact:v,skipable:x,shape:k="square",size:C,variant:_,disabled:w,color:N,...R}){const z=n(f,s),j=e(),M=b(),[S,T]=void 0!==h?[h,y]:i(g);function $(){const a=Math.min(p,3);return new Array(a).fill(0).map(((r,e)=>e?e<a-1?Math.min(Math.max(S,1),p-2):x?Math.max(Math.min(S+1,p-1),2):p-1:x?Math.min(Math.max(S-1,0),p-3):0))}const A=t($()),B=a=>{A.current=$(),T?.(a),y?.(a),M()},I=S<1||w,L=S>=p-1||w;return a("div",{...R,style:{...R.style,"--color":N},role:"navigation","aria-disabled":w,className:l(z.pagination,z[`s__${C}`],z[`v__${_}`],z[k],R.className),children:[x&&r(c,{disabled:I,children:r("button",{disabled:I,"aria-label":"1",className:z.button,onClick:()=>B(0),children:r(d,{type:"first"})})}),r(c,{disabled:I,children:r("button",{disabled:I,"aria-label":S+"",className:z.button,onClick:()=>B(S-1),children:r(d,{type:"left"})})}),!v&&r("div",{className:z.buttons,children:$().map(((e,i)=>{const t=A.current[i],n={gridColumn:i+1,gridRow:1};return a(o,{children:[r("div",{className:z.layer,style:n}),e===S&&r(m,{group:`${j}-pagination-selection`,cachable:["x"],transition:{duration:.35},children:r("div",{className:l(z.layer,z.selection),style:n})}),r(c,{disabled:w,children:r("button",{type:"button",disabled:w,className:l(z.button,z.index),style:n,"aria-current":e===S?"page":void 0,onClick:()=>B(e),children:r(u,{animations:{forward:{translate:["33.3% 0%","0% 0%"],duration:.35},back:{translate:["-33.3% 0%","0% 0%"],duration:.35}},triggers:[{name:"forward",on:t-e<0&&M,immediate:!0},{name:"back",on:t-e>0&&M,immediate:!0}],children:a("div",{className:z.indices,children:[r("span",{children:t+1}),r("span",{children:e+1}),r("span",{children:t+1})]})})})})]},i)}))}),r(c,{disabled:L,children:r("button",{disabled:L,"aria-label":S+2+"",className:z.button,onClick:()=>B(S+1),children:r(d,{type:"right"})})}),x&&r(c,{disabled:L,children:r("button",{disabled:L,"aria-label":p+"",className:z.button,onClick:()=>B(p-1),children:r(d,{type:"last"})})})]})}export{p as default};
3
3
  //# sourceMappingURL=pagination.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as r}from"tslib";import{jsxs as e,jsx as t}from"react/jsx-runtime";import{combineClasses as a,classes as o}from"../../core/utils.js";import{Animatable as l}from"@infinityfx/lively";import{useId as i}from"react";import c from"../feedback/halo.js";import s from"../feedback/progress-bar.js";import{createStyles as n}from"../../core/style.js";import{Icon as d}from"../../core/icons.js";const p=n("stepper",{".stepper":{display:"grid",gridAutoFlow:"column",gridAutoColumns:"1fr",gap:"6px"},".stepper.vertical":{gridAutoFlow:"row"},".step":{display:"flex",flexDirection:"column",gap:"var(--f-spacing-sml)"},".stepper.vertical .step":{flexDirection:"row"},".header":{display:"flex",alignItems:"center",gap:"6px"},".stepper.vertical .header":{flexDirection:"column"},".bullet":{position:"relative",width:"2.5em",height:"2.5em",backgroundColor:"var(--f-clr-fg-100)",border:"solid 1px var(--f-clr-fg-200)",borderRadius:"999px",color:"var(--f-clr-grey-300)",outline:"solid 2px transparent",outlineOffset:"-1px",transition:"background-color .25s, color .25s, outline-color .25s"},".bullet:enabled":{cursor:"pointer"},'.step[data-current="true"] .bullet':{outlineColor:"var(--f-clr-primary-200)",color:"var(--f-clr-primary-200)"},'.step[data-completed="true"] .bullet':{backgroundColor:"var(--f-clr-primary-100)",color:"var(--f-clr-text-200)"},'.step[data-error="true"][data-completed="false"] .bullet':{outlineColor:"var(--f-clr-error-200)",color:"var(--f-clr-error-200)"},'.step[data-error="true"][data-completed="true"] .bullet':{backgroundColor:"var(--f-clr-error-100)"},".icon":{width:"100%",aspectRatio:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden"},".icons":{width:"100%",display:"flex",flexDirection:"column"},".progress":{flexGrow:1,backgroundColor:"var(--f-clr-fg-200)",borderRadius:"var(--f-radius-xsm)",transition:"background-color .25s"},".stepper:not(.vertical) .progress":{minWidth:"1em",height:"3px"},".stepper.vertical .progress":{minHeight:"1em",width:"3px"},'.step[data-completed="true"] .progress':{backgroundColor:"var(--f-clr-primary-100)"},".stepper:not(.vertical) .step:not(:last-child) .content":{paddingRight:"var(--f-spacing-sml)"},".name":{fontSize:"var(--f-font-size-sml)",color:"var(--f-clr-text-100)",fontWeight:600},".label":{fontSize:"var(--f-font-size-xsm)",color:"var(--f-clr-grey-600)"},".halo":{inset:"-.5em !important"},".track":{marginTop:"calc(var(--f-spacing-sml) - 6px)"}});function m(n){var{cc:m={},steps:f,completed:u,setCompleted:v,navigation:g="backwards",variant:h="default"}=n,b=r(n,["cc","steps","completed","setCompleted","navigation","variant"]);const x=a(p,m),y=i(),k="compact"===h?f.slice(Math.min(u,f.length-1),u+1):f;return e("div",Object.assign({},b,{className:o(x.stepper,"default"!==h&&x.vertical,b.className),children:[k.map((({name:r,label:a,icon:o,error:i},s)=>{const n=("forwards"===g?s>=u:"backwards"===g?s<u:"both"===g)&&"compact"!==h,p="compact"===h?u===f.length:s<u;return a||(a=(s+1+"").padStart(2,"0")),e("div",{className:x.step,"data-completed":p,"data-current":"compact"===h?!p:s===u,"data-error":i,children:[e("div",{className:x.header,children:[t(c,{disabled:!n,cc:{halo:x.halo},children:t("button",{type:"button",className:x.bullet,disabled:!n,onClick:()=>null==v?void 0:v(s),"aria-labelledby":`${y}-${s}`,children:t("div",{className:x.icon,children:t(l,{initial:{translate:p?"0% -25%":"0% 25%"},animate:{translate:["0% 25%","0% -25%"],duration:.35},triggers:[{on:p},{on:!p,reverse:!0}],children:e("div",{className:x.icons,children:[t("div",{className:x.icon,children:o}),t("div",{className:x.icon,children:t(d,{type:"check"})})]})})})})}),s<f.length-1&&"compact"!==h&&t("div",{className:x.progress})]}),e("div",{className:x.content,children:[t("div",{className:x.label,id:`${y}-${s}`,children:a}),t("div",{className:x.name,children:r})]})]},s)})),"compact"===h&&t(s,{size:"sml",value:u/f.length,cc:{track:x.track}})]}))}export{m as default};
2
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{combineClasses as t,classes as a}from"../../core/utils.js";import{Animatable as o}from"@infinityfx/lively";import{useId as l}from"react";import i from"../feedback/halo.js";import c from"../feedback/progress-bar.js";import{createStyles as s}from"../../core/style.js";import{Icon as n}from"../../core/icons.js";const d=s("stepper",{".stepper":{display:"grid",gridAutoFlow:"column",gridAutoColumns:"1fr",gap:"6px"},".stepper.vertical":{gridAutoFlow:"row"},".step":{display:"flex",flexDirection:"column",gap:"var(--f-spacing-sml)"},".stepper.vertical .step":{flexDirection:"row"},".header":{display:"flex",alignItems:"center",gap:"6px"},".stepper.vertical .header":{flexDirection:"column"},".bullet":{position:"relative",width:"2.5em",height:"2.5em",backgroundColor:"var(--f-clr-fg-100)",border:"solid 1px var(--f-clr-fg-200)",borderRadius:"999px",color:"var(--f-clr-grey-300)",outline:"solid 2px transparent",outlineOffset:"-1px",transition:"background-color .25s, color .25s, outline-color .25s"},".bullet:enabled":{cursor:"pointer"},'.step[data-current="true"] .bullet':{outlineColor:"var(--f-clr-primary-200)",color:"var(--f-clr-primary-200)"},'.step[data-completed="true"] .bullet':{backgroundColor:"var(--f-clr-primary-100)",color:"var(--f-clr-text-200)"},'.step[data-error="true"][data-completed="false"] .bullet':{outlineColor:"var(--f-clr-error-200)",color:"var(--f-clr-error-200)"},'.step[data-error="true"][data-completed="true"] .bullet':{backgroundColor:"var(--f-clr-error-100)"},".icon":{width:"100%",aspectRatio:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden"},".icons":{width:"100%",display:"flex",flexDirection:"column"},".progress":{flexGrow:1,backgroundColor:"var(--f-clr-fg-200)",borderRadius:"var(--f-radius-xsm)",transition:"background-color .25s"},".stepper:not(.vertical) .progress":{minWidth:"1em",height:"3px"},".stepper.vertical .progress":{minHeight:"1em",width:"3px"},'.step[data-completed="true"] .progress':{backgroundColor:"var(--f-clr-primary-100)"},".stepper:not(.vertical) .step:not(:last-child) .content":{paddingRight:"var(--f-spacing-sml)"},".name":{fontSize:"var(--f-font-size-sml)",color:"var(--f-clr-text-100)",fontWeight:600},".label":{fontSize:"var(--f-font-size-xsm)",color:"var(--f-clr-grey-600)"},".halo":{inset:"-.5em !important"},".track":{marginTop:"calc(var(--f-spacing-sml) - 6px)"}});function p({cc:s={},steps:p,completed:m,setCompleted:f,navigation:u="backwards",variant:v="default",...g}){const h=t(d,s),b=l(),x="compact"===v?p.slice(Math.min(m,p.length-1),m+1):p;return r("div",{...g,className:a(h.stepper,"default"!==v&&h.vertical,g.className),children:[x.map((({name:t,label:a,icon:l,error:c},s)=>{const d=("forwards"===u?s>=m:"backwards"===u?s<m:"both"===u)&&"compact"!==v,g="compact"===v?m===p.length:s<m;return a||(a=(s+1+"").padStart(2,"0")),r("div",{className:h.step,"data-completed":g,"data-current":"compact"===v?!g:s===m,"data-error":c,children:[r("div",{className:h.header,children:[e(i,{disabled:!d,cc:{halo:h.halo},children:e("button",{type:"button",className:h.bullet,disabled:!d,onClick:()=>f?.(s),"aria-labelledby":`${b}-${s}`,children:e("div",{className:h.icon,children:e(o,{initial:{translate:g?"0% -25%":"0% 25%"},animate:{translate:["0% 25%","0% -25%"],duration:.35},triggers:[{on:g},{on:!g,reverse:!0}],children:r("div",{className:h.icons,children:[e("div",{className:h.icon,children:l}),e("div",{className:h.icon,children:e(n,{type:"check"})})]})})})})}),s<p.length-1&&"compact"!==v&&e("div",{className:h.progress})]}),r("div",{className:h.content,children:[e("div",{className:h.label,id:`${b}-${s}`,children:a}),e("div",{className:h.name,children:t})]})]},s)})),"compact"===v&&e(c,{size:"sml",value:m/p.length,cc:{track:h.track}})]})}export{p as default};
3
3
  //# sourceMappingURL=stepper.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{__rest as e}from"tslib";import{jsx as a,jsxs as r}from"react/jsx-runtime";import{useId as o,useRef as t,useState as l}from"react";import i from"../feedback/halo.js";import{Morph as n}from"@infinityfx/lively/layout";import{combineClasses as s,classes as c}from"../../core/utils.js";import d from"../layout/scrollarea.js";import{createStyles as u}from"../../core/style.js";const f=u("tabs",{".v__default":{backgroundColor:"var(--f-clr-fg-100)",borderRadius:"var(--f-radius-sml)"},".tabs":{display:"flex",width:"max-content"},".v__default .tabs":{gap:"var(--f-spacing-sml)",padding:"0 .6em"},".option":{position:"relative"},".v__default .option":{padding:".6em 0"},".selection":{position:"absolute",width:"100%",height:"3px",backgroundColor:"var(--f-clr-text-100)",left:0,bottom:0,borderRadius:"99px"},".button":{position:"relative",outline:"none",border:"none",background:"none",padding:".4em .6em",borderRadius:"var(--f-radius-sml)",color:"var(--f-clr-text-100)",fontSize:"var(--f-font-size-sml)",fontWeight:600,WebkitTapHighlightColor:"transparent"},".v__minimal .button":{padding:".8em 1.2em"},".button:enabled":{cursor:"pointer"},".button:disabled":{color:"var(--f-clr-grey-500)"}});function m(u){var m,{options:p,cc:b={},variant:v="default",value:h,defaultValue:g,onChange:y}=u,k=e(u,["options","cc","variant","value","defaultValue","onChange"]);const x=s(f,b),w=o(),_=t([]),[j,C]=void 0!==h?[h]:l(g||(null===(m=p[0])||void 0===m?void 0:m.value));function N(e){var a;const r=_.current.filter((e=>e));null===(a=r[e=e<0?r.length-1:e>=r.length?0:e])||void 0===a||a.focus()}return a("div",Object.assign({},k,{className:c(x.wrapper,x[`v__${v}`],k.className),children:a(d,{horizontal:!0,children:a("div",{className:x.tabs,role:"tablist",children:p.map((({label:e,value:o,disabled:t,panelId:l},s)=>r("div",{className:x.option,children:[a(i,{disabled:t,color:"default"===v?"var(--f-clr-primary-300)":"var(--f-clr-primary-400)",children:a("button",{ref:e=>{_.current[s]=t?null:e},type:"button",role:"tab",className:x.button,"aria-selected":j===o,"aria-controls":l,disabled:t,onClick:()=>{null==C||C(o),null==y||y(o)},onKeyDown:e=>{let a=!0;switch(e.key){case"ArrowRight":case"ArrowDown":N(s+1);break;case"ArrowLeft":case"ArrowUp":N(s-1);break;case"Home":N(0);break;case"End":N(-1);break;default:a=!1}a&&e.preventDefault()},children:e})}),j===o&&a(n,{group:`tabs-selection-${w}`,deform:!1,cachable:["x","sx"],children:a("div",{className:x.selection})})]},s)))})})}))}export{m as default};
2
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{useId as a,useRef as t,useState as o}from"react";import l from"../feedback/halo.js";import{Morph as i}from"@infinityfx/lively/layout";import{combineClasses as n,classes as s}from"../../core/utils.js";import c from"../layout/scrollarea.js";import{createStyles as d}from"../../core/style.js";const u=d("tabs",{".v__default":{backgroundColor:"var(--f-clr-fg-100)",borderRadius:"var(--f-radius-sml)"},".tabs":{display:"flex",width:"max-content"},".v__default .tabs":{gap:"var(--f-spacing-sml)",padding:"0 .6em"},".option":{position:"relative"},".v__default .option":{padding:".6em 0"},".selection":{position:"absolute",width:"100%",height:"3px",backgroundColor:"var(--f-clr-text-100)",left:0,bottom:0,borderRadius:"99px"},".button":{position:"relative",outline:"none",border:"none",background:"none",padding:".4em .6em",borderRadius:"var(--f-radius-sml)",color:"var(--f-clr-text-100)",fontSize:"var(--f-font-size-sml)",fontWeight:600,WebkitTapHighlightColor:"transparent"},".v__minimal .button":{padding:".8em 1.2em"},".button:enabled":{cursor:"pointer"},".button:disabled":{color:"var(--f-clr-grey-500)"}});function f({options:d,cc:f={},variant:m="default",value:p,defaultValue:b,onChange:v,...h}){const g=n(u,f),y=a(),k=t([]),[x,w]=void 0!==p?[p]:o(b||d[0]?.value);function _(e){const r=k.current.filter((e=>e));e=e<0?r.length-1:e>=r.length?0:e,r[e]?.focus()}return e("div",{...h,className:s(g.wrapper,g[`v__${m}`],h.className),children:e(c,{horizontal:!0,children:e("div",{className:g.tabs,role:"tablist",children:d.map((({label:a,value:t,disabled:o,panelId:n},s)=>r("div",{className:g.option,children:[e(l,{disabled:o,color:"default"===m?"var(--f-clr-primary-300)":"var(--f-clr-primary-400)",children:e("button",{ref:e=>{k.current[s]=o?null:e},type:"button",role:"tab",className:g.button,"aria-selected":x===t,"aria-controls":n,disabled:o,onClick:()=>{w?.(t),v?.(t)},onKeyDown:e=>{let r=!0;switch(e.key){case"ArrowRight":case"ArrowDown":_(s+1);break;case"ArrowLeft":case"ArrowUp":_(s-1);break;case"Home":_(0);break;case"End":_(-1);break;default:r=!1}r&&e.preventDefault()},children:a})}),x===t&&e(i,{group:`tabs-selection-${y}`,deform:!1,cachable:["x","sx"],children:e("div",{className:g.selection})})]},s)))})})})}export{f as default};
3
3
  //# sourceMappingURL=tabs.js.map
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{jsx as e}from"react/jsx-runtime";import{createContext as o,cloneElement as r}from"react";import{parseColorPalettes as s,parseCSSVariables as t}from"../core/theme.js";import m from"../styles/global.js";import c from"../hooks/use-color-scheme.js";import{createGlobalStyles as l}from"../core/style.js";import i from"../hooks/use-media-query.js";import{GLOBAL_CONTEXT as a}from"../core/shared.js";const h=a.theme,n=o(null);function p({children:o,initialColorScheme:p}){const f=Object.keys(h.palettes).concat("system"),{colorScheme:j,setColorScheme:u}=c(p,f),d=i("(prefers-color-scheme: dark)")?"dark":"light",S=d in h.palettes?d:h.defaultColorScheme;return l((()=>{const e=a.theme;return Object.assign(Object.assign({},s(e)),{":root":t(e)})})),l(m),e(n,{value:Object.assign(Object.assign({},h),{colorScheme:j,appliedColorScheme:"system"===j?S:j,setColorScheme:u}),children:r(o,{id:"__fluid",className:`scheme-${j}`})})}export{n as FluidContext,p as default};
2
+ import{jsx as e}from"react/jsx-runtime";import{createContext as o,cloneElement as r}from"react";import{parseCSSVariables as t,parseColorPalettes as m}from"../core/theme.js";import s from"../styles/global.js";import c from"../hooks/use-color-scheme.js";import{createGlobalStyles as l}from"../core/style.js";import i from"../hooks/use-media-query.js";import{GLOBAL_CONTEXT as h}from"../core/shared.js";const a=h.theme,n=o(null);function p({children:o,initialColorScheme:p}){const f=Object.keys(a.palettes).concat("system"),{colorScheme:u,setColorScheme:d}=c(p,f),j=i("(prefers-color-scheme: dark)")?"dark":"light",S=j in a.palettes?j:a.defaultColorScheme;return l((()=>{const e=h.theme;return{...m(e),":root":t(e)}})),l(s),e(n,{value:{...a,colorScheme:u,appliedColorScheme:"system"===u?S:u,setColorScheme:d},children:r(o,{id:"__fluid",className:`scheme-${u}`})})}export{n as FluidContext,p as default};
3
3
  //# sourceMappingURL=fluid.js.map
@@ -1,2 +1,2 @@
1
- import{GLOBAL_CONTEXT as t}from"./shared.js";import{mergeRecursive as e}from"./utils.js";function s(t){let e=3735928559,s=1103547991;for(let r,o=0;o<t.length;o++)r=t.charCodeAt(o),e=Math.imul(e^r,2654435761),s=Math.imul(s^r,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=4294967296*(2097151&s)+(e>>>0),e.toString(16).slice(-8).padStart(8,"0")}function r(t,e,s={}){return{rules:Object.entries(t).reduce(((t,[o,n])=>{if(null==n)return t;if("object"==typeof n){return t+`${(e?o.split(/((?::global\()?[.#][\w\-_][\w\d\-_]*)/gi).reduce(((t,r)=>{if(/^[.#]/.test(r)){const t=r.slice(1);s[t]=`${t}__${e}`,r=`${r}__${e}`}return t+r}),""):o).replace(/:global\((.+?)\)/g,"$1")}{${r(n,e,s).rules}}`}return t+`${o.replace(/(.?)([A-Z])/g,"$1-$2").toLowerCase()}:${n};`}),""),selectors:s}}function o(o,n){const l=n instanceof Function?n(t.theme):n,i=t.components[o]||{},u=s("automatic"===t.cssOutput?JSON.stringify([i,l]):o);return t.styles[o]=r(function(...t){const s={};for(const r of t)for(const t in r){const o=e(s[t],r[t]);void 0!==o&&(s[t]=o)}return s}(i,l),u),t.styles[o].selectors}function n(e){var o;const n=e instanceof Function?e(t.theme):e,l=s(JSON.stringify(n)),{rules:i}=r(n);l in t.styles||(t.styles.__globals={rules:((null===(o=t.styles.__globals)||void 0===o?void 0:o.rules)||"")+i,selectors:{}},t.styles[l]={rules:"",selectors:{}})}export{n as createGlobalStyles,o as createStyles};
1
+ import{GLOBAL_CONTEXT as t}from"./shared.js";import{mergeRecursive as e}from"./utils.js";function s(t){let e=3735928559,s=1103547991;for(let r,n=0;n<t.length;n++)r=t.charCodeAt(n),e=Math.imul(e^r,2654435761),s=Math.imul(s^r,1597334677);return e=Math.imul(e^e>>>16,2246822507)^Math.imul(s^s>>>13,3266489909),s=Math.imul(s^s>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),e=4294967296*(2097151&s)+(e>>>0),e.toString(16).slice(-8).padStart(8,"0")}function r(t,e,s={}){return{rules:Object.entries(t).reduce(((t,[n,o])=>{if(null==o)return t;if("object"==typeof o){return t+`${(e?n.split(/((?::global\()?[.#][\w\-_][\w\d\-_]*)/gi).reduce(((t,r)=>{if(/^[.#]/.test(r)){const t=r.slice(1);s[t]=`${t}__${e}`,r=`${r}__${e}`}return t+r}),""):n).replace(/:global\((.+?)\)/g,"$1")}{${r(o,e,s).rules}}`}return t+`${n.replace(/(.?)([A-Z])/g,"$1-$2").toLowerCase()}:${o};`}),""),selectors:s}}function n(n,o){const l=o instanceof Function?o(t.theme):o,i=t.components[n]||{},u=s("automatic"===t.cssOutput?JSON.stringify([i,l]):n);return t.styles[n]=r(function(...t){const s={};for(const r of t)for(const t in r){const n=e(s[t],r[t]);void 0!==n&&(s[t]=n)}return s}(i,l),u),t.styles[n].selectors}function o(e){const n=e instanceof Function?e(t.theme):e,o=s(JSON.stringify(n)),{rules:l}=r(n);o in t.styles||(t.styles.__globals={rules:(t.styles.__globals?.rules||"")+l,selectors:{}},t.styles[o]={rules:"",selectors:{}})}export{o as createGlobalStyles,n as createStyles};
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../src/core/style.ts"],"sourcesContent":[null],"names":["hash","str","l","r","char","i","length","charCodeAt","Math","imul","toString","slice","padStart","rulesToString","ruleset","postfix","selectors","rules","Object","entries","reduce","attr","value","split","prefixed","seg","test","name","replace","toLowerCase","createStyles","key","styles","Function","GLOBAL_CONTEXT","theme","override","components","hashKey","cssOutput","JSON","stringify","merged","selector","mergeRecursive","undefined","mergeStyles","createGlobalStyles","__globals","_a"],"mappings":"yFAKA,SAASA,EAAKC,GACV,IAAIC,EAAI,WAAYC,EAAI,WACxB,IAAK,IAAWC,EAAPC,EAAI,EAASA,EAAIJ,EAAIK,OAAQD,IAClCD,EAAOH,EAAIM,WAAWF,GAEtBH,EAAIM,KAAKC,KAAKP,EAAIE,EAAM,YACxBD,EAAIK,KAAKC,KAAKN,EAAIC,EAAM,YAO5B,OAJAF,EAAIM,KAAKC,KAAKP,EAAKA,IAAM,GAAK,YAAcM,KAAKC,KAAKN,EAAKA,IAAM,GAAK,YACtEA,EAAIK,KAAKC,KAAKN,EAAKA,IAAM,GAAK,YAAcK,KAAKC,KAAKP,EAAKA,IAAM,GAAK,YAEtEA,EAAI,YAAc,QAAUC,IAAMD,IAAM,GACjCA,EAAEQ,SAAS,IAAIC,OAAM,GAAIC,SAAS,EAAG,IAChD,CAeA,SAASC,EAAcC,EAAqFC,EAAkBC,EAAuB,CAAA,GAyBjJ,MAAO,CAAEC,MAxBKC,OAAOC,QAAQL,GAASM,QAAO,C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C9B/B,gBAAQgC,EAAAf,EAAeF,OAAOgB,gCAAW/B,QAAS,IAAMA,EACxDD,UAAW,CAAA,GAEfkB,EAAeF,OAAOD,GAAO,CACzBd,MAAO,GACPD,UAAW,CAAA,GAGvB"}
1
+ {"version":3,"file":"style.js","sources":["../../../src/core/style.ts"],"sourcesContent":[null],"names":["hash","str","l","r","char","i","length","charCodeAt","Math","imul","toString","slice","padStart","rulesToString","ruleset","postfix","selectors","rules","Object","entries","reduce","attr","value","split","prefixed","seg","test","name","replace","toLowerCase","createStyles","key","styles","Function","GLOBAL_CONTEXT","theme","override","components","hashKey","cssOutput","JSON","stringify","merged","selector","mergeRecursive","undefined","mergeStyles","createGlobalStyles","__globals"],"mappings":"yFAKA,SAASA,EAAKC,GACV,IAAIC,EAAI,WAAYC,EAAI,WACxB,IAAK,IAAWC,EAAPC,EAAI,EAASA,EAAIJ,EAAIK,OAAQD,IAClCD,EAAOH,EAAIM,WAAWF,GAEtBH,EAAIM,KAAKC,KAAKP,EAAIE,EAAM,YACxBD,EAAIK,KAAKC,KAAKN,EAAIC,EAAM,YAO5B,OAJAF,EAAIM,KAAKC,KAAKP,EAAKA,IAAM,GAAK,YAAcM,KAAKC,KAAKN,EAAKA,IAAM,GAAK,YACtEA,EAAIK,KAAKC,KAAKN,EAAKA,IAAM,GAAK,YAAcK,KAAKC,KAAKP,EAAKA,IAAM,GAAK,YAEtEA,EAAI,YAAc,QAAUC,IAAMD,IAAM,GACjCA,EAAEQ,SAAS,IAAIC,OAAM,GAAIC,SAAS,EAAG,IAChD,CAeA,SAASC,EAAcC,EAAqFC,EAAkBC,EAAuB,CAAA,GAyBjJ,MAAO,CAAEC,MAxBKC,OAAOC,QAAQL,GAASM,QAAO,CAACnB,GAAMoB,EAAMC,MACtD,GAAIA,QAAuC,OAAOrB,EAElD,GAAqB,iBAAVqB,EAAoB,CAe3B,OAAOrB,EAAM,IAdKc,EACdM,EAAKE,MAAM,2CACNH,QAAO,CAACI,EAAUC,KACf,G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1
- const t=(t,n=2)=>Math.round(t*Math.pow(10,n))/Math.pow(10,n),n=(t,n)=>void 0===(t="string"==typeof t?parseFloat(t):t)||isNaN(t)?n:t;function e(t,n){var e,r;null===(r=null===(e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))||void 0===e?void 0:e.set)||void 0===r||r.call(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}function r(t,n){if(void 0===t)return n;if("object"!=typeof t||null===t||Array.isArray(t))return t;const e=Object.assign({},t);for(const t in n)e[t]=r(e[t],n[t]);return e}function o(...t){return t.filter((t=>"string"==typeof t)).join(" ")}function i(t,n){const e=Object.assign({},t);for(const r in n)r in t?e[r]+=` ${n[r]}`:e[r]=n[r];return e}function a(...t){return n=>{t.forEach((t=>{t&&(t instanceof Function?t(n):t.current=n)}))}}function u(){return document.cookie.split(";").reduce(((t,n)=>{const[e,r]=n.split("=");return e&&r&&(t[decodeURIComponent(e.trim())]=decodeURIComponent(r.trim())),t}),{})}function c(t,n,e={}){e=Object.assign({path:"/",secure:!0,sameSite:"Lax"},e);const r=Object.entries(e).map((([t,n])=>("maxAge"===t&&(t="max-Age"),t=t.charAt(0).toUpperCase()+t.slice(1),"boolean"==typeof n?n?`${t};`:"":void 0===n?"":`${t}=${n};`))).join(" ");return`${t}=${n}; ${r}`}const s="a[href], button, input, textarea, [tabindex]";function l(t,n=!0){if(!t)return n?[]:null;const e=f(Array.from(t.querySelectorAll(s)),!1);return n?e:e[0]||null}function f(t,n=!0){return t.map((t=>{if(n&&!t.matches(s)){const n=t.querySelector(s);if(!n)return null;t=n}return t.hasAttribute("disabled")||"-1"===t.getAttribute("tabindex")||t.closest('[aria-hidden="true"]')?null:t})).filter((t=>null!==t))}function p(t){return`${t.map((t=>t.toString(16).padStart(2,"0"))).join("")}`}function d(t){const n=t.toLowerCase().match(/^#?([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?$/i);return n?n.slice(1,4).map((t=>parseInt(t.padStart(2,t),16))):[0,0,0]}function m([t,n,e]){n/=100,e/=100;const r=n=>(n+t/60)%6,o=t=>Math.round(255*e*(1-n*Math.max(0,Math.min(r(t),4-r(t),1))));return[o(5),o(3),o(1)]}function h([t,n,e]){t/=255,n/=255,e/=255;const r=Math.max(t,n,e),o=r-Math.min(t,n,e);let i=0;return o&&r===t&&(i=(n-e)/o),o&&r===n&&(i=2+(e-t)/o),o&&r===e&&(i=4+(t-n)/o),[60*(i<0?i+6:i),r&&o/r*100,100*r]}export{e as changeInputValue,o as classes,i as combineClasses,a as combineRefs,u as cookies,f as filterFocusable,c as formatCookie,l as getFocusable,d as hexToRgb,m as hsvToRgb,r as mergeRecursive,p as rgbToHex,h as rgbToHsv,t as round,n as toNumber};
1
+ const t=(t,n=2)=>Math.round(t*Math.pow(10,n))/Math.pow(10,n),n=(t,n)=>void 0===(t="string"==typeof t?parseFloat(t):t)||isNaN(t)?n:t;function e(t,n){Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value")?.set?.call(t,n),t.dispatchEvent(new Event("input",{bubbles:!0}))}function r(t,n){if(void 0===t)return n;if("object"!=typeof t||null===t||Array.isArray(t))return t;const e=Object.assign({},t);for(const t in n)e[t]=r(e[t],n[t]);return e}function o(...t){return t.filter((t=>"string"==typeof t)).join(" ")}function i(t,n){const e=Object.assign({},t);for(const r in n)r in t?e[r]+=` ${n[r]}`:e[r]=n[r];return e}function a(...t){return n=>{t.forEach((t=>{t&&(t instanceof Function?t(n):t.current=n)}))}}function u(){return document.cookie.split(";").reduce(((t,n)=>{const[e,r]=n.split("=");return e&&r&&(t[decodeURIComponent(e.trim())]=decodeURIComponent(r.trim())),t}),{})}function c(t,n,e={}){e=Object.assign({path:"/",secure:!0,sameSite:"Lax"},e);const r=Object.entries(e).map((([t,n])=>("maxAge"===t&&(t="max-Age"),t=t.charAt(0).toUpperCase()+t.slice(1),"boolean"==typeof n?n?`${t};`:"":void 0===n?"":`${t}=${n};`))).join(" ");return`${t}=${n}; ${r}`}const s="a[href], button, input, textarea, [tabindex]";function f(t,n=!0){if(!t)return n?[]:null;const e=l(Array.from(t.querySelectorAll(s)),!1);return n?e:e[0]||null}function l(t,n=!0){return t.map((t=>{if(n&&!t.matches(s)){const n=t.querySelector(s);if(!n)return null;t=n}return t.hasAttribute("disabled")||"-1"===t.getAttribute("tabindex")||t.closest('[aria-hidden="true"]')?null:t})).filter((t=>null!==t))}function p(t){return`${t.map((t=>t.toString(16).padStart(2,"0"))).join("")}`}function d(t){const n=t.toLowerCase().match(/^#?([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?$/i);return n?n.slice(1,4).map((t=>parseInt(t.padStart(2,t),16))):[0,0,0]}function m([t,n,e]){n/=100,e/=100;const r=n=>(n+t/60)%6,o=t=>Math.round(255*e*(1-n*Math.max(0,Math.min(r(t),4-r(t),1))));return[o(5),o(3),o(1)]}function h([t,n,e]){t/=255,n/=255,e/=255;const r=Math.max(t,n,e),o=r-Math.min(t,n,e);let i=0;return o&&r===t&&(i=(n-e)/o),o&&r===n&&(i=2+(e-t)/o),o&&r===e&&(i=4+(t-n)/o),[60*(i<0?i+6:i),r&&o/r*100,100*r]}export{e as changeInputValue,o as classes,i as combineClasses,a as combineRefs,u as cookies,l as filterFocusable,c as formatCookie,f as getFocusable,d as hexToRgb,m as hsvToRgb,r as mergeRecursive,p as rgbToHex,h as rgbToHsv,t as round,n as toNumber};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":[null],"names":["round","val","n","Math","pow","toNumber","fallback","undefined","parseFloat","isNaN","changeInputValue","input","value","_b","_a","Object","getOwnPropertyDescriptor","window","HTMLInputElement","prototype","set","call","dispatchEvent","Event","bubbles","mergeRecursive","a","b","Array","isArray","merged","assign","key","classes","args","filter","join","combineClasses","initial","override","combined","combineRefs","refs","el","forEach","ref","Function","current","cookies","document","cookie","split","reduce","decodeURIComponent","trim","formatCookie","options","path","secure","sameSite","config","entries","map","charAt","toUpperCase","slice","selector","getFocusable","element","list","elements","filterFocusable","from","querySelectorAll","types","matches","child","querySelector","hasAttribute","getAttribute","closest","rgbToHex","rgb","toString","padStart","hexToRgb","str","hex","toLowerCase","match","parseInt","hsvToRgb","h","s","v","k","f","max","min","rgbToHsv","r","g","c"],"mappings":"AAEa,MAAAA,EAAQ,CAACC,EAAaC,EAAI,IAAMC,KAAKH,MAAMC,EAAME,KAAKC,IAAI,GAAIF,IAAMC,KAAKC,IAAI,GAAIF,GAEjFG,EAAW,CAACJ,EAAUK,SAEhBC,KADfN,EAAqB,iBAARA,EAAmBO,WAAWP,GAAOA,IACtBQ,MAAMR,GAAOK,EAAWL,EAGxC,SAAAS,EAAiBC,EAAyBC,WAC4B,QAAlFC,EAA2E,QAA3EC,EAAAC,OAAOC,yBAAyBC,OAAOC,iBAAiBC,UAAW,gBAAQ,IAAAL,OAAA,EAAAA,EAAEM,WAAK,IAAAP,GAAAA,EAAAQ,KAAKV,EAAOC,GAC9FD,EAAMW,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,IACtD,CAEgB,SAAAC,EAAiCC,EAAMC,GACnD,QAAUpB,IAANmB,EAAiB,OAAOC,EAC5B,GAAiB,iBAAND,GAAwB,OAANA,GAAcE,MAAMC,QAAQH,GAAI,OAAOA,EAEpE,MAAMI,EAAcf,OAAOgB,OAAO,CAAA,EAAIL,GACtC,IAAK,MAAMM,KAAOL,EACdG,EAAOE,GAAOP,EAAeK,EAAOE,GAAML,EAAEK,IAGhD,OAAOF,CACX,CAEgB,SAAAG,KAAWC,GACvB,OAAOA,EAAKC,QAAOlC,GAAsB,iBAARA,IAAkBmC,KAAK,IAC5D,CAEgB,SAAAC,EAAeC,EAAoBC,GAC/C,MAAMC,EAAWzB,OAAOgB,OAAO,CAAA,EAAIO,GAEnC,IAAK,MAAMN,KAAOO,EACdP,KAAOM,EAAUE,EAASR,IAAQ,IAAIO,EAASP,KAASQ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+ {"version":3,"file":"utils.js","sources":["../../../src/core/utils.ts"],"sourcesContent":[null],"names":["round","val","n","Math","pow","toNumber","fallback","undefined","parseFloat","isNaN","changeInputValue","input","value","Object","getOwnPropertyDescriptor","window","HTMLInputElement","prototype","set","call","dispatchEvent","Event","bubbles","mergeRecursive","a","b","Array","isArray","merged","assign","key","classes","args","filter","join","combineClasses","initial","override","combined","combineRefs","refs","el","forEach","ref","Function","current","cookies","document","cookie","split","reduce","decodeURIComponent","trim","formatCookie","options","path","secure","sameSite","config","entries","map","charAt","toUpperCase","slice","selector","getFocusable","element","list","elements","filterFocusable","from","querySelectorAll","types","matches","child","querySelector","hasAttribute","getAttribute","closest","rgbToHex","rgb","toString","padStart","hexToRgb","str","hex","toLowerCase","match","parseInt","hsvToRgb","h","s","v","k","f","max","min","rgbToHsv","r","g","c"],"mappings":"AAEa,MAAAA,EAAQ,CAACC,EAAaC,EAAI,IAAMC,KAAKH,MAAMC,EAAME,KAAKC,IAAI,GAAIF,IAAMC,KAAKC,IAAI,GAAIF,GAEjFG,EAAW,CAACJ,EAAUK,SAEhBC,KADfN,EAAqB,iBAARA,EAAmBO,WAAWP,GAAOA,IACtBQ,MAAMR,GAAOK,EAAWL,EAGxC,SAAAS,EAAiBC,EAAyBC,GACtDC,OAAOC,yBAAyBC,OAAOC,iBAAiBC,UAAW,UAAUC,KAAKC,KAAKR,EAAOC,GAC9FD,EAAMS,cAAc,IAAIC,MAAM,QAAS,CAAEC,SAAS,IACtD,CAEgB,SAAAC,EAAiCC,EAAMC,GACnD,QAAUlB,IAANiB,EAAiB,OAAOC,EAC5B,GAAiB,iBAAND,GAAwB,OAANA,GAAcE,MAAMC,QAAQH,GAAI,OAAOA,EAEpE,MAAMI,EAAcf,OAAOgB,OAAO,CAAA,EAAIL,GACtC,IAAK,MAAMM,KAAOL,EACdG,EAAOE,GAAOP,EAAeK,EAAOE,GAAML,EAAEK,IAGhD,OAAOF,CACX,CAEgB,SAAAG,KAAWC,GACvB,OAAO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E,GAC5BA,GAAKR,IAAMO,IAAGT,EAAI,GAAKjE,EAAIyE,GAAKE,GAChCA,GAAKR,IAAMnE,IAAGiE,EAAI,GAAKQ,EAAIC,GAAKC,GAE7B,CACH,IAAMV,EAAI,EAAIA,EAAI,EAAIA,GACtBE,GAAMQ,EAAIR,EAAK,IACX,IAAJA,EAER"}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{useRef as t,useEffect as n}from"react";function e(e,r=[]){const o=t(null);return n((()=>{function t(t){var n;(null===(n=o.current)||void 0===n?void 0:n.contains(t.target))?(t.preventDefault(),t.stopPropagation()):e(t)}return window.addEventListener("click",t),()=>window.removeEventListener("click",t)}),r),o}export{e as default};
2
+ import{useRef as t,useEffect as n}from"react";function e(e,r=[]){const o=t(null);return n((()=>{function t(t){o.current?.contains(t.target)?(t.preventDefault(),t.stopPropagation()):e(t)}return window.addEventListener("click",t),()=>window.removeEventListener("click",t)}),r),o}export{e as default};
3
3
  //# sourceMappingURL=use-click-outside.js.map
@@ -1,2 +1,2 @@
1
- import{useRef as e,useEffect as r}from"react";import{getFocusable as t}from"../core/utils.js";function n(n){const o=e(null);return r((()=>{if(o.current&&n)return o.current.addEventListener("keydown",e),()=>{var r;return null===(r=o.current)||void 0===r?void 0:r.removeEventListener("keydown",e)};function e(e){var r;if("Tab"===e.key&&o.current){e.preventDefault();let n=t(o.current),u=0;n.forEach(((r,t)=>{r===document.activeElement&&(u=t+(e.shiftKey?-1:1))})),null===(r=n[(u<0?n.length+u:u)%n.length])||void 0===r||r.focus()}}}),[n]),o}export{n as default};
1
+ import{useRef as e,useEffect as t}from"react";import{getFocusable as r}from"../core/utils.js";function n(n){const o=e(null);return t((()=>{if(o.current&&n)return o.current.addEventListener("keydown",e),()=>o.current?.removeEventListener("keydown",e);function e(e){if("Tab"===e.key&&o.current){e.preventDefault();let t=r(o.current),n=0;t.forEach(((t,r)=>{t===document.activeElement&&(n=r+(e.shiftKey?-1:1))})),t[(n<0?t.length+n:n)%t.length]?.focus()}}}),[n]),o}export{n as default};
2
2
  //# sourceMappingURL=use-focus-trap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-focus-trap.js","sources":["../../../src/hooks/use-focus-trap.ts"],"sourcesContent":[null],"names":["useFocusTrap","active","ref","useRef","useEffect","current","addEventListener","keydown","_a","removeEventListener","e","key","preventDefault","elements","getFocusable","index","forEach","el","i","document","activeElement","shiftKey","length","focus"],"mappings":"8FAGwB,SAAAA,EAAoCC,GACxD,MAAMC,EAAMC,EAAU,MAuBtB,OArBAC,GAAU,KACN,GAAKF,EAAIG,SAAYJ,EAiBrB,OAFAC,EAAIG,QAAQC,iBAAiB,UAAWC,GAEjC,KAAK,IAAAC,EAAC,OAAa,QAAbA,EAAAN,EAAIG,eAAS,IAAAG,OAAA,EAAAA,EAAAC,oBAAoB,UAAWF,EAAQ,EAfjE,SAASA,EAAQG,SACb,GAAc,QAAVA,EAAEC,KAAiBT,EAAIG,QAAS,CAChCK,EAAEE,iBAEF,IAAIC,EAAWC,EAAaZ,EAAIG,SAAUU,EAAQ,EAClDF,EAASG,SAAQ,CAACC,EAAIC,KACdD,IAAOE,SAASC,gBAAeL,EAAQG,GAAKR,EAAEW,UAAW,EAAK,GAAE,IAGkB,QAAzFb,EAAAK,GAAUE,EAAQ,EAAIF,EAASS,OAASP,EAAQA,GAASF,EAASS,eAAuB,IAAAd,GAAAA,EAAEe,SAMnC,GAClE,CAACtB,IAEGC,CACX"}
1
+ {"version":3,"file":"use-focus-trap.js","sources":["../../../src/hooks/use-focus-trap.ts"],"sourcesContent":[null],"names":["useFocusTrap","active","ref","useRef","useEffect","current","addEventListener","keydown","removeEventListener","e","key","preventDefault","elements","getFocusable","index","forEach","el","i","document","activeElement","shiftKey","length","focus"],"mappings":"8FAGwB,SAAAA,EAAoCC,GACxD,MAAMC,EAAMC,EAAU,MAuBtB,OArBAC,GAAU,KACN,GAAKF,EAAIG,SAAYJ,EAiBrB,OAFAC,EAAIG,QAAQC,iBAAiB,UAAWC,GAEjC,IAAML,EAAIG,SAASG,oBAAoB,UAAWD,GAfzD,SAASA,EAAQE,GACb,GAAc,QAAVA,EAAEC,KAAiBR,EAAIG,QAAS,CAChCI,EAAEE,iBAEF,IAAIC,EAAWC,EAAaX,EAAIG,SAAUS,EAAQ,EAClDF,EAASG,SAAQ,CAACC,EAAIC,KACdD,IAAOE,SAASC,gBAAeL,EAAQG,GAAKR,EAAEW,UAAW,EAAK,GAAE,IAGvER,GAAUE,EAAQ,EAAIF,EAASS,OAASP,EAAQA,GAASF,EAASS,SAAyBC,SAMnC,GAClE,CAACrB,IAEGC,CACX"}