eidos-ui 4.2.0 → 4.3.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 (29) hide show
  1. package/dist/{chunk-TUNG4IDW.cjs → chunk-6Z42NMP4.cjs} +3 -3
  2. package/dist/{chunk-TUNG4IDW.cjs.map → chunk-6Z42NMP4.cjs.map} +1 -1
  3. package/dist/{chunk-STVAB7FD.cjs → chunk-7OWJQHHM.cjs} +12 -12
  4. package/dist/{chunk-STVAB7FD.cjs.map → chunk-7OWJQHHM.cjs.map} +1 -1
  5. package/dist/{chunk-A7K53LDB.js → chunk-BMRZHFDP.js} +79 -42
  6. package/dist/chunk-BMRZHFDP.js.map +1 -0
  7. package/dist/{chunk-YEBWP7FD.cjs → chunk-I36GOOCM.cjs} +11 -11
  8. package/dist/{chunk-YEBWP7FD.cjs.map → chunk-I36GOOCM.cjs.map} +1 -1
  9. package/dist/{chunk-F2FGZFWF.js → chunk-KUP3CP24.js} +2 -2
  10. package/dist/{chunk-J2GJGXGH.cjs → chunk-QKCYXFET.cjs} +80 -43
  11. package/dist/{chunk-J2GJGXGH.cjs.map → chunk-QKCYXFET.cjs.map} +1 -1
  12. package/dist/{chunk-2LSQGDRH.js → chunk-QVUMYDRE.js} +2 -2
  13. package/dist/{chunk-AMVA62UC.js → chunk-YAZSZFLB.js} +2 -2
  14. package/dist/data-grid/index.cjs +4 -4
  15. package/dist/data-grid/index.js +3 -3
  16. package/dist/date-picker/index.cjs +2 -2
  17. package/dist/date-picker/index.d.cts +15 -1
  18. package/dist/date-picker/index.d.ts +15 -1
  19. package/dist/date-picker/index.js +1 -1
  20. package/dist/index.cjs +5 -5
  21. package/dist/index.css +1 -1
  22. package/dist/index.js +4 -4
  23. package/dist/table/index.cjs +4 -4
  24. package/dist/table/index.js +3 -3
  25. package/package.json +1 -1
  26. package/dist/chunk-A7K53LDB.js.map +0 -1
  27. /package/dist/{chunk-F2FGZFWF.js.map → chunk-KUP3CP24.js.map} +0 -0
  28. /package/dist/{chunk-2LSQGDRH.js.map → chunk-QVUMYDRE.js.map} +0 -0
  29. /package/dist/{chunk-AMVA62UC.js.map → chunk-YAZSZFLB.js.map} +0 -0
@@ -873,6 +873,7 @@ var DatePicker = ({
873
873
  value,
874
874
  onChange,
875
875
  granularity = "day",
876
+ showActions = false,
876
877
  time = { enabled: false },
877
878
  calendar = { numberOfCalendars: 2 },
878
879
  format = {
@@ -978,13 +979,30 @@ var DatePicker = ({
978
979
  },
979
980
  [time.enabled, pickerTimezone]
980
981
  );
982
+ const [draft, setDraft] = useState2(void 0);
983
+ const wasOpen = useRef(false);
984
+ useEffect2(() => {
985
+ if (!showActions) return;
986
+ if (isOpen && !wasOpen.current)
987
+ setDraft(value);
988
+ else if (!isOpen && wasOpen.current) setDraft(void 0);
989
+ wasOpen.current = isOpen;
990
+ }, [isOpen, showActions, value]);
991
+ const effectiveValue = showActions ? draft ?? value : value;
992
+ const commit = useCallback3(
993
+ (newValue) => {
994
+ if (showActions) setDraft(newValue);
995
+ else onChange?.(newValue);
996
+ },
997
+ [showActions, onChange]
998
+ );
981
999
  const { selectedDates, rangeStart, rangeEnd } = useMemo2(() => {
982
- if (!value?.date) {
1000
+ if (!effectiveValue?.date) {
983
1001
  return { selectedDates: [], rangeStart: null, rangeEnd: null };
984
1002
  }
985
1003
  switch (mode) {
986
1004
  case "single": {
987
- const isoString = value.date;
1005
+ const isoString = effectiveValue.date;
988
1006
  const localDateStr = toLocalDateString(isoString);
989
1007
  return {
990
1008
  selectedDates: localDateStr ? [(0, import_dayjs2.default)(localDateStr)] : [],
@@ -993,7 +1011,7 @@ var DatePicker = ({
993
1011
  };
994
1012
  }
995
1013
  case "multiple": {
996
- const isoStrings = value.date;
1014
+ const isoStrings = effectiveValue.date;
997
1015
  const localDateStrings = isoStrings.map((d) => toLocalDateString(d)).filter(Boolean);
998
1016
  return {
999
1017
  selectedDates: localDateStrings.map((d) => (0, import_dayjs2.default)(d)),
@@ -1002,7 +1020,7 @@ var DatePicker = ({
1002
1020
  };
1003
1021
  }
1004
1022
  case "range": {
1005
- const range = value.date;
1023
+ const range = effectiveValue.date;
1006
1024
  const startStr = toLocalDateString(range.start);
1007
1025
  const endStr = toLocalDateString(range.end);
1008
1026
  return {
@@ -1014,15 +1032,16 @@ var DatePicker = ({
1014
1032
  default:
1015
1033
  return { selectedDates: [], rangeStart: null, rangeEnd: null };
1016
1034
  }
1017
- }, [value, mode, toLocalDateString]);
1035
+ }, [effectiveValue, mode, toLocalDateString]);
1018
1036
  const handleDateSelect = useCallback3(
1019
1037
  (selectedDate) => {
1020
1038
  const effectiveDate = granularity === "month" ? selectedDate.endOf("month") : selectedDate;
1039
+ const effectiveRangeStart = granularity === "month" ? selectedDate.startOf("month") : selectedDate;
1021
1040
  const compareUnit = granularity === "month" ? "month" : "day";
1022
1041
  switch (mode) {
1023
1042
  case "single": {
1024
1043
  let dateWithTime;
1025
- const activeTime = value?.time ?? defaultStartTime;
1044
+ const activeTime = effectiveValue?.time ?? defaultStartTime;
1026
1045
  if (time.enabled) {
1027
1046
  dateWithTime = composeLocalDateTime(effectiveDate, activeTime);
1028
1047
  } else {
@@ -1032,45 +1051,45 @@ var DatePicker = ({
1032
1051
  date: dateWithTime.toISOString(),
1033
1052
  time: time.enabled ? activeTime : void 0
1034
1053
  };
1035
- onChange?.(newValue);
1036
- setIsOpen(false);
1054
+ commit(newValue);
1055
+ if (!showActions) setIsOpen(false);
1037
1056
  break;
1038
1057
  }
1039
1058
  case "multiple": {
1040
- const currentDates = value?.date || [];
1059
+ const currentDates = effectiveValue?.date || [];
1041
1060
  const currentDayjs = currentDates.map((d) => (0, import_dayjs2.default)(d));
1042
1061
  const existingIndex = currentDayjs.findIndex((d) => d.isSame(effectiveDate, compareUnit));
1043
1062
  let newDates;
1044
1063
  if (existingIndex >= 0) {
1045
1064
  newDates = currentDayjs.filter((_, index) => index !== existingIndex);
1046
1065
  } else {
1047
- const activeTime = value?.time ?? defaultStartTime;
1066
+ const activeTime = effectiveValue?.time ?? defaultStartTime;
1048
1067
  const dateWithTime = time.enabled ? composeLocalDateTime(effectiveDate, activeTime) : composeDateOnly(effectiveDate, "start");
1049
1068
  newDates = [...currentDayjs, dateWithTime];
1050
1069
  }
1051
1070
  const newValue = {
1052
1071
  date: newDates.map((d) => d.toISOString()),
1053
- time: time.enabled ? value?.time ?? defaultStartTime : void 0
1072
+ time: time.enabled ? effectiveValue?.time ?? defaultStartTime : void 0
1054
1073
  };
1055
- onChange?.(newValue);
1074
+ commit(newValue);
1056
1075
  break;
1057
1076
  }
1058
1077
  case "range": {
1059
- const currentRange = value?.date || {
1078
+ const currentRange = effectiveValue?.date || {
1060
1079
  start: null,
1061
1080
  end: null
1062
1081
  };
1063
- const currentRangeTime = value?.time || {
1082
+ const currentRangeTime = effectiveValue?.time || {
1064
1083
  start: defaultStartTime,
1065
1084
  end: defaultEndTime
1066
1085
  };
1067
1086
  if (!currentRange.start || currentRange.start && currentRange.end) {
1068
- const startWithTime = time.enabled ? composeLocalDateTime(effectiveDate, currentRangeTime.start) : composeDateOnly(effectiveDate, "start");
1087
+ const startWithTime = time.enabled ? composeLocalDateTime(effectiveRangeStart, currentRangeTime.start) : composeDateOnly(effectiveRangeStart, "start");
1069
1088
  const newValue = {
1070
1089
  date: { start: startWithTime.toISOString(), end: null },
1071
1090
  time: time.enabled ? currentRangeTime : void 0
1072
1091
  };
1073
- onChange?.(newValue);
1092
+ commit(newValue);
1074
1093
  } else {
1075
1094
  const start = time.enabled ? (0, import_dayjs2.default)(currentRange.start) : (0, import_dayjs2.default)(currentRange.start).tz(pickerTimezone);
1076
1095
  let end = effectiveDate;
@@ -1085,8 +1104,8 @@ var DatePicker = ({
1085
1104
  },
1086
1105
  time: time.enabled ? currentRangeTime : void 0
1087
1106
  };
1088
- onChange?.(newValue);
1089
- setIsOpen(false);
1107
+ commit(newValue);
1108
+ if (!showActions) setIsOpen(false);
1090
1109
  }
1091
1110
  break;
1092
1111
  }
@@ -1095,8 +1114,9 @@ var DatePicker = ({
1095
1114
  [
1096
1115
  mode,
1097
1116
  time,
1098
- value,
1099
- onChange,
1117
+ effectiveValue,
1118
+ commit,
1119
+ showActions,
1100
1120
  defaultStartTime,
1101
1121
  defaultEndTime,
1102
1122
  composeDateOnly,
@@ -1187,11 +1207,24 @@ var DatePicker = ({
1187
1207
  };
1188
1208
  }
1189
1209
  })();
1190
- onChange?.(clearedValue);
1191
- setIsOpen(false);
1210
+ if (showActions && isOpen) {
1211
+ setDraft(clearedValue);
1212
+ } else {
1213
+ onChange?.(clearedValue);
1214
+ setIsOpen(false);
1215
+ }
1192
1216
  },
1193
- [mode, time, onChange, defaultStartTime, defaultEndTime]
1217
+ [mode, time, onChange, showActions, isOpen, defaultStartTime, defaultEndTime]
1194
1218
  );
1219
+ const applyDraft = useCallback3(() => {
1220
+ const next = draft ?? value;
1221
+ if (next !== void 0) onChange?.(next);
1222
+ setIsOpen(false);
1223
+ }, [onChange, draft, value]);
1224
+ const cancelDraft = useCallback3(() => {
1225
+ setIsOpen(false);
1226
+ }, []);
1227
+ const applyDisabled = mode === "range" && !!draft && !!draft.date.start && !draft.date.end;
1195
1228
  const triggerElement = /* @__PURE__ */ jsx3(
1196
1229
  "div",
1197
1230
  {
@@ -1264,15 +1297,15 @@ var DatePicker = ({
1264
1297
  mode === "single" && /* @__PURE__ */ jsx3(
1265
1298
  TimeInput,
1266
1299
  {
1267
- value: value?.time || defaultStartTime,
1300
+ value: effectiveValue?.time || defaultStartTime,
1268
1301
  onChange: (newTime) => {
1269
- const currentIso = value?.date;
1302
+ const currentIso = effectiveValue?.date;
1270
1303
  const newValue = {
1271
- ...value,
1304
+ ...effectiveValue,
1272
1305
  date: currentIso ? recomposeIsoWithTime(currentIso, newTime) : currentIso,
1273
1306
  time: newTime
1274
1307
  };
1275
- onChange?.(newValue);
1308
+ commit(newValue);
1276
1309
  },
1277
1310
  includeSeconds: time.includeSeconds,
1278
1311
  disabled,
@@ -1282,17 +1315,17 @@ var DatePicker = ({
1282
1315
  mode === "multiple" && /* @__PURE__ */ jsx3(
1283
1316
  TimeInput,
1284
1317
  {
1285
- value: value?.time || defaultStartTime,
1318
+ value: effectiveValue?.time || defaultStartTime,
1286
1319
  onChange: (newTime) => {
1287
- const currentDates = value?.date || [];
1320
+ const currentDates = effectiveValue?.date || [];
1288
1321
  const newValue = {
1289
- ...value,
1322
+ ...effectiveValue,
1290
1323
  date: currentDates.map(
1291
1324
  (d) => recomposeIsoWithTime(d, newTime)
1292
1325
  ),
1293
1326
  time: newTime
1294
1327
  };
1295
- onChange?.(newValue);
1328
+ commit(newValue);
1296
1329
  },
1297
1330
  includeSeconds: time.includeSeconds,
1298
1331
  disabled,
@@ -1303,18 +1336,18 @@ var DatePicker = ({
1303
1336
  /* @__PURE__ */ jsx3(
1304
1337
  TimeInput,
1305
1338
  {
1306
- value: value?.time?.start || defaultStartTime,
1339
+ value: effectiveValue?.time?.start || defaultStartTime,
1307
1340
  onChange: (newTime) => {
1308
- const currentRangeTime = value?.time || {
1341
+ const currentRangeTime = effectiveValue?.time || {
1309
1342
  start: defaultStartTime,
1310
1343
  end: defaultEndTime
1311
1344
  };
1312
- const currentRange = value?.date || {
1345
+ const currentRange = effectiveValue?.date || {
1313
1346
  start: null,
1314
1347
  end: null
1315
1348
  };
1316
1349
  const newValue = {
1317
- ...value,
1350
+ ...effectiveValue,
1318
1351
  date: {
1319
1352
  ...currentRange,
1320
1353
  start: currentRange.start ? recomposeIsoWithTime(currentRange.start, newTime) : currentRange.start
@@ -1324,7 +1357,7 @@ var DatePicker = ({
1324
1357
  start: newTime
1325
1358
  }
1326
1359
  };
1327
- onChange?.(newValue);
1360
+ commit(newValue);
1328
1361
  },
1329
1362
  includeSeconds: time.includeSeconds,
1330
1363
  disabled,
@@ -1334,18 +1367,18 @@ var DatePicker = ({
1334
1367
  /* @__PURE__ */ jsx3(
1335
1368
  TimeInput,
1336
1369
  {
1337
- value: value?.time?.end || defaultEndTime,
1370
+ value: effectiveValue?.time?.end || defaultEndTime,
1338
1371
  onChange: (newTime) => {
1339
- const currentRangeTime = value?.time || {
1372
+ const currentRangeTime = effectiveValue?.time || {
1340
1373
  start: defaultStartTime,
1341
1374
  end: defaultEndTime
1342
1375
  };
1343
- const currentRange = value?.date || {
1376
+ const currentRange = effectiveValue?.date || {
1344
1377
  start: null,
1345
1378
  end: null
1346
1379
  };
1347
1380
  const newValue = {
1348
- ...value,
1381
+ ...effectiveValue,
1349
1382
  date: {
1350
1383
  ...currentRange,
1351
1384
  end: currentRange.end ? recomposeIsoWithTime(currentRange.end, newTime) : currentRange.end
@@ -1355,7 +1388,7 @@ var DatePicker = ({
1355
1388
  end: newTime
1356
1389
  }
1357
1390
  };
1358
- onChange?.(newValue);
1391
+ commit(newValue);
1359
1392
  },
1360
1393
  includeSeconds: time.includeSeconds,
1361
1394
  disabled,
@@ -1363,6 +1396,10 @@ var DatePicker = ({
1363
1396
  }
1364
1397
  )
1365
1398
  ] })
1399
+ ] }),
1400
+ showActions && /* @__PURE__ */ jsxs3("div", { className: "eidos-date-picker-actions", children: [
1401
+ /* @__PURE__ */ jsx3(Button, { variant: "text", color: "secondary", onClick: cancelDraft, children: "Cancel" }),
1402
+ /* @__PURE__ */ jsx3(Button, { variant: "filled", color: "primary", disabled: applyDisabled, onClick: applyDraft, children: "Apply" })
1366
1403
  ] })
1367
1404
  ] });
1368
1405
  return /* @__PURE__ */ jsx3(
@@ -1396,4 +1433,4 @@ export {
1396
1433
  TimeInput,
1397
1434
  DatePicker
1398
1435
  };
1399
- //# sourceMappingURL=chunk-A7K53LDB.js.map
1436
+ //# sourceMappingURL=chunk-BMRZHFDP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/dayjs/dayjs.min.js","../node_modules/dayjs/plugin/utc.js","../node_modules/dayjs/plugin/timezone.js","../node_modules/dayjs/plugin/weekOfYear.js","../src/components/DatePicker/DatePicker.component.tsx","../src/components/DatePicker/Calendar.component.tsx","../src/components/DatePicker/TimeInput.component.tsx"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),Y=_.prototype;return O.prototype=Y,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){Y[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var r=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),r.call(this,t)};var o=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else o.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s;if(0===u)return this.utc(f);var r=this.clone();if(f)return r.$offset=u,r.$u=!1,r;var o=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(r=this.local().add(u+o,t)).$offset=u,r.$x.$localOffset=o,r};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,r){var o,a=function(t,n,i){void 0===i&&(i={});var r=new Date(t),o=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",r=t+\"|\"+i,o=e[r];return o||(o=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[r]=o),o}(n,i);return o.formatToParts(r)},u=function(e,n){for(var i=a(e,n),o=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(o[c]=parseInt(m,10))}var l=o[3],d=24===l?0:l,h=o[0]+\"-\"+o[1]+\"-\"+o[2]+\" \"+d+\":\"+o[4]+\":\"+o[5]+\":000\",v=+e;return(r.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){if(void 0===t&&(t=o),!this.isValid())return this;var n,i=this.utcOffset(),a=this.toDate(),f=a.toLocaleString(\"en-US\",{timeZone:t}),s=u(+a,t);if(!Number(s))n=this.utcOffset(0,e);else if(n=r(f,{locale:this.$L}).$set(\"millisecond\",this.$ms).utcOffset(s,!0),e){var m=n.utcOffset();n=n.add(i-m,\"minute\")}return n.$x.$timezone=t,n},f.offsetName=function(t){var e=this.$x.$timezone||r.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=r(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},r.tz=function(t,e,n){var i=n&&e,a=n||e||o,f=u(+r(),a);if(\"string\"!=typeof t)return r(t).tz(a);var s=r.utc(t,i).valueOf();if(Number.isNaN(s)){var m=r(NaN);return m.$x.$timezone=a,m}var c=function(t,e,n){var i=t-60*e*1e3,r=u(i,n);if(e===r)return[i,e];var o=u(i-=60*(r-e)*1e3,n);return r===o?[i,r]:[t-60*Math.min(r,o)*1e3,Math.max(r,o)]}(s,f,a),l=c[0],d=c[1],h=r(l).utcOffset(d);return h.$x.$timezone=a,h},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(t){o=t}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","import React, { useState, useCallback, useRef, useMemo, useId, useEffect } from 'react';\nimport dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport { Calendar as CalendarIcon, X } from 'lucide-react';\nimport { Button } from '../Button/Button.component';\nimport { Input } from '../Input/Input.component';\nimport { Dropdown } from '../Dropdown/Dropdown.component';\nimport { Calendar } from './Calendar.component';\nimport { TimeInput } from './TimeInput.component';\nimport { useDialogFocus, devWarn } from '../../utils';\nimport type {\n DatePickerProps,\n DateSelectionMode,\n DateTimeValue,\n TimeValue,\n RangeTimeValue,\n} from './DatePicker.types';\n\n// Initialize dayjs plugins\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\nexport const DatePicker = <T extends DateSelectionMode = 'single'>({\n mode,\n value,\n onChange,\n granularity = 'day',\n showActions = false,\n time = { enabled: false },\n calendar = { numberOfCalendars: 2 },\n format = {\n displayFormat: 'MMM DD, YYYY',\n inputFormat: 'YYYY-MM-DD',\n timeFormat: 'HH:mm',\n timezone: 'UTC',\n },\n label,\n placeholder = 'Select date...',\n disabled = false,\n required = false,\n name,\n id,\n inputProps = {},\n minDate,\n maxDate,\n disabledDates = [],\n disabledDaysOfWeek = [],\n className = '',\n fullWidth = false,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n autoWidth = false,\n}: DatePickerProps<T>) => {\n // The picker owns whether it is open and hands it to `Dropdown` as a\n // controlled value. It used to force a close by incrementing a `key`, which\n // remounted the whole subtree - the only lever available while the overlay\n // kept that state private.\n const [isOpen, setIsOpen] = useState(false);\n const panelId = `${useId()}-date-panel`;\n const panelRef = useRef<HTMLDivElement>(null);\n\n // Focus moves into the calendar when it opens, and back to the field when it\n // closes. Not optional: the panel is portaled to `document.body`, so `Tab`\n // from the field would otherwise walk the rest of the page before reaching\n // it. `trapTab: false` because this is not a modal dialog - the page stays\n // available.\n useDialogFocus(isOpen, panelRef, { trapTab: false });\n\n // A field with no accessible name is announced as just \"combobox\". Measured\n // from the DOM rather than from props, so naming it from outside - a wrapping\n // `<label>`, or a `<label for>` - counts. Mirrors `Select`.\n const fieldRef = useRef<HTMLInputElement>(null);\n useEffect(() => {\n const element = fieldRef.current;\n if (!element) return;\n const named =\n (element.labels?.length ?? 0) > 0 ||\n element.hasAttribute('aria-label') ||\n element.hasAttribute('aria-labelledby');\n if (!named) {\n devWarn(\n 'date-picker-missing-label',\n 'DatePicker: no accessible name. Pass `label` for a visible one, or `inputProps={{ \"aria-label\": \"...\" }}` where it must stay visually unlabelled - otherwise the field is announced as just \"combobox\". A placeholder is not a label, and disappears as soon as a date is chosen.',\n );\n }\n }, []);\n // Two different, deliberately different, notions of \"timezone\" are in\n // play here, matching two genuinely different kinds of value:\n //\n // - Date-only (time.enabled === false): a pure calendar date has no\n // wall-clock moment attached to it, so there's nothing for a timezone\n // to sensibly represent. It's anchored to a fixed `pickerTimezone`\n // (default UTC) so the same calendar date always serializes to the\n // same ISO instant no matter which machine picks it - see\n // `composeDateOnly`.\n // - Date + time (time.enabled === true): this genuinely represents a\n // real-world instant, e.g. a meeting at a specific wall-clock time -\n // exactly the case a timezone exists to disambiguate. That instant\n // should be computed from *the picking user's own local offset*\n // (someone in UTC+3 typing \"15:00\" means 12:00 UTC), and later\n // displayed by converting that same UTC instant into *each viewer's\n // own* local offset (that same instant shows as \"12:00\" to a UTC+0\n // viewer). That's exactly plain, un-anchored dayjs/Date behavior with\n // no explicit timezone forcing at all, so this path intentionally\n // does not use `pickerTimezone` anywhere.\n const pickerTimezone = format.timezone || 'UTC';\n // Combines a calendar date (only its Y-M-D is read, so it's timezone-\n // agnostic going in) with a start/end-of-day boundary, anchored to\n // `pickerTimezone` - only ever used for date-only values.\n const composeDateOnly = useCallback(\n (date: Dayjs, boundary: 'start' | 'end' = 'start') => {\n const anchored = dayjs.tz(date.format('YYYY-MM-DD'), pickerTimezone);\n return boundary === 'end' ? anchored.endOf('day') : anchored.startOf('day');\n },\n [pickerTimezone],\n );\n // Combines a calendar date with a time-of-day using plain local\n // semantics (no timezone forcing) - only ever used for date+time values,\n // see the note above.\n const composeLocalDateTime = useCallback(\n (date: Dayjs, t: TimeValue): Dayjs =>\n date\n .hour(t.hours)\n .minute(t.minutes)\n .second(t.seconds || 0),\n [],\n );\n // Re-anchors an already-stored ISO instant's calendar day (read in the\n // browser's own local timezone, matching how it was written) onto a new\n // time-of-day - used when the user edits a TimeInput without re-picking\n // the date, so that edit actually changes the returned value instead of\n // only updating the separate `value.time` field alongside an unchanged\n // `value.date`. Deliberately local, not anchored to `pickerTimezone` -\n // see the note above.\n const recomposeIsoWithTime = useCallback(\n (isoString: string, t: TimeValue): string =>\n dayjs(isoString)\n .hour(t.hours)\n .minute(t.minutes)\n .second(t.seconds || 0)\n .toISOString(),\n [],\n );\n // Month granularity always shows a single year/month grid - side-by-side\n // \"next month\" calendars don't make sense once there are no day cells.\n const numberOfCalendars = granularity === 'month' ? 1 : calendar.numberOfCalendars || 2;\n const independentCalendars = calendar.independent ?? false;\n // One entry per visible calendar. In the default (non-independent) mode\n // these always stay consecutive months, kept in sync from a single shared\n // control (see `handleCalendarMonthChange`) - the array shape is the same\n // either way, only how a change to one entry propagates differs.\n const [calendarDates, setCalendarDates] = useState<Dayjs[]>(() =>\n Array.from({ length: numberOfCalendars }, (_, i) => dayjs().add(i, 'month')),\n );\n const handleCalendarMonthChange = useCallback(\n (index: number, newDate: Dayjs) => {\n // `calendarDates` is internal state - once an Invalid dayjs lands in\n // it, every cell formats as NaN/Invalid and nothing a consumer can\n // pass recovers it. Refuse it here no matter what produced it.\n if (!newDate.isValid()) return;\n if (!independentCalendars) {\n // Coupled: every calendar shifts together, re-anchored so `index`\n // lands on `newDate` - e.g. moving calendar 1 to November re-anchors\n // calendar 0 to October, same as before this was array-based.\n const anchor = newDate.subtract(index, 'month');\n setCalendarDates(\n Array.from({ length: numberOfCalendars }, (_, i) => anchor.add(i, 'month')),\n );\n return;\n }\n\n // Independent: only this calendar moves, clamped so it can never reach\n // or cross an immediate neighbor's month - two calendars both landing\n // on (or swapping past) the same month would be exactly the confusing\n // state independent mode exists to let users avoid, just self-inflicted\n // instead of automatic.\n setCalendarDates((prev) => {\n const next = [...prev];\n let clamped = newDate;\n const left = prev[index - 1];\n const right = prev[index + 1];\n if (left && !clamped.isAfter(left, 'month')) {\n clamped = left.add(1, 'month');\n }\n if (right && !clamped.isBefore(right, 'month')) {\n clamped = right.subtract(1, 'month');\n }\n next[index] = clamped;\n return next;\n });\n },\n [independentCalendars, numberOfCalendars],\n );\n const triggerRef = useRef<HTMLDivElement>(null);\n\n // Convert the string-based constraint props to the Dayjs objects Calendar\n // actually consumes for its `isBefore`/`isAfter`/`isSame` comparisons.\n const minDateObj = useMemo(() => (minDate ? dayjs(minDate) : undefined), [minDate]);\n const maxDateObj = useMemo(() => (maxDate ? dayjs(maxDate) : undefined), [maxDate]);\n const disabledDatesObj = useMemo(() => disabledDates.map((d) => dayjs(d)), [disabledDates]);\n\n // Default time values\n const defaultStartTime = useMemo<TimeValue>(() => ({ hours: 0, minutes: 0, seconds: 0 }), []);\n const defaultEndTime = useMemo<TimeValue>(() => ({ hours: 23, minutes: 59, seconds: 59 }), []);\n\n // Helper function to convert stored ISO strings back to the calendar date\n // they represent, for calendar-grid display (which day to highlight).\n const toLocalDateString = useCallback(\n (isoString: string | null): string | null => {\n if (!isoString) return null;\n const parsed = dayjs(isoString);\n // Date-only values were anchored to `pickerTimezone` when stored (see\n // `composeDateOnly`) - reading them back via the browser's ambient\n // timezone instead would recover the wrong calendar day for anyone\n // not in that same timezone. Date+time values were deliberately\n // never anchored (see the note above `pickerTimezone`), so they stay\n // on local interpretation, matching how they were written.\n return (time.enabled ? parsed : parsed.tz(pickerTimezone)).format('YYYY-MM-DD');\n },\n [time.enabled, pickerTimezone],\n );\n\n // Deferred-commit draft: while `showActions` is on, calendar clicks and\n // TimeInput edits land here instead of `onChange`, and only Apply emits.\n // The effect acts ONLY on the open/close transition - `value` is in the\n // deps so the lint rule stays satisfied, but a consumer passing an inline\n // object gets a fresh reference every parent render, and keying the\n // re-seed on that would wipe the pending selection mid-pick. It is also\n // what makes Escape and outside-click behave as Cancel for free.\n const [draft, setDraft] = useState<DateTimeValue<T> | undefined>(undefined);\n const wasOpen = useRef(false);\n useEffect(() => {\n if (!showActions) return;\n if (isOpen && !wasOpen.current)\n setDraft(value); // opening: seed from committed value\n else if (!isOpen && wasOpen.current) setDraft(undefined); // closing: discard\n wasOpen.current = isOpen;\n }, [isOpen, showActions, value]);\n\n // What the panel edits and renders from: the draft while one is pending,\n // the committed value otherwise. When `showActions` is off there is never\n // a draft, so this collapses to `value` - every immediate-commit path\n // below is bit-identical to before.\n const effectiveValue = showActions ? (draft ?? value) : value;\n\n // Routes a produced value to the pending draft (deferred) or straight to\n // `onChange` (immediate). Everything downstream - calendars, time inputs,\n // the clear affordance - goes through this single switch.\n const commit = useCallback(\n (newValue: DateTimeValue<T>) => {\n if (showActions) setDraft(newValue);\n else onChange?.(newValue);\n },\n [showActions, onChange],\n );\n\n // Convert current value to calendar-compatible format\n const { selectedDates, rangeStart, rangeEnd } = useMemo(() => {\n if (!effectiveValue?.date) {\n return { selectedDates: [], rangeStart: null, rangeEnd: null };\n }\n\n switch (mode) {\n case 'single': {\n const isoString = effectiveValue.date as string | null;\n const localDateStr = toLocalDateString(isoString);\n return {\n selectedDates: localDateStr ? [dayjs(localDateStr)] : [],\n rangeStart: null,\n rangeEnd: null,\n };\n }\n case 'multiple': {\n const isoStrings = effectiveValue.date as string[];\n const localDateStrings = isoStrings\n .map((d) => toLocalDateString(d))\n .filter(Boolean) as string[];\n return {\n selectedDates: localDateStrings.map((d) => dayjs(d)),\n rangeStart: null,\n rangeEnd: null,\n };\n }\n case 'range': {\n const range = effectiveValue.date as { start: string | null; end: string | null };\n const startStr = toLocalDateString(range.start);\n const endStr = toLocalDateString(range.end);\n return {\n selectedDates: [],\n rangeStart: startStr ? dayjs(startStr) : null,\n rangeEnd: endStr ? dayjs(endStr) : null,\n };\n }\n default:\n return { selectedDates: [], rangeStart: null, rangeEnd: null };\n }\n }, [effectiveValue, mode, toLocalDateString]);\n\n // Handle date selection from calendar - always return ISO strings. Uses\n // `composeDateOnly` (fixed `pickerTimezone` anchor) when time.enabled is\n // false, `composeLocalDateTime` (plain local semantics) when true - see\n // the note above `pickerTimezone` for why these need to differ.\n const handleDateSelect = useCallback(\n (selectedDate: Dayjs) => {\n // `granularity === 'month'` means the calendar only ever hands us a\n // day *within* the picked month (see Calendar's month grid) - the\n // stored/returned value is always that month's last day, while the\n // day-of-week boundary semantics below ('start' of day vs 'end' of\n // day) are unaffected. Range *starts* are the exception: collapsing\n // the picked month to its last day would silently drop everything\n // earlier in the start month, so they anchor to the first instead.\n const effectiveDate = granularity === 'month' ? selectedDate.endOf('month') : selectedDate;\n const effectiveRangeStart =\n granularity === 'month' ? selectedDate.startOf('month') : selectedDate;\n const compareUnit = granularity === 'month' ? 'month' : 'day';\n\n switch (mode) {\n case 'single': {\n let dateWithTime: Dayjs;\n // Preserve whatever time the user already configured via\n // TimeInput rather than resetting to the default every time a\n // different date is picked.\n const activeTime = (effectiveValue?.time as TimeValue) ?? defaultStartTime;\n if (time.enabled) {\n dateWithTime = composeLocalDateTime(effectiveDate, activeTime);\n } else {\n dateWithTime = composeDateOnly(effectiveDate, 'start');\n }\n\n const newValue: DateTimeValue<T> = {\n date: dateWithTime.toISOString() as DateTimeValue<T>['date'],\n time: time.enabled ? (activeTime as DateTimeValue<T>['time']) : undefined,\n };\n\n commit(newValue);\n if (!showActions) setIsOpen(false);\n break;\n }\n\n case 'multiple': {\n const currentDates = (effectiveValue?.date as string[]) || [];\n const currentDayjs = currentDates.map((d) => dayjs(d));\n\n // Check if date is already selected\n const existingIndex = currentDayjs.findIndex((d) => d.isSame(effectiveDate, compareUnit));\n let newDates: Dayjs[];\n\n if (existingIndex >= 0) {\n // Remove if already selected\n newDates = currentDayjs.filter((_, index) => index !== existingIndex);\n } else {\n // Add new date, preserving the shared time already configured.\n const activeTime = (effectiveValue?.time as TimeValue) ?? defaultStartTime;\n const dateWithTime = time.enabled\n ? composeLocalDateTime(effectiveDate, activeTime)\n : composeDateOnly(effectiveDate, 'start');\n newDates = [...currentDayjs, dateWithTime];\n }\n\n // Always return ISO strings\n const newValue: DateTimeValue<T> = {\n date: newDates.map((d) => d.toISOString()) as DateTimeValue<T>['date'],\n time: time.enabled\n ? (((effectiveValue?.time as TimeValue) ??\n defaultStartTime) as DateTimeValue<T>['time'])\n : undefined,\n };\n\n commit(newValue);\n break;\n }\n\n case 'range': {\n const currentRange = (effectiveValue?.date as {\n start: string | null;\n end: string | null;\n }) || {\n start: null,\n end: null,\n };\n const currentRangeTime = (effectiveValue?.time as RangeTimeValue) || {\n start: defaultStartTime,\n end: defaultEndTime,\n };\n\n if (!currentRange.start || (currentRange.start && currentRange.end)) {\n // Start new range, preserving the already-configured start time.\n // `effectiveRangeStart` anchors a month-granularity pick to the\n // month's FIRST day - the same pick that ends a range anchors to\n // its last, see `effectiveDate` above.\n const startWithTime = time.enabled\n ? composeLocalDateTime(effectiveRangeStart, currentRangeTime.start)\n : composeDateOnly(effectiveRangeStart, 'start');\n\n // Always return ISO string\n const newValue: DateTimeValue<T> = {\n date: { start: startWithTime.toISOString(), end: null } as DateTimeValue<T>['date'],\n time: time.enabled ? (currentRangeTime as DateTimeValue<T>['time']) : undefined,\n };\n\n commit(newValue);\n } else {\n // Complete the range. Date-only starts were anchored to\n // `pickerTimezone` when stored (see `composeDateOnly`) -\n // re-read it the same way so the \"is end before start\"\n // comparison below lines up with the day it actually\n // represents. Date+time starts were never anchored, so\n // they stay on local interpretation, matching how they\n // were written.\n const start = time.enabled\n ? dayjs(currentRange.start)\n : dayjs(currentRange.start).tz(pickerTimezone);\n let end = effectiveDate;\n\n // Ensure end is after start\n if (end.isBefore(start, compareUnit)) {\n end = start;\n }\n\n end = time.enabled\n ? composeLocalDateTime(end, currentRangeTime.end)\n : composeDateOnly(end, 'end');\n\n // Always return ISO strings\n const newValue: DateTimeValue<T> = {\n date: {\n start: currentRange.start,\n end: end.toISOString(),\n } as DateTimeValue<T>['date'],\n time: time.enabled ? (currentRangeTime as DateTimeValue<T>['time']) : undefined,\n };\n\n commit(newValue);\n if (!showActions) setIsOpen(false); // the range is complete\n }\n break;\n }\n }\n },\n [\n mode,\n time,\n effectiveValue,\n commit,\n showActions,\n defaultStartTime,\n defaultEndTime,\n composeDateOnly,\n composeLocalDateTime,\n pickerTimezone,\n granularity,\n ],\n );\n\n // Format display value\n const displayValue = useMemo(() => {\n if (!value?.date) return '';\n\n const displayFmt =\n format.displayFormat || (granularity === 'month' ? 'MMM YYYY' : 'MMM DD, YYYY');\n // Date-only values were anchored to `pickerTimezone` when stored (see\n // `composeDateOnly`) - display them in that same timezone rather than\n // the viewer's ambient one, so the trigger shows the actual calendar\n // date that was picked. Date+time values were deliberately never\n // anchored (see the note above `pickerTimezone`) - the viewer's own\n // local timezone is exactly what should convert that instant for\n // display, e.g. a UTC+3-scheduled 15:00 meeting showing as 12:00 to a\n // UTC+0 viewer.\n const parseDateOnlyAware = (iso: string) =>\n time.enabled ? dayjs(iso) : dayjs(iso).tz(pickerTimezone);\n\n switch (mode) {\n case 'single': {\n const date = parseDateOnlyAware(value.date as string);\n let result = date.format(displayFmt);\n if (time.enabled) {\n const timeStr = time.includeSeconds ? date.format('HH:mm:ss') : date.format('HH:mm');\n result += ` ${timeStr}`;\n }\n return result;\n }\n\n case 'multiple': {\n const dates = value.date as string[];\n if (time.enabled) {\n const formattedDates = dates.map((d) => {\n const date = parseDateOnlyAware(d);\n const dateStr = date.format(displayFmt);\n const timeStr = time.includeSeconds ? date.format('HH:mm:ss') : date.format('HH:mm');\n return `${dateStr} ${timeStr}`;\n });\n return formattedDates.join(', ');\n } else {\n const formattedDates = dates.map((d) => parseDateOnlyAware(d).format(displayFmt));\n return formattedDates.join(', ');\n }\n }\n\n case 'range': {\n const rangeValue = value.date as { start: string | null; end: string | null };\n const parts: string[] = [];\n\n if (rangeValue.start) {\n const startDate = parseDateOnlyAware(rangeValue.start);\n let startStr = startDate.format(displayFmt);\n if (time.enabled) {\n const timeStr = time.includeSeconds\n ? startDate.format('HH:mm:ss')\n : startDate.format('HH:mm');\n startStr += ` ${timeStr}`;\n }\n parts.push(startStr);\n }\n\n if (rangeValue.end) {\n const endDate = parseDateOnlyAware(rangeValue.end);\n let endStr = endDate.format(displayFmt);\n if (time.enabled) {\n const timeStr = time.includeSeconds\n ? endDate.format('HH:mm:ss')\n : endDate.format('HH:mm');\n endStr += ` ${timeStr}`;\n }\n parts.push(endStr);\n }\n\n return parts.join(' - ');\n }\n\n default:\n return '';\n }\n }, [value, mode, time, format, pickerTimezone, granularity]);\n\n // Handle clear\n const handleClear = useCallback(\n (e?: React.MouseEvent) => {\n if (e) {\n e.stopPropagation();\n }\n\n const clearedValue = (() => {\n if (mode === 'multiple') {\n return {\n date: [] as unknown as DateTimeValue<T>['date'],\n time: time.enabled\n ? (defaultStartTime as unknown as DateTimeValue<T>['time'])\n : undefined,\n } as DateTimeValue<T>;\n } else if (mode === 'range') {\n return {\n date: { start: null, end: null } as unknown as DateTimeValue<T>['date'],\n time: time.enabled\n ? ({\n start: defaultStartTime,\n end: defaultEndTime,\n } as unknown as DateTimeValue<T>['time'])\n : undefined,\n } as DateTimeValue<T>;\n } else {\n return {\n date: null as unknown as DateTimeValue<T>['date'],\n time: time.enabled\n ? (defaultStartTime as unknown as DateTimeValue<T>['time'])\n : undefined,\n } as DateTimeValue<T>;\n }\n })();\n\n if (showActions && isOpen) {\n // A draft is in play: discard just the pending selection and stay\n // open - committing the clear still needs Apply.\n setDraft(clearedValue);\n } else {\n // No draft to discard (immediate mode, or the field X pressed\n // while the panel is closed): clear the committed value for real.\n onChange?.(clearedValue);\n setIsOpen(false);\n }\n },\n [mode, time, onChange, showActions, isOpen, defaultStartTime, defaultEndTime],\n );\n\n // Deferred-commit footer: Apply emits the draft (or the unchanged value\n // when nothing was picked), Cancel simply closes - the draft is dropped\n // by the close effect either way.\n const applyDraft = useCallback(() => {\n const next = draft ?? value;\n // `value` is optional and `applyDisabled` only guards an incomplete\n // range - with neither a draft nor a value there is nothing to emit,\n // so close without calling `onChange` rather than passing undefined.\n if (next !== undefined) onChange?.(next);\n setIsOpen(false);\n }, [onChange, draft, value]);\n\n const cancelDraft = useCallback(() => {\n setIsOpen(false);\n }, []);\n\n // A range with a start but no end is a selection in progress - committing\n // it would emit a half-range, so Apply waits for the second pick.\n const applyDisabled =\n mode === 'range' &&\n !!draft &&\n !!(draft.date as { start: string | null; end: string | null }).start &&\n !(draft.date as { start: string | null; end: string | null }).end;\n\n // Create trigger element\n const triggerElement = (\n <div\n ref={triggerRef}\n className={`eidos-date-picker-trigger${fullWidth ? ` eidos-date-picker-trigger--full-width` : ''}`}\n // Handled here rather than on the `Input` so the keys work wherever inside\n // the field they are pressed. A click opens the calendar because it\n // bubbles to the overlay's trigger wrapper; a keypress has nothing\n // equivalent, so without this the field can be focused and cannot be\n // opened at all.\n onKeyDown={(event) => {\n if (disabled) return;\n if (event.key === 'Enter' || event.key === ' ' || event.key === 'ArrowDown') {\n event.preventDefault();\n setIsOpen(true);\n } else if (event.key === 'Escape' && isOpen) {\n event.preventDefault();\n setIsOpen(false);\n }\n }}\n >\n <Input\n ref={fieldRef}\n value={displayValue}\n label={label}\n placeholder={placeholder}\n disabled={disabled}\n required={required}\n name={name}\n id={id}\n // A read-only field that opens a calendar is a combobox with a dialog\n // popup. `aria-controls` is gated on the panel existing - it is only\n // rendered while open, and naming an absent element is invalid.\n role=\"combobox\"\n aria-haspopup=\"dialog\"\n aria-expanded={isOpen}\n aria-controls={isOpen ? panelId : undefined}\n // Forwarded, not just set on the wrapper above: the wrapper stretching\n // to 100% does nothing on its own while the Input inside it keeps its\n // own intrinsic width. Mirrors Select, which forwards it the same way.\n fullWidth={fullWidth}\n readOnly={true}\n preIcon={CalendarIcon}\n posIcon={displayValue ? X : undefined}\n posIconButton={!!displayValue}\n onPosIconClick={displayValue ? handleClear : undefined}\n // Latent until a date is picked, which is why no story caught it:\n // the button only renders once `displayValue` exists.\n posIconLabel=\"Clear date\"\n {...inputProps}\n clearable={false}\n />\n </div>\n );\n\n // Create dropdown content with calendar(s) and time inputs\n const dropdownContent = (\n <div ref={panelRef} id={panelId} className={'eidos-date-picker-content'}>\n {/* Multiple calendars with container-level navigation */}\n <div className={'eidos-date-picker-calendars-wrapper'}>\n {Array.from({ length: numberOfCalendars }, (_, index) => {\n const calendarDate = calendarDates[index] ?? dayjs().add(index, 'month');\n return (\n <Calendar\n key={index}\n currentDate={calendarDate}\n selectedDates={selectedDates}\n rangeStart={rangeStart}\n rangeEnd={rangeEnd}\n mode={mode}\n granularity={granularity}\n onDateSelect={handleDateSelect}\n onMonthChange={(newDate) => handleCalendarMonthChange(index, newDate)}\n minDate={minDateObj}\n maxDate={maxDateObj}\n disabledDates={disabledDatesObj}\n disabledDaysOfWeek={disabledDaysOfWeek}\n showWeekNumbers={calendar.showWeekNumbers}\n firstDayOfWeek={calendar.firstDayOfWeek}\n // Non-independent: only the first calendar's control is\n // interactive, since it's the one every other calendar\n // actually follows. Independent: every calendar gets one.\n showNavigation={independentCalendars || index === 0}\n />\n );\n })}\n </div>\n\n {/* Time inputs */}\n {time.enabled && (\n <div className={'eidos-date-picker-time-container'}>\n {mode === 'single' && (\n <TimeInput\n value={(effectiveValue?.time as TimeValue) || defaultStartTime}\n onChange={(newTime) => {\n // Recompose the actual returned value with the new\n // time, not just the separate `time` field - see\n // `recomposeIsoWithTime`.\n const currentIso = effectiveValue?.date as string | null;\n const newValue = {\n ...effectiveValue,\n date: (currentIso\n ? recomposeIsoWithTime(currentIso, newTime)\n : currentIso) as DateTimeValue<T>['date'],\n time: newTime,\n } as DateTimeValue<T>;\n commit(newValue);\n }}\n includeSeconds={time.includeSeconds}\n disabled={disabled}\n label=\"Time\"\n />\n )}\n\n {mode === 'multiple' && (\n <TimeInput\n value={(effectiveValue?.time as TimeValue) || defaultStartTime}\n onChange={(newTime) => {\n // Recompose every selected date with the new shared\n // time - see `recomposeIsoWithTime`.\n const currentDates = (effectiveValue?.date as string[]) || [];\n const newValue = {\n ...effectiveValue,\n date: currentDates.map((d) =>\n recomposeIsoWithTime(d, newTime),\n ) as DateTimeValue<T>['date'],\n time: newTime,\n } as DateTimeValue<T>;\n commit(newValue);\n }}\n includeSeconds={time.includeSeconds}\n disabled={disabled}\n label=\"Time for all dates\"\n />\n )}\n\n {mode === 'range' && (\n <div className={'eidos-date-picker-range-time-inputs'}>\n <TimeInput\n value={(effectiveValue?.time as RangeTimeValue)?.start || defaultStartTime}\n onChange={(newTime) => {\n const currentRangeTime = (effectiveValue?.time as RangeTimeValue) || {\n start: defaultStartTime,\n end: defaultEndTime,\n };\n // Recompose just the start of the range with the new\n // time - see `recomposeIsoWithTime`.\n const currentRange = (effectiveValue?.date as {\n start: string | null;\n end: string | null;\n }) || {\n start: null,\n end: null,\n };\n const newValue = {\n ...effectiveValue,\n date: {\n ...currentRange,\n start: currentRange.start\n ? recomposeIsoWithTime(currentRange.start, newTime)\n : currentRange.start,\n } as DateTimeValue<T>['date'],\n time: {\n ...currentRangeTime,\n start: newTime,\n },\n } as DateTimeValue<T>;\n commit(newValue);\n }}\n includeSeconds={time.includeSeconds}\n disabled={disabled}\n label=\"Start time\"\n />\n <TimeInput\n value={(effectiveValue?.time as RangeTimeValue)?.end || defaultEndTime}\n onChange={(newTime) => {\n const currentRangeTime = (effectiveValue?.time as RangeTimeValue) || {\n start: defaultStartTime,\n end: defaultEndTime,\n };\n // Recompose just the end of the range with the new\n // time - see `recomposeIsoWithTime`.\n const currentRange = (effectiveValue?.date as {\n start: string | null;\n end: string | null;\n }) || {\n start: null,\n end: null,\n };\n const newValue = {\n ...effectiveValue,\n date: {\n ...currentRange,\n end: currentRange.end\n ? recomposeIsoWithTime(currentRange.end, newTime)\n : currentRange.end,\n } as DateTimeValue<T>['date'],\n time: {\n ...currentRangeTime,\n end: newTime,\n },\n } as DateTimeValue<T>;\n commit(newValue);\n }}\n includeSeconds={time.includeSeconds}\n disabled={disabled}\n label=\"End time\"\n />\n </div>\n )}\n </div>\n )}\n\n {/* Deferred-commit actions - only rendered when showActions is on */}\n {showActions && (\n <div className={'eidos-date-picker-actions'}>\n <Button variant=\"text\" color=\"secondary\" onClick={cancelDraft}>\n Cancel\n </Button>\n <Button variant=\"filled\" color=\"primary\" disabled={applyDisabled} onClick={applyDraft}>\n Apply\n </Button>\n </div>\n )}\n </div>\n );\n\n return (\n <div\n className={`eidos-date-picker-container${fullWidth ? ` eidos-date-picker-container--full-width` : ''} ${className}`.trim()}\n >\n <Dropdown\n open={isOpen}\n onOpenChange={setIsOpen}\n trigger={triggerElement}\n content={dropdownContent}\n placement=\"bottom\"\n minWidth={minWidth}\n maxWidth={maxWidth || 'none'}\n minHeight={minHeight}\n maxHeight={maxHeight || 'none'}\n autoWidth={autoWidth}\n // Dropdown wraps `trigger` in its own `.eidos-dropdown-trigger` div,\n // which stays shrink-to-fit unless told otherwise - so without this,\n // `fullWidth` stopped at that wrapper and the trigger input never\n // stretched. Select forwards it here for the same reason.\n fullWidth={fullWidth}\n triggerRef={triggerRef as React.RefObject<HTMLElement | null>}\n />\n </div>\n );\n};\n\nDatePicker.displayName = 'DatePicker';\n","import React, { useMemo, useCallback } from 'react';\nimport dayjs, { Dayjs } from 'dayjs';\nimport weekOfYear from 'dayjs/plugin/weekOfYear';\nimport { ChevronLeft, ChevronRight } from 'lucide-react';\n\n// Initialize dayjs plugins\ndayjs.extend(weekOfYear);\nimport { Select } from '../Select/Select.component';\nimport type { CalendarProps } from './DatePicker.types';\nimport { Button } from '../Button/Button.component';\n\nexport const Calendar: React.FC<CalendarProps> = ({\n currentDate,\n selectedDates,\n rangeStart,\n rangeEnd,\n // mode, // TODO: Use this for different selection behaviors\n granularity = 'day',\n onDateSelect,\n onMonthChange,\n minDate,\n maxDate,\n disabledDates = [],\n disabledDaysOfWeek = [],\n showWeekNumbers = false,\n firstDayOfWeek = 1, // Monday\n showNavigation = true,\n}) => {\n // Generate month options (12 months)\n const monthOptions = useMemo(() => {\n return Array.from({ length: 12 }, (_, i) => ({\n id: i.toString(),\n label: dayjs().month(i).format('MMMM'),\n value: i.toString(),\n }));\n }, []);\n\n // Generate year options (current year ± 50 years)\n const yearOptions = useMemo(() => {\n const currentYear = dayjs().year();\n const years = [];\n for (let year = currentYear - 50; year <= currentYear + 50; year++) {\n years.push({\n id: year.toString(),\n label: year.toString(),\n value: year.toString(),\n });\n }\n return years;\n }, []);\n\n // Handle month selection\n const handleMonthSelect = useCallback(\n (value: string | string[]) => {\n if (typeof value !== 'string') return;\n const month = Number.parseInt(value, 10);\n // `Select` can emit '' - `parseInt('')` is NaN, and `month(NaN)`\n // produces an Invalid dayjs that must never reach `onMonthChange`.\n if (!Number.isFinite(month)) return;\n const newDate = currentDate.month(month);\n if (!newDate.isValid()) return;\n onMonthChange(newDate);\n },\n [currentDate, onMonthChange],\n );\n\n // Handle year selection\n const handleYearSelect = useCallback(\n (value: string | string[]) => {\n if (typeof value !== 'string') return;\n const year = Number.parseInt(value, 10);\n if (!Number.isFinite(year)) return;\n const newDate = currentDate.year(year);\n if (!newDate.isValid()) return;\n onMonthChange(newDate);\n },\n [currentDate, onMonthChange],\n );\n\n // Handle navigation arrows\n const handlePrevMonth = useCallback(() => {\n onMonthChange(currentDate.subtract(1, 'month'));\n }, [currentDate, onMonthChange]);\n\n const handleNextMonth = useCallback(() => {\n onMonthChange(currentDate.add(1, 'month'));\n }, [currentDate, onMonthChange]);\n\n const handlePrevYear = useCallback(() => {\n onMonthChange(currentDate.subtract(1, 'year'));\n }, [currentDate, onMonthChange]);\n\n const handleNextYear = useCallback(() => {\n onMonthChange(currentDate.add(1, 'year'));\n }, [currentDate, onMonthChange]);\n\n // Generate the 12 months of `currentDate`'s year - used instead of\n // `calendarDays` when `granularity === 'month'`.\n const monthCells = useMemo(() => {\n return Array.from({ length: 12 }, (_, i) => {\n const monthDate = currentDate.month(i).startOf('month');\n const isToday = monthDate.isSame(dayjs(), 'month');\n const isSelected = selectedDates.some((date) => date.isSame(monthDate, 'month'));\n const isDisabled =\n (minDate && monthDate.endOf('month').isBefore(minDate, 'month')) ||\n (maxDate && monthDate.isAfter(maxDate, 'month'));\n\n const isRangeStart = rangeStart?.isSame(monthDate, 'month') || false;\n const isRangeEnd = rangeEnd?.isSame(monthDate, 'month') || false;\n const isInRange =\n rangeStart &&\n rangeEnd &&\n monthDate.isAfter(rangeStart, 'month') &&\n monthDate.isBefore(rangeEnd, 'month');\n\n return {\n date: monthDate,\n isToday,\n isSelected,\n isDisabled,\n isRangeStart,\n isRangeEnd,\n isInRange,\n };\n });\n }, [currentDate, selectedDates, rangeStart, rangeEnd, minDate, maxDate]);\n\n // Generate calendar days\n const calendarDays = useMemo(() => {\n const startOfMonth = currentDate.startOf('month');\n\n // Get the first day of the week for the first day of the month\n let startOfCalendar = startOfMonth.startOf('week');\n if (firstDayOfWeek === 1) {\n // Monday\n startOfCalendar =\n startOfMonth.day() === 0\n ? startOfMonth.subtract(6, 'day')\n : startOfMonth.startOf('week').add(1, 'day');\n }\n\n // Generate 42 days (6 weeks * 7 days)\n const days = [];\n let current = startOfCalendar;\n\n for (let i = 0; i < 42; i++) {\n const isCurrentMonth = current.month() === currentDate.month();\n const isToday = current.isSame(dayjs(), 'day');\n const isSelected = selectedDates.some((date) => date.isSame(current, 'day'));\n const isDisabled =\n (minDate && current.isBefore(minDate, 'day')) ||\n (maxDate && current.isAfter(maxDate, 'day')) ||\n disabledDates.some((date) => date.isSame(current, 'day')) ||\n disabledDaysOfWeek.includes(current.day());\n\n // Range logic\n const isRangeStart = rangeStart?.isSame(current, 'day') || false;\n const isRangeEnd = rangeEnd?.isSame(current, 'day') || false;\n const isInRange =\n rangeStart &&\n rangeEnd &&\n current.isAfter(rangeStart, 'day') &&\n current.isBefore(rangeEnd, 'day');\n\n days.push({\n date: current,\n isCurrentMonth,\n isToday,\n isSelected,\n isDisabled,\n isRangeStart,\n isRangeEnd,\n isInRange,\n });\n\n current = current.add(1, 'day');\n }\n\n return days;\n }, [\n currentDate,\n selectedDates,\n rangeStart,\n rangeEnd,\n minDate,\n maxDate,\n disabledDates,\n disabledDaysOfWeek,\n firstDayOfWeek,\n ]);\n\n // Generate weekday headers\n const weekDays = useMemo(() => {\n const days = [];\n let start =\n firstDayOfWeek === 0 ? dayjs().startOf('week') : dayjs().startOf('week').add(1, 'day');\n\n for (let i = 0; i < 7; i++) {\n days.push(start.format('dd'));\n start = start.add(1, 'day');\n }\n return days;\n }, [firstDayOfWeek]);\n\n // Handle date click\n const handleDateClick = useCallback(\n (date: Dayjs) => {\n onDateSelect(date);\n },\n [onDateSelect],\n );\n\n return (\n <div className={'eidos-calendar'}>\n {/* Header with navigation - only interactive when this calendar actually\n\t\t\t navigates independently of its neighbors (see `showNavigation` doc).\n\t\t\t Showing editable, interactive controls that silently move a sibling\n\t\t\t calendar instead of themselves is exactly the confusing behavior this\n\t\t\t is meant to avoid; a plain label is honest about what will happen. */}\n <div className={'eidos-calendar-header'}>\n {showNavigation ? (\n granularity === 'month' ? (\n <>\n <Button\n variant=\"text\"\n icon={ChevronLeft}\n onClick={handlePrevYear}\n aria-label=\"Previous year\"\n />\n\n <div className={'eidos-calendar-selectors'}>\n {/* `fullWidth` as on the day-granularity selects below - same reason. */}\n <Select\n options={yearOptions}\n value={currentDate.year().toString()}\n onChange={handleYearSelect}\n clearable={false}\n fullWidth\n inputProps={{ 'aria-label': 'Year' }}\n dropdownProps={{\n dropdownGroup: 'calendar-navigation',\n }}\n />\n </div>\n\n <Button\n variant=\"text\"\n icon={ChevronRight}\n onClick={handleNextYear}\n aria-label=\"Next year\"\n />\n </>\n ) : (\n <>\n <Button\n variant=\"text\"\n icon={ChevronLeft}\n onClick={handlePrevMonth}\n aria-label=\"Previous month\"\n />\n\n <div className={'eidos-calendar-selectors'}>\n {/* `fullWidth` reaches `Select`'s `inline-block` trigger wrapper,\n which otherwise shrink-wraps the visible box at ~200px no\n matter how wide `.eidos-calendar-selectors > *` grows - the\n difference rendered as dead space next to the select. */}\n <Select\n options={monthOptions}\n value={currentDate.month().toString()}\n onChange={handleMonthSelect}\n clearable={false}\n fullWidth\n inputProps={{ 'aria-label': 'Month' }}\n dropdownProps={{\n dropdownGroup: 'calendar-navigation',\n }}\n />\n <Select\n options={yearOptions}\n value={currentDate.year().toString()}\n onChange={handleYearSelect}\n clearable={false}\n fullWidth\n inputProps={{ 'aria-label': 'Year' }}\n dropdownProps={{\n dropdownGroup: 'calendar-navigation',\n }}\n />\n </div>\n\n <Button\n variant=\"text\"\n icon={ChevronRight}\n onClick={handleNextMonth}\n aria-label=\"Next month\"\n />\n </>\n )\n ) : (\n <div className={'eidos-calendar-label'}>\n {currentDate.format(granularity === 'month' ? 'YYYY' : 'MMMM YYYY')}\n </div>\n )}\n </div>\n\n {/* Calendar grid */}\n {granularity === 'month' ? (\n <div className={'eidos-calendar-month-cells'}>\n {monthCells.map((month, index) => (\n <button\n key={index}\n type=\"button\"\n className={`eidos-calendar-date-cell eidos-calendar-month-cell ${month.isToday ? 'eidos-calendar-today' : ''} ${month.isSelected ? 'eidos-calendar-selected' : ''} ${month.isDisabled ? 'eidos-calendar-disabled' : ''} ${month.isRangeStart ? 'eidos-calendar-range-start' : ''} ${month.isRangeEnd ? 'eidos-calendar-range-end' : ''} ${month.isInRange ? 'eidos-calendar-in-range' : ''}`.trim()}\n onClick={() => !month.isDisabled && handleDateClick(month.date)}\n disabled={month.isDisabled}\n >\n {month.date.format('MMM')}\n </button>\n ))}\n </div>\n ) : (\n <div className={'eidos-calendar-grid'}>\n {/* Week numbers column (optional) */}\n {showWeekNumbers && (\n <div className={'eidos-calendar-week-numbers-column'}>\n <div className={'eidos-calendar-week-number-header'}></div>\n {Array.from({ length: 6 }, (_, weekIndex) => {\n const weekStart = calendarDays[weekIndex * 7].date;\n return (\n <div key={weekIndex} className={'eidos-calendar-week-number'}>\n {weekStart.format('W')}\n </div>\n );\n })}\n </div>\n )}\n\n {/* Main calendar content */}\n <div className={'eidos-calendar-content'}>\n {/* Weekday headers */}\n <div className={'eidos-calendar-week-days'}>\n {weekDays.map((day, index) => (\n <div key={index} className={'eidos-calendar-week-day'}>\n {day}\n </div>\n ))}\n </div>\n\n {/* Date cells */}\n <div className={'eidos-calendar-date-cells'}>\n {calendarDays.map((day, index) => (\n <button\n key={index}\n type=\"button\"\n className={`eidos-calendar-date-cell ${!day.isCurrentMonth ? 'eidos-calendar-other-month' : ''} ${day.isToday ? 'eidos-calendar-today' : ''} ${day.isSelected ? 'eidos-calendar-selected' : ''} ${day.isDisabled ? 'eidos-calendar-disabled' : ''} ${day.isRangeStart ? 'eidos-calendar-range-start' : ''} ${day.isRangeEnd ? 'eidos-calendar-range-end' : ''} ${day.isInRange ? 'eidos-calendar-in-range' : ''}`.trim()}\n onClick={() => !day.isDisabled && handleDateClick(day.date)}\n disabled={day.isDisabled}\n >\n {day.date.date()}\n </button>\n ))}\n </div>\n </div>\n </div>\n )}\n </div>\n );\n};\n","import React, { useState, useEffect, useCallback } from 'react';\nimport { Input } from '../Input/Input.component';\nimport type { TimeValue } from './DatePicker.types';\n\nexport interface TimeInputProps {\n value: TimeValue;\n onChange: (time: TimeValue) => void;\n includeSeconds?: boolean;\n disabled?: boolean;\n label?: string;\n}\n\nexport const TimeInput: React.FC<TimeInputProps> = ({\n value,\n onChange,\n includeSeconds = false,\n disabled = false,\n label = 'Time',\n}) => {\n const [hours, setHours] = useState(value.hours.toString().padStart(2, '0'));\n const [minutes, setMinutes] = useState(value.minutes.toString().padStart(2, '0'));\n const [seconds, setSeconds] = useState((value.seconds || 0).toString().padStart(2, '0'));\n\n // Update local state when value prop changes\n useEffect(() => {\n setHours(value.hours.toString().padStart(2, '0'));\n setMinutes(value.minutes.toString().padStart(2, '0'));\n setSeconds((value.seconds || 0).toString().padStart(2, '0'));\n }, [value]);\n\n const handleTimeChange = useCallback(\n (newHours: number, newMinutes: number, newSeconds: number) => {\n onChange({\n hours: newHours,\n minutes: newMinutes,\n seconds: newSeconds,\n });\n },\n [onChange],\n );\n\n const handleHoursChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newHours = Math.max(0, Math.min(23, parseInt(e.target.value) || 0));\n setHours(newHours.toString().padStart(2, '0'));\n handleTimeChange(newHours, value.minutes, value.seconds || 0);\n },\n [handleTimeChange, value.minutes, value.seconds],\n );\n\n const handleMinutesChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newMinutes = Math.max(0, Math.min(59, parseInt(e.target.value) || 0));\n setMinutes(newMinutes.toString().padStart(2, '0'));\n handleTimeChange(value.hours, newMinutes, value.seconds || 0);\n },\n [handleTimeChange, value.hours, value.seconds],\n );\n\n const handleSecondsChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const newSeconds = Math.max(0, Math.min(59, parseInt(e.target.value) || 0));\n setSeconds(newSeconds.toString().padStart(2, '0'));\n handleTimeChange(value.hours, value.minutes, newSeconds);\n },\n [handleTimeChange, value.hours, value.minutes],\n );\n\n return (\n <div className={'eidos-time-input'}>\n {label && <label className={'eidos-time-input-label'}>{label}</label>}\n <div className={'eidos-time-input-inputs'}>\n <div className={'eidos-time-input-input-group'}>\n <Input\n type=\"number\"\n value={hours}\n onChange={handleHoursChange}\n disabled={disabled}\n min={0}\n max={23}\n placeholder=\"HH\"\n size=\"sm\"\n className={'eidos-time-input-time-field'}\n />\n <span className={'eidos-time-input-separator'}>:</span>\n </div>\n <div className={'eidos-time-input-input-group'}>\n <Input\n type=\"number\"\n value={minutes}\n onChange={handleMinutesChange}\n disabled={disabled}\n min={0}\n max={59}\n placeholder=\"MM\"\n size=\"sm\"\n className={'eidos-time-input-time-field'}\n />\n {includeSeconds && <span className={'eidos-time-input-separator'}>:</span>}\n </div>\n {includeSeconds && (\n <div className={'eidos-time-input-input-group'}>\n <Input\n type=\"number\"\n value={seconds}\n onChange={handleSecondsChange}\n disabled={disabled}\n min={0}\n max={59}\n placeholder=\"SS\"\n size=\"sm\"\n className={'eidos-time-input-time-field'}\n />\n </div>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,MAAC,SAAS,GAAE,GAAE;AAAC,kBAAU,OAAO,WAAS,eAAa,OAAO,SAAO,OAAO,UAAQ,EAAE,IAAE,cAAY,OAAO,UAAQ,OAAO,MAAI,OAAO,CAAC,KAAG,IAAE,eAAa,OAAO,aAAW,aAAW,KAAG,MAAM,QAAM,EAAE;AAAA,IAAC,GAAE,UAAM,WAAU;AAAC;AAAa,UAAI,IAAE,KAAI,IAAE,KAAI,IAAE,MAAK,IAAE,eAAc,IAAE,UAAS,IAAE,UAAS,IAAE,QAAO,IAAE,OAAM,IAAE,QAAO,IAAE,SAAQ,IAAE,WAAU,IAAE,QAAO,IAAE,QAAO,IAAE,gBAAe,IAAE,8FAA6F,IAAE,wFAAuF,IAAE,EAAC,MAAK,MAAK,UAAS,2DAA2D,MAAM,GAAG,GAAE,QAAO,wFAAwF,MAAM,GAAG,GAAE,SAAQ,SAASA,IAAE;AAAC,YAAIC,KAAE,CAAC,MAAK,MAAK,MAAK,IAAI,GAAEC,KAAEF,KAAE;AAAI,eAAM,MAAIA,MAAGC,IAAGC,KAAE,MAAI,EAAE,KAAGD,GAAEC,EAAC,KAAGD,GAAE,CAAC,KAAG;AAAA,MAAG,EAAC,GAAE,IAAE,SAASD,IAAEC,IAAEC,IAAE;AAAC,YAAIC,KAAE,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SAAS;AAAA,UACT,SAAS;AAAA,UACT,WAAU;AAAA,UACV;AAAA,UACA,UAAU,YAAY;AAAA,UACtB;AAAA,UACA,WAAW,aAAa;AAAA,UACxB;AAAA,UAKA;AAAA,UACA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;AAEA,WAAW,cAAc;","names":["t","e","n","r","i","s","u","a","M","m","f","l","$","y","v","g","D","o","d","c","h","t","i","e","s","f","n","u","r","o","t","n","i","r","o","e","u","f","s","a","i","n","f","e","import_dayjs","useState","useCallback","useMemo","useEffect","dayjs","weekOfYear","useCallback","jsx","jsxs","useCallback","jsx","jsxs","dayjs","utc","timezone","useState","useEffect","useCallback","useMemo"]}
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkTUNG4IDWcjs = require('./chunk-TUNG4IDW.cjs');
14
+ var _chunk6Z42NMP4cjs = require('./chunk-6Z42NMP4.cjs');
15
15
 
16
16
 
17
17
  var _chunkS3IZPWYPcjs = require('./chunk-S3IZPWYP.cjs');
@@ -80,10 +80,10 @@ function SortableColumnHeader({
80
80
  stickyStyle,
81
81
  onSortClick
82
82
  }) {
83
- const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunkTUNG4IDWcjs.useSortable.call(void 0, {
83
+ const { attributes, listeners, setNodeRef, transform, transition, isDragging } = _chunk6Z42NMP4cjs.useSortable.call(void 0, {
84
84
  id
85
85
  });
86
- const transformStr = _chunkTUNG4IDWcjs.CSS.Transform.toString(transform);
86
+ const transformStr = _chunk6Z42NMP4cjs.CSS.Transform.toString(transform);
87
87
  const thClassName = [
88
88
  "eidos-table-header-cell",
89
89
  `eidos-table-header-cell-${columnType}`,
@@ -399,10 +399,10 @@ var Table = ({
399
399
  document.body.removeChild(link);
400
400
  URL.revokeObjectURL(url);
401
401
  };
402
- const sensors = _chunkTUNG4IDWcjs.useSensors.call(void 0,
403
- _chunkTUNG4IDWcjs.useSensor.call(void 0, _chunkTUNG4IDWcjs.PointerSensor),
404
- _chunkTUNG4IDWcjs.useSensor.call(void 0, _chunkTUNG4IDWcjs.KeyboardSensor, {
405
- coordinateGetter: _chunkTUNG4IDWcjs.sortableKeyboardCoordinates
402
+ const sensors = _chunk6Z42NMP4cjs.useSensors.call(void 0,
403
+ _chunk6Z42NMP4cjs.useSensor.call(void 0, _chunk6Z42NMP4cjs.PointerSensor),
404
+ _chunk6Z42NMP4cjs.useSensor.call(void 0, _chunk6Z42NMP4cjs.KeyboardSensor, {
405
+ coordinateGetter: _chunk6Z42NMP4cjs.sortableKeyboardCoordinates
406
406
  })
407
407
  );
408
408
  const handleDragEnd = (event) => {
@@ -413,7 +413,7 @@ var Table = ({
413
413
  const oldIndex = columnOrder.indexOf(activeId);
414
414
  const newIndex = columnOrder.indexOf(overId);
415
415
  if (oldIndex === -1 || newIndex === -1) return;
416
- const newOrder = _chunkTUNG4IDWcjs.arrayMove.call(void 0, columnOrder, oldIndex, newIndex);
416
+ const newOrder = _chunk6Z42NMP4cjs.arrayMove.call(void 0, columnOrder, oldIndex, newIndex);
417
417
  setColumnOrder(newOrder);
418
418
  if (onColumnReorder) {
419
419
  const orderMap = new Map(newOrder.map((key, idx) => [key, idx]));
@@ -703,7 +703,7 @@ var Table = ({
703
703
  }
704
704
  ),
705
705
  showFilters && onFiltersChange && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
706
- _chunkTUNG4IDWcjs.TableFiltersDropdown,
706
+ _chunk6Z42NMP4cjs.TableFiltersDropdown,
707
707
  {
708
708
  columns,
709
709
  filters,
@@ -910,7 +910,7 @@ var Table = ({
910
910
  }
911
911
  );
912
912
  if (draggableColumns) {
913
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTUNG4IDWcjs.DndContext, { sensors, onDragEnd: handleDragEnd, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkTUNG4IDWcjs.SortableContext, { items: sortableItems, strategy: _chunkTUNG4IDWcjs.horizontalListSortingStrategy, children: tableContent }) });
913
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6Z42NMP4cjs.DndContext, { sensors, onDragEnd: handleDragEnd, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6Z42NMP4cjs.SortableContext, { items: sortableItems, strategy: _chunk6Z42NMP4cjs.horizontalListSortingStrategy, children: tableContent }) });
914
914
  }
915
915
  return tableContent;
916
916
  };
@@ -918,4 +918,4 @@ var Table = ({
918
918
 
919
919
 
920
920
  exports.Table = Table;
921
- //# sourceMappingURL=chunk-YEBWP7FD.cjs.map
921
+ //# sourceMappingURL=chunk-I36GOOCM.cjs.map