@ssa-ui-kit/core 2.30.0 → 2.32.0-canary-b64be64-20251219

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 (73) hide show
  1. package/dist/components/Charts/BarLineComplexChart/BarLineComplexChartView.d.ts +2 -2
  2. package/dist/components/Charts/BarLineComplexChart/types.d.ts +2 -2
  3. package/dist/components/Charts/BigNumberChart/BigNumberChart.d.ts +4 -2
  4. package/dist/components/Charts/BigNumberChart/components/TrendLine.d.ts +8 -3
  5. package/dist/components/Charts/BigNumberChart/components/TrendLineTooltip.d.ts +8 -5
  6. package/dist/components/Charts/GaugeChart/components/GaugeChartBase.d.ts +3 -1
  7. package/dist/components/Charts/PieChart/types.d.ts +1 -1
  8. package/dist/components/Charts/RadarChart/RadarChart.d.ts +1 -1
  9. package/dist/components/Charts/TreeMapChart/TreeMapChart.d.ts +1 -1
  10. package/dist/components/Charts/index.d.ts +1 -0
  11. package/dist/components/Charts/utils/nivoReact19Compat.d.ts +13 -0
  12. package/dist/components/Checkbox/types.d.ts +2 -2
  13. package/dist/components/Chip/Chip.d.ts +2 -0
  14. package/dist/components/Chip/constants.d.ts +22 -0
  15. package/dist/components/Chip/helpers.d.ts +13 -0
  16. package/dist/components/Chip/index.d.ts +2 -0
  17. package/dist/components/Chip/styles.d.ts +35 -0
  18. package/dist/components/Chip/types.d.ts +23 -0
  19. package/dist/components/CollapsibleNavBar/components/TriggerIcon.d.ts +4 -2
  20. package/dist/components/DatePicker/styles.d.ts +0 -1
  21. package/dist/components/DateRangePicker/DateRangePicker.d.ts +1 -1
  22. package/dist/components/DateRangePicker/components/DatesListWrapper.d.ts +0 -1
  23. package/dist/components/DateRangePicker/components/TriggerInput.d.ts +1 -4
  24. package/dist/components/DateRangePicker/hooks/index.d.ts +1 -0
  25. package/dist/components/DateRangePicker/hooks/useDatePickerMask.d.ts +3 -9
  26. package/dist/components/DateRangePicker/hooks/useDateRangePicker.d.ts +21 -18
  27. package/dist/components/DateRangePicker/hooks/useRangeSelection.d.ts +20 -0
  28. package/dist/components/DateRangePicker/styles.d.ts +0 -2
  29. package/dist/components/DateRangePicker/types.d.ts +6 -4
  30. package/dist/components/DateRangePicker/useDateRangePickerContext.d.ts +2 -1
  31. package/dist/components/Field/FieldControl.d.ts +1 -1
  32. package/dist/components/Filters/FilterBlockWrapper.d.ts +0 -1
  33. package/dist/components/Filters/FiltersContext.d.ts +4 -4
  34. package/dist/components/Filters/hooks/useVisibility.d.ts +2 -2
  35. package/dist/components/Indicator/types.d.ts +4 -2
  36. package/dist/components/JsonSchemaForm/constants.d.ts +1 -0
  37. package/dist/components/JsonSchemaForm/index.d.ts +2 -0
  38. package/dist/components/JsonSchemaForm/types.d.ts +6 -0
  39. package/dist/components/ModalDismissButton/ModalDismissButton.d.ts +2 -2
  40. package/dist/components/ModalOpenButton/ModalOpenButton.d.ts +1 -1
  41. package/dist/components/NavBar/types.d.ts +1 -1
  42. package/dist/components/NotificationMenu/types.d.ts +3 -3
  43. package/dist/components/Pagination/WithPagination.d.ts +2 -4
  44. package/dist/components/PersonInfo/PersonInfo.d.ts +3 -0
  45. package/dist/components/PersonInfo/PersonInfoAvatar.d.ts +3 -0
  46. package/dist/components/PersonInfo/PersonInfoBadges.d.ts +8 -0
  47. package/dist/components/PersonInfo/PersonInfoCounter.d.ts +3 -0
  48. package/dist/components/PersonInfo/PersonInfoIcon.d.ts +7 -0
  49. package/dist/components/PersonInfo/PersonInfoValue.d.ts +3 -0
  50. package/dist/components/PersonInfo/constants.d.ts +9 -0
  51. package/dist/components/PersonInfo/helpers.d.ts +11 -0
  52. package/dist/components/PersonInfo/index.d.ts +2 -0
  53. package/dist/components/PersonInfo/styles.d.ts +71 -0
  54. package/dist/components/PersonInfo/types.d.ts +48 -0
  55. package/dist/components/TableFilters/hooks/useTableData.d.ts +3 -3
  56. package/dist/components/Tooltip/SimpleChartTooltip.d.ts +2 -1
  57. package/dist/components/Tooltip/types.d.ts +6 -5
  58. package/dist/components/TooltipTrigger/TooltipTrigger.d.ts +1 -1
  59. package/dist/components/Typeahead/Typeahead.context.d.ts +4 -4
  60. package/dist/components/Typeahead/components/TypeaheadOption.d.ts +1 -1
  61. package/dist/components/Typeahead/styles.d.ts +4 -1
  62. package/dist/components/Typeahead/types.d.ts +1 -0
  63. package/dist/components/Typeahead/useTypeahead.d.ts +4 -4
  64. package/dist/components/UserProfile/styles.d.ts +0 -2
  65. package/dist/components/UserProfile/types.d.ts +1 -1
  66. package/dist/components/WithLink.d.ts +1 -1
  67. package/dist/components/Wrapper/Wrapper.d.ts +0 -1
  68. package/dist/components/index.d.ts +2 -0
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.js +1389 -458
  71. package/dist/index.js.map +1 -1
  72. package/dist/utils/react19HocCompat.d.ts +14 -0
  73. package/package.json +30 -30
package/dist/index.js CHANGED
@@ -86,6 +86,7 @@ __webpack_require__.d(__webpack_exports__, {
86
86
  CardList: () => (/* reexport */ CardList),
87
87
  ChartBackground: () => (/* reexport */ ChartBackground),
88
88
  Checkbox: () => (/* reexport */ Checkbox_Checkbox),
89
+ Chip: () => (/* reexport */ Chip),
89
90
  CollapsibleNavBar: () => (/* reexport */ CollapsibleNavBar),
90
91
  CollapsibleNavBarContext: () => (/* reexport */ CollapsibleNavBarContext),
91
92
  CollapsibleNavBarCustomIconSVG: () => (/* reexport */ CollapsibleNavBarCustomIconSVG),
@@ -148,6 +149,7 @@ __webpack_require__.d(__webpack_exports__, {
148
149
  Pagination: () => (/* reexport */ Pagination_Pagination),
149
150
  PaginationContext: () => (/* reexport */ PaginationContext),
150
151
  PaginationContextProvider: () => (/* reexport */ PaginationContextProvider),
152
+ PersonInfo: () => (/* reexport */ PersonInfo),
151
153
  PieChart: () => (/* reexport */ PieChart),
152
154
  PieChartComponent: () => (/* reexport */ PieChartComponent),
153
155
  PieChartLegend: () => (/* reexport */ PieChartLegend),
@@ -246,6 +248,7 @@ __webpack_require__.d(__webpack_exports__, {
246
248
  iconsList: () => (/* reexport */ iconsList),
247
249
  mainTheme: () => (/* reexport */ themes_main),
248
250
  pieChartPalettes: () => (/* reexport */ colorPalettes_namespaceObject),
251
+ setHocDisplayName: () => (/* reexport */ setHocDisplayName),
249
252
  styleUtils: () => (/* reexport */ safari_focus_outline_namespaceObject),
250
253
  styles: () => (/* reexport */ Tooltip_styles_namespaceObject),
251
254
  useAccordionGroupContext: () => (/* reexport */ useAccordionGroupContext),
@@ -265,7 +268,8 @@ __webpack_require__.d(__webpack_exports__, {
265
268
  useTooltip: () => (/* reexport */ useTooltip),
266
269
  useTooltipContext: () => (/* reexport */ useTooltipContext),
267
270
  useTranslation: () => (/* reexport */ useTranslation),
268
- useTypeaheadContext: () => (/* reexport */ useTypeaheadContext)
271
+ useTypeaheadContext: () => (/* reexport */ useTypeaheadContext),
272
+ wrapNivoResponsiveComponent: () => (/* reexport */ wrapNivoResponsiveComponent)
269
273
  });
270
274
 
271
275
  // NAMESPACE OBJECT: ./src/styles/global.ts
@@ -1100,6 +1104,7 @@ __webpack_require__.d(Field_index_parts_namespaceObject, {
1100
1104
  var JsonSchemaForm_namespaceObject = {};
1101
1105
  __webpack_require__.r(JsonSchemaForm_namespaceObject);
1102
1106
  __webpack_require__.d(JsonSchemaForm_namespaceObject, {
1107
+ DEFAULT_AVATAR_SIZE: () => (DEFAULT_AVATAR_SIZE),
1103
1108
  Fields: () => (fields),
1104
1109
  Form: () => (JsonSchemaForm_Form),
1105
1110
  Templates: () => (templates),
@@ -4764,6 +4769,8 @@ const DropdownOptions = ({
4764
4769
  activeItem
4765
4770
  } = useDropdownContext();
4766
4771
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
4772
+
4773
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4767
4774
  const options = childrenArray.map(child => {
4768
4775
  const isActive = activeItem?.value === child.props.value;
4769
4776
  return /*#__PURE__*/external_react_default().cloneElement(child, {
@@ -4879,6 +4886,8 @@ const Dropdown = ({
4879
4886
  }
4880
4887
  }, [isDisabled]);
4881
4888
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
4889
+
4890
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
4882
4891
  const items = childrenArray.map((child, index) => {
4883
4892
  options.push(child.props);
4884
4893
  return /*#__PURE__*/external_react_default().cloneElement(child, {
@@ -5231,7 +5240,9 @@ const Indicator = ({
5231
5240
  background: background,
5232
5241
  children: text
5233
5242
  }) : null, /*#__PURE__*/external_react_default().cloneElement(children, {
5234
- ref: ref => childrenRef.current = ref
5243
+ ref: ref => {
5244
+ childrenRef.current = ref;
5245
+ }
5235
5246
  })]
5236
5247
  });
5237
5248
  };
@@ -5850,6 +5861,8 @@ const MultipleDropdownOptions = ({
5850
5861
  }
5851
5862
  };
5852
5863
  const childrenArray = external_react_default().Children.toArray(children).filter(Boolean);
5864
+
5865
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5853
5866
  const options = childrenArray.map(child => {
5854
5867
  const element = allItems[child.props.value];
5855
5868
  const isActive = Boolean(element?.isSelected);
@@ -6820,6 +6833,38 @@ const getRoundedNumber = (number, roundingDigits) => Number(Number(number).toFix
6820
6833
  const getFixedNumber = (number, roundingDigits) => Number(number).toFixed(roundingDigits);
6821
6834
  ;// ./src/components/Charts/PieChart/constants.ts
6822
6835
  const TOOLTIP_HEIGHT = 30;
6836
+ ;// ./src/components/Charts/utils/nivoReact19Compat.tsx
6837
+
6838
+
6839
+ /**
6840
+ * React 19 compatibility wrapper for Nivo responsive components.
6841
+ *
6842
+ * @nivo/core's ResponsiveWrapper returns an object in React 19, which causes
6843
+ * type checking issues. This utility wraps any Nivo responsive component
6844
+ * with forwardRef to ensure it's recognized as a proper React component.
6845
+ *
6846
+ * @param Component - The Nivo responsive component to wrap (e.g., ResponsiveLine, ResponsivePie)
6847
+ * @param displayName - The display name for the wrapped component
6848
+ * @returns A React 19 compatible version of the component
6849
+ */
6850
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6851
+ function wrapNivoResponsiveComponent(Component, displayName) {
6852
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6853
+ const WrappedComponent = /*#__PURE__*/external_react_default().forwardRef((props, ref) => {
6854
+ // Force React.createElement to handle the component, even if it's an object
6855
+ // This works around React 19's stricter type checking
6856
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6857
+ return /*#__PURE__*/external_react_default().createElement(Component, {
6858
+ ...props,
6859
+ ref
6860
+ });
6861
+ });
6862
+ WrappedComponent.displayName = displayName;
6863
+
6864
+ // Type assertion needed for React 19 compatibility
6865
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6866
+ return WrappedComponent;
6867
+ }
6823
6868
  ;// ./src/components/Charts/PieChart/PieChartInternal.tsx
6824
6869
  function PieChartInternal_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
6825
6870
 
@@ -6835,6 +6880,8 @@ function PieChartInternal_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tr
6835
6880
 
6836
6881
 
6837
6882
 
6883
+
6884
+ const ResponsivePie = wrapNivoResponsiveComponent(pie_namespaceObject.ResponsivePie, 'ResponsivePie');
6838
6885
  var PieChartInternal_ref = true ? {
6839
6886
  name: "1jvc3zp",
6840
6887
  styles: "width:95%!important;height:95%!important;top:2.5%!important;left:2.5%!important"
@@ -6963,7 +7010,7 @@ const PieChartInternal = ({
6963
7010
  className: "pie-chart-wrapper",
6964
7011
  ref: refs.setReference,
6965
7012
  ...getReferenceProps(),
6966
- children: [(0,jsx_runtime_namespaceObject.jsx)(pie_namespaceObject.ResponsivePie, {
7013
+ children: [(0,jsx_runtime_namespaceObject.jsx)(ResponsivePie, {
6967
7014
  margin: {
6968
7015
  top: internalOffset,
6969
7016
  right: internalOffset,
@@ -8224,7 +8271,8 @@ const useTooltip = props => {
8224
8271
  size = 'small',
8225
8272
  hasArrow = true,
8226
8273
  arrowProps = {},
8227
- isOpen: isInitOpen = false
8274
+ isOpen: isInitOpen = false,
8275
+ allowHoverContent = false
8228
8276
  } = props || {};
8229
8277
  const [isOpen, setIsOpen] = (0,external_react_namespaceObject.useState)(isInitOpen || false);
8230
8278
  const arrowRef = (0,external_react_namespaceObject.useRef)(null);
@@ -8242,7 +8290,8 @@ const useTooltip = props => {
8242
8290
  } = floatingData;
8243
8291
  const hover = (0,external_floating_ui_react_namespaceObject.useHover)(context, {
8244
8292
  enabled: enableHover,
8245
- move: true
8293
+ move: true,
8294
+ handleClose: allowHoverContent ? (0,external_floating_ui_react_namespaceObject.safePolygon)() : undefined
8246
8295
  });
8247
8296
  const click = (0,external_floating_ui_react_namespaceObject.useClick)(context, {
8248
8297
  enabled: enableClick
@@ -8782,6 +8831,247 @@ const CardList = ({
8782
8831
  ;// ./src/components/CardList/index.ts
8783
8832
 
8784
8833
 
8834
+ ;// ./src/components/Chip/styles.tsx
8835
+
8836
+ function Chip_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
8837
+
8838
+ const ChipBase = /*#__PURE__*/base_default()("div", true ? {
8839
+ target: "ea97dtp5"
8840
+ } : 0)( true ? {
8841
+ name: "1crjacs",
8842
+ styles: "display:inline-flex;align-items:center;justify-content:center;font-family:Manrope,sans-serif;font-weight:500;border-radius:24px;white-space:nowrap;user-select:none;outline:none"
8843
+ } : 0);
8844
+ const Chip_styles_small = true ? {
8845
+ name: "17p2qgf",
8846
+ styles: "height:24px;padding:2px 8px;font-size:12px;line-height:16px"
8847
+ } : 0;
8848
+ const Chip_styles_medium = true ? {
8849
+ name: "sge2fk",
8850
+ styles: "height:32px;padding:4px 12px;font-size:14px;line-height:20px"
8851
+ } : 0;
8852
+ const Chip_styles_large = true ? {
8853
+ name: "7ik91b",
8854
+ styles: "height:40px;padding:6px 16px;font-size:16px;line-height:24px"
8855
+ } : 0;
8856
+ const baseFilled = theme => /*#__PURE__*/(0,react_namespaceObject.css)("background-color:", theme.colors.greyLighter, ";border:none;" + ( true ? "" : 0), true ? "" : 0);
8857
+ const baseOutlined = theme => /*#__PURE__*/(0,react_namespaceObject.css)("background-color:", theme.colors.white, ";border:1px solid ", theme.colors.grey, ";" + ( true ? "" : 0), true ? "" : 0);
8858
+ const filled = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseFilled(theme), ";color:", theme.colors.greyDarker, ";" + ( true ? "" : 0), true ? "" : 0);
8859
+ const filledDisabled = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseFilled(theme), ";color:", theme.colors.greyDisabled, ";opacity:0.6;" + ( true ? "" : 0), true ? "" : 0);
8860
+ const outlined = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseOutlined(theme), ";color:", theme.colors.greyDarker, ";" + ( true ? "" : 0), true ? "" : 0);
8861
+ const outlinedDisabled = theme => /*#__PURE__*/(0,react_namespaceObject.css)(baseOutlined(theme), ";color:", theme.colors.greyDisabled, ";opacity:0.6;" + ( true ? "" : 0), true ? "" : 0);
8862
+ const clickable = true ? {
8863
+ name: "1q9v0e",
8864
+ styles: "cursor:pointer;transition:all 0.2s ease;&:hover{opacity:0.8;}&:active{opacity:0.7;}"
8865
+ } : 0;
8866
+ const clickableDisabled = true ? {
8867
+ name: "1sfig4b",
8868
+ styles: "cursor:not-allowed"
8869
+ } : 0;
8870
+ const IconWrapper = /*#__PURE__*/base_default()("span", true ? {
8871
+ target: "ea97dtp4"
8872
+ } : 0)( true ? {
8873
+ name: "ltz2qk",
8874
+ styles: "display:flex;align-items:center;margin-right:7px;& svg path{stroke-width:1;}"
8875
+ } : 0);
8876
+ const AvatarWrapper = /*#__PURE__*/base_default()("span", true ? {
8877
+ target: "ea97dtp3"
8878
+ } : 0)( true ? {
8879
+ name: "1twmlgg",
8880
+ styles: "display:flex;align-items:center;margin-right:7px"
8881
+ } : 0);
8882
+ const TitleWrapper = /*#__PURE__*/base_default()("span", true ? {
8883
+ target: "ea97dtp2"
8884
+ } : 0)( true ? {
8885
+ name: "xltcoo",
8886
+ styles: "color:inherit;font-weight:700;margin-right:4px"
8887
+ } : 0);
8888
+ const LabelWrapper = /*#__PURE__*/base_default()("span", true ? {
8889
+ target: "ea97dtp1"
8890
+ } : 0)( true ? {
8891
+ name: "opde7s",
8892
+ styles: "color:inherit"
8893
+ } : 0);
8894
+ const DeleteIconButton = /*#__PURE__*/base_default()("button", true ? {
8895
+ target: "ea97dtp0"
8896
+ } : 0)( true ? {
8897
+ name: "eddkk8",
8898
+ styles: "display:flex;align-items:center;justify-content:center;margin-left:7px;padding:0;padding-top:1px;cursor:pointer;border:none;background:none;color:inherit;transition:opacity 0.2s ease;& svg path{stroke-width:1;}&:hover{opacity:0.7;}&:active{opacity:0.5;}&:disabled{cursor:not-allowed;pointer-events:none;}"
8899
+ } : 0);
8900
+ ;// ./src/components/Chip/constants.ts
8901
+
8902
+ const VARIANTS = {
8903
+ OUTLINED: 'outlined',
8904
+ FILLED: 'filled'
8905
+ };
8906
+ const COLORS = {
8907
+ DEFAULT: 'default',
8908
+ PRIMARY: 'primary',
8909
+ SUCCESS: 'success',
8910
+ ERROR: 'error',
8911
+ INFO: 'info',
8912
+ WARNING: 'warning'
8913
+ };
8914
+ const constants_mapSizes = {
8915
+ small: Chip_styles_small,
8916
+ medium: Chip_styles_medium,
8917
+ large: Chip_styles_large
8918
+ };
8919
+ const ICON_SIZES = {
8920
+ small: 12,
8921
+ medium: 14,
8922
+ large: 16
8923
+ };
8924
+ ;// ./src/components/Chip/helpers.ts
8925
+
8926
+
8927
+
8928
+ const colorMap = theme => ({
8929
+ primary: {
8930
+ main: theme.colors.blue,
8931
+ bg: theme.colors.blue20
8932
+ },
8933
+ success: {
8934
+ main: theme.colors.green,
8935
+ bg: theme.colors.green20
8936
+ },
8937
+ error: {
8938
+ main: theme.colors.red,
8939
+ bg: theme.colors.red40
8940
+ },
8941
+ info: {
8942
+ main: theme.colors.blueLight,
8943
+ bg: theme.colors.blueLight20
8944
+ },
8945
+ warning: {
8946
+ main: theme.colors.yellow,
8947
+ bg: theme.colors.yellow20
8948
+ }
8949
+ });
8950
+ const getVariantColorBlock = (theme, variant, colorConfig, disabled) => {
8951
+ if (variant === 'outlined') {
8952
+ return /*#__PURE__*/(0,react_namespaceObject.css)("background-color:", colorConfig.bg, ";border:1px solid ", colorConfig.main, ";color:", colorConfig.main, ";", disabled ? 'opacity: 0.5;' : '', ";" + ( true ? "" : 0), true ? "" : 0);
8953
+ }
8954
+ return /*#__PURE__*/(0,react_namespaceObject.css)("background-color:", colorConfig.main, ";border:1px solid ", colorConfig.bg, ";color:", theme.colors.white, ";", disabled ? 'opacity: 0.5;' : '', ";" + ( true ? "" : 0), true ? "" : 0);
8955
+ };
8956
+ const getVariantColors = (theme, variant, color, disabled) => {
8957
+ const variantKey = variant ?? VARIANTS.FILLED;
8958
+ const colorKey = color ?? COLORS.DEFAULT;
8959
+ const paletteMap = colorMap(theme);
8960
+ const palette = colorKey === COLORS.DEFAULT ? null : paletteMap[colorKey];
8961
+ const chipStyles = colorKey === COLORS.DEFAULT ? variantKey === VARIANTS.OUTLINED ? disabled ? outlinedDisabled(theme) : outlined(theme) : disabled ? filledDisabled(theme) : filled(theme) : palette ? getVariantColorBlock(theme, variantKey, palette, disabled) : variantKey === VARIANTS.OUTLINED ? outlined(theme) : filled(theme);
8962
+ const iconColor = (() => {
8963
+ if (!palette) {
8964
+ return disabled ? theme.colors.greyDisabled : theme.colors.greyDarker;
8965
+ }
8966
+ if (variantKey === VARIANTS.OUTLINED) {
8967
+ return palette.main;
8968
+ }
8969
+ return theme.colors.white;
8970
+ })();
8971
+ return {
8972
+ chipStyles,
8973
+ iconColor
8974
+ };
8975
+ };
8976
+ ;// ./src/components/Chip/Chip.tsx
8977
+
8978
+
8979
+
8980
+
8981
+
8982
+
8983
+
8984
+ const Chip = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(function Chip({
8985
+ label,
8986
+ title,
8987
+ variant = VARIANTS.FILLED,
8988
+ color = COLORS.DEFAULT,
8989
+ size = 'medium',
8990
+ disabled = false,
8991
+ icon,
8992
+ avatar,
8993
+ onDelete,
8994
+ deleteIcon,
8995
+ showIcon = true,
8996
+ onClick,
8997
+ clickable: clickableProp,
8998
+ className,
8999
+ css: customCss,
9000
+ ...props
9001
+ }, ref) {
9002
+ const theme = (0,react_namespaceObject.useTheme)();
9003
+ const isClickable = !disabled && (onClick || clickableProp);
9004
+ const hasDeleteIcon = Boolean(onDelete);
9005
+ const {
9006
+ chipStyles,
9007
+ iconColor
9008
+ } = getVariantColors(theme, variant, color, disabled);
9009
+ const sizeStyles = constants_mapSizes[size];
9010
+ const iconName = showIcon ? icon ?? 'plus' : null;
9011
+ const deleteIconName = deleteIcon ?? 'cross';
9012
+ const leadingIcon = iconName ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
9013
+ name: iconName,
9014
+ color: iconColor,
9015
+ size: ICON_SIZES[size]
9016
+ }) : null;
9017
+ const handleDeleteClick = event => {
9018
+ event.stopPropagation();
9019
+ if (onDelete && !disabled) {
9020
+ onDelete(event);
9021
+ }
9022
+ };
9023
+ const handleKeyDown = event => {
9024
+ if (disabled) return;
9025
+ if (event.key === 'Backspace' || event.key === 'Delete') {
9026
+ if (onDelete) {
9027
+ event.preventDefault();
9028
+ const syntheticEvent = {
9029
+ ...event,
9030
+ stopPropagation: () => {},
9031
+ currentTarget: event.currentTarget,
9032
+ target: event.target
9033
+ };
9034
+ onDelete(syntheticEvent);
9035
+ }
9036
+ }
9037
+ if (event.key === 'Escape') {
9038
+ event.currentTarget.blur();
9039
+ }
9040
+ };
9041
+ return (0,jsx_runtime_namespaceObject.jsxs)(ChipBase, {
9042
+ ...props,
9043
+ ref: ref,
9044
+ role: isClickable ? 'button' : undefined,
9045
+ tabIndex: !disabled && (isClickable || hasDeleteIcon) ? 0 : undefined,
9046
+ "aria-disabled": disabled ? 'true' : 'false',
9047
+ className: className,
9048
+ css: [sizeStyles, chipStyles, isClickable && !disabled ? clickable : undefined, disabled ? clickableDisabled : undefined, customCss, true ? "" : 0, true ? "" : 0],
9049
+ onClick: disabled ? undefined : onClick,
9050
+ onKeyDown: handleKeyDown,
9051
+ children: [avatar && (0,jsx_runtime_namespaceObject.jsx)(AvatarWrapper, {
9052
+ children: avatar
9053
+ }), leadingIcon && !avatar && (0,jsx_runtime_namespaceObject.jsx)(IconWrapper, {
9054
+ children: leadingIcon
9055
+ }), title && (0,jsx_runtime_namespaceObject.jsx)(TitleWrapper, {
9056
+ children: title
9057
+ }), (0,jsx_runtime_namespaceObject.jsx)(LabelWrapper, {
9058
+ children: label
9059
+ }), hasDeleteIcon && (0,jsx_runtime_namespaceObject.jsx)(DeleteIconButton, {
9060
+ type: "button",
9061
+ onClick: handleDeleteClick,
9062
+ "aria-label": "Delete",
9063
+ disabled: disabled,
9064
+ children: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
9065
+ name: deleteIconName,
9066
+ color: iconColor,
9067
+ size: ICON_SIZES[size]
9068
+ })
9069
+ })]
9070
+ });
9071
+ });
9072
+ ;// ./src/components/Chip/index.ts
9073
+
9074
+
8785
9075
  ;// ./src/components/Charts/PieChart/colorPalettes.ts
8786
9076
  const getBalancePalette = theme => {
8787
9077
  const legendColorNames = ['yellow', 'blue', 'green', 'yellowWarm', 'blueLight', 'turquoise', 'pink', 'purple', 'blueCool', 'cyanTeal'];
@@ -9318,7 +9608,8 @@ const useChartInfo = () => {
9318
9608
  const {
9319
9609
  filteredData,
9320
9610
  selected,
9321
- lineShape
9611
+ lineShape,
9612
+ data
9322
9613
  } = useBarLineComplexChartContext();
9323
9614
  const {
9324
9615
  isFullscreenMode,
@@ -9331,8 +9622,19 @@ const useChartInfo = () => {
9331
9622
  context.refs.setFloating(null);
9332
9623
  };
9333
9624
  }, []);
9334
- const transformedChartData = filteredData.map((item, index) => {
9335
- const markerColor = (0,utils_namespaceObject.pathOr)(colorPalette[index], ['marker', 'color'])(item);
9625
+
9626
+ // Get orientation from data to determine if we need to reverse the order
9627
+ const orientation = (0,utils_namespaceObject.pathOr)('v', [0, 'orientation'])(data);
9628
+
9629
+ // For horizontal charts, reverse the data order so lines render in the correct direction
9630
+ // Plotly renders horizontal charts from bottom to top, so we reverse to match legend order
9631
+ // The legend will be reversed back using traceorder: 'reversed' in the layout
9632
+ const orderedData = orientation === 'h' ? [...filteredData].reverse() : filteredData;
9633
+ const transformedChartData = orderedData.map((item, index) => {
9634
+ // Calculate the original index in filteredData for color assignment
9635
+ // When reversed, the item at position 'index' was originally at position 'filteredData.length - 1 - index'
9636
+ const originalIndex = orientation === 'h' ? filteredData.length - 1 - index : index;
9637
+ const markerColor = (0,utils_namespaceObject.pathOr)(colorPalette[originalIndex], ['marker', 'color'])(item);
9336
9638
  const valueDimension = item.valueDimension === null || item.valueDimension === undefined ? '' : item.valueDimension;
9337
9639
  const extraParams = {
9338
9640
  mode: 'markers',
@@ -9819,6 +10121,7 @@ const BarLineComplexChartView = ({
9819
10121
  family: FONT_FAMILY,
9820
10122
  size: isFullscreenMode ? 16 : 12
9821
10123
  },
10124
+ traceorder: orientation === 'h' ? 'reversed' : 'normal',
9822
10125
  ...legend
9823
10126
  },
9824
10127
  ...layoutRest
@@ -10050,6 +10353,8 @@ function TreeMapChart_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried
10050
10353
 
10051
10354
 
10052
10355
 
10356
+
10357
+ const ResponsiveTreeMap = wrapNivoResponsiveComponent(treemap_namespaceObject.ResponsiveTreeMap, 'ResponsiveTreeMap');
10053
10358
  var TreeMapChart_ref = true ? {
10054
10359
  name: "1qkt16r",
10055
10360
  styles: "position:relative;height:100%;width:100%"
@@ -10080,7 +10385,7 @@ const TreeMapChartComponent = ({
10080
10385
  css: TreeMapChart_ref,
10081
10386
  children: (0,jsx_runtime_namespaceObject.jsx)("div", {
10082
10387
  css: TreeMapChart_ref2,
10083
- children: (0,jsx_runtime_namespaceObject.jsx)(treemap_namespaceObject.ResponsiveTreeMap, {
10388
+ children: (0,jsx_runtime_namespaceObject.jsx)(ResponsiveTreeMap, {
10084
10389
  borderWidth: 0,
10085
10390
  colors: colors,
10086
10391
  data: data,
@@ -10181,11 +10486,13 @@ const GaugeChartLayer = /*#__PURE__*/base_default()("div", true ? {
10181
10486
 
10182
10487
 
10183
10488
 
10489
+
10490
+ const GaugeChartBase_ResponsivePie = wrapNivoResponsiveComponent(pie_namespaceObject.ResponsivePie, 'ResponsivePie');
10184
10491
  const GaugeChartBase = ({
10185
10492
  ...props
10186
10493
  }) => {
10187
10494
  const theme = (0,react_namespaceObject.useTheme)();
10188
- return (0,jsx_runtime_namespaceObject.jsx)(pie_namespaceObject.ResponsivePie, {
10495
+ return (0,jsx_runtime_namespaceObject.jsx)(GaugeChartBase_ResponsivePie, {
10189
10496
  startAngle: -90,
10190
10497
  endAngle: 90,
10191
10498
  innerRadius: 0.8,
@@ -10777,7 +11084,7 @@ const line_namespaceObject = require("@nivo/line");
10777
11084
 
10778
11085
  const TrendLineTooltipStyled = /*#__PURE__*/base_default()("div", true ? {
10779
11086
  target: "e19yhkwp0"
10780
- } : 0)("background:", ({
11087
+ } : 0)("white-space:nowrap;background:", ({
10781
11088
  theme
10782
11089
  }) => theme.colors.white, ";border:1px solid ", ({
10783
11090
  theme
@@ -10786,6 +11093,7 @@ const TrendLineTooltipStyled = /*#__PURE__*/base_default()("div", true ? {
10786
11093
  }) => theme.colors.greyDarker, ";font-weight:600;line-height:12px;font-size:10px;padding:0.5rem;" + ( true ? "" : 0));
10787
11094
  const TrendLineTooltip = ({
10788
11095
  point,
11096
+ css,
10789
11097
  valueFormat
10790
11098
  }) => {
10791
11099
  const {
@@ -10796,6 +11104,7 @@ const TrendLineTooltip = ({
10796
11104
  yFormatted
10797
11105
  } = point.data;
10798
11106
  return (0,jsx_runtime_namespaceObject.jsx)(TrendLineTooltipStyled, {
11107
+ css: css,
10799
11108
  children: valueFormat?.(data) ?? `${xFormatted} - ${yFormatted}`
10800
11109
  });
10801
11110
  };
@@ -10805,6 +11114,8 @@ const TrendLineTooltip = ({
10805
11114
 
10806
11115
 
10807
11116
 
11117
+
11118
+ const ResponsiveLine = wrapNivoResponsiveComponent(line_namespaceObject.ResponsiveLine, 'ResponsiveLine');
10808
11119
  const ActivePoint = ({
10809
11120
  currentPoint,
10810
11121
  lastActivePoint,
@@ -10834,7 +11145,7 @@ const TrendLine = ({
10834
11145
  }) => {
10835
11146
  const theme = (0,react_namespaceObject.useTheme)();
10836
11147
  const _color = color ?? theme.colors.purpleDark;
10837
- return (0,jsx_runtime_namespaceObject.jsx)(line_namespaceObject.ResponsiveLine, {
11148
+ return (0,jsx_runtime_namespaceObject.jsx)(ResponsiveLine, {
10838
11149
  axisBottom: null,
10839
11150
  axisLeft: null,
10840
11151
  axisRight: null,
@@ -10909,12 +11220,8 @@ var BigNumberChart_ref2 = true ? {
10909
11220
  styles: "font-size:32px;font-weight:700"
10910
11221
  } : 0;
10911
11222
  var BigNumberChart_ref3 = true ? {
10912
- name: "26qidl",
10913
- styles: "position:relative;width:100%;height:50%"
10914
- } : 0;
10915
- var BigNumberChart_ref4 = true ? {
10916
- name: "19s8nj4",
10917
- styles: "position:absolute;width:100%;height:100%"
11223
+ name: "195w1i9",
11224
+ styles: "position:relative;width:100%;height:50%;min-height:100px"
10918
11225
  } : 0;
10919
11226
  const BigNumberChartComponent = ({
10920
11227
  data,
@@ -10926,6 +11233,11 @@ const BigNumberChartComponent = ({
10926
11233
  valueFormat
10927
11234
  }) => {
10928
11235
  const [hoveredValue, setHoveredValue] = (0,external_react_namespaceObject.useState)(null);
11236
+ const {
11237
+ ref: chartContainerRef,
11238
+ width,
11239
+ height
11240
+ } = (0,hooks_namespaceObject.useElementSize)();
10929
11241
  const lastValue = data.sort((a, b) => {
10930
11242
  const ax = a.x ?? 0;
10931
11243
  const bx = b.x ?? 0;
@@ -10934,9 +11246,11 @@ const BigNumberChartComponent = ({
10934
11246
  const setHoveredValueThrottled = (0,hooks_namespaceObject.useThrottledCallback)(value => {
10935
11247
  setHoveredValue(value);
10936
11248
  }, 100);
10937
- const handleMouseMove = data => {
11249
+ const handleMouseMove = datum => {
10938
11250
  if (!interactive) return;
10939
- setHoveredValueThrottled(data.data);
11251
+ if ('data' in datum) {
11252
+ setHoveredValueThrottled(datum.data);
11253
+ }
10940
11254
  };
10941
11255
  const value = hoveredValue ?? lastValue;
10942
11256
  return (0,jsx_runtime_namespaceObject.jsx)(WithWidgetCard, {
@@ -10958,18 +11272,18 @@ const BigNumberChartComponent = ({
10958
11272
  children: value && (valueFormat?.(value) ?? value?.y?.toString())
10959
11273
  })
10960
11274
  }), (0,jsx_runtime_namespaceObject.jsx)("div", {
11275
+ ref: chartContainerRef,
10961
11276
  css: BigNumberChart_ref3,
10962
- children: (0,jsx_runtime_namespaceObject.jsx)("div", {
10963
- css: BigNumberChart_ref4,
10964
- children: (0,jsx_runtime_namespaceObject.jsx)(TrendLine, {
10965
- ...trendLineProps,
10966
- data: [{
10967
- id: 'trend-line',
10968
- data
10969
- }],
10970
- onMouseMove: handleMouseMove,
10971
- lastActivePoint: value
10972
- })
11277
+ children: width > 0 && height > 0 && (0,jsx_runtime_namespaceObject.jsx)(TrendLine, {
11278
+ ...trendLineProps,
11279
+ data: [{
11280
+ id: 'trend-line',
11281
+ data
11282
+ }],
11283
+ onMouseMove: handleMouseMove,
11284
+ lastActivePoint: value,
11285
+ height: height,
11286
+ width: width
10973
11287
  })
10974
11288
  })]
10975
11289
  })
@@ -11225,6 +11539,7 @@ const CandlestickChart = WithFullscreenMode(CandlestickChartComponent);
11225
11539
 
11226
11540
 
11227
11541
 
11542
+
11228
11543
  ;// ./src/components/Checkbox/index.ts
11229
11544
 
11230
11545
 
@@ -11652,10 +11967,12 @@ const PopoverTrigger = /*#__PURE__*/external_react_namespaceObject.forwardRef(fu
11652
11967
 
11653
11968
  // `asChild` allows the user to pass any element as the anchor
11654
11969
  if (asChild && /*#__PURE__*/external_react_namespaceObject.isValidElement(children)) {
11970
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
11971
+ const childrenElement = children;
11655
11972
  return /*#__PURE__*/external_react_namespaceObject.cloneElement(children, context?.getReferenceProps({
11656
11973
  ref,
11657
11974
  ...props,
11658
- ...children.props,
11975
+ ...childrenElement.props,
11659
11976
  'data-state': context.open ? 'open' : 'closed'
11660
11977
  }));
11661
11978
  }
@@ -11900,14 +12217,15 @@ const TriggerIcon = ({
11900
12217
  iconName,
11901
12218
  iconSize,
11902
12219
  className,
11903
- CustomIcon
12220
+ CustomIcon,
12221
+ css: cssProp
11904
12222
  }) => {
11905
12223
  const theme = (0,react_namespaceObject.useTheme)();
11906
12224
  const {
11907
12225
  showIconTooltip
11908
12226
  } = useCollapsibleNavBarContext();
11909
12227
  return (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
11910
- css: TriggerIcon_ref,
12228
+ css: [TriggerIcon_ref, cssProp, true ? "" : 0, true ? "" : 0],
11911
12229
  className: "trigger-icon",
11912
12230
  children: CustomIcon ? (0,jsx_runtime_namespaceObject.jsx)(CustomIcon, {
11913
12231
  size: iconSize,
@@ -11935,7 +12253,6 @@ const TriggerIcon = ({
11935
12253
 
11936
12254
 
11937
12255
 
11938
-
11939
12256
  const ItemAccordionTitle_Link = CollapsibleNavBarLink.withComponent('div', true ? {
11940
12257
  target: "e69hc760"
11941
12258
  } : 0);
@@ -11971,9 +12288,7 @@ const ItemAccordionTitle = ({
11971
12288
  const Icon = () => (0,jsx_runtime_namespaceObject.jsx)(TriggerIcon, {
11972
12289
  iconName: item.iconName,
11973
12290
  iconSize: item.iconSize,
11974
- css: /*#__PURE__*/(0,react_namespaceObject.css)({
11975
- ...item.css
11976
- }, true ? "" : 0, true ? "" : 0)
12291
+ css: item.css
11977
12292
  });
11978
12293
  return (0,jsx_runtime_namespaceObject.jsx)(CollapsibleNavBarItemProvider, {
11979
12294
  isActive: isActive,
@@ -12097,7 +12412,6 @@ const Item = ({
12097
12412
 
12098
12413
 
12099
12414
 
12100
-
12101
12415
  const ItemWithoutSubMenu_Item = ({
12102
12416
  item,
12103
12417
  onClick
@@ -12139,9 +12453,7 @@ const ItemWithoutSubMenu_Item = ({
12139
12453
  iconName: iconName,
12140
12454
  iconSize: iconSize,
12141
12455
  CustomIcon: CustomIcon,
12142
- css: /*#__PURE__*/(0,react_namespaceObject.css)({
12143
- ...css
12144
- }, true ? "" : 0, true ? "" : 0)
12456
+ css: css
12145
12457
  });
12146
12458
  return (0,jsx_runtime_namespaceObject.jsx)(CollapsibleNavBarItemProvider, {
12147
12459
  isActive: isActive,
@@ -14052,73 +14364,526 @@ const DatePickerInner = ({
14052
14364
  const DatePicker = /*#__PURE__*/(0,external_react_namespaceObject.forwardRef)(DatePickerInner);
14053
14365
  ;// ./src/components/DatePicker/index.ts
14054
14366
 
14055
- ;// ./src/components/DateRangePicker/constants.ts
14056
- const constants_DEFAULT_MASK_FORMAT = 'mm/dd/yyyy';
14057
- const DEFAULT_MONTH_MASK_FORMAT = 'mm/yyyy';
14058
- const DEFAULT_YEAR_MASK_FORMAT = 'yyyy';
14059
- const constants_DEFAULT_MASK = '__/__/____';
14060
- const DEFAULT_MONTH_MASK = '__/____';
14061
- const DEFAULT_YEAR_MASK = '____';
14062
- const constants_MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
14063
- const constants_DATE_MIN = '01/01/1900';
14064
- const constants_DATE_MAX = '01/01/2150';
14065
- const MONTH_DATE_MIN = '01/1900';
14066
- const MONTH_DATE_MAX = '01/2150';
14067
- const YEAR_DATE_MIN = '1900';
14068
- const YEAR_DATE_MAX = '2150';
14069
- const constants_OUT_OF_RANGE = 'The date is out of the defined range';
14070
- const constants_INVALID_DATE = 'Invalid date';
14071
- const FULL_DATE_LENGTH = 10;
14072
- const FULL_MONTH_DATE_LENGTH = 7;
14073
- const FULL_YEAR_DATE_LENGTH = 4;
14074
- ;// ./src/components/DateRangePicker/utils/format.ts
14367
+ ;// ./src/components/PersonInfo/constants.ts
14368
+ const DEFAULT_BADGE_COLORS = ['purple', 'blueLight', 'green', 'blue', 'pink', 'turquoise', 'yellow', 'yellowWarm'];
14369
+ const BADGE_COLORS = theme => ({
14370
+ purple: {
14371
+ text: theme.colors.purple,
14372
+ bg: theme.colors.purple20
14373
+ },
14374
+ blueLight: {
14375
+ text: theme.colors.blueLight,
14376
+ bg: theme.colors.blueLight20
14377
+ },
14378
+ green: {
14379
+ text: theme.colors.green,
14380
+ bg: theme.colors.green20
14381
+ },
14382
+ blue: {
14383
+ text: theme.colors.blue,
14384
+ bg: theme.colors.blue20
14385
+ },
14386
+ pink: {
14387
+ text: theme.colors.pink,
14388
+ bg: theme.colors.pink20
14389
+ },
14390
+ turquoise: {
14391
+ text: theme.colors.turquoise,
14392
+ bg: theme.colors.turquoise20
14393
+ },
14394
+ yellow: {
14395
+ text: theme.colors.yellow,
14396
+ bg: theme.colors.yellow20
14397
+ },
14398
+ yellowWarm: {
14399
+ text: theme.colors.yellowLighter,
14400
+ bg: theme.colors.yellowLighter20
14401
+ }
14402
+ });
14403
+ ;// ./src/components/PersonInfo/styles.ts
14075
14404
 
14076
- const isMonthOnlyFormat = format => {
14077
- if (!format) return false;
14078
- const lowerFormat = format.toLowerCase();
14079
- const hasMonth = lowerFormat.includes('mm');
14080
- const hasYear = lowerFormat.includes('yyyy');
14081
- const hasDay = lowerFormat.includes('dd');
14082
- return hasMonth && hasYear && !hasDay;
14083
- };
14084
- const isYearOnlyFormat = format => {
14085
- if (!format) return false;
14086
- const lowerFormat = format.toLowerCase();
14087
- const hasYear = lowerFormat.includes('yyyy');
14088
- const hasMonth = lowerFormat.includes('mm');
14089
- const hasDay = lowerFormat.includes('dd');
14090
- return hasYear && !hasMonth && !hasDay;
14091
- };
14092
- const getExpectedDateLength = format => {
14093
- if (!format) return FULL_DATE_LENGTH;
14094
- if (isYearOnlyFormat(format)) {
14095
- return FULL_YEAR_DATE_LENGTH;
14405
+ function PersonInfo_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
14406
+
14407
+
14408
+ const PersonInfoBase = /*#__PURE__*/base_default()("div", true ? {
14409
+ target: "ej2kihb15"
14410
+ } : 0)( true ? {
14411
+ name: "3w0yoi",
14412
+ styles: "display:flex;flex-direction:column;gap:8px"
14413
+ } : 0);
14414
+ const PersonInfoHeader = /*#__PURE__*/base_default()("div", true ? {
14415
+ target: "ej2kihb14"
14416
+ } : 0)( true ? {
14417
+ name: "1ocjxm6",
14418
+ styles: "display:flex;align-items:flex-start;gap:8px"
14419
+ } : 0);
14420
+ const styles_IconWrapper = /*#__PURE__*/base_default()("div", true ? {
14421
+ target: "ej2kihb13"
14422
+ } : 0)( true ? {
14423
+ name: "13ltyg2",
14424
+ styles: "display:flex;align-items:flex-start;flex-shrink:0"
14425
+ } : 0);
14426
+ const styles_TitleWrapper = /*#__PURE__*/base_default()("div", true ? {
14427
+ target: "ej2kihb12"
14428
+ } : 0)( true ? {
14429
+ name: "1tcizyl",
14430
+ styles: "display:flex;flex-direction:column;gap:4px;flex:1"
14431
+ } : 0);
14432
+ const Title = /*#__PURE__*/base_default()("div", true ? {
14433
+ target: "ej2kihb11"
14434
+ } : 0)( true ? {
14435
+ name: "edklr6",
14436
+ styles: "font-size:14px;font-weight:600;line-height:19px"
14437
+ } : 0);
14438
+ const Row = /*#__PURE__*/base_default()("div", true ? {
14439
+ target: "ej2kihb10"
14440
+ } : 0)( true ? {
14441
+ name: "1j5vobt",
14442
+ styles: "display:flex;align-items:center;gap:4px"
14443
+ } : 0);
14444
+ const TextBase = /*#__PURE__*/base_default()("div", true ? {
14445
+ target: "ej2kihb9"
14446
+ } : 0)( true ? {
14447
+ name: "1bzpq77",
14448
+ styles: "font-size:14px;font-weight:400;line-height:19px"
14449
+ } : 0);
14450
+ const ValueWithCounter = /*#__PURE__*/base_default()("div", true ? {
14451
+ target: "ej2kihb8"
14452
+ } : 0)( true ? {
14453
+ name: "1j5vobt",
14454
+ styles: "display:flex;align-items:center;gap:4px"
14455
+ } : 0);
14456
+ const Counter = /*#__PURE__*/base_default()(TextBase.withComponent('span', true ? {
14457
+ target: "ej2kihb16"
14458
+ } : 0), true ? {
14459
+ target: "ej2kihb7"
14460
+ } : 0)("color:", ({
14461
+ theme
14462
+ }) => theme.colors.greyDropdownFocused, ";margin-left:5px;cursor:pointer;" + ( true ? "" : 0));
14463
+ const CounterTooltipContent = /*#__PURE__*/base_default()("div", true ? {
14464
+ target: "ej2kihb6"
14465
+ } : 0)( true ? {
14466
+ name: "1oeds5o",
14467
+ styles: "min-width:220px;padding:12px"
14468
+ } : 0);
14469
+ const CounterTooltipList = /*#__PURE__*/base_default()("div", true ? {
14470
+ target: "ej2kihb5"
14471
+ } : 0)( true ? {
14472
+ name: "1acx518",
14473
+ styles: "display:flex;flex-direction:column;gap:8px;height:auto;max-height:220px;overflow:hidden;overflow-y:auto;padding-right:4px"
14474
+ } : 0);
14475
+ const AttributesList = /*#__PURE__*/base_default()("div", true ? {
14476
+ target: "ej2kihb4"
14477
+ } : 0)( true ? {
14478
+ name: "urqszi",
14479
+ styles: "display:flex;flex-direction:column;gap:4px"
14480
+ } : 0);
14481
+ const styles_AvatarWrapper = /*#__PURE__*/base_default()("div", true ? {
14482
+ target: "ej2kihb3"
14483
+ } : 0)( true ? {
14484
+ name: "1yydxi7",
14485
+ styles: "display:flex;align-items:center;gap:8px"
14486
+ } : 0);
14487
+ const BadgeWrapper = /*#__PURE__*/base_default()("div", true ? {
14488
+ target: "ej2kihb2"
14489
+ } : 0)( true ? {
14490
+ name: "mwxihw",
14491
+ styles: "display:flex;align-items:center;gap:8px;flex-wrap:wrap"
14492
+ } : 0);
14493
+ const StyledBadge = /*#__PURE__*/base_default()(Badge_Badge, true ? {
14494
+ target: "ej2kihb1"
14495
+ } : 0)( true ? {
14496
+ name: "tv444a",
14497
+ styles: "padding:4px 8px;border-radius:20px"
14498
+ } : 0);
14499
+ const CustomBadge = /*#__PURE__*/base_default()("div", true ? {
14500
+ target: "ej2kihb0"
14501
+ } : 0)("display:inline-block;padding:2px 8px;border-radius:24px;font-weight:500;font-size:14px;color:", ({
14502
+ theme,
14503
+ colorName
14504
+ }) => {
14505
+ const {
14506
+ text
14507
+ } = BADGE_COLORS(theme)[colorName];
14508
+ return text;
14509
+ }, ";background-color:", ({
14510
+ theme,
14511
+ colorName
14512
+ }) => {
14513
+ const {
14514
+ bg
14515
+ } = BADGE_COLORS(theme)[colorName];
14516
+ return bg;
14517
+ }, ";" + ( true ? "" : 0));
14518
+ const personInfoValueLinkStyles = theme => ({
14519
+ textDecoration: 'none',
14520
+ color: theme.colors.greyDarker,
14521
+ cursor: 'pointer',
14522
+ transition: 'color 0.2s ease',
14523
+ display: 'inline-flex',
14524
+ alignItems: 'center',
14525
+ '&:hover': {
14526
+ color: theme.colors.blue
14096
14527
  }
14097
- if (isMonthOnlyFormat(format)) {
14098
- return FULL_MONTH_DATE_LENGTH;
14528
+ });
14529
+ const avatarWrapperLinkStyles = theme => ({
14530
+ textDecoration: 'none',
14531
+ color: theme.colors.greyDarker,
14532
+ cursor: 'pointer',
14533
+ transition: 'color 0.2s ease',
14534
+ '&:hover': {
14535
+ color: theme.colors.blue,
14536
+ '& > div:last-child': {
14537
+ color: theme.colors.blue
14538
+ }
14099
14539
  }
14100
- return FULL_DATE_LENGTH;
14540
+ });
14541
+ ;// ./src/components/PersonInfo/PersonInfoIcon.tsx
14542
+
14543
+
14544
+
14545
+
14546
+
14547
+ const PersonInfoIcon = ({
14548
+ icon
14549
+ }) => {
14550
+ const theme = (0,react_namespaceObject.useTheme)();
14551
+ return (0,jsx_runtime_namespaceObject.jsx)(styles_IconWrapper, {
14552
+ children: typeof icon === 'string' ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
14553
+ name: icon,
14554
+ size: 16,
14555
+ color: theme.colors.greyDarker
14556
+ }) : icon
14557
+ });
14101
14558
  };
14102
- const getMaskForFormat = format => {
14103
- if (isYearOnlyFormat(format)) {
14104
- return DEFAULT_YEAR_MASK;
14105
- }
14106
- if (isMonthOnlyFormat(format)) {
14107
- return DEFAULT_MONTH_MASK;
14108
- }
14109
- return constants_DEFAULT_MASK;
14559
+ ;// ./src/components/PersonInfo/PersonInfoValue.tsx
14560
+
14561
+
14562
+
14563
+ const PersonInfoValue = ({
14564
+ value,
14565
+ css,
14566
+ linkAttributes
14567
+ }) => {
14568
+ const isLink = Boolean(linkAttributes?.href);
14569
+ return (0,jsx_runtime_namespaceObject.jsx)(TextBase, {
14570
+ css: [isLink ? personInfoValueLinkStyles : undefined, css, true ? "" : 0, true ? "" : 0],
14571
+ ...(linkAttributes ?? {}),
14572
+ children: value
14573
+ });
14574
+ };
14575
+ ;// ./src/components/PersonInfo/helpers.ts
14576
+ const getLinkAttributes = (link, openLinkInNewTab) => {
14577
+ const isLink = Boolean(link);
14578
+ return isLink ? {
14579
+ as: 'a',
14580
+ href: link,
14581
+ target: openLinkInNewTab ? '_blank' : undefined,
14582
+ rel: openLinkInNewTab ? 'noreferrer' : undefined
14583
+ } : {};
14110
14584
  };
14111
- const getDefaultDateRange = format => {
14112
- if (isYearOnlyFormat(format)) {
14113
- return {
14114
- defaultMin: YEAR_DATE_MIN,
14115
- defaultMax: YEAR_DATE_MAX
14116
- };
14117
- }
14118
- if (isMonthOnlyFormat(format)) {
14119
- return {
14120
- defaultMin: MONTH_DATE_MIN,
14121
- defaultMax: MONTH_DATE_MAX
14585
+ ;// ./src/components/PersonInfo/PersonInfoAvatar.tsx
14586
+
14587
+
14588
+
14589
+
14590
+
14591
+
14592
+ const PersonInfoAvatar = ({
14593
+ avatar,
14594
+ value,
14595
+ styles,
14596
+ link,
14597
+ openLinkInNewTab
14598
+ }) => {
14599
+ const hasAvatar = Boolean(avatar);
14600
+ const hasValue = Boolean(value);
14601
+ const isLink = Boolean(link);
14602
+ const linkAttributes = getLinkAttributes(link, openLinkInNewTab);
14603
+ if (!hasAvatar && !hasValue) return null;
14604
+ const valueNode = hasValue ? (0,jsx_runtime_namespaceObject.jsx)(PersonInfoValue, {
14605
+ value: value,
14606
+ css: hasAvatar ? styles?.avatarName : styles?.value,
14607
+ linkAttributes: !hasAvatar ? linkAttributes : undefined
14608
+ }) : null;
14609
+ if (!hasAvatar) {
14610
+ return valueNode;
14611
+ }
14612
+ return (0,jsx_runtime_namespaceObject.jsxs)(styles_AvatarWrapper, {
14613
+ css: isLink ? avatarWrapperLinkStyles : undefined,
14614
+ ...linkAttributes,
14615
+ children: [(0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
14616
+ size: 24,
14617
+ image: avatar
14618
+ }), valueNode]
14619
+ });
14620
+ };
14621
+ ;// ./src/components/PersonInfo/PersonInfoBadges.tsx
14622
+
14623
+
14624
+
14625
+
14626
+ const PersonInfoBadges = ({
14627
+ badges,
14628
+ styles
14629
+ }) => {
14630
+ if (!badges) return null;
14631
+ if (!Array.isArray(badges)) {
14632
+ return (0,jsx_runtime_namespaceObject.jsx)(BadgeWrapper, {
14633
+ css: styles?.badge,
14634
+ children: badges
14635
+ });
14636
+ }
14637
+ return (0,jsx_runtime_namespaceObject.jsx)(BadgeWrapper, {
14638
+ css: styles?.badge,
14639
+ children: badges.map((badgeItem, index) => {
14640
+ if (typeof badgeItem === 'string') {
14641
+ const colorIndex = index % DEFAULT_BADGE_COLORS.length;
14642
+ const colorName = DEFAULT_BADGE_COLORS[colorIndex];
14643
+ return (0,jsx_runtime_namespaceObject.jsx)(CustomBadge, {
14644
+ colorName: colorName,
14645
+ css: styles?.badgeItem,
14646
+ children: badgeItem
14647
+ }, index);
14648
+ }
14649
+ return (0,jsx_runtime_namespaceObject.jsx)((external_react_default()).Fragment, {
14650
+ children: badgeItem
14651
+ }, index);
14652
+ })
14653
+ });
14654
+ };
14655
+ ;// ./src/components/ImageItem/ImageItem.tsx
14656
+ function ImageItem_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
14657
+
14658
+
14659
+
14660
+
14661
+ var ImageItem_ref = true ? {
14662
+ name: "c5ejfv",
14663
+ styles: "gap:8px;text-decoration:none"
14664
+ } : 0;
14665
+ const ImageItem = ({
14666
+ children,
14667
+ image,
14668
+ avatarSize = 24,
14669
+ link = '',
14670
+ openLinkInNewTab = false,
14671
+ className
14672
+ }) => {
14673
+ const theme = (0,react_namespaceObject.useTheme)();
14674
+ const additionalProps = link ? {
14675
+ href: link,
14676
+ target: openLinkInNewTab ? '_blank' : undefined
14677
+ } : {};
14678
+ return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
14679
+ css: ImageItem_ref,
14680
+ as: link ? 'a' : 'div',
14681
+ className: className,
14682
+ "data-testid": "image-item",
14683
+ ...additionalProps,
14684
+ children: [(0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
14685
+ size: avatarSize,
14686
+ image: image
14687
+ }), (0,jsx_runtime_namespaceObject.jsx)("span", {
14688
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
14689
+ color: theme.colors.greyDarker,
14690
+ fontSize: 14,
14691
+ fontWeight: 500,
14692
+ cursor: link ? 'pointer' : 'default',
14693
+ '&:hover': {
14694
+ color: link ? theme.colors.blue : theme.colors.greyDarker
14695
+ }
14696
+ }, true ? "" : 0, true ? "" : 0),
14697
+ children: children
14698
+ })]
14699
+ });
14700
+ };
14701
+ ;// ./src/components/PersonInfo/PersonInfoCounter.tsx
14702
+
14703
+
14704
+
14705
+
14706
+
14707
+
14708
+
14709
+ const PersonInfoCounter = ({
14710
+ counterTooltip,
14711
+ css
14712
+ }) => {
14713
+ const tooltipUsers = counterTooltip?.users ?? [];
14714
+ const hasTooltipUsers = tooltipUsers.length > 0;
14715
+ const counterValue = hasTooltipUsers ? `+${tooltipUsers.length}` : null;
14716
+ if (!counterValue) {
14717
+ return null;
14718
+ }
14719
+ const tooltipBody = (0,jsx_runtime_namespaceObject.jsx)(CounterTooltipList, {
14720
+ "data-testid": "person-info-counter-tooltip-list",
14721
+ children: tooltipUsers.map(user => (0,jsx_runtime_namespaceObject.jsx)(ImageItem, {
14722
+ image: user.avatar,
14723
+ link: user.link,
14724
+ openLinkInNewTab: user.openLinkInNewTab,
14725
+ children: user.name
14726
+ }, user.id))
14727
+ });
14728
+ const counterNode = (0,jsx_runtime_namespaceObject.jsx)(Counter, {
14729
+ css: css,
14730
+ "data-testid": "person-info-counter",
14731
+ children: counterValue
14732
+ });
14733
+ return (0,jsx_runtime_namespaceObject.jsxs)(Tooltip_Tooltip, {
14734
+ enableHover: true,
14735
+ enableClick: false,
14736
+ allowHoverContent: true,
14737
+ placement: "top",
14738
+ size: "medium",
14739
+ hasArrow: true,
14740
+ children: [(0,jsx_runtime_namespaceObject.jsx)(TooltipTrigger_TooltipTrigger, {
14741
+ children: counterNode
14742
+ }), (0,jsx_runtime_namespaceObject.jsx)(TooltipContent_TooltipContent, {
14743
+ children: (0,jsx_runtime_namespaceObject.jsx)(CounterTooltipContent, {
14744
+ children: tooltipBody
14745
+ })
14746
+ })]
14747
+ });
14748
+ };
14749
+ ;// ./src/components/PersonInfo/PersonInfo.tsx
14750
+
14751
+
14752
+
14753
+
14754
+
14755
+
14756
+
14757
+ const PersonInfo = /*#__PURE__*/external_react_default().forwardRef(function PersonInfo({
14758
+ title,
14759
+ icon,
14760
+ value,
14761
+ badges,
14762
+ avatar,
14763
+ counterTooltip,
14764
+ attributes,
14765
+ description,
14766
+ styles,
14767
+ className,
14768
+ link,
14769
+ openLinkInNewTab,
14770
+ ...props
14771
+ }, ref) {
14772
+ return (0,jsx_runtime_namespaceObject.jsx)(PersonInfoBase, {
14773
+ ref: ref,
14774
+ className: className,
14775
+ ...props,
14776
+ children: (0,jsx_runtime_namespaceObject.jsxs)(PersonInfoHeader, {
14777
+ children: [icon && (0,jsx_runtime_namespaceObject.jsx)(PersonInfoIcon, {
14778
+ icon: icon
14779
+ }), (0,jsx_runtime_namespaceObject.jsxs)(styles_TitleWrapper, {
14780
+ children: [(0,jsx_runtime_namespaceObject.jsx)(Title, {
14781
+ css: styles?.title,
14782
+ children: title
14783
+ }), (0,jsx_runtime_namespaceObject.jsxs)(Row, {
14784
+ children: [(0,jsx_runtime_namespaceObject.jsx)(PersonInfoAvatar, {
14785
+ avatar: avatar,
14786
+ value: value,
14787
+ styles: styles,
14788
+ link: link,
14789
+ openLinkInNewTab: openLinkInNewTab
14790
+ }), counterTooltip && (0,jsx_runtime_namespaceObject.jsx)(PersonInfoCounter, {
14791
+ counterTooltip: counterTooltip,
14792
+ css: styles?.counter
14793
+ })]
14794
+ }), badges && (0,jsx_runtime_namespaceObject.jsx)(PersonInfoBadges, {
14795
+ badges: badges,
14796
+ styles: styles
14797
+ }), attributes && attributes.length > 0 && (0,jsx_runtime_namespaceObject.jsx)(AttributesList, {
14798
+ children: attributes.map((attr, index) => {
14799
+ if (typeof attr === 'string') {
14800
+ return (0,jsx_runtime_namespaceObject.jsx)(TextBase, {
14801
+ css: styles?.attributes,
14802
+ children: attr
14803
+ }, index);
14804
+ }
14805
+ return (0,jsx_runtime_namespaceObject.jsx)((external_react_default()).Fragment, {
14806
+ children: attr
14807
+ }, index);
14808
+ })
14809
+ }), description && (0,jsx_runtime_namespaceObject.jsx)(TextBase, {
14810
+ css: styles?.description,
14811
+ children: description
14812
+ })]
14813
+ })]
14814
+ })
14815
+ });
14816
+ });
14817
+ ;// ./src/components/PersonInfo/index.ts
14818
+
14819
+
14820
+ ;// ./src/components/DateRangePicker/constants.ts
14821
+ const constants_DEFAULT_MASK_FORMAT = 'mm/dd/yyyy';
14822
+ const DEFAULT_MONTH_MASK_FORMAT = 'mm/yyyy';
14823
+ const DEFAULT_YEAR_MASK_FORMAT = 'yyyy';
14824
+ const constants_DEFAULT_MASK = '__/__/____';
14825
+ const DEFAULT_MONTH_MASK = '__/____';
14826
+ const DEFAULT_YEAR_MASK = '____';
14827
+ const constants_MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
14828
+ const constants_DATE_MIN = '01/01/1900';
14829
+ const constants_DATE_MAX = '01/01/2150';
14830
+ const MONTH_DATE_MIN = '01/1900';
14831
+ const MONTH_DATE_MAX = '01/2150';
14832
+ const YEAR_DATE_MIN = '1900';
14833
+ const YEAR_DATE_MAX = '2150';
14834
+ const constants_OUT_OF_RANGE = 'The date is out of the defined range';
14835
+ const constants_INVALID_DATE = 'Invalid date';
14836
+ const FULL_DATE_LENGTH = 10;
14837
+ const FULL_MONTH_DATE_LENGTH = 7;
14838
+ const FULL_YEAR_DATE_LENGTH = 4;
14839
+ ;// ./src/components/DateRangePicker/utils/format.ts
14840
+
14841
+ const isMonthOnlyFormat = format => {
14842
+ if (!format) return false;
14843
+ const lowerFormat = format.toLowerCase();
14844
+ const hasMonth = lowerFormat.includes('mm');
14845
+ const hasYear = lowerFormat.includes('yyyy');
14846
+ const hasDay = lowerFormat.includes('dd');
14847
+ return hasMonth && hasYear && !hasDay;
14848
+ };
14849
+ const isYearOnlyFormat = format => {
14850
+ if (!format) return false;
14851
+ const lowerFormat = format.toLowerCase();
14852
+ const hasYear = lowerFormat.includes('yyyy');
14853
+ const hasMonth = lowerFormat.includes('mm');
14854
+ const hasDay = lowerFormat.includes('dd');
14855
+ return hasYear && !hasMonth && !hasDay;
14856
+ };
14857
+ const getExpectedDateLength = format => {
14858
+ if (!format) return FULL_DATE_LENGTH;
14859
+ if (isYearOnlyFormat(format)) {
14860
+ return FULL_YEAR_DATE_LENGTH;
14861
+ }
14862
+ if (isMonthOnlyFormat(format)) {
14863
+ return FULL_MONTH_DATE_LENGTH;
14864
+ }
14865
+ return FULL_DATE_LENGTH;
14866
+ };
14867
+ const getMaskForFormat = format => {
14868
+ if (isYearOnlyFormat(format)) {
14869
+ return DEFAULT_YEAR_MASK;
14870
+ }
14871
+ if (isMonthOnlyFormat(format)) {
14872
+ return DEFAULT_MONTH_MASK;
14873
+ }
14874
+ return constants_DEFAULT_MASK;
14875
+ };
14876
+ const getDefaultDateRange = format => {
14877
+ if (isYearOnlyFormat(format)) {
14878
+ return {
14879
+ defaultMin: YEAR_DATE_MIN,
14880
+ defaultMax: YEAR_DATE_MAX
14881
+ };
14882
+ }
14883
+ if (isMonthOnlyFormat(format)) {
14884
+ return {
14885
+ defaultMin: MONTH_DATE_MIN,
14886
+ defaultMax: MONTH_DATE_MAX
14122
14887
  };
14123
14888
  }
14124
14889
  return {
@@ -14263,8 +15028,8 @@ const styles_MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
14263
15028
  const TriggerWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
14264
15029
  target: "e19l41fq0"
14265
15030
  } : 0)( true ? {
14266
- name: "1utaypi",
14267
- styles: "padding:14px"
15031
+ name: "1h91tay",
15032
+ styles: "padding:14px;cursor:default"
14268
15033
  } : 0);
14269
15034
  ;// ./src/components/DateRangePicker/utils/dates.ts
14270
15035
 
@@ -14356,7 +15121,6 @@ const DateRangePickerContext = /*#__PURE__*/(0,external_react_namespaceObject.cr
14356
15121
  nameFrom: '',
14357
15122
  nameTo: '',
14358
15123
  maskOptions: {},
14359
- openCalendarMode: 'icon',
14360
15124
  inputFromRef: {
14361
15125
  current: null
14362
15126
  },
@@ -14385,9 +15149,6 @@ const DateRangePickerContext = /*#__PURE__*/(0,external_react_namespaceObject.cr
14385
15149
  day: 1
14386
15150
  }),
14387
15151
  currentIndex: 0,
14388
- handleSetIsOpen: () => {
14389
- // no-op
14390
- },
14391
15152
  handleToggleOpen: () => {
14392
15153
  // no-op
14393
15154
  },
@@ -14397,6 +15158,13 @@ const DateRangePickerContext = /*#__PURE__*/(0,external_react_namespaceObject.cr
14397
15158
  setCalendarType: () => {
14398
15159
  // no-op
14399
15160
  },
15161
+ rangeSelectionStep: null,
15162
+ setRangeSelectionStep: () => {
15163
+ // no-op
15164
+ },
15165
+ clearInputValue: () => {
15166
+ // no-op
15167
+ },
14400
15168
  setCalendarViewDateTime: () => {
14401
15169
  // no-op
14402
15170
  },
@@ -14405,7 +15173,8 @@ const DateRangePickerContext = /*#__PURE__*/(0,external_react_namespaceObject.cr
14405
15173
  },
14406
15174
  setLastFocusedElement: () => {
14407
15175
  // no-op
14408
- }
15176
+ },
15177
+ allowReverseSelection: false
14409
15178
  });
14410
15179
  ;// ./src/components/DateRangePicker/useDateRangePickerContext.tsx
14411
15180
 
@@ -14463,6 +15232,88 @@ const useRangeHighlighting = () => {
14463
15232
  hoveredDate
14464
15233
  };
14465
15234
  };
15235
+ ;// ./src/components/DateRangePicker/hooks/useRangeSelection.ts
15236
+
15237
+ const useRangeSelection = ({
15238
+ createNewDate,
15239
+ getComparisonFormat
15240
+ }) => {
15241
+ const {
15242
+ dateTime,
15243
+ calendarViewDateTime,
15244
+ setCalendarViewDateTime,
15245
+ setDateTime,
15246
+ setIsOpen,
15247
+ setLastFocusedElement,
15248
+ rangeSelectionStep,
15249
+ setRangeSelectionStep,
15250
+ clearInputValue,
15251
+ allowReverseSelection = false,
15252
+ onChange
15253
+ } = useDateRangePickerContext();
15254
+ const handleRangeSelect = selectedValue => {
15255
+ const newDate = createNewDate(selectedValue);
15256
+ if (!newDate) return;
15257
+
15258
+ // Range selection logic
15259
+ const isSelectingStart = rangeSelectionStep === 'start';
15260
+ if (isSelectingStart) {
15261
+ clearInputValue('to');
15262
+ setLastFocusedElement('to');
15263
+ setRangeSelectionStep('end');
15264
+ }
15265
+ let newDateTuple = isSelectingStart ? [newDate, undefined] : [dateTime[0], newDate];
15266
+ setCalendarViewDateTime(isSelectingStart ? [newDate, newDate] : [dateTime[0] ? calendarViewDateTime?.[0] : newDate, newDate]);
15267
+
15268
+ // Check if dates are in reverse order
15269
+ const isReversed = newDateTuple[0] && newDateTuple[1] && newDateTuple[0].toMillis() > newDateTuple[1].toMillis();
15270
+ if (isReversed) {
15271
+ if (allowReverseSelection) {
15272
+ // Auto-swap dates when reverse selection is allowed
15273
+ newDateTuple = [newDateTuple[1], newDateTuple[0]];
15274
+ } else if (!isSelectingStart) {
15275
+ // User selected an earlier date - update start date
15276
+ newDateTuple = [newDateTuple[1], undefined];
15277
+ setLastFocusedElement('to');
15278
+ setRangeSelectionStep('end');
15279
+ setCalendarViewDateTime([newDateTuple[0], newDateTuple[0]]);
15280
+ }
15281
+ }
15282
+ setDateTime(newDateTuple);
15283
+ const normalizeToMidnight = dt => dt.set({
15284
+ hour: 0,
15285
+ minute: 0,
15286
+ second: 0,
15287
+ millisecond: 0
15288
+ }).toJSDate();
15289
+
15290
+ // Call onChange when a date is selected from calendar
15291
+ if (isSelectingStart && newDateTuple[0]) {
15292
+ // First date selected
15293
+ onChange?.([normalizeToMidnight(newDateTuple[0]), null]);
15294
+ } else if (newDateTuple[0] && newDateTuple[1] && newDateTuple[0].toMillis() <= newDateTuple[1].toMillis()) {
15295
+ // Both dates selected and in correct order
15296
+ onChange?.([normalizeToMidnight(newDateTuple[0]), normalizeToMidnight(newDateTuple[1])]);
15297
+ setRangeSelectionStep(null);
15298
+ setIsOpen(false);
15299
+ }
15300
+ };
15301
+ const getDateSelectionState = currentDT => {
15302
+ const comparisonFormat = getComparisonFormat();
15303
+ const isCalendarFirstDateSelected = currentDT.toFormat(comparisonFormat) === dateTime[0]?.toFormat(comparisonFormat);
15304
+ const isCalendarSecondDateSelected = currentDT.toFormat(comparisonFormat) === dateTime[1]?.toFormat(comparisonFormat);
15305
+ const isCalendarDateSelected = isCalendarFirstDateSelected || isCalendarSecondDateSelected;
15306
+ return {
15307
+ isCalendarFirstDateSelected,
15308
+ isCalendarSecondDateSelected,
15309
+ isCalendarDateSelected
15310
+ };
15311
+ };
15312
+ return {
15313
+ handleRangeSelect,
15314
+ getDateSelectionState
15315
+ };
15316
+ };
14466
15317
  ;// ./src/components/DateRangePicker/components/DaysView.tsx
14467
15318
  function components_DaysView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
14468
15319
 
@@ -14489,15 +15340,9 @@ var components_DaysView_ref3 = true ? {
14489
15340
  const DaysView_DaysView = () => {
14490
15341
  const weekDays = dates_getWeekDays();
14491
15342
  const {
14492
- dateTime,
14493
- calendarViewDateTime,
14494
15343
  dateMinDT,
14495
15344
  dateMaxDT,
14496
- lastFocusedElement,
14497
- currentCalendarViewDT,
14498
- setCalendarViewDateTime,
14499
- setDateTime,
14500
- setIsOpen
15345
+ currentCalendarViewDT
14501
15346
  } = useDateRangePickerContext();
14502
15347
  const currentDate = currentCalendarViewDT.toJSDate();
14503
15348
  const currentMonth = currentDate?.getMonth();
@@ -14508,22 +15353,23 @@ const DaysView_DaysView = () => {
14508
15353
  getClassNames,
14509
15354
  isHighlightDate
14510
15355
  } = useRangeHighlighting();
15356
+ const {
15357
+ handleRangeSelect,
15358
+ getDateSelectionState
15359
+ } = useRangeSelection({
15360
+ createNewDate: selectedDay => currentCalendarViewDT.set({
15361
+ day: Number(selectedDay)
15362
+ }),
15363
+ getComparisonFormat: () => 'D'
15364
+ });
14511
15365
  const handleDaySelect = event => {
14512
15366
  const {
14513
15367
  target
14514
15368
  } = event;
14515
- const selectedDay = Number(target.innerHTML);
15369
+ const selectedDay = target.innerHTML;
14516
15370
  const isEnabled = target.getAttribute('aria-disabled') === 'false';
14517
15371
  if (isEnabled) {
14518
- const newDate = currentCalendarViewDT.set({
14519
- day: selectedDay
14520
- });
14521
- const newDateTuple = lastFocusedElement === 'from' ? [newDate, dateTime[1]] : [dateTime[0], newDate];
14522
- setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, dateTime[1] ? calendarViewDateTime?.[1] : newDate] : [dateTime[0] ? calendarViewDateTime?.[0] : newDate, newDate]);
14523
- setDateTime(newDateTuple);
14524
- if (newDateTuple[0] && newDateTuple[1]) {
14525
- setIsOpen(false);
14526
- }
15372
+ handleRangeSelect(selectedDay);
14527
15373
  }
14528
15374
  };
14529
15375
  return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
@@ -14537,16 +15383,18 @@ const DaysView_DaysView = () => {
14537
15383
  css: components_DaysView_ref3,
14538
15384
  onClick: handleDaySelect,
14539
15385
  children: dates.map((currentDate, index) => {
14540
- const currentDT = external_luxon_namespaceObject.DateTime.fromJSDate(currentDate);
15386
+ const currentDT = external_luxon_namespaceObject.DateTime.fromJSDate(currentDate).startOf('day');
14541
15387
  const calendarDate = currentDT.toFormat('D');
14542
15388
  const calendarDay = currentDate.getDate();
14543
15389
  const calendarMonth = currentDate.getMonth();
14544
15390
  const ariaLabel = currentDT.toLocaleString(external_luxon_namespaceObject.DateTime.DATE_HUGE);
14545
15391
  const isCalendarDateNow = nowDate === calendarDate;
14546
15392
  const isCalendarMonth = currentMonth === calendarMonth;
14547
- const isCalendarFirstDateSelected = calendarDate === dateTime[0]?.toFormat('D');
14548
- const isCalendarSecondDateSelected = calendarDate === dateTime[1]?.toFormat('D');
14549
- const isCalendarDateSelected = isCalendarFirstDateSelected || isCalendarSecondDateSelected;
15393
+ const {
15394
+ isCalendarFirstDateSelected,
15395
+ isCalendarSecondDateSelected,
15396
+ isCalendarDateSelected
15397
+ } = getDateSelectionState(currentDT);
14550
15398
  let isAriaDisabled = false;
14551
15399
  if (dateMinDT && dateMaxDT) {
14552
15400
  isAriaDisabled = currentDT < dateMinDT || currentDT > dateMaxDT || !isCalendarMonth;
@@ -14595,24 +15443,36 @@ var components_MonthsView_ref = true ? {
14595
15443
  } : 0;
14596
15444
  const MonthsView_MonthsView = () => {
14597
15445
  const {
14598
- dateTime,
14599
- calendarViewDateTime,
14600
15446
  dateMinDT,
14601
15447
  dateMaxDT,
14602
15448
  lastFocusedElement,
14603
15449
  currentCalendarViewDT,
15450
+ calendarViewDateTime,
14604
15451
  rangePickerType,
14605
15452
  setCalendarType,
14606
15453
  setCalendarViewDateTime,
14607
- onMonthChange,
14608
- setDateTime,
14609
- setIsOpen
15454
+ onMonthChange
14610
15455
  } = useDateRangePickerContext();
14611
15456
  const {
14612
15457
  handleDateHover,
14613
15458
  getClassNames,
14614
15459
  isHighlightDate
14615
15460
  } = useRangeHighlighting();
15461
+ const {
15462
+ handleRangeSelect,
15463
+ getDateSelectionState
15464
+ } = useRangeSelection({
15465
+ createNewDate: selectedMonth => {
15466
+ const monthNumber = constants_MONTHS.findIndex(month => month === selectedMonth);
15467
+ const newMonth = currentCalendarViewDT?.set({
15468
+ month: monthNumber + 1
15469
+ });
15470
+ return newMonth?.set({
15471
+ day: lastFocusedElement === 'from' ? 1 : newMonth.daysInMonth
15472
+ });
15473
+ },
15474
+ getComparisonFormat: () => 'yyyy-MM'
15475
+ });
14616
15476
  const handleMonthSelect = event => {
14617
15477
  const {
14618
15478
  target
@@ -14623,29 +15483,20 @@ const MonthsView_MonthsView = () => {
14623
15483
  return;
14624
15484
  }
14625
15485
  const selectedMonth = target.innerHTML;
14626
- const monthNumber = constants_MONTHS.findIndex(month => month === selectedMonth);
14627
15486
  if (rangePickerType === 'days') {
15487
+ // Navigation case: selecting month navigates to days view
15488
+ const monthNumber = constants_MONTHS.findIndex(month => month === selectedMonth);
14628
15489
  const newDate = currentCalendarViewDT?.set({
14629
15490
  month: monthNumber + 1
14630
15491
  });
14631
- setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, calendarViewDateTime[1]] : [calendarViewDateTime[0], newDate]);
14632
15492
  if (newDate) {
15493
+ setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, calendarViewDateTime[1]] : [calendarViewDateTime[0], newDate]);
14633
15494
  onMonthChange?.(newDate.toJSDate());
15495
+ setCalendarType('days');
14634
15496
  }
14635
- setCalendarType('days');
14636
15497
  } else {
14637
- const newMonth = currentCalendarViewDT?.set({
14638
- month: monthNumber + 1
14639
- });
14640
- const newDate = newMonth?.set({
14641
- day: lastFocusedElement === 'from' ? 1 : newMonth.daysInMonth
14642
- });
14643
- const newDateTuple = lastFocusedElement === 'from' ? [newDate, dateTime[1]] : [dateTime[0], newDate];
14644
- setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, dateTime[1] ? calendarViewDateTime?.[1] : newDate] : [dateTime[0] ? calendarViewDateTime?.[0] : newDate, newDate]);
14645
- setDateTime(newDateTuple);
14646
- if (newDateTuple[0] && newDateTuple[1]) {
14647
- setIsOpen(false);
14648
- }
15498
+ // Range selection case: selecting month completes the range
15499
+ handleRangeSelect(selectedMonth);
14649
15500
  }
14650
15501
  };
14651
15502
  return (0,jsx_runtime_namespaceObject.jsx)(DatesListWrapper, {
@@ -14660,8 +15511,10 @@ const MonthsView_MonthsView = () => {
14660
15511
  const isMinMonthReached = dateMinDT ? currentMonthDT.month < dateMinDT.month && currentMonthDT.year === dateMinDT.year : false;
14661
15512
  const isMaxMonthReached = dateMaxDT ? currentMonthDT.month > dateMaxDT.month && currentMonthDT.year === dateMaxDT.year : false;
14662
15513
  const isAriaDisabled = isMinMonthReached || isMaxMonthReached;
14663
- const isCalendarFirstDateSelected = currentMonthDT.toFormat('yyyy-MM') === dateTime[0]?.toFormat('yyyy-MM');
14664
- const isCalendarSecondDateSelected = currentMonthDT.toFormat('yyyy-MM') === dateTime[1]?.toFormat('yyyy-MM');
15514
+ const {
15515
+ isCalendarFirstDateSelected,
15516
+ isCalendarSecondDateSelected
15517
+ } = getDateSelectionState(currentMonthDT);
14665
15518
  const classNames = getClassNames(currentMonthDT, {
14666
15519
  isCalendarFirstDateSelected,
14667
15520
  isCalendarSecondDateSelected
@@ -14697,7 +15550,6 @@ var components_YearsView_ref = true ? {
14697
15550
  const YearsView_YearsView = () => {
14698
15551
  const {
14699
15552
  rangePickerType,
14700
- dateTime,
14701
15553
  calendarViewDateTime,
14702
15554
  currentCalendarViewDT,
14703
15555
  dateMinParts,
@@ -14706,20 +15558,36 @@ const YearsView_YearsView = () => {
14706
15558
  lastFocusedElement,
14707
15559
  setCalendarType,
14708
15560
  setCalendarViewDateTime,
14709
- onYearChange,
14710
- setDateTime,
14711
- setIsOpen
15561
+ onYearChange
14712
15562
  } = useDateRangePickerContext();
14713
15563
  const wrapper = (0,external_react_namespaceObject.useRef)(null);
14714
15564
  const yearsList = dates_getYearsList({
14715
15565
  yearsFrom: dateMinParts[formatIndexes['year']],
14716
15566
  yearsCount: dateMaxParts[formatIndexes['year']] - dateMinParts[formatIndexes['year']] + 1
14717
15567
  });
14718
- const {
14719
- handleDateHover,
14720
- getClassNames,
14721
- isHighlightDate
14722
- } = useRangeHighlighting();
15568
+ const {
15569
+ handleDateHover,
15570
+ getClassNames,
15571
+ isHighlightDate
15572
+ } = useRangeHighlighting();
15573
+ const {
15574
+ handleRangeSelect,
15575
+ getDateSelectionState
15576
+ } = useRangeSelection({
15577
+ createNewDate: selectedYear => {
15578
+ const newYear = currentCalendarViewDT?.set({
15579
+ year: Number(selectedYear)
15580
+ });
15581
+ return newYear?.set(lastFocusedElement === 'from' ? {
15582
+ day: 1,
15583
+ month: 1
15584
+ } : {
15585
+ day: 31,
15586
+ month: 12
15587
+ });
15588
+ },
15589
+ getComparisonFormat: () => 'yyyy'
15590
+ });
14723
15591
  (0,external_react_namespaceObject.useEffect)(() => {
14724
15592
  if (currentCalendarViewDT && wrapper.current) {
14725
15593
  wrapper.current.querySelector('[aria-current=date]')?.scrollIntoView({
@@ -14727,15 +15595,16 @@ const YearsView_YearsView = () => {
14727
15595
  block: 'center'
14728
15596
  });
14729
15597
  }
14730
- }, [calendarViewDateTime, lastFocusedElement]);
15598
+ }, [calendarViewDateTime, lastFocusedElement, currentCalendarViewDT]);
14731
15599
  const handleYearSelect = event => {
14732
15600
  const {
14733
15601
  target
14734
15602
  } = event;
14735
- const selectedYear = Number(target.innerHTML);
15603
+ const selectedYear = target.innerHTML;
14736
15604
  if (rangePickerType !== 'years') {
15605
+ // Navigation case: selecting year navigates to months view
14737
15606
  const newDate = currentCalendarViewDT.set({
14738
- year: selectedYear
15607
+ year: Number(selectedYear)
14739
15608
  });
14740
15609
  setCalendarType('months');
14741
15610
  setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, calendarViewDateTime[1]] : [calendarViewDateTime[0], newDate]);
@@ -14743,22 +15612,8 @@ const YearsView_YearsView = () => {
14743
15612
  onYearChange?.(newDate.toJSDate());
14744
15613
  }
14745
15614
  } else {
14746
- const newYear = currentCalendarViewDT?.set({
14747
- year: selectedYear
14748
- });
14749
- const newDate = newYear?.set(lastFocusedElement === 'from' ? {
14750
- day: 1,
14751
- month: 1
14752
- } : {
14753
- day: 31,
14754
- month: 12
14755
- });
14756
- const newDateTuple = lastFocusedElement === 'from' ? [newDate, dateTime[1]] : [dateTime[0], newDate];
14757
- setCalendarViewDateTime(lastFocusedElement === 'from' ? [newDate, dateTime[1] ? calendarViewDateTime?.[1] : newDate] : [dateTime[0] ? calendarViewDateTime?.[0] : newDate, newDate]);
14758
- setDateTime(newDateTuple);
14759
- if (newDateTuple[0] && newDateTuple[1]) {
14760
- setIsOpen(false);
14761
- }
15615
+ // Range selection case: selecting year completes the range
15616
+ handleRangeSelect(selectedYear);
14762
15617
  }
14763
15618
  };
14764
15619
  return (0,jsx_runtime_namespaceObject.jsx)(DatesListWrapper, {
@@ -14776,8 +15631,10 @@ const YearsView_YearsView = () => {
14776
15631
  if (isCalendarYear) {
14777
15632
  additionalProps['aria-current'] = 'date';
14778
15633
  }
14779
- const isCalendarFirstDateSelected = year.toString() === dateTime[0]?.toFormat('yyyy');
14780
- const isCalendarSecondDateSelected = year.toString() === dateTime[1]?.toFormat('yyyy');
15634
+ const {
15635
+ isCalendarFirstDateSelected,
15636
+ isCalendarSecondDateSelected
15637
+ } = getDateSelectionState(currentYearDT);
14781
15638
  const classNames = getClassNames(currentYearDT, {
14782
15639
  isCalendarFirstDateSelected,
14783
15640
  isCalendarSecondDateSelected
@@ -15117,24 +15974,9 @@ function TriggerInput_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried
15117
15974
 
15118
15975
 
15119
15976
 
15120
- const WithTriggerPopover = ({
15121
- isEnabled,
15122
- children
15123
- }) => {
15124
- return isEnabled ? (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
15125
- asChild: true,
15126
- children: /*#__PURE__*/external_react_default().cloneElement(children, {
15127
- ...children.props
15128
- })
15129
- }) : (/*#__PURE__*/external_react_default().cloneElement(children, {
15130
- ...children.props
15131
- }));
15132
- };
15133
15977
  const TriggerInput = ({
15134
15978
  datepickerType,
15135
- withPopover = false,
15136
- className,
15137
- onClick
15979
+ className
15138
15980
  }) => {
15139
15981
  const {
15140
15982
  format,
@@ -15147,7 +15989,9 @@ const TriggerInput = ({
15147
15989
  messages,
15148
15990
  setLastFocusedElement,
15149
15991
  classNames,
15150
- onBlur: handleBlur
15992
+ onBlur: handleBlur,
15993
+ isOpen,
15994
+ setIsOpen
15151
15995
  } = useDateRangePickerContext();
15152
15996
  const formContext = (0,external_react_hook_form_namespaceObject.useFormContext)(); // Using FormProvider from react-hook-form
15153
15997
  const useFormResult = (0,external_react_hook_form_namespaceObject.useForm)();
@@ -15169,42 +16013,55 @@ const TriggerInput = ({
15169
16013
  setLastFocusedElement(datepickerType);
15170
16014
  inputProps?.inputProps?.onFocus?.(e);
15171
16015
  };
15172
- const handleOpen = event => {
15173
- onClick?.(event);
15174
- };
15175
- return (0,jsx_runtime_namespaceObject.jsx)(WithTriggerPopover, {
15176
- isEnabled: withPopover,
15177
- children: (0,jsx_runtime_namespaceObject.jsx)(Input_Input, {
15178
- name: currentName,
15179
- placeholder: format,
15180
- ref: datepickerType === 'from' ? inputFromRef : inputToRef,
15181
- disabled: disabled,
15182
- register: register,
15183
- className: className,
15184
- wrapperClassName: /*#__PURE__*/(0,css_namespaceObject.css)("display:flex;padding-left:", datepickerType === 'from' ? 0 : 14, "px;" + ( true ? "" : 0), true ? "" : 0),
15185
- inputProps: {
15186
- onBlur: handleBlur,
15187
- onClick: handleOpen,
15188
- onFocus: handleFocus,
15189
- id: inputProps?.inputProps?.id || currentName,
15190
- 'data-testid': `daterangepicker-input-${datepickerType}`,
15191
- autoComplete: 'off',
15192
- className: [/*#__PURE__*/(0,css_namespaceObject.css)( true ? {
15193
- name: "15obm9d",
15194
- styles: "border:none!important;height:auto!important;padding:0!important;min-width:75px;line-height:16px;max-height:16px;letter-spacing:0.8px;border-radius:0!important;&::placeholder{letter-spacing:normal;}"
15195
- } : 0), datepickerType === 'from' ? classNames?.trigger?.inputFrom : classNames?.trigger?.inputTo].filter(Boolean).join(' '),
15196
- ...inputElementProps
16016
+ return (0,jsx_runtime_namespaceObject.jsx)(Input_Input, {
16017
+ name: currentName,
16018
+ placeholder: format,
16019
+ ref: datepickerType === 'from' ? inputFromRef : inputToRef,
16020
+ disabled: disabled,
16021
+ register: register,
16022
+ className: className,
16023
+ wrapperClassName: /*#__PURE__*/(0,css_namespaceObject.css)("display:flex;padding-left:", datepickerType === 'from' ? 0 : 14, "px;" + ( true ? "" : 0), true ? "" : 0),
16024
+ inputProps: {
16025
+ onBlur: handleBlur,
16026
+ onFocus: handleFocus,
16027
+ onClick: e => {
16028
+ if (isOpen) {
16029
+ setIsOpen(false);
16030
+ }
16031
+ inputProps?.inputProps?.onClick?.(e);
15197
16032
  },
15198
- showStatusIcon: false,
15199
- errors: fieldError,
15200
- status: fieldStatus,
15201
- helperText: fieldStatus === 'basic' ? messages?.description : messages?.error,
15202
- helperClassName: /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
15203
- name: "lhoo11",
15204
- styles: "&>span::first-letter{text-transform:uppercase;}"
15205
- } : 0),
15206
- ...restInputProps
15207
- })
16033
+ onKeyDown: e => {
16034
+ inputProps?.inputProps?.onKeyDown?.(e);
16035
+ },
16036
+ onBeforeInput: e => {
16037
+ // pass-through
16038
+ inputProps?.inputProps?.onBeforeInput?.(e);
16039
+ },
16040
+ onInput: e => {
16041
+ // pass-through
16042
+ inputProps?.inputProps?.onInput?.(e);
16043
+ },
16044
+ onChange: e => {
16045
+ inputProps?.inputProps?.onChange?.(e);
16046
+ },
16047
+ id: inputProps?.inputProps?.id || currentName,
16048
+ 'data-testid': `daterangepicker-input-${datepickerType}`,
16049
+ autoComplete: 'off',
16050
+ className: [/*#__PURE__*/(0,css_namespaceObject.css)( true ? {
16051
+ name: "15obm9d",
16052
+ styles: "border:none!important;height:auto!important;padding:0!important;min-width:75px;line-height:16px;max-height:16px;letter-spacing:0.8px;border-radius:0!important;&::placeholder{letter-spacing:normal;}"
16053
+ } : 0), datepickerType === 'from' ? classNames?.trigger?.inputFrom : classNames?.trigger?.inputTo].filter(Boolean).join(' '),
16054
+ ...inputElementProps
16055
+ },
16056
+ showStatusIcon: false,
16057
+ errors: fieldError,
16058
+ status: fieldStatus,
16059
+ helperText: fieldStatus === 'basic' ? messages?.description : messages?.error,
16060
+ helperClassName: /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
16061
+ name: "lhoo11",
16062
+ styles: "&>span::first-letter{text-transform:uppercase;}"
16063
+ } : 0),
16064
+ ...restInputProps
15208
16065
  });
15209
16066
  };
15210
16067
  ;// ./src/components/Field/FieldDescription.tsx
@@ -15304,8 +16161,8 @@ function Trigger_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to st
15304
16161
 
15305
16162
 
15306
16163
  var Trigger_ref = true ? {
15307
- name: "1ldd2k6",
15308
- styles: "margin:0 3px"
16164
+ name: "cx8u11",
16165
+ styles: "margin:0 3px;cursor:pointer"
15309
16166
  } : 0;
15310
16167
  const Trigger = () => {
15311
16168
  const {
@@ -15315,7 +16172,6 @@ const Trigger = () => {
15315
16172
  lastFocusedElement,
15316
16173
  disabled,
15317
16174
  status,
15318
- openCalendarMode,
15319
16175
  isOpen,
15320
16176
  showCalendarIcon,
15321
16177
  showStatusArea,
@@ -15348,49 +16204,46 @@ const Trigger = () => {
15348
16204
  ref: wrapperRef,
15349
16205
  className: classNames?.trigger?.controlsWrapper,
15350
16206
  children: [(0,jsx_runtime_namespaceObject.jsx)(TriggerInput, {
15351
- withPopover: true,
15352
16207
  datepickerType: "from",
15353
- className: classNames?.trigger?.inputFrom,
15354
- onClick: () => {
15355
- if (!isOpen) {
15356
- setIsOpen(true);
15357
- }
15358
- }
16208
+ className: classNames?.trigger?.inputFrom
15359
16209
  }), (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
15360
16210
  name: "carrot-right",
15361
16211
  size: 16,
15362
16212
  color: disabled ? theme.colors.grey : theme.colors.greyDarker,
15363
16213
  className: classNames?.trigger?.arrowIcon,
16214
+ onClick: () => {
16215
+ if (isOpen) {
16216
+ setIsOpen(false);
16217
+ }
16218
+ },
15364
16219
  css: Trigger_ref
15365
16220
  }), (0,jsx_runtime_namespaceObject.jsx)(TriggerInput, {
15366
16221
  datepickerType: "to",
15367
- className: classNames?.trigger?.inputTo,
15368
- onClick: () => {
15369
- if (!isOpen) {
15370
- setIsOpen(true);
15371
- }
15372
- }
15373
- }), showCalendarIcon && (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
15374
- endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
15375
- name: "calendar",
15376
- size: 16,
15377
- color: disabled ? theme.colors.grey : theme.colors.greyDarker
15378
- }),
15379
- "data-testid": 'daterangepicker-button',
15380
- onClick: handleToggleOpen,
15381
- variant: "tertiary",
15382
- "aria-label": "Calendar",
15383
- isDisabled: disabled,
15384
- className: classNames?.trigger?.calendarIcon,
15385
- css: /*#__PURE__*/(0,react_namespaceObject.css)({
15386
- padding: 0,
15387
- margin: '0 0 0 10px',
15388
- height: 'auto',
15389
- cursor: openCalendarMode === 'input' || disabled ? 'default' : 'pointer',
15390
- '&:focus::before': {
15391
- display: 'none'
15392
- }
15393
- }, true ? "" : 0, true ? "" : 0)
16222
+ className: classNames?.trigger?.inputTo
16223
+ }), showCalendarIcon && (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
16224
+ asChild: true,
16225
+ children: (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
16226
+ endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
16227
+ name: "calendar",
16228
+ size: 16,
16229
+ color: disabled ? theme.colors.grey : theme.colors.greyDarker
16230
+ }),
16231
+ "data-testid": 'daterangepicker-button',
16232
+ onClick: handleToggleOpen,
16233
+ variant: "tertiary",
16234
+ "aria-label": "Calendar",
16235
+ isDisabled: disabled,
16236
+ className: classNames?.trigger?.calendarIcon,
16237
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
16238
+ padding: 0,
16239
+ margin: '0 0 0 10px',
16240
+ height: 'auto',
16241
+ cursor: disabled ? 'default' : 'pointer',
16242
+ '&:focus::before': {
16243
+ display: 'none'
16244
+ }
16245
+ }, true ? "" : 0, true ? "" : 0)
16246
+ })
15394
16247
  })]
15395
16248
  })
15396
16249
  }), showStatusArea && (0,jsx_runtime_namespaceObject.jsx)(TriggerStatusArea, {})]
@@ -15415,12 +16268,8 @@ const Content_DatePickerContent = () => {
15415
16268
  };
15416
16269
  ;// ./src/components/DateRangePicker/hooks/useDatePickerMask.tsx
15417
16270
 
15418
-
15419
16271
  const useDatePickerMask_useDatePickerMask = ({
15420
- maskOptions,
15421
- formatIndexes,
15422
- dateMinParts,
15423
- dateMaxParts
16272
+ maskOptions
15424
16273
  }) => {
15425
16274
  const {
15426
16275
  mask,
@@ -15433,28 +16282,13 @@ const useDatePickerMask_useDatePickerMask = ({
15433
16282
  mask,
15434
16283
  replacement,
15435
16284
  track: ({
15436
- data,
15437
- selectionStart,
15438
- selectionEnd,
15439
- value: currentValue
16285
+ data
15440
16286
  }) => {
15441
- const isDateMask = typeof mask === 'string' && /^[_/]+$/.test(mask);
15442
- if (isDateMask) {
15443
- const newValue = currentValue.slice(0, selectionStart) + data + currentValue.slice(selectionEnd);
15444
- const updatedValue = (0,mask_namespaceObject.format)(newValue, {
15445
- mask,
15446
- replacement
15447
- });
15448
- const splittedValue = updatedValue.split('/');
15449
- const isChecked = dates_processDate({
15450
- day: splittedValue[formatIndexes['day']],
15451
- month: splittedValue[formatIndexes['month']],
15452
- year: splittedValue[formatIndexes['year']]
15453
- }, dateMinParts[formatIndexes['year']], dateMaxParts[formatIndexes['year']]);
15454
- return isChecked ? data : '';
15455
- } else {
15456
- return data;
15457
- }
16287
+ // The mask should only format input, not validate it
16288
+ // Validation happens on blur in useDateRangePicker.handleBlur
16289
+ // This allows users to freely type and edit dates without blocking
16290
+ // Return data as-is (string for insertions, null/undefined for deletions)
16291
+ return data;
15458
16292
  },
15459
16293
  ...restMaskOptions
15460
16294
  });
@@ -15496,15 +16330,12 @@ const useDateRangePicker = ({
15496
16330
  const [isOpen, setIsOpen] = (0,external_react_namespaceObject.useState)(isOpenState);
15497
16331
  const [status, setStatus] = (0,external_react_namespaceObject.useState)(rest.status);
15498
16332
  const previousOpenState = (0,external_react_namespaceObject.useRef)(isOpenState);
15499
- const handleSetIsOpen = open => {
15500
- setIsOpen(open);
15501
- };
16333
+ const previousDateTime = (0,external_react_namespaceObject.useRef)([undefined, undefined]);
16334
+ const defaultValueProcessed = (0,external_react_namespaceObject.useRef)(false);
15502
16335
  const {
15503
16336
  clearErrors,
15504
16337
  setError,
15505
- setValue,
15506
- resetField,
15507
- setFocus
16338
+ setValue
15508
16339
  } = (0,external_react_hook_form_namespaceObject.useFormContext)();
15509
16340
  const nameFrom = `${_name}From`;
15510
16341
  const nameTo = `${_name}To`;
@@ -15518,7 +16349,6 @@ const useDateRangePicker = ({
15518
16349
  const [lastChangedDate, setLastChangedDate] = (0,external_react_namespaceObject.useState)([undefined, undefined]);
15519
16350
  const [lastFocusedElement, setLastFocusedElement] = (0,external_react_namespaceObject.useState)('from');
15520
16351
  const currentIndex = lastFocusedElement === 'from' ? 0 : 1;
15521
- const currentName = lastFocusedElement === 'from' ? nameFrom : nameTo;
15522
16352
  const [dateTimeForChangeEvent, setDateTimeForChangeEvent] = (0,external_react_namespaceObject.useState)(undefined);
15523
16353
  const [currentError, setCurrentError] = (0,external_react_namespaceObject.useState)({
15524
16354
  date: null,
@@ -15531,6 +16361,7 @@ const useDateRangePicker = ({
15531
16361
  year: splittedFormat.findIndex(item => item === 'yyyy')
15532
16362
  });
15533
16363
  const [calendarType, setCalendarType] = (0,external_react_namespaceObject.useState)(rangePickerType);
16364
+ const [rangeSelectionStep, setRangeSelectionStep] = (0,external_react_namespaceObject.useState)(null);
15534
16365
  const [calendarViewDateTime, setCalendarViewDateTime] = (0,external_react_namespaceObject.useState)([undefined, undefined]);
15535
16366
  const currentCalendarViewDT = calendarViewDateTime[currentIndex] || external_luxon_namespaceObject.DateTime.now().set({
15536
16367
  day: 1
@@ -15540,14 +16371,18 @@ const useDateRangePicker = ({
15540
16371
  const dateMinParts = finalDateMin.split('/').map(Number);
15541
16372
  const dateMaxParts = finalDateMax.split('/').map(Number);
15542
16373
  const defaultMask = getMaskForFormat(format);
15543
- const maskInputRef = useDatePickerMask_useDatePickerMask({
16374
+ // separate mask refs per input to prevent focus/typing conflicts
16375
+ const maskInputRefFrom = useDatePickerMask_useDatePickerMask({
15544
16376
  maskOptions: {
15545
16377
  mask: defaultMask,
15546
- ...maskOptions
15547
- },
15548
- dateMaxParts,
15549
- dateMinParts,
15550
- formatIndexes
16378
+ ...(maskOptions || {})
16379
+ }
16380
+ });
16381
+ const maskInputRefTo = useDatePickerMask_useDatePickerMask({
16382
+ maskOptions: {
16383
+ mask: defaultMask,
16384
+ ...(maskOptions || {})
16385
+ }
15551
16386
  });
15552
16387
  const dateMaxDT = external_luxon_namespaceObject.DateTime.fromObject({
15553
16388
  year: dateMaxParts[formatIndexes['year']],
@@ -15601,7 +16436,7 @@ const useDateRangePicker = ({
15601
16436
  setError(currentName, {
15602
16437
  message: errorMessage
15603
16438
  }, {
15604
- shouldFocus: true
16439
+ shouldFocus: false
15605
16440
  });
15606
16441
  setStatus('error');
15607
16442
  setDateTime(newDateTimeIfInvalid);
@@ -15613,7 +16448,7 @@ const useDateRangePicker = ({
15613
16448
  setError(currentName, {
15614
16449
  message: errorMessage
15615
16450
  }, {
15616
- shouldFocus: true
16451
+ shouldFocus: false
15617
16452
  });
15618
16453
  setStatus('error');
15619
16454
  setDateTime(newDateTimeIfInvalid);
@@ -15621,6 +16456,33 @@ const useDateRangePicker = ({
15621
16456
  safeOnChange();
15622
16457
  } else {
15623
16458
  setDateTime(newDateTimeIfValid);
16459
+ // Update calendar view to reflect the manually entered date
16460
+ let adjustedDateTime = newDateTime.startOf('day');
16461
+ if (adjustedDateTime < dateMinDT) {
16462
+ const {
16463
+ year,
16464
+ month,
16465
+ day
16466
+ } = dateMinDT;
16467
+ adjustedDateTime = adjustedDateTime.set({
16468
+ year,
16469
+ month,
16470
+ day
16471
+ });
16472
+ }
16473
+ if (adjustedDateTime > dateMaxDT) {
16474
+ const {
16475
+ year,
16476
+ month,
16477
+ day
16478
+ } = dateMaxDT;
16479
+ adjustedDateTime = adjustedDateTime.set({
16480
+ year,
16481
+ month,
16482
+ day
16483
+ });
16484
+ }
16485
+ setCalendarViewDateTime(currentElementType === 'from' ? [adjustedDateTime, calendarViewDateTime[1] || adjustedDateTime] : [calendarViewDateTime[0] || adjustedDateTime, adjustedDateTime]);
15624
16486
  clearErrors();
15625
16487
  setStatus('basic');
15626
16488
  safeOnError?.(null);
@@ -15629,26 +16491,35 @@ const useDateRangePicker = ({
15629
16491
  }
15630
16492
  };
15631
16493
  const handleBlur = event => {
15632
- event.preventDefault();
15633
16494
  const blurredValue = event.currentTarget.value;
16495
+ const fieldName = event.currentTarget.name;
16496
+ const isFromField = fieldName === nameFrom;
15634
16497
  if (blurredValue.length > 0) {
15635
- processValue(blurredValue);
16498
+ processValue(blurredValue, isFromField ? 'from' : 'to');
16499
+ } else {
16500
+ // User cleared the field - clear the corresponding dateTime
16501
+ setDateTime(prev => isFromField ? [undefined, prev[1]] : [prev[0], undefined]);
16502
+ setLastChangedDate(prev => isFromField ? [undefined, prev[1]] : [prev[0], undefined]);
16503
+ setValue(fieldName, undefined);
16504
+ clearErrors(fieldName);
15636
16505
  }
15637
16506
  };
15638
16507
  const processInputValue = (inputValue, elementName) => {
15639
16508
  const currentElementType = elementName || lastFocusedElement;
15640
16509
  const currentName = currentElementType === 'from' ? nameFrom : nameTo;
16510
+ const currentWatchedValue = currentElementType === 'from' ? inputValueFrom : inputValueTo;
15641
16511
  if (typeof inputValue === 'string' && inputValue.length && inputValue.length < expectedDateLength) {
15642
16512
  setIsOpen(false);
15643
- setTimeout(() => {
15644
- maskInputRef.current.focus();
15645
- }, 10);
15646
16513
  }
15647
16514
  let newDateTime;
15648
16515
  if (typeof inputValue === 'string' && inputValue.length === expectedDateLength) {
15649
16516
  newDateTime = external_luxon_namespaceObject.DateTime.fromFormat(inputValue, luxonFormat);
15650
- setValue(currentName, inputValue);
15651
- processValue(inputValue, elementName);
16517
+ // Avoid redundant setValue to prevent React Hook Form update loops
16518
+ if (currentWatchedValue !== inputValue) {
16519
+ setValue(currentName, inputValue);
16520
+ }
16521
+ // Do NOT validate immediately here to avoid blocking mid-edit scenarios and feedback loops.
16522
+ // Validation will happen on blur explicitly.
15652
16523
  }
15653
16524
  const newCalendarViewDateTime = newDateTime && newDateTime.isValid ? newDateTime : undefined;
15654
16525
  if (newCalendarViewDateTime) {
@@ -15696,56 +16567,95 @@ const useDateRangePicker = ({
15696
16567
  }
15697
16568
  }, [inputValueTo]);
15698
16569
  (0,external_react_namespaceObject.useEffect)(() => {
15699
- const currentIndex = lastFocusedElement === 'from' ? 0 : 1;
15700
- const currentInputValue = currentIndex === 0 ? inputValueFrom : inputValueTo;
15701
- if (dateTime?.[currentIndex]) {
15702
- const newValue = dateTime[currentIndex].toFormat(luxonFormat);
15703
- if (currentInputValue !== newValue) {
15704
- setValue(currentName, newValue);
16570
+ // Only sync when dateTime actually changes (from calendar selection or programmatic change)
16571
+ // Don't sync when only inputValue changes (user typing)
16572
+ const dateTimeChanged = previousDateTime.current[0]?.toMillis() !== dateTime[0]?.toMillis() || previousDateTime.current[1]?.toMillis() !== dateTime[1]?.toMillis();
16573
+
16574
+ // Initialize on first run
16575
+ if (previousDateTime.current[0] === undefined && previousDateTime.current[1] === undefined && (dateTime[0] !== undefined || dateTime[1] !== undefined)) {
16576
+ previousDateTime.current = [dateTime[0], dateTime[1]];
16577
+ // Continue to sync on initialization
16578
+ } else if (!dateTimeChanged) {
16579
+ // dateTime hasn't changed, don't sync (user is typing)
16580
+ return;
16581
+ } else {
16582
+ // Update previous dateTime
16583
+ previousDateTime.current = [dateTime[0], dateTime[1]];
16584
+ }
16585
+ const nextFromValue = dateTime[0]?.toFormat(luxonFormat);
16586
+ if (nextFromValue) {
16587
+ // Sync dateTime to form when dateTime changed (calendar selection)
16588
+ // Don't overwrite if user is actively typing (input is focused and partial)
16589
+ const isInputFocused = inputFromRef.current && document.activeElement === inputFromRef.current || inputToRef.current && document.activeElement === inputToRef.current;
16590
+ if (!inputValueFrom) {
16591
+ // Input is empty - sync from dateTime
16592
+ setValue(nameFrom, nextFromValue);
16593
+ } else if (inputValueFrom === nextFromValue) {
16594
+ // Already in sync - no action needed
16595
+ } else if (inputValueFrom.length < expectedDateLength && isInputFocused) {
16596
+ // User is actively typing partial input - don't overwrite
16597
+ } else {
16598
+ // dateTime changed (calendar selection) - sync to form
16599
+ setValue(nameFrom, nextFromValue);
15705
16600
  }
15706
16601
  }
15707
- }, [dateTime, lastFocusedElement, currentName]);
16602
+ const nextToValue = dateTime[1]?.toFormat(luxonFormat);
16603
+ if (nextToValue) {
16604
+ // Sync dateTime to form when dateTime changed (calendar selection)
16605
+ // Don't overwrite if user is actively typing (input is focused and partial)
16606
+ const isInputFocused = inputFromRef.current && document.activeElement === inputFromRef.current || inputToRef.current && document.activeElement === inputToRef.current;
16607
+ if (!inputValueTo) {
16608
+ // Input is empty - sync from dateTime
16609
+ setValue(nameTo, nextToValue);
16610
+ } else if (inputValueTo === nextToValue) {
16611
+ // Already in sync - no action needed
16612
+ } else if (inputValueTo.length < expectedDateLength && isInputFocused) {
16613
+ // User is actively typing partial input - don't overwrite
16614
+ } else {
16615
+ // dateTime changed (calendar selection) - sync to form
16616
+ setValue(nameTo, nextToValue);
16617
+ }
16618
+ }
16619
+ }, [dateTime, inputValueFrom, inputValueTo, luxonFormat, nameFrom, nameTo, setValue, expectedDateLength, inputFromRef, inputToRef]);
15708
16620
  (0,external_react_namespaceObject.useEffect)(() => {
15709
16621
  if (dateTime[0] && dateTime[1] && dateTime[0] > dateTime[1]) {
16622
+ // When dates are in reverse order, swap them silently
16623
+ // Calendar only opens via user click on icon button, not automatically
15710
16624
  if (lastFocusedElement === 'from') {
15711
- resetField(nameTo);
15712
16625
  setDateTime([dateTime[0], undefined]);
15713
16626
  setLastChangedDate([dateTime[0].toJSDate(), undefined]);
15714
16627
  setValue(nameTo, undefined);
15715
- setLastFocusedElement('to');
15716
- setTimeout(() => {
15717
- setFocus(nameTo, {
15718
- shouldSelect: true
15719
- });
15720
- }, 50);
15721
- setIsOpen(true);
15722
16628
  } else {
15723
- resetField(nameFrom);
15724
16629
  setDateTime([undefined, dateTime[1]]);
15725
16630
  setLastChangedDate([undefined, dateTime[1].toJSDate()]);
15726
16631
  setValue(nameFrom, undefined);
15727
- setLastFocusedElement('from');
15728
- setTimeout(() => {
15729
- setFocus(nameFrom, {
15730
- shouldSelect: true
15731
- });
15732
- }, 50);
15733
- setIsOpen(true);
15734
16632
  }
15735
16633
  }
15736
- }, [dateTime]);
16634
+ }, [dateTime, lastFocusedElement, nameFrom, nameTo, setValue]);
15737
16635
  (0,external_react_namespaceObject.useEffect)(() => {
15738
16636
  if (previousOpenState.current !== isOpen) {
15739
16637
  if (isOpen) {
15740
16638
  onOpen?.();
16639
+ setRangeSelectionStep('start');
16640
+ setLastFocusedElement('from');
16641
+ // Sync calendar view with current dateTime when opening
16642
+ // This ensures preselected dates are visible in the calendar
16643
+ if (dateTime[0] || dateTime[1]) {
16644
+ setCalendarViewDateTime([dateTime[0] || dateTime[1] || external_luxon_namespaceObject.DateTime.now().set({
16645
+ day: 1
16646
+ }), dateTime[1] || dateTime[0] || external_luxon_namespaceObject.DateTime.now().set({
16647
+ day: 1
16648
+ })]);
16649
+ }
15741
16650
  } else {
15742
16651
  onClose?.();
16652
+ setRangeSelectionStep(null);
15743
16653
  setCalendarType(rangePickerType);
15744
16654
  setCalendarViewDateTime([dateTime[0], dateTime[1]]);
15745
16655
  }
15746
16656
  previousOpenState.current = isOpen;
15747
16657
  }
15748
- }, [isOpen]);
16658
+ }, [isOpen, dateTime, rangePickerType, onOpen, onClose]);
15749
16659
  (0,external_react_namespaceObject.useEffect)(() => {
15750
16660
  const splittedFormat = format.split('/');
15751
16661
  setFormatIndexes({
@@ -15772,27 +16682,18 @@ const useDateRangePicker = ({
15772
16682
  if (Array.isArray(rest.value)) {
15773
16683
  const newDateTimeFrom = typeof rest.value[0] === 'string' && rest.value[0].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(rest.value[0], luxonFormat) : undefined;
15774
16684
  const newDateTimeTo = typeof rest.value[1] === 'string' && rest.value[1].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(rest.value[1], luxonFormat) : undefined;
15775
- const newDateTime = [newDateTimeFrom?.isValid ? newDateTimeFrom : undefined, newDateTimeTo?.isValid ? newDateTimeTo : undefined];
16685
+ const newDateTime = [newDateTimeFrom?.isValid ? newDateTimeFrom.startOf('day') : undefined, newDateTimeTo?.isValid ? newDateTimeTo.startOf('day') : undefined];
15776
16686
  setDateTime(newDateTime);
15777
16687
  setLastChangedDate([newDateTime[0]?.toJSDate(), newDateTime[1]?.toJSDate()]);
16688
+ // Sync calendar view with the new dates so they're visible when calendar opens
16689
+ setCalendarViewDateTime([newDateTime[0] || newDateTime[1] || undefined, newDateTime[1] || newDateTime[0] || undefined]);
15778
16690
  setValue(nameFrom, newDateTime[0]?.toFormat(luxonFormat));
15779
16691
  setValue(nameTo, newDateTime[1]?.toFormat(luxonFormat));
15780
16692
  }
15781
- }, [rest.value]);
16693
+ }, [rest.value, expectedDateLength, luxonFormat, nameFrom, nameTo, setValue, _name]);
15782
16694
  (0,external_react_namespaceObject.useEffect)(() => {
15783
16695
  setStatus(rest.status);
15784
16696
  }, [rest.status]);
15785
- (0,external_react_namespaceObject.useEffect)(() => {
15786
- if (lastChangedDate[0] || lastChangedDate[1]) {
15787
- if (lastFocusedElement === 'from' && !lastChangedDate[1]) {
15788
- setFocus(nameTo);
15789
- }
15790
- if (lastFocusedElement === 'to' && !lastChangedDate[0]) {
15791
- setFocus(nameFrom);
15792
- inputFromRef.current?.focus();
15793
- }
15794
- }
15795
- }, [lastChangedDate]);
15796
16697
  (0,external_react_namespaceObject.useEffect)(() => {
15797
16698
  if (calendarViewDateTime[0] && !calendarViewDateTime[1]) {
15798
16699
  setCalendarViewDateTime([calendarViewDateTime[0], calendarViewDateTime[0]]);
@@ -15807,11 +16708,20 @@ const useDateRangePicker = ({
15807
16708
  }
15808
16709
  }, [isOpenState]);
15809
16710
  (0,external_react_namespaceObject.useEffect)(() => {
15810
- if (defaultValue) {
15811
- setValue(nameFrom, defaultValue[0]);
15812
- setValue(nameTo, defaultValue[1]);
16711
+ // Only process defaultValue once on mount to avoid re-processing
16712
+ if (Array.isArray(defaultValue) && !defaultValueProcessed.current) {
16713
+ const defaultDateTimeFrom = typeof defaultValue[0] === 'string' && defaultValue[0].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[0], luxonFormat) : undefined;
16714
+ const defaultDateTimeTo = typeof defaultValue[1] === 'string' && defaultValue[1].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[1], luxonFormat) : undefined;
16715
+ const newDateTime = [defaultDateTimeFrom?.isValid ? defaultDateTimeFrom.startOf('day') : undefined, defaultDateTimeTo?.isValid ? defaultDateTimeTo.startOf('day') : undefined];
16716
+ setDateTime(newDateTime);
16717
+ setLastChangedDate([newDateTime[0]?.toJSDate(), newDateTime[1]?.toJSDate()]);
16718
+ // Sync calendar view with default dates so they're visible when calendar opens
16719
+ setCalendarViewDateTime([newDateTime[0] || newDateTime[1] || undefined, newDateTime[1] || newDateTime[0] || undefined]);
16720
+ setValue(nameFrom, newDateTime[0]?.toFormat(luxonFormat));
16721
+ setValue(nameTo, newDateTime[1]?.toFormat(luxonFormat));
16722
+ defaultValueProcessed.current = true;
15813
16723
  }
15814
- }, []);
16724
+ }, [defaultValue, expectedDateLength, luxonFormat, nameFrom, nameTo, setCalendarViewDateTime, setValue, _name]);
15815
16725
  return {
15816
16726
  formatIndexes,
15817
16727
  dateMinParts,
@@ -15822,7 +16732,6 @@ const useDateRangePicker = ({
15822
16732
  inputValueFrom,
15823
16733
  inputValueTo,
15824
16734
  calendarViewDateTime,
15825
- maskInputRef,
15826
16735
  calendarType,
15827
16736
  lastChangedDate,
15828
16737
  luxonFormat,
@@ -15833,16 +16742,24 @@ const useDateRangePicker = ({
15833
16742
  currentCalendarViewDT,
15834
16743
  isOpen,
15835
16744
  status,
15836
- inputFromRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRef, inputFromRef]),
15837
- inputToRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRef, inputToRef]),
16745
+ inputFromRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRefFrom, inputFromRef]),
16746
+ inputToRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRefTo, inputToRef]),
15838
16747
  setIsOpen,
15839
- handleSetIsOpen,
15840
16748
  setLastFocusedElement,
15841
16749
  safeOnChange,
15842
16750
  setCalendarType,
15843
16751
  setCalendarViewDateTime,
15844
16752
  setDateTime,
15845
- handleBlur
16753
+ handleBlur,
16754
+ rangeSelectionStep,
16755
+ setRangeSelectionStep,
16756
+ clearInputValue: field => {
16757
+ const targetName = field === 'from' ? nameFrom : nameTo;
16758
+ clearErrors(targetName);
16759
+ setValue(targetName, undefined);
16760
+ setDateTime(prev => field === 'from' ? [undefined, prev[1]] : [prev[0], undefined]);
16761
+ setLastChangedDate(prev => field === 'from' ? [undefined, prev[1]] : [prev[0], undefined]);
16762
+ }
15846
16763
  };
15847
16764
  };
15848
16765
  ;// ./src/components/DateRangePicker/DateRangePickerProvider.tsx
@@ -15871,7 +16788,7 @@ const DateRangePickerProvider = ({
15871
16788
  };
15872
16789
  const handleToggleOpen = e => {
15873
16790
  const tagName = e.currentTarget.tagName.toLowerCase();
15874
- if (rest.openCalendarMode === 'both' || rest.openCalendarMode === 'input' && tagName === 'input' || rest.openCalendarMode === 'icon' && tagName === 'button') {
16791
+ if (tagName === 'button') {
15875
16792
  toggleOpen();
15876
16793
  }
15877
16794
  if (tagName === 'input' && rest.inputProps?.inputProps?.onClick) {
@@ -15898,7 +16815,6 @@ const DateRangePickerProvider = ({
15898
16815
 
15899
16816
  const DateRangePicker = ({
15900
16817
  format,
15901
- openCalendarMode = 'icon',
15902
16818
  showCalendarIcon = true,
15903
16819
  showStatusArea = true,
15904
16820
  rangePickerType = 'days',
@@ -15907,7 +16823,6 @@ const DateRangePicker = ({
15907
16823
  const actualFormat = format || getFormatForRangePickerType(rangePickerType);
15908
16824
  return (0,jsx_runtime_namespaceObject.jsx)(DateRangePickerProvider, {
15909
16825
  format: actualFormat,
15910
- openCalendarMode: openCalendarMode,
15911
16826
  showCalendarIcon: showCalendarIcon,
15912
16827
  showStatusArea: showStatusArea,
15913
16828
  rangePickerType: rangePickerType,
@@ -17622,52 +18537,6 @@ const FiltersMultiSelectOptions = ({
17622
18537
  ;// ./src/components/Icon/index.ts
17623
18538
 
17624
18539
 
17625
- ;// ./src/components/ImageItem/ImageItem.tsx
17626
- function ImageItem_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
17627
-
17628
-
17629
-
17630
-
17631
- var ImageItem_ref = true ? {
17632
- name: "c5ejfv",
17633
- styles: "gap:8px;text-decoration:none"
17634
- } : 0;
17635
- const ImageItem = ({
17636
- children,
17637
- image,
17638
- avatarSize = 24,
17639
- link = '',
17640
- openLinkInNewTab = false,
17641
- className
17642
- }) => {
17643
- const theme = (0,react_namespaceObject.useTheme)();
17644
- const additionalProps = link ? {
17645
- href: link,
17646
- target: openLinkInNewTab ? '_blank' : undefined
17647
- } : {};
17648
- return (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
17649
- css: ImageItem_ref,
17650
- as: link ? 'a' : 'div',
17651
- className: className,
17652
- "data-testid": "image-item",
17653
- ...additionalProps,
17654
- children: [(0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
17655
- size: avatarSize,
17656
- image: image
17657
- }), (0,jsx_runtime_namespaceObject.jsx)("span", {
17658
- css: /*#__PURE__*/(0,react_namespaceObject.css)({
17659
- color: theme.colors.greyDarker,
17660
- fontSize: 14,
17661
- fontWeight: 500,
17662
- cursor: link ? 'pointer' : 'default',
17663
- '&:hover': {
17664
- color: link ? theme.colors.blue : theme.colors.greyDarker
17665
- }
17666
- }, true ? "" : 0, true ? "" : 0),
17667
- children: children
17668
- })]
17669
- });
17670
- };
17671
18540
  ;// ./src/components/ImageItem/index.ts
17672
18541
 
17673
18542
  ;// ./src/components/LinksTabBar/LinksTabBarBase.tsx
@@ -18589,18 +19458,47 @@ const Pagination = ({
18589
19458
  });
18590
19459
  };
18591
19460
  /* harmony default export */ const Pagination_Pagination = (Pagination);
19461
+ ;// ./src/utils/react19HocCompat.tsx
19462
+ /**
19463
+ * React 19 compatibility helper for Higher-Order Components (HOCs).
19464
+ *
19465
+ * React 19 has stricter requirements for component identification.
19466
+ * This utility ensures HOCs properly set displayName for better debugging
19467
+ * and React DevTools integration.
19468
+ *
19469
+ * @param hocName - The name of the HOC (e.g., 'WithPagination', 'WithLayout')
19470
+ * @param Component - The component being wrapped
19471
+ * @param WrappedComponent - The wrapper component function
19472
+ * @returns The wrapper component with proper displayName set
19473
+ */
19474
+
19475
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19476
+ function setHocDisplayName(hocName,
19477
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19478
+ Component, WrappedComponent) {
19479
+ const componentName = typeof Component === 'function' ?
19480
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19481
+ Component.displayName ||
19482
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19483
+ Component.name || 'Component' : 'Component';
19484
+ WrappedComponent.displayName = `${hocName}(${componentName})`;
19485
+ return WrappedComponent;
19486
+ }
18592
19487
  ;// ./src/components/Pagination/WithPagination.tsx
18593
19488
 
18594
19489
 
19490
+
19491
+
18595
19492
  const WithPagination = Component => {
18596
- const decoratedComp = props => (0,jsx_runtime_namespaceObject.jsx)(PaginationContextProvider, {
18597
- selectedPage: 1,
18598
- children: (0,jsx_runtime_namespaceObject.jsx)(Component, {
18599
- ...props
18600
- })
18601
- });
18602
- decoratedComp.displayName = `WithPagination(${Component.displayName})`;
18603
- return decoratedComp;
19493
+ function WrappedComponent(props) {
19494
+ return (0,jsx_runtime_namespaceObject.jsx)(PaginationContextProvider, {
19495
+ selectedPage: 1,
19496
+ children: (0,jsx_runtime_namespaceObject.jsx)(Component, {
19497
+ ...props
19498
+ })
19499
+ });
19500
+ }
19501
+ return setHocDisplayName('WithPagination', Component, WrappedComponent);
18604
19502
  };
18605
19503
  ;// ./src/components/Pagination/index.ts
18606
19504
 
@@ -19024,15 +19922,17 @@ const useTypeahead = ({
19024
19922
  const items = (0,external_react_namespaceObject.useMemo)(() => {
19025
19923
  return filteredChildren.map((child, index) => {
19026
19924
  if (! /*#__PURE__*/external_react_default().isValidElement(child)) return null;
19027
- const isActive = selectedItems.includes(child.props.value);
19925
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19926
+ const childElement = child;
19927
+ const isActive = selectedItems.includes(childElement.props.value);
19028
19928
  const {
19029
19929
  value,
19030
19930
  label,
19031
19931
  id,
19032
19932
  isDisabled
19033
- } = child.props;
19034
- return /*#__PURE__*/external_react_default().cloneElement(child, {
19035
- ...child.props,
19933
+ } = childElement.props;
19934
+ return /*#__PURE__*/external_react_default().cloneElement(childElement, {
19935
+ ...childElement.props,
19036
19936
  index,
19037
19937
  isActive,
19038
19938
  isDisabled,
@@ -19053,7 +19953,7 @@ const useTypeahead = ({
19053
19953
  value: id || value,
19054
19954
  input: inputValue,
19055
19955
  label
19056
- }) ?? child.props.children ?? label ?? value
19956
+ }) ?? childElement.props.children ?? label ?? value
19057
19957
  });
19058
19958
  });
19059
19959
  }, [children, selectedItems, inputValue]);
@@ -19062,7 +19962,9 @@ const useTypeahead = ({
19062
19962
  const needle = inputValue.toLowerCase();
19063
19963
  for (const child of filteredChildren) {
19064
19964
  if (! /*#__PURE__*/external_react_default().isValidElement(child)) continue;
19065
- const labelText = (child.props.label ?? child.props.value).toString();
19965
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19966
+ const childElement = child;
19967
+ const labelText = (childElement.props.label ?? childElement.props.value).toString();
19066
19968
  if (labelText.toLowerCase().startsWith(needle)) {
19067
19969
  return inputValue + labelText.slice(inputValue.length);
19068
19970
  }
@@ -19254,29 +20156,29 @@ function Typeahead_styles_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tr
19254
20156
  // TODO: automatically calculate max-height
19255
20157
  // https://github.com/ssagroup/ui-kit/issues/385
19256
20158
  const TypeaheadOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
19257
- target: "e1vig1dw6"
20159
+ target: "e1vig1dw7"
19258
20160
  } : 0)("padding:0;margin:0;list-style:none;background:#fff;border-radius:8px;filter:", ({
19259
20161
  theme
19260
20162
  }) => `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`, ";backdrop-filter:", ({
19261
20163
  theme
19262
20164
  }) => `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`, ";overflow-y:auto;max-height:350px;" + ( true ? "" : 0));
19263
20165
  const TypeaheadOption = /*#__PURE__*/base_default()("li", true ? {
19264
- target: "e1vig1dw5"
20166
+ target: "e1vig1dw6"
19265
20167
  } : 0)("display:flex;align-items:center;padding:0 16px;border:none;cursor:pointer;font-size:14px;gap:8px;padding:10px 12px;min-height:40px;line-height:20px;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;background:", ({
19266
20168
  isActive,
19267
20169
  theme
19268
20170
  }) => isActive ? theme.colors.blueRoyal12 : 'none', ";&:hover{background:rgba(72, 125, 225, 0.06);}" + ( true ? "" : 0));
19269
- const TypeaheadInput = theme => /*#__PURE__*/(0,css_namespaceObject.css)("&.typeahead-input{color:", theme.colors.greyDarker, ";border:none;border-radius:0;height:32px;cursor:pointer;padding:0;background:transparent;text-indent:8px;&:active,&:focus{min-width:100%;}}" + ( true ? "" : 0), true ? "" : 0);
20171
+ const TypeaheadInput = theme => /*#__PURE__*/(0,css_namespaceObject.css)("&.typeahead-input{flex:1;width:100%;color:", theme.colors.greyDarker, ";border:none;border-radius:0;height:32px;cursor:pointer;padding:0;background:transparent;text-indent:8px;&:active,&:focus{min-width:100%;}}" + ( true ? "" : 0), true ? "" : 0);
19270
20172
  const TypeaheadInputPlaceholder = /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
19271
20173
  name: "1kivhs5",
19272
20174
  styles: "position:absolute;top:0;left:-4px;font-weight:400;font-size:0.875rem;line-height:1rem;color:rgba(0, 0, 0, 0.54);&:disabled:hover{cursor:default;}"
19273
20175
  } : 0);
19274
20176
  const TypeaheadInputWrapper = /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
19275
- name: "1f6chlt",
19276
- styles: "height:32px;z-index:5;background:transparent;margin-left:-8px;&:active,&:focus{min-width:100%;}"
20177
+ name: "16adhtk",
20178
+ styles: "flex:1;width:100%;height:32px;z-index:5;background:transparent;margin-left:-8px;&:active,&:focus{min-width:100%;}"
19277
20179
  } : 0);
19278
20180
  const TypeaheadItem = /*#__PURE__*/base_default()("div", true ? {
19279
- target: "e1vig1dw4"
20181
+ target: "e1vig1dw5"
19280
20182
  } : 0)("display:flex;gap:6px;background:", ({
19281
20183
  theme,
19282
20184
  isDisabled
@@ -19286,15 +20188,21 @@ const TypeaheadItem = /*#__PURE__*/base_default()("div", true ? {
19286
20188
  theme,
19287
20189
  isDisabled
19288
20190
  }) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-weight:500;font-size:14px;min-height:20px;align-items:center;padding:6px;user-select:none;overflow:hidden;" + ( true ? "" : 0));
20191
+ const TypeaheadItemAvatar = /*#__PURE__*/base_default()("span", true ? {
20192
+ target: "e1vig1dw4"
20193
+ } : 0)( true ? {
20194
+ name: "za0kxg",
20195
+ styles: "display:flex;align-items:center;flex-shrink:0"
20196
+ } : 0);
19289
20197
  const TypeaheadItemLabel = /*#__PURE__*/base_default()("div", true ? {
19290
20198
  target: "e1vig1dw3"
19291
20199
  } : 0)("color:", ({
19292
20200
  theme,
19293
20201
  isDisabled
19294
- }) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-size:14px;font-weight:500;display:block;gap:6px;align-items:center;cursor:default;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
20202
+ }) => isDisabled ? theme.colors.grey : theme.colors.greyDarker, ";font-size:14px;font-weight:500;display:flex;align-items:center;cursor:default;overflow:hidden;text-overflow:ellipsis;" + ( true ? "" : 0));
19295
20203
  const TypeaheadItemCross = /*#__PURE__*/base_default()(Button_Button, true ? {
19296
20204
  target: "e1vig1dw2"
19297
- } : 0)("background:none;padding:0;padding-right:5;height:auto;&:active,&:focus,&:hover{cursor:", ({
20205
+ } : 0)("background:none;padding:0;padding-right:5px;height:auto;&:active,&:focus,&:hover{cursor:", ({
19298
20206
  isDisabled
19299
20207
  }) => isDisabled ? 'default' : 'pointer', ";background:none;box-shadow:none;}&:disabled{background:none;}" + ( true ? "" : 0));
19300
20208
  const TypeaheadInputsGroupWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
@@ -19361,10 +20269,14 @@ const MultipleTrigger = () => {
19361
20269
  children: [Object.values(context.optionsWithKey).length > 0 && context.selectedItems.map((selectedItem, index) => {
19362
20270
  const currentOption = context.optionsWithKey[selectedItem];
19363
20271
  const optionText = currentOption ? currentOption.children || currentOption.label || currentOption.value : '';
20272
+ const avatar = currentOption?.avatar;
19364
20273
  return (0,jsx_runtime_namespaceObject.jsxs)(TypeaheadItem, {
19365
20274
  onClick: e => e.stopPropagation(),
19366
20275
  isDisabled: context.isDisabled,
19367
- children: [(0,jsx_runtime_namespaceObject.jsx)(TypeaheadItemLabel, {
20276
+ children: [avatar && (0,jsx_runtime_namespaceObject.jsx)(TypeaheadItemAvatar, {
20277
+ "data-testid": "typeahead-item-avatar",
20278
+ children: avatar
20279
+ }), (0,jsx_runtime_namespaceObject.jsx)(TypeaheadItemLabel, {
19368
20280
  isDisabled: context.isDisabled,
19369
20281
  children: optionText
19370
20282
  }), (0,jsx_runtime_namespaceObject.jsx)(TypeaheadItemCross, {
@@ -19676,8 +20588,8 @@ function TypeaheadOption_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
19676
20588
 
19677
20589
 
19678
20590
  var TypeaheadOption_ref = true ? {
19679
- name: "1gz2b5f",
19680
- styles: "overflow:hidden;text-overflow:ellipsis"
20591
+ name: "szjn6i",
20592
+ styles: "overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1"
19681
20593
  } : 0;
19682
20594
  var TypeaheadOption_ref2 = true ? {
19683
20595
  name: "1kqn2f4",
@@ -19689,10 +20601,14 @@ var TypeaheadOption_ref3 = true ? {
19689
20601
  } : 0;
19690
20602
  const TypeaheadOption_TypeaheadOption = ({
19691
20603
  children,
20604
+ avatar,
19692
20605
  ...rest
19693
20606
  }) => (0,jsx_runtime_namespaceObject.jsxs)(TypeaheadOption, {
19694
20607
  ...rest,
19695
- children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
20608
+ children: [avatar && (0,jsx_runtime_namespaceObject.jsx)(TypeaheadItemAvatar, {
20609
+ "data-testid": "typeahead-option-avatar",
20610
+ children: avatar
20611
+ }), (0,jsx_runtime_namespaceObject.jsxs)("div", {
19696
20612
  css: TypeaheadOption_ref,
19697
20613
  children: [children, ' ']
19698
20614
  }), rest.isActive && (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
@@ -20567,10 +21483,22 @@ const RadioWidget = props => {
20567
21483
  }, i)) : undefined
20568
21484
  });
20569
21485
  };
21486
+ ;// ./src/components/JsonSchemaForm/constants.ts
21487
+ const DEFAULT_AVATAR_SIZE = 24;
20570
21488
  ;// ./src/components/JsonSchemaForm/widgets/SelectWidget.tsx
20571
21489
 
20572
21490
 
20573
21491
 
21492
+
21493
+ const getAvatarNode = (option, uiOptions) => {
21494
+ const avatar = option.schema?.avatar;
21495
+ if (!avatar) return;
21496
+ const avatarSize = uiOptions.typeaheadAvatarSize ?? DEFAULT_AVATAR_SIZE;
21497
+ return (0,jsx_runtime_namespaceObject.jsx)(Avatar_Avatar, {
21498
+ size: avatarSize,
21499
+ image: avatar
21500
+ });
21501
+ };
20574
21502
  const SelectWidget = props => {
20575
21503
  const {
20576
21504
  id,
@@ -20583,12 +21511,15 @@ const SelectWidget = props => {
20583
21511
  onFocus,
20584
21512
  value,
20585
21513
  onChangeOverride,
20586
- multiple
21514
+ multiple,
21515
+ uiSchema
20587
21516
  } = props;
20588
21517
  const {
20589
21518
  enumOptions = [],
20590
21519
  enumDisabled = []
20591
21520
  } = options;
21521
+ const customPlaceholder = placeholder || uiSchema?.['ui:placeholder'];
21522
+ const selectUiOptions = uiSchema?.['ui:options'] || {};
20592
21523
  const isMultiple = !!multiple || Array.isArray(value);
20593
21524
  const items = Array.isArray(enumOptions) ? enumOptions : [];
20594
21525
  const handleChange = onChangeOverride ? onChangeOverride : value => {
@@ -20616,8 +21547,7 @@ const SelectWidget = props => {
20616
21547
  };
20617
21548
  const handleTypeaheadChange = (changedValue, isAdded) => {
20618
21549
  if (isMultiple) {
20619
- const currentSelected = Array.isArray(selectedItems) ? selectedItems : [];
20620
- const newSelected = isAdded ? [...currentSelected, changedValue] : currentSelected.filter(item => item !== changedValue);
21550
+ const newSelected = isAdded ? [...selectedItems, changedValue] : selectedItems.filter(item => item !== changedValue);
20621
21551
  handleFormChange(newSelected);
20622
21552
  } else {
20623
21553
  const newValue = isAdded ? changedValue : undefined;
@@ -20640,8 +21570,7 @@ const SelectWidget = props => {
20640
21570
  };
20641
21571
  const onRemoveSelectedClick = removedValue => {
20642
21572
  if (isMultiple) {
20643
- const currentSelected = Array.isArray(selectedItems) ? selectedItems : [];
20644
- const newSelected = currentSelected.filter(item => item !== removedValue);
21573
+ const newSelected = selectedItems.filter(item => item !== removedValue);
20645
21574
  handleChange(newSelected);
20646
21575
  } else {
20647
21576
  handleChange(undefined);
@@ -20657,7 +21586,7 @@ const SelectWidget = props => {
20657
21586
  isDisabled: disabled,
20658
21587
  name: name,
20659
21588
  isMultiple: isMultiple,
20660
- placeholder: placeholder || undefined,
21589
+ placeholder: customPlaceholder || undefined,
20661
21590
  onChange: handleTypeaheadChange,
20662
21591
  onEmptyChange: onEmptyChange,
20663
21592
  onClearAll: onClearAll,
@@ -20666,15 +21595,13 @@ const SelectWidget = props => {
20666
21595
  label,
20667
21596
  input
20668
21597
  }) => highlightInputMatch(label, input),
20669
- children: items.map(({
20670
- label,
20671
- value
20672
- }) => (0,jsx_runtime_namespaceObject.jsx)(TypeaheadOption_TypeaheadOption, {
20673
- value: value,
20674
- label: label || value,
20675
- isDisabled: disabled || Array.isArray(enumDisabled) && enumDisabled.includes(value),
20676
- children: label || value
20677
- }, value))
21598
+ children: items.map(item => (0,jsx_runtime_namespaceObject.jsx)(TypeaheadOption_TypeaheadOption, {
21599
+ value: item.value,
21600
+ label: item.label || item.value,
21601
+ avatar: getAvatarNode(item, selectUiOptions),
21602
+ isDisabled: disabled || Array.isArray(enumDisabled) && enumDisabled.includes(item.value),
21603
+ children: item.label || item.value
21604
+ }, item.value))
20678
21605
  })
20679
21606
  });
20680
21607
  };
@@ -21012,6 +21939,7 @@ const JsonSchemaForm_Form = /*#__PURE__*/base_default()(UnstyledForm, true ? {
21012
21939
  styles: ".form-group{margin-bottom:16px;}.form-group:last-child{margin-bottom:0;}"
21013
21940
  } : 0);
21014
21941
 
21942
+
21015
21943
  ;// ./src/components/index.ts
21016
21944
 
21017
21945
 
@@ -21126,6 +22054,8 @@ const JsonSchemaForm_Form = /*#__PURE__*/base_default()(UnstyledForm, true ? {
21126
22054
 
21127
22055
 
21128
22056
 
22057
+
22058
+
21129
22059
 
21130
22060
 
21131
22061
 
@@ -21190,6 +22120,7 @@ const useTranslation = () => (0,external_react_namespaceObject.useContext)(Trans
21190
22120
 
21191
22121
 
21192
22122
 
22123
+
21193
22124
  /******/ return __webpack_exports__;
21194
22125
  /******/ })()
21195
22126
  ;