@deepnoid/ui 0.1.171 → 0.1.173

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.
@@ -36,6 +36,10 @@ var Pagination = forwardRef((originalProps, ref) => {
36
36
  size
37
37
  } = { ...props, ...variantProps };
38
38
  const [inputPage, setInputPage] = useState(currentPage);
39
+ const isFirstPageDisabled = currentPage <= 1;
40
+ const isPrevPageDisabled = currentPage <= 1;
41
+ const isNextPageDisabled = currentPage >= totalPage;
42
+ const isLastPageDisabled = currentPage >= totalPage;
39
43
  const slots = useMemo(() => paginationStyle(variantProps), [variantProps]);
40
44
  const { pageList, handleClickMovePage } = usePagination_default({
41
45
  currentPage,
@@ -57,9 +61,11 @@ var Pagination = forwardRef((originalProps, ref) => {
57
61
  "div",
58
62
  {
59
63
  "aria-label": "firstPage",
60
- "data-is-active": currentPage > 1,
61
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
62
- onClick: currentPage > 1 ? handleClickMovePage(1) : void 0,
64
+ "data-disabled": isFirstPageDisabled,
65
+ className: slots.icon({
66
+ class: clsx(classNames == null ? void 0 : classNames.icon, isFirstPageDisabled && "!text-neutral-light !cursor-default")
67
+ }),
68
+ onClick: !isFirstPageDisabled ? handleClickMovePage(1) : void 0,
63
69
  children: /* @__PURE__ */ jsx(Icon_default, { name: "left-double-chevron", size })
64
70
  }
65
71
  ),
@@ -67,9 +73,11 @@ var Pagination = forwardRef((originalProps, ref) => {
67
73
  "div",
68
74
  {
69
75
  "aria-label": "prevPage",
70
- "data-is-active": currentPage > 1,
71
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
72
- onClick: currentPage > 1 ? handleClickMovePage(currentPage - 1) : void 0,
76
+ "data-disabled": isPrevPageDisabled,
77
+ className: slots.icon({
78
+ class: clsx(classNames == null ? void 0 : classNames.icon, isPrevPageDisabled && "!text-neutral-light !cursor-default")
79
+ }),
80
+ onClick: !isPrevPageDisabled ? handleClickMovePage(currentPage - 1) : void 0,
73
81
  children: /* @__PURE__ */ jsx(Icon_default, { name: "left-chevron", size })
74
82
  }
75
83
  ),
@@ -87,9 +95,11 @@ var Pagination = forwardRef((originalProps, ref) => {
87
95
  "div",
88
96
  {
89
97
  "aria-label": "nextPage",
90
- "data-is-active": currentPage < totalPage,
91
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
92
- onClick: currentPage < totalPage ? handleClickMovePage(currentPage + 1) : void 0,
98
+ "data-disabled": isNextPageDisabled,
99
+ className: slots.icon({
100
+ class: clsx(classNames == null ? void 0 : classNames.icon, isNextPageDisabled && "!text-neutral-light !cursor-default")
101
+ }),
102
+ onClick: !isNextPageDisabled ? handleClickMovePage(currentPage + 1) : void 0,
93
103
  children: /* @__PURE__ */ jsx(Icon_default, { name: "right-chevron", size })
94
104
  }
95
105
  ),
@@ -97,9 +107,11 @@ var Pagination = forwardRef((originalProps, ref) => {
97
107
  "div",
98
108
  {
99
109
  "aria-label": "lastPage",
100
- "data-is-active": currentPage < totalPage,
101
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
102
- onClick: currentPage < totalPage ? handleClickMovePage(totalPage) : void 0,
110
+ "data-disabled": isLastPageDisabled,
111
+ className: slots.icon({
112
+ class: clsx(classNames == null ? void 0 : classNames.icon, isLastPageDisabled && "!text-neutral-light !cursor-default")
113
+ }),
114
+ onClick: !isLastPageDisabled ? handleClickMovePage(totalPage) : void 0,
103
115
  children: /* @__PURE__ */ jsx(Icon_default, { name: "right-double-chevron", size })
104
116
  }
105
117
  )
@@ -137,8 +149,8 @@ var paginationStyle = tv(
137
149
  "justify-center",
138
150
  "cursor-pointer",
139
151
  "text-neutral-main",
140
- "data-[is-active=false]:stroke-neutral-light",
141
- "data-[is-active=false]:cursor-default"
152
+ "data-[disabled=true]:text-neutral-light",
153
+ "data-[disabled=true]:cursor-default"
142
154
  ],
143
155
  button: [
144
156
  "flex",
@@ -199,7 +211,7 @@ var paginationStyle = tv(
199
211
  "data-[selected=true]:text-primary-main",
200
212
  "data-[selected=true]:bg-primary-soft"
201
213
  ],
202
- icon: ["hover:text-primary-main"]
214
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
203
215
  }
204
216
  },
205
217
  {
@@ -211,7 +223,7 @@ var paginationStyle = tv(
211
223
  "data-[selected=true]:text-secondary-main",
212
224
  "data-[selected=true]:bg-secondary-soft"
213
225
  ],
214
- icon: ["hover:text-secondary-main"]
226
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
215
227
  }
216
228
  },
217
229
  {
@@ -223,7 +235,7 @@ var paginationStyle = tv(
223
235
  "data-[selected=true]:text-neutral-dark",
224
236
  "data-[selected=true]:bg-neutral-soft"
225
237
  ],
226
- icon: ["hover:text-neutral-dark"]
238
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
227
239
  }
228
240
  },
229
241
  {
@@ -231,7 +243,7 @@ var paginationStyle = tv(
231
243
  color: "primary",
232
244
  class: {
233
245
  button: ["hover:text-primary-main", "data-[selected=true]:text-primary-main"],
234
- icon: ["hover:text-primary-main"]
246
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
235
247
  }
236
248
  },
237
249
  {
@@ -271,7 +283,7 @@ var paginationStyle = tv(
271
283
  color: "secondary",
272
284
  class: {
273
285
  button: ["hover:text-secondary-main", "data-[selected=true]:text-secondary-main"],
274
- icon: ["hover:text-secondary-main"]
286
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
275
287
  }
276
288
  },
277
289
  {
@@ -311,7 +323,7 @@ var paginationStyle = tv(
311
323
  color: "neutral",
312
324
  class: {
313
325
  button: ["hover:text-neutral-dark", "data-[selected=true]:text-neutral-dark"],
314
- icon: ["hover:text-neutral-dark"]
326
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
315
327
  }
316
328
  },
317
329
  {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  pagination_default
4
- } from "./chunk-WLTBJF4I.mjs";
4
+ } from "./chunk-D4YI5HF2.mjs";
5
5
  import {
6
6
  scrollArea_default
7
7
  } from "./chunk-EWS3FESG.mjs";
@@ -5666,6 +5666,10 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5666
5666
  size
5667
5667
  } = { ...props, ...variantProps };
5668
5668
  const [inputPage, setInputPage] = (0, import_react3.useState)(currentPage);
5669
+ const isFirstPageDisabled = currentPage <= 1;
5670
+ const isPrevPageDisabled = currentPage <= 1;
5671
+ const isNextPageDisabled = currentPage >= totalPage;
5672
+ const isLastPageDisabled = currentPage >= totalPage;
5669
5673
  const slots = (0, import_react3.useMemo)(() => paginationStyle(variantProps), [variantProps]);
5670
5674
  const { pageList, handleClickMovePage } = usePagination_default({
5671
5675
  currentPage,
@@ -5687,9 +5691,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5687
5691
  "div",
5688
5692
  {
5689
5693
  "aria-label": "firstPage",
5690
- "data-is-active": currentPage > 1,
5691
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5692
- onClick: currentPage > 1 ? handleClickMovePage(1) : void 0,
5694
+ "data-disabled": isFirstPageDisabled,
5695
+ className: slots.icon({
5696
+ class: clsx(classNames == null ? void 0 : classNames.icon, isFirstPageDisabled && "!text-neutral-light !cursor-default")
5697
+ }),
5698
+ onClick: !isFirstPageDisabled ? handleClickMovePage(1) : void 0,
5693
5699
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "left-double-chevron", size })
5694
5700
  }
5695
5701
  ),
@@ -5697,9 +5703,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5697
5703
  "div",
5698
5704
  {
5699
5705
  "aria-label": "prevPage",
5700
- "data-is-active": currentPage > 1,
5701
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5702
- onClick: currentPage > 1 ? handleClickMovePage(currentPage - 1) : void 0,
5706
+ "data-disabled": isPrevPageDisabled,
5707
+ className: slots.icon({
5708
+ class: clsx(classNames == null ? void 0 : classNames.icon, isPrevPageDisabled && "!text-neutral-light !cursor-default")
5709
+ }),
5710
+ onClick: !isPrevPageDisabled ? handleClickMovePage(currentPage - 1) : void 0,
5703
5711
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "left-chevron", size })
5704
5712
  }
5705
5713
  ),
@@ -5717,9 +5725,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5717
5725
  "div",
5718
5726
  {
5719
5727
  "aria-label": "nextPage",
5720
- "data-is-active": currentPage < totalPage,
5721
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5722
- onClick: currentPage < totalPage ? handleClickMovePage(currentPage + 1) : void 0,
5728
+ "data-disabled": isNextPageDisabled,
5729
+ className: slots.icon({
5730
+ class: clsx(classNames == null ? void 0 : classNames.icon, isNextPageDisabled && "!text-neutral-light !cursor-default")
5731
+ }),
5732
+ onClick: !isNextPageDisabled ? handleClickMovePage(currentPage + 1) : void 0,
5723
5733
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "right-chevron", size })
5724
5734
  }
5725
5735
  ),
@@ -5727,9 +5737,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5727
5737
  "div",
5728
5738
  {
5729
5739
  "aria-label": "lastPage",
5730
- "data-is-active": currentPage < totalPage,
5731
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5732
- onClick: currentPage < totalPage ? handleClickMovePage(totalPage) : void 0,
5740
+ "data-disabled": isLastPageDisabled,
5741
+ className: slots.icon({
5742
+ class: clsx(classNames == null ? void 0 : classNames.icon, isLastPageDisabled && "!text-neutral-light !cursor-default")
5743
+ }),
5744
+ onClick: !isLastPageDisabled ? handleClickMovePage(totalPage) : void 0,
5733
5745
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "right-double-chevron", size })
5734
5746
  }
5735
5747
  )
@@ -5767,8 +5779,8 @@ var paginationStyle = tv(
5767
5779
  "justify-center",
5768
5780
  "cursor-pointer",
5769
5781
  "text-neutral-main",
5770
- "data-[is-active=false]:stroke-neutral-light",
5771
- "data-[is-active=false]:cursor-default"
5782
+ "data-[disabled=true]:text-neutral-light",
5783
+ "data-[disabled=true]:cursor-default"
5772
5784
  ],
5773
5785
  button: [
5774
5786
  "flex",
@@ -5829,7 +5841,7 @@ var paginationStyle = tv(
5829
5841
  "data-[selected=true]:text-primary-main",
5830
5842
  "data-[selected=true]:bg-primary-soft"
5831
5843
  ],
5832
- icon: ["hover:text-primary-main"]
5844
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
5833
5845
  }
5834
5846
  },
5835
5847
  {
@@ -5841,7 +5853,7 @@ var paginationStyle = tv(
5841
5853
  "data-[selected=true]:text-secondary-main",
5842
5854
  "data-[selected=true]:bg-secondary-soft"
5843
5855
  ],
5844
- icon: ["hover:text-secondary-main"]
5856
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
5845
5857
  }
5846
5858
  },
5847
5859
  {
@@ -5853,7 +5865,7 @@ var paginationStyle = tv(
5853
5865
  "data-[selected=true]:text-neutral-dark",
5854
5866
  "data-[selected=true]:bg-neutral-soft"
5855
5867
  ],
5856
- icon: ["hover:text-neutral-dark"]
5868
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
5857
5869
  }
5858
5870
  },
5859
5871
  {
@@ -5861,7 +5873,7 @@ var paginationStyle = tv(
5861
5873
  color: "primary",
5862
5874
  class: {
5863
5875
  button: ["hover:text-primary-main", "data-[selected=true]:text-primary-main"],
5864
- icon: ["hover:text-primary-main"]
5876
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
5865
5877
  }
5866
5878
  },
5867
5879
  {
@@ -5901,7 +5913,7 @@ var paginationStyle = tv(
5901
5913
  color: "secondary",
5902
5914
  class: {
5903
5915
  button: ["hover:text-secondary-main", "data-[selected=true]:text-secondary-main"],
5904
- icon: ["hover:text-secondary-main"]
5916
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
5905
5917
  }
5906
5918
  },
5907
5919
  {
@@ -5941,7 +5953,7 @@ var paginationStyle = tv(
5941
5953
  color: "neutral",
5942
5954
  class: {
5943
5955
  button: ["hover:text-neutral-dark", "data-[selected=true]:text-neutral-dark"],
5944
- icon: ["hover:text-neutral-dark"]
5956
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
5945
5957
  }
5946
5958
  },
5947
5959
  {
@@ -2,7 +2,7 @@
2
2
  import "../../chunk-7B7LRG5J.mjs";
3
3
  import {
4
4
  pagination_default
5
- } from "../../chunk-WLTBJF4I.mjs";
5
+ } from "../../chunk-D4YI5HF2.mjs";
6
6
  import "../../chunk-F3HENRVM.mjs";
7
7
  import "../../chunk-2GCSFWHD.mjs";
8
8
  import "../../chunk-VNRGOOSY.mjs";
@@ -5664,6 +5664,10 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5664
5664
  size
5665
5665
  } = { ...props, ...variantProps };
5666
5666
  const [inputPage, setInputPage] = (0, import_react3.useState)(currentPage);
5667
+ const isFirstPageDisabled = currentPage <= 1;
5668
+ const isPrevPageDisabled = currentPage <= 1;
5669
+ const isNextPageDisabled = currentPage >= totalPage;
5670
+ const isLastPageDisabled = currentPage >= totalPage;
5667
5671
  const slots = (0, import_react3.useMemo)(() => paginationStyle(variantProps), [variantProps]);
5668
5672
  const { pageList, handleClickMovePage } = usePagination_default({
5669
5673
  currentPage,
@@ -5685,9 +5689,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5685
5689
  "div",
5686
5690
  {
5687
5691
  "aria-label": "firstPage",
5688
- "data-is-active": currentPage > 1,
5689
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5690
- onClick: currentPage > 1 ? handleClickMovePage(1) : void 0,
5692
+ "data-disabled": isFirstPageDisabled,
5693
+ className: slots.icon({
5694
+ class: clsx(classNames == null ? void 0 : classNames.icon, isFirstPageDisabled && "!text-neutral-light !cursor-default")
5695
+ }),
5696
+ onClick: !isFirstPageDisabled ? handleClickMovePage(1) : void 0,
5691
5697
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "left-double-chevron", size })
5692
5698
  }
5693
5699
  ),
@@ -5695,9 +5701,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5695
5701
  "div",
5696
5702
  {
5697
5703
  "aria-label": "prevPage",
5698
- "data-is-active": currentPage > 1,
5699
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5700
- onClick: currentPage > 1 ? handleClickMovePage(currentPage - 1) : void 0,
5704
+ "data-disabled": isPrevPageDisabled,
5705
+ className: slots.icon({
5706
+ class: clsx(classNames == null ? void 0 : classNames.icon, isPrevPageDisabled && "!text-neutral-light !cursor-default")
5707
+ }),
5708
+ onClick: !isPrevPageDisabled ? handleClickMovePage(currentPage - 1) : void 0,
5701
5709
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "left-chevron", size })
5702
5710
  }
5703
5711
  ),
@@ -5715,9 +5723,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5715
5723
  "div",
5716
5724
  {
5717
5725
  "aria-label": "nextPage",
5718
- "data-is-active": currentPage < totalPage,
5719
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5720
- onClick: currentPage < totalPage ? handleClickMovePage(currentPage + 1) : void 0,
5726
+ "data-disabled": isNextPageDisabled,
5727
+ className: slots.icon({
5728
+ class: clsx(classNames == null ? void 0 : classNames.icon, isNextPageDisabled && "!text-neutral-light !cursor-default")
5729
+ }),
5730
+ onClick: !isNextPageDisabled ? handleClickMovePage(currentPage + 1) : void 0,
5721
5731
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "right-chevron", size })
5722
5732
  }
5723
5733
  ),
@@ -5725,9 +5735,11 @@ var Pagination = (0, import_react3.forwardRef)((originalProps, ref) => {
5725
5735
  "div",
5726
5736
  {
5727
5737
  "aria-label": "lastPage",
5728
- "data-is-active": currentPage < totalPage,
5729
- className: slots.icon({ class: classNames == null ? void 0 : classNames.icon }),
5730
- onClick: currentPage < totalPage ? handleClickMovePage(totalPage) : void 0,
5738
+ "data-disabled": isLastPageDisabled,
5739
+ className: slots.icon({
5740
+ class: clsx(classNames == null ? void 0 : classNames.icon, isLastPageDisabled && "!text-neutral-light !cursor-default")
5741
+ }),
5742
+ onClick: !isLastPageDisabled ? handleClickMovePage(totalPage) : void 0,
5731
5743
  children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon_default, { name: "right-double-chevron", size })
5732
5744
  }
5733
5745
  )
@@ -5765,8 +5777,8 @@ var paginationStyle = tv(
5765
5777
  "justify-center",
5766
5778
  "cursor-pointer",
5767
5779
  "text-neutral-main",
5768
- "data-[is-active=false]:stroke-neutral-light",
5769
- "data-[is-active=false]:cursor-default"
5780
+ "data-[disabled=true]:text-neutral-light",
5781
+ "data-[disabled=true]:cursor-default"
5770
5782
  ],
5771
5783
  button: [
5772
5784
  "flex",
@@ -5827,7 +5839,7 @@ var paginationStyle = tv(
5827
5839
  "data-[selected=true]:text-primary-main",
5828
5840
  "data-[selected=true]:bg-primary-soft"
5829
5841
  ],
5830
- icon: ["hover:text-primary-main"]
5842
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
5831
5843
  }
5832
5844
  },
5833
5845
  {
@@ -5839,7 +5851,7 @@ var paginationStyle = tv(
5839
5851
  "data-[selected=true]:text-secondary-main",
5840
5852
  "data-[selected=true]:bg-secondary-soft"
5841
5853
  ],
5842
- icon: ["hover:text-secondary-main"]
5854
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
5843
5855
  }
5844
5856
  },
5845
5857
  {
@@ -5851,7 +5863,7 @@ var paginationStyle = tv(
5851
5863
  "data-[selected=true]:text-neutral-dark",
5852
5864
  "data-[selected=true]:bg-neutral-soft"
5853
5865
  ],
5854
- icon: ["hover:text-neutral-dark"]
5866
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
5855
5867
  }
5856
5868
  },
5857
5869
  {
@@ -5859,7 +5871,7 @@ var paginationStyle = tv(
5859
5871
  color: "primary",
5860
5872
  class: {
5861
5873
  button: ["hover:text-primary-main", "data-[selected=true]:text-primary-main"],
5862
- icon: ["hover:text-primary-main"]
5874
+ icon: ["hover:text-primary-main", "data-[disabled=true]:hover:text-neutral-light"]
5863
5875
  }
5864
5876
  },
5865
5877
  {
@@ -5899,7 +5911,7 @@ var paginationStyle = tv(
5899
5911
  color: "secondary",
5900
5912
  class: {
5901
5913
  button: ["hover:text-secondary-main", "data-[selected=true]:text-secondary-main"],
5902
- icon: ["hover:text-secondary-main"]
5914
+ icon: ["hover:text-secondary-main", "data-[disabled=true]:hover:text-neutral-light"]
5903
5915
  }
5904
5916
  },
5905
5917
  {
@@ -5939,7 +5951,7 @@ var paginationStyle = tv(
5939
5951
  color: "neutral",
5940
5952
  class: {
5941
5953
  button: ["hover:text-neutral-dark", "data-[selected=true]:text-neutral-dark"],
5942
- icon: ["hover:text-neutral-dark"]
5954
+ icon: ["hover:text-neutral-dark", "data-[disabled=true]:hover:text-neutral-light"]
5943
5955
  }
5944
5956
  },
5945
5957
  {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  pagination_default
4
- } from "../../chunk-WLTBJF4I.mjs";
4
+ } from "../../chunk-D4YI5HF2.mjs";
5
5
  import "../../chunk-F3HENRVM.mjs";
6
6
  import "../../chunk-2GCSFWHD.mjs";
7
7
  import "../../chunk-VNRGOOSY.mjs";
@@ -6733,6 +6733,14 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6733
6733
  const calendarWrapperRef = (0, import_react7.useRef)(null);
6734
6734
  const [panelPos, setPanelPos] = (0, import_react7.useState)({ top: -9999, left: -9999 });
6735
6735
  const blurTimeoutRef = (0, import_react7.useRef)(null);
6736
+ const isConfirmDisabled = (0, import_react7.useMemo)(() => {
6737
+ if (range) {
6738
+ const hasStart = !!tempSelectedRange.startDate;
6739
+ const hasEnd = !!tempSelectedRange.endDate;
6740
+ return hasStart && !hasEnd;
6741
+ }
6742
+ return false;
6743
+ }, [range, tempSelectedRange]);
6736
6744
  const formatDate = (dateString) => {
6737
6745
  if (!dateString) return "";
6738
6746
  const [year, month, day] = dateString.split("-");
@@ -6875,6 +6883,7 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6875
6883
  }
6876
6884
  };
6877
6885
  const handleConfirmDate = () => {
6886
+ if (isConfirmDisabled) return;
6878
6887
  if (range) {
6879
6888
  setSelectedRange(tempSelectedRange);
6880
6889
  onChange == null ? void 0 : onChange(tempSelectedRange);
@@ -7039,7 +7048,16 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
7039
7048
  children: cancelTitle
7040
7049
  }
7041
7050
  ),
7042
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(button_default, { size: "sm", classNames: { base: "flex flex-1" }, onClick: handleConfirmDate, children: confirmTitle })
7051
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7052
+ button_default,
7053
+ {
7054
+ size: "sm",
7055
+ classNames: { base: "flex flex-1" },
7056
+ onClick: handleConfirmDate,
7057
+ disabled: isConfirmDisabled,
7058
+ children: confirmTitle
7059
+ }
7060
+ )
7043
7061
  ] })
7044
7062
  ]
7045
7063
  }
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  datePickerStyle,
4
4
  datePicker_default
5
- } from "../../chunk-C7CV72QF.mjs";
5
+ } from "../../chunk-52VX5MC2.mjs";
6
6
  import "../../chunk-FWFEKWWD.mjs";
7
7
  import "../../chunk-XZYQFBCT.mjs";
8
8
  import "../../chunk-2GCSFWHD.mjs";
@@ -6738,6 +6738,14 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6738
6738
  const calendarWrapperRef = (0, import_react7.useRef)(null);
6739
6739
  const [panelPos, setPanelPos] = (0, import_react7.useState)({ top: -9999, left: -9999 });
6740
6740
  const blurTimeoutRef = (0, import_react7.useRef)(null);
6741
+ const isConfirmDisabled = (0, import_react7.useMemo)(() => {
6742
+ if (range) {
6743
+ const hasStart = !!tempSelectedRange.startDate;
6744
+ const hasEnd = !!tempSelectedRange.endDate;
6745
+ return hasStart && !hasEnd;
6746
+ }
6747
+ return false;
6748
+ }, [range, tempSelectedRange]);
6741
6749
  const formatDate = (dateString) => {
6742
6750
  if (!dateString) return "";
6743
6751
  const [year, month, day] = dateString.split("-");
@@ -6880,6 +6888,7 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
6880
6888
  }
6881
6889
  };
6882
6890
  const handleConfirmDate = () => {
6891
+ if (isConfirmDisabled) return;
6883
6892
  if (range) {
6884
6893
  setSelectedRange(tempSelectedRange);
6885
6894
  onChange == null ? void 0 : onChange(tempSelectedRange);
@@ -7044,7 +7053,16 @@ var DatePicker = (0, import_react7.forwardRef)((originalProps, ref) => {
7044
7053
  children: cancelTitle
7045
7054
  }
7046
7055
  ),
7047
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(button_default, { size: "sm", classNames: { base: "flex flex-1" }, onClick: handleConfirmDate, children: confirmTitle })
7056
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
7057
+ button_default,
7058
+ {
7059
+ size: "sm",
7060
+ classNames: { base: "flex flex-1" },
7061
+ onClick: handleConfirmDate,
7062
+ disabled: isConfirmDisabled,
7063
+ children: confirmTitle
7064
+ }
7065
+ )
7048
7066
  ] })
7049
7067
  ]
7050
7068
  }
@@ -2,7 +2,7 @@
2
2
  import "../../chunk-4VWG4726.mjs";
3
3
  import {
4
4
  datePicker_default
5
- } from "../../chunk-C7CV72QF.mjs";
5
+ } from "../../chunk-52VX5MC2.mjs";
6
6
  import "../../chunk-FWFEKWWD.mjs";
7
7
  import {
8
8
  day_default