sodtrack-web-ui 0.61.3 → 0.62.0

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 (93) hide show
  1. package/dist/chip-form-complementary.d.mts +3 -3
  2. package/dist/chip-form-complementary.d.ts +3 -3
  3. package/dist/chip-form.d.mts +3 -3
  4. package/dist/chip-form.d.ts +3 -3
  5. package/dist/chip-status-complementary.d.mts +1 -1
  6. package/dist/chip-status-complementary.d.ts +1 -1
  7. package/dist/chunk-3AGNOMLI.mjs +1 -0
  8. package/dist/{chunk-QBX2P5NO.mjs → chunk-6656TD7P.mjs} +1 -1
  9. package/dist/chunk-6IQFV2BQ.mjs +1 -0
  10. package/dist/chunk-6UUMEMR4.mjs +1 -0
  11. package/dist/chunk-AYAULBBH.mjs +1 -0
  12. package/dist/chunk-AYYHOGRU.mjs +1 -0
  13. package/dist/chunk-CNP47PJM.mjs +1 -0
  14. package/dist/chunk-JCLNR7GH.mjs +1 -0
  15. package/dist/chunk-KXWTBSEK.mjs +1 -0
  16. package/dist/{chunk-UVBUJL4P.mjs → chunk-PJ5ZUPVG.mjs} +1 -1
  17. package/dist/chunk-TVGC2HAY.mjs +1 -0
  18. package/dist/chunk-TYJGISLM.mjs +1 -0
  19. package/dist/chunk-W75YWLLW.mjs +1 -0
  20. package/dist/common.css +22 -0
  21. package/dist/country-text-field.js +2 -2
  22. package/dist/country-text-field.mjs +1 -1
  23. package/dist/data-table.js +2 -2
  24. package/dist/data-table.mjs +1 -1
  25. package/dist/date-picker.js +1 -1
  26. package/dist/date-picker.mjs +1 -1
  27. package/dist/dialog.js +2 -2
  28. package/dist/dialog.mjs +1 -1
  29. package/dist/drawer-sticky.d.mts +1 -7
  30. package/dist/drawer-sticky.d.ts +1 -7
  31. package/dist/drawer-sticky.js +2 -2
  32. package/dist/drawer-sticky.mjs +1 -1
  33. package/dist/drawer.js +2 -2
  34. package/dist/drawer.mjs +1 -1
  35. package/dist/flag-select.js +2 -2
  36. package/dist/flag-select.mjs +1 -1
  37. package/dist/index.css +1 -1
  38. package/dist/index.d.mts +0 -8
  39. package/dist/index.d.ts +0 -8
  40. package/dist/index.js +2 -2
  41. package/dist/index.mjs +1 -1
  42. package/dist/list-item-arrow.css +1 -1
  43. package/dist/list-item-arrow.mjs +1 -1
  44. package/dist/list-item-button.css +1 -1
  45. package/dist/list-item-button.mjs +1 -1
  46. package/dist/list-item-checkbox.css +1 -1
  47. package/dist/list-item-checkbox.mjs +1 -1
  48. package/dist/list-item.css +1 -1
  49. package/dist/list-item.mjs +1 -1
  50. package/dist/search-bar.js +1 -1
  51. package/dist/search-bar.mjs +1 -1
  52. package/dist/select.js +2 -2
  53. package/dist/select.mjs +1 -1
  54. package/dist/tab.d.mts +1 -1
  55. package/dist/tab.d.ts +1 -1
  56. package/dist/table.js +1 -1
  57. package/dist/table.mjs +1 -1
  58. package/dist/text-field.js +1 -1
  59. package/dist/text-field.mjs +1 -1
  60. package/dist/time-picker.js +2 -2
  61. package/dist/time-picker.mjs +1 -1
  62. package/package.json +2 -6
  63. package/dist/checkbox_old.d.mts +0 -17
  64. package/dist/checkbox_old.d.ts +0 -17
  65. package/dist/checkbox_old.js +0 -16
  66. package/dist/checkbox_old.mjs +0 -1
  67. package/dist/chunk-6N3NPMN2.mjs +0 -1
  68. package/dist/chunk-6T3T33NK.mjs +0 -1
  69. package/dist/chunk-7LHI6XAQ.mjs +0 -1
  70. package/dist/chunk-A7OUZRND.mjs +0 -1
  71. package/dist/chunk-AVEZT73Y.mjs +0 -1
  72. package/dist/chunk-BNYSNYRJ.mjs +0 -1
  73. package/dist/chunk-D6V735GZ.mjs +0 -1
  74. package/dist/chunk-D7F6I4QH.mjs +0 -1
  75. package/dist/chunk-EOB2KGVR.mjs +0 -1
  76. package/dist/chunk-GQSPOA7L.mjs +0 -1
  77. package/dist/chunk-HPADBBCW.mjs +0 -1
  78. package/dist/chunk-HTBT6CLR.mjs +0 -1
  79. package/dist/chunk-KBCKNFAA.mjs +0 -1
  80. package/dist/chunk-PGGV7VMC.mjs +0 -1
  81. package/dist/chunk-VY3HVT62.mjs +0 -1
  82. package/dist/snackbar_old.d.mts +0 -14
  83. package/dist/snackbar_old.d.ts +0 -14
  84. package/dist/snackbar_old.js +0 -15
  85. package/dist/snackbar_old.mjs +0 -1
  86. package/dist/toggle.d.mts +0 -11
  87. package/dist/toggle.d.ts +0 -11
  88. package/dist/toggle.js +0 -1
  89. package/dist/toggle.mjs +0 -1
  90. package/dist/tooltip_old.d.mts +0 -12
  91. package/dist/tooltip_old.d.ts +0 -12
  92. package/dist/tooltip_old.js +0 -1
  93. package/dist/tooltip_old.mjs +0 -1
@@ -6,7 +6,7 @@ type ChipFormComplementaryVariantsType = (typeof ChipFormComplementaryVariants)[
6
6
  declare const ChipFormComplementaryVariantsClassNames: Record<ChipFormComplementaryVariantsType, string>;
7
7
  declare const chipForm: (props?: ({
8
8
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "md" | "sm" | undefined;
10
10
  selected?: boolean | undefined;
11
11
  disabled?: boolean | undefined;
12
12
  } & ({
@@ -74,7 +74,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
74
74
  children?: React__default.ReactNode | undefined;
75
75
  } & Omit<VariantProps<(props?: ({
76
76
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
77
- size?: "sm" | "md" | undefined;
77
+ size?: "md" | "sm" | undefined;
78
78
  selected?: boolean | undefined;
79
79
  disabled?: boolean | undefined;
80
80
  } & ({
@@ -133,7 +133,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
133
133
  } | null | undefined;
134
134
  })) | undefined) => string>, "variant"> & Required<Pick<VariantProps<(props?: ({
135
135
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
136
- size?: "sm" | "md" | undefined;
136
+ size?: "md" | "sm" | undefined;
137
137
  selected?: boolean | undefined;
138
138
  disabled?: boolean | undefined;
139
139
  } & ({
@@ -6,7 +6,7 @@ type ChipFormComplementaryVariantsType = (typeof ChipFormComplementaryVariants)[
6
6
  declare const ChipFormComplementaryVariantsClassNames: Record<ChipFormComplementaryVariantsType, string>;
7
7
  declare const chipForm: (props?: ({
8
8
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
9
- size?: "sm" | "md" | undefined;
9
+ size?: "md" | "sm" | undefined;
10
10
  selected?: boolean | undefined;
11
11
  disabled?: boolean | undefined;
12
12
  } & ({
@@ -74,7 +74,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
74
74
  children?: React__default.ReactNode | undefined;
75
75
  } & Omit<VariantProps<(props?: ({
76
76
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
77
- size?: "sm" | "md" | undefined;
77
+ size?: "md" | "sm" | undefined;
78
78
  selected?: boolean | undefined;
79
79
  disabled?: boolean | undefined;
80
80
  } & ({
@@ -133,7 +133,7 @@ declare const ChipFormComplementary: React__default.ForwardRefExoticComponent<{
133
133
  } | null | undefined;
134
134
  })) | undefined) => string>, "variant"> & Required<Pick<VariantProps<(props?: ({
135
135
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
136
- size?: "sm" | "md" | undefined;
136
+ size?: "md" | "sm" | undefined;
137
137
  selected?: boolean | undefined;
138
138
  disabled?: boolean | undefined;
139
139
  } & ({
@@ -19,7 +19,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
19
19
  selected?: boolean | undefined;
20
20
  disabled?: boolean | undefined;
21
21
  duotone?: boolean | undefined;
22
- size?: "sm" | "md" | "xs" | undefined;
22
+ size?: "md" | "sm" | "xs" | undefined;
23
23
  } & ({
24
24
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
25
25
  [x: string]: any;
@@ -80,7 +80,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
80
80
  selected?: boolean | undefined;
81
81
  disabled?: boolean | undefined;
82
82
  duotone?: boolean | undefined;
83
- size?: "sm" | "md" | "xs" | undefined;
83
+ size?: "md" | "sm" | "xs" | undefined;
84
84
  } & ({
85
85
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
86
86
  [x: string]: any;
@@ -141,7 +141,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
141
141
  selected?: boolean | undefined;
142
142
  disabled?: boolean | undefined;
143
143
  duotone?: boolean | undefined;
144
- size?: "sm" | "md" | "xs" | undefined;
144
+ size?: "md" | "sm" | "xs" | undefined;
145
145
  } & ({
146
146
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
147
147
  [x: string]: any;
@@ -19,7 +19,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
19
19
  selected?: boolean | undefined;
20
20
  disabled?: boolean | undefined;
21
21
  duotone?: boolean | undefined;
22
- size?: "sm" | "md" | "xs" | undefined;
22
+ size?: "md" | "sm" | "xs" | undefined;
23
23
  } & ({
24
24
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
25
25
  [x: string]: any;
@@ -80,7 +80,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
80
80
  selected?: boolean | undefined;
81
81
  disabled?: boolean | undefined;
82
82
  duotone?: boolean | undefined;
83
- size?: "sm" | "md" | "xs" | undefined;
83
+ size?: "md" | "sm" | "xs" | undefined;
84
84
  } & ({
85
85
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
86
86
  [x: string]: any;
@@ -141,7 +141,7 @@ declare const ChipForm: React__default.ForwardRefExoticComponent<{
141
141
  selected?: boolean | undefined;
142
142
  disabled?: boolean | undefined;
143
143
  duotone?: boolean | undefined;
144
- size?: "sm" | "md" | "xs" | undefined;
144
+ size?: "md" | "sm" | "xs" | undefined;
145
145
  } & ({
146
146
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
147
147
  [x: string]: any;
@@ -6,7 +6,7 @@ type ChipStatusComplementaryVariantType = (typeof ChipStatusComplementaryVariant
6
6
  type ChipStatusComplementarySizeType = (typeof ChipStatusComplementarySizes)[number];
7
7
  declare const chipStatusComplementary: (props?: ({
8
8
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
9
- size?: "sm" | "md" | "xs" | undefined;
9
+ size?: "md" | "sm" | "xs" | undefined;
10
10
  } & ({
11
11
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
12
12
  [x: string]: any;
@@ -6,7 +6,7 @@ type ChipStatusComplementaryVariantType = (typeof ChipStatusComplementaryVariant
6
6
  type ChipStatusComplementarySizeType = (typeof ChipStatusComplementarySizes)[number];
7
7
  declare const chipStatusComplementary: (props?: ({
8
8
  variant?: "zoro" | "ussop" | "crocodile" | "silvers" | "buggy" | "nami" | "shanks" | "piiman" | "sanji" | "ace" | "hancock" | "chopper" | "bentham" | "ivankov" | "brook" | "luffy" | "frankie" | "jinbe" | "robin" | "law" | undefined;
9
- size?: "sm" | "md" | "xs" | undefined;
9
+ size?: "md" | "sm" | "xs" | undefined;
10
10
  } & ({
11
11
  class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
12
12
  [x: string]: any;
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-7NJTMO4L.mjs';import {j}from'./chunk-JCLNR7GH.mjs';import {c as c$2}from'./chunk-WS2F7JWJ.mjs';import {c as c$1}from'./chunk-4DF3NXNT.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as e from'@radix-ui/react-dialog';import*as R from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var W=["sm","md","lg","xl"],T=({...r})=>jsx(e.Root,{...r});T.displayName="Drawer";var S=e.Trigger,B=e.Portal,V=e.Close,v=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Overlay,{ref:o,className:a("fixed inset-0 z-50 bg-neutral-900/60","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=open]:animate-in data-[state=closed]:animate-out","transition-all",r),...a$1}));v.displayName=e.Overlay.displayName;var h=s.forwardRef(({className:r,size:a$1="sm",title:o,description:i,children:f,isLoading:d=false,loadingText:n="",buttons:D,hideHeader:c$1=false,onPointerDownOutside:C,...P},H)=>jsx(B,{children:jsx(v,{children:jsxs(e.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),C?.(m);},ref:H,...!i||c$1?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col overflow-y-auto bg-neutral-50 pl-6 pr-8 pt-10",a$1==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$1==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$1==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$1==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...P,children:[c$1?jsx(R.Root,{children:jsx(j,{children:"Drawer"})}):jsx(x,{title:o,description:i,buttons:D}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:d?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(c,{size:"lg"}),n&&jsx("p",{children:n})]}):f})]})})}));h.displayName="DrawerContent";var x=({className:r,title:a$1,description:o,buttons:i=[],...f})=>jsxs("div",{className:a("mb-7",r),...f,children:[jsxs("div",{className:"flex justify-between gap-2",children:[a$1&&jsx(N,{children:a$1}),!Array.isArray(i)&&i.visible!==false&&jsx(c$1,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:d=true,...n},D)=>d?jsx(c$2,{variant:"ghost",size:"sm",...n},D):null)})]}),o&&jsx(b,{className:"mt-1",children:o})]});x.displayName="DrawerHeader";var O=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});O.displayName="DrawerFooter";var N=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));N.displayName=e.Title.displayName;var b=s.forwardRef(({className:r,...a$1},o)=>jsx(e.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));b.displayName=e.Description.displayName;export{W as a,T as b,S as c,B as d,V as e,v as f,h as g,x as h,O as i,N as j,b as k};
@@ -1 +1 @@
1
- import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-A7OUZRND.mjs';import {a as a$3}from'./chunk-TLIQP6K7.mjs';import {n}from'./chunk-QWBSZY37.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as w from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var q=({value:c,onChange:m,locale:x,disabledDates:D,...T})=>{let[E,f]=useState(false),[a$4,d]=useState(c),[o,P]=useState(),[L,F]=useState("bottom"),[k,y]=useState(0),l=useRef(null),e=useRef(null),[u,H]=useState();a(l,()=>{f(false);});let z=n=>{d(n),m?.(n);},M=useMemo(()=>a$4?format(a$4,"P"):"",[a$4]),N=()=>{d(void 0),m?.(void 0);},t=useCallback(()=>{if(!e.current)return;let n=e.current.getBoundingClientRect();if(!u)return;let i=u.height;y(i),P(n);let O=window.innerHeight-n.bottom>i,B=n.top+n.height>i;F(O?"bottom":B?"top":"bottom");},[e.current,u]);return useEffect(()=>{d(c);},[c]),useEffect(()=>{if(e?.current)return t(),e.current.addEventListener("mousedown",t),e.current.addEventListener("input",t),window.addEventListener("scroll",t,true),window.addEventListener("resize",t),()=>{e.current?.removeEventListener("mousedown",t),e.current?.removeEventListener("input",t),window.removeEventListener("scroll",t,true),window.removeEventListener("resize",t);}},[e.current,t]),useEffect(()=>{H(l.current?.getBoundingClientRect());},[l.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:e,startIcon:jsx(n,{}),onClean:N,readOnly:true,value:M,onClick:n=>{P(n.currentTarget.getBoundingClientRect()),f(i=>!i);},...T}),jsx(w.Root,{asChild:true,children:jsx("div",{ref:l,className:a$2("pointer-events-auto fixed z-50 hidden",E&&"block"),style:o?{top:L==="bottom"?`${o.height+o.y}px`:o.top-k,left:o?.left}:void 0,children:jsx(a$3,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onSelect:z,locale:x,disabled:D})})})]})};q.displayName="DatePicker";export{q as a};
1
+ import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-AYAULBBH.mjs';import {a as a$3}from'./chunk-TLIQP6K7.mjs';import {n}from'./chunk-QWBSZY37.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useCallback,useEffect}from'react';import*as w from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var q=({value:c,onChange:m,locale:x,disabledDates:D,...T})=>{let[E,f]=useState(false),[a$4,d]=useState(c),[o,P]=useState(),[L,F]=useState("bottom"),[k,y]=useState(0),l=useRef(null),e=useRef(null),[u,H]=useState();a(l,()=>{f(false);});let z=n=>{d(n),m?.(n);},M=useMemo(()=>a$4?format(a$4,"P"):"",[a$4]),N=()=>{d(void 0),m?.(void 0);},t=useCallback(()=>{if(!e.current)return;let n=e.current.getBoundingClientRect();if(!u)return;let i=u.height;y(i),P(n);let O=window.innerHeight-n.bottom>i,B=n.top+n.height>i;F(O?"bottom":B?"top":"bottom");},[e.current,u]);return useEffect(()=>{d(c);},[c]),useEffect(()=>{if(e?.current)return t(),e.current.addEventListener("mousedown",t),e.current.addEventListener("input",t),window.addEventListener("scroll",t,true),window.addEventListener("resize",t),()=>{e.current?.removeEventListener("mousedown",t),e.current?.removeEventListener("input",t),window.removeEventListener("scroll",t,true),window.removeEventListener("resize",t);}},[e.current,t]),useEffect(()=>{H(l.current?.getBoundingClientRect());},[l.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:e,startIcon:jsx(n,{}),onClean:N,readOnly:true,value:M,onClick:n=>{P(n.currentTarget.getBoundingClientRect()),f(i=>!i);},...T}),jsx(w.Root,{asChild:true,children:jsx("div",{ref:l,className:a$2("pointer-events-auto fixed z-50 hidden",E&&"block"),style:o?{top:L==="bottom"?`${o.height+o.y}px`:o.top-k,left:o?.left}:void 0,children:jsx(a$3,{className:"w-[20rem] max-w-full",mode:"single",selected:a$4,onSelect:z,locale:x,disabled:D})})})]})};q.displayName="DatePicker";export{q as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-AYAULBBH.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import H,{useId,useRef,useState,useEffect}from'react';import*as x from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var g=56,s=6,D=({options:l,noResults:m,selectedOption:h,onSelect:y,onChange:O,onClick:E,className:S,...P})=>{let R=useId(),n=useRef(null),t=useRef(null),[L,C]=useState("bottom"),[o,I]=useState(),[p,f]=useState(h??null),N=e=>{n.current.style.display="none",t.current.value=e.label,f(e),y?.(e);};return useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let r=g*(l.length<s?l.length:s)+16,c=t.current.getBoundingClientRect();I(c);let T=window.innerHeight-c.bottom>r,k=c.top>r;C(T?"bottom":k?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),useEffect(()=>{function e(r){n.current&&!n.current.contains(r.target)&&(n.current.style.display="none");}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[n.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",S),readOnly:true,ref:t,autoComplete:"off",list:"",selectMode:true,value:p?.label,showClearButton:false,onClick:e=>{n.current.style.display="flex",E?.(e);},onChange:e=>{f(null),O?.(e);},...P}),jsx(x.Root,{asChild:true,children:jsxs("ul",{ref:n,className:"elevation-8 pointer-events-auto absolute z-[10000] my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:o?{width:`${o.width}px`,left:o.left,top:L==="bottom"?`${o.height+o.top+window.scrollY}px`:window.scrollY+o.top-(l.length<s?l.length:s)*g-16}:void 0,children:[l.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[H.cloneElement(m.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:m.message})]}),l.map((e,r)=>jsx("li",{onClick:()=>{e.disabled||N(e);},className:a$1("w-full flex-shrink-0 py-4 pl-4 pr-6 text-left",p?.value===e.value&&"bg-primary-200",e.disabled?"cursor-not-allowed text-neutral-400":"cursor-pointer hover:bg-primary-100"),children:e.label},`select-option-${R}-${e.key??e.value}`))]})})]})};export{D as a};
@@ -0,0 +1 @@
1
+ import {b as b$1}from'./chunk-LBI4WRGE.mjs';import {a,b,c,g,h,d,e as e$1,i,j,f}from'./chunk-TVGC2HAY.mjs';import {e}from'./chunk-QWBSZY37.mjs';import {useMemo}from'react';import {useReactTable,getPaginationRowModel,getCoreRowModel,flexRender}from'@tanstack/react-table';import {jsxs,jsx}from'react/jsx-runtime';function oe({columns:h$1,data:m,rowsCount:l,pagination:i$1,onPaginationChange:p,noResults:N,rowsPerPageText:H="Rows per page",ofText:I="of",onNextPageClick:v,onPreviousPageClick:k,disableNextPage:d$1,disablePreviousPage:T,className:z,onRowsPerPageChange:M,columnOrder:O,columnVisibility:B,rowsPerPageOptions:V,...L}){let t=useReactTable({data:m,columns:h$1,rowCount:l,state:{pagination:i$1,columnOrder:O,columnVisibility:B},onPaginationChange:p,manualPagination:true,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),A=useMemo(()=>T||!!l&&!t.getCanPreviousPage(),[T,l,i$1?.pageIndex]),F=useMemo(()=>d$1||!!l&&!t.getCanNextPage(),[d$1,l,i$1?.pageIndex]);return t.getRowModel().rows?.length?jsxs(a,{className:z,...L,children:[jsxs(b,{children:[jsx("colgroup",{children:t.getHeaderGroups()[0].headers.map(a=>{let o=a.column.getSize()/t.getHeaderGroups()[0].headers.reduce((n,G)=>n+G.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${o}%`,minWidth:`${a.column.getSize()}px`}},a.id)})}),jsx(c,{children:t.getHeaderGroups().map(a=>jsx(g,{children:a.headers.map(o=>{let n=o.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[o.isPlaceholder?null:jsx(b$1,{content:flexRender(n.header,o.getContext()),contentClassName:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1 text-xs uppercase leading-[130%]",children:flexRender(n.header,o.getContext())})}),n.headerInfoTooltip&&jsx(b$1,{size:n.headerInfoTooltipSize,content:n.headerInfoTooltip,contentClassName:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] flex-shrink-0"})})]})},o.id)})},a.id))}),jsx(d,{children:t.getRowModel().rows.map(a=>jsx(e$1,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(o=>jsx(i,{children:flexRender(o.column.columnDef.cell,o.getContext())},o.id))},a.id))})]}),i$1&&p&&m.length>0&&jsx(j,{rowsPerPageOptions:V,rowsCount:l,pagination:i$1,onRowsPerPageChange:a=>{t.setPageSize(a),t.setPageIndex(0),M?.(a);},onPreviousPageClick:()=>{t.previousPage(),k?.();},onNextPageClick:()=>{t.nextPage(),v?.();},disableNextPage:F,disablePreviousPage:A,ofText:I,rowsPerPageText:H})]}):jsx(f,{...N})}export{oe as a};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-SVUSHVWV.mjs';import {q,d,g as g$1}from'./chunk-QWBSZY37.mjs';import {a}from'./chunk-2WINTZSS.mjs';import g,{forwardRef,useId,useRef,useState,useCallback,useEffect}from'react';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var U=forwardRef(({label:x,placeholder:y,error:t,selectMode:b=false,showClearButton:H=true,helperText:M,className:I,size:e="md",onClean:P,onChange:f,startIcon:u,endIcon:p,startComponent:c,fixedTopLabel:C,startText:i,disabled:o,required:v,...D},m)=>{let w=useId(),l=useRef(null),[s,h]=useState(false),T=!l.current?.value,F=useCallback(()=>{if(l.current&&!o){l.current.value="",h(false),P?.();let a={target:l.current,currentTarget:l.current,type:"change",bubbles:true,cancelable:false,defaultPrevented:false,eventPhase:0,isTrusted:true,preventDefault:()=>{},stopPropagation:()=>{},persist:()=>{},isDefaultPrevented:()=>false,isPropagationStopped:()=>false,timeStamp:Date.now(),nativeEvent:new Event("change")};f?.(a);}},[o,f,l.current]);return useEffect(()=>{l.current&&h(l.current.value.length>0);},[]),jsxs("div",{className:a("flex flex-col",I),children:[jsxs("div",{className:a("relative flex flex-col rounded-lg bg-neutral-50",e==="lg"&&"h-12",e==="md"&&"h-10",e==="sm"&&"h-8"),children:[jsx("input",{id:w,disabled:o,required:v,className:a("hover:caret-neutral-text-neutral-600 hover:ring-neutral-text-neutral-600 hover:text-neutral no-spinner peer absolute z-20 h-full w-full rounded-lg bg-neutral-50/0 text-left tracking-normal text-neutral-900 placeholder-neutral-500/100 caret-neutral-900 outline-0 ring-1 ring-inset ring-neutral-400 transition-all ease-linear focus:text-neutral-900 focus:placeholder-neutral-500 focus:placeholder-opacity-100 focus:caret-primary-800 focus:ring-[2px] focus:ring-primary-800 disabled:bg-neutral-80 disabled:text-neutral-400 disabled:ring-neutral-100 [&:not(:placeholder-shown)]:z-10",x&&"placeholder-neutral-500/0",t&&"placeholder-error-700/0 ring-error-700 hover:text-neutral-900 hover:ring-error-700 focus:ring-error-700",e==="lg"&&"text-base",e==="md"&&"text-sm",e==="sm"&&"text-sm",u?e==="lg"?"pl-[2.75rem]":"pl-[2.38rem]":c?"pl-[6.5rem]":"pl-4",i&&"pl-[1.94rem]",p?e==="lg"?"pr-[2.75rem]":"pr-[2.38rem]":"pr-4"),placeholder:y??"",ref:a=>{typeof m=="function"?m(a):m&&(m.current=a),l.current=a;},onChange:a=>{h(a.target.value.length>0),f?.(a);},...D}),c&&g.cloneElement(c,{className:a("absolute z-20 flex left-3 top-1/2 transform -translate-y-1/2 items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),u&&g.cloneElement(u,{size:18,className:a("absolute flex peer-focus:text-neutral-900 z-20 text-neutral-500 left-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),i&&jsx("div",{className:"flex h-full items-center pl-3",children:jsx("p",{className:a("text-neutral-700",t&&"text-error-700"),children:i})}),x&&jsxs(Label,{htmlFor:w,className:a("absolute -top-[0.5625rem] z-10 ml-3 bg-neutral-50 px-1 tracking-normal text-neutral-50 transition-all duration-75 ease-linear peer-hover:text-primary-800 peer-disabled:z-20 peer-disabled:text-neutral-400","peer-focus:-top-[0.5625rem] peer-focus:z-20 peer-focus:ml-3 peer-focus:text-xs peer-focus:text-primary-800 peer-[:placeholder-shown]:peer-[:not(:focus)]:peer-[:disabled]:bg-neutral-80",!t&&"peer-[:not(:focus)]:peer-[:not(:disabled)]:text-neutral-400 peer-[:not(:placeholder-shown)]:peer-[:not(:focus)]:peer-[:not(:disabled)]:text-neutral-900",s&&"peer-disabled:bg-neutral-80",e==="lg"?"text-base placeholder-shown:text-xs peer-placeholder-shown:top-3":e==="md"?"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-2.5":"text-sm placeholder-shown:text-xs peer-placeholder-shown:top-1.5",!T&&"text-xs",t&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700",u?e==="lg"?"peer-placeholder-shown:ml-[2.75rem]":"peer-placeholder-shown:ml-[2.38rem]":c?"peer-placeholder-shown:ml-[6rem]":"ml-3",C&&"!-top-[0.375rem] z-20 ml-3 !text-xs !transition-none",i&&"peer-placeholder-shown:ml-[1.94rem]"),children:[v&&"*",x]}),(H&&(!T||s)||t)&&jsxs("div",{className:a("absolute z-10 hidden h-full items-center peer-focus:flex",t&&!o&&"flex",b||p?e==="lg"?"right-[2.81rem]":e==="md"?"right-[2.125rem]":"right-[1.875rem]":"right-4"),children:[t&&jsx(q,{size:e==="sm"?14:18,className:"text-error-700"}),!t&&jsx(d,{onMouseDown:F,size:e==="sm"?14:18,className:"cursor-pointer text-neutral-900"})]}),p&&g.cloneElement(p,{size:e==="sm"?14:18,className:a("absolute peer-focus:text-neutral-900 z-20 text-neutral-500 flex right-3 h-full items-center rounded-full peer-disabled:text-neutral-400",t&&!s&&"text-error-700 peer-hover:text-error-700 peer-focus:text-error-700")}),b&&jsx("div",{className:a("peer-hover:text-neutral absolute right-4 z-20 flex h-full items-center rounded-full transition-all ease-linear peer-focus:rotate-180 peer-focus:text-primary-900 peer-disabled:text-neutral-400"),children:jsx(g$1,{className:e==="lg"?"h-6 w-6":"h-4.5 w-4.5"})})]}),jsx(a$1,{helperText:M,error:t,disabled:o})]})});export{U as a};
@@ -0,0 +1 @@
1
+ import {a,b,c,d,e,f as f$1,g,h,i}from'./chunk-E5G7444M.mjs';import {a as a$2}from'./chunk-AYAULBBH.mjs';import {g as g$1}from'./chunk-QWBSZY37.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import J,{useId,useRef,useState,useEffect}from'react';import*as H from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var k=56,f=6,Q=[{id:0,code:"+56",name:"Chile",flag:a,country:"CL"},{id:1,code:"+54",name:"Argentina",flag:b,country:"AR"},{id:2,code:"+57",name:"Colombia",flag:c,country:"CO"},{id:3,code:"+502",name:"Guatemala",flag:d,country:"GT"},{id:4,code:"+52",name:"Mexico",flag:e,country:"MX"},{id:5,code:"+51",name:"Per\xFA",flag:f$1,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:g,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:h,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:i,country:"US"}],fe=({options:o=Q,noResults:w,selectedOption:B,onSelect:U,onChange:x,onClick:W,className:G,defaultCountry:v="CL",initialValue:s,size:A="md",...i})=>{let $=useId(),c=useRef(null),r=useRef(null),[z,D]=useState("bottom"),[d,Y]=useState(),[_,V]=useState(-1),[a,y]=useState(B??null),[h,E]=useState(""),X=e=>{let t={target:{value:e.code+h}};x?.(t),c.current.style.display="none",r.current.value=e.code,y(e),U?.(e);};return useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let t=k*(o.length<f?o.length:f)+16,m=r.current.getBoundingClientRect();Y(m);let j=window.innerHeight-m.bottom>t,q=m.top>t;D(j?"bottom":q?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",V(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[c.current]),useEffect(()=>{if(v&&!s){let e=o.find(t=>t.country===v)??null;y(e);}},[v,s]),useEffect(()=>{if(s){let e=o.find(t=>s.includes(t.code))??null;y(e),E(s.replace(e?.code??"",""));}},[s]),jsx("div",{className:a$1("flex flex-col",G),children:jsxs("div",{className:a$1("relative flex flex-col"),children:[jsx(a$2,{ref:r,value:h,placeholder:i.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");E(t);let m={target:{value:a?.code&&!t.includes(a.code)?a?.code+t:t}};x?.(m);},startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{i.disabled||(c.current.style.display="flex");},children:[jsx("img",{src:a?.flag,alt:a?.country,className:a$1("h-6 w-6 cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$1("ml-1",i.disabled&&"cursor-not-allowed text-neutral-400"),children:a?.code}),jsx(g$1,{className:a$1(A==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")})]}),...i}),jsx(H.Root,{asChild:true,children:jsxs("ul",{ref:c,className:"elevation-8 pointer-events-auto absolute z-[10000] my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:d?{width:`${d.width}px`,left:d.left,top:z==="bottom"?`${d.height+d.top+window.scrollY}px`:window.scrollY+d.top-(o.length<f?o.length:f)*k-16}:void 0,children:[o.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[J.cloneElement(w.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:w.message})]}),o.map((e,t)=>jsx("li",{onClick:()=>{X(e);},className:a$1("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",a?.code===e.code&&"bg-primary-200",_===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a$1("flex items-center space-x-3"),children:[jsx("img",{src:e.flag,alt:e.country,className:"h-6 w-6"}),jsx("p",{children:e.name}),jsx("p",{className:"text-primary-500",children:`(${e.code})`})]})},`select-option-${$}-${e.id??e.code}`))]})})]})})};export{fe as a};
@@ -0,0 +1 @@
1
+ import {a as a$4}from'./chunk-KTRSJBA4.mjs';import {c as c$3}from'./chunk-WS2F7JWJ.mjs';import {a as a$3}from'./chunk-AYAULBBH.mjs';import {c as c$2}from'./chunk-WB5ZPQ7L.mjs';import {d}from'./chunk-GZ2UJSIO.mjs';import {a}from'./chunk-WGMDH4XX.mjs';import {a as a$2}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-4DF3NXNT.mjs';import {c as c$1,h}from'./chunk-QWBSZY37.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import ut,{createContext,useMemo,useCallback,useContext,useRef,useEffect,useState,useId}from'react';import*as Rt from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var $t=({title:t,titleLines:o=2,description:e,descriptionLines:r=1,Icon:l,iconAsColumn:n=true,className:a,...i})=>jsxs("div",{className:a$1("flex gap-2 py-4 pl-4 pr-6",n&&"flex-col items-center gap-1",!n&&!e&&"items-center"),...i,children:[l&&jsx(l,{className:a$1("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$1("flex flex-col gap-1",n&&"text-center"),children:[jsx("p",{className:a$1("leading-[130%] text-neutral-500",!!e&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),e&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:e})]})]}),at=$t;var qt=ut.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:e,noResultsDescription:r,noResultsDescriptionLines:l,noResultsAsColumn:n,noResultsButtonOnClick:a$2,optionDescriptionLines:i,noResultsButtonLabel:s,filteredOptions:d,inputRect:c$1,inputRef:u,popoverPosition:y,optionsListRef:v,selectedOption:b,options:k,setFilteredOptions:x})=>jsx(Rt.Root,{asChild:true,children:jsxs("div",{ref:v,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:c$1?{width:`${c$1.width}px`,left:c$1.left,top:y==="bottom"?`${c$1.bottom}px`:void 0,bottom:y==="top"?`${window.innerHeight-c$1.top}px`:void 0}:void 0,children:[d.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:e,description:r,Icon:o,iconAsColumn:n,descriptionLines:l}),a$2&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:g=>{v.current.style.display="none",u.current.value="",x(k),a$2();},children:s})]})]}),d.map(g=>jsx(Mt,{title:g.label,disabled:g.disabled,description:g.description,descriptionLines:i,onClick:()=>t(g),className:a$1(b?.value===g.value&&"bg-primary-200")},g.key??g.value))]})})),Ct=qt;var Kt=336,ar=({options:t,defaultSelectedOption:o,onSelect:e,onClick:r,onInputChange:l,error:n,helperText:a,label:i,placeholder:s,value:d,size:c="md",optionDescriptionLines:u=1,noResultsLabel:y,noResultsIcon:v,noResultsDescription:b,noResultsDescriptionLines:k,noResultsAsColumn:x,noResultsButtonOnClick:g,noResultsButtonLabel:T,className:h,disabled:A})=>{let[p,L]=useState(o??null),R=useRef(null),w=useRef(null),[nt,st]=useState(),[lt,N]=useState([]),[ct,B]=useState("bottom"),[G,Z]=useState(),U=Kt,X=useCallback(f=>{R.current.style.display="none",w.current.value=f.label,L(f),e?.(f);},[e]),C=useCallback(()=>{if(!w?.current)return;let f=w.current.getBoundingClientRect();st(f);let O=G?G.height:U,M=window.innerHeight-f.bottom>O,tt=f.top>O;B(M?"bottom":tt?"top":"bottom");},[G?.height]),$=useCallback(()=>{let f=t.filter(O=>O.label.toLowerCase().includes(w?.current?.value.toLowerCase()??""));if(N(f),R?.current){let O=R.current.getBoundingClientRect();Z(O);}},[t]);return useEffect(()=>{N(t);},[t]),useEffect(()=>{if(!d){L(null),w.current&&(w.current.value="");return}(!w.current?.value||p?.value!==d.value)&&(L(d),w.current.value=d.label);},[d]),a$4(R,()=>{R.current.style.display="none",p&&w.current&&(w.current.value=p.label);}),useEffect(()=>{if(w?.current)return C(),w.current.addEventListener("mousedown",C),w.current.addEventListener("input",$),window.addEventListener("scroll",C,true),window.addEventListener("resize",C),()=>{w.current?.removeEventListener("mousedown",C),w.current?.removeEventListener("input",$),window.removeEventListener("scroll",C,true),window.removeEventListener("resize",C);}},[C,$]),jsxs("div",{className:a$1("relative",h),children:[jsx(a$3,{ref:w,autoComplete:"off",list:"",selectMode:true,onChange:f=>{f.target.value||(L(null),e?.(null)),l?.(f);},onClean:()=>{L(null),N(t),e?.(null);},onClick:f=>{R.current.style.display="flex",r?.(f);},onBlur:()=>{p&&w.current&&(w.current.value=p.label);},label:i,helperText:a,placeholder:s,size:c,error:n,disabled:A}),jsx(Ct,{handleSelect:X,noResultsLabel:y,NoResultsIcon:v,optionDescriptionLines:u,noResultsAsColumn:x,noResultsButtonLabel:T,noResultsButtonOnClick:g,noResultsDescription:b,noResultsDescriptionLines:k,filteredOptions:lt,inputRect:nt,inputRef:w,popoverPosition:ct,optionsListRef:R,selectedOption:p,options:t,setFilteredOptions:N})]})};var Zt=({children:t,title:o,titleLines:e,description:r="",descriptionLines:l,disabled:n=false,className:a,...i})=>jsxs("div",{className:"flex w-full flex-col gap-1",...i,children:[jsx("p",{className:a$1("break-all text-sm leading-[130%]",!!r&&"font-medium"),style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:o}),r&&jsx("p",{className:a$1("text-xs leading-[130%]",n?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:r})]}),F=Zt;var br=({children:t,title:o,titleLines:e,description:r="",descriptionLines:l,startIcon:n,badgeContent:a,hasDivider:i=false,disabled:s=false,onSelect:d,className:c,...u})=>jsxs(D,{hasDescription:!!r,disabled:s,onClick:d,hasDivider:i,className:a$1(!s&&"cursor-pointer",c),...u,children:[n&&ut.cloneElement(n,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(F,{title:o,titleLines:e,description:r,descriptionLines:l,disabled:s}),jsxs("div",{className:"ml-4 flex gap-2",children:[a&&jsx(a$2,{content:a,size:"lg",variant:"alert",className:a$1("self-center",s&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:e=1,description:r="",descriptionLines:l,startIcon:n,hasDivider:a=false,disabled:i=false,checked:s,onCheckedChange:d,className:c,...u})=>jsxs(D,{hasDescription:!!r,disabled:i,hasDivider:a,...u,className:a$1("pr-6",c),children:[n&&ut.cloneElement(n,{className:"shrink-0 w-4.5 h-4.5 mr-2"}),jsx(F,{title:o,titleLines:e,description:r,descriptionLines:l,disabled:i}),jsx(c$2,{size:"sm",checked:s,onCheckedChange:d,className:"ml-4 self-center",disabled:i})]});var E=336,Dt=createContext({inputRef:null,optionsListRef:null,autocompleteId:"",inputRect:void 0,showChips:false,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),P=()=>{let t=useContext(Dt);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Tt=({children:t})=>{let o=useRef(null),e=useRef(null),r=useId(),[l,n]=useState(),[a,i]=useState(true),[s,d]=useState([]),[c,u]=useState(-1),[y,v]=useState("bottom"),[b,k]=useState(),[x,g]=useState(E);return jsx(Dt.Provider,{value:{optionsListRef:o,inputRef:e,autocompleteId:r,inputRect:l,showChips:a,filteredOptions:s,currentFocus:c,popoverPosition:y,setFilteredOptions:d,setCurrentFocus:u,setShowChips:i,setPopoverPosition:v,setInputRect:n,optionsListHeight:x,optionsListRect:b,setOptionsListRect:k,setOptionsListHeight:g},children:t})};var de=({option:t,onMountWidth:o,size:e})=>{let r=useRef(null);return useEffect(()=>{r.current&&o?.(r.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:r,className:"flex-shrink-0",size:e==="md"?"xs":"sm",hasCloseIcon:false,children:t.label})},Ht=de;var me=150,ue=ut.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:e,disabled:r,size:l})=>{let{autocompleteId:n,inputRect:a,inputRef:i,optionsListRef:s}=P(),d=ut.useRef(null),[c,u]=ut.useState(new Map),y=useMemo(()=>{if(!a?.width)return [];let b=0,k=a.width-me,x=0;for(let g=0;g<t.length&&(x+=c.get(g)??0,!(x>k));g++)b++;return t.slice(0,b)},[a?.width,t,c]),v=useCallback(()=>{r||(i?.current?.focus(),s.current.style.display="flex");},[r]);return jsxs("div",{onClick:v,className:a$1("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",r&&"cursor-not-allowed"),style:{maxWidth:a?.width?a?.width:void 0,height:a?.height?a?.height:void 0},children:[jsx("div",{className:"flex flex-1 gap-1 overflow-hidden",ref:d,children:y.map((b,k)=>jsx(Ht,{option:b,onMountWidth:x=>u(g=>new Map(g).set(k,x)),size:l},`chip-input-${n}-${b.value}`))}),t.length>y.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$2,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:b=>{b.stopPropagation(),e();}})]})}),Nt=ue;var ve=ut.memo(({option:t,index:o,onPressOption:e,isSelected:r,optionDescriptionLines:l})=>{let{currentFocus:n,inputRef:a}=P();return jsx(St,{title:t.label,checked:r,disabled:t.disabled,className:n===o?"bg-primary-200":void 0,onMouseDown:i=>{t.disabled||(a?.current?.value&&i.preventDefault(),e?.(t,i));},description:t.description,descriptionLines:l})}),bt=ve;var ze=ut.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:e,noResultsLabel:r,noResultsDescription:l,noResultsDescriptionLines:n,noResultsAsColumn:a$1,noResultsButtonOnClick:i,optionDescriptionLines:s,noResultsButtonLabel:d})=>{let{popoverPosition:c$1,optionsListRef:u,filteredOptions:y,inputRect:v,autocompleteId:b,inputRef:k,optionsListHeight:x}=P(),g=useCallback(h=>t.some(A=>A.value===h.value),[t]),T=useMemo(()=>t.filter(h=>h.label.toLowerCase().includes(k?.current?.value.toLowerCase()??"")),[t,k?.current?.value]);return jsx(Rt.Root,{asChild:true,children:jsxs("div",{ref:u,className:"elevation-8 pointer-events-auto fixed z-50 mb-2 hidden w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:v?{width:`${v.width}px`,left:v.left,top:c$1==="bottom"?`${v.bottom}px`:void 0,bottom:c$1==="top"?`${window.innerHeight-v.top}px`:void 0,maxHeight:x+"px"}:void 0,children:[y.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col justify-center rounded-lg bg-neutral-50",children:[jsx(at,{title:r,description:l,Icon:e,iconAsColumn:a$1,descriptionLines:n}),i&&jsxs(Fragment,{children:[jsx(a,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:h=>{u.current.style.display="none",k.current.value="",i();},children:d})]})]}),T.map((h,A)=>jsx(bt,{option:h,index:A,onPressOption:p=>o(p),isSelected:g(h),optionDescriptionLines:s},`autocomplete-option-${b}-${h.key??h.value}`)),y.map((h,A)=>!t.some(p=>p.value===h.value)&&jsx(bt,{option:h,index:A,onPressOption:p=>o(p),isSelected:g(h),optionDescriptionLines:s},`autocomplete-option-${b}-${h.key??h.value}`))]})})}),Xt=ze;var Ce=ut.memo(({selectedOptions:t,onSelect:o,error:e,helperText:r,label:l,placeholder:n,options:a,onInputChange:i,size:s,disabled:d})=>{let{setCurrentFocus:c,setFilteredOptions:u,optionsListRef:y,inputRef:v}=P();return jsx(a$3,{ref:v,autoComplete:"off",list:"",disabled:d,selectMode:true,onChange:b=>{c(-1),i?.(b.target.value);},onClean:()=>{c(-1),u(a),o?.(null,t);},onClick:()=>{d||(y.current.style.display="flex");},error:e,helperText:r,label:l,placeholder:n,fixedTopLabel:t.length>0,size:s})}),Yt=Ce;var Wt=({options:t,defaultSelectedOptions:o,onSelect:e,error:r,helperText:l,label:n,placeholder:a,noResultsLabel:i,noResultsIcon:s,noResultsDescription:d,noResultsDescriptionLines:c,noResultsAsColumn:u,noResultsButtonOnClick:y,noResultsButtonLabel:v,className:b,onInputChange:k,value:x,loading:g,size:T="md",optionDescriptionLines:h=1,disabled:A})=>{let{inputRef:p,optionsListRef:L,setFilteredOptions:R,setShowChips:w,setInputRect:nt,setPopoverPosition:st,setCurrentFocus:lt,showChips:N,setOptionsListRect:ct,optionsListRect:B,setOptionsListHeight:G}=P(),Z=useRef(false),[U,X]=useState(o??[]),C=useCallback(z=>{X(I=>{let S,_=I.findIndex(Ut=>Ut.value===z.value);return _===-1?(S=I.concat(z),e?.(z,S),S):(S=I.toSpliced(_,1),e?.(z,S),S)});},[e]),$=useCallback(()=>{X([]),R(t),e?.(null,[]);},[]),f=useCallback(()=>{w(false);},[]),O=useCallback(()=>{w(true);},[]),M=useCallback(()=>{if(!p?.current)return;let z=p.current.getBoundingClientRect();nt(z);let I=B?B.height>E?E:B.height:E,S=window.innerHeight-z.bottom>I,_=z.top>I;st(S?"bottom":_?"top":"bottom"),G(_?E:window.innerHeight-z.bottom>E?E:window.innerHeight-z.bottom);},[B?.height]),tt=useCallback(()=>{let z=t.filter(I=>I.label.toLowerCase().includes(p?.current?.value.toLowerCase()??""));if(R(z),L?.current){let I=L.current.getBoundingClientRect();ct(I);}},[t,L?.current]);return useEffect(()=>{R(t);},[t]),a$4(L,()=>{L.current.style.display="none",lt(-1);}),useEffect(()=>{if(p?.current)return M(),p.current.addEventListener("mousedown",M),p.current.addEventListener("input",tt),p.current.addEventListener("focusin",f),p.current.addEventListener("focusout",O),window.addEventListener("scroll",M,true),window.addEventListener("resize",M),()=>{p.current?.removeEventListener("mousedown",M),p.current?.removeEventListener("input",M),p.current?.removeEventListener("focusout",O),p.current?.removeEventListener("focusin",f),window.removeEventListener("scroll",M,true),window.removeEventListener("resize",M);}},[M,O,f,tt]),useEffect(()=>{x&&(X(x),w(true));},[x]),useEffect(()=>{g||o&&o.length&&!Z.current&&(X(o),Z.current=true,w(true));},[o,g]),jsxs("div",{className:a$1("relative",b),children:[jsx(Yt,{selectedOptions:U,onSelect:e,error:r,helperText:l,label:n,placeholder:a,handleSelect:C,options:t,onInputChange:k,size:T,disabled:A}),N&&jsx(Nt,{selectedOptions:U,disabled:A,error:r,onCleanSelectedOptions:$,size:T}),jsx(Xt,{handleSelect:C,selectedOptions:U,noResultsLabel:i,NoResultsIcon:s,optionDescriptionLines:h,noResultsAsColumn:u,noResultsButtonLabel:v,noResultsButtonOnClick:y,noResultsDescription:d,noResultsDescriptionLines:c})]})};var Po=t=>jsx(Tt,{children:jsx(Wt,{...t})});var Xo=({children:t,title:o,titleLines:e=1,description:r,descriptionLines:l=1,StartIcon:n,hasDivider:a=false,disabled:i=false,actionButton:s,isSelected:d=false,className:c$1,...u})=>jsxs(D,{hasDescription:!!r,disabled:i,hasDivider:a,isSelected:d,...u,className:c$1,children:[n&&jsx(n,{className:"mr-2 h-4.5 w-4.5 shrink-0 flex-grow-0"}),jsx(F,{title:o,titleLines:e,description:r,descriptionLines:l,disabled:i}),s&&jsx(Fragment,{children:s.isIcon?jsx(c$3,{...s,className:"ml-4 self-center",variant:"ghost",size:"sm",disabled:i??s.disabled}):jsx(c,{...s,className:"ml-4 self-center",size:"sm",variant:"ghost",disabled:i??s.disabled})})]});var Se=({children:t,hasDescription:o=false,disabled:e=false,hasDivider:r=false,className:l,isSelected:n,onClick:a$2,...i})=>jsxs(Fragment,{children:[jsx("div",{className:a$1("flex flex-row px-3 py-4 text-neutral-900 transition-colors",o?"py-3":"py-[0.875rem]",e?"cursor-not-allowed text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",n&&"bg-primary-200",l),onClick:s=>{e||a$2?.(s);},...i,children:t}),r&&jsx(a,{})]}),D=Se;var Mt=({children:t,title:o,titleLines:e,description:r="",descriptionLines:l,startIcon:n,endIcon:a,hasDivider:i=false,disabled:s=false,isSelected:d=false,className:c,...u})=>jsxs(D,{hasDescription:!!r,disabled:s,hasDivider:i,className:c,isSelected:d,...u,children:[n&&ut.cloneElement(n,{className:"shrink-0 mr-2 h-4.5 w-4.5"}),jsx(F,{title:o,titleLines:e,description:r,descriptionLines:l,disabled:s}),a&&ut.cloneElement(a,{className:"min-h-4.5 min-w-4.5 self-center ml-4"})]});export{ar as a,Mt as b,br as c,St as d,Po as e,Xo as f};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {c}from'./chunk-4DF3NXNT.mjs';import {d}from'./chunk-QWBSZY37.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as r from'react';import*as t from'@radix-ui/react-dialog';export{t as a };import {jsx,jsxs}from'react/jsx-runtime';var b=t.Root,B=t.Trigger,D=t.Portal,v=t.Close,f=r.forwardRef(({className:e,...i},l)=>jsx(t.Overlay,{ref:l,className:a("fixed inset-0 z-50 bg-neutral-900/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...i}));f.displayName=t.Overlay.displayName;var u=r.forwardRef(({className:e,children:i,onPointerDownOutside:l,...p},g)=>jsx(D,{children:jsx(f,{children:jsx(t.Content,{onPointerDownOutside:n=>{n.target instanceof Element&&n.target.closest(".pac-container")&&n.preventDefault(),l?.(n);},ref:g,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid max-h-[80vh] w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] overflow-y-auto rounded-2xl bg-neutral-50 py-3 pr-0 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...p,children:i})})}));u.displayName=t.Content.displayName;var P=({className:e,...i})=>jsx("div",{className:a("mb-4 ml-6 mr-4 flex flex-col gap-4 text-left",e),...i});P.displayName="DialogHeader";var y=({className:e,...i})=>jsxs("div",{children:[jsx(a$1,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...i})]});y.displayName="DialogFooter";var E=({className:e,...i})=>jsx("div",{className:a("mx-6 mb-4.5",e),...i}),R=r.forwardRef(({className:e,...i},l)=>jsxs("div",{className:"flex items-center justify-between",children:[jsx(t.Title,{ref:l,className:a("pr-2 font-jakarta text-lg font-semibold leading-[160%]",e),...i}),jsxs(t.Close,{className:"h-5.5 w-5.5",children:[jsx(d,{className:"h-5.5 w-5.5"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));R.displayName=t.Title.displayName;var C=r.forwardRef(({className:e,...i},l)=>jsx(t.Description,{ref:l,className:a("font-inter text-sm font-normal leading-[130%]",e),...i}));C.displayName=t.Description.displayName;var H=e=>jsx(c,{variant:"contained",...e}),O=e=>jsx(v,{asChild:true,children:jsx(c,{variant:"secondary",...e})}),F=e=>jsx(c,{variant:"ghost",...e});export{b,B as c,D as d,f as e,u as f,P as g,y as h,E as i,R as j,C as k,H as l,O as m,F as n};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a,b,c,d,e,f,g,h,i as i$1}from'./chunk-E5G7444M.mjs';import {a as a$3}from'./chunk-AYAULBBH.mjs';import {g as g$1}from'./chunk-QWBSZY37.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import _,{useId,useRef,useState,useEffect,useMemo}from'react';import*as I from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var L=56,p=6,q=(t=>(t.CL="CL",t.AR="AR",t.CO="CO",t.GT="GT",t.MX="MX",t.PE="PE",t.BR="BR",t.UY="UY",t.US="US",t))(q||{}),M=new Map([["CL",{name:"Chile",flag:a}],["AR",{name:"Argentina",flag:b}],["CO",{name:"Colombia",flag:c}],["GT",{name:"Guatemala",flag:d}],["MX",{name:"Mexico",flag:e}],["PE",{name:"Per\xFA",flag:f}],["BR",{name:"Brasil",flag:g}],["UY",{name:"Uruguay",flag:h}],["US",{name:"Estados Unidos",flag:i$1}]]),i=Array.from(M.entries()),de=({noResults:g,selectedCountry:d,onSelect:S,className:U,size:B="md",...m})=>{let A=useId(),l=useRef(null),r=useRef(null),[t,G]=useState("bottom"),[s,H]=useState(),[Y,$]=useState(-1),k=e=>{l.current.style.display="none",S?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=L*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();H(c);let z=window.innerHeight-c.bottom>a,X=c.top>a;G(z?"bottom":X?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",$(-1));});let x=useMemo(()=>M.get(d),[d]);return jsx("div",{className:a$2("flex flex-col",U),children:jsxs("div",{className:a$2("relative flex flex-col"),children:[jsx(a$3,{ref:r,startComponent:jsxs("div",{className:"z-[100000] ml-3 flex h-2 w-[7.5rem] cursor-pointer items-center",onClick:()=>{m.disabled||(l.current.style.display="flex");},children:[jsx("img",{src:x?.flag,alt:x?.name,className:a$2("h-6 w-6 cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a$2("ml-1",m.disabled&&"cursor-not-allowed text-neutral-400"),children:d}),jsx(g$1,{className:a$2(B==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",m.disabled&&"cursor-not-allowed text-neutral-400")})]}),...m}),jsx(I.Root,{asChild:true,children:jsxs("ul",{ref:l,className:"elevation-8 pointer-events-auto absolute z-[10000] my-2 hidden max-h-[336px] w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",style:s?{width:`${s.width}px`,left:s.left,top:t==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*L-16}:void 0,children:[i.length===0&&jsxs("div",{className:"elevation-8 max-h-88 flex flex-1 flex-col items-center justify-center rounded-lg bg-neutral-50 px-8 py-6",children:[_.cloneElement(g.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:g.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{k(e);},className:a$2("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",d===e&&"bg-primary-200",Y===c&&"bg-primary-200"),children:jsxs("div",{className:a$2("flex items-center space-x-3"),children:[jsx("img",{src:a.flag,alt:a.name,className:"h-6 w-6"}),jsx("p",{children:a.name}),jsx("p",{className:"text-primary-500",children:`(${e})`})]})},`select-option-${A}-${e}`))]})})]})})};export{q as a,de as b};
@@ -1 +1 @@
1
- import {a}from'./chunk-A7OUZRND.mjs';import {p}from'./chunk-QWBSZY37.mjs';import {jsx}from'react/jsx-runtime';var i=({size:t="md",...p$1})=>jsx(a,{endIcon:jsx(p,{}),type:"search",...p$1,size:t});export{i as a};
1
+ import {a}from'./chunk-AYAULBBH.mjs';import {p}from'./chunk-QWBSZY37.mjs';import {jsx}from'react/jsx-runtime';var i=({size:t="md",...p$1})=>jsx(a,{endIcon:jsx(p,{}),type:"search",...p$1,size:t});export{i as a};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-4DF3NXNT.mjs';import {i,h}from'./chunk-QWBSZY37.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as r from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{ref:l,className:a("flex flex-col overflow-hidden rounded-2xl bg-neutral-50 ring-1 ring-primary-200",e),...a$1}));x.displayName="TableContainer";var N=r.forwardRef(({className:e,...a$1},l)=>jsx("div",{className:a("relative w-full overflow-x-auto",e),children:jsx("table",{ref:l,className:"w-full table-auto overflow-hidden text-neutral-900",...a$1})}));N.displayName="Table";var g=r.forwardRef(({className:e,...a},l)=>jsx("thead",{ref:l,className:e,...a}));g.displayName="TableHeader";var H=r.forwardRef(({className:e,...a},l)=>jsx("tbody",{ref:l,className:e,...a}));H.displayName="TableBody";var w=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("text-sm font-normal leading-[130%]",e),...a$1}));w.displayName="TableBodyRow";var L=r.forwardRef(({Icon:e,icon:a$1,title:l,description:m,className:s,button:n,...d},b)=>jsxs("div",{ref:b,...d,className:a("flex flex-col items-center justify-center py-10 text-neutral-500",s),children:[a$1&&r.cloneElement(a$1,{className:"text-neutral-300 w-6 h-6"}),e&&jsx(e,{className:"h-6 w-6 text-neutral-300"}),jsx("span",{className:"mt-2 text-sm font-semibold leading-[130%]",children:l}),m&&jsx("span",{className:"mt-0.5 text-sm leading-[130%]",children:m}),n&&jsx(c,{size:"sm",...n,className:a("mt-3",n.className)})]}));L.displayName="TableNoResults";var y=r.forwardRef(({className:e,...a$1},l)=>jsx("tr",{ref:l,className:a("bg-primary-100",e),...a$1}));y.displayName="TableHeaderRow";var M=r.forwardRef(({className:e,...a$1},l)=>jsx("th",{ref:l,className:a("h-10 px-3 py-1 text-left text-sm font-semibold uppercase leading-[130%]",e),...a$1}));M.displayName="TableHead";var v=r.forwardRef(({className:e,...a$1},l)=>jsx("td",{ref:l,className:a("h-18 px-3 py-1",e),...a$1}));v.displayName="TableCell";var S=({disableNextPage:e,disablePreviousPage:a$1,onNextPageClick:l,onPreviousPageClick:m,pagination:s,rowsCount:n,rowsPerPageText:d="Rows per page",ofText:b="of",onRowsPerPageChange:u,rowsPerPageOptions:R=[10,20,50]})=>jsxs("div",{className:"flex h-8 flex-1 items-center justify-end gap-6 border-t-1 border-t-primary-200",children:[jsxs("div",{className:"flex items-center",children:[jsx("span",{className:"mr-2 text-sm font-semibold leading-[130%] text-neutral-700",children:`${d}:`}),jsx("select",{className:"text-sm leading-[130%]",value:s.pageSize,id:"rows_per_page",onChange:i=>{u?.(Number(i.target.value));},children:R.map(i=>jsx("option",{children:i},i))})]}),!!n&&jsx("span",{className:"text-sm font-normal leading-[130%] text-neutral-700",children:`${s?.pageIndex*s.pageSize+1}-${n>s?.pageIndex*s.pageSize+s.pageSize?s?.pageIndex*s.pageSize+s.pageSize:n} ${b} ${n}`}),!n&&jsx("span",{className:"text-sm font-normal leading-[120%] tracking-sm text-neutral-700",children:`${s.pageIndex>0?"... ":""}${s.pageIndex+1}${e?"":" ..."}`}),jsxs("div",{className:"flex items-center",children:[jsx("button",{type:"button",disabled:a$1,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:m,children:jsx(i,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",a$1&&"text-neutral-500")})}),jsx("button",{type:"button",disabled:e,className:"flex h-8 cursor-pointer items-center px-3 disabled:cursor-not-allowed",onClick:l,children:jsx(h,{className:a("h-[1.125rem] w-[1.125rem] text-neutral-900",e&&"text-neutral-500")})})]})]});export{x as a,N as b,g as c,H as d,w as e,L as f,y as g,M as h,v as i,S as j};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-KTRSJBA4.mjs';import {a as a$2}from'./chunk-AYAULBBH.mjs';import {o}from'./chunk-QWBSZY37.mjs';import {a as a$3}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as k from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var D=["00:00:00","00:30:00","01:00:00","01:30:00","02:00:00","02:30:00","03:00:00","03:30:00","04:00:00","04:30:00","05:00:00","05:30:00","06:00:00","06:30:00","07:00:00","07:30:00","08:00:00","08:30:00","09:00:00","09:30:00","10:00:00","10:30:00","11:00:00","11:30:00","12:00:00","12:30:00","13:00:00","13:30:00","14:00:00","14:30:00","15:00:00","15:30:00","16:00:00","16:30:00","17:00:00","17:30:00","18:00:00","18:30:00","19:00:00","19:30:00","20:00:00","20:30:00","21:00:00","21:30:00","22:00:00","22:30:00","23:00:00","23:30:00"],v=56,a=6,_=({value:c,onChange:h,locale:b,minTime:p,maxTime:u,...R})=>{let[F,m]=useState(false),[i,f]=useState(c),[o$1,P]=useState(),[O,M]=useState("bottom"),w=useRef(null),t=useRef(null),N=e=>{f(e),h?.(e),m(false);},z=useMemo(()=>i?format(new Date("2024-01-01T"+i),"p"):"",[i,b]),H=()=>{f(void 0),h?.(void 0);},n=useMemo(()=>D.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:p&&e<p||u&&e>u})),[b,p,u]);return useEffect(()=>{f(c);},[c]),a$1(w,()=>{m(false);}),useEffect(()=>{if(!t.current)return;let e=()=>{if(!t.current)return;let l=v*(n.length<a?n.length:a)+16,s=t.current.getBoundingClientRect();P(s);let S=window.innerHeight-s.bottom>l,B=s.top+s.height>l;M(S?"bottom":B?"top":"bottom");};return e(),t.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,true),window.addEventListener("resize",e),()=>{t.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,true),window.removeEventListener("resize",e);}},[t.current]),jsxs(Fragment,{children:[jsx(a$2,{ref:t,autoComplete:"off",startIcon:jsx(o,{}),onClean:H,readOnly:true,value:z,onClick:e=>{P(e.currentTarget.getBoundingClientRect()),m(l=>!l);},...R}),jsx(k.Root,{children:jsx("div",{ref:w,className:a$3("elevation-8 pointer-events-auto fixed z-50 my-2 hidden max-h-84 w-full flex-col overflow-y-auto rounded-lg bg-neutral-50",F&&"block"),style:o$1?{width:`${o$1.width}px`,top:O==="bottom"?`${o$1.height+o$1.top}px`:o$1.top-(n.length<a?n.length:a)*v-16,left:o$1?.left}:void 0,children:n.map(e=>jsx("div",{onClick:()=>!e.disabled&&N(e.value),className:a$3("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",i===e.value&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:v},children:e.label},e.value))})})]})};_.displayName="TimePicker";export{_ as a};
@@ -0,0 +1 @@
1
+ import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-4DF3NXNT.mjs';import {d}from'./chunk-QWBSZY37.mjs';import {a}from'./chunk-2WINTZSS.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var F=({onOpenChange:a,...o})=>{let r=useCallback(t=>{a?.(t.open);},[a]);return jsx(Dialog.Root,{unmountOnExit:true,lazyMount:true,onOpenChange:r,...o})},R=Dialog.Trigger,j=["sm","md","lg","xl"],k=forwardRef(({children:a$1,className:o,size:r="sm",...t},s)=>jsxs(Portal,{children:[jsx(Dialog.Backdrop,{className:"fixed inset-0 z-40 bg-neutral-900/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),jsx(Dialog.Positioner,{className:"fixed left-0 top-0 z-40 flex h-dvh w-dvw items-center justify-end",children:jsx(Dialog.Content,{ref:s,className:a("elevation-10 h-full bg-neutral-50 data-[state=closed]:animate-swipeOut data-[state=open]:animate-slideIn",r==="sm"&&"w-117.5",r==="md"&&"w-187",r==="lg"&&"w-235",r==="xl"&&"w-312",o),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:a$1})})})]}));k.displayName="DrawerStickyContent";var S=forwardRef(({children:a$1,className:o,title:r,buttons:t=[],description:s,...D},y)=>jsxs("div",{className:a("border-b-1 border-neutral-200 pb-3.75 pl-4.5 pt-2",o),ref:y,...D,children:[jsx(Dialog.CloseTrigger,{asChild:true,children:jsx(d,{className:"ml-auto mr-2 size-6 cursor-pointer"})}),jsxs("div",{className:"mr-4.5 mt-2 flex items-center justify-between gap-4.5",children:[jsx(Dialog.Title,{className:"line-clamp-1 break-all font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",children:r}),!Array.isArray(t)&&t.visible!==false&&jsx(c,{size:"sm",variant:"ghost",...t}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:g=true,...u},f)=>g?jsx(c$1,{variant:"ghost",size:"sm",...u},f):null)})]}),s&&jsx(Dialog.Description,{className:"mr-4.5 mt-1 line-clamp-2 font-inter text-sm leading-[130%] text-neutral-900",children:s})]}));S.displayName="DrawerStickyHeader";var C=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("flex justify-end gap-3 border-t-1 border-neutral-200 px-4.5 pb-4.5 pt-4.25",o),ref:t,...r,children:a$1}));C.displayName="DrawerStickyFooter";var b=forwardRef(({children:a$1,className:o,...r},t)=>jsx("div",{className:a("h-full overflow-y-auto px-6 py-4",o),ref:t,...r,children:a$1}));b.displayName="DrawerStickyBody";var X=Dialog.CloseTrigger;export{F as a,R as b,j as c,k as d,S as e,C as f,b as g,X as h};
package/dist/common.css CHANGED
@@ -38,6 +38,28 @@
38
38
 
39
39
  --arrow-size: 0.7075rem;
40
40
  --arrow-background: rgb(40, 51, 049);
41
+
42
+ *::-webkit-scrollbar {
43
+ width: 1rem;
44
+ }
45
+
46
+ *::-webkit-scrollbar-track {
47
+ background-color: rgb(var(--color-neutral-100));
48
+
49
+ }
50
+
51
+ *::-webkit-scrollbar-thumb {
52
+ background-color: rgb(var(--color-primary-500));
53
+ border-radius: 8px;
54
+ border: 4px solid transparent;
55
+ background-clip: padding-box;
56
+ }
57
+
58
+ /* Firefox scrollbar styling */
59
+ * {
60
+ scrollbar-width: auto; /* "auto" or "thin" */
61
+ scrollbar-color: rgb(var(--color-primary-500)) rgb(var(--color-neutral-100));
62
+ }
41
63
  }
42
64
 
43
65
  input[type="search"]::-webkit-search-decoration,