@deepnoid/ui 0.1.155 → 0.1.157

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 (110) hide show
  1. package/.turbo/turbo-build.log +175 -175
  2. package/dist/{chunk-6EMUORXZ.mjs → chunk-5KOTQEFC.mjs} +1 -1
  3. package/dist/{chunk-6F4GD2PP.mjs → chunk-73NBUI4Y.mjs} +1 -1
  4. package/dist/{chunk-7HWPWDYW.mjs → chunk-ACFDUCPL.mjs} +2 -2
  5. package/dist/{chunk-WWSQIDWW.mjs → chunk-BFC4VP3B.mjs} +1 -1
  6. package/dist/{chunk-EOP4227J.mjs → chunk-DQ3ZRNX4.mjs} +1 -1
  7. package/dist/{chunk-WYEUAXY7.mjs → chunk-DSEF7GGB.mjs} +1 -1
  8. package/dist/{chunk-UOVPR2VJ.mjs → chunk-HLWNJLRZ.mjs} +1 -1
  9. package/dist/{chunk-J64OQUOI.mjs → chunk-IN6M25YL.mjs} +2 -2
  10. package/dist/{chunk-63IEPEKU.mjs → chunk-JJAPJQUD.mjs} +1 -1
  11. package/dist/{chunk-Q6BXFXQM.mjs → chunk-LBJN5TAP.mjs} +1 -1
  12. package/dist/{chunk-67A5TV7C.mjs → chunk-MGGBCCZL.mjs} +2 -2
  13. package/dist/{chunk-H3UI2ZNK.mjs → chunk-NB45YSED.mjs} +1 -1
  14. package/dist/{chunk-LWSGRTWO.mjs → chunk-PO4H65C3.mjs} +1 -1
  15. package/dist/{chunk-UMMZ7NI5.mjs → chunk-QJUPHJN6.mjs} +1 -1
  16. package/dist/{chunk-5HMTKXVV.mjs → chunk-SHI7P4DQ.mjs} +1 -1
  17. package/dist/{chunk-CSZQLOP5.mjs → chunk-T6V6BJOT.mjs} +2 -2
  18. package/dist/chunk-T7IJB3N4.mjs +449 -0
  19. package/dist/{chunk-NX4FTFY3.mjs → chunk-VUMESK5D.mjs} +66 -0
  20. package/dist/{chunk-ZF25F457.mjs → chunk-ZUAOUHWS.mjs} +3 -3
  21. package/dist/components/avatar/avatar.js +66 -0
  22. package/dist/components/avatar/avatar.mjs +2 -2
  23. package/dist/components/avatar/index.js +66 -0
  24. package/dist/components/avatar/index.mjs +2 -2
  25. package/dist/components/breadcrumb/breadcrumb.js +66 -0
  26. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  27. package/dist/components/breadcrumb/index.js +66 -0
  28. package/dist/components/breadcrumb/index.mjs +5 -5
  29. package/dist/components/button/button.js +66 -0
  30. package/dist/components/button/button.mjs +3 -3
  31. package/dist/components/button/icon-button.js +66 -0
  32. package/dist/components/button/icon-button.mjs +3 -3
  33. package/dist/components/button/index.js +66 -0
  34. package/dist/components/button/index.mjs +4 -4
  35. package/dist/components/chip/chip.js +66 -0
  36. package/dist/components/chip/chip.mjs +3 -3
  37. package/dist/components/chip/index.js +66 -0
  38. package/dist/components/chip/index.mjs +3 -3
  39. package/dist/components/fileUpload/fileUpload.js +66 -0
  40. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  41. package/dist/components/fileUpload/index.js +66 -0
  42. package/dist/components/fileUpload/index.mjs +6 -6
  43. package/dist/components/icon/Icon.d.mts +12 -0
  44. package/dist/components/icon/Icon.d.ts +12 -0
  45. package/dist/components/icon/Icon.js +66 -0
  46. package/dist/components/icon/Icon.mjs +2 -2
  47. package/dist/components/icon/index.js +66 -0
  48. package/dist/components/icon/index.mjs +2 -2
  49. package/dist/components/icon/template.d.mts +3 -0
  50. package/dist/components/icon/template.d.ts +3 -0
  51. package/dist/components/icon/template.js +66 -0
  52. package/dist/components/icon/template.mjs +1 -1
  53. package/dist/components/input/index.js +66 -0
  54. package/dist/components/input/index.mjs +3 -3
  55. package/dist/components/input/input.js +66 -0
  56. package/dist/components/input/input.mjs +3 -3
  57. package/dist/components/list/index.js +66 -0
  58. package/dist/components/list/index.mjs +4 -4
  59. package/dist/components/list/listItem.js +66 -0
  60. package/dist/components/list/listItem.mjs +4 -4
  61. package/dist/components/modal/index.js +66 -0
  62. package/dist/components/modal/index.mjs +5 -5
  63. package/dist/components/modal/modal.js +66 -0
  64. package/dist/components/modal/modal.mjs +5 -5
  65. package/dist/components/pagination/index.js +66 -0
  66. package/dist/components/pagination/index.mjs +4 -4
  67. package/dist/components/pagination/pagination.js +66 -0
  68. package/dist/components/pagination/pagination.mjs +4 -4
  69. package/dist/components/picker/datePicker.d.mts +35 -4
  70. package/dist/components/picker/datePicker.d.ts +35 -4
  71. package/dist/components/picker/datePicker.js +247 -47
  72. package/dist/components/picker/datePicker.mjs +6 -6
  73. package/dist/components/picker/index.d.mts +1 -1
  74. package/dist/components/picker/index.d.ts +1 -1
  75. package/dist/components/picker/index.js +247 -47
  76. package/dist/components/picker/index.mjs +8 -8
  77. package/dist/components/picker/timePicker.js +66 -0
  78. package/dist/components/picker/timePicker.mjs +4 -4
  79. package/dist/components/radio/index.d.mts +1 -1
  80. package/dist/components/radio/index.d.ts +1 -1
  81. package/dist/components/select/index.js +66 -0
  82. package/dist/components/select/index.mjs +3 -3
  83. package/dist/components/select/select.js +66 -0
  84. package/dist/components/select/select.mjs +3 -3
  85. package/dist/components/table/index.js +66 -0
  86. package/dist/components/table/index.mjs +5 -5
  87. package/dist/components/table/table-body.js +66 -0
  88. package/dist/components/table/table-body.mjs +5 -5
  89. package/dist/components/table/table-head.js +66 -0
  90. package/dist/components/table/table-head.mjs +5 -5
  91. package/dist/components/table/table.js +66 -0
  92. package/dist/components/table/table.mjs +5 -5
  93. package/dist/components/timePicker/calendar.js +66 -0
  94. package/dist/components/timePicker/calendar.mjs +2 -2
  95. package/dist/components/toast/index.js +66 -0
  96. package/dist/components/toast/index.mjs +4 -4
  97. package/dist/components/toast/toast.js +66 -0
  98. package/dist/components/toast/toast.mjs +3 -3
  99. package/dist/components/toast/use-toast.js +66 -0
  100. package/dist/components/toast/use-toast.mjs +4 -4
  101. package/dist/components/tree/index.js +66 -0
  102. package/dist/components/tree/index.mjs +3 -3
  103. package/dist/components/tree/tree.js +66 -0
  104. package/dist/components/tree/tree.mjs +3 -3
  105. package/dist/index.d.mts +2 -2
  106. package/dist/index.d.ts +2 -2
  107. package/dist/index.js +247 -47
  108. package/dist/index.mjs +19 -19
  109. package/package.json +1 -1
  110. package/dist/chunk-5MQZ7SDK.mjs +0 -315
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import {
3
3
  pagination_default
4
- } from "../../chunk-67A5TV7C.mjs";
4
+ } from "../../chunk-MGGBCCZL.mjs";
5
5
  import "../../chunk-F3HENRVM.mjs";
6
6
  import "../../chunk-2GCSFWHD.mjs";
7
- import "../../chunk-WWSQIDWW.mjs";
7
+ import "../../chunk-BFC4VP3B.mjs";
8
8
  import "../../chunk-ZYIIXWVY.mjs";
9
- import "../../chunk-Q6BXFXQM.mjs";
9
+ import "../../chunk-LBJN5TAP.mjs";
10
10
  import "../../chunk-E3G5QXSH.mjs";
11
- import "../../chunk-NX4FTFY3.mjs";
11
+ import "../../chunk-VUMESK5D.mjs";
12
12
  import "../../chunk-CDXBML6O.mjs";
13
13
  import "../../chunk-27Y6K5NK.mjs";
14
14
  import "../../chunk-AC6TWLRT.mjs";
@@ -4,11 +4,16 @@ import * as react from 'react';
4
4
  import { ComponentProps } from 'react';
5
5
  import { SlotsToClasses } from '../../utils/types.mjs';
6
6
 
7
- interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color" | "onChange">, VariantProps<typeof datePickerStyle> {
7
+ type DateRangeValue = {
8
+ startDate: string;
9
+ endDate: string;
10
+ };
11
+ type DateValue = string | DateRangeValue;
12
+ interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color" | "onChange" | "value">, VariantProps<typeof datePickerStyle> {
8
13
  label?: string;
9
14
  errorMessage?: string;
10
- onChange?: (date: string) => void;
11
- value?: string;
15
+ onChange?: (date: DateValue) => void;
16
+ value?: DateValue;
12
17
  classNames?: SlotsToClasses<DatePickerSlots>;
13
18
  placeholder?: string;
14
19
  format?: "YYYY-MM-DD" | "MM/DD/YYYY" | "DD/MM/YYYY";
@@ -23,6 +28,8 @@ interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color"
23
28
  todayTitle: string;
24
29
  cancelTitle: string;
25
30
  confirmTitle: string;
31
+ range?: boolean;
32
+ dualCalendar?: boolean;
26
33
  }
27
34
  declare const DatePicker: react.ForwardRefExoticComponent<Omit<DatePickerProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
28
35
 
@@ -47,6 +54,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
47
54
  base: string[];
48
55
  };
49
56
  };
57
+ dualCalendar: {
58
+ true: {
59
+ calendarWrapper: string[];
60
+ };
61
+ false: {
62
+ calendarWrapper: string[];
63
+ };
64
+ };
50
65
  }, {
51
66
  base: string[];
52
67
  calendarWrapper: string[];
@@ -78,6 +93,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
78
93
  base: string[];
79
94
  };
80
95
  };
96
+ dualCalendar: {
97
+ true: {
98
+ calendarWrapper: string[];
99
+ };
100
+ false: {
101
+ calendarWrapper: string[];
102
+ };
103
+ };
81
104
  }, {
82
105
  base: string[];
83
106
  calendarWrapper: string[];
@@ -109,6 +132,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
109
132
  base: string[];
110
133
  };
111
134
  };
135
+ dualCalendar: {
136
+ true: {
137
+ calendarWrapper: string[];
138
+ };
139
+ false: {
140
+ calendarWrapper: string[];
141
+ };
142
+ };
112
143
  }, {
113
144
  base: string[];
114
145
  calendarWrapper: string[];
@@ -122,4 +153,4 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
122
153
  }, undefined, unknown, unknown, undefined>>;
123
154
  type DatePickerSlots = keyof ReturnType<typeof datePickerStyle>;
124
155
 
125
- export { type DatePickerProps, type DatePickerSlots, datePickerStyle, DatePicker as default };
156
+ export { type DatePickerProps, type DatePickerSlots, type DateRangeValue, type DateValue, datePickerStyle, DatePicker as default };
@@ -4,11 +4,16 @@ import * as react from 'react';
4
4
  import { ComponentProps } from 'react';
5
5
  import { SlotsToClasses } from '../../utils/types.js';
6
6
 
7
- interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color" | "onChange">, VariantProps<typeof datePickerStyle> {
7
+ type DateRangeValue = {
8
+ startDate: string;
9
+ endDate: string;
10
+ };
11
+ type DateValue = string | DateRangeValue;
12
+ interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color" | "onChange" | "value">, VariantProps<typeof datePickerStyle> {
8
13
  label?: string;
9
14
  errorMessage?: string;
10
- onChange?: (date: string) => void;
11
- value?: string;
15
+ onChange?: (date: DateValue) => void;
16
+ value?: DateValue;
12
17
  classNames?: SlotsToClasses<DatePickerSlots>;
13
18
  placeholder?: string;
14
19
  format?: "YYYY-MM-DD" | "MM/DD/YYYY" | "DD/MM/YYYY";
@@ -23,6 +28,8 @@ interface DatePickerProps extends Omit<ComponentProps<"input">, "size" | "color"
23
28
  todayTitle: string;
24
29
  cancelTitle: string;
25
30
  confirmTitle: string;
31
+ range?: boolean;
32
+ dualCalendar?: boolean;
26
33
  }
27
34
  declare const DatePicker: react.ForwardRefExoticComponent<Omit<DatePickerProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
28
35
 
@@ -47,6 +54,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
47
54
  base: string[];
48
55
  };
49
56
  };
57
+ dualCalendar: {
58
+ true: {
59
+ calendarWrapper: string[];
60
+ };
61
+ false: {
62
+ calendarWrapper: string[];
63
+ };
64
+ };
50
65
  }, {
51
66
  base: string[];
52
67
  calendarWrapper: string[];
@@ -78,6 +93,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
78
93
  base: string[];
79
94
  };
80
95
  };
96
+ dualCalendar: {
97
+ true: {
98
+ calendarWrapper: string[];
99
+ };
100
+ false: {
101
+ calendarWrapper: string[];
102
+ };
103
+ };
81
104
  }, {
82
105
  base: string[];
83
106
  calendarWrapper: string[];
@@ -109,6 +132,14 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
109
132
  base: string[];
110
133
  };
111
134
  };
135
+ dualCalendar: {
136
+ true: {
137
+ calendarWrapper: string[];
138
+ };
139
+ false: {
140
+ calendarWrapper: string[];
141
+ };
142
+ };
112
143
  }, {
113
144
  base: string[];
114
145
  calendarWrapper: string[];
@@ -122,4 +153,4 @@ declare const datePickerStyle: tailwind_variants.TVReturnType<{
122
153
  }, undefined, unknown, unknown, undefined>>;
123
154
  type DatePickerSlots = keyof ReturnType<typeof datePickerStyle>;
124
155
 
125
- export { type DatePickerProps, type DatePickerSlots, datePickerStyle, DatePicker as default };
156
+ export { type DatePickerProps, type DatePickerSlots, type DateRangeValue, type DateValue, datePickerStyle, DatePicker as default };
@@ -792,6 +792,29 @@ var template = {
792
792
  }
793
793
  );
794
794
  },
795
+ ["home-outline"]: ({ className }) => {
796
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
797
+ "svg",
798
+ {
799
+ width: "21",
800
+ height: "21",
801
+ viewBox: "0 0 21 21",
802
+ fill: "none",
803
+ xmlns: "http://www.w3.org/2000/svg",
804
+ className,
805
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
806
+ "path",
807
+ {
808
+ d: "M1.96875 10.4997L9.8035 2.66407C10.1885 2.27995 10.8115 2.27995 11.1956 2.66407L19.0312 10.4997M3.9375 8.53094V17.3903C3.9375 17.9337 4.3785 18.3747 4.92188 18.3747H8.53125V14.1091C8.53125 13.5657 8.97225 13.1247 9.51562 13.1247H11.4844C12.0277 13.1247 12.4688 13.5657 12.4688 14.1091V18.3747H16.0781C16.6215 18.3747 17.0625 17.9337 17.0625 17.3903V8.53094M7.21875 18.3747H14.4375",
809
+ stroke: "#5B5E62",
810
+ strokeWidth: "1.25",
811
+ strokeLinecap: "round",
812
+ strokeLinejoin: "round"
813
+ }
814
+ )
815
+ }
816
+ );
817
+ },
795
818
  exclamation: ({ className, fill }) => {
796
819
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
797
820
  "svg",
@@ -1637,6 +1660,29 @@ var template = {
1637
1660
  }
1638
1661
  );
1639
1662
  },
1663
+ ["chat-outline"]: ({ className }) => {
1664
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1665
+ "svg",
1666
+ {
1667
+ width: "21",
1668
+ height: "21",
1669
+ viewBox: "0 0 21 21",
1670
+ fill: "none",
1671
+ xmlns: "http://www.w3.org/2000/svg",
1672
+ className,
1673
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1674
+ "path",
1675
+ {
1676
+ d: "M7.54688 10.5C7.54688 10.587 7.51231 10.6705 7.45077 10.732C7.38923 10.7936 7.30577 10.8281 7.21875 10.8281C7.13173 10.8281 7.04827 10.7936 6.98673 10.732C6.9252 10.6705 6.89062 10.587 6.89062 10.5C6.89062 10.413 6.9252 10.3295 6.98673 10.268C7.04827 10.2064 7.13173 10.1719 7.21875 10.1719C7.30577 10.1719 7.38923 10.2064 7.45077 10.268C7.51231 10.3295 7.54688 10.413 7.54688 10.5ZM7.54688 10.5H7.21875M10.8281 10.5C10.8281 10.587 10.7936 10.6705 10.732 10.732C10.6705 10.7936 10.587 10.8281 10.5 10.8281C10.413 10.8281 10.3295 10.7936 10.268 10.732C10.2064 10.6705 10.1719 10.587 10.1719 10.5C10.1719 10.413 10.2064 10.3295 10.268 10.268C10.3295 10.2064 10.413 10.1719 10.5 10.1719C10.587 10.1719 10.6705 10.2064 10.732 10.268C10.7936 10.3295 10.8281 10.413 10.8281 10.5ZM10.8281 10.5H10.5M14.1094 10.5C14.1094 10.587 14.0748 10.6705 14.0133 10.732C13.9517 10.7936 13.8683 10.8281 13.7812 10.8281C13.6942 10.8281 13.6108 10.7936 13.5492 10.732C13.4877 10.6705 13.4531 10.587 13.4531 10.5C13.4531 10.413 13.4877 10.3295 13.5492 10.268C13.6108 10.2064 13.6942 10.1719 13.7812 10.1719C13.8683 10.1719 13.9517 10.2064 14.0133 10.268C14.0748 10.3295 14.1094 10.413 14.1094 10.5ZM14.1094 10.5H13.7812M18.375 10.5C18.375 14.4865 14.8487 17.7188 10.5 17.7188C9.74504 17.7197 8.99328 17.6205 8.26437 17.4239C7.23692 18.1465 5.98353 18.4748 4.73375 18.3487C4.5948 18.3353 4.45643 18.3164 4.319 18.2919C4.75026 17.7836 5.04479 17.1738 5.17475 16.52C5.2535 16.1201 5.05838 15.7316 4.76613 15.4472C3.43875 14.1557 2.625 12.4154 2.625 10.5C2.625 6.5135 6.15125 3.28125 10.5 3.28125C14.8487 3.28125 18.375 6.5135 18.375 10.5Z",
1677
+ stroke: "#5B5E62",
1678
+ strokeWidth: "1.25",
1679
+ strokeLinecap: "round",
1680
+ strokeLinejoin: "round"
1681
+ }
1682
+ )
1683
+ }
1684
+ );
1685
+ },
1640
1686
  calendar: ({ className, fill }) => {
1641
1687
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1642
1688
  "svg",
@@ -1853,6 +1899,26 @@ var template = {
1853
1899
  }
1854
1900
  );
1855
1901
  },
1902
+ question: ({ className = "text-white" }) => {
1903
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1904
+ "svg",
1905
+ {
1906
+ xmlns: "http://www.w3.org/2000/svg",
1907
+ width: "24",
1908
+ height: "24",
1909
+ viewBox: "0 0 24 24",
1910
+ fill: "none",
1911
+ className,
1912
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1913
+ "path",
1914
+ {
1915
+ d: "M17 2.42969H7C4 2.42969 2 4.42969 2 7.42969V13.4297C2 16.4297 4 18.4297 7 18.4297V20.5597C7 21.3597 7.89 21.8397 8.55 21.3897L13 18.4297H17C20 18.4297 22 16.4297 22 13.4297V7.42969C22 4.42969 20 2.42969 17 2.42969ZM12 14.5997C11.58 14.5997 11.25 14.2597 11.25 13.8497C11.25 13.4397 11.58 13.0997 12 13.0997C12.42 13.0997 12.75 13.4397 12.75 13.8497C12.75 14.2597 12.42 14.5997 12 14.5997ZM13.26 10.4497C12.87 10.7097 12.75 10.8797 12.75 11.1597V11.3697C12.75 11.7797 12.41 12.1197 12 12.1197C11.59 12.1197 11.25 11.7797 11.25 11.3697V11.1597C11.25 9.99969 12.1 9.42969 12.42 9.20969C12.79 8.95969 12.91 8.78969 12.91 8.52969C12.91 8.02969 12.5 7.61969 12 7.61969C11.5 7.61969 11.09 8.02969 11.09 8.52969C11.09 8.93969 10.75 9.27969 10.34 9.27969C9.93 9.27969 9.59 8.93969 9.59 8.52969C9.59 7.19969 10.67 6.11969 12 6.11969C13.33 6.11969 14.41 7.19969 14.41 8.52969C14.41 9.66969 13.57 10.2397 13.26 10.4497Z",
1916
+ fill: "currentColor"
1917
+ }
1918
+ )
1919
+ }
1920
+ );
1921
+ },
1856
1922
  // ----------------------------------- old ---------------------------------
1857
1923
  // ** Status **
1858
1924
  "plus-circle": ({ className, fill }) => {
@@ -6607,12 +6673,25 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6607
6673
  todayTitle,
6608
6674
  cancelTitle,
6609
6675
  confirmTitle,
6676
+ range = false,
6677
+ dualCalendar = false,
6610
6678
  ...inputProps
6611
6679
  } = { ...props, ...variantProps };
6612
- const [selectedDate, setSelectedDate] = (0, import_react7.useState)(value || "");
6613
- const [tempSelectedDate, setTempSelectedDate] = (0, import_react7.useState)(value || "");
6680
+ const [selectedDate, setSelectedDate] = (0, import_react7.useState)(range ? "" : typeof value === "string" ? value || "" : "");
6681
+ const [selectedRange, setSelectedRange] = (0, import_react7.useState)({
6682
+ startDate: range && typeof value === "object" ? (value == null ? void 0 : value.startDate) || "" : "",
6683
+ endDate: range && typeof value === "object" ? (value == null ? void 0 : value.endDate) || "" : ""
6684
+ });
6685
+ const [tempSelectedDate, setTempSelectedDate] = (0, import_react7.useState)(selectedDate);
6686
+ const [tempSelectedRange, setTempSelectedRange] = (0, import_react7.useState)(selectedRange);
6687
+ const [rangeSelection, setRangeSelection] = (0, import_react7.useState)("start");
6614
6688
  const [isPanelOpen, setIsPanelOpen] = (0, import_react7.useState)(false);
6615
- const [currentDate, setCurrentDate] = (0, import_react7.useState)(tempSelectedDate ? new Date(tempSelectedDate) : /* @__PURE__ */ new Date());
6689
+ const [leftCurrentDate, setLeftCurrentDate] = (0, import_react7.useState)(
6690
+ range && tempSelectedRange.startDate ? new Date(tempSelectedRange.startDate) : tempSelectedDate ? new Date(tempSelectedDate) : /* @__PURE__ */ new Date()
6691
+ );
6692
+ const [rightCurrentDate, setRightCurrentDate] = (0, import_react7.useState)(
6693
+ dualCalendar ? new Date(leftCurrentDate.getFullYear(), leftCurrentDate.getMonth() + 1) : /* @__PURE__ */ new Date()
6694
+ );
6616
6695
  const inputWrapperRef = (0, import_react7.useRef)(null);
6617
6696
  const calendarWrapperRef = (0, import_react7.useRef)(null);
6618
6697
  const [panelPos, setPanelPos] = (0, import_react7.useState)({ top: -9999, left: -9999 });
@@ -6629,7 +6708,16 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6629
6708
  return dateString;
6630
6709
  }
6631
6710
  };
6632
- const displayValue = (0, import_react7.useMemo)(() => formatDate(selectedDate), [selectedDate, format]);
6711
+ const displayValue = (0, import_react7.useMemo)(() => {
6712
+ if (range) {
6713
+ const start = formatDate(selectedRange.startDate);
6714
+ const end = formatDate(selectedRange.endDate);
6715
+ if (start && end) return `${start} ~ ${end}`;
6716
+ if (start) return start;
6717
+ return "";
6718
+ }
6719
+ return formatDate(selectedDate);
6720
+ }, [selectedDate, selectedRange, format, range]);
6633
6721
  const calculatePosition = (0, import_react7.useCallback)(() => {
6634
6722
  if (inputWrapperRef.current) {
6635
6723
  const rect = inputWrapperRef.current.getBoundingClientRect();
@@ -6662,13 +6750,18 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6662
6750
  };
6663
6751
  const handleClearDate = (e) => {
6664
6752
  e.preventDefault();
6665
- setTempSelectedDate("");
6753
+ if (range) {
6754
+ setTempSelectedRange({ startDate: "", endDate: "" });
6755
+ setRangeSelection("start");
6756
+ } else {
6757
+ setTempSelectedDate("");
6758
+ }
6666
6759
  };
6667
6760
  const handleCalendarMouseDown = (e) => {
6668
6761
  e.preventDefault();
6669
6762
  if (blurTimeoutRef.current) clearTimeout(blurTimeoutRef.current);
6670
6763
  };
6671
- const getCalendarDates = (0, import_react7.useCallback)(() => {
6764
+ const getCalendarDates = (0, import_react7.useCallback)((currentDate) => {
6672
6765
  const year = currentDate.getFullYear();
6673
6766
  const month = currentDate.getMonth();
6674
6767
  const firstDayOfMonth = new Date(year, month, 1).getDay();
@@ -6682,47 +6775,160 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6682
6775
  const weeks = [];
6683
6776
  for (let i = 0; i < dates.length; i += 7) weeks.push(dates.slice(i, i + 7));
6684
6777
  return weeks;
6685
- }, [currentDate]);
6686
- const handlePrevMonth = () => setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() - 1));
6687
- const handleNextMonth = () => setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1));
6688
- const handleDateSelect = (date, isCurrentMonth) => {
6778
+ }, []);
6779
+ const handleLeftPrevMonth = () => {
6780
+ const newLeftDate = new Date(leftCurrentDate.getFullYear(), leftCurrentDate.getMonth() - 1);
6781
+ setLeftCurrentDate(newLeftDate);
6782
+ if (dualCalendar) {
6783
+ setRightCurrentDate(new Date(newLeftDate.getFullYear(), newLeftDate.getMonth() + 1));
6784
+ }
6785
+ };
6786
+ const handleLeftNextMonth = () => {
6787
+ const newLeftDate = new Date(leftCurrentDate.getFullYear(), leftCurrentDate.getMonth() + 1);
6788
+ setLeftCurrentDate(newLeftDate);
6789
+ if (dualCalendar) {
6790
+ setRightCurrentDate(new Date(newLeftDate.getFullYear(), newLeftDate.getMonth() + 1));
6791
+ }
6792
+ };
6793
+ const handleRightNextMonth = () => {
6794
+ if (!dualCalendar) return;
6795
+ const newRightDate = new Date(rightCurrentDate.getFullYear(), rightCurrentDate.getMonth() + 1);
6796
+ setRightCurrentDate(newRightDate);
6797
+ setLeftCurrentDate(new Date(newRightDate.getFullYear(), newRightDate.getMonth() - 1));
6798
+ };
6799
+ const handleDateSelect = (date, isCurrentMonth, currentDate) => {
6689
6800
  if (!isCurrentMonth) return;
6690
6801
  const selected = new Date(currentDate.getFullYear(), currentDate.getMonth(), date);
6691
6802
  const formatted = formatDateToString(selected);
6692
- setTempSelectedDate(formatted);
6803
+ if (range) {
6804
+ if (rangeSelection === "start") {
6805
+ setTempSelectedRange({ startDate: formatted, endDate: "" });
6806
+ setRangeSelection("end");
6807
+ } else {
6808
+ const startDate = new Date(tempSelectedRange.startDate);
6809
+ if (selected >= startDate) {
6810
+ setTempSelectedRange({ ...tempSelectedRange, endDate: formatted });
6811
+ } else {
6812
+ setTempSelectedRange({ startDate: formatted, endDate: tempSelectedRange.startDate });
6813
+ }
6814
+ }
6815
+ } else {
6816
+ setTempSelectedDate(formatted);
6817
+ }
6693
6818
  };
6694
6819
  const handleSetToday = () => {
6695
6820
  const today = /* @__PURE__ */ new Date();
6696
6821
  const formatted = formatDateToString(today);
6697
- setCurrentDate(today);
6698
- setTempSelectedDate(formatted);
6822
+ if (range) {
6823
+ if (rangeSelection === "start") {
6824
+ setTempSelectedRange({ startDate: formatted, endDate: "" });
6825
+ setRangeSelection("end");
6826
+ } else {
6827
+ const startDate = new Date(tempSelectedRange.startDate);
6828
+ if (today >= startDate) {
6829
+ setTempSelectedRange({ ...tempSelectedRange, endDate: formatted });
6830
+ } else {
6831
+ setTempSelectedRange({ startDate: formatted, endDate: tempSelectedRange.startDate });
6832
+ }
6833
+ }
6834
+ } else {
6835
+ setLeftCurrentDate(today);
6836
+ if (dualCalendar) setRightCurrentDate(new Date(today.getFullYear(), today.getMonth() + 1));
6837
+ setTempSelectedDate(formatted);
6838
+ }
6699
6839
  };
6700
6840
  const handleConfirmDate = () => {
6701
- setSelectedDate(tempSelectedDate);
6702
- onChange == null ? void 0 : onChange(tempSelectedDate);
6841
+ if (range) {
6842
+ setSelectedRange(tempSelectedRange);
6843
+ onChange == null ? void 0 : onChange(tempSelectedRange);
6844
+ } else {
6845
+ setSelectedDate(tempSelectedDate);
6846
+ onChange == null ? void 0 : onChange(tempSelectedDate);
6847
+ }
6703
6848
  setIsPanelOpen(false);
6704
6849
  };
6705
6850
  const handleResetDate = () => {
6706
- setTempSelectedDate(selectedDate);
6851
+ if (range) {
6852
+ setTempSelectedRange(selectedRange);
6853
+ setRangeSelection("start");
6854
+ } else {
6855
+ setTempSelectedDate(selectedDate);
6856
+ }
6707
6857
  setIsPanelOpen(false);
6708
6858
  };
6709
6859
  const getDayProps = (0, import_react7.useCallback)(
6710
- (dateObj) => {
6860
+ (dateObj, currentDate) => {
6711
6861
  const today = /* @__PURE__ */ new Date();
6712
6862
  const isToday = today.getDate() === dateObj.date && today.getMonth() === currentDate.getMonth() && today.getFullYear() === currentDate.getFullYear();
6713
- const formatted = tempSelectedDate ? formatStringToDate(tempSelectedDate) : null;
6714
- const isSelected = (formatted == null ? void 0 : formatted.getDate()) === dateObj.date && formatted.getMonth() === currentDate.getMonth() && formatted.getFullYear() === currentDate.getFullYear();
6715
- return dateObj.currentMonth && isSelected ? "selected" : dateObj.currentMonth && isToday ? "today" : !dateObj.currentMonth ? "disabled" : "default";
6863
+ if (range) {
6864
+ const startFormatted = tempSelectedRange.startDate ? formatStringToDate(tempSelectedRange.startDate) : null;
6865
+ const endFormatted = tempSelectedRange.endDate ? formatStringToDate(tempSelectedRange.endDate) : null;
6866
+ const currentFormatted = new Date(currentDate.getFullYear(), currentDate.getMonth(), dateObj.date);
6867
+ const isStartSelected = startFormatted && startFormatted.getDate() === dateObj.date && startFormatted.getMonth() === currentDate.getMonth() && startFormatted.getFullYear() === currentDate.getFullYear();
6868
+ const isEndSelected = endFormatted && endFormatted.getDate() === dateObj.date && endFormatted.getMonth() === currentDate.getMonth() && endFormatted.getFullYear() === currentDate.getFullYear();
6869
+ const isInRange = startFormatted && endFormatted && currentFormatted > startFormatted && currentFormatted < endFormatted;
6870
+ if (dateObj.currentMonth && (isStartSelected || isEndSelected)) return "selected";
6871
+ if (dateObj.currentMonth && isInRange) return "period";
6872
+ if (dateObj.currentMonth && isToday) return "today";
6873
+ if (!dateObj.currentMonth) return "disabled";
6874
+ return "default";
6875
+ } else {
6876
+ const formatted = tempSelectedDate ? formatStringToDate(tempSelectedDate) : null;
6877
+ const isSelected = (formatted == null ? void 0 : formatted.getDate()) === dateObj.date && formatted.getMonth() === currentDate.getMonth() && formatted.getFullYear() === currentDate.getFullYear();
6878
+ return dateObj.currentMonth && isSelected ? "selected" : dateObj.currentMonth && isToday ? "today" : !dateObj.currentMonth ? "disabled" : "default";
6879
+ }
6716
6880
  },
6717
- [tempSelectedDate, currentDate]
6881
+ [tempSelectedDate, tempSelectedRange, range]
6718
6882
  );
6883
+ const getPlaceholderText = () => {
6884
+ return placeholder;
6885
+ };
6886
+ (0, import_react7.useEffect)(() => {
6887
+ if (range && typeof value === "object") {
6888
+ setSelectedRange(value || { startDate: "", endDate: "" });
6889
+ setTempSelectedRange(value || { startDate: "", endDate: "" });
6890
+ if (value == null ? void 0 : value.startDate) setLeftCurrentDate(new Date(value.startDate));
6891
+ } else if (!range && typeof value === "string") {
6892
+ setSelectedDate(value || "");
6893
+ setTempSelectedDate(value || "");
6894
+ if (value) setLeftCurrentDate(new Date(value));
6895
+ }
6896
+ }, [value, range]);
6719
6897
  (0, import_react7.useEffect)(() => {
6720
- setSelectedDate(value || "");
6721
- setTempSelectedDate(value || "");
6722
- if (value) setCurrentDate(new Date(value));
6723
- }, [value]);
6724
- const slots = (0, import_react7.useMemo)(() => datePickerStyle({ ...variantProps }), [variantProps]);
6898
+ if (dualCalendar) {
6899
+ setRightCurrentDate(new Date(leftCurrentDate.getFullYear(), leftCurrentDate.getMonth() + 1));
6900
+ }
6901
+ }, [leftCurrentDate, dualCalendar]);
6902
+ const slots = (0, import_react7.useMemo)(() => datePickerStyle({ ...variantProps, dualCalendar }), [variantProps, dualCalendar]);
6725
6903
  const endContent = /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Icon_default, { name: "calendar", size, className: "cursor-pointer", fill: true, onClick: handleCalendarIconClick });
6904
+ const renderCalendar = (currentDate, isLeft) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex flex-col gap-[5px]", children: [
6905
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: slots.calendarHead({ class: classNames == null ? void 0 : classNames.calendarHead }), children: dualCalendar ? isLeft ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6906
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "left", variant: "soft", color: "neutral", onClick: handleLeftPrevMonth }),
6907
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xl font-extrabold", children: monthYearFormat(currentDate.getFullYear(), currentDate.getMonth()) }),
6908
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8" })
6909
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6910
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "w-8" }),
6911
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xl font-extrabold", children: monthYearFormat(currentDate.getFullYear(), currentDate.getMonth()) }),
6912
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "right", variant: "soft", color: "neutral", onClick: handleRightNextMonth })
6913
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6914
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "left", variant: "soft", color: "neutral", onClick: handleLeftPrevMonth }),
6915
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xl font-extrabold", children: monthYearFormat(currentDate.getFullYear(), currentDate.getMonth()) }),
6916
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "right", variant: "soft", color: "neutral", onClick: handleLeftNextMonth })
6917
+ ] }) }),
6918
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "grid grid-cols-7", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(day_default, { variant: "text", children: day }, `${day}-${index}`)) }),
6919
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "grid grid-cols-7 gap-y-[5px] text-center", children: getCalendarDates(currentDate).map((week, weekIndex) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react7.Fragment, { children: week.map((dateObj, index) => {
6920
+ const dayVariant = getDayProps(dateObj, currentDate);
6921
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6922
+ day_default,
6923
+ {
6924
+ variant: dayVariant,
6925
+ onClick: () => handleDateSelect(dateObj.date, dateObj.currentMonth, currentDate),
6926
+ children: dateObj.date
6927
+ },
6928
+ index
6929
+ );
6930
+ }) }, weekIndex)) })
6931
+ ] });
6726
6932
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
6727
6933
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { ref: inputWrapperRef, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), onClick: handleFocusInput, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6728
6934
  input_default,
@@ -6731,7 +6937,7 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6731
6937
  ref,
6732
6938
  label,
6733
6939
  value: displayValue,
6734
- placeholder,
6940
+ placeholder: getPlaceholderText(),
6735
6941
  errorMessage,
6736
6942
  helperMessage,
6737
6943
  size,
@@ -6764,22 +6970,12 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6764
6970
  style: { position: "absolute", top: panelPos.top, left: panelPos.left, zIndex: 1e3 },
6765
6971
  onMouseDown: handleCalendarMouseDown,
6766
6972
  children: [
6767
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: slots.calendarHead({ class: classNames == null ? void 0 : classNames.calendarHead }), children: [
6768
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "left", variant: "soft", color: "neutral", onClick: handlePrevMonth }),
6769
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-xl font-extrabold", children: monthYearFormat(currentDate.getFullYear(), currentDate.getMonth()) }),
6770
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(icon_button_default, { name: "right", variant: "soft", color: "neutral", onClick: handleNextMonth })
6973
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: dualCalendar ? "flex gap-[10px]" : "flex", children: [
6974
+ renderCalendar(leftCurrentDate, true),
6975
+ dualCalendar && range && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "bg-neutral-soft w-px self-stretch" }),
6976
+ dualCalendar && renderCalendar(rightCurrentDate, false)
6771
6977
  ] }),
6772
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "grid grid-cols-7", children: daysOfWeek.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(day_default, { variant: "text", children: day }, `${day}-${index}`)) }),
6773
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "grid grid-cols-7 gap-[5px] text-center", children: getCalendarDates().map((week, weekIndex) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react7.Fragment, { children: week.map((dateObj, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6774
- day_default,
6775
- {
6776
- variant: getDayProps(dateObj),
6777
- onClick: () => handleDateSelect(dateObj.date, dateObj.currentMonth),
6778
- children: dateObj.date
6779
- },
6780
- index
6781
- )) }, weekIndex)) }),
6782
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex justify-between px-[10px]", children: [
6978
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex h-[30px] justify-between px-[10px]", children: [
6783
6979
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
6784
6980
  text_button_default,
6785
6981
  {
@@ -6825,13 +7021,11 @@ var datePickerStyle = tv({
6825
7021
  "rounded-xl",
6826
7022
  "bg-body-background",
6827
7023
  "shadow-drop-xl",
6828
- "gap-[5px]",
6829
7024
  "overflow-auto",
6830
- "w-[300px]",
6831
7025
  "select-none",
6832
7026
  "p-[10px]"
6833
7027
  ],
6834
- calendarHead: ["calendar-header", "flex", "items-center", "justify-between", "h-[40px]"],
7028
+ calendarHead: ["calendar-header", "flex", "items-center", "justify-between", "h-[40px]", "w-[280px]"],
6835
7029
  inputBase: [],
6836
7030
  inputWrapper: [],
6837
7031
  input: [],
@@ -6843,13 +7037,19 @@ var datePickerStyle = tv({
6843
7037
  color: { primary: {}, secondary: {} },
6844
7038
  size: { sm: {}, md: {}, lg: {}, xl: {} },
6845
7039
  full: { true: { base: ["w-full"] } },
6846
- disabled: { true: { base: ["pointer-events-none"] } }
7040
+ disabled: { true: { base: ["pointer-events-none"] } },
7041
+ dualCalendar: {
7042
+ true: { calendarWrapper: ["w-fit", "gap-[10px]"] },
7043
+ false: { calendarWrapper: ["w-[300px]", "gap-[5px]"] }
7044
+ }
6847
7045
  },
6848
7046
  defaultVariants: {
6849
7047
  color: "primary",
6850
7048
  size: "md",
6851
7049
  full: false,
6852
- disabled: false
7050
+ disabled: false,
7051
+ range: false,
7052
+ dualCalendar: false
6853
7053
  }
6854
7054
  });
6855
7055
  // Annotate the CommonJS export names for ESM import in node:
@@ -2,23 +2,23 @@
2
2
  import {
3
3
  datePickerStyle,
4
4
  datePicker_default
5
- } from "../../chunk-5MQZ7SDK.mjs";
5
+ } from "../../chunk-T7IJB3N4.mjs";
6
6
  import "../../chunk-4DESGO3D.mjs";
7
7
  import "../../chunk-FWFEKWWD.mjs";
8
8
  import "../../chunk-2GCSFWHD.mjs";
9
- import "../../chunk-WWSQIDWW.mjs";
9
+ import "../../chunk-BFC4VP3B.mjs";
10
10
  import "../../chunk-MY5U63QO.mjs";
11
11
  import "../../chunk-Q364C3FI.mjs";
12
12
  import "../../chunk-ITWKPTSD.mjs";
13
- import "../../chunk-6F4GD2PP.mjs";
14
- import "../../chunk-WYEUAXY7.mjs";
13
+ import "../../chunk-73NBUI4Y.mjs";
14
+ import "../../chunk-DSEF7GGB.mjs";
15
15
  import "../../chunk-6WSACUIB.mjs";
16
16
  import "../../chunk-LXHUO6VM.mjs";
17
17
  import "../../chunk-SZL743JC.mjs";
18
18
  import "../../chunk-ZYIIXWVY.mjs";
19
- import "../../chunk-Q6BXFXQM.mjs";
19
+ import "../../chunk-LBJN5TAP.mjs";
20
20
  import "../../chunk-E3G5QXSH.mjs";
21
- import "../../chunk-NX4FTFY3.mjs";
21
+ import "../../chunk-VUMESK5D.mjs";
22
22
  import "../../chunk-CDXBML6O.mjs";
23
23
  import "../../chunk-27Y6K5NK.mjs";
24
24
  import "../../chunk-AC6TWLRT.mjs";
@@ -1,5 +1,5 @@
1
1
  export { default as Day } from './day.mjs';
2
- export { default as DatePicker, DatePickerProps } from './datePicker.mjs';
2
+ export { default as DatePicker, DatePickerProps, DateRangeValue, DateValue } from './datePicker.mjs';
3
3
  export { default as TimePicker, TimePickerProps } from './timePicker.mjs';
4
4
  import 'tailwind-variants';
5
5
  import 'react';
@@ -1,5 +1,5 @@
1
1
  export { default as Day } from './day.js';
2
- export { default as DatePicker, DatePickerProps } from './datePicker.js';
2
+ export { default as DatePicker, DatePickerProps, DateRangeValue, DateValue } from './datePicker.js';
3
3
  export { default as TimePicker, TimePickerProps } from './timePicker.js';
4
4
  import 'tailwind-variants';
5
5
  import 'react';