@ssa-ui-kit/core 3.16.0 → 3.16.2

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.
package/dist/index.js CHANGED
@@ -10356,6 +10356,8 @@ const main = {
10356
10356
  //#eef1f766
10357
10357
  greyLighter60: 'rgba(238, 241, 247, 0.6)',
10358
10358
  //#eef1f766
10359
+ greyPale16: 'rgba(244, 245, 249, 0.16)',
10360
+ // #f4f5f9 — palette.secondary.light at 16%
10359
10361
  greySelectedMenuItem: 'rgba(222, 225, 236, 1)',
10360
10362
  // #dee1ec
10361
10363
  greyFocused: 'rgba(210, 212, 219, 1)',
@@ -12147,7 +12149,7 @@ const Chart = ({
12147
12149
  stroke: fill,
12148
12150
  strokeWidth: "0.2"
12149
12151
  }), (0,jsx_runtime_namespaceObject.jsx)("path", {
12150
- d: "M18.0192 19.3336L18.0189 19.3339C17.9231 19.4225 17.7972 19.4721 17.6668 19.4721L18.0192 19.3336ZM18.0192 19.3336C19.9769 17.5072 21.1001 14.9258 21.1001 12.2497C21.1001 11.9645 20.8687 11.733 20.5835 11.733H12.2501M18.0192 19.3336L12.2501 11.733M12.2501 11.733C12.0517 11.733 11.8691 11.8475 11.7832 12.0274M12.2501 11.733L11.7832 12.0274M11.7832 12.0274C11.6974 12.2073 11.7232 12.4202 11.8482 12.5743M11.7832 12.0274L11.8482 12.5743M11.8482 12.5743C11.8483 12.5743 11.8483 12.5743 11.8483 12.5744M11.8482 12.5743L11.8483 12.5744M11.8483 12.5744L17.2645 19.2795C17.2645 19.2796 17.2646 19.2797 17.2647 19.2797C17.3549 19.3926 17.4872 19.4606 17.63 19.471C17.6298 19.471 17.6296 19.471 17.6295 19.471L11.8483 12.5744ZM20.0512 12.7664C19.9288 14.7847 19.0958 16.7118 17.7089 18.185L13.332 12.7664H20.0512Z",
12152
+ d: "M18.0192 19.3336L18.0189 19.3339C17.9231 19.4225 17.7972 19.4721 17.6668 19.4721L18.0192 19.3336ZM18.0192 19.3336C19.9769 17.5072 21.1001 14.9258 21.1001 12.2497C21.1001 11.9645 20.8687 11.733 20.5835 11.733H12.2501C12.0517 11.733 11.8691 11.8475 11.7832 12.0274C11.6974 12.2073 11.7232 12.4202 11.8482 12.5743C11.8483 12.5743 11.8483 12.5743 11.8483 12.5744L17.2645 19.2795C17.2645 19.2796 17.2646 19.2797 17.2647 19.2797C17.3549 19.3926 17.4872 19.4606 17.63 19.471C17.6298 19.471 17.6296 19.471 17.6295 19.471ZM20.0512 12.7664C19.9288 14.7847 19.0958 16.7118 17.7089 18.185L13.332 12.7664H20.0512Z",
12151
12153
  fill: fill,
12152
12154
  stroke: fill,
12153
12155
  strokeWidth: "0.2"
@@ -14486,15 +14488,10 @@ const TechnicalReview = ({
14486
14488
  fill: "none",
14487
14489
  ...props,
14488
14490
  children: [(0,jsx_runtime_namespaceObject.jsx)("path", {
14489
- fillRule: "evenodd",
14490
- clipRule: "evenodd",
14491
- d: "M12.0234 11.5312C12.9958 11.5316 13.7734 12.3206 13.7607 13.293C13.7479 14.2654 12.9491 15.0536 11.9766 15.0537C11.0042 15.0534 10.2257 14.2653 10.2383 13.293C10.2511 12.3205 11.0509 11.5314 12.0234 11.5312ZM12.0098 12.5166C11.5816 12.5169 11.2293 12.8648 11.2236 13.293C11.2182 13.7212 11.5619 14.0683 11.9902 14.0684C12.4183 14.068 12.7696 13.7211 12.7754 13.293C12.7809 12.8647 12.4381 12.5167 12.0098 12.5166Z",
14492
- fill: fill
14493
- }), (0,jsx_runtime_namespaceObject.jsx)("path", {
14494
- fillRule: "evenodd",
14495
- clipRule: "evenodd",
14496
- d: "M12.3076 8.59961C12.7457 8.59961 13.1314 8.88039 13.2646 9.2959L13.418 9.77148C13.4711 9.93709 13.5981 10.0786 13.7695 10.1748C13.8031 10.1936 13.8373 10.2126 13.8701 10.2324C14.0385 10.3343 14.2256 10.3768 14.3975 10.3418L14.8896 10.2412C15.32 10.1534 15.7555 10.3503 15.9697 10.7295L16.2178 11.1699C16.4317 11.5494 16.377 12.0267 16.082 12.3545L15.7441 12.7305C15.6266 12.8612 15.5669 13.044 15.5674 13.2412C15.5675 13.2801 15.5666 13.3195 15.5654 13.3584C15.5598 13.5555 15.6155 13.7385 15.7295 13.8691L16.0576 14.2451C16.3436 14.5728 16.3858 15.0495 16.1621 15.4287L15.9023 15.8691C15.6782 16.2485 15.2377 16.4452 14.8096 16.3574L14.3203 16.2568C14.1494 16.2218 13.9611 16.2644 13.79 16.3662C13.7565 16.3862 13.7217 16.4049 13.6875 16.4238C13.5136 16.5201 13.3827 16.6616 13.3252 16.8271L13.1602 17.3027C13.0161 17.7184 12.6228 17.999 12.1846 17.999H11.6768C11.2388 17.9988 10.8539 17.7182 10.7207 17.3027L10.5674 16.8271C10.5142 16.6616 10.3863 16.52 10.2148 16.4238C10.1814 16.405 10.147 16.386 10.1143 16.3662C9.94603 16.2646 9.75951 16.2219 9.58789 16.2568L9.09473 16.3574C8.66443 16.4451 8.22977 16.2484 8.01562 15.8691L7.76758 15.4287C7.55373 15.0493 7.60843 14.5729 7.90332 14.2451L8.24121 13.8691C8.35879 13.7385 8.41745 13.5556 8.41699 13.3584C8.41689 13.3195 8.41783 13.2801 8.41895 13.2412C8.42461 13.0441 8.36992 12.8612 8.25586 12.7305L7.92773 12.3545C7.64146 12.0267 7.59929 11.5493 7.82324 11.1699L8.08301 10.7295C8.30707 10.3503 8.74685 10.1536 9.1748 10.2412L9.66504 10.3418C9.83584 10.3768 10.0233 10.3341 10.1943 10.2324C10.2278 10.2125 10.2628 10.1937 10.2969 10.1748C10.471 10.0785 10.6027 9.93727 10.6602 9.77148L10.8252 9.2959C10.9693 8.88048 11.3618 8.59981 11.7998 8.59961H12.3076Z",
14497
- fill: fill
14491
+ d: "M9.09668 1.25781C9.46843 0.514309 10.5286 0.514329 10.9004 1.25781L12.6406 4.73828C12.9075 5.27115 13.4163 5.64255 14.0059 5.7334L18.4395 6.41504C19.2563 6.54082 19.5836 7.54149 19 8.125L16.0127 11.1123C15.5986 11.5264 15.4061 12.1136 15.4951 12.6924L16.1787 17.1348C16.3041 17.9516 15.4482 18.5637 14.7158 18.1816L10.8496 16.165H10.8486C10.3821 15.9224 9.83845 15.8921 9.35254 16.0742L9.14746 16.165L5.28223 18.1816C4.54927 18.5639 3.693 17.9516 3.81836 17.1348L4.50195 12.6924C4.59093 12.1136 4.39847 11.5264 3.98437 11.1123L0.99707 8.125C0.413213 7.54068 0.74073 6.54078 1.55762 6.41504L5.99121 5.7334C6.50714 5.65392 6.96097 5.35995 7.24512 4.93066L7.35645 4.73828L9.09668 1.25781Z",
14492
+ stroke: fill,
14493
+ strokeWidth: 3.5,
14494
+ transform: "translate(8, 9.54) scale(0.4)"
14498
14495
  }), (0,jsx_runtime_namespaceObject.jsx)("path", {
14499
14496
  fillRule: "evenodd",
14500
14497
  clipRule: "evenodd",
@@ -17187,27 +17184,24 @@ const ClientFeedback = ({
17187
17184
  fill = '#000',
17188
17185
  size = 24,
17189
17186
  ...props
17190
- }) => (0,jsx_runtime_namespaceObject.jsx)("svg", {
17187
+ }) => (0,jsx_runtime_namespaceObject.jsxs)("svg", {
17188
+ xmlns: "http://www.w3.org/2000/svg",
17191
17189
  width: `${size}px`,
17192
17190
  height: `${size}px`,
17193
17191
  viewBox: "0 0 24 24",
17194
17192
  fill: "none",
17195
- xmlns: "http://www.w3.org/2000/svg",
17196
17193
  ...props,
17197
- children: (0,jsx_runtime_namespaceObject.jsxs)("g", {
17198
- transform: "translate(4, 2)",
17199
- children: [(0,jsx_runtime_namespaceObject.jsx)("path", {
17200
- fillRule: "evenodd",
17201
- clipRule: "evenodd",
17202
- d: "M8 7C8.22918 7.00008 8.43942 7.12061 8.54688 7.3125L9.58496 9.16992C9.59674 9.19147 9.61417 9.21022 9.63477 9.22461C9.65537 9.23897 9.67986 9.24891 9.70508 9.25293L11.8867 9.61523C12.1126 9.65283 12.2979 9.80595 12.3691 10.0127C12.4399 10.2195 12.3853 10.4471 12.2256 10.6035L10.6846 12.1143C10.6669 12.1318 10.6525 12.1531 10.6445 12.1758C10.6366 12.1989 10.6353 12.2237 10.6387 12.248L10.9492 14.3301C10.981 14.545 10.8853 14.7598 10.7002 14.8877C10.5148 15.0156 10.2695 15.036 10.0635 14.9404L8.07324 14.0166C8.05059 14.0059 8.02557 14 8 14C7.97442 14 7.94886 14.0053 7.92578 14.0156L5.93555 14.9395C5.72964 15.0349 5.48516 15.015 5.2998 14.8877C5.11439 14.7597 5.01784 14.5446 5.0498 14.3291L5.36133 12.2471C5.365 12.2234 5.36233 12.1987 5.35449 12.1758C5.34655 12.1528 5.33332 12.1314 5.31543 12.1143L3.77441 10.6025C3.6152 10.4462 3.55929 10.2194 3.62988 10.0127C3.70069 9.80593 3.88642 9.65285 4.1123 9.61523L6.29492 9.25195C6.31988 9.24754 6.34382 9.23838 6.36426 9.22461C6.38487 9.21024 6.40226 9.19147 6.41406 9.16992L7.45312 7.3125C7.5606 7.12061 7.77081 7.00006 8 7Z",
17203
- fill: fill
17204
- }), (0,jsx_runtime_namespaceObject.jsx)("path", {
17205
- fillRule: "evenodd",
17206
- clipRule: "evenodd",
17207
- d: "M10.6318 0C11.1749 0 11.6563 0.269158 11.9326 0.672852H13.5801C14.9194 0.672852 15.9998 1.6888 16 2.9502V17.7227C15.9997 18.984 14.9194 20 13.5801 20H2.41992C1.08062 20 0.000265598 18.984 0 17.7227V2.9502C0.000160771 1.71644 1.03337 0.717969 2.33203 0.674805L4.06445 0.677734C4.34027 0.271405 4.82297 0 5.36816 0H10.6318ZM2.41992 1.94531C1.82377 1.94531 1.35172 2.39002 1.35156 2.9502V17.7227C1.35182 18.2828 1.82383 18.7275 2.41992 18.7275H13.5801C14.1762 18.7275 14.6482 18.2828 14.6484 17.7227V2.9502C14.6483 2.39002 14.1762 1.94531 13.5801 1.94531H12.1797V2.55273C12.1797 3.35395 11.481 4.0127 10.6318 4.0127H5.36816C4.51897 4.0127 3.82129 3.35395 3.82129 2.55273V1.94434L2.41992 1.94531ZM5.36816 1.19824C5.36816 1.19824 5.26284 1.18155 5.13281 1.26758C5.0076 1.35051 5.00309 1.45187 5.00293 1.45898V2.55273C5.00293 2.55273 5.00289 2.66179 5.08203 2.72559C5.22217 2.83854 5.36816 2.81445 5.36816 2.81445H10.6318C10.6318 2.81445 10.7372 2.83017 10.8672 2.74414C10.9969 2.65815 10.9971 2.55273 10.9971 2.55273V1.45898C10.997 1.45175 10.9941 1.34866 10.918 1.28711C10.7778 1.17415 10.6318 1.19824 10.6318 1.19824H5.36816Z",
17208
- fill: fill
17209
- })]
17210
- })
17194
+ children: [(0,jsx_runtime_namespaceObject.jsx)("path", {
17195
+ d: "M9.09668 1.25781C9.46843 0.514309 10.5286 0.514329 10.9004 1.25781L12.6406 4.73828C12.9075 5.27115 13.4163 5.64255 14.0059 5.7334L18.4395 6.41504C19.2563 6.54082 19.5836 7.54149 19 8.125L16.0127 11.1123C15.5986 11.5264 15.4061 12.1136 15.4951 12.6924L16.1787 17.1348C16.3041 17.9516 15.4482 18.5637 14.7158 18.1816L10.8496 16.165H10.8486C10.3821 15.9224 9.83845 15.8921 9.35254 16.0742L9.14746 16.165L5.28223 18.1816C4.54927 18.5639 3.693 17.9516 3.81836 17.1348L4.50195 12.6924C4.59093 12.1136 4.39847 11.5264 3.98437 11.1123L0.99707 8.125C0.413213 7.54068 0.74073 6.54078 1.55762 6.41504L5.99121 5.7334C6.50714 5.65392 6.96097 5.35995 7.24512 4.93066L7.35645 4.73828L9.09668 1.25781Z",
17196
+ stroke: fill,
17197
+ strokeWidth: 3.5,
17198
+ transform: "translate(8, 9.54) scale(0.4)"
17199
+ }), (0,jsx_runtime_namespaceObject.jsx)("path", {
17200
+ fillRule: "evenodd",
17201
+ clipRule: "evenodd",
17202
+ d: "M14.6318 2C15.1749 2 15.6563 2.26916 15.9326 2.67285H17.5801C18.9194 2.67285 19.9998 3.6888 20 4.9502V19.7227C19.9997 20.984 18.9194 22 17.5801 22H6.41992C5.08062 22 4.00027 20.984 4 19.7227V4.9502C4.00016 3.71644 5.03337 2.71797 6.33203 2.6748L8.06445 2.67773C8.34027 2.2714 8.82297 2 9.36816 2H14.6318ZM6.41992 3.94531C5.82377 3.94531 5.35172 4.39002 5.35156 4.9502V19.7227C5.35182 20.2828 5.82383 20.7275 6.41992 20.7275H17.5801C18.1762 20.7275 18.6482 20.2828 18.6484 19.7227V4.9502C18.6483 4.39002 18.1762 3.94531 17.5801 3.94531H16.1797V4.55273C16.1797 5.35395 15.481 6.0127 14.6318 6.0127H9.36816C8.51897 6.0127 7.82129 5.35395 7.82129 4.55273V3.94434L6.41992 3.94531ZM9.36816 3.19824C9.36816 3.19824 9.26284 3.18155 9.13281 3.26758C9.0076 3.35051 9.00309 3.45187 9.00293 3.45898V4.55273C9.00293 4.55273 9.00289 4.66179 9.08203 4.72559C9.22217 4.83854 9.36816 4.81445 9.36816 4.81445H14.6318C14.6318 4.81445 14.7372 4.83017 14.8672 4.74414C14.9969 4.65815 14.9971 4.55273 14.9971 4.55273V3.45898C14.997 3.45175 14.9941 3.34866 14.918 3.28711C14.7778 3.17415 14.6318 3.19824 14.6318 3.19824H9.36816Z",
17203
+ fill: fill
17204
+ })]
17211
17205
  });
17212
17206
  const ClientFeedback_ICON_NAME = 'client-feedback';
17213
17207
  ;// ./src/components/Icon/icons/Expertise.tsx
@@ -20598,12 +20592,35 @@ const RadioGroup = ({
20598
20592
 
20599
20593
 
20600
20594
 
20601
- /** Single-select dropdown: input-like look (white bg, palette borders, primary when open) */
20595
+ /** Border colors per status, mirroring Input's basic/error/success maps */
20596
+ const statusBorderColors = theme => ({
20597
+ basic: {
20598
+ default: theme.colors.grey,
20599
+ hover: theme.colors.greyDarker80,
20600
+ accent: theme.palette.primary.light
20601
+ },
20602
+ error: {
20603
+ default: theme.palette.error.light,
20604
+ hover: theme.palette.error.main,
20605
+ accent: theme.palette.error.dark
20606
+ },
20607
+ success: {
20608
+ default: theme.palette.success.light,
20609
+ hover: theme.palette.success.main,
20610
+ accent: theme.palette.success.dark
20611
+ }
20612
+ });
20613
+
20614
+ /** Single-select dropdown: input-like look (white bg, palette borders, accent when open/focused) */
20602
20615
  const singleDropdownStyles = ({
20603
20616
  theme,
20604
20617
  isOpen,
20605
- disabled
20606
- }) => /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", isOpen ? theme.palette.primary.main : theme.colors.grey, ";background:", disabled ? theme.colors.greyLighter : theme.colors.white, ";color:", theme.colors.greyDarker, ";&:disabled{border-color:", theme.colors.grey, ";color:", theme.colors.greyDarker60, ";cursor:default;svg path{stroke:", theme.colors.grey, ";}}&:focus:not(:disabled){border-color:", theme.palette.primary.main, ";background:", theme.colors.white, ";}&:hover:not(:disabled){border-color:", isOpen ? theme.palette.primary.main : theme.colors.greyDarker80, ";}" + ( true ? "" : 0), true ? "" : 0);
20618
+ disabled,
20619
+ status = 'basic'
20620
+ }) => {
20621
+ const colors = statusBorderColors(theme)[status];
20622
+ return /*#__PURE__*/(0,react_namespaceObject.css)("border:1px solid ", isOpen ? colors.accent : colors.default, ";background:", disabled ? theme.palette.secondary.light : theme.colors.white, ";color:", theme.colors.greyDarker, ";svg path{stroke:", theme.colors.greyDarker80, ";}&:disabled{border-color:", theme.colors.grey, ";color:", theme.colors.grey, ";cursor:default;svg path{stroke:", theme.colors.grey, ";}}&:focus:not(:disabled){border-color:", colors.accent, ";background:", theme.colors.white, ";svg path{stroke:", theme.colors.greyDarker, ";}}&:hover:not(:disabled){border-color:", isOpen ? colors.accent : colors.hover, ";svg path{stroke:", theme.colors.greyDarker, ";}}" + ( true ? "" : 0), true ? "" : 0);
20623
+ };
20607
20624
  const multipleStyles = ({
20608
20625
  theme,
20609
20626
  isOpen
@@ -20613,15 +20630,17 @@ const multipleStyles = ({
20613
20630
  };
20614
20631
  const DropdownToggleBase = /*#__PURE__*/base_default()("button", true ? {
20615
20632
  target: "er3kf7h0"
20616
- } : 0)("display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;gap:10px;position:relative;width:auto;padding:8px 14px;font:inherit;font-size:13px;text-align:left;line-height:18px;cursor:pointer;outline:inherit;border-radius:12px;", ({
20633
+ } : 0)("display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;gap:8px;position:relative;width:auto;height:44px;padding:0 14px;font:inherit;font-size:14px;font-weight:500;text-align:left;line-height:18px;cursor:pointer;outline:inherit;border-radius:12px;", ({
20617
20634
  isMultiple,
20618
20635
  isOpen,
20619
20636
  disabled,
20637
+ status,
20620
20638
  theme
20621
20639
  }) => !isMultiple && singleDropdownStyles({
20622
20640
  theme,
20623
20641
  isOpen,
20624
- disabled
20642
+ disabled,
20643
+ status
20625
20644
  }), ({
20626
20645
  isMultiple,
20627
20646
  isOpen,
@@ -20629,10 +20648,7 @@ const DropdownToggleBase = /*#__PURE__*/base_default()("button", true ? {
20629
20648
  }) => isMultiple && multipleStyles({
20630
20649
  theme,
20631
20650
  isOpen
20632
- }), ({
20633
- isMultiple,
20634
- theme
20635
- }) => !isMultiple && /*#__PURE__*/(0,react_namespaceObject.css)("color:", theme.colors.greyDarker, ";svg path{stroke:", theme.colors.greyDarker, ";}" + ( true ? "" : 0), true ? "" : 0), ";" + ( true ? "" : 0));
20651
+ }), ";" + ( true ? "" : 0));
20636
20652
  const DropdownToggle = ({
20637
20653
  onClick,
20638
20654
  onFocus,
@@ -20644,6 +20660,7 @@ const DropdownToggle = ({
20644
20660
  ariaLabelledby,
20645
20661
  ariaControls,
20646
20662
  colors,
20663
+ status,
20647
20664
  className,
20648
20665
  ...restProps
20649
20666
  }) => (0,jsx_runtime_namespaceObject.jsx)(DropdownToggleBase, {
@@ -20654,6 +20671,7 @@ const DropdownToggle = ({
20654
20671
  type: "button",
20655
20672
  isMultiple: isMultiple,
20656
20673
  selectedCount: selectedCount,
20674
+ status: status,
20657
20675
  onClick: e => {
20658
20676
  // Safari doesn't support focus on buttons 🤔
20659
20677
  e.currentTarget.focus();
@@ -20688,7 +20706,7 @@ const DropdownArrow = ({
20688
20706
  }) => (0,jsx_runtime_namespaceObject.jsx)(DropdownArrowBase, {
20689
20707
  children: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
20690
20708
  name: `carrot-${isUp ? 'up' : 'down'}`,
20691
- size: 12,
20709
+ size: 16,
20692
20710
  "data-testid": `dropdown-arrow-${isUp ? 'up' : 'down'}`,
20693
20711
  ...restProps
20694
20712
  })
@@ -20720,7 +20738,7 @@ const DropdownOption_multipleStyles = ({
20720
20738
  };
20721
20739
  const DropdownOption = /*#__PURE__*/base_default()("li", true ? {
20722
20740
  target: "e784n6w0"
20723
- } : 0)("overflow:hidden;height:34px;padding:8px 16px;border:none;background:", ({
20741
+ } : 0)("overflow:hidden;height:40px;padding:8px 12px;border:none;background:", ({
20724
20742
  isActive,
20725
20743
  theme
20726
20744
  }) => isActive ? theme.colors.greySelectedMenuItem : 'inherit', ";&:hover{background:", ({
@@ -20744,7 +20762,7 @@ function DropdownOptions_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tri
20744
20762
 
20745
20763
  const DropdownOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
20746
20764
  target: "e1qg2z4z0"
20747
- } : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;padding:0;", ({
20765
+ } : 0)("position:absolute;width:100%;min-width:max-content;list-style:none;padding:4px;", ({
20748
20766
  placement = 'bottom'
20749
20767
  }) => placement === 'top' ? 'bottom: 100%; top: auto; margin: 0 0 4px;' : 'top: 100%; bottom: auto; margin: 4px 0 0;', " background:", ({
20750
20768
  theme
@@ -20756,8 +20774,8 @@ const DropdownOptionsBase = /*#__PURE__*/base_default()("ul", true ? {
20756
20774
  theme
20757
20775
  }) => `drop-shadow(-4px 4px 14px ${theme.colors.greyDarker14})`, ";" + ( true ? "" : 0));
20758
20776
  const dropdownOptionButton = true ? {
20759
- name: "1bqnd8x",
20760
- styles: "display:flex;align-items:center;gap:8px;cursor:pointer;font:inherit;font-size:0.813rem;outline:inherit;text-align:left;width:100%;padding:0;margin:0;background:none;color:inherit;border:none"
20777
+ name: "x6i489",
20778
+ styles: "display:flex;align-items:center;gap:8px;cursor:pointer;font:inherit;font-size:0.875rem;font-weight:500;outline:inherit;text-align:left;width:100%;padding:0;margin:0;background:none;color:inherit;border:none"
20761
20779
  } : 0;
20762
20780
  const avatarWrapper = true ? {
20763
20781
  name: "1z0rm8f",
@@ -21092,6 +21110,15 @@ function Dropdown_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to s
21092
21110
 
21093
21111
 
21094
21112
 
21113
+
21114
+
21115
+
21116
+ const DropdownFieldWrapper = /*#__PURE__*/base_default()("div", true ? {
21117
+ target: "eizhqtp2"
21118
+ } : 0)( true ? {
21119
+ name: "1bj7yge",
21120
+ styles: "display:inline-flex;flex-direction:column;align-items:flex-start"
21121
+ } : 0);
21095
21122
  const DropdownBase = /*#__PURE__*/base_default()("div", true ? {
21096
21123
  target: "eizhqtp1"
21097
21124
  } : 0)( true ? {
@@ -21209,8 +21236,14 @@ const Dropdown = ({
21209
21236
  placeholder = 'Select something',
21210
21237
  maxHeight = 200,
21211
21238
  avatarBorder = false,
21239
+ label,
21240
+ helperText,
21241
+ errors,
21242
+ success,
21243
+ icon,
21212
21244
  dropdownProps: componentProps
21213
21245
  }) => {
21246
+ const status = success ? 'success' : errors ? 'error' : 'basic';
21214
21247
  const {
21215
21248
  dropdownPosition = DropdownPositions.auto
21216
21249
  } = componentProps ?? {};
@@ -21292,38 +21325,54 @@ const Dropdown = ({
21292
21325
  image: rawAvatar,
21293
21326
  border: avatarBorder
21294
21327
  }) : /*#__PURE__*/external_react_default().isValidElement(rawAvatar) ? rawAvatar : null : null;
21295
- const toggleContent = !(0,utils_namespaceObject.isNill)(selectedAvatar) ? (0,jsx_runtime_namespaceObject.jsxs)(SelectedContent, {
21296
- children: [selectedAvatar, (0,jsx_runtime_namespaceObject.jsx)("span", {
21328
+ const leadingElement = !(0,utils_namespaceObject.isNill)(selectedAvatar) ? selectedAvatar : icon ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
21329
+ name: icon,
21330
+ size: 16,
21331
+ color: isDisabled ? theme.colors.grey : theme.colors.greyDarker80
21332
+ }) : null;
21333
+ const toggleContent = !(0,utils_namespaceObject.isNill)(leadingElement) ? (0,jsx_runtime_namespaceObject.jsxs)(SelectedContent, {
21334
+ children: [leadingElement, (0,jsx_runtime_namespaceObject.jsx)("span", {
21297
21335
  style: {
21298
21336
  minWidth: 0
21299
21337
  },
21300
21338
  children: value
21301
21339
  })]
21302
21340
  }) : value;
21303
- return (0,jsx_runtime_namespaceObject.jsx)(Dropdown_context.Provider, {
21304
- value: contextValue,
21305
- children: (0,jsx_runtime_namespaceObject.jsxs)(DropdownBase, {
21306
- ...componentProps?.base,
21307
- ref: dropdownRef,
21308
- "data-testid": "dropdown",
21309
- children: [(0,jsx_runtime_namespaceObject.jsxs)(DropdownToggle_DropdownToggle, {
21310
- ...componentProps?.toggleButton,
21311
- className: className,
21312
- isOpen: isOpen,
21313
- disabled: isDisabled,
21314
- onClick: setIsOpen.bind(null, !isOpen),
21315
- onFocus: setIsFocused.bind(null, true),
21316
- colors: colors,
21317
- ariaLabelledby: `dropdown-label-${dropdownId}`,
21318
- ariaControls: `dropdown-popup-${dropdownId}`,
21319
- children: [toggleContent, (0,jsx_runtime_namespaceObject.jsx)(DropdownArrow_DropdownArrow, {
21320
- ...componentProps?.toggleButtonArrow,
21321
- isUp: isOpen
21322
- })]
21323
- }), isOpen ? (0,jsx_runtime_namespaceObject.jsx)(DropdownOptions_DropdownOptions, {
21324
- children: items
21325
- }) : null]
21326
- })
21341
+ return (0,jsx_runtime_namespaceObject.jsxs)(DropdownFieldWrapper, {
21342
+ children: [label ? (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
21343
+ isDisabled: isDisabled,
21344
+ children: label
21345
+ }) : null, (0,jsx_runtime_namespaceObject.jsx)(Dropdown_context.Provider, {
21346
+ value: contextValue,
21347
+ children: (0,jsx_runtime_namespaceObject.jsxs)(DropdownBase, {
21348
+ ...componentProps?.base,
21349
+ ref: dropdownRef,
21350
+ "data-testid": "dropdown",
21351
+ children: [(0,jsx_runtime_namespaceObject.jsxs)(DropdownToggle_DropdownToggle, {
21352
+ ...componentProps?.toggleButton,
21353
+ className: className,
21354
+ isOpen: isOpen,
21355
+ disabled: isDisabled,
21356
+ status: status,
21357
+ onClick: setIsOpen.bind(null, !isOpen),
21358
+ onFocus: setIsFocused.bind(null, true),
21359
+ colors: colors,
21360
+ ariaLabelledby: `dropdown-label-${dropdownId}`,
21361
+ ariaControls: `dropdown-popup-${dropdownId}`,
21362
+ children: [toggleContent, (0,jsx_runtime_namespaceObject.jsx)(DropdownArrow_DropdownArrow, {
21363
+ ...componentProps?.toggleButtonArrow,
21364
+ isUp: isOpen
21365
+ })]
21366
+ }), isOpen ? (0,jsx_runtime_namespaceObject.jsx)(DropdownOptions_DropdownOptions, {
21367
+ children: items
21368
+ }) : null]
21369
+ })
21370
+ }), helperText || errors ? (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
21371
+ role: "status",
21372
+ status: status,
21373
+ disabled: isDisabled,
21374
+ children: errors?.message || helperText
21375
+ }) : null]
21327
21376
  });
21328
21377
  };
21329
21378
  /* harmony default export */ const Dropdown_Dropdown = (Dropdown);
@@ -23392,15 +23441,99 @@ const highlightInputMatch = (item, keyword) => {
23392
23441
  const external_luxon_namespaceObject = require("luxon");
23393
23442
  ;// ./src/components/DatePicker/styles.ts
23394
23443
 
23444
+ function DatePicker_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)."; }
23445
+
23395
23446
 
23447
+ /*
23448
+ * Calendar cell styles shared by **DatePicker** and **DateRangePicker**.
23449
+ *
23450
+ * `DateRangePicker/styles.ts` re-exports the three cell components from here
23451
+ * rather than redeclaring them, so a token or geometry fix only has to be made
23452
+ * once. Both pickers drive the "selected" look through the same
23453
+ * `isCalendarDateSelected` prop — the single-date pickers pass their
23454
+ * `isCalendarYear` / `isCalendarMonth` flag into it.
23455
+ */
23456
+
23457
+ /**
23458
+ * Which edge of a highlighted range a cell sits on. Drives the cell's corner
23459
+ * rounding so start/end cells form a single connected pill with the range
23460
+ * cells between them, matching the Figma `Range Selected Start/End` variants.
23461
+ *
23462
+ * - **`start`** — rounded on the left only
23463
+ * - **`end`** — rounded on the right only
23464
+ * - **`both`** — a standalone selection (or a one-cell range), fully rounded
23465
+ */
23466
+
23467
+ const getCellRadius = (rangeEdge, isHighlighted) => {
23468
+ if (rangeEdge === 'start') return '6px 0 0 6px';
23469
+ if (rangeEdge === 'end') return '0 6px 6px 0';
23470
+ if (rangeEdge === 'both') return '6px';
23471
+ return isHighlighted ? '0' : '6px';
23472
+ };
23473
+
23474
+ /**
23475
+ * Works out which edge of a highlighted range a selected cell sits on.
23476
+ *
23477
+ * A range only has distinct edges when both anchors exist, so without an
23478
+ * active range (or when both anchors land on the same cell) the cell is
23479
+ * fully rounded. `mode` says which anchor *this* picker holds, which is what
23480
+ * decides whether its own value rounds on the left or the right.
23481
+ */
23482
+ const getRangeEdge = ({
23483
+ isFirstSelected,
23484
+ isSecondSelected,
23485
+ isRangeActive,
23486
+ mode
23487
+ }) => {
23488
+ if (!isFirstSelected && !isSecondSelected) return undefined;
23489
+ if (!isRangeActive || isFirstSelected && isSecondSelected) return 'both';
23490
+ const isStart = mode === 'dateFrom' ? isFirstSelected : isSecondSelected;
23491
+ return isStart ? 'start' : 'end';
23492
+ };
23493
+
23494
+ /**
23495
+ * Time panel shown beside the calendar. Figma lays the hours and minutes out
23496
+ * as rows of two 56×40 cells with an 8px gap; two scrolling columns in one
23497
+ * scroll container produce the same result while keeping the lists independent.
23498
+ */
23499
+ const TimePanel = /*#__PURE__*/base_default()("div", true ? {
23500
+ target: "e19kqgld5"
23501
+ } : 0)( true ? {
23502
+ name: "1xp7lsd",
23503
+ styles: "display:flex;gap:8px;align-self:stretch;padding:24px 24px 0 0;height:100%;overflow:hidden"
23504
+ } : 0);
23505
+
23506
+ /**
23507
+ * Each column scrolls on its own so the hours list can be moved without
23508
+ * dragging the minutes along with it.
23509
+ */
23510
+ const TimeColumn = /*#__PURE__*/base_default()("div", true ? {
23511
+ target: "e19kqgld4"
23512
+ } : 0)( true ? {
23513
+ name: "1m7q518",
23514
+ styles: "display:flex;flex-direction:column;flex-shrink:0;height:100%;overflow-y:auto;scrollbar-width:none;&::-webkit-scrollbar{display:none;}"
23515
+ } : 0);
23516
+ const TimeCell = /*#__PURE__*/base_default()("div", true ? {
23517
+ target: "e19kqgld3"
23518
+ } : 0)("display:flex;align-items:center;justify-content:center;flex-shrink:0;width:56px;height:40px;border-radius:6px;font-size:14px;font-weight:500;line-height:18px;cursor:pointer;user-select:none;color:", ({
23519
+ theme,
23520
+ isSelected
23521
+ }) => isSelected ? theme.colors.white : theme.colors.greyDarker, ";background:", ({
23522
+ theme,
23523
+ isSelected
23524
+ }) => isSelected ? theme.palette.primary.main : 'none', ";&:hover{background:", ({
23525
+ theme,
23526
+ isSelected
23527
+ }) => isSelected ? theme.palette.primary.main : theme.palette.secondary.light, ";}" + ( true ? "" : 0));
23396
23528
  const DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
23397
23529
  target: "e19kqgld2"
23398
- } : 0)("position:relative;width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;border-radius:", ({
23530
+ } : 0)("position:relative;width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;line-height:18px;border-radius:", ({
23531
+ rangeEdge,
23399
23532
  isHighlighted
23400
- }) => isHighlighted ? 0 : '6px', ";border:", ({
23533
+ }) => getCellRadius(rangeEdge, isHighlighted), ";border:", ({
23401
23534
  theme,
23402
23535
  isCalendarDateNow
23403
- }) => isCalendarDateNow ? `1px solid ${theme.colors.greyFocused}` : 'none', ";color:", ({
23536
+ }) => isCalendarDateNow ? `1px solid ${theme.colors.grey}` : 'none', ";color:", ({
23404
23537
  theme,
23405
23538
  isCalendarDateSelected
23406
23539
  }) => isCalendarDateSelected ? theme.colors.white : theme.colors.greyDarker, ";background:", ({
@@ -23412,90 +23545,58 @@ const DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
23412
23545
  theme,
23413
23546
  isCalendarDateSelected,
23414
23547
  isHighlighted
23415
- }) => isHighlighted && !isCalendarDateSelected && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
23416
- theme
23417
- }) => theme.colors.greyLighter, ";color:", ({
23548
+ }) => isHighlighted && !isCalendarDateSelected && theme.colors.blueLighter20, ";&:hover{background:", ({
23418
23549
  theme
23419
- }) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
23420
- isCalendarFirstDateSelected,
23421
- isCalendarSecondDateSelected
23422
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
23423
- isCalendarFirstDateSelected
23424
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";right:", ({
23425
- isCalendarSecondDateSelected
23426
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
23550
+ }) => theme.palette.secondary.light, ";color:", ({
23427
23551
  theme
23428
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}}&:hover{border:", ({
23552
+ }) => theme.colors.greyDarker, ";}}&:hover{border:", ({
23429
23553
  theme,
23430
23554
  isCalendarDateNow
23431
- }) => isCalendarDateNow && `1px solid ${theme.colors.greyFocused}`, ";}" + ( true ? "" : 0));
23555
+ }) => isCalendarDateNow && `1px solid ${theme.colors.grey}`, ";}" + ( true ? "" : 0));
23432
23556
  const YearsViewCell = /*#__PURE__*/base_default()("div", true ? {
23433
23557
  target: "e19kqgld1"
23434
23558
  } : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:70px;height:40px;border-radius:", ({
23435
- isCalendarFirstDateSelected,
23436
- isCalendarSecondDateSelected
23437
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500px;user-select:none;cursor:pointer;color:", ({
23438
- theme,
23439
- isCalendarYear,
23440
- isCalendarSecondDateSelected
23441
- }) => (isCalendarYear || isCalendarSecondDateSelected) && theme.colors.white, ";background:", ({
23559
+ rangeEdge,
23560
+ isHighlighted
23561
+ }) => getCellRadius(rangeEdge, isHighlighted), ";font-size:14px;font-weight:500;line-height:18px;user-select:none;cursor:pointer;color:", ({
23442
23562
  theme,
23443
- isCalendarYear,
23444
- isCalendarSecondDateSelected
23445
- }) => isCalendarYear || isCalendarSecondDateSelected ? theme.palette.primary.main : 'none', ";background:", ({
23563
+ isCalendarDateSelected
23564
+ }) => isCalendarDateSelected ? theme.colors.white : theme.colors.greyDarker, ";background:", ({
23446
23565
  theme,
23447
- isHighlighted,
23448
- isCalendarYear
23449
- }) => isHighlighted && !isCalendarYear && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
23450
- theme
23451
- }) => theme.colors.greyLighter, ";color:", ({
23566
+ isCalendarDateSelected,
23567
+ isHighlighted
23568
+ }) => {
23569
+ if (isCalendarDateSelected) return theme.palette.primary.main;
23570
+ return isHighlighted ? theme.colors.blueLighter20 : 'none';
23571
+ }, ";&:hover{background:", ({
23452
23572
  theme
23453
- }) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
23454
- isCalendarFirstDateSelected,
23455
- isCalendarSecondDateSelected
23456
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
23457
- isCalendarSecondDateSelected
23458
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
23459
- isCalendarFirstDateSelected
23460
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
23573
+ }) => theme.palette.secondary.light, ";color:", ({
23461
23574
  theme
23462
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}" + ( true ? "" : 0));
23575
+ }) => theme.colors.greyDarker, ";border-radius:6px;}" + ( true ? "" : 0));
23463
23576
  const MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
23464
23577
  target: "e19kqgld0"
23465
- } : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:99px;height:40px;border-radius:", ({
23466
- isCalendarFirstDateSelected,
23467
- isCalendarSecondDateSelected
23468
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500;cursor:pointer;color:", ({
23578
+ } : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:93.33px;height:40px;border-radius:", ({
23579
+ rangeEdge,
23580
+ isHighlighted
23581
+ }) => getCellRadius(rangeEdge, isHighlighted), ";font-size:14px;font-weight:500;line-height:18px;cursor:pointer;color:", ({
23469
23582
  theme,
23470
- isCalendarMonth,
23471
- isCalendarSecondDateSelected
23472
- }) => (isCalendarMonth || isCalendarSecondDateSelected) && theme.colors.white, ";user-select:none;background:", ({
23583
+ isCalendarDateSelected
23584
+ }) => isCalendarDateSelected ? theme.colors.white : theme.colors.greyDarker, ";user-select:none;background:", ({
23473
23585
  theme,
23474
- isCalendarMonth,
23475
- isCalendarSecondDateSelected
23476
- }) => isCalendarMonth || isCalendarSecondDateSelected ? theme.palette.primary.main : 'none', ";&[aria-disabled='true']{cursor:default;pointer-events:none;color:", ({
23586
+ isCalendarDateSelected
23587
+ }) => isCalendarDateSelected ? theme.palette.primary.main : 'none', ";&[aria-disabled='true']{cursor:default;pointer-events:none;color:", ({
23477
23588
  theme
23478
23589
  }) => theme.colors.greyDarker, ";background:", ({
23479
23590
  theme
23480
23591
  }) => theme.colors.grey, ";}&[aria-disabled='false']{background:", ({
23481
23592
  theme,
23482
23593
  isHighlighted,
23483
- isCalendarMonth,
23484
- isCalendarSecondDateSelected
23485
- }) => isHighlighted && !isCalendarMonth && !isCalendarSecondDateSelected && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
23486
- theme
23487
- }) => theme.colors.greyLighter, ";color:", ({
23594
+ isCalendarDateSelected
23595
+ }) => isHighlighted && !isCalendarDateSelected && theme.colors.blueLighter20, ";&:hover{background:", ({
23488
23596
  theme
23489
- }) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
23490
- isCalendarFirstDateSelected,
23491
- isCalendarSecondDateSelected
23492
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
23493
- isCalendarSecondDateSelected
23494
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
23495
- isCalendarFirstDateSelected
23496
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
23597
+ }) => theme.palette.secondary.light, ";color:", ({
23497
23598
  theme
23498
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}}" + ( true ? "" : 0));
23599
+ }) => theme.colors.greyDarker, ";}}" + ( true ? "" : 0));
23499
23600
  ;// ./src/components/DatePicker/utils/dates.ts
23500
23601
 
23501
23602
  const getDaysForCalendarMonth = date => {
@@ -23596,6 +23697,20 @@ const INVALID_DATE = 'Invalid date';
23596
23697
  const FULL_DATE_LENGTH = 10;
23597
23698
  const FULL_MONTH_DATE_LENGTH = 7;
23598
23699
  const FULL_YEAR_DATE_LENGTH = 4;
23700
+
23701
+ /**
23702
+ * Time support is layered on top of a date format rather than being a separate
23703
+ * set of formats, so `showTimePicker` works with any picker type without
23704
+ * widening the shared `DateFormat` union (which `JsonSchemaForm` validates
23705
+ * against).
23706
+ */
23707
+ const TIME_MASK_FORMAT_SUFFIX = ' HH:mm';
23708
+ const TIME_MASK_SUFFIX = ' __:__';
23709
+ const TIME_LENGTH = 6;
23710
+ const HOURS_IN_DAY = 24;
23711
+ const MINUTES_IN_HOUR = 60;
23712
+ /** 15-minute steps by default; pass `minuteStep={1}` for the Figma-literal list. */
23713
+ const DEFAULT_MINUTE_STEP = 15;
23599
23714
  const PICKER_TYPE = {
23600
23715
  DAYS: 'days',
23601
23716
  MONTHS: 'months',
@@ -23634,13 +23749,16 @@ const useDatePickerMask = ({
23634
23749
  selectionEnd,
23635
23750
  value: currentValue
23636
23751
  }) => {
23637
- if (mask === DEFAULT_MASK || mask === DEFAULT_MONTH_MASK || mask === DEFAULT_YEAR_MASK) {
23752
+ // `showTimePicker` appends a ` __:__` suffix onto the date mask, so
23753
+ // strip it before comparing against the bare date masks below.
23754
+ const dateMask = mask.split(' ')[0];
23755
+ if (dateMask === DEFAULT_MASK || dateMask === DEFAULT_MONTH_MASK || dateMask === DEFAULT_YEAR_MASK) {
23638
23756
  const newValue = currentValue.slice(0, selectionStart) + data + currentValue.slice(selectionEnd);
23639
23757
  const updatedValue = (0,mask_namespaceObject.format)(newValue, {
23640
23758
  mask,
23641
23759
  replacement
23642
23760
  });
23643
- const splittedValue = updatedValue.split('/');
23761
+ const splittedValue = updatedValue.split(' ')[0].split('/');
23644
23762
  const isChecked = processDate({
23645
23763
  day: formatIndexes['day'] !== -1 ? splittedValue[formatIndexes['day']] : '',
23646
23764
  month: formatIndexes['month'] !== -1 ? splittedValue[formatIndexes['month']] : '',
@@ -23704,7 +23822,8 @@ const useDatePicker = ({
23704
23822
  onClose,
23705
23823
  onError,
23706
23824
  onChange,
23707
- value: externalValue
23825
+ value: externalValue,
23826
+ showTimePicker = false
23708
23827
  }) => {
23709
23828
  const {
23710
23829
  clearErrors,
@@ -23714,9 +23833,31 @@ const useDatePicker = ({
23714
23833
  const inputValue = (0,external_react_hook_form_namespaceObject.useWatch)({
23715
23834
  name
23716
23835
  });
23717
- const config = (0,external_react_namespaceObject.useMemo)(() => CONFIG[pickerType] || CONFIG[PICKER_TYPE.DAYS], [pickerType]);
23718
- const format = propFormat || config.format;
23719
- const luxonFormat = (0,external_react_namespaceObject.useMemo)(() => format.replace(/mm/gi, 'MM'), [format]);
23836
+ const config = (0,external_react_namespaceObject.useMemo)(() => {
23837
+ const base = CONFIG[pickerType] || CONFIG[PICKER_TYPE.DAYS];
23838
+ if (!showTimePicker) return base;
23839
+
23840
+ // Time is layered onto the picker's own config rather than being a fourth
23841
+ // picker type, so `HH:mm` composes with days, months, or years. The unit
23842
+ // moves to 'minute' so emitted values stop being floored to midnight.
23843
+ return {
23844
+ ...base,
23845
+ mask: `${base.mask}${TIME_MASK_SUFFIX}`,
23846
+ length: base.length + TIME_LENGTH,
23847
+ unit: 'minute'
23848
+ };
23849
+ }, [pickerType, showTimePicker]);
23850
+
23851
+ // The date half of the format, kept separate because `formatIndexes` and the
23852
+ // min/max parsing below both split on '/' and would choke on a time suffix.
23853
+ const dateFormat = propFormat || config.format;
23854
+ const format = showTimePicker ? `${dateFormat}${TIME_MASK_FORMAT_SUFFIX}` : dateFormat;
23855
+ const luxonFormat = (0,external_react_namespaceObject.useMemo)(() => {
23856
+ // Only the date half may be uppercased — `mm` in `HH:mm` is minutes, and
23857
+ // a blanket /mm/gi replace would turn it into a month token.
23858
+ const luxonDate = dateFormat.replace(/mm/gi, 'MM');
23859
+ return showTimePicker ? `${luxonDate}${TIME_MASK_FORMAT_SUFFIX}` : luxonDate;
23860
+ }, [dateFormat, showTimePicker]);
23720
23861
  const [isLoading, setLoading] = (0,external_react_namespaceObject.useState)(true);
23721
23862
  const [dateTime, setDateTime] = (0,external_react_namespaceObject.useState)();
23722
23863
  const [lastChangedDate, setLastChangedDate] = (0,external_react_namespaceObject.useState)();
@@ -23732,7 +23873,7 @@ const useDatePicker = ({
23732
23873
  });
23733
23874
  const wasOpenRef = (0,external_react_namespaceObject.useRef)(undefined);
23734
23875
  const formatIndexes = (0,external_react_namespaceObject.useMemo)(() => {
23735
- const parts = format.split('/').map(p => p.trim().toLowerCase()).filter(Boolean);
23876
+ const parts = dateFormat.split('/').map(p => p.trim().toLowerCase()).filter(Boolean);
23736
23877
  const year = parts.findIndex(p => p === 'yyyy');
23737
23878
  if (year === -1) throw new Error('DatePicker format must contain year');
23738
23879
  return {
@@ -23740,7 +23881,7 @@ const useDatePicker = ({
23740
23881
  month: parts.findIndex(p => p === 'mm'),
23741
23882
  year
23742
23883
  };
23743
- }, [format]);
23884
+ }, [dateFormat]);
23744
23885
  const {
23745
23886
  dateMinDT,
23746
23887
  dateMaxDT,
@@ -23756,11 +23897,13 @@ const useDatePicker = ({
23756
23897
  });
23757
23898
  return {
23758
23899
  dateMinDT: toDT(minP),
23759
- dateMaxDT: toDT(maxP),
23900
+ // With a time component, the max day itself must stay selectable for
23901
+ // any time up to its last minute, not just 00:00.
23902
+ dateMaxDT: showTimePicker ? toDT(maxP).endOf('day') : toDT(maxP),
23760
23903
  dateMinParts: minP,
23761
23904
  dateMaxParts: maxP
23762
23905
  };
23763
- }, [dateMin, dateMax, config, formatIndexes]);
23906
+ }, [dateMin, dateMax, config, formatIndexes, showTimePicker]);
23764
23907
  const maskInputRef = useDatePickerMask({
23765
23908
  maskOptions: {
23766
23909
  mask: config.mask,
@@ -23856,6 +23999,51 @@ const useDatePicker = ({
23856
23999
  return newDT;
23857
24000
  });
23858
24001
  }, [config.length, luxonFormat, dateMinDT, dateMaxDT, name, setError, clearErrors, safeOnChange, safeOnError]);
24002
+
24003
+ // The value the clear button restores. With no `defaultValue` this is the
24004
+ // empty string, so "reset" and "clear" collapse into the same behaviour.
24005
+ const resetValue = defaultValue ?? '';
24006
+
24007
+ // Drives the clear button's visibility: there is nothing to undo while the
24008
+ // field still holds its default.
24009
+ const isDirty = (inputValue ?? '') !== resetValue;
24010
+ const resetToDefault = (0,external_react_namespaceObject.useCallback)(() => {
24011
+ const nextDT = resetValue ? external_luxon_namespaceObject.DateTime.fromFormat(resetValue, luxonFormat) : undefined;
24012
+ const validDT = nextDT?.isValid ? nextDT : undefined;
24013
+
24014
+ // Keep the processing refs in step with the value we're writing, so the
24015
+ // input-sync effect doesn't re-process a stale string and undo the reset.
24016
+ lastProcessedValueRef.current = resetValue;
24017
+ lastExternalValueRef.current = resetValue;
24018
+ clearErrors(name);
24019
+ setValue(name, resetValue);
24020
+ setDateTime(validDT);
24021
+ safeOnChange(validDT);
24022
+ safeOnError(null);
24023
+ }, [resetValue, luxonFormat, name, clearErrors, setValue, safeOnChange, safeOnError]);
24024
+
24025
+ /**
24026
+ * Commits an hour/minute pick from the time panel, keeping the currently
24027
+ * selected day. Falls back to the visible calendar day (then today) so a
24028
+ * time can be chosen before a date.
24029
+ */
24030
+ const setTime = (0,external_react_namespaceObject.useCallback)(({
24031
+ hour,
24032
+ minute
24033
+ }) => {
24034
+ const base = dateTime ?? calendarViewDateTime ?? external_luxon_namespaceObject.DateTime.now();
24035
+ const next = base.set({
24036
+ hour: hour ?? base.hour,
24037
+ minute: minute ?? base.minute,
24038
+ second: 0,
24039
+ millisecond: 0
24040
+ });
24041
+ if (!next.isValid || next < dateMinDT || next > dateMaxDT) return;
24042
+ clearErrors(name);
24043
+ setDateTime(next);
24044
+ setCalendarViewDateTime(next);
24045
+ safeOnChange(next);
24046
+ }, [dateTime, calendarViewDateTime, dateMinDT, dateMaxDT, name, clearErrors, safeOnChange]);
23859
24047
  const handleBlur = e => {
23860
24048
  // Force validation on blur - catches incomplete inputs when user leaves the field
23861
24049
  processValue(e.currentTarget.value, true);
@@ -23944,7 +24132,11 @@ const useDatePicker = ({
23944
24132
  dateMaxDT,
23945
24133
  dateTime,
23946
24134
  isOpen,
24135
+ isDirty,
23947
24136
  inputValue,
24137
+ resetToDefault,
24138
+ setTime,
24139
+ showTimePicker,
23948
24140
  calendarViewDateTime,
23949
24141
  maskInputRef,
23950
24142
  calendarType,
@@ -24024,6 +24216,8 @@ const DatePickerProvider = ({
24024
24216
  ...rest,
24025
24217
  ...restHook,
24026
24218
  pickerType: hookPickerType || rest.pickerType || PICKER_TYPE.DAYS,
24219
+ // Resolved by the hook and may carry a ` HH:mm` suffix, so it is a
24220
+ // plain string rather than the date-only `DatePickerFormat` union.
24027
24221
  format: hookFormat || rest.format || DEFAULT_MASK_FORMAT,
24028
24222
  formatIndexes,
24029
24223
  inputRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRef, rest.inputRef]),
@@ -24037,6 +24231,7 @@ const DatePickerProvider = ({
24037
24231
 
24038
24232
  const useDatePickerContext = () => (0,external_react_namespaceObject.useContext)(DatePickerContext);
24039
24233
  ;// ./src/components/DatePicker/components/DaysView.tsx
24234
+
24040
24235
  function 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)."; }
24041
24236
 
24042
24237
 
@@ -24045,20 +24240,14 @@ function DaysView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to s
24045
24240
 
24046
24241
 
24047
24242
 
24243
+
24048
24244
  var DaysView_ref = true ? {
24049
- name: "hisq2i",
24050
- styles: "padding-left:9px"
24051
- } : 0;
24052
- var DaysView_ref2 = true ? {
24053
- name: "yzljcr",
24054
- styles: "width:40px;height:40px;justify-content:center;font-size:12px;font-weight:600;cursor:default;user-select:none"
24055
- } : 0;
24056
- var _ref3 = true ? {
24057
- name: "1pxryto",
24058
- styles: "flex-wrap:wrap;padding-left:9px"
24245
+ name: "1qemjat",
24246
+ styles: "flex-wrap:wrap"
24059
24247
  } : 0;
24060
24248
  const DaysView = () => {
24061
24249
  const weekDays = getWeekDays();
24250
+ const theme = (0,react_namespaceObject.useTheme)();
24062
24251
  const {
24063
24252
  dateTime,
24064
24253
  calendarViewDateTime,
@@ -24066,6 +24255,7 @@ const DaysView = () => {
24066
24255
  dateMaxDT,
24067
24256
  lastChangedDate,
24068
24257
  highlightDates,
24258
+ showTimePicker,
24069
24259
  setCalendarViewDateTime,
24070
24260
  setDateTime,
24071
24261
  setIsOpen,
@@ -24094,18 +24284,32 @@ const DaysView = () => {
24094
24284
  setCalendarViewDateTime(newDate);
24095
24285
  setDateTime(newDate);
24096
24286
  safeOnChange?.(newDate);
24097
- setIsOpen(false);
24287
+
24288
+ // With a time panel open, closing here would make the hours/minutes
24289
+ // unreachable — the popover closes on outside click instead.
24290
+ if (!showTimePicker) {
24291
+ setIsOpen(false);
24292
+ }
24098
24293
  }
24099
24294
  };
24100
24295
  return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
24101
24296
  children: [(0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
24102
- css: DaysView_ref,
24103
24297
  children: weekDays.map((weekDay, index) => (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
24104
- css: DaysView_ref2,
24298
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
24299
+ width: 40,
24300
+ height: 40,
24301
+ justifyContent: 'center',
24302
+ fontSize: 12,
24303
+ fontWeight: 600,
24304
+ lineHeight: '16px',
24305
+ color: theme.colors.greyDarker80,
24306
+ cursor: 'default',
24307
+ userSelect: 'none'
24308
+ }, true ? "" : 0, true ? "" : 0),
24105
24309
  children: weekDay
24106
24310
  }, `week-day-${weekDay}-${index}`))
24107
24311
  }), (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
24108
- css: _ref3,
24312
+ css: DaysView_ref,
24109
24313
  onClick: handleDaySelect,
24110
24314
  children: dates.map((currentDate, index) => {
24111
24315
  const currentDT = external_luxon_namespaceObject.DateTime.fromJSDate(currentDate);
@@ -24133,13 +24337,18 @@ const DaysView = () => {
24133
24337
  isAriaDisabled = currentDT > dateMaxDT || !isCalendarMonth;
24134
24338
  }
24135
24339
  }
24340
+ const rangeEdge = getRangeEdge({
24341
+ isFirstSelected: isCalendarFirstDateSelected,
24342
+ isSecondSelected: isCalendarSecondDateSelected,
24343
+ isRangeActive: isHighlightEnabled && !!otherDateDT && !!dateTime,
24344
+ mode: highlightDates?.mode
24345
+ });
24136
24346
  return (0,jsx_runtime_namespaceObject.jsx)(DaysViewCell, {
24137
24347
  "aria-disabled": isAriaDisabled,
24138
24348
  "aria-label": ariaLabel,
24139
24349
  isCalendarDateNow: isCalendarDateNow,
24140
24350
  isCalendarDateSelected: isCalendarDateSelected,
24141
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
24142
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
24351
+ rangeEdge: rangeEdge,
24143
24352
  isHighlighted: isHighlightDate,
24144
24353
  children: calendarDay
24145
24354
  }, `day-${currentDate.getFullYear()}-${currentDate.getMonth()}-${currentDate.getDate()}-${index}`);
@@ -24212,7 +24421,6 @@ const MonthsView = () => {
24212
24421
  css: MonthsView_ref,
24213
24422
  onClick: handleMonthSelect,
24214
24423
  children: MONTHS.map((month, index) => {
24215
- const isCalendarMonth = calendarViewDateTime ? calendarViewDateTime.month === index + 1 : false;
24216
24424
  const currentMonthDT = external_luxon_namespaceObject.DateTime.fromObject({
24217
24425
  year: calendarViewDateTime?.year,
24218
24426
  month: index + 1,
@@ -24223,16 +24431,22 @@ const MonthsView = () => {
24223
24431
  const isAriaDisabled = isMinMonthReached || isMaxMonthReached;
24224
24432
  const isCalendarFirstDateSelected = currentMonthDT.toFormat('yyyy-MM') === dateTime?.toFormat('yyyy-MM');
24225
24433
  const isCalendarSecondDateSelected = currentMonthDT.toFormat('yyyy-MM') === otherDateDT?.toFormat('yyyy-MM');
24434
+ const isCalendarDateSelected = isCalendarFirstDateSelected || isCalendarSecondDateSelected;
24226
24435
  let isHighlightDate = false;
24227
24436
  if (isHighlightEnabled && lastChangedDate && otherDateDT && dateTime) {
24228
24437
  isHighlightDate = highlightDates.mode === 'dateTo' ? otherDateDT < currentMonthDT && currentMonthDT < dateTime : dateTime < currentMonthDT && currentMonthDT < otherDateDT;
24229
24438
  }
24439
+ const rangeEdge = getRangeEdge({
24440
+ isFirstSelected: isCalendarFirstDateSelected,
24441
+ isSecondSelected: isCalendarSecondDateSelected,
24442
+ isRangeActive: isHighlightEnabled && !!otherDateDT && !!dateTime,
24443
+ mode: highlightDates?.mode
24444
+ });
24230
24445
  return (0,jsx_runtime_namespaceObject.jsx)(MonthsViewCell, {
24231
- isCalendarMonth: isCalendarMonth,
24446
+ isCalendarDateSelected: isCalendarDateSelected,
24232
24447
  "aria-disabled": isAriaDisabled,
24233
24448
  "aria-label": `${month}, ${calendarViewDateTime?.year}`,
24234
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
24235
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
24449
+ rangeEdge: rangeEdge,
24236
24450
  isHighlighted: isHighlightDate,
24237
24451
  children: month
24238
24452
  }, month);
@@ -24341,14 +24555,20 @@ const YearsView = () => {
24341
24555
  }
24342
24556
  const isCalendarFirstDateSelected = year.toString() === dateTime?.toFormat('yyyy');
24343
24557
  const isCalendarSecondDateSelected = year.toString() === otherDateDT?.toFormat('yyyy');
24558
+ const isCalendarDateSelected = isCalendarFirstDateSelected || isCalendarSecondDateSelected;
24344
24559
  let isHighlightDate = false;
24345
24560
  if (isHighlightEnabled && lastChangedDate && otherDateDT && dateTime) {
24346
24561
  isHighlightDate = highlightDates.mode === 'dateTo' ? otherDateDT.year < year && year < dateTime.year : dateTime.year < year && year < otherDateDT.year;
24347
24562
  }
24563
+ const rangeEdge = getRangeEdge({
24564
+ isFirstSelected: isCalendarFirstDateSelected,
24565
+ isSecondSelected: isCalendarSecondDateSelected,
24566
+ isRangeActive: isHighlightEnabled && !!otherDateDT && !!dateTime,
24567
+ mode: highlightDates?.mode
24568
+ });
24348
24569
  return (0,jsx_runtime_namespaceObject.jsx)(YearsViewCell, {
24349
- isCalendarYear: isCalendarYear,
24350
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
24351
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
24570
+ isCalendarDateSelected: isCalendarDateSelected,
24571
+ rangeEdge: rangeEdge,
24352
24572
  isHighlighted: isHighlightDate,
24353
24573
  ...additionalProps,
24354
24574
  children: year
@@ -24455,7 +24675,7 @@ const DatePickerMonthsSwitch = () => {
24455
24675
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
24456
24676
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
24457
24677
  name: "carrot-left",
24458
- size: 14,
24678
+ size: 18,
24459
24679
  tooltip: "Previous month",
24460
24680
  color: isMinMonthReached ? theme.colors.grey : theme.colors.greyDarker
24461
24681
  }),
@@ -24476,7 +24696,7 @@ const DatePickerMonthsSwitch = () => {
24476
24696
  }), (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
24477
24697
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
24478
24698
  name: "carrot-right",
24479
- size: 14,
24699
+ size: 18,
24480
24700
  tooltip: "Next month",
24481
24701
  color: isMaxMonthReached ? theme.colors.grey : theme.colors.greyDarker
24482
24702
  }),
@@ -24506,8 +24726,8 @@ function DatePickerHeader_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tr
24506
24726
 
24507
24727
 
24508
24728
  var DatePickerHeader_ref = true ? {
24509
- name: "ugcp8m",
24510
- styles: "display:flex;justify-content:space-between;width:100%;height:32px;margin-bottom:12px"
24729
+ name: "148aj7w",
24730
+ styles: "display:flex;justify-content:space-between;width:100%;height:32px;margin-bottom:8px"
24511
24731
  } : 0;
24512
24732
  const DatePickerHeader = () => {
24513
24733
  const {
@@ -24547,7 +24767,7 @@ const DatePickerHeader = () => {
24547
24767
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
24548
24768
  endIcon: pickerType !== PICKER_TYPE.YEARS ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
24549
24769
  name: calendarType === CALENDAR_TYPE.DAYS || calendarType === CALENDAR_TYPE.MONTHS ? 'carrot-down' : 'carrot-up',
24550
- size: 14,
24770
+ size: 16,
24551
24771
  tooltip: ""
24552
24772
  }) : null,
24553
24773
  variant: "tertiary",
@@ -24555,11 +24775,11 @@ const DatePickerHeader = () => {
24555
24775
  "data-testid": "calendar-type-change-button",
24556
24776
  css: /*#__PURE__*/(0,react_namespaceObject.css)({
24557
24777
  padding: 0,
24558
- fontSize: 18,
24778
+ fontSize: 16,
24559
24779
  fontWeight: 700,
24560
- lineHeight: '24px',
24780
+ lineHeight: '20px',
24561
24781
  height: 32,
24562
- gap: 16,
24782
+ gap: 8,
24563
24783
  cursor: pickerType === PICKER_TYPE.YEARS ? 'default' : 'pointer',
24564
24784
  '&:focus::before': {
24565
24785
  display: 'none'
@@ -24569,6 +24789,94 @@ const DatePickerHeader = () => {
24569
24789
  }), (0,jsx_runtime_namespaceObject.jsx)(DatePickerMonthsSwitch, {})]
24570
24790
  });
24571
24791
  };
24792
+ ;// ./src/components/DatePicker/components/DatePickerTimePanel.tsx
24793
+
24794
+
24795
+
24796
+
24797
+
24798
+ const pad = value => String(value).padStart(2, '0');
24799
+
24800
+ /**
24801
+ * Centres a column on its selected cell by scrolling the column itself —
24802
+ * `scrollIntoView` can bubble up and scroll the whole page (same reason as
24803
+ * YearsView).
24804
+ */
24805
+ const centreOnSelected = container => {
24806
+ if (!container) return;
24807
+ const selectedEl = container.querySelector('[aria-selected=true]');
24808
+ if (!selectedEl) return;
24809
+ const containerRect = container.getBoundingClientRect();
24810
+ const elRect = selectedEl.getBoundingClientRect();
24811
+ container.scrollTop += elRect.top - containerRect.top - container.clientHeight / 2 + elRect.height / 2;
24812
+ };
24813
+
24814
+ /**
24815
+ * Hours and minutes columns shown beside the calendar when `showTimePicker`
24816
+ * is set, matching the Figma `Day & Time Picker` pop-up.
24817
+ *
24818
+ * The hours and minutes columns scroll independently, so reaching a late hour
24819
+ * doesn't drag the minutes list out of view. Each is centred on its own
24820
+ * selected value when the popover opens.
24821
+ */
24822
+ const DatePickerTimePanel = () => {
24823
+ const {
24824
+ dateTime,
24825
+ isOpen,
24826
+ minuteStep = DEFAULT_MINUTE_STEP,
24827
+ setTime
24828
+ } = useDatePickerContext();
24829
+ const hoursRef = (0,external_react_namespaceObject.useRef)(null);
24830
+ const minutesRef = (0,external_react_namespaceObject.useRef)(null);
24831
+ const step = Number.isFinite(minuteStep) && minuteStep > 0 && minuteStep <= 60 ? Math.floor(minuteStep) : DEFAULT_MINUTE_STEP;
24832
+ const hours = Array.from({
24833
+ length: HOURS_IN_DAY
24834
+ }, (_, index) => index);
24835
+ const minutes = Array.from({
24836
+ length: Math.ceil(MINUTES_IN_HOUR / step)
24837
+ }, (_, index) => index * step);
24838
+ const selectedHour = dateTime?.hour;
24839
+ // The selected minute rarely lands exactly on a step, so highlight the step
24840
+ // it belongs to rather than nothing at all.
24841
+ const selectedMinute = dateTime && Number.isFinite(dateTime.minute) ? Math.floor(dateTime.minute / step) * step : undefined;
24842
+ (0,external_react_namespaceObject.useEffect)(() => {
24843
+ if (!isOpen) return;
24844
+ centreOnSelected(hoursRef.current);
24845
+ centreOnSelected(minutesRef.current);
24846
+ }, [isOpen, selectedHour, selectedMinute]);
24847
+ return (0,jsx_runtime_namespaceObject.jsxs)(TimePanel, {
24848
+ "data-testid": "datepicker-time-panel",
24849
+ children: [(0,jsx_runtime_namespaceObject.jsx)(TimeColumn, {
24850
+ ref: hoursRef,
24851
+ role: "listbox",
24852
+ "aria-label": "Hours",
24853
+ children: hours.map(hour => (0,jsx_runtime_namespaceObject.jsx)(TimeCell, {
24854
+ role: "option",
24855
+ "aria-selected": selectedHour === hour,
24856
+ "aria-label": `${pad(hour)} hours`,
24857
+ isSelected: selectedHour === hour,
24858
+ onClick: () => setTime?.({
24859
+ hour
24860
+ }),
24861
+ children: pad(hour)
24862
+ }, `hour-${hour}`))
24863
+ }), (0,jsx_runtime_namespaceObject.jsx)(TimeColumn, {
24864
+ ref: minutesRef,
24865
+ role: "listbox",
24866
+ "aria-label": "Minutes",
24867
+ children: minutes.map(minute => (0,jsx_runtime_namespaceObject.jsx)(TimeCell, {
24868
+ role: "option",
24869
+ "aria-selected": selectedMinute === minute,
24870
+ "aria-label": `${pad(minute)} minutes`,
24871
+ isSelected: selectedMinute === minute,
24872
+ onClick: () => setTime?.({
24873
+ minute
24874
+ }),
24875
+ children: pad(minute)
24876
+ }, `minute-${minute}`))
24877
+ })]
24878
+ });
24879
+ };
24572
24880
  ;// ./src/components/DatePicker/components/DatePickerCalendar.tsx
24573
24881
  function DatePickerCalendar_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)."; }
24574
24882
 
@@ -24578,8 +24886,8 @@ function DatePickerCalendar_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have
24578
24886
 
24579
24887
 
24580
24888
  var DatePickerCalendar_ref = true ? {
24581
- name: "14ggdrv",
24582
- styles: "height:100%;display:flex;flex-direction:column;justify-content:space-between"
24889
+ name: "16fpk5u",
24890
+ styles: "height:100%;width:100%;display:flex;flex-direction:column;justify-content:space-between"
24583
24891
  } : 0;
24584
24892
  const DatePickerCalendar = () => {
24585
24893
  const theme = (0,react_namespaceObject.useTheme)();
@@ -24590,7 +24898,8 @@ const DatePickerCalendar = () => {
24590
24898
  };
24591
24899
  const {
24592
24900
  calendarType,
24593
- classNames
24901
+ classNames,
24902
+ showTimePicker
24594
24903
  } = useDatePickerContext();
24595
24904
  const Component = components[calendarType];
24596
24905
  return (0,jsx_runtime_namespaceObject.jsxs)(PopoverContent, {
@@ -24599,18 +24908,59 @@ const DatePickerCalendar = () => {
24599
24908
  background: theme.colors.white,
24600
24909
  boxShadow: `-4px 4px 14px 0px ${theme.colors.greyDarker14}`,
24601
24910
  borderRadius: 16,
24602
- padding: 24,
24603
- paddingTop: 16,
24604
- width: 346,
24605
- height: 370,
24911
+ // The calendar keeps its own 24px padding; the time panel brings its
24912
+ // own, so the padding moves inside when both are shown.
24913
+ padding: showTimePicker ? 0 : 24,
24914
+ paddingTop: showTimePicker ? 0 : 16,
24915
+ // 328 calendar + 144 time panel, per the Figma Day & Time pop-up.
24916
+ width: showTimePicker ? 472 : 328,
24917
+ height: 368,
24918
+ flexDirection: 'row',
24606
24919
  alignItems: 'flex-start',
24607
24920
  zIndex: 100
24608
24921
  }, true ? "" : 0, true ? "" : 0),
24609
- children: [(0,jsx_runtime_namespaceObject.jsx)(DatePickerHeader, {}), (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
24610
- as: "div",
24611
- css: DatePickerCalendar_ref,
24612
- children: (0,jsx_runtime_namespaceObject.jsx)(Component, {})
24613
- })]
24922
+ children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
24923
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
24924
+ display: 'flex',
24925
+ flexDirection: 'column',
24926
+ alignItems: 'flex-start',
24927
+ flexShrink: 0,
24928
+ width: showTimePicker ? 328 : '100%',
24929
+ height: '100%',
24930
+ padding: showTimePicker ? '16px 24px 24px' : 0
24931
+ }, true ? "" : 0, true ? "" : 0),
24932
+ children: [(0,jsx_runtime_namespaceObject.jsx)(DatePickerHeader, {}), (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
24933
+ as: "div",
24934
+ css: DatePickerCalendar_ref,
24935
+ children: (0,jsx_runtime_namespaceObject.jsx)(Component, {})
24936
+ })]
24937
+ }), showTimePicker && (0,jsx_runtime_namespaceObject.jsx)(DatePickerTimePanel, {})]
24938
+ });
24939
+ };
24940
+ ;// ./src/components/DatePicker/components/ClearButton.tsx
24941
+
24942
+
24943
+
24944
+ const ClearButton = ({
24945
+ onClick,
24946
+ ariaLabel,
24947
+ dataTestId,
24948
+ className,
24949
+ css: cssProp
24950
+ }) => {
24951
+ const theme = (0,react_namespaceObject.useTheme)();
24952
+ return (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
24953
+ endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
24954
+ name: "cross",
24955
+ size: 16,
24956
+ color: theme.colors.greyDarker80
24957
+ }),
24958
+ "data-testid": dataTestId,
24959
+ onClick: onClick,
24960
+ variant: "tertiary",
24961
+ "aria-label": ariaLabel,
24962
+ className: className,
24963
+ css: ["padding:0;&:focus::before{display:none;}", cssProp, true ? "" : 0, true ? "" : 0]
24614
24964
  });
24615
24965
  };
24616
24966
  ;// ./src/components/DatePicker/components/DatePickerTrigger.tsx
@@ -24623,6 +24973,11 @@ function DatePickerTrigger_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have t
24623
24973
 
24624
24974
 
24625
24975
 
24976
+
24977
+ var DatePickerTrigger_ref = true ? {
24978
+ name: "sbd56d",
24979
+ styles: "gap:16px;align-items:center"
24980
+ } : 0;
24626
24981
  const DatePickerTrigger = () => {
24627
24982
  const {
24628
24983
  format,
@@ -24634,7 +24989,11 @@ const DatePickerTrigger = () => {
24634
24989
  inputProps,
24635
24990
  disabled,
24636
24991
  helperText,
24992
+ success,
24637
24993
  showCalendarIcon,
24994
+ showClearButton,
24995
+ isDirty,
24996
+ resetToDefault,
24638
24997
  onBlur: handleBlur,
24639
24998
  setIsOpen,
24640
24999
  validationSchema
@@ -24654,7 +25013,12 @@ const DatePickerTrigger = () => {
24654
25013
  }
24655
25014
  } = hookFormResult;
24656
25015
  const fieldError = errors[name];
24657
- const fieldStatus = fieldError?.message ? 'error' : 'basic';
25016
+ let fieldStatus = 'basic';
25017
+ if (fieldError?.message) {
25018
+ fieldStatus = 'error';
25019
+ } else if (success) {
25020
+ fieldStatus = 'success';
25021
+ }
24658
25022
  const toggleOpen = () => {
24659
25023
  setIsOpen(current => !current);
24660
25024
  };
@@ -24687,6 +25051,20 @@ const DatePickerTrigger = () => {
24687
25051
  }
24688
25052
  }, true ? "" : 0, true ? "" : 0)
24689
25053
  }) : undefined;
25054
+ const clearButton = showClearButton && isDirty && !disabled ? (0,jsx_runtime_namespaceObject.jsx)(ClearButton, {
25055
+ dataTestId: "datepicker-clear-button",
25056
+ onClick: () => resetToDefault?.(),
25057
+ ariaLabel: "Clear date",
25058
+ className: classNames?.trigger?.clearButton
25059
+ }) : undefined;
25060
+
25061
+ // Figma groups the trailing actions with a 16px gap; rendering them as a
25062
+ // single `endElement` keeps Input's absolute positioning applying to the
25063
+ // group rather than to each button.
25064
+ const actions = clearButton || calendarButton ? (0,jsx_runtime_namespaceObject.jsxs)(Wrapper_Wrapper, {
25065
+ css: DatePickerTrigger_ref,
25066
+ children: [clearButton, calendarButton]
25067
+ }) : undefined;
24690
25068
  return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
24691
25069
  children: [label && (0,jsx_runtime_namespaceObject.jsx)(Label_Label, {
24692
25070
  htmlFor: name,
@@ -24719,7 +25097,7 @@ const DatePickerTrigger = () => {
24719
25097
  name: "lhoo11",
24720
25098
  styles: "&>span::first-letter{text-transform:uppercase;}"
24721
25099
  } : 0),
24722
- endElement: calendarButton
25100
+ endElement: actions
24723
25101
  })
24724
25102
  })]
24725
25103
  });
@@ -24922,132 +25300,33 @@ const getFormatForRangePickerType = rangePickerType => {
24922
25300
  ;// ./src/components/DateRangePicker/components/DatesListWrapper.tsx
24923
25301
 
24924
25302
 
25303
+
25304
+ /**
25305
+ * Wraps the date grid and styles the "range you are about to pick" preview
25306
+ * band that appears between a selected anchor and the currently hovered cell.
25307
+ *
25308
+ * The band is a translucent fill with a hairline top/bottom rule, capped with
25309
+ * a rounded corner at each end — so which cell is the left cap and which is
25310
+ * the right depends on the direction being previewed:
25311
+ *
25312
+ * - **`hover-range-from`** — hovering *before* the start anchor, so the
25313
+ * hovered cell is the left cap and the selected anchor is the right.
25314
+ * - **`hover-range-to`** — hovering *after* the end anchor, so the selected
25315
+ * anchor is the left cap and the hovered cell is the right.
25316
+ */
24925
25317
  const DatesListWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
24926
25318
  target: "e10i52w40"
24927
- } : 0)("flex-wrap:wrap;&>div.hover-range-from.date-hovered,&>div.hover-range-to.date-hovered{background:", ({
24928
- theme
24929
- }) => theme.colors.greyLighter, ";border-left:none;border-top-left-radius:6px;border-bottom-left-radius:6px;}&>div.hover-range-from:not(.selected-range-from, .date-hovered),&>div.hover-range-to:not(.selected-range-to, .date-hovered){background:", ({
24930
- theme
24931
- }) => theme.colors.greyLighter60, ";border-radius:0;}&>div.hover-range-from.selected-range-from::after,&>div.hover-range-from.date-hovered::after,&>div.hover-range-to.selected-range-to::after,&>div.hover-range-to.date-hovered::after{content:'';position:absolute;width:10px;height:40px;z-index:-1;background:", ({
24932
- theme
24933
- }) => theme.colors.greyLighter60, ";}&>div.hover-range-from.selected-range-from::after,&>div.hover-range-to.date-hovered::after{left:0;}&>div.hover-range-from.date-hovered::after,&>div.hover-range-to.selected-range-to::after{right:0;}&>div.hover-range-form.selected-range-from:has(~ div.date-hovered)::after,&>div.hover-range-to.selected-range-to:has(+ div.date-hovered)::after,&>div.date-hovered:has(+ div.selected-range-from)::after,&>div.hover-range-to.selected-range-to+div.date-hovered::after,&>div.date-hovered+div.selected-range-from::after{background:", ({
24934
- theme
24935
- }) => theme.colors.greyLighter, ";}" + ( true ? "" : 0));
24936
- ;// ./src/components/DateRangePicker/styles.ts
24937
-
24938
- function DateRangePicker_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)."; }
24939
-
24940
- const styles_DaysViewCell = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
24941
- target: "e19l41fq3"
24942
- } : 0)("position:relative;width:40px;height:40px;justify-content:center;font-size:14px;font-weight:500;border-radius:", ({
24943
- isHighlighted
24944
- }) => isHighlighted ? 0 : '6px', ";border:", ({
24945
- theme,
24946
- isCalendarDateNow
24947
- }) => isCalendarDateNow ? `1px solid ${theme.colors.greyFocused}` : 'none', ";color:", ({
24948
- theme,
24949
- isCalendarDateSelected
24950
- }) => isCalendarDateSelected ? theme.colors.white : theme.colors.greyDarker, ";background:", ({
24951
- theme,
24952
- isCalendarDateSelected
24953
- }) => isCalendarDateSelected && theme.palette.primary.main, ";cursor:pointer;user-select:none;&[aria-disabled='true']{color:", ({
24954
- theme
24955
- }) => theme.colors.grey, ";cursor:default;pointer-events:none;}&[aria-disabled='false']{background:", ({
24956
- theme,
24957
- isCalendarDateSelected,
24958
- isHighlighted
24959
- }) => isHighlighted && !isCalendarDateSelected && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
24960
- theme
24961
- }) => theme.colors.greyLighter, ";color:", ({
24962
- theme
24963
- }) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
24964
- isCalendarFirstDateSelected,
24965
- isCalendarSecondDateSelected
24966
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
24967
- isCalendarSecondDateSelected
24968
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
24969
- isCalendarFirstDateSelected
24970
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
24971
- theme
24972
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}}&:hover{border:", ({
24973
- theme,
24974
- isCalendarDateNow
24975
- }) => isCalendarDateNow && `1px solid ${theme.colors.greyFocused}`, ";}" + ( true ? "" : 0));
24976
- const styles_YearsViewCell = /*#__PURE__*/base_default()("div", true ? {
24977
- target: "e19l41fq2"
24978
- } : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:70px;height:40px;border-radius:", ({
24979
- isCalendarFirstDateSelected,
24980
- isCalendarSecondDateSelected
24981
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500px;user-select:none;cursor:pointer;color:", ({
24982
- theme,
24983
- isCalendarYear,
24984
- isCalendarFirstDateSelected,
24985
- isCalendarSecondDateSelected
24986
- }) => (isCalendarYear || isCalendarFirstDateSelected || isCalendarSecondDateSelected) && theme.colors.white, ";background:", ({
24987
- theme,
24988
- isCalendarYear,
24989
- isCalendarFirstDateSelected,
24990
- isCalendarSecondDateSelected
24991
- }) => isCalendarYear || isCalendarFirstDateSelected || isCalendarSecondDateSelected ? theme.palette.primary.main : 'none', ";background:", ({
24992
- theme,
24993
- isHighlighted,
24994
- isCalendarYear,
24995
- isCalendarSecondDateSelected
24996
- }) => isHighlighted && !isCalendarYear && !isCalendarSecondDateSelected && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
25319
+ } : 0)("flex-wrap:wrap;&>div.hover-range-from:not(.selected-range-from),&>div.hover-range-to:not(.selected-range-to){background:", ({
24997
25320
  theme
24998
- }) => theme.colors.greyLighter, ";color:", ({
25321
+ }) => theme.colors.greyPale16, ";border-top:1px solid ", ({
24999
25322
  theme
25000
- }) => theme.colors.greyDarker, ";border-radius:6px;}&::before{content:'';display:", ({
25001
- isCalendarFirstDateSelected,
25002
- isCalendarSecondDateSelected
25003
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
25004
- isCalendarSecondDateSelected
25005
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
25006
- isCalendarFirstDateSelected
25007
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
25323
+ }) => theme.palette.secondary.light, ";border-bottom:1px solid ", ({
25008
25324
  theme
25009
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}" + ( true ? "" : 0));
25010
- const styles_MonthsViewCell = /*#__PURE__*/base_default()("div", true ? {
25011
- target: "e19l41fq1"
25012
- } : 0)("display:flex;justify-content:center;position:relative;align-items:center;width:99px;height:40px;border-radius:", ({
25013
- isCalendarFirstDateSelected,
25014
- isCalendarSecondDateSelected
25015
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? '6px' : 0, ";font-size:14px;font-weight:500;cursor:pointer;color:", ({
25016
- theme,
25017
- isCalendarFirstDateSelected,
25018
- isCalendarSecondDateSelected
25019
- }) => (isCalendarFirstDateSelected || isCalendarSecondDateSelected) && theme.colors.white, ";user-select:none;background:", ({
25020
- theme,
25021
- isCalendarFirstDateSelected,
25022
- isCalendarSecondDateSelected
25023
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? theme.palette.primary.main : 'none', ";&[aria-disabled='true']{cursor:default;pointer-events:none;color:", ({
25325
+ }) => theme.palette.secondary.light, ";border-radius:0;}&>div.hover-range-from.date-hovered,&>div.hover-range-to.selected-range-to{border-left:1px solid ", ({
25024
25326
  theme
25025
- }) => theme.colors.greyDarker, ";background:", ({
25327
+ }) => theme.palette.secondary.light, ";border-top-left-radius:6px;border-bottom-left-radius:6px;}&>div.hover-range-from.selected-range-from,&>div.hover-range-to.date-hovered{border-right:1px solid ", ({
25026
25328
  theme
25027
- }) => theme.colors.grey, ";}&[aria-disabled='false']{background:", ({
25028
- theme,
25029
- isHighlighted,
25030
- isCalendarSecondDateSelected
25031
- }) => isHighlighted && !isCalendarSecondDateSelected && theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";&:hover{background:", ({
25032
- theme
25033
- }) => theme.colors.greyLighter, ";color:", ({
25034
- theme
25035
- }) => theme.colors.greyDarker, ";}&::before{content:'';display:", ({
25036
- isCalendarFirstDateSelected,
25037
- isCalendarSecondDateSelected
25038
- }) => isCalendarFirstDateSelected || isCalendarSecondDateSelected ? 'block' : 'none', ";position:absolute;width:10px;height:40px;left:", ({
25039
- isCalendarSecondDateSelected
25040
- }) => isCalendarSecondDateSelected ? '0' : 'auto', ";right:", ({
25041
- isCalendarFirstDateSelected
25042
- }) => isCalendarFirstDateSelected ? '0' : 'auto', ";z-index:-1;background:", ({
25043
- theme
25044
- }) => theme.palette.primary.main.replace('rgb(', 'rgba(').replace(')', ', 0.2)'), ";}}" + ( true ? "" : 0));
25045
- const TriggerWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
25046
- target: "e19l41fq0"
25047
- } : 0)( true ? {
25048
- name: "1h91tay",
25049
- styles: "padding:14px;cursor:default"
25050
- } : 0);
25329
+ }) => theme.palette.secondary.light, ";border-top-right-radius:6px;border-bottom-right-radius:6px;}" + ( true ? "" : 0));
25051
25330
  ;// ./src/components/DateRangePicker/utils/dates.ts
25052
25331
 
25053
25332
  const dates_getDaysForCalendarMonth = date => {
@@ -25337,13 +25616,16 @@ const useRangeSelection = ({
25337
25616
  isCalendarDateSelected
25338
25617
  };
25339
25618
  };
25619
+
25620
+ // A range only has distinct start/end edges once both anchors are set.
25621
+ const isRangeActive = !!(dateTime[0] && dateTime[1]);
25340
25622
  return {
25341
25623
  handleRangeSelect,
25342
- getDateSelectionState
25624
+ getDateSelectionState,
25625
+ isRangeActive
25343
25626
  };
25344
25627
  };
25345
25628
  ;// ./src/components/DateRangePicker/components/DaysView.tsx
25346
- 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)."; }
25347
25629
 
25348
25630
 
25349
25631
 
@@ -25353,20 +25635,12 @@ function components_DaysView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have
25353
25635
 
25354
25636
 
25355
25637
 
25356
- var components_DaysView_ref = true ? {
25357
- name: "hisq2i",
25358
- styles: "padding-left:9px"
25359
- } : 0;
25360
- var components_DaysView_ref2 = true ? {
25361
- name: "yzljcr",
25362
- styles: "width:40px;height:40px;justify-content:center;font-size:12px;font-weight:600;cursor:default;user-select:none"
25363
- } : 0;
25364
- var DaysView_ref3 = true ? {
25365
- name: "hisq2i",
25366
- styles: "padding-left:9px"
25367
- } : 0;
25638
+
25639
+
25640
+
25368
25641
  const DaysView_DaysView = () => {
25369
25642
  const weekDays = dates_getWeekDays();
25643
+ const theme = (0,react_namespaceObject.useTheme)();
25370
25644
  const {
25371
25645
  dateMinDT,
25372
25646
  dateMaxDT,
@@ -25383,7 +25657,8 @@ const DaysView_DaysView = () => {
25383
25657
  } = useRangeHighlighting();
25384
25658
  const {
25385
25659
  handleRangeSelect,
25386
- getDateSelectionState
25660
+ getDateSelectionState,
25661
+ isRangeActive
25387
25662
  } = useRangeSelection({
25388
25663
  createNewDate: selectedDay => currentCalendarViewDT.set({
25389
25664
  day: Number(selectedDay)
@@ -25402,13 +25677,21 @@ const DaysView_DaysView = () => {
25402
25677
  };
25403
25678
  return (0,jsx_runtime_namespaceObject.jsxs)((external_react_default()).Fragment, {
25404
25679
  children: [(0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
25405
- css: components_DaysView_ref,
25406
25680
  children: weekDays.map((weekDay, index) => (0,jsx_runtime_namespaceObject.jsx)(Wrapper_Wrapper, {
25407
- css: components_DaysView_ref2,
25681
+ css: /*#__PURE__*/(0,react_namespaceObject.css)({
25682
+ width: 40,
25683
+ height: 40,
25684
+ justifyContent: 'center',
25685
+ fontSize: 12,
25686
+ fontWeight: 600,
25687
+ lineHeight: '16px',
25688
+ color: theme.colors.greyDarker80,
25689
+ cursor: 'default',
25690
+ userSelect: 'none'
25691
+ }, true ? "" : 0, true ? "" : 0),
25408
25692
  children: weekDay
25409
25693
  }, `week-day-${weekDay}-${index}`))
25410
25694
  }), (0,jsx_runtime_namespaceObject.jsx)(DatesListWrapper, {
25411
- css: DaysView_ref3,
25412
25695
  onClick: handleDaySelect,
25413
25696
  children: dates.map((currentDate, index) => {
25414
25697
  const currentDT = external_luxon_namespaceObject.DateTime.fromJSDate(currentDate).startOf('day');
@@ -25438,14 +25721,18 @@ const DaysView_DaysView = () => {
25438
25721
  isCalendarFirstDateSelected,
25439
25722
  isCalendarSecondDateSelected
25440
25723
  });
25441
- return (0,jsx_runtime_namespaceObject.jsx)(styles_DaysViewCell, {
25724
+ return (0,jsx_runtime_namespaceObject.jsx)(DaysViewCell, {
25442
25725
  "aria-disabled": isAriaDisabled,
25443
25726
  "aria-label": ariaLabel,
25444
25727
  "data-day": calendarDate,
25445
25728
  isCalendarDateNow: isCalendarDateNow,
25446
25729
  isCalendarDateSelected: isCalendarDateSelected,
25447
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
25448
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
25730
+ rangeEdge: getRangeEdge({
25731
+ isFirstSelected: isCalendarFirstDateSelected,
25732
+ isSecondSelected: isCalendarSecondDateSelected,
25733
+ isRangeActive,
25734
+ mode: 'dateFrom'
25735
+ }),
25449
25736
  isHighlighted: isHighlightDate(currentDT),
25450
25737
  className: classNames.join(' '),
25451
25738
  onMouseEnter: () => handleDateHover(currentDT),
@@ -25465,6 +25752,7 @@ function components_MonthsView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You ha
25465
25752
 
25466
25753
 
25467
25754
 
25755
+
25468
25756
  var components_MonthsView_ref = true ? {
25469
25757
  name: "icns00",
25470
25758
  styles: "padding-top:10px"
@@ -25488,7 +25776,8 @@ const MonthsView_MonthsView = () => {
25488
25776
  } = useRangeHighlighting();
25489
25777
  const {
25490
25778
  handleRangeSelect,
25491
- getDateSelectionState
25779
+ getDateSelectionState,
25780
+ isRangeActive
25492
25781
  } = useRangeSelection({
25493
25782
  createNewDate: selectedMonth => {
25494
25783
  const monthNumber = constants_MONTHS.findIndex(month => month === selectedMonth);
@@ -25547,11 +25836,16 @@ const MonthsView_MonthsView = () => {
25547
25836
  isCalendarFirstDateSelected,
25548
25837
  isCalendarSecondDateSelected
25549
25838
  });
25550
- return (0,jsx_runtime_namespaceObject.jsx)(styles_MonthsViewCell, {
25839
+ return (0,jsx_runtime_namespaceObject.jsx)(MonthsViewCell, {
25551
25840
  "aria-disabled": isAriaDisabled,
25552
25841
  "aria-label": `${month}, ${currentCalendarViewDT?.year}`,
25553
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
25554
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
25842
+ isCalendarDateSelected: isCalendarFirstDateSelected || isCalendarSecondDateSelected,
25843
+ rangeEdge: getRangeEdge({
25844
+ isFirstSelected: isCalendarFirstDateSelected,
25845
+ isSecondSelected: isCalendarSecondDateSelected,
25846
+ isRangeActive,
25847
+ mode: 'dateFrom'
25848
+ }),
25555
25849
  isHighlighted: isHighlightDate(currentMonthDT),
25556
25850
  className: classNames.join(' '),
25557
25851
  onMouseEnter: () => handleDateHover(currentMonthDT),
@@ -25571,6 +25865,7 @@ function components_YearsView_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You hav
25571
25865
 
25572
25866
 
25573
25867
 
25868
+
25574
25869
  var components_YearsView_ref = true ? {
25575
25870
  name: "1lqam8u",
25576
25871
  styles: "overflow-y:auto;height:280px;align-content:flex-start"
@@ -25603,7 +25898,8 @@ const YearsView_YearsView = () => {
25603
25898
  } = useRangeHighlighting();
25604
25899
  const {
25605
25900
  handleRangeSelect,
25606
- getDateSelectionState
25901
+ getDateSelectionState,
25902
+ isRangeActive
25607
25903
  } = useRangeSelection({
25608
25904
  createNewDate: selectedYear => {
25609
25905
  const newYear = currentCalendarViewDT?.set({
@@ -25699,11 +25995,15 @@ const YearsView_YearsView = () => {
25699
25995
  isCalendarFirstDateSelected,
25700
25996
  isCalendarSecondDateSelected
25701
25997
  });
25702
- return (0,jsx_runtime_namespaceObject.jsx)(styles_YearsViewCell, {
25998
+ return (0,jsx_runtime_namespaceObject.jsx)(YearsViewCell, {
25703
25999
  className: classNames.join(' '),
25704
- isCalendarYear: isCalendarYear,
25705
- isCalendarFirstDateSelected: isCalendarFirstDateSelected,
25706
- isCalendarSecondDateSelected: isCalendarSecondDateSelected,
26000
+ isCalendarDateSelected: isCalendarFirstDateSelected || isCalendarSecondDateSelected,
26001
+ rangeEdge: getRangeEdge({
26002
+ isFirstSelected: isCalendarFirstDateSelected,
26003
+ isSecondSelected: isCalendarSecondDateSelected,
26004
+ isRangeActive,
26005
+ mode: 'dateFrom'
26006
+ }),
25707
26007
  isHighlighted: isHighlightDate(currentYearDT),
25708
26008
  onMouseEnter: () => handleDateHover(currentYearDT),
25709
26009
  onMouseLeave: () => handleDateHover(null),
@@ -25774,7 +26074,7 @@ const YearsMonthsSwitch = () => {
25774
26074
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
25775
26075
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
25776
26076
  name: "carrot-left",
25777
- size: 14,
26077
+ size: 18,
25778
26078
  tooltip: `Previous ${rangePickerType === 'days' ? 'month' : 'year'}`,
25779
26079
  color: isMinMonthReached ? theme.colors.grey : theme.colors.greyDarker
25780
26080
  }),
@@ -25794,7 +26094,7 @@ const YearsMonthsSwitch = () => {
25794
26094
  }), (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
25795
26095
  endIcon: (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
25796
26096
  name: "carrot-right",
25797
- size: 14,
26097
+ size: 18,
25798
26098
  tooltip: `Next ${rangePickerType === 'days' ? 'month' : 'year'}`,
25799
26099
  color: isMaxMonthReached ? theme.colors.grey : theme.colors.greyDarker
25800
26100
  }),
@@ -25821,12 +26121,12 @@ function Header_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to str
25821
26121
 
25822
26122
 
25823
26123
  var Header_ref = true ? {
25824
- name: "ugcp8m",
25825
- styles: "display:flex;justify-content:space-between;width:100%;height:32px;margin-bottom:12px"
26124
+ name: "148aj7w",
26125
+ styles: "display:flex;justify-content:space-between;width:100%;height:32px;margin-bottom:8px"
25826
26126
  } : 0;
25827
26127
  var Header_ref2 = true ? {
25828
- name: "1bk2bba",
25829
- styles: "padding:0;font-size:18px;font-weight:700;line-height:24px;height:32px;gap:16px;&:focus::before{display:none;}"
26128
+ name: "15si1yg",
26129
+ styles: "padding:0;font-size:16px;font-weight:700;line-height:20px;height:32px;gap:8px;&:focus::before{display:none;}"
25830
26130
  } : 0;
25831
26131
  const Header = () => {
25832
26132
  const {
@@ -25844,7 +26144,7 @@ const Header = () => {
25844
26144
  children: [(0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
25845
26145
  endIcon: rangePickerType !== 'years' ? (0,jsx_runtime_namespaceObject.jsx)(Icon_Icon, {
25846
26146
  name: calendarType === 'days' || calendarType === 'months' ? 'carrot-down' : 'carrot-up',
25847
- size: 14,
26147
+ size: 16,
25848
26148
  tooltip: ""
25849
26149
  }) : null,
25850
26150
  variant: "tertiary",
@@ -26084,8 +26384,8 @@ const Calendar_DatePickerCalendar = () => {
26084
26384
  borderRadius: 16,
26085
26385
  padding: 24,
26086
26386
  paddingTop: 16,
26087
- width: 346,
26088
- height: showPresentOption ? 412 : 370,
26387
+ width: 328,
26388
+ height: showPresentOption ? 410 : 368,
26089
26389
  alignItems: 'flex-start',
26090
26390
  margin: '14px 0 0 -14px',
26091
26391
  zIndex: 100
@@ -26297,6 +26597,24 @@ const TriggerStatusArea = () => {
26297
26597
  })]
26298
26598
  });
26299
26599
  };
26600
+ ;// ./src/components/DateRangePicker/styles.ts
26601
+
26602
+ function DateRangePicker_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)."; }
26603
+
26604
+
26605
+ /*
26606
+ * The calendar cells are identical to the single-date picker's, so they live in
26607
+ * `DatePicker/styles.ts` and are re-exported here. Keeping one definition means
26608
+ * a token, geometry, or range-edge fix lands in both pickers at once — the two
26609
+ * files having drifted apart is exactly what this avoids.
26610
+ */
26611
+
26612
+ const TriggerWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true ? {
26613
+ target: "e19l41fq0"
26614
+ } : 0)( true ? {
26615
+ name: "1h91tay",
26616
+ styles: "padding:14px;cursor:default"
26617
+ } : 0);
26300
26618
  ;// ./src/components/DateRangePicker/components/Trigger.tsx
26301
26619
 
26302
26620
  function Trigger_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)."; }
@@ -26309,10 +26627,15 @@ function Trigger_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried to st
26309
26627
 
26310
26628
 
26311
26629
 
26630
+
26312
26631
  var Trigger_ref = true ? {
26313
26632
  name: "cx8u11",
26314
26633
  styles: "margin:0 3px;cursor:pointer"
26315
26634
  } : 0;
26635
+ var Trigger_ref2 = true ? {
26636
+ name: "oc2msk",
26637
+ styles: "margin:0 0 0 10px;height:auto;cursor:pointer"
26638
+ } : 0;
26316
26639
  const Trigger = () => {
26317
26640
  const {
26318
26641
  nameFrom,
@@ -26323,7 +26646,10 @@ const Trigger = () => {
26323
26646
  status,
26324
26647
  isOpen,
26325
26648
  showCalendarIcon,
26649
+ showClearButton,
26326
26650
  showStatusArea,
26651
+ isDirty,
26652
+ resetToDefault,
26327
26653
  classNames,
26328
26654
  setIsOpen,
26329
26655
  handleToggleOpen
@@ -26369,6 +26695,12 @@ const Trigger = () => {
26369
26695
  }), (0,jsx_runtime_namespaceObject.jsx)(TriggerInput, {
26370
26696
  datepickerType: "to",
26371
26697
  className: classNames?.trigger?.inputTo
26698
+ }), showClearButton && isDirty && !disabled && (0,jsx_runtime_namespaceObject.jsx)(ClearButton, {
26699
+ dataTestId: "daterangepicker-clear-button",
26700
+ onClick: () => resetToDefault?.(),
26701
+ ariaLabel: "Clear dates",
26702
+ className: classNames?.trigger?.clearButton,
26703
+ css: Trigger_ref2
26372
26704
  }), showCalendarIcon && (0,jsx_runtime_namespaceObject.jsx)(PopoverTrigger, {
26373
26705
  asChild: true,
26374
26706
  children: (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
@@ -26972,29 +27304,48 @@ const useDateRangePicker = ({
26972
27304
  setIsOpen(isOpenState);
26973
27305
  }
26974
27306
  }, [isOpenState]);
27307
+
27308
+ /**
27309
+ * Applies **`defaultValue`** to every piece of range state at once. Shared
27310
+ * by the mount effect and the clear button, so resetting lands the picker in
27311
+ * exactly the state it booted in — including the "Present" end date.
27312
+ */
27313
+ const applyDefaultValue = (0,external_react_namespaceObject.useCallback)(() => {
27314
+ const defaultDateTimeFrom = typeof defaultValue?.[0] === 'string' && defaultValue[0].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[0], luxonFormat) : undefined;
27315
+ const defaultDateTimeTo = typeof defaultValue?.[1] === 'string' && defaultValue[1].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[1], luxonFormat) : undefined;
27316
+
27317
+ // Handle null end date (represents "Present")
27318
+ const isEndPresent = defaultValue?.[1] === null;
27319
+ setIsEndDatePresent(isEndPresent);
27320
+ const newDateTime = [defaultDateTimeFrom?.isValid ? defaultDateTimeFrom.startOf('day') : undefined, isEndPresent ? undefined : defaultDateTimeTo?.isValid ? defaultDateTimeTo.startOf('day') : undefined];
27321
+ setDateTime(newDateTime);
27322
+ setLastChangedDate([newDateTime[0]?.toJSDate(), isEndPresent ? null : newDateTime[1]?.toJSDate()]);
27323
+ // Sync calendar view with default dates so they're visible when calendar opens
27324
+ setCalendarViewDateTime([newDateTime[0] || newDateTime[1] || undefined, newDateTime[1] || newDateTime[0] || undefined]);
27325
+ setValue(nameFrom, newDateTime[0]?.toFormat(luxonFormat) ?? '');
27326
+ // Keep form value empty when "Present" to avoid mask errors
27327
+ // "Present" is displayed via displayValue override in TriggerInput
27328
+ setValue(nameTo, isEndPresent ? '' : newDateTime[1]?.toFormat(luxonFormat) ?? '');
27329
+ return newDateTime;
27330
+ }, [defaultValue, expectedDateLength, luxonFormat, nameFrom, nameTo, setCalendarViewDateTime, setValue]);
27331
+
27332
+ // Whether either field has moved away from its default, which is what makes
27333
+ // the clear button meaningful.
27334
+ const isDirty = (inputValueFrom ?? '') !== (defaultValue?.[0] ?? '') || (inputValueTo ?? '') !== (defaultValue?.[1] === null ? '' : defaultValue?.[1] ?? '');
27335
+ const resetToDefault = (0,external_react_namespaceObject.useCallback)(() => {
27336
+ const newDateTime = applyDefaultValue();
27337
+ // A reset restarts range selection from the beginning.
27338
+ setRangeSelectionStep(newDateTime[0] && newDateTime[1] ? null : 'start');
27339
+ setLastFocusedElement('from');
27340
+ onChange?.([newDateTime[0]?.toJSDate(), defaultValue?.[1] === null ? null : newDateTime[1]?.toJSDate()]);
27341
+ }, [applyDefaultValue, defaultValue, onChange]);
26975
27342
  (0,external_react_namespaceObject.useEffect)(() => {
26976
27343
  // Only process defaultValue once on mount to avoid re-processing
26977
27344
  if (Array.isArray(defaultValue) && !defaultValueProcessed.current) {
26978
- const defaultDateTimeFrom = typeof defaultValue[0] === 'string' && defaultValue[0].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[0], luxonFormat) : undefined;
26979
- const defaultDateTimeTo = typeof defaultValue[1] === 'string' && defaultValue[1].length === expectedDateLength ? external_luxon_namespaceObject.DateTime.fromFormat(defaultValue[1], luxonFormat) : undefined;
26980
-
26981
- // Handle null end date (represents "Present")
26982
- const isEndPresent = defaultValue[1] === null;
26983
- if (isEndPresent) {
26984
- setIsEndDatePresent(true);
26985
- }
26986
- const newDateTime = [defaultDateTimeFrom?.isValid ? defaultDateTimeFrom.startOf('day') : undefined, isEndPresent ? undefined : defaultDateTimeTo?.isValid ? defaultDateTimeTo.startOf('day') : undefined];
26987
- setDateTime(newDateTime);
26988
- setLastChangedDate([newDateTime[0]?.toJSDate(), isEndPresent ? null : newDateTime[1]?.toJSDate()]);
26989
- // Sync calendar view with default dates so they're visible when calendar opens
26990
- setCalendarViewDateTime([newDateTime[0] || newDateTime[1] || undefined, newDateTime[1] || newDateTime[0] || undefined]);
26991
- setValue(nameFrom, newDateTime[0]?.toFormat(luxonFormat));
26992
- // Keep form value empty when "Present" to avoid mask errors
26993
- // "Present" is displayed via displayValue override in TriggerInput
26994
- setValue(nameTo, isEndPresent ? '' : newDateTime[1]?.toFormat(luxonFormat));
27345
+ applyDefaultValue();
26995
27346
  defaultValueProcessed.current = true;
26996
27347
  }
26997
- }, [defaultValue, expectedDateLength, luxonFormat, nameFrom, nameTo, setCalendarViewDateTime, setValue, _name]);
27348
+ }, [defaultValue, applyDefaultValue]);
26998
27349
  return {
26999
27350
  formatIndexes,
27000
27351
  dateMinParts,
@@ -27014,6 +27365,8 @@ const useDateRangePicker = ({
27014
27365
  currentIndex,
27015
27366
  currentCalendarViewDT,
27016
27367
  isOpen,
27368
+ isDirty,
27369
+ resetToDefault,
27017
27370
  status,
27018
27371
  inputFromRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRefFrom, inputFromRef]),
27019
27372
  inputToRef: (0,external_floating_ui_react_namespaceObject.useMergeRefs)([maskInputRefTo, inputToRef]),
@@ -30281,7 +30634,7 @@ var FiltersMultiSelect_ref2 = true ? {
30281
30634
  name: "1a5utpy",
30282
30635
  styles: "gap:8px;flex-wrap:wrap;flex-grow:1"
30283
30636
  } : 0;
30284
- var FiltersMultiSelect_ref3 = true ? {
30637
+ var _ref3 = true ? {
30285
30638
  name: "chpy5q",
30286
30639
  styles: "with:auto;border:0 !important;padding:2px 0;height:32px;border-radius:0"
30287
30640
  } : 0;
@@ -30392,7 +30745,7 @@ const FiltersMultiSelect = ({
30392
30745
  name: "1sblf6",
30393
30746
  styles: "width:auto!important;flex-grow:1"
30394
30747
  } : 0),
30395
- css: FiltersMultiSelect_ref3
30748
+ css: _ref3
30396
30749
  })]
30397
30750
  }), (0,jsx_runtime_namespaceObject.jsx)(Button_Button, {
30398
30751
  "data-testid": "clear-all-filters",
@@ -41772,7 +42125,7 @@ var pads = {"-": "", "_": " ", "0": "0"},
41772
42125
  percentRe = /^%/,
41773
42126
  requoteRe = /[\\^$*+?|[\]().{}]/g;
41774
42127
 
41775
- function pad(value, fill, width) {
42128
+ function locale_pad(value, fill, width) {
41776
42129
  var sign = value < 0 ? "-" : "",
41777
42130
  string = (sign ? -value : value) + "",
41778
42131
  length = string.length;
@@ -41892,23 +42245,23 @@ function parseUnixTimestampSeconds(d, string, i) {
41892
42245
  }
41893
42246
 
41894
42247
  function formatDayOfMonth(d, p) {
41895
- return pad(d.getDate(), p, 2);
42248
+ return locale_pad(d.getDate(), p, 2);
41896
42249
  }
41897
42250
 
41898
42251
  function formatHour24(d, p) {
41899
- return pad(d.getHours(), p, 2);
42252
+ return locale_pad(d.getHours(), p, 2);
41900
42253
  }
41901
42254
 
41902
42255
  function formatHour12(d, p) {
41903
- return pad(d.getHours() % 12 || 12, p, 2);
42256
+ return locale_pad(d.getHours() % 12 || 12, p, 2);
41904
42257
  }
41905
42258
 
41906
42259
  function formatDayOfYear(d, p) {
41907
- return pad(1 + src_day.count(src_year(d), d), p, 3);
42260
+ return locale_pad(1 + src_day.count(src_year(d), d), p, 3);
41908
42261
  }
41909
42262
 
41910
42263
  function formatMilliseconds(d, p) {
41911
- return pad(d.getMilliseconds(), p, 3);
42264
+ return locale_pad(d.getMilliseconds(), p, 3);
41912
42265
  }
41913
42266
 
41914
42267
  function formatMicroseconds(d, p) {
@@ -41916,15 +42269,15 @@ function formatMicroseconds(d, p) {
41916
42269
  }
41917
42270
 
41918
42271
  function formatMonthNumber(d, p) {
41919
- return pad(d.getMonth() + 1, p, 2);
42272
+ return locale_pad(d.getMonth() + 1, p, 2);
41920
42273
  }
41921
42274
 
41922
42275
  function formatMinutes(d, p) {
41923
- return pad(d.getMinutes(), p, 2);
42276
+ return locale_pad(d.getMinutes(), p, 2);
41924
42277
  }
41925
42278
 
41926
42279
  function formatSeconds(d, p) {
41927
- return pad(d.getSeconds(), p, 2);
42280
+ return locale_pad(d.getSeconds(), p, 2);
41928
42281
  }
41929
42282
 
41930
42283
  function formatWeekdayNumberMonday(d) {
@@ -41933,7 +42286,7 @@ function formatWeekdayNumberMonday(d) {
41933
42286
  }
41934
42287
 
41935
42288
  function formatWeekNumberSunday(d, p) {
41936
- return pad(sunday.count(src_year(d) - 1, d), p, 2);
42289
+ return locale_pad(sunday.count(src_year(d) - 1, d), p, 2);
41937
42290
  }
41938
42291
 
41939
42292
  function dISO(d) {
@@ -41943,7 +42296,7 @@ function dISO(d) {
41943
42296
 
41944
42297
  function formatWeekNumberISO(d, p) {
41945
42298
  d = dISO(d);
41946
- return pad(thursday.count(src_year(d), d) + (src_year(d).getDay() === 4), p, 2);
42299
+ return locale_pad(thursday.count(src_year(d), d) + (src_year(d).getDay() === 4), p, 2);
41947
42300
  }
41948
42301
 
41949
42302
  function formatWeekdayNumberSunday(d) {
@@ -41951,53 +42304,53 @@ function formatWeekdayNumberSunday(d) {
41951
42304
  }
41952
42305
 
41953
42306
  function formatWeekNumberMonday(d, p) {
41954
- return pad(monday.count(src_year(d) - 1, d), p, 2);
42307
+ return locale_pad(monday.count(src_year(d) - 1, d), p, 2);
41955
42308
  }
41956
42309
 
41957
42310
  function formatYear(d, p) {
41958
- return pad(d.getFullYear() % 100, p, 2);
42311
+ return locale_pad(d.getFullYear() % 100, p, 2);
41959
42312
  }
41960
42313
 
41961
42314
  function formatYearISO(d, p) {
41962
42315
  d = dISO(d);
41963
- return pad(d.getFullYear() % 100, p, 2);
42316
+ return locale_pad(d.getFullYear() % 100, p, 2);
41964
42317
  }
41965
42318
 
41966
42319
  function formatFullYear(d, p) {
41967
- return pad(d.getFullYear() % 10000, p, 4);
42320
+ return locale_pad(d.getFullYear() % 10000, p, 4);
41968
42321
  }
41969
42322
 
41970
42323
  function formatFullYearISO(d, p) {
41971
42324
  var day = d.getDay();
41972
42325
  d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d);
41973
- return pad(d.getFullYear() % 10000, p, 4);
42326
+ return locale_pad(d.getFullYear() % 10000, p, 4);
41974
42327
  }
41975
42328
 
41976
42329
  function formatZone(d) {
41977
42330
  var z = d.getTimezoneOffset();
41978
42331
  return (z > 0 ? "-" : (z *= -1, "+"))
41979
- + pad(z / 60 | 0, "0", 2)
41980
- + pad(z % 60, "0", 2);
42332
+ + locale_pad(z / 60 | 0, "0", 2)
42333
+ + locale_pad(z % 60, "0", 2);
41981
42334
  }
41982
42335
 
41983
42336
  function formatUTCDayOfMonth(d, p) {
41984
- return pad(d.getUTCDate(), p, 2);
42337
+ return locale_pad(d.getUTCDate(), p, 2);
41985
42338
  }
41986
42339
 
41987
42340
  function formatUTCHour24(d, p) {
41988
- return pad(d.getUTCHours(), p, 2);
42341
+ return locale_pad(d.getUTCHours(), p, 2);
41989
42342
  }
41990
42343
 
41991
42344
  function formatUTCHour12(d, p) {
41992
- return pad(d.getUTCHours() % 12 || 12, p, 2);
42345
+ return locale_pad(d.getUTCHours() % 12 || 12, p, 2);
41993
42346
  }
41994
42347
 
41995
42348
  function formatUTCDayOfYear(d, p) {
41996
- return pad(1 + src_utcDay.count(src_utcYear(d), d), p, 3);
42349
+ return locale_pad(1 + src_utcDay.count(src_utcYear(d), d), p, 3);
41997
42350
  }
41998
42351
 
41999
42352
  function formatUTCMilliseconds(d, p) {
42000
- return pad(d.getUTCMilliseconds(), p, 3);
42353
+ return locale_pad(d.getUTCMilliseconds(), p, 3);
42001
42354
  }
42002
42355
 
42003
42356
  function formatUTCMicroseconds(d, p) {
@@ -42005,15 +42358,15 @@ function formatUTCMicroseconds(d, p) {
42005
42358
  }
42006
42359
 
42007
42360
  function formatUTCMonthNumber(d, p) {
42008
- return pad(d.getUTCMonth() + 1, p, 2);
42361
+ return locale_pad(d.getUTCMonth() + 1, p, 2);
42009
42362
  }
42010
42363
 
42011
42364
  function formatUTCMinutes(d, p) {
42012
- return pad(d.getUTCMinutes(), p, 2);
42365
+ return locale_pad(d.getUTCMinutes(), p, 2);
42013
42366
  }
42014
42367
 
42015
42368
  function formatUTCSeconds(d, p) {
42016
- return pad(d.getUTCSeconds(), p, 2);
42369
+ return locale_pad(d.getUTCSeconds(), p, 2);
42017
42370
  }
42018
42371
 
42019
42372
  function formatUTCWeekdayNumberMonday(d) {
@@ -42022,7 +42375,7 @@ function formatUTCWeekdayNumberMonday(d) {
42022
42375
  }
42023
42376
 
42024
42377
  function formatUTCWeekNumberSunday(d, p) {
42025
- return pad(utcSunday.count(src_utcYear(d) - 1, d), p, 2);
42378
+ return locale_pad(utcSunday.count(src_utcYear(d) - 1, d), p, 2);
42026
42379
  }
42027
42380
 
42028
42381
  function UTCdISO(d) {
@@ -42032,7 +42385,7 @@ function UTCdISO(d) {
42032
42385
 
42033
42386
  function formatUTCWeekNumberISO(d, p) {
42034
42387
  d = UTCdISO(d);
42035
- return pad(utcThursday.count(src_utcYear(d), d) + (src_utcYear(d).getUTCDay() === 4), p, 2);
42388
+ return locale_pad(utcThursday.count(src_utcYear(d), d) + (src_utcYear(d).getUTCDay() === 4), p, 2);
42036
42389
  }
42037
42390
 
42038
42391
  function formatUTCWeekdayNumberSunday(d) {
@@ -42040,26 +42393,26 @@ function formatUTCWeekdayNumberSunday(d) {
42040
42393
  }
42041
42394
 
42042
42395
  function formatUTCWeekNumberMonday(d, p) {
42043
- return pad(utcMonday.count(src_utcYear(d) - 1, d), p, 2);
42396
+ return locale_pad(utcMonday.count(src_utcYear(d) - 1, d), p, 2);
42044
42397
  }
42045
42398
 
42046
42399
  function formatUTCYear(d, p) {
42047
- return pad(d.getUTCFullYear() % 100, p, 2);
42400
+ return locale_pad(d.getUTCFullYear() % 100, p, 2);
42048
42401
  }
42049
42402
 
42050
42403
  function formatUTCYearISO(d, p) {
42051
42404
  d = UTCdISO(d);
42052
- return pad(d.getUTCFullYear() % 100, p, 2);
42405
+ return locale_pad(d.getUTCFullYear() % 100, p, 2);
42053
42406
  }
42054
42407
 
42055
42408
  function formatUTCFullYear(d, p) {
42056
- return pad(d.getUTCFullYear() % 10000, p, 4);
42409
+ return locale_pad(d.getUTCFullYear() % 10000, p, 4);
42057
42410
  }
42058
42411
 
42059
42412
  function formatUTCFullYearISO(d, p) {
42060
42413
  var day = d.getUTCDay();
42061
42414
  d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d);
42062
- return pad(d.getUTCFullYear() % 10000, p, 4);
42415
+ return locale_pad(d.getUTCFullYear() % 10000, p, 4);
42063
42416
  }
42064
42417
 
42065
42418
  function formatUTCZone() {
@@ -57846,6 +58199,10 @@ const UserInfo = true ? {
57846
58199
  name: "fwy071",
57847
58200
  styles: "gap:2px;width:100%;padding:10px"
57848
58201
  } : 0;
58202
+ const TruncatedText = true ? {
58203
+ name: "1boj65s",
58204
+ styles: "max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"
58205
+ } : 0;
57849
58206
  const LogoutWrapper = theme => /*#__PURE__*/(0,react_namespaceObject.css)("width:100%;padding:10px 10px 18px 10px;border-top:0.5px solid ", theme.colors.greyGraphite70, ";" + ( true ? "" : 0), true ? "" : 0);
57850
58207
  const CustomButton = true ? {
57851
58208
  name: "1t1u438",
@@ -57864,7 +58221,9 @@ const CustomContentWrapper = /*#__PURE__*/base_default()(Wrapper_Wrapper, true
57864
58221
  theme
57865
58222
  }) => theme.colors.greyGraphite70, ";" + ( true ? "" : 0));
57866
58223
  ;// ./src/components/UserProfile/UserProfile.tsx
57867
- function UserProfile_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)."; }
58224
+
58225
+
58226
+
57868
58227
 
57869
58228
 
57870
58229
 
@@ -57948,10 +58307,6 @@ function UserProfile_EMOTION_STRINGIFIED_CSS_ERROR_() { return "You have tried t
57948
58307
  * - Semantic heading structure
57949
58308
  */
57950
58309
 
57951
- var UserProfile_ref = true ? {
57952
- name: "gxlp6o",
57953
- styles: "font-size:14px;margin-top:6px"
57954
- } : 0;
57955
58310
  const UserProfile = ({
57956
58311
  name,
57957
58312
  email,
@@ -57974,15 +58329,38 @@ const UserProfile = ({
57974
58329
  className: className,
57975
58330
  children: [(0,jsx_runtime_namespaceObject.jsxs)("div", {
57976
58331
  css: UserInfo,
57977
- children: [(0,jsx_runtime_namespaceObject.jsx)(PopoverHeading, {
57978
- variant: "h5",
57979
- weight: "bold",
57980
- children: name
57981
- }), (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
57982
- css: UserProfile_ref,
57983
- weight: "regular",
57984
- color: theme.colors.greyDropdownFocused,
57985
- children: email
58332
+ children: [(0,jsx_runtime_namespaceObject.jsxs)(Tooltip_Tooltip, {
58333
+ enableHover: true,
58334
+ enableClick: false,
58335
+ placement: "top",
58336
+ size: "small",
58337
+ hoverOpenDelay: 1000,
58338
+ children: [(0,jsx_runtime_namespaceObject.jsx)(TooltipTrigger_TooltipTrigger, {
58339
+ children: (0,jsx_runtime_namespaceObject.jsx)(PopoverHeading, {
58340
+ css: TruncatedText,
58341
+ variant: "h5",
58342
+ weight: "bold",
58343
+ children: name
58344
+ })
58345
+ }), (0,jsx_runtime_namespaceObject.jsx)(TooltipContent_TooltipContent, {
58346
+ children: name
58347
+ })]
58348
+ }), (0,jsx_runtime_namespaceObject.jsxs)(Tooltip_Tooltip, {
58349
+ enableHover: true,
58350
+ enableClick: false,
58351
+ placement: "top",
58352
+ size: "small",
58353
+ hoverOpenDelay: 1000,
58354
+ children: [(0,jsx_runtime_namespaceObject.jsx)(TooltipTrigger_TooltipTrigger, {
58355
+ children: (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
58356
+ css: ["font-size:14px;margin-top:6px;", TruncatedText, true ? "" : 0, true ? "" : 0],
58357
+ weight: "regular",
58358
+ color: theme.colors.greyDropdownFocused,
58359
+ children: email
58360
+ })
58361
+ }), (0,jsx_runtime_namespaceObject.jsx)(TooltipContent_TooltipContent, {
58362
+ children: email
58363
+ })]
57986
58364
  }), additionalInfo && additionalInfo.length > 0 && (0,jsx_runtime_namespaceObject.jsx)(AdditionalInfoWrapper, {
57987
58365
  children: additionalInfo.map((item, index) => (0,jsx_runtime_namespaceObject.jsx)("div", {
57988
58366
  children: item