sodtrack-web-ui 0.49.0 → 0.50.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 (53) hide show
  1. package/dist/checkbox.d.mts +6 -1
  2. package/dist/checkbox.d.ts +6 -1
  3. package/dist/checkbox.mjs +1 -1
  4. package/dist/chip-form-complementary.d.mts +3 -3
  5. package/dist/chip-form-complementary.d.ts +3 -3
  6. package/dist/chip-form.d.mts +3 -3
  7. package/dist/chip-form.d.ts +3 -3
  8. package/dist/chip-status-complementary.d.mts +1 -1
  9. package/dist/chip-status-complementary.d.ts +1 -1
  10. package/dist/{chunk-XKAWYIAQ.mjs → chunk-5UJVYIVN.mjs} +1 -1
  11. package/dist/chunk-AQJTQYUZ.mjs +1 -0
  12. package/dist/{chunk-GSFJI6ZQ.mjs → chunk-FGMEWKU3.mjs} +1 -1
  13. package/dist/{chunk-4HUMCLHB.mjs → chunk-HWLLVJWJ.mjs} +1 -1
  14. package/dist/{chunk-RUBXXCVF.mjs → chunk-JDBAUMA2.mjs} +1 -1
  15. package/dist/{chunk-V5O2TO7P.mjs → chunk-ORFPBGHG.mjs} +1 -1
  16. package/dist/{chunk-OZ3MMHWQ.mjs → chunk-PL44ZCIA.mjs} +1 -1
  17. package/dist/chunk-QHBCNAWO.mjs +1 -0
  18. package/dist/chunk-UGGS6W5K.mjs +1 -0
  19. package/dist/{chunk-6Y5TR5PD.mjs → chunk-WGOFOREW.mjs} +1 -1
  20. package/dist/{chunk-2NVW6WMW.mjs → chunk-ZJOF2Z6O.mjs} +1 -1
  21. package/dist/common.css +1 -0
  22. package/dist/country-text-field.mjs +1 -1
  23. package/dist/data-table.mjs +1 -1
  24. package/dist/dialog.mjs +1 -1
  25. package/dist/drawer-sticky.d.mts +49 -0
  26. package/dist/drawer-sticky.d.ts +49 -0
  27. package/dist/drawer-sticky.js +58 -0
  28. package/dist/drawer-sticky.mjs +1 -0
  29. package/dist/drawer.mjs +1 -1
  30. package/dist/flag-select.mjs +1 -1
  31. package/dist/index.css +1 -1
  32. package/dist/index.d.mts +4 -2
  33. package/dist/index.d.ts +4 -2
  34. package/dist/index.js +2 -2
  35. package/dist/index.mjs +1 -1
  36. package/dist/list-item-arrow.css +1 -1
  37. package/dist/list-item-arrow.mjs +1 -1
  38. package/dist/list-item-checkbox.css +1 -1
  39. package/dist/list-item-checkbox.mjs +1 -1
  40. package/dist/list-item.css +1 -1
  41. package/dist/list-item.mjs +1 -1
  42. package/dist/scrollarea.d.mts +2 -1
  43. package/dist/scrollarea.d.ts +2 -1
  44. package/dist/scrollarea.mjs +1 -1
  45. package/dist/select.mjs +1 -1
  46. package/dist/tab.d.mts +1 -1
  47. package/dist/tab.d.ts +1 -1
  48. package/dist/tailwind-preset.js +1 -1
  49. package/dist/tailwind-preset.mjs +1 -1
  50. package/dist/time-picker.mjs +1 -1
  51. package/package.json +2 -1
  52. package/dist/chunk-JGL2V7EX.mjs +0 -1
  53. package/dist/chunk-OCDNP76Y.mjs +0 -1
@@ -3,10 +3,15 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
3
 
4
4
  declare const CheckboxSizes: readonly ["sm", "md"];
5
5
  type CheckboxSize = (typeof CheckboxSizes)[number];
6
+ type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
7
+ id?: string;
8
+ label?: string;
9
+ size?: CheckboxSize;
10
+ };
6
11
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
7
12
  id?: string;
8
13
  label?: string;
9
14
  size?: CheckboxSize;
10
15
  } & React.RefAttributes<HTMLButtonElement>>;
11
16
 
12
- export { Checkbox, type CheckboxSize, CheckboxSizes };
17
+ export { Checkbox, type CheckboxProps, type CheckboxSize, CheckboxSizes };
@@ -3,10 +3,15 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
3
 
4
4
  declare const CheckboxSizes: readonly ["sm", "md"];
5
5
  type CheckboxSize = (typeof CheckboxSizes)[number];
6
+ type CheckboxProps = React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> & {
7
+ id?: string;
8
+ label?: string;
9
+ size?: CheckboxSize;
10
+ };
6
11
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
7
12
  id?: string;
8
13
  label?: string;
9
14
  size?: CheckboxSize;
10
15
  } & React.RefAttributes<HTMLButtonElement>>;
11
16
 
12
- export { Checkbox, type CheckboxSize, CheckboxSizes };
17
+ export { Checkbox, type CheckboxProps, type CheckboxSize, CheckboxSizes };
package/dist/checkbox.mjs CHANGED
@@ -1 +1 @@
1
- export{b as Checkbox,a as CheckboxSizes}from'./chunk-OCDNP76Y.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
1
+ export{b as Checkbox,a as CheckboxSizes}from'./chunk-UGGS6W5K.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
@@ -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?: "md" | "sm" | undefined;
9
+ size?: "sm" | "md" | 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?: "md" | "sm" | undefined;
77
+ size?: "sm" | "md" | 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?: "md" | "sm" | undefined;
136
+ size?: "sm" | "md" | 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?: "md" | "sm" | undefined;
9
+ size?: "sm" | "md" | 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?: "md" | "sm" | undefined;
77
+ size?: "sm" | "md" | 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?: "md" | "sm" | undefined;
136
+ size?: "sm" | "md" | 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?: "md" | "sm" | "xs" | undefined;
22
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
83
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
144
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
22
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
83
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
144
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
9
+ size?: "sm" | "md" | "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?: "md" | "sm" | "xs" | undefined;
9
+ size?: "sm" | "md" | "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;
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-JGL2V7EX.mjs';import {a as a$2}from'./chunk-WGMDH4XX.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {d}from'./chunk-TYHJTIAW.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 E=t.Root,H=t.Trigger,v=t.Portal,P=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,...g},D)=>jsx(v,{children:jsx(f,{children:jsx(t.Content,{onPointerDownOutside:s=>{s.target instanceof Element&&s.target.closest(".pac-container")&&s.preventDefault(),l?.(s);},ref:D,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 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),...g,children:jsx(a$1,{className:"max-h-[80vh]",viewPortClassName:"py-3 ",children:i})})})}));u.displayName=t.Content.displayName;var y=({className:e,...i})=>jsx("div",{className:a("mb-4 ml-6 mr-4 flex flex-col gap-4 text-left",e),...i});y.displayName="DialogHeader";var R=({className:e,...i})=>jsxs("div",{children:[jsx(a$2,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...i})]});R.displayName="DialogFooter";var O=({className:e,...i})=>jsx("div",{className:a("mb-4.5 mx-6",e),...i}),N=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"})]})]}));N.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 A=e=>jsx(c,{variant:"contained",...e}),F=e=>jsx(P,{asChild:!0,children:jsx(c,{variant:"secondary",...e})}),L=e=>jsx(c,{variant:"ghost",...e});export{E as b,H as c,v as d,f as e,u as f,y as g,R as h,O as i,N as j,C as k,A as l,F as m,L as n};
1
+ import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {a as a$2}from'./chunk-WGMDH4XX.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {d}from'./chunk-TYHJTIAW.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 E=t.Root,H=t.Trigger,v=t.Portal,P=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,...g},D)=>jsx(v,{children:jsx(f,{children:jsx(t.Content,{onPointerDownOutside:s=>{s.target instanceof Element&&s.target.closest(".pac-container")&&s.preventDefault(),l?.(s);},ref:D,className:a("elevation-9 fixed left-[50%] top-[50%] z-[10000] grid w-full max-w-2xl translate-x-[-50%] translate-y-[-50%] rounded-2xl bg-neutral-50 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),...g,children:jsx(a$1,{className:"max-h-[80vh]",viewPortClassName:"py-3 ",children:i})})})}));u.displayName=t.Content.displayName;var y=({className:e,...i})=>jsx("div",{className:a("mb-4 ml-6 mr-4 flex flex-col gap-4 text-left",e),...i});y.displayName="DialogHeader";var R=({className:e,...i})=>jsxs("div",{children:[jsx(a$2,{className:"w-full"}),jsx("div",{className:a("mx-6 mt-3 flex justify-end gap-2",e),...i})]});R.displayName="DialogFooter";var O=({className:e,...i})=>jsx("div",{className:a("mb-4.5 mx-6",e),...i}),N=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"})]})]}));N.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 A=e=>jsx(c,{variant:"contained",...e}),F=e=>jsx(P,{asChild:!0,children:jsx(c,{variant:"secondary",...e})}),L=e=>jsx(c,{variant:"ghost",...e});export{E as b,H as c,v as d,f as e,u as f,y as g,R as h,O as i,N as j,C as k,A as l,F as m,L as n};
@@ -0,0 +1 @@
1
+ import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {d}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import {Dialog}from'@ark-ui/react/dialog';import {Portal}from'@ark-ui/react/portal';import {forwardRef}from'react';import {jsx,jsxs}from'react/jsx-runtime';var z=forwardRef(({onOpenChange:i,...a},r)=>jsx(Dialog.Root,{onOpenChange:t=>i?.(t.open),trapFocus:!1,...a,ref:r})),I=Dialog.Trigger,j=["sm","md","lg","xl"],F=forwardRef(({children:i,className:a$1,size:r="sm",...t},n)=>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-screen w-screen items-center justify-end",children:jsx(Dialog.Content,{ref:n,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",a$1),...t,children:jsx("div",{className:"flex h-full flex-1 flex-col",children:i})})})]})),W=forwardRef(({children:i,className:a$1,title:r,buttons:t=[],description:n,...g},D)=>jsxs("div",{className:a("border-b-1 border-neutral-200 pb-3.75 pl-4.5 pt-2",a$1),ref:D,...g,children:[jsx(Dialog.CloseTrigger,{asChild:!0,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!==!1&&jsx(c,{size:"sm",variant:"ghost",...t}),Array.isArray(t)&&jsx("div",{className:"flex gap-1",children:t.map(({visible:u=!0,...y},v)=>u?jsx(c$1,{variant:"ghost",size:"sm",...y},v):null)})]}),n&&jsx(Dialog.Description,{className:"mr-4.5 mt-1 line-clamp-2 break-all font-inter text-sm leading-[130%] text-neutral-900",children:n})]})),X=forwardRef(({children:i,className:a$1,...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",a$1),ref:t,...r,children:i})),q=forwardRef(({children:i,className:a$2,...r},t)=>jsxs(a$1,{viewPortClassName:"py-4",className:a("h-full px-6",a$2),ref:t,...r,children:[i,jsx("div",{className:"min-h-4"})]})),G=Dialog.CloseTrigger;export{z as a,I as b,j as c,F as d,W as e,X as f,q as g,G as h};
@@ -1 +1 @@
1
- import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$3}from'./chunk-JGL2V7EX.mjs';import {o}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as S from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var U=["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"],i=56,d=6,V=({value:f,onChange:P,locale:g,minTime:T,maxTime:v,...N})=>{let[O,u]=useState(!1),[p,h]=useState(f),[n,y]=useState(),[z,A]=useState("bottom"),E=useRef(null),o$1=useRef(null),x=useRef(null),[l,c]=useState(-1),k=e=>{h(e),P?.(e),u(!1),c(-1);},B=useMemo(()=>p?format(new Date("2024-01-01T"+p),"p"):"",[p,g]),K=()=>{h(void 0),c(-1),P?.(void 0);},r=useMemo(()=>U.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:T&&e<T||v&&e>v})),[g,T,v]),_=e=>{if(e.preventDefault(),e.key==="ArrowDown"){if(l===r.length-1)return;c(t=>t+1),u(!0),L();}else if(e.key==="ArrowUp"){if(l===0)return;c(t=>t-1),L();}else e.key==="Enter"&&(k(r[l].value),c(-1));},L=()=>{let e=i*d;x.current.scroll({top:(l+2)*i<=e?0:i*(l+2)-e,behavior:"smooth"});};return useEffect(()=>{h(f);},[f]),a(E,()=>{u(!1);}),useEffect(()=>{if(!o$1.current)return;let e=()=>{if(!o$1.current)return;let t=i*(r.length<d?r.length:d)+16,m=o$1.current.getBoundingClientRect();y(m);let $=window.innerHeight-m.bottom>t,G=m.top+m.height>t;A($?"bottom":G?"top":"bottom");};return e(),o$1.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o$1.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o$1.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:o$1,autoComplete:"off",startIcon:jsx(o,{}),onClean:K,readOnly:!0,value:B,onKeyDown:_,onClick:e=>{y(e.currentTarget.getBoundingClientRect()),u(t=>!t);},...N}),jsx(S.Root,{children:jsx("div",{ref:E,className:a$2("pointer-events-auto fixed z-50 hidden",O&&"block"),style:n?{width:`${n.width}px`,top:z==="bottom"?`${n.height+n.top}px`:n.top-(r.length<d?r.length:d)*i-16,left:n?.left}:void 0,children:jsx(a$3,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:r.map((e,t)=>jsx("div",{onClick:()=>!e.disabled&&k(e.value),className:a$2("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",p===e.value&&"bg-primary-200",l===t&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:i},children:e.label},e.value))})})})]})};V.displayName="TimePicker";export{V as a};
1
+ import {a}from'./chunk-KTRSJBA4.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$3}from'./chunk-QHBCNAWO.mjs';import {o}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import {useState,useRef,useMemo,useEffect}from'react';import*as S from'@radix-ui/react-portal';import {format}from'date-fns';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var U=["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"],i=56,d=6,V=({value:f,onChange:P,locale:g,minTime:T,maxTime:v,...N})=>{let[O,u]=useState(!1),[p,h]=useState(f),[n,y]=useState(),[z,A]=useState("bottom"),E=useRef(null),o$1=useRef(null),x=useRef(null),[l,c]=useState(-1),k=e=>{h(e),P?.(e),u(!1),c(-1);},B=useMemo(()=>p?format(new Date("2024-01-01T"+p),"p"):"",[p,g]),K=()=>{h(void 0),c(-1),P?.(void 0);},r=useMemo(()=>U.map(e=>({value:e,label:format(new Date("2024-01-01T"+e),"p"),disabled:T&&e<T||v&&e>v})),[g,T,v]),_=e=>{if(e.preventDefault(),e.key==="ArrowDown"){if(l===r.length-1)return;c(t=>t+1),u(!0),L();}else if(e.key==="ArrowUp"){if(l===0)return;c(t=>t-1),L();}else e.key==="Enter"&&(k(r[l].value),c(-1));},L=()=>{let e=i*d;x.current.scroll({top:(l+2)*i<=e?0:i*(l+2)-e,behavior:"smooth"});};return useEffect(()=>{h(f);},[f]),a(E,()=>{u(!1);}),useEffect(()=>{if(!o$1.current)return;let e=()=>{if(!o$1.current)return;let t=i*(r.length<d?r.length:d)+16,m=o$1.current.getBoundingClientRect();y(m);let $=window.innerHeight-m.bottom>t,G=m.top+m.height>t;A($?"bottom":G?"top":"bottom");};return e(),o$1.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o$1.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o$1.current]),jsxs(Fragment,{children:[jsx(a$1,{ref:o$1,autoComplete:"off",startIcon:jsx(o,{}),onClean:K,readOnly:!0,value:B,onKeyDown:_,onClick:e=>{y(e.currentTarget.getBoundingClientRect()),u(t=>!t);},...N}),jsx(S.Root,{children:jsx("div",{ref:E,className:a$2("pointer-events-auto fixed z-50 hidden",O&&"block"),style:n?{width:`${n.width}px`,top:z==="bottom"?`${n.height+n.top}px`:n.top-(r.length<d?r.length:d)*i-16,left:n?.left}:void 0,children:jsx(a$3,{className:"elevation-8 my-2 flex max-h-84 w-full flex-col rounded-lg bg-neutral-50",ref:x,children:r.map((e,t)=>jsx("div",{onClick:()=>!e.disabled&&k(e.value),className:a$2("flex w-full items-center px-2 hover:cursor-pointer",!e.disabled&&"hover:bg-primary-100",p===e.value&&"bg-primary-200",l===t&&"bg-primary-200",e.disabled&&"text-neutral-500 hover:cursor-not-allowed"),style:{height:i},children:e.label},e.value))})})})]})};V.displayName="TimePicker";export{V as a};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-XKAWYIAQ.mjs';import {a as a$1}from'./chunk-JGL2V7EX.mjs';import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as t from'@radix-ui/react-dialog';import*as v from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],h=({...r})=>jsx(t.Root,{...r});h.displayName="Drawer";var j=t.Trigger,B=t.Portal,k=t.Close,x=s.forwardRef(({className:r,...a$1},o)=>jsx(t.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}));x.displayName=t.Overlay.displayName;var A=s.forwardRef(({className:r,size:a$3="sm",title:o,description:i,children:f,isLoading:c=!1,loadingText:n="",buttons:d,hideHeader:D=!1,onPointerDownOutside:b,...H},T)=>jsx(B,{children:jsx(x,{children:jsx(t.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),b?.(m);},ref:T,...!i||D?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col bg-neutral-50",a$3==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$3==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$3==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$3==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...H,children:jsxs(a$1,{className:"h-full",viewPortClassName:"pr-8 pt-10 pl-6",children:[D?jsx(v.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:d}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:c?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$2,{}),n&&jsx("p",{children:n})]}):f})]})})})}));A.displayName="DrawerContent";var N=({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(C,{children:a$1}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:c=!0,...n},d)=>c?jsx(c$1,{variant:"ghost",size:"sm",...n},d):null)})]}),o&&jsx(P,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});O.displayName="DrawerFooter";var C=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));C.displayName=t.Title.displayName;var P=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));P.displayName=t.Description.displayName;export{V as a,h as b,j as c,B as d,k as e,x as f,A as g,N as h,O as i,C as j,P as k};
1
+ import {a as a$2}from'./chunk-562EYVK4.mjs';import {j as j$1}from'./chunk-5UJVYIVN.mjs';import {a as a$1}from'./chunk-QHBCNAWO.mjs';import {c as c$1}from'./chunk-WS2F7JWJ.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as t from'@radix-ui/react-dialog';import*as v from'@radix-ui/react-visually-hidden';import {jsx,jsxs}from'react/jsx-runtime';var V=["sm","md","lg","xl"],h=({...r})=>jsx(t.Root,{...r});h.displayName="Drawer";var j=t.Trigger,B=t.Portal,k=t.Close,x=s.forwardRef(({className:r,...a$1},o)=>jsx(t.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}));x.displayName=t.Overlay.displayName;var A=s.forwardRef(({className:r,size:a$3="sm",title:o,description:i,children:f,isLoading:c=!1,loadingText:n="",buttons:d,hideHeader:D=!1,onPointerDownOutside:b,...H},T)=>jsx(B,{children:jsx(x,{children:jsx(t.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest(".pac-container")&&m.preventDefault(),b?.(m);},ref:T,...!i||D?{"aria-describedby":void 0}:{},className:a("fixed right-0 top-0 z-50 flex h-full flex-col bg-neutral-50",a$3==="sm"&&"w-[29.375rem] max-w-[29.375rem]",a$3==="md"&&"w-[47.5rem] max-w-[47.5rem]",a$3==="lg"&&"w-[58.75rem] max-w-[58.75rem]",a$3==="xl"&&"w-[78.125rem] max-w-[78.125rem]","data-[state=open]:animate-slideIn","data-[state=closed]:animate-swipeOut",r),...H,children:jsxs(a$1,{className:"h-full",viewPortClassName:"pr-8 pt-10 pl-6",children:[D?jsx(v.Root,{children:jsx(j$1,{children:"Drawer"})}):jsx(N,{title:o,description:i,buttons:d}),jsx("div",{className:a("flex flex-1 flex-col pb-6",r),children:c?jsxs("div",{className:"flex flex-1 flex-col items-center justify-center",children:[jsx(a$2,{}),n&&jsx("p",{children:n})]}):f})]})})})}));A.displayName="DrawerContent";var N=({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(C,{children:a$1}),!Array.isArray(i)&&i.visible!==!1&&jsx(c,{size:"sm",variant:"ghost",...i}),Array.isArray(i)&&jsx("div",{className:"flex gap-1",children:i.map(({visible:c=!0,...n},d)=>c?jsx(c$1,{variant:"ghost",size:"sm",...n},d):null)})]}),o&&jsx(P,{className:"mt-1",children:o})]});N.displayName="DrawerHeader";var O=({className:r,...a$1})=>jsx("div",{className:a("mt-auto flex pt-6",r),...a$1});O.displayName="DrawerFooter";var C=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Title,{ref:o,className:a("font-jakarta text-2xl font-semibold leading-[130%] text-neutral-900",r),...a$1}));C.displayName=t.Title.displayName;var P=s.forwardRef(({className:r,...a$1},o)=>jsx(t.Description,{ref:o,className:a("text-sm leading-[130%] text-neutral-900",r),...a$1}));P.displayName=t.Description.displayName;export{V as a,h as b,j as c,B as d,k as e,x as f,A as g,N as h,O as i,C as j,P as k};
@@ -1 +1 @@
1
- import {a as a$3,b,c,d,e,f,g as g$1,h,i}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-JGL2V7EX.mjs';import {g}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import Q,{useId,useRef,useState,useEffect}from'react';import*as A from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var H=56,p=6,Z=[{id:0,code:"+56",name:"Chile",flag:a$3,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,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:g$1,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:h,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:i,country:"US"}],we=({options:o=Z,noResults:y,selectedOption:B,onSelect:U,onChange:h,onClick:ee,className:G,defaultCountry:v="CL",initialValue:s,size:$="md",...i})=>{let z=useId(),c=useRef(null),l=useRef(null),D=useRef(null),[Y,_]=useState("bottom"),[d,V]=useState(),[X,j]=useState(-1),[a$3,x]=useState(B??null),[E,F]=useState(""),q=e=>{let t={target:{value:e.code+E}};h?.(t),c.current.style.display="none",l.current.value=e.code,x(e),U?.(e);};return useEffect(()=>{if(!l.current)return;let e=()=>{if(!l.current)return;let t=H*(o.length<p?o.length:p)+16,m=l.current.getBoundingClientRect();V(m);let J=window.innerHeight-m.bottom>t,K=m.top>t;_(J?"bottom":K?"top":"bottom");};return e(),l.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{l.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[l.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",j(-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;x(e);}},[v,s]),useEffect(()=>{if(s){let e=o.find(t=>s.includes(t.code))??null;x(e),F(s.replace(e?.code??"",""));}},[s]),jsx("div",{className:a("flex flex-col",G),children:jsxs("div",{className:a("relative flex flex-col"),children:[jsx(a$1,{ref:l,value:E,placeholder:i.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");F(t);let m={target:{value:a$3?.code&&!t.includes(a$3.code)?a$3?.code+t:t}};h?.(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$3?.flag,alt:a$3?.country,className:a("h-6 w-6 cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a("ml-1",i.disabled&&"cursor-not-allowed text-neutral-400"),children:a$3?.code}),jsx(g,{className:a($==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")})]}),...i}),jsx(A.Root,{asChild:!0,children:jsx("ul",{ref:c,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:d?{width:`${d.width}px`,left:d.left,top:Y==="bottom"?`${d.height+d.top+window.scrollY}px`:window.scrollY+d.top-(o.length<p?o.length:p)*H-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:D,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:[Q.cloneElement(y.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:y.message})]}),o.map((e,t)=>jsx("li",{onClick:()=>{q(e);},className:a("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",a$3?.code===e.code&&"bg-primary-200",X===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a("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-${z}-${e.id??e.code}`))]})})})]})})};export{we as a};
1
+ import {a as a$3,b,c,d,e,f,g as g$1,h,i}from'./chunk-E5G7444M.mjs';import {a as a$1}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-QHBCNAWO.mjs';import {g}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import Q,{useId,useRef,useState,useEffect}from'react';import*as A from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var H=56,p=6,Z=[{id:0,code:"+56",name:"Chile",flag:a$3,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,country:"PE"},{id:6,code:"+55",name:"Brasil",flag:g$1,country:"BR"},{id:7,code:"+598",name:"Uruguay",flag:h,country:"UY"},{id:8,code:"+1",name:"Estados Unidos",flag:i,country:"US"}],we=({options:o=Z,noResults:y,selectedOption:B,onSelect:U,onChange:h,onClick:ee,className:G,defaultCountry:v="CL",initialValue:s,size:$="md",...i})=>{let z=useId(),c=useRef(null),l=useRef(null),D=useRef(null),[Y,_]=useState("bottom"),[d,V]=useState(),[X,j]=useState(-1),[a$3,x]=useState(B??null),[E,F]=useState(""),q=e=>{let t={target:{value:e.code+E}};h?.(t),c.current.style.display="none",l.current.value=e.code,x(e),U?.(e);};return useEffect(()=>{if(!l.current)return;let e=()=>{if(!l.current)return;let t=H*(o.length<p?o.length:p)+16,m=l.current.getBoundingClientRect();V(m);let J=window.innerHeight-m.bottom>t,K=m.top>t;_(J?"bottom":K?"top":"bottom");};return e(),l.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{l.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[l.current]),useEffect(()=>{function e(t){c.current&&!c.current.contains(t.target)&&(c.current.style.display="none",j(-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;x(e);}},[v,s]),useEffect(()=>{if(s){let e=o.find(t=>s.includes(t.code))??null;x(e),F(s.replace(e?.code??"",""));}},[s]),jsx("div",{className:a("flex flex-col",G),children:jsxs("div",{className:a("relative flex flex-col"),children:[jsx(a$1,{ref:l,value:E,placeholder:i.placeholder??"",onChange:e=>{let t=e.target.value.replace(/\D/g,"");F(t);let m={target:{value:a$3?.code&&!t.includes(a$3.code)?a$3?.code+t:t}};h?.(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$3?.flag,alt:a$3?.country,className:a("h-6 w-6 cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")}),jsx("span",{className:a("ml-1",i.disabled&&"cursor-not-allowed text-neutral-400"),children:a$3?.code}),jsx(g,{className:a($==="md"?"h-6 w-6":"h-4.5 w-4.5","cursor-pointer",i.disabled&&"cursor-not-allowed text-neutral-400")})]}),...i}),jsx(A.Root,{asChild:!0,children:jsx("ul",{ref:c,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:d?{width:`${d.width}px`,left:d.left,top:Y==="bottom"?`${d.height+d.top+window.scrollY}px`:window.scrollY+d.top-(o.length<p?o.length:p)*H-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:D,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:[Q.cloneElement(y.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:y.message})]}),o.map((e,t)=>jsx("li",{onClick:()=>{q(e);},className:a("flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",a$3?.code===e.code&&"bg-primary-200",X===t&&"bg-primary-200"),value:e.code,children:jsxs("div",{className:a("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-${z}-${e.id??e.code}`))]})})})]})})};export{we as a};
@@ -1 +1 @@
1
- import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-2GJHRBSH.mjs';import {a}from'./chunk-JGL2V7EX.mjs';import {b}from'./chunk-OCDNP76Y.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.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:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="md",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),C=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{C.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),C?.current){let O=C.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(C,()=>{C.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{C.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:C,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"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:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{t.disabled||(a?.current?.value&&n.preventDefault(),r?.(t,n));},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.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:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="md",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:C,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(L=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===L.value);return $===-1?(S=P.concat(L),r?.(L,S),S):(S=P.toSpliced($,1),r?.(L,S),S)});},[r]),U=useCallback(()=>{N([]),C(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let L=d.current.getBoundingClientRect();nt(L);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-L.bottom>P,$=L.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-L.bottom>E?E:window.innerHeight-L.bottom);},[H?.height]),Q=useCallback(()=>{let L=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(C(L),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{C(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
1
+ import {a as a$5}from'./chunk-KTRSJBA4.mjs';import {a as a$4}from'./chunk-2GJHRBSH.mjs';import {a}from'./chunk-QHBCNAWO.mjs';import {b}from'./chunk-UGGS6W5K.mjs';import {d}from'./chunk-AZOZKDKH.mjs';import {a as a$1}from'./chunk-WGMDH4XX.mjs';import {a as a$3}from'./chunk-BVHU5ZT3.mjs';import {c}from'./chunk-2VL36SBW.mjs';import {c as c$1,h}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import bt,{createContext,useMemo,useCallback,useState,useRef,useEffect,useContext,useId}from'react';import*as Ct from'@radix-ui/react-portal';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var jt=({title:t,titleLines:o=2,description:r,descriptionLines:e=1,Icon:l,iconAsColumn:i=!0,className:a,...n})=>jsxs("div",{className:a$2("flex gap-2 py-4 pl-4 pr-6",i&&"flex-col items-center gap-1",!i&&!r&&"items-center"),...n,children:[l&&jsx(l,{className:a$2("shrink-0 text-neutral-300"),size:24}),jsxs("div",{className:a$2("flex flex-col gap-1",i&&"text-center"),children:[jsx("p",{className:a$2("leading-[130%] text-neutral-500",!!r&&"font-medium"),style:o?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:o}:void 0,children:t}),r&&jsx("p",{className:"text-sm leading-[130%] text-neutral-500",style:e?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:e}:void 0,children:r})]})]}),at=jt;var Ut=bt.memo(({handleSelect:t,NoResultsIcon:o,noResultsLabel:r,noResultsDescription:e,noResultsDescriptionLines:l,noResultsAsColumn:i,noResultsButtonOnClick:a$3,optionDescriptionLines:n,noResultsButtonLabel:w,filteredOptions:c$1,inputRect:p,inputRef:f,popoverPosition:x,optionsListRef:k,selectedOption:m,options:R,setFilteredOptions:h})=>jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:k,className:"pointer-events-auto fixed z-50 hidden w-full",style:p?{width:`${p.width}px`,left:p.left,top:x==="bottom"?`${p.bottom}px`:void 0,bottom:x==="top"?`${window.innerHeight-p.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",children:[c$1.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:e,Icon:o,iconAsColumn:i,descriptionLines:l}),a$3&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:u=>{k.current.style.display="none",f.current.value="",h(R),a$3();},children:w})]})]}),c$1.map(u=>jsx(Mt,{title:u.label,disabled:u.disabled,description:u.description,descriptionLines:n,onClick:()=>t(u),className:a$2(m?.value===u.value&&"bg-primary-200")},u.key??u.value))]})})})),zt=Ut;var qt=336,rr=({options:t,defaultSelectedOption:o,onSelect:r,onClick:e,onInputChange:l,error:i,helperText:a,label:n,placeholder:w,value:c,size:p="md",optionDescriptionLines:f=1,noResultsLabel:x,noResultsIcon:k,noResultsDescription:m,noResultsDescriptionLines:R,noResultsAsColumn:h,noResultsButtonOnClick:u,noResultsButtonLabel:A,className:V,disabled:b})=>{let[d,y]=useState(o??null),C=useRef(null),g=useRef(null),[nt,lt]=useState(),[st,T]=useState([]),[ct,H]=useState("bottom"),[j,K]=useState(),G=qt,N=useCallback(v=>{C.current.style.display="none",g.current.value=v.label,y(v),r?.(v);},[r]),z=useCallback(()=>{if(!g?.current)return;let v=g.current.getBoundingClientRect();lt(v);let O=j?j.height:G,M=window.innerHeight-v.bottom>O,Q=v.top>O;H(M?"bottom":Q?"top":"bottom");},[j?.height]),U=useCallback(()=>{let v=t.filter(O=>O.label.toLowerCase().includes(g?.current?.value.toLowerCase()??""));if(T(v),C?.current){let O=C.current.getBoundingClientRect();K(O);}},[t]);return useEffect(()=>{T(t);},[t]),useEffect(()=>{if(!c){y(null),g.current&&(g.current.value="");return}(!g.current?.value||d?.value!==c.value)&&(y(c),g.current.value=c.label);},[c]),a$5(C,()=>{C.current.style.display="none",d&&g.current&&(g.current.value=d.label);}),useEffect(()=>{if(g?.current)return z(),g.current.addEventListener("mousedown",z),g.current.addEventListener("input",U),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{g.current?.removeEventListener("mousedown",z),g.current?.removeEventListener("input",U),window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z);}},[z,U]),jsxs("div",{className:a$2("relative",V),children:[jsx(a$4,{ref:g,autoComplete:"off",list:"",selectMode:!0,onChange:v=>{v.target.value||(y(null),r?.(null)),l?.(v);},onClean:()=>{y(null),T(t),r?.(null);},onClick:v=>{C.current.style.display="flex",e?.(v);},onBlur:()=>{d&&g.current&&(g.current.value=d.label);},label:n,helperText:a,placeholder:w,size:p,error:i,disabled:b}),jsx(zt,{handleSelect:N,noResultsLabel:x,NoResultsIcon:k,optionDescriptionLines:f,noResultsAsColumn:h,noResultsButtonLabel:A,noResultsButtonOnClick:u,noResultsDescription:m,noResultsDescriptionLines:R,filteredOptions:st,inputRect:nt,inputRef:g,popoverPosition:ct,optionsListRef:C,selectedOption:d,options:t,setFilteredOptions:T})]})};var Kt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,disabled:i=!1,className:a,...n})=>jsxs("div",{className:"flex w-full flex-col",...n,children:[jsx("p",{className:a$2("break-all",!!e&&"font-medium"),style:r?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:r}:void 0,children:o}),e&&jsx("p",{className:a$2("text-sm",i?"text-neutral-400":"text-neutral-700"),style:l?{overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l}:void 0,children:e})]}),Y=Kt;var mr=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,badgeContent:a,hasDivider:n=!1,disabled:w=!1,onSelect:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:w,onClick:c,hasDivider:n,className:a$2(!w&&"cursor-pointer",p),...f,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:w}),jsxs("div",{className:"flex gap-2",children:[a&&jsx(a$3,{content:a,size:"lg",variant:"alert",className:a$2("self-center",w&&"bg-neutral-400")}),jsx(h,{className:"h-4.5 w-4.5 self-center"})]})]});var St=({children:t,title:o,titleLines:r=1,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,checked:w,onCheckedChange:c,className:p,...f})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,...f,className:a$2("pr-6",p),children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n}),jsx(b,{size:"sm",checked:w,onCheckedChange:c,className:"self-center",disabled:n})]});var E=336,Ft=createContext({inputRef:null,optionsListRef:null,scrollAreaRef:null,autocompleteId:"",inputRect:void 0,showChips:!1,filteredOptions:[],currentFocus:-1,popoverPosition:"bottom",setFilteredOptions:()=>{},setCurrentFocus:()=>{},setShowChips:()=>{},setPopoverPosition:()=>{},setInputRect:()=>{},optionsListHeight:E,setOptionsListHeight:()=>{},optionsListRect:void 0,setOptionsListRect:()=>{}}),I=()=>{let t=useContext(Ft);if(t===null)throw new Error("useAutocompleteMultipleContext must be used within a AutocompleteMultipleProvider");return t},Dt=({children:t})=>{let o=useRef(null),r=useRef(null),e=useRef(null),l=useId(),[i,a]=useState(),[n,w]=useState(!0),[c,p]=useState([]),[f,x]=useState(-1),[k,m]=useState("bottom"),[R,h]=useState(),[u,A]=useState(E);return jsx(Ft.Provider,{value:{optionsListRef:o,inputRef:r,scrollAreaRef:e,autocompleteId:l,inputRect:i,showChips:n,filteredOptions:c,currentFocus:f,popoverPosition:k,setFilteredOptions:p,setCurrentFocus:x,setShowChips:w,setPopoverPosition:m,setInputRect:a,optionsListHeight:u,optionsListRect:R,setOptionsListRect:h,setOptionsListHeight:A},children:t})};var se=({option:t,onMountWidth:o,size:r})=>{let e=useRef(null);return useEffect(()=>{e.current&&o?.(e.current.clientWidth);},[]),jsx(d,{type:"fill",variant:"standard",ref:e,className:"flex-shrink-0",size:r==="md"?"xs":"sm",hasCloseIcon:!1,children:t.label})},Tt=se;var ge=150,we=bt.memo(({selectedOptions:t,error:o,onCleanSelectedOptions:r,disabled:e,size:l})=>{let{autocompleteId:i,inputRect:a,inputRef:n,optionsListRef:w}=I(),c=bt.useRef(null),[p,f]=bt.useState(new Map),x=useMemo(()=>{if(!a?.width)return [];let m=0,R=a.width-ge,h=0;for(let u=0;u<t.length&&(h+=p.get(u)??0,!(h>R));u++)m++;return t.slice(0,m)},[a?.width,t,p]),k=useCallback(()=>{e||(n?.current?.focus(),w.current.style.display="flex");},[e]);return jsxs("div",{onClick:k,className:a$2("absolute top-0 z-30 flex w-full cursor-pointer flex-nowrap items-center gap-2 pl-3 pr-12",e&&"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:c,children:x.map((m,R)=>jsx(Tt,{option:m,onMountWidth:h=>f(u=>new Map(u).set(R,h)),size:l},`chip-input-${i}-${m.value}`))}),t.length>x.length&&jsx("span",{className:"text-base",children:"..."}),t.length>0&&!o&&jsx(a$3,{content:String(t.length),size:l}),o&&t.length>0&&jsx(c$1,{className:"h-6 w-6 text-error-700",onClick:m=>{m.stopPropagation(),r();}})]})}),Ht=we;var be=bt.memo(({option:t,index:o,onPressOption:r,isSelected:e,optionDescriptionLines:l})=>{let{currentFocus:i,inputRef:a}=I();return jsx(St,{title:t.label,checked:e,disabled:t.disabled,className:i===o?"bg-primary-200":void 0,onMouseDown:n=>{t.disabled||(a?.current?.value&&n.preventDefault(),r?.(t,n));},description:t.description,descriptionLines:l})}),ht=be;var xe=bt.memo(({selectedOptions:t,handleSelect:o,NoResultsIcon:r,noResultsLabel:e,noResultsDescription:l,noResultsDescriptionLines:i,noResultsAsColumn:a$2,noResultsButtonOnClick:n,optionDescriptionLines:w,noResultsButtonLabel:c$1})=>{let{popoverPosition:p,scrollAreaRef:f,optionsListRef:x,filteredOptions:k,inputRect:m,autocompleteId:R,inputRef:h,optionsListHeight:u}=I(),A=useCallback(b=>t.some(d=>d.value===b.value),[t]),V=useMemo(()=>t.filter(b=>b.label.toLowerCase().includes(h?.current?.value.toLowerCase()??"")),[t,h?.current?.value]);return jsx(Ct.Root,{asChild:!0,children:jsx("div",{ref:x,className:"pointer-events-auto fixed z-50 hidden w-full",style:m?{width:`${m.width}px`,left:m.left,top:p==="bottom"?`${m.bottom}px`:void 0,bottom:p==="top"?`${window.innerHeight-m.top}px`:void 0}:void 0,children:jsxs(a,{className:"elevation-8 mb-2 flex w-full flex-col rounded-lg bg-neutral-50",style:{maxHeight:u+"px"},ref:f,children:[k.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:l,Icon:r,iconAsColumn:a$2,descriptionLines:i}),n&&jsxs(Fragment,{children:[jsx(a$1,{}),jsx(c,{variant:"ghost",className:"my-3 w-fit self-center",onClick:b=>{x.current.style.display="none",h.current.value="",n();},children:c$1})]})]}),V.map((b,d)=>jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`)),k.map((b,d)=>!t.some(y=>y.value===b.value)&&jsx(ht,{option:b,index:d,onPressOption:y=>o(y),isSelected:A(b),optionDescriptionLines:w},`autocomplete-option-${R}-${b.key??b.value}`))]})})})}),Xt=xe;var Le=bt.memo(({selectedOptions:t,onSelect:o,error:r,helperText:e,label:l,placeholder:i,options:a,onInputChange:n,size:w,disabled:c})=>{let{setCurrentFocus:p,setFilteredOptions:f,optionsListRef:x,inputRef:k}=I();return jsx(a$4,{ref:k,autoComplete:"off",list:"",disabled:c,selectMode:!0,onChange:m=>{p(-1),n?.(m.target.value);},onClean:()=>{p(-1),f(a),o?.(null,t);},onClick:()=>{c||(x.current.style.display="flex");},error:r,helperText:e,label:l,placeholder:i,fixedTopLabel:t.length>0,size:w})}),Bt=Le;var Yt=({options:t,defaultSelectedOptions:o,onSelect:r,error:e,helperText:l,label:i,placeholder:a,noResultsLabel:n,noResultsIcon:w,noResultsDescription:c,noResultsDescriptionLines:p,noResultsAsColumn:f,noResultsButtonOnClick:x,noResultsButtonLabel:k,className:m,onInputChange:R,value:h,loading:u,size:A="md",optionDescriptionLines:V=1,disabled:b})=>{let{inputRef:d,optionsListRef:y,setFilteredOptions:C,setShowChips:g,setInputRect:nt,setPopoverPosition:lt,setCurrentFocus:st,showChips:T,setOptionsListRect:ct,optionsListRect:H,setOptionsListHeight:j}=I(),K=useRef(!1),[G,N]=useState(o??[]),z=useCallback(L=>{N(P=>{let S,$=P.findIndex(Vt=>Vt.value===L.value);return $===-1?(S=P.concat(L),r?.(L,S),S):(S=P.toSpliced($,1),r?.(L,S),S)});},[r]),U=useCallback(()=>{N([]),C(t),r?.(null,[]);},[]),v=useCallback(()=>{g(!1);},[]),O=useCallback(()=>{g(!0);},[]),M=useCallback(()=>{if(!d?.current)return;let L=d.current.getBoundingClientRect();nt(L);let P=H?H.height>E?E:H.height:E,S=window.innerHeight-L.bottom>P,$=L.top>P;lt(S?"bottom":$?"top":"bottom"),j($?E:window.innerHeight-L.bottom>E?E:window.innerHeight-L.bottom);},[H?.height]),Q=useCallback(()=>{let L=t.filter(P=>P.label.toLowerCase().includes(d?.current?.value.toLowerCase()??""));if(C(L),y?.current){let P=y.current.getBoundingClientRect();ct(P);}},[t,y?.current]);return useEffect(()=>{C(t);},[t]),a$5(y,()=>{y.current.style.display="none",st(-1);}),useEffect(()=>{if(d?.current)return M(),d.current.addEventListener("mousedown",M),d.current.addEventListener("input",Q),d.current.addEventListener("focusin",v),d.current.addEventListener("focusout",O),window.addEventListener("scroll",M,!0),window.addEventListener("resize",M),()=>{d.current?.removeEventListener("mousedown",M),d.current?.removeEventListener("input",M),d.current?.removeEventListener("focusout",O),d.current?.removeEventListener("focusin",v),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M);}},[M,O,v,Q]),useEffect(()=>{h&&(N(h),g(!0));},[h]),useEffect(()=>{u||o&&o.length&&!K.current&&(N(o),K.current=!0,g(!0));},[o,u]),jsxs("div",{className:a$2("relative",m),children:[jsx(Bt,{selectedOptions:G,onSelect:r,error:e,helperText:l,label:i,placeholder:a,handleSelect:z,options:t,onInputChange:R,size:A,disabled:b}),T&&jsx(Ht,{selectedOptions:G,disabled:b,error:e,onCleanSelectedOptions:U,size:A}),jsx(Xt,{handleSelect:z,selectedOptions:G,noResultsLabel:n,NoResultsIcon:w,optionDescriptionLines:V,noResultsAsColumn:f,noResultsButtonLabel:k,noResultsButtonOnClick:x,noResultsDescription:c,noResultsDescriptionLines:p})]})};var Oo=t=>jsx(Dt,{children:jsx(Yt,{...t})});var Oe=({children:t,hasDescription:o=!1,disabled:r=!1,hasDivider:e=!1,className:l,onClick:i,...a})=>jsxs(Fragment,{children:[jsx("div",{className:a$2("line-height-[120%] flex flex-row gap-4 pl-4 pr-3",o?"py-3":"py-[0.875rem]",r?"text-neutral-400":"hover:bg-primary-100 focus:bg-primary-200",l),onClick:n=>{r||i?.(n);},...a,children:t}),e&&jsx(a$1,{})]}),_=Oe;var Mt=({children:t,title:o,titleLines:r,description:e="",descriptionLines:l,startIcon:i,hasDivider:a=!1,disabled:n=!1,className:w,...c})=>jsxs(_,{hasDescription:!!e,disabled:n,hasDivider:a,className:w,...c,children:[i&&bt.cloneElement(i,{className:a$2(e?"mt-[0.4rem]":"self-center","shrink-0"),size:18}),jsx(Y,{title:o,titleLines:r,description:e,descriptionLines:l,disabled:n})]});export{rr as a,Mt as b,mr as c,St as d,Oo as e};
@@ -1 +1 @@
1
- import {a}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-JGL2V7EX.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import $,{useId,useRef,useState,useEffect}from'react';import*as R from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=56,u=6,q=({options:n,noResults:w,selectedOption:L,onSelect:P,onChange:C,onClick:T,className:k,...I})=>{let N=useId(),l=useRef(null),o=useRef(null),g=useRef(null),[H,M]=useState("bottom"),[r,F]=useState(),[s,c]=useState(-1),[h,y]=useState(L??null),b=e=>{l.current.style.display="none",o.current.value=e.label,y(e),P?.(e);},A=e=>{if(e.key==="ArrowDown"){if(s===n.length-1)return;c(t=>t+1),l.current.style.display="flex",x();}else if(e.key==="ArrowUp"){if(s===0)return;c(t=>t-1),x();}else e.key==="Enter"&&(b(n[s]),c(-1));},x=()=>{let e=i*u;g.current.scroll({top:(s+2)*i<=e?0:i*(s+2)-e,behavior:"smooth"});};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=i*(n.length<u?n.length:u)+16,m=o.current.getBoundingClientRect();F(m);let B=window.innerHeight-m.bottom>t,D=m.top>t;M(B?"bottom":D?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){l.current&&!l.current.contains(t.target)&&(l.current.style.display="none",c(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[l.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",k),readOnly:!0,ref:o,autoComplete:"off",list:"",selectMode:!0,value:h?.label,showClearButton:!1,onClick:e=>{l.current.style.display="flex",T?.(e);},onChange:e=>{c(-1),y(null),C?.(e);},onKeyDown:A,...I}),jsx(R.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:r?{width:`${r.width}px`,left:r.left,top:H==="bottom"?`${r.height+r.top+window.scrollY}px`:window.scrollY+r.top-(n.length<u?n.length:u)*i-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:g,children:[n.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(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})]}),n.map((e,t)=>jsx("li",{onClick:()=>{b(e);},className:a$1("w-full flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",h?.value===e.value&&"bg-primary-200",s===t&&"bg-primary-200"),children:e.label},`select-option-${N}-${e.key??e.value}`))]})})})]})};export{q as a};
1
+ import {a}from'./chunk-2GJHRBSH.mjs';import {a as a$2}from'./chunk-QHBCNAWO.mjs';import {a as a$1}from'./chunk-2WINTZSS.mjs';import $,{useId,useRef,useState,useEffect}from'react';import*as R from'@radix-ui/react-portal';import {jsxs,Fragment,jsx}from'react/jsx-runtime';var i=56,u=6,q=({options:n,noResults:w,selectedOption:L,onSelect:P,onChange:C,onClick:T,className:k,...I})=>{let N=useId(),l=useRef(null),o=useRef(null),g=useRef(null),[H,M]=useState("bottom"),[r,F]=useState(),[s,c]=useState(-1),[h,y]=useState(L??null),b=e=>{l.current.style.display="none",o.current.value=e.label,y(e),P?.(e);},A=e=>{if(e.key==="ArrowDown"){if(s===n.length-1)return;c(t=>t+1),l.current.style.display="flex",x();}else if(e.key==="ArrowUp"){if(s===0)return;c(t=>t-1),x();}else e.key==="Enter"&&(b(n[s]),c(-1));},x=()=>{let e=i*u;g.current.scroll({top:(s+2)*i<=e?0:i*(s+2)-e,behavior:"smooth"});};return useEffect(()=>{if(!o.current)return;let e=()=>{if(!o.current)return;let t=i*(n.length<u?n.length:u)+16,m=o.current.getBoundingClientRect();F(m);let B=window.innerHeight-m.bottom>t,D=m.top>t;M(B?"bottom":D?"top":"bottom");};return e(),o.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{o.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[o.current]),useEffect(()=>{function e(t){l.current&&!l.current.contains(t.target)&&(l.current.style.display="none",c(-1));}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e);}},[l.current]),jsxs(Fragment,{children:[jsx(a,{className:a$1("w-full !cursor-pointer",k),readOnly:!0,ref:o,autoComplete:"off",list:"",selectMode:!0,value:h?.label,showClearButton:!1,onClick:e=>{l.current.style.display="flex",T?.(e);},onChange:e=>{c(-1),y(null),C?.(e);},onKeyDown:A,...I}),jsx(R.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:r?{width:`${r.width}px`,left:r.left,top:H==="bottom"?`${r.height+r.top+window.scrollY}px`:window.scrollY+r.top-(n.length<u?n.length:u)*i-16}:void 0,children:jsxs(a$2,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:g,children:[n.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(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})]}),n.map((e,t)=>jsx("li",{onClick:()=>{b(e);},className:a$1("w-full flex-shrink-0 cursor-pointer py-4 pl-4 pr-6 text-left hover:bg-primary-100",h?.value===e.value&&"bg-primary-200",s===t&&"bg-primary-200"),children:e.label},`select-option-${N}-${e.key??e.value}`))]})})})]})};export{q as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-2WINTZSS.mjs';import*as e from'@radix-ui/react-scroll-area';import {forwardRef,useRef,useEffect,useImperativeHandle}from'react';import {jsxs,jsx}from'react/jsx-runtime';var b=forwardRef(({className:c,children:r,onScrollEnd:a$1,isInfiniteScroll:o=!1,viewPortClassName:v,viewPortStyle:S,...A},p)=>{let l=useRef(null);return useEffect(()=>{if(!o)return;let s=()=>{if(l.current){let{scrollTop:u,scrollHeight:P,clientHeight:R}=l.current;u+R>=P-10&&a$1?.();}},m=l.current;return m?.addEventListener("scroll",s),()=>{m?.removeEventListener("scroll",s);}},[a$1,o]),useImperativeHandle(p,()=>l.current,[l]),jsxs(e.Root,{className:a("relative overflow-hidden",c),...A,children:[jsx(e.Viewport,{ref:l,className:a("h-full w-full rounded-[inherit] [&>div]:!flex [&>div]:h-full [&>div]:flex-col",v),style:S,children:r}),jsx(f,{forceMount:o},o?l.current?.scrollHeight:1),jsx(e.Corner,{})]})});b.displayName=e.Root.displayName;var f=forwardRef(({className:c,orientation:r="vertical",...a$1},o)=>jsx(e.ScrollAreaScrollbar,{ref:o,orientation:r,className:a("flex touch-none select-none bg-neutral-100 transition-colors",r==="vertical"&&"h-full w-4 py-2",r==="horizontal"&&"h-4 flex-col px-2",c),...a$1,children:jsx(e.ScrollAreaThumb,{className:a("relative flex-1 rounded bg-primary-500",r==="vertical"&&"mx-1 w-2",r==="horizontal"&&"my-1 h-2")})}));f.displayName=e.ScrollAreaScrollbar.displayName;export{b as a,f as b};
@@ -0,0 +1 @@
1
+ import {j,k}from'./chunk-TYHJTIAW.mjs';import {a}from'./chunk-2WINTZSS.mjs';import*as s from'react';import*as r from'@radix-ui/react-checkbox';import {Label}from'@radix-ui/react-label';import {jsxs,jsx}from'react/jsx-runtime';var v=["sm","md"],h=s.forwardRef(({className:c,label:n,size:e="md",...t},l)=>jsxs("div",{className:a("flex items-center",e==="md"&&"gap-3",e==="sm"&&"gap-2",c),children:[jsx("div",{className:a("flex flex-shrink-0 rounded-full transition-all has-[:hover]:has-[:enabled]:[&:not(:active)]:bg-transparent-primary-20 has-[:hover]:[&:not(:disabled)]:[&:not(:active)]:ring-transparent-primary-20",e==="sm"&&"h-4 w-4 has-[:hover]:has-[:enabled]:[&:not(:active)]:ring-4",e=="md"&&"h-5 w-5 has-[:hover]:has-[:enabled]:[&:not(:active)]:ring-6"),children:jsx(r.Root,{ref:l,className:a("flex-shrink-0 rounded-sm ring-2 ring-inset ring-neutral-900 active:enabled:ring-primary-700 disabled:cursor-not-allowed disabled:ring-neutral-500 data-[state=checked]:enabled:bg-primary-500 data-[state=indeterminate]:enabled:bg-primary-500 data-[state=checked]:enabled:ring-0 data-[state=indeterminate]:enabled:ring-0 hover:data-[state=checked]:enabled:bg-primary-600 hover:data-[state=indeterminate]:enabled:bg-primary-600 hover:data-[state=unchecked]:enabled:ring-primary-600 active:enabled:data-[state=checked]:bg-primary-700 active:enabled:data-[state=indeterminate]:bg-primary-700 disabled:data-[state=checked]:bg-neutral-500 disabled:data-[state=indeterminate]:bg-neutral-500",e==="sm"&&"h-4 w-4",e==="md"&&"h-5 w-5"),...t,children:jsxs(r.Indicator,{className:"flex items-center justify-center",children:[t.checked!=="indeterminate"&&jsx(j,{size:e==="sm"?14:18,className:"text-neutral-50"}),t.checked==="indeterminate"&&jsx(k,{size:e==="sm"?14:18,className:"text-neutral-50"})]})})}),n&&jsx(Label,{htmlFor:t.id,className:a("font-normal leading-[130%] text-neutral-900",t.disabled&&"text-neutral-500",e==="md"&&"text-base",e==="sm"&&"text-sm"),children:n})]}));h.displayName=r.Root.displayName;export{v as a,h as b};
@@ -1 +1 @@
1
- import {a,b as b$2}from'./chunk-XNOZYNRE.mjs';import {a as a$1,b as b$1,c,g,h,d,e as e$1,i,j,f}from'./chunk-A5A22HEL.mjs';import {a as a$2,b}from'./chunk-JGL2V7EX.mjs';import {e}from'./chunk-TYHJTIAW.mjs';import {useMemo}from'react';import {useReactTable,getCoreRowModel,getPaginationRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function se({columns:z,data:m,rowsCount:l,pagination:i$1,onPaginationChange:d$1,noResults:H,rowsPerPageText:I="Rows per page",ofText:k="of",onNextPageClick:M,onPreviousPageClick:B,disableNextPage:T,disablePreviousPage:p,className:O,onRowsPerPageChange:A,columnOrder:V,columnVisibility:L,rowsPerPageOptions:F,...G}){let o=useReactTable({data:m,columns:z,rowCount:l,state:{pagination:i$1,columnOrder:V,columnVisibility:L},onPaginationChange:d$1,manualPagination:!0,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),$=useMemo(()=>p||!!l&&!o.getCanPreviousPage(),[p,l,i$1?.pageIndex]),E=useMemo(()=>T||!!l&&!o.getCanNextPage(),[T,l,i$1?.pageIndex]);return o.getRowModel().rows?.length?jsx(a,{children:jsxs(a$1,{className:O,...G,children:[jsxs(a$2,{children:[jsx(b,{orientation:"horizontal",className:"z-10"}),jsxs(b$1,{className:"mb-3",children:[jsx("colgroup",{children:o.getHeaderGroups()[0].headers.map(a=>{let t=a.column.getSize()/o.getHeaderGroups()[0].headers.reduce((n,W)=>n+W.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${t}%`,minWidth:`${a.column.getSize()}px`}},a.id)})}),jsx(c,{children:o.getHeaderGroups().map(a=>jsx(g,{children:a.headers.map(t=>{let n=t.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[t.isPlaceholder?null:jsx(b$2,{content:flexRender(n.header,t.getContext()),className:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1",children:flexRender(n.header,t.getContext())})}),n.headerInfoTooltip&&jsx(b$2,{size:n.headerInfoTooltipSize,content:n.headerInfoTooltip,className:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] flex-shrink-0"})})]})},t.id)})},a.id))}),jsx(d,{children:o.getRowModel().rows.map(a=>jsx(e$1,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(t=>jsx(i,{children:flexRender(t.column.columnDef.cell,t.getContext())},t.id))},a.id))})]})]}),i$1&&d$1&&m.length>0&&jsx(j,{rowsPerPageOptions:F,rowsCount:l,pagination:i$1,onRowsPerPageChange:a=>{o.setPageSize(a),o.setPageIndex(0),A?.(a);},onPreviousPageClick:()=>{o.previousPage(),B?.();},onNextPageClick:()=>{o.nextPage(),M?.();},disableNextPage:E,disablePreviousPage:$,ofText:k,rowsPerPageText:I})]})}):jsx(f,{...H})}export{se as a};
1
+ import {a as a$1,b as b$1,c,g,h,d,e as e$1,i,j,f}from'./chunk-A5A22HEL.mjs';import {a,b as b$2}from'./chunk-XNOZYNRE.mjs';import {a as a$2,b}from'./chunk-QHBCNAWO.mjs';import {e}from'./chunk-TYHJTIAW.mjs';import {useMemo}from'react';import {useReactTable,getCoreRowModel,getPaginationRowModel,flexRender}from'@tanstack/react-table';import {jsx,jsxs}from'react/jsx-runtime';function se({columns:z,data:m,rowsCount:l,pagination:i$1,onPaginationChange:d$1,noResults:H,rowsPerPageText:I="Rows per page",ofText:k="of",onNextPageClick:M,onPreviousPageClick:B,disableNextPage:T,disablePreviousPage:p,className:O,onRowsPerPageChange:A,columnOrder:V,columnVisibility:L,rowsPerPageOptions:F,...G}){let o=useReactTable({data:m,columns:z,rowCount:l,state:{pagination:i$1,columnOrder:V,columnVisibility:L},onPaginationChange:d$1,manualPagination:!0,getCoreRowModel:getCoreRowModel(),getPaginationRowModel:getPaginationRowModel()}),$=useMemo(()=>p||!!l&&!o.getCanPreviousPage(),[p,l,i$1?.pageIndex]),E=useMemo(()=>T||!!l&&!o.getCanNextPage(),[T,l,i$1?.pageIndex]);return o.getRowModel().rows?.length?jsx(a,{children:jsxs(a$1,{className:O,...G,children:[jsxs(a$2,{children:[jsx(b,{orientation:"horizontal",className:"z-10"}),jsxs(b$1,{className:"mb-3",children:[jsx("colgroup",{children:o.getHeaderGroups()[0].headers.map(a=>{let t=a.column.getSize()/o.getHeaderGroups()[0].headers.reduce((n,W)=>n+W.getSize(),0)*100;return jsx("col",{span:1,style:{width:`${t}%`,minWidth:`${a.column.getSize()}px`}},a.id)})}),jsx(c,{children:o.getHeaderGroups().map(a=>jsx(g,{children:a.headers.map(t=>{let n=t.column.columnDef;return jsx(h,{children:jsxs("div",{className:"flex items-center",children:[t.isPlaceholder?null:jsx(b$2,{content:flexRender(n.header,t.getContext()),className:"font-normal normal-case",children:jsx("span",{className:"line-clamp-1",children:flexRender(n.header,t.getContext())})}),n.headerInfoTooltip&&jsx(b$2,{size:n.headerInfoTooltipSize,content:n.headerInfoTooltip,className:"font-normal normal-case",children:jsx(e,{className:"ml-1 w-[0.875rem] flex-shrink-0"})})]})},t.id)})},a.id))}),jsx(d,{children:o.getRowModel().rows.map(a=>jsx(e$1,{"data-state":a.getIsSelected()&&"selected",children:a.getVisibleCells().map(t=>jsx(i,{children:flexRender(t.column.columnDef.cell,t.getContext())},t.id))},a.id))})]})]}),i$1&&d$1&&m.length>0&&jsx(j,{rowsPerPageOptions:F,rowsCount:l,pagination:i$1,onRowsPerPageChange:a=>{o.setPageSize(a),o.setPageIndex(0),A?.(a);},onPreviousPageClick:()=>{o.previousPage(),B?.();},onNextPageClick:()=>{o.nextPage(),M?.();},disableNextPage:E,disablePreviousPage:$,ofText:k,rowsPerPageText:I})]})}):jsx(f,{...H})}export{se as a};
@@ -1 +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-2GJHRBSH.mjs';import {a as a$4}from'./chunk-JGL2V7EX.mjs';import {g as g$1}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import V,{useId,useRef,useState,useEffect,useMemo}from'react';import*as S from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var M=56,p=6,K=(o=>(o.CL="CL",o.AR="AR",o.CO="CO",o.GT="GT",o.MX="MX",o.PE="PE",o.BR="BR",o.UY="UY",o.US="US",o))(K||{}),I=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(I.entries()),ge=({noResults:x,selectedCountry:d,onSelect:A,className:U,size:B="md",...m})=>{let H=useId(),l=useRef(null),r=useRef(null),o=useRef(null),[G,Y]=useState("bottom"),[s,$]=useState(),[k,z]=useState(-1),X=e=>{l.current.style.display="none",A?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=M*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();$(c);let _=window.innerHeight-c.bottom>a,D=c.top>a;Y(_?"bottom":D?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",z(-1));});let w=useMemo(()=>I.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:w?.flag,alt:w?.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(S.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:s?{width:`${s.width}px`,left:s.left,top:G==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*M-16}:void 0,children:jsxs(a$4,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:o,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:[V.cloneElement(x.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:x.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{X(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",k===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-${H}-${e}`))]})})})]})})};export{K as a,ge as b};
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-2GJHRBSH.mjs';import {a as a$4}from'./chunk-QHBCNAWO.mjs';import {g as g$1}from'./chunk-TYHJTIAW.mjs';import {a as a$2}from'./chunk-2WINTZSS.mjs';import V,{useId,useRef,useState,useEffect,useMemo}from'react';import*as S from'@radix-ui/react-portal';import {jsx,jsxs}from'react/jsx-runtime';var M=56,p=6,K=(o=>(o.CL="CL",o.AR="AR",o.CO="CO",o.GT="GT",o.MX="MX",o.PE="PE",o.BR="BR",o.UY="UY",o.US="US",o))(K||{}),I=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(I.entries()),ge=({noResults:x,selectedCountry:d,onSelect:A,className:U,size:B="md",...m})=>{let H=useId(),l=useRef(null),r=useRef(null),o=useRef(null),[G,Y]=useState("bottom"),[s,$]=useState(),[k,z]=useState(-1),X=e=>{l.current.style.display="none",A?.(e);};useEffect(()=>{if(!r.current)return;let e=()=>{if(!r.current)return;let a=M*(i.length<p?i.length:p)+16,c=r.current.getBoundingClientRect();$(c);let _=window.innerHeight-c.bottom>a,D=c.top>a;Y(_?"bottom":D?"top":"bottom");};return e(),r.current.addEventListener("mousedown",e),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{r.current?.removeEventListener("mousedown",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e);}},[r.current]),a$1(l,()=>{l.current&&(l.current.style.display="none",z(-1));});let w=useMemo(()=>I.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:w?.flag,alt:w?.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(S.Root,{asChild:!0,children:jsx("ul",{ref:l,className:"pointer-events-auto absolute z-[10000] hidden w-full",style:s?{width:`${s.width}px`,left:s.left,top:G==="bottom"?`${s.height+s.top+window.scrollY}px`:window.scrollY+s.top-(i.length<p?i.length:p)*M-16}:void 0,children:jsxs(a$4,{className:"elevation-8 my-2 flex max-h-[336px] w-full flex-col rounded-lg bg-neutral-50",ref:o,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:[V.cloneElement(x.icon,{className:"mb-2 h-8 w-8 text-neutral-300"}),jsx("p",{className:"text-center text-sm leading-[120%] text-neutral-500",children:x.message})]}),i.map(([e,a],c)=>jsx("li",{onClick:()=>{X(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",k===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-${H}-${e}`))]})})})]})})};export{K as a,ge as b};
package/dist/common.css CHANGED
@@ -1,4 +1,5 @@
1
1
  :root {
2
+ --color-primary-50: 243 255 253;
2
3
  --color-primary-100: 232 252 249;
3
4
  --color-primary-200: 214 248 243;
4
5
  --color-primary-300: 182 243 233;
@@ -1 +1 @@
1
- export{a as CountryEnum,b as CountryTextField}from'./chunk-2NVW6WMW.mjs';import'./chunk-KTRSJBA4.mjs';import'./chunk-E5G7444M.mjs';import'./chunk-2GJHRBSH.mjs';import'./chunk-SVUSHVWV.mjs';import'./chunk-JGL2V7EX.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
1
+ export{a as CountryEnum,b as CountryTextField}from'./chunk-ZJOF2Z6O.mjs';import'./chunk-KTRSJBA4.mjs';import'./chunk-E5G7444M.mjs';import'./chunk-2GJHRBSH.mjs';import'./chunk-SVUSHVWV.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
@@ -1 +1 @@
1
- export{a as DataTable}from'./chunk-6Y5TR5PD.mjs';import'./chunk-XNOZYNRE.mjs';import'./chunk-A5A22HEL.mjs';import'./chunk-JGL2V7EX.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
1
+ export{a as DataTable}from'./chunk-WGOFOREW.mjs';import'./chunk-A5A22HEL.mjs';import'./chunk-XNOZYNRE.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
package/dist/dialog.mjs CHANGED
@@ -1 +1 @@
1
- export{b as Dialog,l as DialogActionButton,i as DialogBody,m as DialogCloseButton,f as DialogContent,k as DialogDescription,n as DialogExtraButton,h as DialogFooter,g as DialogHeader,e as DialogOverlay,d as DialogPortal,a as DialogPrimitive,j as DialogTitle,c as DialogTrigger}from'./chunk-XKAWYIAQ.mjs';import'./chunk-JGL2V7EX.mjs';import'./chunk-WGMDH4XX.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
1
+ export{b as Dialog,l as DialogActionButton,i as DialogBody,m as DialogCloseButton,f as DialogContent,k as DialogDescription,n as DialogExtraButton,h as DialogFooter,g as DialogHeader,e as DialogOverlay,d as DialogPortal,a as DialogPrimitive,j as DialogTitle,c as DialogTrigger}from'./chunk-5UJVYIVN.mjs';import'./chunk-QHBCNAWO.mjs';import'./chunk-WGMDH4XX.mjs';import'./chunk-2VL36SBW.mjs';import'./chunk-TYHJTIAW.mjs';import'./chunk-TGTW7UYA.mjs';import'./chunk-2WINTZSS.mjs';
@@ -0,0 +1,49 @@
1
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
+ import * as React from 'react';
3
+ import { PropsWithChildren, HTMLAttributes } from 'react';
4
+ import { DialogRootProps, DialogContentProps } from '@ark-ui/react/dialog';
5
+ import { IconButtonProps } from './icon-button.mjs';
6
+ import { ButtonProps } from './button.mjs';
7
+ import 'tailwind-variants';
8
+ import 'lucide-react';
9
+
10
+ declare const DrawerSticky: React.ForwardRefExoticComponent<DialogRootProps & {
11
+ onOpenChange?: (open: boolean) => void;
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DrawerStickyTrigger: any;
14
+ declare const DrawerStickySizes: readonly ["sm", "md", "lg", "xl"];
15
+ type DrawerStickyContentProps = DialogContentProps & PropsWithChildren & {
16
+ className?: HTMLAttributes<HTMLDivElement>["className"];
17
+ size?: (typeof DrawerStickySizes)[number];
18
+ };
19
+ declare const DrawerStickyContent: React.ForwardRefExoticComponent<DialogContentProps & {
20
+ children?: React.ReactNode | undefined;
21
+ } & {
22
+ className?: HTMLAttributes<HTMLDivElement>["className"];
23
+ size?: (typeof DrawerStickySizes)[number];
24
+ } & React.RefAttributes<HTMLDivElement>>;
25
+ type DrawerStickyHeaderButtons = (IconButtonProps & {
26
+ visible?: boolean;
27
+ })[] | (ButtonProps & {
28
+ visible?: boolean;
29
+ });
30
+ type DrawerStickyHeaderProps = {
31
+ title: string;
32
+ description?: string;
33
+ buttons?: DrawerStickyHeaderButtons;
34
+ } & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description">;
35
+ declare const DrawerStickyHeader: React.ForwardRefExoticComponent<{
36
+ title: string;
37
+ description?: string;
38
+ buttons?: DrawerStickyHeaderButtons;
39
+ } & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description"> & React.RefAttributes<HTMLDivElement>>;
40
+ declare const DrawerStickyFooter: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
41
+ declare const DrawerStickyBody: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
42
+ onScrollEnd?: () => void;
43
+ isInfiniteScroll?: boolean;
44
+ viewPortClassName?: HTMLAttributes<HTMLDivElement>["className"];
45
+ viewPortStyle?: HTMLAttributes<HTMLDivElement>["style"];
46
+ } & React.RefAttributes<HTMLDivElement>>;
47
+ declare const DrawerStickyCloseTrigger: any;
48
+
49
+ export { DrawerSticky, DrawerStickyBody, DrawerStickyCloseTrigger, DrawerStickyContent, type DrawerStickyContentProps, DrawerStickyFooter, DrawerStickyHeader, type DrawerStickyHeaderProps, DrawerStickySizes, DrawerStickyTrigger };
@@ -0,0 +1,49 @@
1
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
+ import * as React from 'react';
3
+ import { PropsWithChildren, HTMLAttributes } from 'react';
4
+ import { DialogRootProps, DialogContentProps } from '@ark-ui/react/dialog';
5
+ import { IconButtonProps } from './icon-button.js';
6
+ import { ButtonProps } from './button.js';
7
+ import 'tailwind-variants';
8
+ import 'lucide-react';
9
+
10
+ declare const DrawerSticky: React.ForwardRefExoticComponent<DialogRootProps & {
11
+ onOpenChange?: (open: boolean) => void;
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DrawerStickyTrigger: any;
14
+ declare const DrawerStickySizes: readonly ["sm", "md", "lg", "xl"];
15
+ type DrawerStickyContentProps = DialogContentProps & PropsWithChildren & {
16
+ className?: HTMLAttributes<HTMLDivElement>["className"];
17
+ size?: (typeof DrawerStickySizes)[number];
18
+ };
19
+ declare const DrawerStickyContent: React.ForwardRefExoticComponent<DialogContentProps & {
20
+ children?: React.ReactNode | undefined;
21
+ } & {
22
+ className?: HTMLAttributes<HTMLDivElement>["className"];
23
+ size?: (typeof DrawerStickySizes)[number];
24
+ } & React.RefAttributes<HTMLDivElement>>;
25
+ type DrawerStickyHeaderButtons = (IconButtonProps & {
26
+ visible?: boolean;
27
+ })[] | (ButtonProps & {
28
+ visible?: boolean;
29
+ });
30
+ type DrawerStickyHeaderProps = {
31
+ title: string;
32
+ description?: string;
33
+ buttons?: DrawerStickyHeaderButtons;
34
+ } & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description">;
35
+ declare const DrawerStickyHeader: React.ForwardRefExoticComponent<{
36
+ title: string;
37
+ description?: string;
38
+ buttons?: DrawerStickyHeaderButtons;
39
+ } & Omit<HTMLAttributes<HTMLDivElement>, "title" | "description"> & React.RefAttributes<HTMLDivElement>>;
40
+ declare const DrawerStickyFooter: React.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
41
+ declare const DrawerStickyBody: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
42
+ onScrollEnd?: () => void;
43
+ isInfiniteScroll?: boolean;
44
+ viewPortClassName?: HTMLAttributes<HTMLDivElement>["className"];
45
+ viewPortStyle?: HTMLAttributes<HTMLDivElement>["style"];
46
+ } & React.RefAttributes<HTMLDivElement>>;
47
+ declare const DrawerStickyCloseTrigger: any;
48
+
49
+ export { DrawerSticky, DrawerStickyBody, DrawerStickyCloseTrigger, DrawerStickyContent, type DrawerStickyContentProps, DrawerStickyFooter, DrawerStickyHeader, type DrawerStickyHeaderProps, DrawerStickySizes, DrawerStickyTrigger };