@clicktap/ui 0.13.0 → 0.14.11

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 (200) hide show
  1. package/assets/image-DzfFRUBL.js +3 -0
  2. package/assets/react-number-format.es-LSEUnuG5.js +1 -0
  3. package/components/Accordion/Accordion.d.ts +1 -0
  4. package/components/Accordion/Accordion.js +1 -1
  5. package/components/Accordion/index.d.ts +1 -1
  6. package/components/Accordion/index.js +1 -1
  7. package/components/Avatar/Avatar.js +1 -1
  8. package/components/Avatar/AvatarGroup/AvatarGroup.js +1 -1
  9. package/components/Avatar/index.js +1 -1
  10. package/components/Badge/Badge.js +1 -1
  11. package/components/Badge/index.js +1 -1
  12. package/components/Breadcrumbs/BreadcrumbItem.js +1 -1
  13. package/components/Breadcrumbs/BreadcrumbLink.js +1 -1
  14. package/components/Breadcrumbs/BreadcrumbSeparator.js +1 -1
  15. package/components/Breadcrumbs/Breadcrumbs.js +1 -1
  16. package/components/Breadcrumbs/index.js +1 -1
  17. package/components/Button/Button.d.ts +1 -1
  18. package/components/Button/Button.js +1 -1
  19. package/components/Button/index.js +1 -1
  20. package/components/Card/Card.js +1 -1
  21. package/components/Card/index.js +1 -1
  22. package/components/Checkbox/Checkbox.js +1 -1
  23. package/components/Checkbox/index.js +1 -1
  24. package/components/Collapsible/Collapsible.js +1 -1
  25. package/components/Collapsible/CollapsibleTrigger.js +1 -1
  26. package/components/Collapsible/index.js +1 -1
  27. package/components/Container/Container.js +1 -1
  28. package/components/Container/index.js +1 -1
  29. package/components/ContextMenu/ContextMenu.js +1 -1
  30. package/components/ContextMenu/index.js +1 -1
  31. package/components/CreditCardExpirationInput/CreditCardExpirationInput.js +1 -1
  32. package/components/CreditCardExpirationInput/index.js +1 -1
  33. package/components/CreditCardInput/CreditCardInput.js +1 -1
  34. package/components/CreditCardInput/index.js +1 -1
  35. package/components/DateInput/DateInput.js +1 -1
  36. package/components/DateInput/index.js +1 -1
  37. package/components/DateTimeFormat/DateTimeFormat.d.ts +3 -0
  38. package/components/DateTimeFormat/DateTimeFormat.js +1 -0
  39. package/components/DateTimeFormat/DateTimeFormat.types.d.ts +6 -0
  40. package/components/DateTimeFormat/index.d.ts +2 -0
  41. package/components/DateTimeFormat/index.js +1 -0
  42. package/components/Dialog/Dialog.js +1 -1
  43. package/components/Dialog/index.js +1 -1
  44. package/components/Divider/Divider.js +1 -1
  45. package/components/Divider/index.js +1 -1
  46. package/components/DobInput/DobInput.d.ts +3 -0
  47. package/components/DobInput/DobInput.js +1 -0
  48. package/components/DobInput/index.d.ts +1 -0
  49. package/components/DobInput/index.js +1 -0
  50. package/components/Drawer/Drawer.js +1 -1
  51. package/components/Drawer/index.js +1 -1
  52. package/components/Icon/Account.d.ts +3 -0
  53. package/components/Icon/Account.js +1 -0
  54. package/components/Icon/Cart.d.ts +3 -0
  55. package/components/Icon/Cart.js +1 -0
  56. package/components/Icon/Checkmark.d.ts +2 -0
  57. package/components/Icon/Checkmark.js +1 -0
  58. package/components/Icon/Cross.d.ts +3 -0
  59. package/components/Icon/Cross.js +1 -0
  60. package/components/Icon/DownArrow.d.ts +3 -0
  61. package/components/Icon/DownArrow.js +1 -0
  62. package/components/Icon/Hamburger.d.ts +3 -0
  63. package/components/Icon/Hamburger.js +1 -0
  64. package/components/Icon/Icon.types.d.ts +5 -0
  65. package/components/Icon/LinkArrow.d.ts +3 -0
  66. package/components/Icon/LinkArrow.js +1 -0
  67. package/components/Icon/Minus.d.ts +2 -0
  68. package/components/Icon/Minus.js +1 -0
  69. package/components/Icon/Plus.d.ts +2 -0
  70. package/components/Icon/Plus.js +1 -0
  71. package/components/Icon/Search.d.ts +3 -0
  72. package/components/Icon/Search.js +1 -0
  73. package/components/Icon/Trash.d.ts +2 -0
  74. package/components/Icon/Trash.js +1 -0
  75. package/components/Icon/Verified.d.ts +2 -0
  76. package/components/Icon/Verified.js +1 -0
  77. package/components/Icon/index.d.ts +13 -0
  78. package/components/Icon/index.js +1 -0
  79. package/components/Image/Image.d.ts +3 -0
  80. package/components/Image/Image.js +1 -0
  81. package/components/Image/index.d.ts +1 -0
  82. package/components/Image/index.js +1 -0
  83. package/components/Input/Input.d.ts +1 -1
  84. package/components/Input/Input.js +1 -1
  85. package/components/Input/Input.types.d.ts +3 -2
  86. package/components/Input/index.js +1 -1
  87. package/components/Link/Link.d.ts +2 -2
  88. package/components/Link/Link.js +1 -1
  89. package/components/Link/index.js +1 -1
  90. package/components/Loader/CircularEasing.js +1 -1
  91. package/components/Loader/Pulse.js +1 -1
  92. package/components/Loader/index.js +1 -1
  93. package/components/Menu/ContextMenu.d.ts +3 -0
  94. package/components/Menu/ContextMenu.js +1 -0
  95. package/components/Menu/Menu.d.ts +3 -0
  96. package/components/Menu/Menu.js +1 -0
  97. package/components/Menu/Menu.types.d.ts +33 -0
  98. package/components/Menu/index.d.ts +3 -0
  99. package/components/Menu/index.js +1 -0
  100. package/components/Meter/Meter.js +1 -1
  101. package/components/Meter/index.js +1 -1
  102. package/components/Modal/Modal.js +1 -1
  103. package/components/Modal/index.js +1 -1
  104. package/components/ModalOverlay/ModalOverlay.js +1 -1
  105. package/components/ModalOverlay/index.js +1 -1
  106. package/components/NumberFormat/NumberFormat.d.ts +3 -0
  107. package/components/NumberFormat/NumberFormat.js +1 -0
  108. package/components/NumberFormat/NumberFormat.types.d.ts +7 -0
  109. package/components/NumberFormat/index.d.ts +2 -0
  110. package/components/NumberFormat/index.js +1 -0
  111. package/components/NumberInput/NumberInput.js +1 -1
  112. package/components/NumberInput/index.js +1 -1
  113. package/components/NumberTicker/DigitResolver.d.ts +3 -0
  114. package/components/NumberTicker/DigitResolver.js +1 -0
  115. package/components/NumberTicker/DigitResolver.types.d.ts +12 -0
  116. package/components/NumberTicker/NumberTicker.d.ts +3 -0
  117. package/components/NumberTicker/NumberTicker.js +1 -0
  118. package/components/NumberTicker/NumberTicker.types.d.ts +88 -0
  119. package/components/NumberTicker/hooks/useColumnTransition.d.ts +7 -0
  120. package/components/NumberTicker/hooks/useColumnTransition.js +1 -0
  121. package/components/NumberTicker/hooks/useNumberDelta.d.ts +2 -0
  122. package/components/NumberTicker/hooks/useNumberDelta.js +1 -0
  123. package/components/NumberTicker/hooks/useNumberTicker.d.ts +6 -0
  124. package/components/NumberTicker/hooks/useNumberTicker.js +1 -0
  125. package/components/NumberTicker/index.d.ts +4 -0
  126. package/components/NumberTicker/index.js +1 -0
  127. package/components/Pagination/Pagination.d.ts +3 -0
  128. package/components/Pagination/Pagination.js +1 -0
  129. package/components/Pagination/index.d.ts +1 -0
  130. package/components/Pagination/index.js +1 -0
  131. package/components/PasswordCheck/PasswordCheck.d.ts +3 -0
  132. package/components/PasswordCheck/PasswordCheck.js +1 -0
  133. package/components/PasswordCheck/PasswordCheck.types.d.ts +4 -0
  134. package/components/PasswordCheck/PasswordCheck.utils.d.ts +9 -0
  135. package/components/PasswordCheck/PasswordCheck.utils.js +1 -0
  136. package/components/PasswordCheck/index.d.ts +1 -0
  137. package/components/PasswordCheck/index.js +1 -0
  138. package/components/PhoneInput/PhoneInput.d.ts +23 -0
  139. package/components/PhoneInput/PhoneInput.js +1 -0
  140. package/components/PhoneInput/index.d.ts +1 -0
  141. package/components/PhoneInput/index.js +1 -0
  142. package/components/PinInput/PinInput.js +1 -1
  143. package/components/PinInput/index.js +1 -1
  144. package/components/Progressbar/CircularProgressbar.js +1 -1
  145. package/components/Progressbar/LinearProgressbar.js +1 -1
  146. package/components/Progressbar/index.js +1 -1
  147. package/components/Radio/Radio.js +1 -1
  148. package/components/Radio/index.js +1 -1
  149. package/components/RadioGroup/RadioGroup.d.ts +3 -0
  150. package/components/RadioGroup/RadioGroup.js +1 -0
  151. package/components/RadioGroup/RadioGroup.types.d.ts +6 -0
  152. package/components/RadioGroup/index.d.ts +2 -0
  153. package/components/RadioGroup/index.js +1 -0
  154. package/components/Select/Option.js +1 -1
  155. package/components/Select/Select.js +1 -1
  156. package/components/Select/index.js +1 -1
  157. package/components/Skeleton/Skeleton.d.ts +3 -0
  158. package/components/Skeleton/Skeleton.js +1 -0
  159. package/components/Skeleton/Skeleton.types.d.ts +3 -0
  160. package/components/Skeleton/index.d.ts +2 -0
  161. package/components/Skeleton/index.js +1 -0
  162. package/components/Slider/Slider.js +1 -1
  163. package/components/Slider/index.js +1 -1
  164. package/components/Switch/Switch.js +1 -1
  165. package/components/Switch/index.js +1 -1
  166. package/components/Table/Table.d.ts +3 -0
  167. package/components/Table/Table.js +1 -0
  168. package/components/Table/Table.types.d.ts +16 -0
  169. package/components/Table/index.d.ts +2 -0
  170. package/components/Table/index.js +1 -0
  171. package/components/Tabs/Tab.js +1 -1
  172. package/components/Tabs/TabList.js +1 -1
  173. package/components/Tabs/TabPanel.js +1 -1
  174. package/components/Tabs/Tabs.context.d.ts +3 -0
  175. package/components/Tabs/Tabs.context.js +1 -0
  176. package/components/Tabs/Tabs.d.ts +7 -2
  177. package/components/Tabs/Tabs.js +1 -1
  178. package/components/Tabs/index.d.ts +2 -1
  179. package/components/Tabs/index.js +1 -1
  180. package/components/TimeInput/TimeInput.js +1 -1
  181. package/components/TimeInput/index.js +1 -1
  182. package/components/ToggleButton/ToggleButton.js +1 -1
  183. package/components/ToggleButton/index.js +1 -1
  184. package/components/Tooltip/Tooltip.js +1 -1
  185. package/components/Tooltip/index.js +1 -1
  186. package/components/UploadImage/UploadImage.d.ts +3 -0
  187. package/components/UploadImage/UploadImage.js +1 -0
  188. package/components/UploadImage/UploadImage.types.d.ts +14 -0
  189. package/components/UploadImage/index.d.ts +2 -0
  190. package/components/UploadImage/index.js +1 -0
  191. package/hooks/useIsClient.d.ts +2 -0
  192. package/hooks/useIsClient.js +1 -0
  193. package/package.json +8 -12
  194. package/utils/breakpoint.d.ts +8 -0
  195. package/utils/breakpoint.js +1 -0
  196. package/utils/cn.js +1 -1
  197. package/assets/cn-CytzSlOG.js +0 -1
  198. package/assets/react-number-format.es-DAlzZXlB.js +0 -1
  199. package/utils/defaultTheme.d.ts +0 -501
  200. package/utils/defaultTheme.js +0 -1
@@ -0,0 +1 @@
1
+ import{jsxs as e,jsx as o}from"react/jsx-runtime";import{cn as n}from"../../utils/cn.js";function d({className:r,...t}){return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",className:n("",r),...t,children:[o("path",{d:"M9.16667 15.8333C12.8486 15.8333 15.8333 12.8486 15.8333 9.16667C15.8333 5.48477 12.8486 2.5 9.16667 2.5C5.48477 2.5 2.5 5.48477 2.5 9.16667C2.5 12.8486 5.48477 15.8333 9.16667 15.8333Z",stroke:"#20293A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M17.5001 17.5013L13.9167 13.918",stroke:"#20293A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}export{d as Search,d as default};
@@ -0,0 +1,2 @@
1
+ export declare function Trash(): import("react/jsx-runtime").JSX.Element;
2
+ export default Trash;
@@ -0,0 +1 @@
1
+ import{jsxs as h,jsx as i}from"react/jsx-runtime";function t(){return h("svg",{width:"14",height:"18",viewBox:"0 0 14 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[i("g",{clipPath:"url(#clip0_1432_3747)",children:i("path",{d:"M1 16C1 17.1 1.9 18 3 18H11C12.1 18 13 17.1 13 16V4H1V16ZM3 6H11V16H3V6ZM10.5 1L9.5 0H4.5L3.5 1H0V3H14V1H10.5Z",fill:"white"})}),i("defs",{children:i("clipPath",{id:"clip0_1432_3747",children:i("rect",{width:"14",height:"18",fill:"white"})})})]})}export{t as Trash,t as default};
@@ -0,0 +1,2 @@
1
+ export declare function Verified(): import("react/jsx-runtime").JSX.Element;
2
+ export default Verified;
@@ -0,0 +1 @@
1
+ import{jsx as r}from"react/jsx-runtime";function e(){return r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",fill:"none",viewBox:"0 0 21 21",children:r("path",{fill:"currentColor",d:"M10.5 0a10.5 10.5 0 1 0 0 21 10.5 10.5 0 0 0 0-21ZM8.4 15.8l-5.3-5.3L4.7 9l3.8 3.8 8-8 1.5 1.5-9.5 9.4Z"})})}export{e as Verified,e as default};
@@ -0,0 +1,13 @@
1
+ export { Account } from './Account';
2
+ export { Cart } from './Cart';
3
+ export { Checkmark } from './Checkmark';
4
+ export { Cross } from './Cross';
5
+ export { DownArrow } from './DownArrow';
6
+ export { Hamburger } from './Hamburger';
7
+ export { LinkArrow } from './LinkArrow';
8
+ export { Minus } from './Minus';
9
+ export { Plus } from './Plus';
10
+ export { Search } from './Search';
11
+ export { Trash } from './Trash';
12
+ export { Verified } from './Verified';
13
+ export type { IconProps } from './Icon.types';
@@ -0,0 +1 @@
1
+ import{Account as t}from"./Account.js";import{Cart as f}from"./Cart.js";import{Checkmark as i}from"./Checkmark.js";import{Cross as s}from"./Cross.js";import{DownArrow as n}from"./DownArrow.js";import{Hamburger as h}from"./Hamburger.js";import{LinkArrow as w}from"./LinkArrow.js";import{Minus as C}from"./Minus.js";import{Plus as d}from"./Plus.js";import{Search as l}from"./Search.js";import{Trash as H}from"./Trash.js";import{Verified as M}from"./Verified.js";import"react/jsx-runtime";import"../../utils/cn.js";export{t as Account,f as Cart,i as Checkmark,s as Cross,n as DownArrow,h as Hamburger,w as LinkArrow,C as Minus,d as Plus,l as Search,H as Trash,M as Verified};
@@ -0,0 +1,3 @@
1
+ import { ImageProps } from 'next/image';
2
+ export declare function Image({ src, className, ...rest }: ImageProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Image;
@@ -0,0 +1 @@
1
+ import{jsx as g}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{N as u}from"../../assets/image-DzfFRUBL.js";import{cn as p}from"../../utils/cn.js";import"react-dom";function j({src:e,className:a,...s}){const[i,m]=t(!0),[n,o]=t(e),[l,f]=t(!1);return r(()=>o(e),[e]),r(()=>f(!0),[]),g(u,{src:n,className:p("transition-[filter] ease-linear duration-200",l&&i&&"blur-md",a),onError:()=>o("/images/placeholder.jpg"),onLoad:()=>m(!1),...s})}export{j as Image,j as default};
@@ -0,0 +1 @@
1
+ export { Image } from './Image';
@@ -0,0 +1 @@
1
+ import{Image as a}from"./Image.js";import"react/jsx-runtime";import"react";import"../../assets/image-DzfFRUBL.js";import"react-dom";import"../../utils/cn.js";export{a as Image};
@@ -1,3 +1,3 @@
1
1
  import { InputProps } from './Input.types';
2
- export declare function Input({ label, description, errorMessage, placeholder, className, classNames, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
3
3
  export default Input;
@@ -1 +1 @@
1
- import{jsxs as x,jsx as r}from"react/jsx-runtime";import{TextField as f,Label as b,Input as p,Text as h,FieldError as v}from"react-aria-components";import{c as t}from"../../assets/cn-CytzSlOG.js";function a({label:o,description:d,errorMessage:i,placeholder:l,className:n,classNames:e,...u}){return x(f,{className:t("flex flex-col w-full text-slate-900",n),...u,children:[r(b,{className:t("flex text-slate-500 text-sm",e==null?void 0:e.label),children:o}),r(p,{placeholder:l,className:t("border-solid border border-slate-300 rounded-md","text-sm text-slate-900 placeholder-slate-400","h-10 px-2 py-0 m-0 w-full","bg-white","transition-all duration-200 ease-in-out","hover:border-slate-400","focus:outline-2 focus:outline focus:outline-slate-200 focus:border-slate-400","disabled:border-slate-200 disabled:bg-slate-100","invalid:border-red-500 invalid:bg-red-100 invalid:text-red-600","invalid:hover:border-red-600 invalid:focus:border-red-600 invalid:focus:outline-red-200",e==null?void 0:e.input)}),d&&r(h,{className:t("flex text-slate-500 text-sm",e==null?void 0:e.description),slot:"description",children:d}),r(v,{className:t("flex text-red-500 text-sm",e==null?void 0:e.error),children:i})]})}export{a as Input,a as default};
1
+ import{jsxs as n,jsx as r}from"react/jsx-runtime";import{Label as u,TextField as h,Input as v,Text as w,FieldError as I}from"react-aria-components";import{forwardRef as g}from"react";import{cn as e}from"../../utils/cn.js";import{Skeleton as k}from"../Skeleton/Skeleton.js";import{useIsClient as C}from"../../hooks/useIsClient.js";function j({className:o}){return r(k,{className:e("w-full h-10 rounded-md z-20 relative",o)})}const R=g(({inputProps:o,label:i,description:d,errorMessage:f,placeholder:x,className:l,classNames:t,...p},b)=>C()?n(h,{className:e("flex flex-col w-full text-slate-900",l),...p,children:[r(u,{className:e("flex text-slate-500 text-xs",t==null?void 0:t.label),children:i}),r(v,{ref:b,placeholder:x,className:e("border-solid border border-slate-300 rounded-md","text-sm text-slate-900 placeholder-slate-400","h-10 px-2 py-0 m-0 w-full","bg-white","transition-all duration-200 ease-in-out","hover:border-slate-400","focus:outline-2 focus:outline focus:outline-slate-200 focus:border-slate-400","disabled:border-slate-200 disabled:bg-slate-100","invalid:border-red-500 invalid:bg-red-100 invalid:text-red-600","invalid:hover:border-red-600 invalid:focus:border-red-600 invalid:focus:outline-red-200",t==null?void 0:t.input),...o}),d&&r(w,{className:e("flex text-slate-500 text-sm",t==null?void 0:t.description),slot:"description",children:d}),r(I,{className:e("flex text-red-500 text-sm",t==null?void 0:t.error),children:f})]}):n("div",{className:e("flex flex-col w-full text-slate-900",l),children:[i?r(u,{className:e("flex text-slate-500 text-xs",t==null?void 0:t.label),children:i}):null,r(j,{className:t==null?void 0:t.skeleton})]}));export{R as Input,R as default};
@@ -1,9 +1,10 @@
1
- import { TextFieldProps, ValidationResult } from 'react-aria-components';
1
+ import { InputProps as AriaInputProps, TextFieldProps, ValidationResult } from 'react-aria-components';
2
2
  import { SlotsToClasses } from '../../types/SlotsToClasses';
3
3
  export interface InputProps extends TextFieldProps {
4
4
  label?: string;
5
5
  description?: string;
6
6
  errorMessage?: string | ((validation: ValidationResult) => string);
7
7
  placeholder?: string;
8
- classNames?: SlotsToClasses<'label' | 'input' | 'description' | 'error'>;
8
+ classNames?: SlotsToClasses<'label' | 'input' | 'description' | 'error' | 'skeleton'>;
9
+ inputProps?: AriaInputProps;
9
10
  }
@@ -1 +1 @@
1
- import{Input as i}from"./Input.js";import"react/jsx-runtime";import"react-aria-components";import"../../assets/cn-CytzSlOG.js";export{i as Input};
1
+ import{Input as n}from"./Input.js";import"react/jsx-runtime";import"react-aria-components";import"react";import"../../utils/cn.js";import"../Skeleton/Skeleton.js";import"../../hooks/useIsClient.js";export{n as Input};
@@ -1,3 +1,3 @@
1
- import { LinkProps } from './Link.types';
2
- export declare function Link({ children, isDisabled, className, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
1
+ /// <reference types="react" />
2
+ export declare const Link: import('react').ForwardRefExoticComponent<import('react-aria-components').LinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
3
3
  export default Link;
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{Link as s}from"react-aria-components";import{c as i}from"../../assets/cn-CytzSlOG.js";function u({children:t,isDisabled:e,className:r,...a}){return o(s,{...a,isDisabled:e,className:i("cursor-pointer","text-slate-500","no-underline","transition-colors duration-300","hover:text-slate-800",['data-[disabled="true"]:cursor-default','data-[disabled="true"]:text-slate-300','data-[disabled="true"]:hover:text-slate-300'],r),children:t})}export{u as Link,u as default};
1
+ import{jsx as s}from"react/jsx-runtime";import{forwardRef as i}from"react";import{Link as d}from"react-aria-components";import{cn as l}from"../../utils/cn.js";const c=i(({children:t,isDisabled:e,className:r,...a},o)=>s(d,{...a,isDisabled:e,className:l("flex items-center cursor-pointer","text-slate-500","no-underline","transition-colors duration-300","hover:text-slate-800",['data-[disabled="true"]:cursor-default','data-[disabled="true"]:text-slate-300','data-[disabled="true"]:hover:text-slate-300'],r),ref:o,children:t}));export{c as Link,c as default};
@@ -1 +1 @@
1
- import{Link as t}from"./Link.js";import"react/jsx-runtime";import"react-aria-components";import"../../assets/cn-CytzSlOG.js";export{t as Link};
1
+ import{Link as e}from"./Link.js";import"react/jsx-runtime";import"react";import"react-aria-components";import"../../utils/cn.js";export{e as Link};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{motion as r}from"framer-motion";import{c as t}from"../../assets/cn-CytzSlOG.js";function d({width:a,stroke:i,strokeLinecap:s="round",strokeWidth:n=5,className:o,style:l,...c}){return e("div",{style:{"--circularWidth":`${a}px`,...l},...c,className:t("relative","m-0","w-[--circularWidth]","aspect-square",o),children:e(r.svg,{animate:{transform:"rotate(360deg)",transition:{repeat:1/0,duration:2,ease:"linear"}},viewBox:"25 25 50 50",className:t("w-full h-full","absolute inset-x-0 inset-y-0","origin-center","m-auto"),children:e(r.circle,{animate:{strokeDasharray:["1, 200","89, 200","89, 200"],strokeDashoffset:[0,-35,-124],transition:{repeat:1/0,duration:1.5,ease:"easeInOut"}},className:"path",cx:"50",cy:"50",fill:"none",r:"20",strokeDasharray:"1, 200",strokeDashoffset:"0",stroke:i,strokeLinecap:s,strokeMiterlimit:"10",strokeWidth:n})})})}export{d as CircularEasing,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{motion as r}from"framer-motion";import{cn as t}from"../../utils/cn.js";function d({width:a,stroke:i,strokeLinecap:s="round",strokeWidth:n=5,className:o,style:l,...c}){return e("div",{style:{"--circularWidth":`${a}px`,...l},...c,className:t("relative","m-0","w-[--circularWidth]","aspect-square",o),children:e(r.svg,{animate:{transform:"rotate(360deg)",transition:{repeat:1/0,duration:2,ease:"linear"}},viewBox:"25 25 50 50",className:t("w-full h-full","absolute inset-x-0 inset-y-0","origin-center","m-auto"),children:e(r.circle,{animate:{strokeDasharray:["1, 200","89, 200","89, 200"],strokeDashoffset:[0,-35,-124],transition:{repeat:1/0,duration:1.5,ease:"easeInOut"}},className:"path",cx:"50",cy:"50",fill:"none",r:"20",strokeDasharray:"1, 200",strokeDashoffset:"0",stroke:i,strokeLinecap:s,strokeMiterlimit:"10",strokeWidth:n})})})}export{d as CircularEasing,d as default};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{motion as i}from"framer-motion";import{c as t}from"../../assets/cn-CytzSlOG.js";function p({classNames:r}){return o("span",{className:t(r==null?void 0:r.base),children:Array.from(new Array(3)).map((e,n)=>o(i.div,{animate:{opacity:[1,1,.7,1,1],transform:["scale(1)","scale(1)","scale(0.1)","scale(1)","scale(1)"],transition:{repeat:1/0,duration:.75,delay:n*.1}},className:t("bg-slate-300","inline-block","w-2","h-2","m-0.5","rounded-lg",r==null?void 0:r.dot)},n))})}export{p as Pulse,p as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{motion as i}from"framer-motion";import{cn as t}from"../../utils/cn.js";function a({classNames:r}){return o("span",{className:t(r==null?void 0:r.base),children:Array.from(new Array(3)).map((e,n)=>o(i.div,{animate:{opacity:[1,1,.7,1,1],transform:["scale(1)","scale(1)","scale(0.1)","scale(1)","scale(1)"],transition:{repeat:1/0,duration:.75,delay:n*.1}},className:t("bg-slate-300","inline-block","w-2","h-2","m-0.5","rounded-lg",r==null?void 0:r.dot)},n))})}export{a as Pulse,a as default};
@@ -1 +1 @@
1
- import{CircularEasing as t}from"./CircularEasing.js";import{Pulse as a}from"./Pulse.js";import"react/jsx-runtime";import"framer-motion";import"../../assets/cn-CytzSlOG.js";export{t as CircularEasing,a as Pulse};
1
+ import{CircularEasing as t}from"./CircularEasing.js";import{Pulse as a}from"./Pulse.js";import"react/jsx-runtime";import"framer-motion";import"../../utils/cn.js";export{t as CircularEasing,a as Pulse};
@@ -0,0 +1,3 @@
1
+ import { MenuProps } from './Menu.types';
2
+ export declare function ContextMenu({ slots, role, arrow, ...rest }: MenuProps): import("react/jsx-runtime").JSX.Element;
3
+ export default ContextMenu;
@@ -0,0 +1 @@
1
+ import{jsx as i}from"react/jsx-runtime";import{cloneElement as r}from"react";import{AnimatePresence as p}from"framer-motion";import{cn as a}from"../../utils/cn.js";import{Menu as d}from"./Menu.js";import"react-dom";function C({slots:n,role:u="tooltip",arrow:e,...m}){const o={width:24,height:8,className:a("fill-slate-50",e==null?void 0:e.className),...e},t=n!=null&&n.submenu?r(n==null?void 0:n.submenu,{...n.submenu.props}):null,c=n!=null&&n.contentRoot?r(n.contentRoot,{...n.contentRoot.props},t):i("div",{className:"relative rounded-md py-4 px-6 bg-gray-50 shadow",children:t});return i(p,{children:i(d,{role:u,arrow:o,hidden:{opacity:0,y:-5,visibility:"hidden",transition:{type:"spring",duration:.3,bounce:0}},visible:{opacity:1,y:0,visibility:"visible",transition:{type:"spring",duration:.75,bounce:0,staggerChildren:.075,delayChildren:.1}},slots:{submenu:c,submenuRoot:n==null?void 0:n.submenuRoot,content:n==null?void 0:n.content},...m})})}export{C as ContextMenu,C as default};
@@ -0,0 +1,3 @@
1
+ import { MenuProps } from './Menu.types';
2
+ export declare function Menu({ closeDelay, offset, openDelay, placement, slots, trigger, withArrow, arrow, role, visible, hidden, floatingOptions, isOpen, onOpenChange, }: MenuProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Menu;
@@ -0,0 +1 @@
1
+ import{jsx as Ce,jsxs as Ve,Fragment as xt}from"react/jsx-runtime";import*as d from"react";import{useLayoutEffect as tt,useEffect as nt,useRef as ot,useState as bt,useId as Et,cloneElement as Rt}from"react";import{motion as Ct}from"framer-motion";import*as Pt from"react-dom";function rt(e){return it(e)?(e.nodeName||"").toLowerCase():"#document"}function se(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Tt(e){var t;return(t=(it(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function it(e){return e instanceof Node||e instanceof se(e).Node}function _(e){return e instanceof Element||e instanceof se(e).Element}function xe(e){return e instanceof HTMLElement||e instanceof se(e).HTMLElement}function Se(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof se(e).ShadowRoot}function Ot(e){return["html","body","#document"].includes(rt(e))}function At(e){return se(e).getComputedStyle(e)}function St(e){if(rt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Se(e)&&e.host||Tt(e);return Se(t)?t.host:t}function Dt(e){let t=e.activeElement;for(;((o=t)==null||(n=o.shadowRoot)==null?void 0:n.activeElement)!=null;){var o,n;t=t.shadowRoot.activeElement}return t}function ie(e,t){if(!e||!t)return!1;const o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&Se(o)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Lt(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:o,version:n}=t;return o+"/"+n}).join(" "):navigator.userAgent}function Mt(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Lt())||t.test(kt()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ft(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function pe(e,t){const o=["mouse","pen"];return t||o.push("",void 0),o.includes(e)}function $t(e){return"nativeEvent"in e}function It(e){return e.matches("html,body")}function j(e){return(e==null?void 0:e.ownerDocument)||document}function ae(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const o=e;return o.target!=null&&t.contains(o.target)}function Nt(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _t="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Bt(e){return xe(e)&&e.matches(_t)}const ee=Math.min,G=Math.max,he=Math.round,fe=Math.floor,U=e=>({x:e,y:e}),Wt={left:"right",right:"left",bottom:"top",top:"bottom"},Ht={start:"end",end:"start"};function De(e,t,o){return G(e,ee(t,o))}function ce(e,t){return typeof e=="function"?e(t):e}function Q(e){return e.split("-")[0]}function le(e){return e.split("-")[1]}function st(e){return e==="x"?"y":"x"}function Fe(e){return e==="y"?"height":"width"}function te(e){return["top","bottom"].includes(Q(e))?"y":"x"}function $e(e){return st(te(e))}function Vt(e,t,o){o===void 0&&(o=!1);const n=le(e),r=$e(e),i=Fe(r);let s=r==="x"?n===(o?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ve(s)),[s,ve(s)]}function Kt(e){const t=ve(e);return[Le(e),t,Le(t)]}function Le(e){return e.replace(/start|end/g,t=>Ht[t])}function jt(e,t,o){const n=["left","right"],r=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return o?t?r:n:t?n:r;case"left":case"right":return t?i:s;default:return[]}}function zt(e,t,o,n){const r=le(e);let i=jt(Q(e),o==="start",n);return r&&(i=i.map(s=>s+"-"+r),t&&(i=i.concat(i.map(Le)))),i}function ve(e){return e.replace(/left|right|bottom|top/g,t=>Wt[t])}function Xt(e){return{top:0,right:0,bottom:0,left:0,...e}}function ct(e){return typeof e!="number"?Xt(e):{top:e,right:e,bottom:e,left:e}}function ye(e){const{x:t,y:o,width:n,height:r}=e;return{width:n,height:r,top:o,left:t,right:t+n,bottom:o+r,x:t,y:o}}function Ke(e,t,o){let{reference:n,floating:r}=e;const i=te(t),s=$e(t),c=Fe(s),l=Q(t),u=i==="y",a=n.x+n.width/2-r.width/2,m=n.y+n.height/2-r.height/2,p=n[c]/2-r[c]/2;let f;switch(l){case"top":f={x:a,y:n.y-r.height};break;case"bottom":f={x:a,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:m};break;case"left":f={x:n.x-r.width,y:m};break;default:f={x:n.x,y:n.y}}switch(le(t)){case"start":f[s]-=p*(o&&u?-1:1);break;case"end":f[s]+=p*(o&&u?-1:1);break}return f}const Yt=async(e,t,o)=>{const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:s}=o,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:r}),{x:a,y:m}=Ke(u,n,l),p=n,f={},h=0;for(let g=0;g<c.length;g++){const{name:R,fn:w}=c[g],{x:b,y:P,data:v,reset:x}=await w({x:a,y:m,initialPlacement:n,placement:p,strategy:r,middlewareData:f,rects:u,platform:s,elements:{reference:e,floating:t}});a=b??a,m=P??m,f={...f,[R]:{...f[R],...v}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(u=x.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:r}):x.rects),{x:a,y:m}=Ke(u,p,l)),g=-1)}return{x:a,y:m,placement:p,strategy:r,middlewareData:f}};async function lt(e,t){var o;t===void 0&&(t={});const{x:n,y:r,platform:i,rects:s,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:a="viewport",elementContext:m="floating",altBoundary:p=!1,padding:f=0}=ce(t,e),h=ct(f),R=c[p?m==="floating"?"reference":"floating":m],w=ye(await i.getClippingRect({element:(o=await(i.isElement==null?void 0:i.isElement(R)))==null||o?R:R.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:a,strategy:l})),b=m==="floating"?{x:n,y:r,width:s.floating.width,height:s.floating.height}:s.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),v=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},x=ye(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:P,strategy:l}):b);return{top:(w.top-x.top+h.top)/v.y,bottom:(x.bottom-w.bottom+h.bottom)/v.y,left:(w.left-x.left+h.left)/v.x,right:(x.right-w.right+h.right)/v.x}}const Ut=e=>({name:"arrow",options:e,async fn(t){const{x:o,y:n,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=t,{element:u,padding:a=0}=ce(e,t)||{};if(u==null)return{};const m=ct(a),p={x:o,y:n},f=$e(r),h=Fe(f),g=await s.getDimensions(u),R=f==="y",w=R?"top":"left",b=R?"bottom":"right",P=R?"clientHeight":"clientWidth",v=i.reference[h]+i.reference[f]-p[f]-i.floating[h],x=p[f]-i.reference[f],D=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=D?D[P]:0;(!k||!await(s.isElement==null?void 0:s.isElement(D)))&&(k=c.floating[P]||i.floating[h]);const I=v/2-x/2,$=k/2-g[h]/2-1,F=ee(m[w],$),O=ee(m[b],$),L=F,E=k-g[h]-O,y=k/2-g[h]/2+I,C=De(L,y,E),M=!l.arrow&&le(r)!=null&&y!==C&&i.reference[h]/2-(y<L?F:O)-g[h]/2<0,A=M?y<L?y-L:y-E:0;return{[f]:p[f]+A,data:{[f]:C,centerOffset:y-C-A,...M&&{alignmentOffset:A}},reset:M}}}),qt=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,n;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:a=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...R}=ce(e,t);if((o=i.arrow)!=null&&o.alignmentOffset)return{};const w=Q(r),b=te(c),P=Q(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(u.floating)),x=p||(P||!g?[ve(c)]:Kt(c)),D=h!=="none";!p&&D&&x.push(...zt(c,g,h,v));const k=[c,...x],I=await lt(t,R),$=[];let F=((n=i.flip)==null?void 0:n.overflows)||[];if(a&&$.push(I[w]),m){const y=Vt(r,s,v);$.push(I[y[0]],I[y[1]])}if(F=[...F,{placement:r,overflows:$}],!$.every(y=>y<=0)){var O,L;const y=(((O=i.flip)==null?void 0:O.index)||0)+1,C=k[y];if(C)return{data:{index:y,overflows:F},reset:{placement:C}};let M=(L=F.filter(A=>A.overflows[0]<=0).sort((A,T)=>A.overflows[1]-T.overflows[1])[0])==null?void 0:L.placement;if(!M)switch(f){case"bestFit":{var E;const A=(E=F.filter(T=>{if(D){const S=te(T.placement);return S===b||S==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(S=>S>0).reduce((S,N)=>S+N,0)]).sort((T,S)=>T[1]-S[1])[0])==null?void 0:E[0];A&&(M=A);break}case"initialPlacement":M=c;break}if(r!==M)return{reset:{placement:M}}}return{}}}};async function Gt(e,t){const{placement:o,platform:n,elements:r}=e,i=await(n.isRTL==null?void 0:n.isRTL(r.floating)),s=Q(o),c=le(o),l=te(o)==="y",u=["left","top"].includes(s)?-1:1,a=i&&l?-1:1,m=ce(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return c&&typeof h=="number"&&(f=c==="end"?h*-1:h),l?{x:f*a,y:p*u}:{x:p*u,y:f*a}}const Qt=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,n;const{x:r,y:i,placement:s,middlewareData:c}=t,l=await Gt(t,e);return s===((o=c.offset)==null?void 0:o.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},Zt=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:o,y:n,placement:r}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:R=>{let{x:w,y:b}=R;return{x:w,y:b}}},...l}=ce(e,t),u={x:o,y:n},a=await lt(t,l),m=te(Q(r)),p=st(m);let f=u[p],h=u[m];if(i){const R=p==="y"?"top":"left",w=p==="y"?"bottom":"right",b=f+a[R],P=f-a[w];f=De(b,f,P)}if(s){const R=m==="y"?"top":"left",w=m==="y"?"bottom":"right",b=h+a[R],P=h-a[w];h=De(b,h,P)}const g=c.fn({...t,[p]:f,[m]:h});return{...g,data:{x:g.x-o,y:g.y-n}}}}};function oe(e){return ut(e)?(e.nodeName||"").toLowerCase():"#document"}function B(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function z(e){var t;return(t=(ut(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ut(e){return e instanceof Node||e instanceof B(e).Node}function W(e){return e instanceof Element||e instanceof B(e).Element}function K(e){return e instanceof HTMLElement||e instanceof B(e).HTMLElement}function je(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof B(e).ShadowRoot}function ue(e){const{overflow:t,overflowX:o,overflowY:n,display:r}=H(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+o)&&!["inline","contents"].includes(r)}function Jt(e){return["table","td","th"].includes(oe(e))}function be(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ie(e){const t=Ne(),o=W(e)?H(e):e;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(o.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(o.contain||"").includes(n))}function en(e){let t=q(e);for(;K(t)&&!ne(t);){if(Ie(t))return t;if(be(t))return null;t=q(t)}return null}function Ne(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ne(e){return["html","body","#document"].includes(oe(e))}function H(e){return B(e).getComputedStyle(e)}function Ee(e){return W(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if(oe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||je(e)&&e.host||z(e);return je(t)?t.host:t}function ft(e){const t=q(e);return ne(t)?e.ownerDocument?e.ownerDocument.body:e.body:K(t)&&ue(t)?t:ft(t)}function X(e,t,o){var n;t===void 0&&(t=[]),o===void 0&&(o=!0);const r=ft(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=B(r);if(i){const c=ke(s);return t.concat(s,s.visualViewport||[],ue(r)?r:[],c&&o?X(c):[])}return t.concat(r,X(r,[],o))}function ke(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function at(e){const t=H(e);let o=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=K(e),i=r?e.offsetWidth:o,s=r?e.offsetHeight:n,c=he(o)!==i||he(n)!==s;return c&&(o=i,n=s),{width:o,height:n,$:c}}function _e(e){return W(e)?e:e.contextElement}function J(e){const t=_e(e);if(!K(t))return U(1);const o=t.getBoundingClientRect(),{width:n,height:r,$:i}=at(t);let s=(i?he(o.width):o.width)/n,c=(i?he(o.height):o.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const tn=U(0);function dt(e){const t=B(e);return!Ne()||!t.visualViewport?tn:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nn(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==B(e)?!1:t}function Z(e,t,o,n){t===void 0&&(t=!1),o===void 0&&(o=!1);const r=e.getBoundingClientRect(),i=_e(e);let s=U(1);t&&(n?W(n)&&(s=J(n)):s=J(e));const c=nn(i,o,n)?dt(i):U(0);let l=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,a=r.width/s.x,m=r.height/s.y;if(i){const p=B(i),f=n&&W(n)?B(n):n;let h=p,g=ke(h);for(;g&&n&&f!==h;){const R=J(g),w=g.getBoundingClientRect(),b=H(g),P=w.left+(g.clientLeft+parseFloat(b.paddingLeft))*R.x,v=w.top+(g.clientTop+parseFloat(b.paddingTop))*R.y;l*=R.x,u*=R.y,a*=R.x,m*=R.y,l+=P,u+=v,h=B(g),g=ke(h)}}return ye({width:a,height:m,x:l,y:u})}function on(e){let{elements:t,rect:o,offsetParent:n,strategy:r}=e;const i=r==="fixed",s=z(n),c=t?be(t.floating):!1;if(n===s||c&&i)return o;let l={scrollLeft:0,scrollTop:0},u=U(1);const a=U(0),m=K(n);if((m||!m&&!i)&&((oe(n)!=="body"||ue(s))&&(l=Ee(n)),K(n))){const p=Z(n);u=J(n),a.x=p.x+n.clientLeft,a.y=p.y+n.clientTop}return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+a.x,y:o.y*u.y-l.scrollTop*u.y+a.y}}function rn(e){return Array.from(e.getClientRects())}function mt(e){return Z(z(e)).left+Ee(e).scrollLeft}function sn(e){const t=z(e),o=Ee(e),n=e.ownerDocument.body,r=G(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=G(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-o.scrollLeft+mt(e);const c=-o.scrollTop;return H(n).direction==="rtl"&&(s+=G(t.clientWidth,n.clientWidth)-r),{width:r,height:i,x:s,y:c}}function cn(e,t){const o=B(e),n=z(e),r=o.visualViewport;let i=n.clientWidth,s=n.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const u=Ne();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:i,height:s,x:c,y:l}}function ln(e,t){const o=Z(e,!0,t==="fixed"),n=o.top+e.clientTop,r=o.left+e.clientLeft,i=K(e)?J(e):U(1),s=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,u=n*i.y;return{width:s,height:c,x:l,y:u}}function ze(e,t,o){let n;if(t==="viewport")n=cn(e,o);else if(t==="document")n=sn(z(e));else if(W(t))n=ln(t,o);else{const r=dt(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return ye(n)}function gt(e,t){const o=q(e);return o===t||!W(o)||ne(o)?!1:H(o).position==="fixed"||gt(o,t)}function un(e,t){const o=t.get(e);if(o)return o;let n=X(e,[],!1).filter(c=>W(c)&&oe(c)!=="body"),r=null;const i=H(e).position==="fixed";let s=i?q(e):e;for(;W(s)&&!ne(s);){const c=H(s),l=Ie(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||ue(s)&&!l&&gt(e,s))?n=n.filter(a=>a!==s):r=c,s=q(s)}return t.set(e,n),n}function fn(e){let{element:t,boundary:o,rootBoundary:n,strategy:r}=e;const s=[...o==="clippingAncestors"?be(t)?[]:un(t,this._c):[].concat(o),n],c=s[0],l=s.reduce((u,a)=>{const m=ze(t,a,r);return u.top=G(m.top,u.top),u.right=ee(m.right,u.right),u.bottom=ee(m.bottom,u.bottom),u.left=G(m.left,u.left),u},ze(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function an(e){const{width:t,height:o}=at(e);return{width:t,height:o}}function dn(e,t,o){const n=K(t),r=z(t),i=o==="fixed",s=Z(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=U(0);if(n||!n&&!i)if((oe(t)!=="body"||ue(r))&&(c=Ee(t)),n){const m=Z(t,!0,i,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&(l.x=mt(r));const u=s.left+c.scrollLeft-l.x,a=s.top+c.scrollTop-l.y;return{x:u,y:a,width:s.width,height:s.height}}function Pe(e){return H(e).position==="static"}function Xe(e,t){return!K(e)||H(e).position==="fixed"?null:t?t(e):e.offsetParent}function pt(e,t){const o=B(e);if(be(e))return o;if(!K(e)){let r=q(e);for(;r&&!ne(r);){if(W(r)&&!Pe(r))return r;r=q(r)}return o}let n=Xe(e,t);for(;n&&Jt(n)&&Pe(n);)n=Xe(n,t);return n&&ne(n)&&Pe(n)&&!Ie(n)?o:n||en(e)||o}const mn=async function(e){const t=this.getOffsetParent||pt,o=this.getDimensions,n=await o(e.floating);return{reference:dn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gn(e){return H(e).direction==="rtl"}const ht={convertOffsetParentRelativeRectToViewportRelativeRect:on,getDocumentElement:z,getClippingRect:fn,getOffsetParent:pt,getElementRects:mn,getClientRects:rn,getDimensions:an,getScale:J,isElement:W,isRTL:gn};function pn(e,t){let o=null,n;const r=z(e);function i(){var c;clearTimeout(n),(c=o)==null||c.disconnect(),o=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const{left:u,top:a,width:m,height:p}=e.getBoundingClientRect();if(c||t(),!m||!p)return;const f=fe(a),h=fe(r.clientWidth-(u+m)),g=fe(r.clientHeight-(a+p)),R=fe(u),b={rootMargin:-f+"px "+-h+"px "+-g+"px "+-R+"px",threshold:G(0,ee(1,l))||1};let P=!0;function v(x){const D=x[0].intersectionRatio;if(D!==l){if(!P)return s();D?s(!1,D):n=setTimeout(()=>{s(!1,1e-7)},1e3)}P=!1}try{o=new IntersectionObserver(v,{...b,root:r.ownerDocument})}catch{o=new IntersectionObserver(v,b)}o.observe(e)}return s(!0),i}function hn(e,t,o,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=_e(e),a=r||i?[...u?X(u):[],...X(t)]:[];a.forEach(w=>{r&&w.addEventListener("scroll",o,{passive:!0}),i&&w.addEventListener("resize",o)});const m=u&&c?pn(u,o):null;let p=-1,f=null;s&&(f=new ResizeObserver(w=>{let[b]=w;b&&b.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var P;(P=f)==null||P.observe(t)})),o()}),u&&!l&&f.observe(u),f.observe(t));let h,g=l?Z(e):null;l&&R();function R(){const w=Z(e);g&&(w.x!==g.x||w.y!==g.y||w.width!==g.width||w.height!==g.height)&&o(),g=w,h=requestAnimationFrame(R)}return o(),()=>{var w;a.forEach(b=>{r&&b.removeEventListener("scroll",o),i&&b.removeEventListener("resize",o)}),m==null||m(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(h)}}const vn=Qt,yn=Zt,wn=qt,Ye=Ut,xn=(e,t,o)=>{const n=new Map,r={platform:ht,...o},i={...r.platform,_c:n};return Yt(e,t,{...r,platform:i})};var de=typeof document<"u"?tt:nt;function we(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let o,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(n=o;n--!==0;)if(!we(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),o=r.length,o!==Object.keys(t).length)return!1;for(n=o;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=o;n--!==0;){const i=r[n];if(!(i==="_owner"&&e.$$typeof)&&!we(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vt(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ue(e,t){const o=vt(e);return Math.round(t*o)/o}function qe(e){const t=d.useRef(e);return de(()=>{t.current=e}),t}function bn(e){e===void 0&&(e={});const{placement:t="bottom",strategy:o="absolute",middleware:n=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[a,m]=d.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=d.useState(n);we(p,n)||f(n);const[h,g]=d.useState(null),[R,w]=d.useState(null),b=d.useCallback(A=>{A!==D.current&&(D.current=A,g(A))},[]),P=d.useCallback(A=>{A!==k.current&&(k.current=A,w(A))},[]),v=i||h,x=s||R,D=d.useRef(null),k=d.useRef(null),I=d.useRef(a),$=l!=null,F=qe(l),O=qe(r),L=d.useCallback(()=>{if(!D.current||!k.current)return;const A={placement:t,strategy:o,middleware:p};O.current&&(A.platform=O.current),xn(D.current,k.current,A).then(T=>{const S={...T,isPositioned:!0};E.current&&!we(I.current,S)&&(I.current=S,Pt.flushSync(()=>{m(S)}))})},[p,t,o,O]);de(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,m(A=>({...A,isPositioned:!1})))},[u]);const E=d.useRef(!1);de(()=>(E.current=!0,()=>{E.current=!1}),[]),de(()=>{if(v&&(D.current=v),x&&(k.current=x),v&&x){if(F.current)return F.current(v,x,L);L()}},[v,x,L,F,$]);const y=d.useMemo(()=>({reference:D,floating:k,setReference:b,setFloating:P}),[b,P]),C=d.useMemo(()=>({reference:v,floating:x}),[v,x]),M=d.useMemo(()=>{const A={position:o,left:0,top:0};if(!C.floating)return A;const T=Ue(C.floating,a.x),S=Ue(C.floating,a.y);return c?{...A,transform:"translate("+T+"px, "+S+"px)",...vt(C.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:T,top:S}},[o,c,C.floating,a.x,a.y]);return d.useMemo(()=>({...a,update:L,refs:y,elements:C,floatingStyles:M}),[a,L,y,C,M])}const En=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){const{element:n,padding:r}=typeof e=="function"?e(o):e;return n&&t(n)?n.current!=null?Ye({element:n.current,padding:r}).fn(o):{}:n?Ye({element:n,padding:r}).fn(o):{}}}},Rn=(e,t)=>({...vn(e),options:[e,t]}),Cn=(e,t)=>({...yn(e),options:[e,t]}),Pn=(e,t)=>({...wn(e),options:[e,t]}),Tn=(e,t)=>({...En(e),options:[e,t]});var Y=typeof document<"u"?tt:nt;function Me(){return Me=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},Me.apply(this,arguments)}let Te=!1,On=0;const Ge=()=>"floating-ui-"+On++;function An(){const[e,t]=d.useState(()=>Te?Ge():void 0);return Y(()=>{e==null&&t(Ge())},[]),d.useEffect(()=>{Te||(Te=!0)},[]),e}const Sn=d.useId,Be=Sn||An,Dn=d.forwardRef(function(t,o){let{context:{placement:n,elements:{floating:r},middlewareData:{arrow:i}},width:s=14,height:c=7,tipRadius:l=0,strokeWidth:u=0,staticOffset:a,stroke:m,d:p,style:{transform:f,...h}={},...g}=t;const R=Be();if(!r)return null;u*=2;const w=u/2,b=s/2*(l/-8+1),P=c/2*l/4,[v,x]=n.split("-"),D=ht.isRTL(r),k=!!p,I=v==="top"||v==="bottom",$=a&&x==="end"?"bottom":"top";let F=a&&x==="end"?"right":"left";a&&D&&(F=x==="end"?"left":"right");const O=(i==null?void 0:i.x)!=null?a||i.x:"",L=(i==null?void 0:i.y)!=null?a||i.y:"",E=p||"M0,0"+(" H"+s)+(" L"+(s-b)+","+(c-P))+(" Q"+s/2+","+c+" "+b+","+(c-P))+" Z",y={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[v];return d.createElement("svg",Me({},g,{"aria-hidden":!0,ref:o,width:k?s:s+u,height:s,viewBox:"0 0 "+s+" "+(c>s?c:s),style:{position:"absolute",pointerEvents:"none",[F]:O,[$]:L,[v]:I||k?"100%":"calc(100% - "+u/2+"px)",transform:""+y+(f??""),...h}}),u>0&&d.createElement("path",{clipPath:"url(#"+R+")",fill:"none",stroke:m,strokeWidth:u+(p?0:1),d:E}),d.createElement("path",{stroke:u&&!p?g.fill:"none",d:E}),d.createElement("clipPath",{id:R},d.createElement("rect",{x:-w,y:w*(k?-1:1),width:s+u,height:s})))});function Ln(){const e=new Map;return{emit(t,o){var n;(n=e.get(t))==null||n.forEach(r=>r(o))},on(t,o){e.set(t,[...e.get(t)||[],o])},off(t,o){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(r=>r!==o))||[])}}}const kn=d.createContext(null),Mn=d.createContext(null),yt=()=>{var e;return((e=d.useContext(kn))==null?void 0:e.id)||null},We=()=>d.useContext(Mn);function He(e){return"data-floating-ui-"+e}function Qe(e){const t=ot(e);return Y(()=>{t.current=e}),t}const Ze=He("safe-polygon");function me(e,t,o){return o&&!pe(o)?0:typeof e=="number"?e:e==null?void 0:e[t]}function Fn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,dataRef:r,events:i,elements:{domReference:s,floating:c},refs:l}=e,{enabled:u=!0,delay:a=0,handleClose:m=null,mouseOnly:p=!1,restMs:f=0,move:h=!0}=t,g=We(),R=yt(),w=Qe(m),b=Qe(a),P=d.useRef(),v=d.useRef(),x=d.useRef(),D=d.useRef(),k=d.useRef(!0),I=d.useRef(!1),$=d.useRef(()=>{}),F=d.useCallback(()=>{var y;const C=(y=r.current.openEvent)==null?void 0:y.type;return(C==null?void 0:C.includes("mouse"))&&C!=="mousedown"},[r]);d.useEffect(()=>{if(!u)return;function y(){clearTimeout(v.current),clearTimeout(D.current),k.current=!0}return i.on("dismiss",y),()=>{i.off("dismiss",y)}},[u,i]),d.useEffect(()=>{if(!u||!w.current||!o)return;function y(M){F()&&n(!1,M)}const C=j(c).documentElement;return C.addEventListener("mouseleave",y),()=>{C.removeEventListener("mouseleave",y)}},[c,o,n,u,w,r,F]);const O=d.useCallback(function(y,C){C===void 0&&(C=!0);const M=me(b.current,"close",P.current);M&&!x.current?(clearTimeout(v.current),v.current=setTimeout(()=>n(!1,y),M)):C&&(clearTimeout(v.current),n(!1,y))},[b,n]),L=d.useCallback(()=>{$.current(),x.current=void 0},[]),E=d.useCallback(()=>{if(I.current){const y=j(l.floating.current).body;y.style.pointerEvents="",y.removeAttribute(Ze),I.current=!1}},[l]);return d.useEffect(()=>{if(!u)return;function y(){return r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1}function C(T){if(clearTimeout(v.current),k.current=!1,p&&!pe(P.current)||f>0&&me(b.current,"open")===0)return;const S=me(b.current,"open",P.current);S?v.current=setTimeout(()=>{n(!0,T)},S):n(!0,T)}function M(T){if(y())return;$.current();const S=j(c);if(clearTimeout(D.current),w.current){o||clearTimeout(v.current),x.current=w.current({...e,tree:g,x:T.clientX,y:T.clientY,onClose(){E(),L(),O(T)}});const V=x.current;S.addEventListener("mousemove",V),$.current=()=>{S.removeEventListener("mousemove",V)};return}(P.current==="touch"?!ie(c,T.relatedTarget):!0)&&O(T)}function A(T){y()||w.current==null||w.current({...e,tree:g,x:T.clientX,y:T.clientY,onClose(){E(),L(),O(T)}})(T)}if(_(s)){const T=s;return o&&T.addEventListener("mouseleave",A),c==null||c.addEventListener("mouseleave",A),h&&T.addEventListener("mousemove",C,{once:!0}),T.addEventListener("mouseenter",C),T.addEventListener("mouseleave",M),()=>{o&&T.removeEventListener("mouseleave",A),c==null||c.removeEventListener("mouseleave",A),h&&T.removeEventListener("mousemove",C),T.removeEventListener("mouseenter",C),T.removeEventListener("mouseleave",M)}}},[s,c,u,e,p,f,h,O,L,E,n,o,g,b,w,r]),Y(()=>{var y;if(u&&o&&(y=w.current)!=null&&y.__options.blockPointerEvents&&F()){const A=j(c).body;if(A.setAttribute(Ze,""),A.style.pointerEvents="none",I.current=!0,_(s)&&c){var C,M;const T=s,S=g==null||(C=g.nodesRef.current.find(N=>N.id===R))==null||(M=C.context)==null?void 0:M.elements.floating;return S&&(S.style.pointerEvents=""),T.style.pointerEvents="auto",c.style.pointerEvents="auto",()=>{T.style.pointerEvents="",c.style.pointerEvents=""}}}},[u,o,R,c,s,g,w,r,F]),Y(()=>{o||(P.current=void 0,L(),E())},[o,L,E]),d.useEffect(()=>()=>{L(),clearTimeout(v.current),clearTimeout(D.current),E()},[u,s,L,E]),d.useMemo(()=>{if(!u)return{};function y(C){P.current=C.pointerType}return{reference:{onPointerDown:y,onPointerEnter:y,onMouseMove(C){o||f===0||(clearTimeout(D.current),D.current=setTimeout(()=>{k.current||n(!0,C.nativeEvent)},f))}},floating:{onMouseEnter(){clearTimeout(v.current)},onMouseLeave(C){i.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),O(C.nativeEvent,!1)}}}},[i,u,f,o,n,O])}const $n=d.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:()=>{},setState:()=>{},isInstantPhase:!1}),wt=()=>d.useContext($n),In=(e,t)=>{let{open:o,onOpenChange:n}=e,{id:r}=t;const{currentId:i,setCurrentId:s,initialDelay:c,setState:l,timeoutMs:u}=wt();Y(()=>{i&&(l({delay:{open:1,close:me(c,"close")}}),i!==r&&n(!1))},[r,n,l,i,c]),Y(()=>{function a(){n(!1),l({delay:c,currentId:null})}if(!o&&i===r)if(u){const m=window.setTimeout(a,u);return()=>{clearTimeout(m)}}else a()},[o,l,i,r,n,c,u]),Y(()=>{o&&s(r)},[o,s,r])};function Oe(e,t){let o=e.filter(r=>{var i;return r.parentId===t&&((i=r.context)==null?void 0:i.open)}),n=o;for(;n.length;)n=e.filter(r=>{var i;return(i=n)==null?void 0:i.some(s=>{var c;return r.parentId===s.id&&((c=r.context)==null?void 0:c.open)})}),o=o.concat(n);return o}function Je(e){return xe(e.target)&&e.target.tagName==="BUTTON"}function et(e){return Bt(e)}function Nn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,dataRef:r,elements:{domReference:i}}=e,{enabled:s=!0,event:c="click",toggle:l=!0,ignoreMouse:u=!1,keyboardHandlers:a=!0}=t,m=d.useRef(),p=d.useRef(!1);return d.useMemo(()=>s?{reference:{onPointerDown(f){m.current=f.pointerType},onMouseDown(f){f.button===0&&(pe(m.current,!0)&&u||c!=="click"&&(o&&l&&(!r.current.openEvent||r.current.openEvent.type==="mousedown")?n(!1,f.nativeEvent):(f.preventDefault(),n(!0,f.nativeEvent))))},onClick(f){if(c==="mousedown"&&m.current){m.current=void 0;return}pe(m.current,!0)&&u||(o&&l&&(!r.current.openEvent||r.current.openEvent.type==="click")?n(!1,f.nativeEvent):n(!0,f.nativeEvent))},onKeyDown(f){m.current=void 0,!(f.defaultPrevented||!a||Je(f))&&(f.key===" "&&!et(i)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&n(!(o&&l),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!a||Je(f)||et(i)||f.key===" "&&p.current&&(p.current=!1,n(!(o&&l),f.nativeEvent))}}}:{},[s,r,c,u,a,i,l,o,n])}const _n=d.useInsertionEffect,Bn=_n||(e=>e());function ge(e){const t=d.useRef(()=>{});return Bn(()=>{t.current=e}),d.useCallback(function(){for(var o=arguments.length,n=new Array(o),r=0;r<o;r++)n[r]=arguments[r];return t.current==null?void 0:t.current(...n)},[])}const Wn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Hn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Vn=e=>{var t,o;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(o=e==null?void 0:e.outsidePress)!=null?o:!0}};function Kn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,events:r,nodeId:i,elements:{reference:s,domReference:c,floating:l},dataRef:u}=e,{enabled:a=!0,escapeKey:m=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:g="pointerdown",ancestorScroll:R=!1,bubbles:w}=t,b=We(),P=yt()!=null,v=ge(typeof p=="function"?p:()=>!1),x=typeof p=="function"?v:p,D=d.useRef(!1),{escapeKeyBubbles:k,outsidePressBubbles:I}=Vn(w),$=ge(O=>{if(!o||!a||!m||O.key!=="Escape")return;const L=b?Oe(b.nodesRef.current,i):[];if(!k&&(O.stopPropagation(),L.length>0)){let E=!0;if(L.forEach(y=>{var C;if((C=y.context)!=null&&C.open&&!y.context.dataRef.current.__escapeKeyBubbles){E=!1;return}}),!E)return}r.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,$t(O)?O.nativeEvent:O)}),F=ge(O=>{const L=D.current;if(D.current=!1,L||typeof x=="function"&&!x(O))return;const E=Nt(O),y="["+He("inert")+"]",C=j(l).querySelectorAll(y);let M=_(E)?E:null;for(;M&&!Ot(M);){const S=St(M);if(S===j(l).body||!_(S))break;M=S}if(C.length&&_(E)&&!It(E)&&!ie(E,l)&&Array.from(C).every(S=>!ie(M,S)))return;if(xe(E)&&l){const S=E.clientWidth>0&&E.scrollWidth>E.clientWidth,N=E.clientHeight>0&&E.scrollHeight>E.clientHeight;let V=N&&O.offsetX>E.clientWidth;if(N&&At(E).direction==="rtl"&&(V=O.offsetX<=E.offsetWidth-E.clientWidth),V||S&&O.offsetY>E.clientHeight)return}const A=b&&Oe(b.nodesRef.current,i).some(S=>{var N;return ae(O,(N=S.context)==null?void 0:N.elements.floating)});if(ae(O,l)||ae(O,c)||A)return;const T=b?Oe(b.nodesRef.current,i):[];if(T.length>0){let S=!0;if(T.forEach(N=>{var V;if((V=N.context)!=null&&V.open&&!N.context.dataRef.current.__outsidePressBubbles){S=!1;return}}),!S)return}r.emit("dismiss",{type:"outsidePress",data:{returnFocus:P?{preventScroll:!0}:Mt(O)||Ft(O)}}),n(!1,O)});return d.useEffect(()=>{if(!o||!a)return;u.current.__escapeKeyBubbles=k,u.current.__outsidePressBubbles=I;function O(y){n(!1,y)}const L=j(l);m&&L.addEventListener("keydown",$),x&&L.addEventListener(f,F);let E=[];return R&&(_(c)&&(E=X(c)),_(l)&&(E=E.concat(X(l))),!_(s)&&s&&s.contextElement&&(E=E.concat(X(s.contextElement)))),E=E.filter(y=>{var C;return y!==((C=L.defaultView)==null?void 0:C.visualViewport)}),E.forEach(y=>{y.addEventListener("scroll",O,{passive:!0})}),()=>{m&&L.removeEventListener("keydown",$),x&&L.removeEventListener(f,F),E.forEach(y=>{y.removeEventListener("scroll",O)})}},[u,l,c,s,m,x,f,o,n,R,a,k,I,$,F]),d.useEffect(()=>{D.current=!1},[x,f]),d.useMemo(()=>a?{reference:{onKeyDown:$,[Wn[g]]:O=>{h&&(r.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,O.nativeEvent))}},floating:{onKeyDown:$,[Hn[f]]:()=>{D.current=!0}}}:{},[a,r,h,f,g,n,$])}function jn(e){var t;e===void 0&&(e={});const{open:o=!1,onOpenChange:n,nodeId:r}=e,[i,s]=d.useState(null),c=((t=e.elements)==null?void 0:t.reference)||i,l=bn(e),u=We(),a=ge((v,x)=>{v&&(p.current.openEvent=x),n==null||n(v,x)}),m=d.useRef(null),p=d.useRef({}),f=d.useState(()=>Ln())[0],h=Be(),g=d.useCallback(v=>{const x=_(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),contextElement:v}:v;l.refs.setReference(x)},[l.refs]),R=d.useCallback(v=>{(_(v)||v===null)&&(m.current=v,s(v)),(_(l.refs.reference.current)||l.refs.reference.current===null||v!==null&&!_(v))&&l.refs.setReference(v)},[l.refs]),w=d.useMemo(()=>({...l.refs,setReference:R,setPositionReference:g,domReference:m}),[l.refs,R,g]),b=d.useMemo(()=>({...l.elements,domReference:c}),[l.elements,c]),P=d.useMemo(()=>({...l,refs:w,elements:b,dataRef:p,nodeId:r,floatingId:h,events:f,open:o,onOpenChange:a}),[l,r,h,f,o,a,w,b]);return Y(()=>{const v=u==null?void 0:u.nodesRef.current.find(x=>x.id===r);v&&(v.context=P)}),d.useMemo(()=>({...l,context:P,refs:w,elements:b}),[l,w,b,P])}function zn(e,t){t===void 0&&(t={});const{open:o,onOpenChange:n,dataRef:r,events:i,refs:s,elements:{floating:c,domReference:l}}=e,{enabled:u=!0,keyboardOnly:a=!0}=t,m=d.useRef(""),p=d.useRef(!1),f=d.useRef();return d.useEffect(()=>{if(!u)return;const g=j(c).defaultView||window;function R(){!o&&xe(l)&&l===Dt(j(l))&&(p.current=!0)}return g.addEventListener("blur",R),()=>{g.removeEventListener("blur",R)}},[c,l,o,u]),d.useEffect(()=>{if(!u)return;function h(g){(g.type==="referencePress"||g.type==="escapeKey")&&(p.current=!0)}return i.on("dismiss",h),()=>{i.off("dismiss",h)}},[i,u]),d.useEffect(()=>()=>{clearTimeout(f.current)},[]),d.useMemo(()=>u?{reference:{onPointerDown(h){let{pointerType:g}=h;m.current=g,p.current=!!(g&&a)},onMouseLeave(){p.current=!1},onFocus(h){var g;p.current||h.type==="focus"&&((g=r.current.openEvent)==null?void 0:g.type)==="mousedown"&&ae(r.current.openEvent,l)||n(!0,h.nativeEvent)},onBlur(h){p.current=!1;const g=h.relatedTarget,R=_(g)&&g.hasAttribute(He("focus-guard"))&&g.getAttribute("data-type")==="outside";f.current=setTimeout(()=>{ie(s.floating.current,g)||ie(l,g)||R||n(!1,h.nativeEvent)})}}}:{},[u,a,l,s,r,n])}function Ae(e,t,o){const n=new Map;return{...o==="floating"&&{tabIndex:-1},...e,...t.map(r=>r?r[o]:null).concat(e).reduce((r,i)=>(i&&Object.entries(i).forEach(s=>{let[c,l]=s;if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof l=="function"){var u;(u=n.get(c))==null||u.push(l),r[c]=function(){for(var a,m=arguments.length,p=new Array(m),f=0;f<m;f++)p[f]=arguments[f];return(a=n.get(c))==null?void 0:a.map(h=>h(...p)).find(h=>h!==void 0)}}}else r[c]=l}),r),{})}}function Xn(e){e===void 0&&(e=[]);const t=e,o=d.useCallback(i=>Ae(i,e,"reference"),t),n=d.useCallback(i=>Ae(i,e,"floating"),t),r=d.useCallback(i=>Ae(i,e,"item"),e.map(i=>i==null?void 0:i.item));return d.useMemo(()=>({getReferenceProps:o,getFloatingProps:n,getItemProps:r}),[o,n,r])}function Yn(e,t){t===void 0&&(t={});const{open:o,floatingId:n}=e,{enabled:r=!0,role:i="dialog"}=t,s=Be();return d.useMemo(()=>{const c={id:n,role:i};return r?i==="tooltip"?{reference:{"aria-describedby":o?n:void 0},floating:c}:{reference:{"aria-expanded":o?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":o?n:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:s}},floating:{...c,...i==="menu"&&{"aria-labelledby":s}}}:{}},[r,i,o,n,s])}function Qn({closeDelay:e=300,offset:t=20,openDelay:o=0,placement:n="bottom-start",slots:r,trigger:i=["hover","focus"],withArrow:s=!0,arrow:c,role:l="dialog",visible:u={},hidden:a={},floatingOptions:m={},isOpen:p,onOpenChange:f}){var Re;const[h,g]=bt(!1),R=ot(null),w=Et(),{x:b,y:P,strategy:v,refs:x,context:D}=jn({placement:n,middleware:[Rn(t),Pn(),Cn(),Tn({element:R})],open:p||h,onOpenChange:f||g,whileElementsMounted:hn,...m}),k=Kn(D),I=Yn(D,{role:l}),{delay:$}=wt(),O=Fn(D,{delay:$||{open:o,close:e}}),L=zn(D),E=Nn(D),y=[i.find(re=>re==="hover")?O:void 0,i.find(re=>re==="click")?E:void 0,i.find(re=>re==="focus")?L:void 0,k,I],{getReferenceProps:C,getFloatingProps:M}=Xn(y);In(D,{id:w});const{onClick:A,...T}=C(),S=String(((Re=r==null?void 0:r.content)==null?void 0:Re.props).className).includes("pressable")?{onPress:A}:{onClick:A},N=r!=null&&r.content?Rt(r.content,{...r.content.props,ref:x.setReference,...T,...S}):Ce("div",{ref:x.setReference,...C(),children:"Menu Action"}),V=r!=null&&r.submenu?Ve(Ct.nav,{ref:x.setFloating,style:{position:v,top:P??0,left:b??0,width:"max-content",zIndex:50},...M(),variants:{hidden:a,visible:u},initial:"hidden",animate:p||h?"visible":"hidden",children:[s&&Ce(Dn,{ref:R,context:D,...c}),r.submenu]}):Ce("nav",{children:"Submenu"});return Ve(xt,{children:[N,V]})}export{Qn as Menu,Qn as default};
@@ -0,0 +1,33 @@
1
+ import { Variant } from 'framer-motion';
2
+ import { ReactElement } from 'react';
3
+ import { MiddlewareState, Placement, FloatingArrowProps, UseRoleProps, UseFloatingOptions } from '@floating-ui/react';
4
+ type Trigger = 'click' | 'hover' | 'focus';
5
+ /** from floating-ui docs https://floating-ui.com/docs/offset */
6
+ interface AxesOffsets {
7
+ mainAxis?: number;
8
+ crossAxis?: number;
9
+ alignmentAxis?: number | null;
10
+ }
11
+ type Options = number | AxesOffsets | ((state: MiddlewareState) => number | AxesOffsets);
12
+ export interface MenuProps {
13
+ closeDelay?: number;
14
+ offset?: Options;
15
+ openDelay?: number;
16
+ placement?: Placement;
17
+ slots?: {
18
+ content?: ReactElement;
19
+ contentRoot?: ReactElement;
20
+ submenuRoot?: ReactElement;
21
+ submenu?: ReactElement;
22
+ };
23
+ trigger?: Trigger[];
24
+ withArrow?: boolean;
25
+ arrow?: Omit<FloatingArrowProps, 'context'>;
26
+ role?: UseRoleProps['role'];
27
+ visible?: Variant;
28
+ hidden?: Variant;
29
+ floatingOptions?: UseFloatingOptions;
30
+ isOpen?: boolean;
31
+ onOpenChange?: (isOpen: boolean) => void;
32
+ }
33
+ export {};
@@ -0,0 +1,3 @@
1
+ export { ContextMenu } from './ContextMenu';
2
+ export { Menu } from './Menu';
3
+ export type { MenuProps } from './Menu.types';
@@ -0,0 +1 @@
1
+ import{ContextMenu as n}from"./ContextMenu.js";import{Menu as f}from"./Menu.js";import"react/jsx-runtime";import"react";import"framer-motion";import"../../utils/cn.js";import"react-dom";export{n as ContextMenu,f as Menu};
@@ -1 +1 @@
1
- import{jsx as i,jsxs as d,Fragment as v}from"react/jsx-runtime";import{Meter as j,Label as l}from"react-aria-components";import{motion as w}from"framer-motion";import{c as t}from"../../assets/cn-CytzSlOG.js";function W({label:n,showValue:o=!0,value:p=0,minValue:f=0,maxValue:u=100,formatOptions:h={style:"percent"},className:x,classNames:r,...b}){return i(j,{className:t("flex flex-col gap-2",x),value:p,minValue:f,maxValue:u,formatOptions:h,...b,children:({percentage:e,valueText:g})=>d(v,{children:[(n||o)&&d("div",{className:t("flex justify-between gap-4",r==null?void 0:r.labelWrapper),children:[n&&i(l,{className:t("text-sm",r==null?void 0:r.label),children:n}),o&&i("span",{className:t("text-sm tabular-nums ml-auto",r==null?void 0:r.value),children:g})]}),i("div",{className:t("h-2.5 rounded-md bg-slate-300 forced-color-adjust-none overflow-hidden",r==null?void 0:r.trackWrapepr),children:i(w.div,{className:t("h-full bg-slate-800",r==null?void 0:r.track),initial:{width:`${e}%`},animate:{width:`${e}%`},transition:{type:"spring",bounce:0}})})]})})}export{W as Meter,W as default};
1
+ import{jsx as i,jsxs as l}from"react/jsx-runtime";import{Meter as v,Label as g}from"react-aria-components";import{motion as j}from"framer-motion";import{cn as r}from"../../utils/cn.js";function k({label:e,showValue:o=!0,value:d=0,minValue:f=0,maxValue:p=100,formatOptions:u={style:"percent"},className:h,classNames:t,...x}){return i(v,{className:r("flex flex-col gap-2",h),value:d,minValue:f,maxValue:p,formatOptions:u,...x,children:({percentage:n,valueText:b})=>l("div",{className:r("flex justify-between items-center gap-4",t==null?void 0:t.labelWrapper),children:[e&&i(g,{className:r("text-sm",t==null?void 0:t.label),children:e}),i("div",{className:r("flex-auto h-2.5 rounded-md bg-slate-300 forced-color-adjust-none overflow-hidden",t==null?void 0:t.trackWrapepr),children:i(j.div,{className:r("h-full bg-slate-800",t==null?void 0:t.track),initial:{width:`${n}%`},animate:{width:`${n}%`},transition:{type:"spring",bounce:0}})}),o&&i("span",{className:r("text-sm tabular-nums ml-auto",t==null?void 0:t.value),children:b})]})})}export{k as Meter,k as default};
@@ -1 +1 @@
1
- import{Meter as e}from"./Meter.js";import"react/jsx-runtime";import"react-aria-components";import"framer-motion";import"../../assets/cn-CytzSlOG.js";export{e as Meter};
1
+ import{Meter as e}from"./Meter.js";import"react/jsx-runtime";import"react-aria-components";import"framer-motion";import"../../utils/cn.js";export{e as Meter};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{Modal as s}from"react-aria-components";import{c as m}from"../../assets/cn-CytzSlOG.js";function i({children:o,className:a,...r}){return t(s,{...r,className:m("absolute inset-1/2",a),children:o})}export{i as Modal,i as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{Modal as m}from"react-aria-components";import{cn as s}from"../../utils/cn.js";function i({children:o,className:a,...r}){return t(m,{...r,className:s("absolute inset-1/2",a),children:o})}export{i as Modal,i as default};
@@ -1 +1 @@
1
- import{Modal as i}from"./Modal.js";import"react/jsx-runtime";import"react-aria-components";import"../../assets/cn-CytzSlOG.js";export{i as Modal};
1
+ import{Modal as i}from"./Modal.js";import"react/jsx-runtime";import"react-aria-components";import"../../utils/cn.js";export{i as Modal};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{forwardRef as p,useId as v}from"react";import{ModalOverlay as y}from"react-aria-components";import{motion as h,AnimatePresence as b}from"framer-motion";import{useDialogTrigger as x}from"../DialogTrigger/DialogTrigger.js";import{c as M}from"../../assets/cn-CytzSlOG.js";const O=p(({style:e,...i},n)=>{const t=typeof e=="function"?e(i):e;return o(y,{...i,ref:n,style:t})}),g=h.create(O);function a({animate:e,animation:i,setAnimation:n,className:t,animationVariants:d,children:l,...s}){const c=v(),{key:m,...f}=s;return o(g,{isExiting:i==="hidden",onAnimationComplete:u=>{n(r=>u==="hidden"&&r==="hidden"?"unmounted":r)},variants:d||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:e,exit:"hidden",className:M("bg-black/30","fixed top-0 left-0","z-50","w-screen h-[var(--visual-viewport-height)]",t),...f,children:l},m||c)}function j(e){const{isOpen:i}=e,{animation:n,setAnimation:t}=x();return i!==void 0?o(b,{children:i&&o(a,{...e,animate:"visible",animation:n,setAnimation:t})}):o(a,{...e,animate:n,animation:n,setAnimation:t})}export{j as ModalOverlay,j as default};
1
+ import{jsx as o}from"react/jsx-runtime";import{forwardRef as p,useId as v}from"react";import{ModalOverlay as y}from"react-aria-components";import{motion as h,AnimatePresence as b}from"framer-motion";import{useDialogTrigger as x}from"../DialogTrigger/DialogTrigger.js";import{cn as M}from"../../utils/cn.js";const O=p(({style:i,...e},t)=>{const n=typeof i=="function"?i(e):i;return o(y,{...e,ref:t,style:n})}),g=h.create(O);function a({animate:i,animation:e,setAnimation:t,className:n,animationVariants:d,children:l,...m}){const s=v(),{key:c,...f}=m;return o(g,{isExiting:e==="hidden",onAnimationComplete:u=>{t(r=>u==="hidden"&&r==="hidden"?"unmounted":r)},variants:d||{hidden:{opacity:0,backdropFilter:"blur(0px)",transition:{delay:.08}},visible:{opacity:1,backdropFilter:"blur(8px)"}},initial:"hidden",animate:i,exit:"hidden",className:M("bg-black/30","fixed top-0 left-0","z-50","w-screen h-[var(--visual-viewport-height)]",n),...f,children:l},c||s)}function j(i){const{isOpen:e}=i,{animation:t,setAnimation:n}=x();return e!==void 0?o(b,{children:e&&o(a,{...i,animate:"visible",animation:t,setAnimation:n})}):o(a,{...i,animate:t,animation:t,setAnimation:n})}export{j as ModalOverlay,j as default};
@@ -1 +1 @@
1
- import{ModalOverlay as l}from"./ModalOverlay.js";import"react/jsx-runtime";import"react";import"react-aria-components";import"framer-motion";import"../DialogTrigger/DialogTrigger.js";import"../../assets/cn-CytzSlOG.js";export{l as ModalOverlay};
1
+ import{ModalOverlay as l}from"./ModalOverlay.js";import"react/jsx-runtime";import"react";import"react-aria-components";import"framer-motion";import"../DialogTrigger/DialogTrigger.js";import"../../utils/cn.js";export{l as ModalOverlay};
@@ -0,0 +1,3 @@
1
+ import { NumberFormatProps } from './NumberFormat.types';
2
+ export declare function NumberFormat({ locale, style, fallback, children, ...options }: NumberFormatProps): string | number | boolean | import('react').ReactElement<any, string | import('react').JSXElementConstructor<any>> | Iterable<import('react').ReactNode> | null;
3
+ export default NumberFormat;
@@ -0,0 +1 @@
1
+ function u({locale:r="en-US",style:t="decimal",fallback:m="-",children:e,...a}){return e?new Intl.NumberFormat(r,{...a,style:t}).format(Number(e)):m}export{u as NumberFormat,u as default};
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export type NumberFormatProps = Omit<Intl.NumberFormatOptions, 'style'> & {
3
+ locale?: string;
4
+ style?: 'decimal' | 'currency' | 'percent' | 'unit';
5
+ fallback?: ReactNode;
6
+ children?: string | number;
7
+ };
@@ -0,0 +1,2 @@
1
+ export { NumberFormat } from './NumberFormat';
2
+ export type { NumberFormatProps } from './NumberFormat.types';
@@ -0,0 +1 @@
1
+ import{NumberFormat as o}from"./NumberFormat.js";export{o as NumberFormat};
@@ -1 +1 @@
1
- import{jsxs as b,jsx as o}from"react/jsx-runtime";import{NumberField as h,Label as c,Group as v,Button as p,Input as w,Text as y,FieldError as j}from"react-aria-components";import{c as e}from"../../assets/cn-CytzSlOG.js";function F({label:a,description:i,errorMessage:f,isInvalid:n,isReadOnly:u,slots:t,className:x,classNames:r,...g}){const d=["group-hover:border-slate-400","group-disabled:border-slate-200","group-invalid:border-red-500 group-invalid:bg-red-100 group-invalid:text-red-600","group-invalid:group-hover:border-red-600","group-invalid:group-focus:border-red-600"],l=["flex items-center justify-center shrink-0","rounded-md border-solid border","font-semibold text-sm","w-10 h-10 py-0 px-0 cursor-pointer disabled:cursor-default","transition-all duration-200 ease-in-out","focus:outline-2 focus:outline focus:outline-slate-200 pressed:scale-95","bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-slate-300 hover:border-slate-400 focus:border-slate-400 disabled:border-slate-200","text-slate-900 disabled:text-slate-500","group-aria-readonly:bg-slate-100 group-aria-readonly:text-slate-500 group-aria-readonly:border-slate-200 group-aria-readonly:cursor-default"];return b(h,{isInvalid:n,isReadOnly:u,className:e("flex flex-col w-full",x),...g,children:[o(c,{className:e("flex text-slate-500 text-sm",r==null?void 0:r.label),children:a}),b(v,{isInvalid:n,"aria-readonly":u,className:e("flex rounded-md group","focus-within:outline-2 focus-within:outline focus-within:outline-slate-200","focus-within:invalid:outline-2 focus-within:invalid:outline focus-within:invalid:outline-slate-200","disabled:bg-slate-100",r==null?void 0:r.group),children:[o(p,{slot:"decrement",className:e("border-r-0 rounded-r-none",l,d,r==null?void 0:r.decrementBtn),children:t==null?void 0:t.decrementIcon}),o(w,{className:e("border-solid border border-slate-300","text-sm text-slate-900 placeholder-slate-400","h-10 px-2 py-0 m-0 w-full","bg-white","transition-all duration-200 ease-in-out","hover:border-slate-400","focus:outline-0 focus:border-slate-400","disabled:border-slate-200 disabled:bg-slate-100","invalid:border-red-500 invalid:bg-red-100 invalid:text-red-600","invalid:hover:border-red-600 invalid:focus:border-red-600",d,r==null?void 0:r.input)}),o(p,{slot:"increment",className:e("border-l-0 rounded-l-none",l,d,r==null?void 0:r.incrementBtn),children:t==null?void 0:t.incrementIcon})]}),i&&o(y,{className:e("flex text-slate-500 text-sm",r==null?void 0:r.description),slot:"description",children:i}),o(j,{className:e("flex text-red-500 text-sm",r==null?void 0:r.error),children:f})]})}export{F as NumberInput,F as default};
1
+ import{jsxs as b,jsx as r}from"react/jsx-runtime";import{NumberField as x,Label as c,Group as v,Button as p,Input as w,Text as k,FieldError as y}from"react-aria-components";import{cn as t}from"../../utils/cn.js";const I=r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),j=r("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r("path",{d:"M12 5V19M5 12H19",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function M({label:h,description:d,errorMessage:a,isInvalid:i,isReadOnly:l,slots:o,className:f,classNames:e,...g}){const n=["group-hover:border-slate-400","group-disabled:border-slate-200","group-invalid:border-red-500 group-invalid:bg-red-100 group-invalid:text-red-600","group-invalid:group-hover:border-red-600","group-invalid:group-focus:border-red-600"],u=["flex items-center justify-center shrink-0","rounded-md border-solid border","font-semibold text-sm","w-10 h-10 py-0 px-0 cursor-pointer disabled:cursor-default","transition-all duration-200 ease-in-out","focus:outline-2 focus:outline focus:outline-slate-200 pressed:scale-95","bg-transparent hover:bg-transparent focus:bg-transparent disabled:bg-transparent","border-slate-300 hover:border-slate-400 focus:border-slate-400 disabled:border-slate-200","text-slate-900 disabled:text-slate-500","group-aria-readonly:bg-slate-100 group-aria-readonly:text-slate-500 group-aria-readonly:border-slate-200 group-aria-readonly:cursor-default"];return b(x,{isInvalid:i,isReadOnly:l,className:t("flex flex-col w-full",f),...g,children:[r(c,{className:t("flex text-slate-500 text-sm",e==null?void 0:e.label),children:h}),b(v,{isInvalid:i,"aria-readonly":l,className:t("flex rounded-md group","focus-within:outline-2 focus-within:outline focus-within:outline-slate-200","focus-within:invalid:outline-2 focus-within:invalid:outline focus-within:invalid:outline-slate-200","disabled:bg-slate-100",e==null?void 0:e.group),children:[r(p,{slot:"decrement",className:t(u,n,"border-r-0 rounded-r-none",e==null?void 0:e.decrementBtn),children:(o==null?void 0:o.decrementIcon)||I}),r(w,{className:t("border-solid border border-slate-300 text-center","text-sm text-slate-900 placeholder-slate-400","h-10 px-2 py-0 m-0 w-full","bg-white","transition-all duration-200 ease-in-out","hover:border-slate-400","focus:outline-0 focus:border-slate-400","disabled:border-slate-200 disabled:bg-slate-100","invalid:border-red-500 invalid:bg-red-100 invalid:text-red-600","invalid:hover:border-red-600 invalid:focus:border-red-600",n,e==null?void 0:e.input)}),r(p,{slot:"increment",className:t(u,n,"border-l-0 rounded-l-none",e==null?void 0:e.incrementBtn),children:(o==null?void 0:o.incrementIcon)||j})]}),d&&r(k,{className:t("flex text-slate-500 text-sm",e==null?void 0:e.description),slot:"description",children:d}),r(y,{className:t("flex text-red-500 text-sm",e==null?void 0:e.error),children:a})]})}export{M as NumberInput,M as default};
@@ -1 +1 @@
1
- import{NumberInput as i}from"./NumberInput.js";import"react/jsx-runtime";import"react-aria-components";import"../../assets/cn-CytzSlOG.js";export{i as NumberInput};
1
+ import{NumberInput as i}from"./NumberInput.js";import"react/jsx-runtime";import"react-aria-components";import"../../utils/cn.js";export{i as NumberInput};
@@ -0,0 +1,3 @@
1
+ import { DigitResolverProps } from './DigitResolver.types';
2
+ export declare function DigitResolver({ delta, digits, isNegative, tickerMotionProps, ...transitionConfig }: DigitResolverProps): import("react/jsx-runtime").JSX.Element;
3
+ export default DigitResolver;
@@ -0,0 +1 @@
1
+ import{jsxs as h,jsx as e,Fragment as d}from"react/jsx-runtime";import{memo as p,useState as b,useCallback as f,useId as x,useMemo as g}from"react";import{motion as s}from"framer-motion";import{useColumnTransition as N}from"./hooks/useColumnTransition.js";const k=/^-?\d*\.?\d+$/;function $({digit:i,tickerMotionProps:l,transition:m,updateTransition:n}){const[o,r]=b(0),a=f(t=>{t!==null&&r(t.clientHeight*parseInt(i,10))},[i]);return h("span",{className:"relative h-auto block",ref:a,"aria-hidden":!0,children:[e(s.span,{className:"absolute block bottom-0 h-[1000%]",initial:{x:0,y:o},animate:{x:0,y:o},transition:{...m},onAnimationComplete:n,style:{fontFeatureSettings:"tnum"},children:[9,8,7,6,5,4,3,2,1,0].map(t=>e(s.span,{className:"block text-[inherit] leading-[inherit] tabular-nums",...l,children:t},t))}),e(s.span,{className:"block text-[inherit] leading-[inherit] invisible","aria-hidden":!0,children:"0"})]})}const y=p($);function R({delta:i,digits:l,isNegative:m,tickerMotionProps:n,...o}){const r=x(),a=g(()=>typeof n=="function"?n({delta:i}):n,[i,n]),t=N({...o});return h(d,{children:[m&&e(s.span,{className:"block text-[inherit] leading-[inherit] tabular-nums","aria-hidden":!0,...a,children:"-"}),l.map((c,u)=>k.test(c)?e(y,{digit:c,tickerMotionProps:a,...t},`${r}_${u}`):e(s.span,{className:"block text-[inherit] leading-[inherit] tabular-nums","aria-hidden":!0,...a,children:c},`${r}_${u}`))]})}export{R as DigitResolver,R as default};
@@ -0,0 +1,12 @@
1
+ import { MotionProps, Transition } from 'framer-motion';
2
+ import { NumberTickerProps, TickerMotionProps } from './NumberTicker.types';
3
+ export type DigitResolverProps = Pick<NumberTickerProps, 'tickerMotionProps' | 'skipFirstAnimation' | 'transition'> & TickerMotionProps & {
4
+ digits: string[];
5
+ isNegative: boolean;
6
+ };
7
+ export type DigitProps = Pick<NumberTickerProps, 'tickerMotionProps'> & {
8
+ digit: string;
9
+ tickerMotionProps: MotionProps | undefined;
10
+ transition: Transition;
11
+ updateTransition: () => void;
12
+ };
@@ -0,0 +1,3 @@
1
+ import { NumberTickerProps } from './NumberTicker.types';
2
+ export declare function NumberTicker({ value, asLocal, localeConfig, precision, slots, skipFirstAnimation, transition, tickerMotionProps, className, ...props }: NumberTickerProps): import("react/jsx-runtime").JSX.Element;
3
+ export default NumberTicker;
@@ -0,0 +1 @@
1
+ import{jsxs as x,jsx as N}from"react/jsx-runtime";import{motion as h}from"framer-motion";import{cn as w}from"../../utils/cn.js";import{useNumberDelta as b}from"./hooks/useNumberDelta.js";import{useNumberTicker as g}from"./hooks/useNumberTicker.js";import{DigitResolver as l}from"./DigitResolver.js";import"react";import"./hooks/useColumnTransition.js";function q({value:e,asLocal:t,localeConfig:i,precision:o,slots:r,skipFirstAnimation:m,transition:n,tickerMotionProps:a,className:f,...u}){const{digits:p,isNegative:c}=g({value:e,asLocal:t,localeConfig:i,precision:o}),d=b(e);return x(h.span,{className:w("flex h-auto flex-row flex-nowrap overflow-hidden relative text-[inherit]",f),"aria-valuenow":e,layout:!0,layoutRoot:!0,...u,children:[r==null?void 0:r.startContent,N(l,{isNegative:c,digits:p,tickerMotionProps:a,skipFirstAnimation:m,transition:n,delta:d}),r==null?void 0:r.endContent]})}export{q as NumberTicker,q as default};
@@ -0,0 +1,88 @@
1
+ import { MotionProps, Transition } from 'framer-motion';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ export type TickerMotionProps = {
4
+ delta: 'increase' | 'decrease' | 'same';
5
+ };
6
+ export type TransitionConfig = {
7
+ /**
8
+ * Whether the NumberTicker animation on render
9
+ * @default true
10
+ */
11
+ skipFirstAnimation?: boolean;
12
+ /**
13
+ * The transition props to modify the NumberTicker animation.
14
+ * Use the framer motion transition API to create your own transition.
15
+ */
16
+ transition?: Transition;
17
+ };
18
+ export interface NumberTickerConfig {
19
+ value: number;
20
+ /**
21
+ * Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
22
+ * @default 2
23
+ */
24
+ precision?: number;
25
+ /**
26
+ * Whether the NumberTicker value as Intl.NumberFormat
27
+ * @default false
28
+ */
29
+ asLocal?: boolean;
30
+ /**
31
+ * The configuration for the NumberTicker value as Intl.NumberFormat
32
+ * By default the object {
33
+ locale: 'en-US',
34
+ options: {
35
+ style: 'currency',
36
+ currency: 'USD',
37
+ minimumFractionDigits: 2,
38
+ },
39
+ }
40
+ */
41
+ localeConfig?: {
42
+ locale?: string;
43
+ options?: Intl.NumberFormatOptions | undefined;
44
+ };
45
+ }
46
+ export type NumberTickerProps = NumberTickerConfig & TransitionConfig & {
47
+ style?: CSSProperties;
48
+ className?: string;
49
+ slots?: {
50
+ /**
51
+ * Element to be rendered in the left side of the NumberTicker.
52
+ */
53
+ startContent?: ReactNode;
54
+ /**
55
+ * Element to be rendered in the right side of the NumberTicker.
56
+ */
57
+ endContent?: ReactNode;
58
+ };
59
+ /**
60
+ * The motion props to modify the each Ticker animation.
61
+ * Use the framer motion API to create your own animation. With the possible to use the delta value
62
+ * Example:
63
+ *
64
+ * const getColor = (delta: TickerMotionProps) => {
65
+ switch (d) {
66
+ case 'increase':
67
+ return '#48ff0b';
68
+ case 'decrease':
69
+ return '#F22613';
70
+ default:
71
+ return '#fff';
72
+ }
73
+ };
74
+
75
+ <NumberTicker
76
+ tickerMotionProps={({ delta }) => ({
77
+ animate: {
78
+ color: [getColor(delta), '#fff'],
79
+ transition: {
80
+ duration: 2,
81
+ },
82
+ },
83
+ })}
84
+ />
85
+ *
86
+ */
87
+ tickerMotionProps?: MotionProps | ((props: TickerMotionProps) => MotionProps);
88
+ };
@@ -0,0 +1,7 @@
1
+ import { Transition } from 'framer-motion';
2
+ import { TransitionConfig } from '../NumberTicker.types';
3
+ export declare const useColumnTransition: ({ skipFirstAnimation, transition: transitionProps, }: TransitionConfig) => {
4
+ transition: Transition;
5
+ updateTransition: () => void;
6
+ };
7
+ export default useColumnTransition;
@@ -0,0 +1 @@
1
+ import{useState as a,useMemo as u,useCallback as i}from"react";const c=({skipFirstAnimation:t=!0,transition:e})=>{const[n,s]=a(t),o=u(()=>n?{duration:.1}:{...e||{type:"spring",stiffness:50}},[n,e]),r=i(()=>{t&&s(!1)},[t]);return{transition:o,updateTransition:r}};export{c as default,c as useColumnTransition};
@@ -0,0 +1,2 @@
1
+ export declare const useNumberDelta: (value?: number) => "increase" | "decrease" | "same";
2
+ export default useNumberDelta;
@@ -0,0 +1 @@
1
+ import{useRef as t,useEffect as s}from"react";const n=(e=0)=>{const r=t(e);switch(s(()=>{r.current=e},[e]),!0){case e>r.current:return"increase";case e<r.current:return"decrease";default:return"same"}};export{n as default,n as useNumberDelta};
@@ -0,0 +1,6 @@
1
+ import { NumberTickerConfig } from '../NumberTicker.types';
2
+ export declare const useNumberTicker: ({ value, asLocal, localeConfig, precision, }: NumberTickerConfig) => {
3
+ digits: string[];
4
+ isNegative: boolean;
5
+ };
6
+ export default useNumberTicker;
@@ -0,0 +1 @@
1
+ import{useMemo as u}from"react";const i=({value:r=0,asLocal:m=!1,localeConfig:t={locale:"en-US",options:{style:"currency",currency:"USD",minimumFractionDigits:2}},precision:p=2})=>{const s=parseFloat(`${Math.max(Math.abs(r),0)}`).toFixed(p??0),e=m?new Intl.NumberFormat(t==null?void 0:t.locale,{...t==null?void 0:t.options}).format(parseFloat(s)):s;return u(()=>({digits:e.split(""),isNegative:r<0}),[e,r])};export{i as default,i as useNumberTicker};
@@ -0,0 +1,4 @@
1
+ export { DigitResolver } from './DigitResolver';
2
+ export { NumberTicker } from './NumberTicker';
3
+ export type { DigitProps, DigitResolverProps } from './DigitResolver.types';
4
+ export type { NumberTickerConfig, NumberTickerProps, TickerMotionProps, TransitionConfig, } from './NumberTicker.types';
@@ -0,0 +1 @@
1
+ import{DigitResolver as b}from"./DigitResolver.js";import{NumberTicker as g}from"./NumberTicker.js";import"react/jsx-runtime";import"react";import"framer-motion";import"./hooks/useColumnTransition.js";import"../../utils/cn.js";import"./hooks/useNumberDelta.js";import"./hooks/useNumberTicker.js";export{b as DigitResolver,g as NumberTicker};
@@ -0,0 +1,3 @@
1
+ import { PaginationProps } from '@nextui-org/pagination';
2
+ export declare function Pagination({ showControls, className, classNames, ...rest }: PaginationProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Pagination;
@@ -0,0 +1 @@
1
+ import{jsx as d}from"react/jsx-runtime";import{Pagination as u}from"@nextui-org/pagination";import{cn as e}from"../../utils/cn.js";const r=e("w-8 h-8 flex justify-center items-center cursor-pointer shadow-none","border border-slate-200 data-[disabled=true]:border-0",'rounded transition-colors duration-300 data-[focus-visible="true"]:outline-white data-[focus-visible="true"]:outline-offset-4',"hover:bg-slate-50 data-[disabled=true]:bg-slate-100 data-[disabled=true]:text-slate-400","[&>svg]:w-4.5 [&>svg]:h-auto");function p({showControls:o=!0,className:i,classNames:t,...n}){return d(u,{showControls:o,className:e("text-slate-600",i),classNames:{wrapper:e("flex flex-nowrap gap-2 lg:gap-3",t==null?void 0:t.wrapper),item:e("w-8 h-8 flex text-sm justify-center items-center cursor-pointer rounded shadow-none","border-solid border border-slate-100 bg-transparent transition-colors duration-300",'data-[active=true]:bg-slate-500 data-[active=true]:text-white data-[focus-visible="true"]:outline-white data-[focus-visible="true"]:outline-offset-4',"[&[data-hover=true]:not([data-active=true])]:border-slate-200",t==null?void 0:t.item),prev:e(r,t==null?void 0:t.prev),next:e(r,t==null?void 0:t.next),ellipsis:e("w-4 h-4.5 scale-110 translate-y-1",t==null?void 0:t.ellipsis)},...n})}export{p as Pagination,p as default};
@@ -0,0 +1 @@
1
+ export { Pagination } from './Pagination';
@@ -0,0 +1 @@
1
+ import{Pagination as p}from"./Pagination.js";import"react/jsx-runtime";import"@nextui-org/pagination";import"../../utils/cn.js";export{p as Pagination};
@@ -0,0 +1,3 @@
1
+ import { PasswordCheckProps } from './PasswordCheck.types';
2
+ export declare function PasswordCheck({ value, variant, }: PasswordCheckProps): import("react/jsx-runtime").JSX.Element;
3
+ export default PasswordCheck;