eidos-ui 4.1.1 → 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 (128) hide show
  1. package/dist/chip/index.cjs +2 -2
  2. package/dist/chip/index.js +1 -1
  3. package/dist/{chunk-SOS4K7VC.js → chunk-45XFUEYG.js} +2 -2
  4. package/dist/{chunk-AWPJH3UB.js → chunk-4MURW4H3.js} +2 -2
  5. package/dist/{chunk-2WDL2ZVP.js → chunk-5TRO6CYR.js} +10 -4
  6. package/dist/chunk-5TRO6CYR.js.map +1 -0
  7. package/dist/{chunk-SJPCBRKR.cjs → chunk-5YTPZN6X.cjs} +3 -3
  8. package/dist/{chunk-SJPCBRKR.cjs.map → chunk-5YTPZN6X.cjs.map} +1 -1
  9. package/dist/{chunk-7VMF6LIC.cjs → chunk-6Z42NMP4.cjs} +9 -9
  10. package/dist/{chunk-7VMF6LIC.cjs.map → chunk-6Z42NMP4.cjs.map} +1 -1
  11. package/dist/{chunk-VGMRIXW4.cjs → chunk-7OWJQHHM.cjs} +25 -25
  12. package/dist/{chunk-VGMRIXW4.cjs.map → chunk-7OWJQHHM.cjs.map} +1 -1
  13. package/dist/{chunk-FSX7DDLO.js → chunk-BMRZHFDP.js} +97 -52
  14. package/dist/chunk-BMRZHFDP.js.map +1 -0
  15. package/dist/{chunk-43DJ3GGR.js → chunk-CEVMMYJ5.js} +2 -2
  16. package/dist/{chunk-DCUIT7SI.js → chunk-CIDHX2EW.js} +2 -2
  17. package/dist/{chunk-MKQVDEHI.cjs → chunk-CPRNLW4M.cjs} +13 -16
  18. package/dist/chunk-CPRNLW4M.cjs.map +1 -0
  19. package/dist/{chunk-6JYXGRJ3.cjs → chunk-EAUTJAKV.cjs} +3 -3
  20. package/dist/{chunk-6JYXGRJ3.cjs.map → chunk-EAUTJAKV.cjs.map} +1 -1
  21. package/dist/{chunk-OERK3T7E.js → chunk-ECP5J27K.js} +13 -16
  22. package/dist/chunk-ECP5J27K.js.map +1 -0
  23. package/dist/{chunk-5HRVHEHE.cjs → chunk-EJS22Y4B.cjs} +3 -3
  24. package/dist/{chunk-5HRVHEHE.cjs.map → chunk-EJS22Y4B.cjs.map} +1 -1
  25. package/dist/{chunk-HKLLKNRQ.cjs → chunk-EM4WYYFN.cjs} +3 -3
  26. package/dist/{chunk-HKLLKNRQ.cjs.map → chunk-EM4WYYFN.cjs.map} +1 -1
  27. package/dist/{chunk-Z3OEYDNI.js → chunk-EUQQG5WH.js} +2 -2
  28. package/dist/{chunk-FAGQGGT3.js → chunk-GVLQQGI3.js} +2 -2
  29. package/dist/{chunk-K6VEUJLY.cjs → chunk-I36GOOCM.cjs} +18 -18
  30. package/dist/{chunk-K6VEUJLY.cjs.map → chunk-I36GOOCM.cjs.map} +1 -1
  31. package/dist/{chunk-LXRNFQEI.js → chunk-JJJXVJUW.js} +3 -3
  32. package/dist/{chunk-FFYPSLQV.js → chunk-KUP3CP24.js} +8 -8
  33. package/dist/{chunk-UTOTOWPS.js → chunk-LPSRS5GI.js} +3 -3
  34. package/dist/{chunk-3QBMSZSE.cjs → chunk-NLTNIQG7.cjs} +3 -3
  35. package/dist/{chunk-3QBMSZSE.cjs.map → chunk-NLTNIQG7.cjs.map} +1 -1
  36. package/dist/{chunk-MUMTPMWD.cjs → chunk-NNNMXVHI.cjs} +3 -3
  37. package/dist/{chunk-MUMTPMWD.cjs.map → chunk-NNNMXVHI.cjs.map} +1 -1
  38. package/dist/{chunk-57BVERWD.js → chunk-NODLZFCN.js} +3 -3
  39. package/dist/{chunk-DHOBGYRD.js → chunk-NQ2IY4A2.js} +3 -3
  40. package/dist/{chunk-YHSCUPP6.cjs → chunk-QKCYXFET.cjs} +102 -57
  41. package/dist/chunk-QKCYXFET.cjs.map +1 -0
  42. package/dist/{chunk-SONL2RCW.js → chunk-QVUMYDRE.js} +5 -5
  43. package/dist/{chunk-SJKD3WCV.cjs → chunk-S3IZPWYP.cjs} +5 -5
  44. package/dist/{chunk-SJKD3WCV.cjs.map → chunk-S3IZPWYP.cjs.map} +1 -1
  45. package/dist/{chunk-GRKC4PIX.cjs → chunk-SHGRJX7B.cjs} +3 -3
  46. package/dist/{chunk-GRKC4PIX.cjs.map → chunk-SHGRJX7B.cjs.map} +1 -1
  47. package/dist/{chunk-BPVOQLCA.cjs → chunk-TFCOF5FC.cjs} +2 -2
  48. package/dist/chunk-TFCOF5FC.cjs.map +1 -0
  49. package/dist/{chunk-IJW6YCJB.cjs → chunk-TTFZKWPH.cjs} +5 -5
  50. package/dist/{chunk-IJW6YCJB.cjs.map → chunk-TTFZKWPH.cjs.map} +1 -1
  51. package/dist/{chunk-JO4NDJRA.cjs → chunk-U4B6C7OP.cjs} +6 -6
  52. package/dist/{chunk-JO4NDJRA.cjs.map → chunk-U4B6C7OP.cjs.map} +1 -1
  53. package/dist/{chunk-ADB7QRX5.cjs → chunk-U4MV7P4A.cjs} +5 -5
  54. package/dist/{chunk-ADB7QRX5.cjs.map → chunk-U4MV7P4A.cjs.map} +1 -1
  55. package/dist/{chunk-IBT535UH.js → chunk-UAAQVIZQ.js} +2 -2
  56. package/dist/chunk-UAAQVIZQ.js.map +1 -0
  57. package/dist/{chunk-VPN7AR7T.cjs → chunk-USGEUG2O.cjs} +4 -4
  58. package/dist/{chunk-VPN7AR7T.cjs.map → chunk-USGEUG2O.cjs.map} +1 -1
  59. package/dist/{chunk-TOLNPD7S.js → chunk-VA23PQTA.js} +2 -2
  60. package/dist/{chunk-BKUZF7CW.cjs → chunk-VY7DTPO3.cjs} +21 -15
  61. package/dist/chunk-VY7DTPO3.cjs.map +1 -0
  62. package/dist/{chunk-D2PXPX56.js → chunk-YAZSZFLB.js} +4 -4
  63. package/dist/{chunk-YYA5SWXD.js → chunk-ZBK4KYKJ.js} +2 -2
  64. package/dist/color-picker/index.cjs +3 -3
  65. package/dist/color-picker/index.js +2 -2
  66. package/dist/combobox/index.cjs +3 -3
  67. package/dist/combobox/index.js +2 -2
  68. package/dist/context-menu/index.cjs +4 -4
  69. package/dist/context-menu/index.js +3 -3
  70. package/dist/conversation/index.cjs +5 -5
  71. package/dist/conversation/index.js +4 -4
  72. package/dist/data-grid/index.cjs +10 -10
  73. package/dist/data-grid/index.js +9 -9
  74. package/dist/date-picker/index.cjs +4 -4
  75. package/dist/date-picker/index.d.cts +15 -1
  76. package/dist/date-picker/index.d.ts +15 -1
  77. package/dist/date-picker/index.js +3 -3
  78. package/dist/dropdown/index.cjs +2 -2
  79. package/dist/dropdown/index.d.cts +10 -0
  80. package/dist/dropdown/index.d.ts +10 -0
  81. package/dist/dropdown/index.js +1 -1
  82. package/dist/index.cjs +20 -20
  83. package/dist/index.css +1 -1
  84. package/dist/index.js +19 -19
  85. package/dist/menu/index.cjs +3 -3
  86. package/dist/menu/index.js +2 -2
  87. package/dist/page-layout/index.cjs +5 -5
  88. package/dist/page-layout/index.js +4 -4
  89. package/dist/pagination/index.cjs +4 -4
  90. package/dist/pagination/index.js +3 -3
  91. package/dist/select/index.cjs +3 -3
  92. package/dist/select/index.js +2 -2
  93. package/dist/split-button/index.cjs +4 -4
  94. package/dist/split-button/index.js +3 -3
  95. package/dist/split-chip/index.cjs +3 -3
  96. package/dist/split-chip/index.js +2 -2
  97. package/dist/table/index.cjs +9 -9
  98. package/dist/table/index.js +8 -8
  99. package/dist/tag-input/index.cjs +4 -4
  100. package/dist/tag-input/index.js +3 -3
  101. package/dist/theme-editor/index.cjs +5 -5
  102. package/dist/theme-editor/index.js +4 -4
  103. package/dist/toolbar/index.cjs +4 -4
  104. package/dist/toolbar/index.js +3 -3
  105. package/package.json +1 -1
  106. package/dist/chunk-2WDL2ZVP.js.map +0 -1
  107. package/dist/chunk-BKUZF7CW.cjs.map +0 -1
  108. package/dist/chunk-BPVOQLCA.cjs.map +0 -1
  109. package/dist/chunk-FSX7DDLO.js.map +0 -1
  110. package/dist/chunk-IBT535UH.js.map +0 -1
  111. package/dist/chunk-MKQVDEHI.cjs.map +0 -1
  112. package/dist/chunk-OERK3T7E.js.map +0 -1
  113. package/dist/chunk-YHSCUPP6.cjs.map +0 -1
  114. /package/dist/{chunk-SOS4K7VC.js.map → chunk-45XFUEYG.js.map} +0 -0
  115. /package/dist/{chunk-AWPJH3UB.js.map → chunk-4MURW4H3.js.map} +0 -0
  116. /package/dist/{chunk-43DJ3GGR.js.map → chunk-CEVMMYJ5.js.map} +0 -0
  117. /package/dist/{chunk-DCUIT7SI.js.map → chunk-CIDHX2EW.js.map} +0 -0
  118. /package/dist/{chunk-Z3OEYDNI.js.map → chunk-EUQQG5WH.js.map} +0 -0
  119. /package/dist/{chunk-FAGQGGT3.js.map → chunk-GVLQQGI3.js.map} +0 -0
  120. /package/dist/{chunk-LXRNFQEI.js.map → chunk-JJJXVJUW.js.map} +0 -0
  121. /package/dist/{chunk-FFYPSLQV.js.map → chunk-KUP3CP24.js.map} +0 -0
  122. /package/dist/{chunk-UTOTOWPS.js.map → chunk-LPSRS5GI.js.map} +0 -0
  123. /package/dist/{chunk-57BVERWD.js.map → chunk-NODLZFCN.js.map} +0 -0
  124. /package/dist/{chunk-DHOBGYRD.js.map → chunk-NQ2IY4A2.js.map} +0 -0
  125. /package/dist/{chunk-SONL2RCW.js.map → chunk-QVUMYDRE.js.map} +0 -0
  126. /package/dist/{chunk-TOLNPD7S.js.map → chunk-VA23PQTA.js.map} +0 -0
  127. /package/dist/{chunk-D2PXPX56.js.map → chunk-YAZSZFLB.js.map} +0 -0
  128. /package/dist/{chunk-YYA5SWXD.js.map → chunk-ZBK4KYKJ.js.map} +0 -0
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  Select
3
- } from "./chunk-2WDL2ZVP.js";
3
+ } from "./chunk-5TRO6CYR.js";
4
4
  import {
5
5
  Input
6
6
  } from "./chunk-GE3QCXT7.js";
7
7
  import {
8
8
  Dropdown
9
- } from "./chunk-OERK3T7E.js";
9
+ } from "./chunk-ECP5J27K.js";
10
10
  import {
11
11
  Button
12
12
  } from "./chunk-GHUEVNNU.js";
@@ -530,19 +530,23 @@ var Calendar = ({
530
530
  }, []);
531
531
  const handleMonthSelect = useCallback(
532
532
  (value) => {
533
- if (typeof value === "string") {
534
- const newDate = currentDate.month(parseInt(value));
535
- onMonthChange(newDate);
536
- }
533
+ if (typeof value !== "string") return;
534
+ const month = Number.parseInt(value, 10);
535
+ if (!Number.isFinite(month)) return;
536
+ const newDate = currentDate.month(month);
537
+ if (!newDate.isValid()) return;
538
+ onMonthChange(newDate);
537
539
  },
538
540
  [currentDate, onMonthChange]
539
541
  );
540
542
  const handleYearSelect = useCallback(
541
543
  (value) => {
542
- if (typeof value === "string") {
543
- const newDate = currentDate.year(parseInt(value));
544
- onMonthChange(newDate);
545
- }
544
+ if (typeof value !== "string") return;
545
+ const year = Number.parseInt(value, 10);
546
+ if (!Number.isFinite(year)) return;
547
+ const newDate = currentDate.year(year);
548
+ if (!newDate.isValid()) return;
549
+ onMonthChange(newDate);
546
550
  },
547
551
  [currentDate, onMonthChange]
548
552
  );
@@ -651,6 +655,7 @@ var Calendar = ({
651
655
  value: currentDate.year().toString(),
652
656
  onChange: handleYearSelect,
653
657
  clearable: false,
658
+ fullWidth: true,
654
659
  inputProps: { "aria-label": "Year" },
655
660
  dropdownProps: {
656
661
  dropdownGroup: "calendar-navigation"
@@ -684,6 +689,7 @@ var Calendar = ({
684
689
  value: currentDate.month().toString(),
685
690
  onChange: handleMonthSelect,
686
691
  clearable: false,
692
+ fullWidth: true,
687
693
  inputProps: { "aria-label": "Month" },
688
694
  dropdownProps: {
689
695
  dropdownGroup: "calendar-navigation"
@@ -697,6 +703,7 @@ var Calendar = ({
697
703
  value: currentDate.year().toString(),
698
704
  onChange: handleYearSelect,
699
705
  clearable: false,
706
+ fullWidth: true,
700
707
  inputProps: { "aria-label": "Year" },
701
708
  dropdownProps: {
702
709
  dropdownGroup: "calendar-navigation"
@@ -866,6 +873,7 @@ var DatePicker = ({
866
873
  value,
867
874
  onChange,
868
875
  granularity = "day",
876
+ showActions = false,
869
877
  time = { enabled: false },
870
878
  calendar = { numberOfCalendars: 2 },
871
879
  format = {
@@ -932,6 +940,7 @@ var DatePicker = ({
932
940
  );
933
941
  const handleCalendarMonthChange = useCallback3(
934
942
  (index, newDate) => {
943
+ if (!newDate.isValid()) return;
935
944
  if (!independentCalendars) {
936
945
  const anchor = newDate.subtract(index, "month");
937
946
  setCalendarDates(
@@ -970,13 +979,30 @@ var DatePicker = ({
970
979
  },
971
980
  [time.enabled, pickerTimezone]
972
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
+ );
973
999
  const { selectedDates, rangeStart, rangeEnd } = useMemo2(() => {
974
- if (!value?.date) {
1000
+ if (!effectiveValue?.date) {
975
1001
  return { selectedDates: [], rangeStart: null, rangeEnd: null };
976
1002
  }
977
1003
  switch (mode) {
978
1004
  case "single": {
979
- const isoString = value.date;
1005
+ const isoString = effectiveValue.date;
980
1006
  const localDateStr = toLocalDateString(isoString);
981
1007
  return {
982
1008
  selectedDates: localDateStr ? [(0, import_dayjs2.default)(localDateStr)] : [],
@@ -985,7 +1011,7 @@ var DatePicker = ({
985
1011
  };
986
1012
  }
987
1013
  case "multiple": {
988
- const isoStrings = value.date;
1014
+ const isoStrings = effectiveValue.date;
989
1015
  const localDateStrings = isoStrings.map((d) => toLocalDateString(d)).filter(Boolean);
990
1016
  return {
991
1017
  selectedDates: localDateStrings.map((d) => (0, import_dayjs2.default)(d)),
@@ -994,7 +1020,7 @@ var DatePicker = ({
994
1020
  };
995
1021
  }
996
1022
  case "range": {
997
- const range = value.date;
1023
+ const range = effectiveValue.date;
998
1024
  const startStr = toLocalDateString(range.start);
999
1025
  const endStr = toLocalDateString(range.end);
1000
1026
  return {
@@ -1006,15 +1032,16 @@ var DatePicker = ({
1006
1032
  default:
1007
1033
  return { selectedDates: [], rangeStart: null, rangeEnd: null };
1008
1034
  }
1009
- }, [value, mode, toLocalDateString]);
1035
+ }, [effectiveValue, mode, toLocalDateString]);
1010
1036
  const handleDateSelect = useCallback3(
1011
1037
  (selectedDate) => {
1012
1038
  const effectiveDate = granularity === "month" ? selectedDate.endOf("month") : selectedDate;
1039
+ const effectiveRangeStart = granularity === "month" ? selectedDate.startOf("month") : selectedDate;
1013
1040
  const compareUnit = granularity === "month" ? "month" : "day";
1014
1041
  switch (mode) {
1015
1042
  case "single": {
1016
1043
  let dateWithTime;
1017
- const activeTime = value?.time ?? defaultStartTime;
1044
+ const activeTime = effectiveValue?.time ?? defaultStartTime;
1018
1045
  if (time.enabled) {
1019
1046
  dateWithTime = composeLocalDateTime(effectiveDate, activeTime);
1020
1047
  } else {
@@ -1024,45 +1051,45 @@ var DatePicker = ({
1024
1051
  date: dateWithTime.toISOString(),
1025
1052
  time: time.enabled ? activeTime : void 0
1026
1053
  };
1027
- onChange?.(newValue);
1028
- setIsOpen(false);
1054
+ commit(newValue);
1055
+ if (!showActions) setIsOpen(false);
1029
1056
  break;
1030
1057
  }
1031
1058
  case "multiple": {
1032
- const currentDates = value?.date || [];
1059
+ const currentDates = effectiveValue?.date || [];
1033
1060
  const currentDayjs = currentDates.map((d) => (0, import_dayjs2.default)(d));
1034
1061
  const existingIndex = currentDayjs.findIndex((d) => d.isSame(effectiveDate, compareUnit));
1035
1062
  let newDates;
1036
1063
  if (existingIndex >= 0) {
1037
1064
  newDates = currentDayjs.filter((_, index) => index !== existingIndex);
1038
1065
  } else {
1039
- const activeTime = value?.time ?? defaultStartTime;
1066
+ const activeTime = effectiveValue?.time ?? defaultStartTime;
1040
1067
  const dateWithTime = time.enabled ? composeLocalDateTime(effectiveDate, activeTime) : composeDateOnly(effectiveDate, "start");
1041
1068
  newDates = [...currentDayjs, dateWithTime];
1042
1069
  }
1043
1070
  const newValue = {
1044
1071
  date: newDates.map((d) => d.toISOString()),
1045
- time: time.enabled ? value?.time ?? defaultStartTime : void 0
1072
+ time: time.enabled ? effectiveValue?.time ?? defaultStartTime : void 0
1046
1073
  };
1047
- onChange?.(newValue);
1074
+ commit(newValue);
1048
1075
  break;
1049
1076
  }
1050
1077
  case "range": {
1051
- const currentRange = value?.date || {
1078
+ const currentRange = effectiveValue?.date || {
1052
1079
  start: null,
1053
1080
  end: null
1054
1081
  };
1055
- const currentRangeTime = value?.time || {
1082
+ const currentRangeTime = effectiveValue?.time || {
1056
1083
  start: defaultStartTime,
1057
1084
  end: defaultEndTime
1058
1085
  };
1059
1086
  if (!currentRange.start || currentRange.start && currentRange.end) {
1060
- const startWithTime = time.enabled ? composeLocalDateTime(effectiveDate, currentRangeTime.start) : composeDateOnly(effectiveDate, "start");
1087
+ const startWithTime = time.enabled ? composeLocalDateTime(effectiveRangeStart, currentRangeTime.start) : composeDateOnly(effectiveRangeStart, "start");
1061
1088
  const newValue = {
1062
1089
  date: { start: startWithTime.toISOString(), end: null },
1063
1090
  time: time.enabled ? currentRangeTime : void 0
1064
1091
  };
1065
- onChange?.(newValue);
1092
+ commit(newValue);
1066
1093
  } else {
1067
1094
  const start = time.enabled ? (0, import_dayjs2.default)(currentRange.start) : (0, import_dayjs2.default)(currentRange.start).tz(pickerTimezone);
1068
1095
  let end = effectiveDate;
@@ -1077,8 +1104,8 @@ var DatePicker = ({
1077
1104
  },
1078
1105
  time: time.enabled ? currentRangeTime : void 0
1079
1106
  };
1080
- onChange?.(newValue);
1081
- setIsOpen(false);
1107
+ commit(newValue);
1108
+ if (!showActions) setIsOpen(false);
1082
1109
  }
1083
1110
  break;
1084
1111
  }
@@ -1087,8 +1114,9 @@ var DatePicker = ({
1087
1114
  [
1088
1115
  mode,
1089
1116
  time,
1090
- value,
1091
- onChange,
1117
+ effectiveValue,
1118
+ commit,
1119
+ showActions,
1092
1120
  defaultStartTime,
1093
1121
  defaultEndTime,
1094
1122
  composeDateOnly,
@@ -1179,11 +1207,24 @@ var DatePicker = ({
1179
1207
  };
1180
1208
  }
1181
1209
  })();
1182
- onChange?.(clearedValue);
1183
- setIsOpen(false);
1210
+ if (showActions && isOpen) {
1211
+ setDraft(clearedValue);
1212
+ } else {
1213
+ onChange?.(clearedValue);
1214
+ setIsOpen(false);
1215
+ }
1184
1216
  },
1185
- [mode, time, onChange, defaultStartTime, defaultEndTime]
1217
+ [mode, time, onChange, showActions, isOpen, defaultStartTime, defaultEndTime]
1186
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;
1187
1228
  const triggerElement = /* @__PURE__ */ jsx3(
1188
1229
  "div",
1189
1230
  {
@@ -1256,15 +1297,15 @@ var DatePicker = ({
1256
1297
  mode === "single" && /* @__PURE__ */ jsx3(
1257
1298
  TimeInput,
1258
1299
  {
1259
- value: value?.time || defaultStartTime,
1300
+ value: effectiveValue?.time || defaultStartTime,
1260
1301
  onChange: (newTime) => {
1261
- const currentIso = value?.date;
1302
+ const currentIso = effectiveValue?.date;
1262
1303
  const newValue = {
1263
- ...value,
1304
+ ...effectiveValue,
1264
1305
  date: currentIso ? recomposeIsoWithTime(currentIso, newTime) : currentIso,
1265
1306
  time: newTime
1266
1307
  };
1267
- onChange?.(newValue);
1308
+ commit(newValue);
1268
1309
  },
1269
1310
  includeSeconds: time.includeSeconds,
1270
1311
  disabled,
@@ -1274,17 +1315,17 @@ var DatePicker = ({
1274
1315
  mode === "multiple" && /* @__PURE__ */ jsx3(
1275
1316
  TimeInput,
1276
1317
  {
1277
- value: value?.time || defaultStartTime,
1318
+ value: effectiveValue?.time || defaultStartTime,
1278
1319
  onChange: (newTime) => {
1279
- const currentDates = value?.date || [];
1320
+ const currentDates = effectiveValue?.date || [];
1280
1321
  const newValue = {
1281
- ...value,
1322
+ ...effectiveValue,
1282
1323
  date: currentDates.map(
1283
1324
  (d) => recomposeIsoWithTime(d, newTime)
1284
1325
  ),
1285
1326
  time: newTime
1286
1327
  };
1287
- onChange?.(newValue);
1328
+ commit(newValue);
1288
1329
  },
1289
1330
  includeSeconds: time.includeSeconds,
1290
1331
  disabled,
@@ -1295,18 +1336,18 @@ var DatePicker = ({
1295
1336
  /* @__PURE__ */ jsx3(
1296
1337
  TimeInput,
1297
1338
  {
1298
- value: value?.time?.start || defaultStartTime,
1339
+ value: effectiveValue?.time?.start || defaultStartTime,
1299
1340
  onChange: (newTime) => {
1300
- const currentRangeTime = value?.time || {
1341
+ const currentRangeTime = effectiveValue?.time || {
1301
1342
  start: defaultStartTime,
1302
1343
  end: defaultEndTime
1303
1344
  };
1304
- const currentRange = value?.date || {
1345
+ const currentRange = effectiveValue?.date || {
1305
1346
  start: null,
1306
1347
  end: null
1307
1348
  };
1308
1349
  const newValue = {
1309
- ...value,
1350
+ ...effectiveValue,
1310
1351
  date: {
1311
1352
  ...currentRange,
1312
1353
  start: currentRange.start ? recomposeIsoWithTime(currentRange.start, newTime) : currentRange.start
@@ -1316,7 +1357,7 @@ var DatePicker = ({
1316
1357
  start: newTime
1317
1358
  }
1318
1359
  };
1319
- onChange?.(newValue);
1360
+ commit(newValue);
1320
1361
  },
1321
1362
  includeSeconds: time.includeSeconds,
1322
1363
  disabled,
@@ -1326,18 +1367,18 @@ var DatePicker = ({
1326
1367
  /* @__PURE__ */ jsx3(
1327
1368
  TimeInput,
1328
1369
  {
1329
- value: value?.time?.end || defaultEndTime,
1370
+ value: effectiveValue?.time?.end || defaultEndTime,
1330
1371
  onChange: (newTime) => {
1331
- const currentRangeTime = value?.time || {
1372
+ const currentRangeTime = effectiveValue?.time || {
1332
1373
  start: defaultStartTime,
1333
1374
  end: defaultEndTime
1334
1375
  };
1335
- const currentRange = value?.date || {
1376
+ const currentRange = effectiveValue?.date || {
1336
1377
  start: null,
1337
1378
  end: null
1338
1379
  };
1339
1380
  const newValue = {
1340
- ...value,
1381
+ ...effectiveValue,
1341
1382
  date: {
1342
1383
  ...currentRange,
1343
1384
  end: currentRange.end ? recomposeIsoWithTime(currentRange.end, newTime) : currentRange.end
@@ -1347,7 +1388,7 @@ var DatePicker = ({
1347
1388
  end: newTime
1348
1389
  }
1349
1390
  };
1350
- onChange?.(newValue);
1391
+ commit(newValue);
1351
1392
  },
1352
1393
  includeSeconds: time.includeSeconds,
1353
1394
  disabled,
@@ -1355,6 +1396,10 @@ var DatePicker = ({
1355
1396
  }
1356
1397
  )
1357
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" })
1358
1403
  ] })
1359
1404
  ] });
1360
1405
  return /* @__PURE__ */ jsx3(
@@ -1388,4 +1433,4 @@ export {
1388
1433
  TimeInput,
1389
1434
  DatePicker
1390
1435
  };
1391
- //# sourceMappingURL=chunk-FSX7DDLO.js.map
1436
+ //# sourceMappingURL=chunk-BMRZHFDP.js.map