@strapi/design-system 2.0.0-beta.3 → 2.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +38 -53
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Accordion/index.d.ts +1 -6
  4. package/dist/components/Accordion/index.d.ts.map +1 -1
  5. package/dist/components/Badge/Badge.d.ts +8 -3
  6. package/dist/components/Badge/Badge.d.ts.map +1 -1
  7. package/dist/components/BaseCheckbox/BaseCheckbox.d.ts +1 -6
  8. package/dist/components/BaseCheckbox/BaseCheckbox.d.ts.map +1 -1
  9. package/dist/components/BaseRadio/BaseRadio.d.ts.map +1 -1
  10. package/dist/components/BaseRadio/RadioGroup.d.ts +9 -4
  11. package/dist/components/BaseRadio/RadioGroup.d.ts.map +1 -1
  12. package/dist/components/Box/Box.d.ts +5 -5
  13. package/dist/components/Box/Box.d.ts.map +1 -1
  14. package/dist/components/Button/Button.d.ts +3 -3
  15. package/dist/components/Button/Button.d.ts.map +1 -1
  16. package/dist/components/Button/constants.d.ts +2 -2
  17. package/dist/components/Button/constants.d.ts.map +1 -1
  18. package/dist/components/Button/utils.d.ts +5 -5
  19. package/dist/components/Button/utils.d.ts.map +1 -1
  20. package/dist/components/Card/CardAsset.d.ts +6 -3
  21. package/dist/components/Card/CardAsset.d.ts.map +1 -1
  22. package/dist/components/CarouselInput/CarouselActions.d.ts +1 -6
  23. package/dist/components/CarouselInput/CarouselActions.d.ts.map +1 -1
  24. package/dist/components/Combobox/Combobox.d.ts +13 -26
  25. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  26. package/dist/components/Combobox/index.d.ts +1 -3
  27. package/dist/components/Combobox/index.d.ts.map +1 -1
  28. package/dist/components/DatePicker/DatePicker.d.ts +3 -19
  29. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  30. package/dist/components/DateTimePicker/DateTimePicker.d.ts +2 -2
  31. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  32. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  33. package/dist/components/Divider/Divider.d.ts +1 -6
  34. package/dist/components/Divider/Divider.d.ts.map +1 -1
  35. package/dist/components/Field/Field.d.ts +0 -2
  36. package/dist/components/Field/Field.d.ts.map +1 -1
  37. package/dist/components/IconButton/IconButton.d.ts +16 -27
  38. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  39. package/dist/components/JSONInput/utils/decorationExtension.d.ts +1 -1
  40. package/dist/components/JSONInput/utils/decorationExtension.d.ts.map +1 -1
  41. package/dist/components/LinkButton/LinkButton.d.ts +3 -3
  42. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  43. package/dist/components/ModalLayout/ModalHeader.d.ts.map +1 -1
  44. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  45. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  46. package/dist/components/Select/MultiSelect.d.ts +2 -14
  47. package/dist/components/Select/MultiSelect.d.ts.map +1 -1
  48. package/dist/components/Select/SelectParts.d.ts +0 -4
  49. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  50. package/dist/components/Select/SingleSelect.d.ts +2 -2
  51. package/dist/components/Select/SingleSelect.d.ts.map +1 -1
  52. package/dist/components/SimpleMenu/Menu.d.ts +1 -1
  53. package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
  54. package/dist/components/SimpleMenu/SimpleMenu.d.ts +1 -1
  55. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  56. package/dist/components/SubNav/SubNavHeader.d.ts.map +1 -1
  57. package/dist/components/Table/Cell.d.ts +3 -0
  58. package/dist/components/Table/Cell.d.ts.map +1 -1
  59. package/dist/components/TimePicker/TimePicker.d.ts.map +1 -1
  60. package/dist/components/Toggle/Toggle.d.ts +0 -2
  61. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  62. package/dist/components/Tooltip/Tooltip.d.ts +24 -9
  63. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  64. package/dist/components/index.d.ts +0 -2
  65. package/dist/components/index.d.ts.map +1 -1
  66. package/dist/hooks/useControllableState.d.ts +0 -3
  67. package/dist/hooks/useControllableState.d.ts.map +1 -1
  68. package/dist/index.d.ts +1 -1
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +830 -1354
  71. package/dist/index.js.map +1 -1
  72. package/dist/index.mjs +831 -1356
  73. package/dist/index.mjs.map +1 -1
  74. package/dist/styles/easings.d.ts +29 -0
  75. package/dist/styles/easings.d.ts.map +1 -0
  76. package/dist/styles/global.d.ts +4 -0
  77. package/dist/styles/global.d.ts.map +1 -0
  78. package/dist/themes/common-theme.d.ts +11 -1
  79. package/dist/themes/common-theme.d.ts.map +1 -1
  80. package/dist/themes/sizes.d.ts +0 -9
  81. package/dist/themes/sizes.d.ts.map +1 -1
  82. package/dist/utilities/DesignSystemProvider.d.ts +16 -0
  83. package/dist/utilities/DesignSystemProvider.d.ts.map +1 -0
  84. package/package.json +6 -3
  85. package/dist/DesignSystemProvider.d.ts +0 -11
  86. package/dist/DesignSystemProvider.d.ts.map +0 -1
  87. package/dist/components/Accordion/AccordionContent.d.ts +0 -6
  88. package/dist/components/Accordion/AccordionContent.d.ts.map +0 -1
  89. package/dist/components/Accordion/AccordionContext.d.ts +0 -14
  90. package/dist/components/Accordion/AccordionContext.d.ts.map +0 -1
  91. package/dist/components/Accordion/AccordionGroup.d.ts +0 -13
  92. package/dist/components/Accordion/AccordionGroup.d.ts.map +0 -1
  93. package/dist/components/Accordion/AccordionToggle.d.ts +0 -31
  94. package/dist/components/Accordion/AccordionToggle.d.ts.map +0 -1
  95. package/dist/components/BaseCheckbox/utils.d.ts +0 -5
  96. package/dist/components/BaseCheckbox/utils.d.ts.map +0 -1
  97. package/dist/components/BaseRadio/context.d.ts +0 -10
  98. package/dist/components/BaseRadio/context.d.ts.map +0 -1
  99. package/dist/components/BaseRadio/utils.d.ts +0 -5
  100. package/dist/components/BaseRadio/utils.d.ts.map +0 -1
  101. package/dist/components/Combobox/ComboboxList.d.ts +0 -11
  102. package/dist/components/Combobox/ComboboxList.d.ts.map +0 -1
  103. package/dist/components/Combobox/ComboboxOption.d.ts +0 -5
  104. package/dist/components/Combobox/ComboboxOption.d.ts.map +0 -1
  105. package/dist/components/Layout/Layout.d.ts +0 -8
  106. package/dist/components/Layout/Layout.d.ts.map +0 -1
  107. package/dist/components/MainNav/MainNav.d.ts +0 -6
  108. package/dist/components/MainNav/MainNav.d.ts.map +0 -1
  109. package/dist/components/MainNav/MainNavContext.d.ts +0 -4
  110. package/dist/components/MainNav/MainNavContext.d.ts.map +0 -1
  111. package/dist/components/MainNav/NavBrand.d.ts +0 -10
  112. package/dist/components/MainNav/NavBrand.d.ts.map +0 -1
  113. package/dist/components/MainNav/NavCondense.d.ts +0 -6
  114. package/dist/components/MainNav/NavCondense.d.ts.map +0 -1
  115. package/dist/components/MainNav/NavFooter.d.ts +0 -6
  116. package/dist/components/MainNav/NavFooter.d.ts.map +0 -1
  117. package/dist/components/MainNav/NavLink.d.ts +0 -12
  118. package/dist/components/MainNav/NavLink.d.ts.map +0 -1
  119. package/dist/components/MainNav/NavSection.d.ts +0 -10
  120. package/dist/components/MainNav/NavSection.d.ts.map +0 -1
  121. package/dist/components/MainNav/NavSections.d.ts +0 -9
  122. package/dist/components/MainNav/NavSections.d.ts.map +0 -1
  123. package/dist/components/MainNav/NavUser.d.ts +0 -9
  124. package/dist/components/MainNav/NavUser.d.ts.map +0 -1
  125. package/dist/components/MainNav/index.d.ts +0 -9
  126. package/dist/components/MainNav/index.d.ts.map +0 -1
  127. package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -11
  128. package/dist/components/ThemeProvider/ThemeProvider.d.ts.map +0 -1
  129. package/dist/components/ThemeProvider/hooks.d.ts +0 -2
  130. package/dist/components/ThemeProvider/hooks.d.ts.map +0 -1
  131. package/dist/components/ThemeProvider/index.d.ts +0 -3
  132. package/dist/components/ThemeProvider/index.d.ts.map +0 -1
  133. package/dist/components/Tooltip/hooks/useTooltipHandlers.d.ts +0 -8
  134. package/dist/components/Tooltip/hooks/useTooltipHandlers.d.ts.map +0 -1
  135. package/dist/components/Tooltip/hooks/useTooltipLayout.d.ts +0 -7
  136. package/dist/components/Tooltip/hooks/useTooltipLayout.d.ts.map +0 -1
  137. package/dist/components/Tooltip/utils/positionTooltip.d.ts +0 -6
  138. package/dist/components/Tooltip/utils/positionTooltip.d.ts.map +0 -1
  139. package/dist/helpers/getDefaultLocale.d.ts +0 -6
  140. package/dist/helpers/getDefaultLocale.d.ts.map +0 -1
  141. package/dist/styles/inputs.d.ts +0 -1
  142. package/dist/styles/inputs.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,14 +1,18 @@
1
- import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
1
  import * as React from "react";
3
2
  import { useEffect } from "react";
4
- import { styled, css, keyframes, createGlobalStyle, ThemeProvider as ThemeProvider$1, useTheme as useTheme$1 } from "styled-components";
5
3
  import { DateFormatter, getLocalTimeZone, today, minDate, maxDate, startOfMonth, startOfWeek, getDayOfWeek, isSameDay, endOfMonth, parseAbsolute, toCalendarDate, parseAbsoluteToLocal, toCalendarDateTime } from "@internationalized/date";
4
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
+ import * as Tooltip from "@radix-ui/react-tooltip";
6
+ import { Provider as Provider$1 } from "@radix-ui/react-tooltip";
7
+ import { styled, css, keyframes, createGlobalStyle, ThemeProvider } from "styled-components";
6
8
  import { useCallbackRef, Combobox as Combobox$1, Select, composeEventHandlers } from "@strapi/ui-primitives";
7
9
  import { composeEventHandlers as composeEventHandlers2, useCallbackRef as useCallbackRef2, useCollator, useFilter } from "@strapi/ui-primitives";
8
- import { Loader as Loader$1, CaretDown, Cross, CheckCircle, WarningCircle, Information, ExternalLink, ChevronRight, ChevronLeft, Calendar, Clock, Search } from "@strapi/icons";
10
+ import * as RadixAccordion from "@radix-ui/react-accordion";
11
+ import { CaretDown, Cross, CheckCircle, WarningCircle, Information, Loader as Loader$1, ExternalLink, ChevronRight, ChevronLeft, Calendar, Clock, Search } from "@strapi/icons";
9
12
  import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
10
- import { createPortal } from "react-dom";
13
+ import { useControllableState as useControllableState$1 } from "@radix-ui/react-use-controllable-state";
11
14
  import * as DismissibleLayerPrimitive from "@radix-ui/react-dismissable-layer";
15
+ import { createPortal } from "react-dom";
12
16
  import { useFloating, offset, shift, flip, autoUpdate } from "@floating-ui/react-dom";
13
17
  import { FocusScope } from "@radix-ui/react-focus-scope";
14
18
  import { RemoveScroll } from "react-remove-scroll";
@@ -18,15 +22,23 @@ import { StateEffect, StateField } from "@codemirror/state";
18
22
  import { Decoration, EditorView } from "@codemirror/view";
19
23
  import { NumberParser, NumberFormatter } from "@internationalized/number";
20
24
  import { hideOthers } from "aria-hidden";
21
- const useReactId = React["useId".toString()] || (() => void 0);
22
- let count = 0;
23
- const useId = (initialId) => {
24
- const [id, setId] = React.useState(useReactId());
25
- React.useLayoutEffect(() => {
26
- if (!initialId)
27
- setId((reactId) => reactId ?? String(count++));
28
- }, [initialId]);
29
- return initialId?.toString() ?? (id || "");
25
+ const createContext = (rootComponentName, defaultContext) => {
26
+ const Context = React.createContext(defaultContext);
27
+ const Provider2 = (props) => {
28
+ const { children, ...context } = props;
29
+ const value = React.useMemo(() => context, Object.values(context));
30
+ return /* @__PURE__ */ jsx(Context.Provider, { value, children });
31
+ };
32
+ function useContext(consumerName) {
33
+ const context = React.useContext(Context);
34
+ if (context)
35
+ return context;
36
+ if (defaultContext !== void 0)
37
+ return defaultContext;
38
+ throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
39
+ }
40
+ Provider2.displayName = `${rootComponentName}Provider`;
41
+ return [Provider2, useContext];
30
42
  };
31
43
  const handleResponsiveValues = (property, value, theme) => {
32
44
  if (!value) {
@@ -180,7 +192,7 @@ const StyledBox = styled.div`
180
192
 
181
193
  // Colors
182
194
  background: ${({ theme, $background }) => extractStyleFromTheme(theme.colors, $background, $background)};
183
- color: ${({ theme, $color }) => extractStyleFromTheme(theme.colors, $color, void 0)};
195
+ color: ${({ theme, $color }) => extractStyleFromTheme(theme.colors, $color, $color)};
184
196
 
185
197
  // Spaces
186
198
  ${({ theme, $padding }) => handleResponsiveValues("padding-block", $padding, theme)}
@@ -229,7 +241,7 @@ const StyledBox = styled.div`
229
241
  right: ${({ $right, theme }) => extractStyleFromTheme(theme.spaces, $right, $right)};
230
242
  top: ${({ $top, theme }) => extractStyleFromTheme(theme.spaces, $top, $top)};
231
243
  bottom: ${({ $bottom, theme }) => extractStyleFromTheme(theme.spaces, $bottom, $bottom)};
232
- z-index: ${({ $zIndex }) => $zIndex};
244
+ z-index: ${({ $zIndex, theme }) => extractStyleFromTheme(theme.zIndices, $zIndex, $zIndex)};
233
245
  overflow: ${({ $overflow }) => $overflow};
234
246
 
235
247
  // Size
@@ -259,6 +271,27 @@ const StyledBox = styled.div`
259
271
  // Cursor
260
272
  cursor: ${({ $cursor }) => $cursor};
261
273
  `;
274
+ const Flex = forwardRef((props, ref) => {
275
+ const { className, alignItems, direction, gap, inline, justifyContent, wrap, ...rest } = props;
276
+ const mappedProps = {
277
+ $alignItems: alignItems,
278
+ $direction: direction,
279
+ $gap: gap,
280
+ $inline: inline,
281
+ $justifyContent: justifyContent,
282
+ $wrap: wrap
283
+ };
284
+ return /* @__PURE__ */ jsx(StyledFlex, { className, ref, ...mappedProps, ...rest });
285
+ });
286
+ const StyledFlex = styled(Box)`
287
+ align-items: ${({ $alignItems = "center" }) => $alignItems};
288
+ display: ${({ display = "flex", $inline }) => $inline ? "inline-flex" : display};
289
+ flex-direction: ${({ $direction = "row" }) => $direction};
290
+ flex-shrink: ${({ shrink }) => shrink};
291
+ flex-wrap: ${({ $wrap }) => $wrap};
292
+ ${({ $gap, theme }) => handleResponsiveValues("gap", $gap, theme)};
293
+ justify-content: ${({ $justifyContent }) => $justifyContent};
294
+ `;
262
295
  const ALPHA = "alpha";
263
296
  const BETA = "beta";
264
297
  const DELTA = "delta";
@@ -370,483 +403,261 @@ const StyledTypography = styled(Box)`
370
403
  text-decoration: ${({ $textDecoration }) => $textDecoration};
371
404
  text-transform: ${({ $textTransform }) => $textTransform};
372
405
  `;
373
- const AccordionContext = React.createContext({
374
- disabled: false,
375
- expanded: false,
376
- id: "",
377
- size: "M",
378
- variant: "primary"
406
+ const [AccordionProvider, useAccordion] = createContext("Accordion");
407
+ const Root$3 = React.forwardRef(({ children, size = "S", ...props }, forwardedRef) => {
408
+ return /* @__PURE__ */ jsx(AccordionRoot, { ref: forwardedRef, $size: size, collapsible: true, ...props, type: "single", children: /* @__PURE__ */ jsx(AccordionProvider, { size, children }) });
379
409
  });
380
- const useAccordion = () => React.useContext(AccordionContext);
381
- const Flex = forwardRef((props, ref) => {
382
- const { className, alignItems, direction, gap, inline, justifyContent, wrap, ...rest } = props;
383
- const mappedProps = {
384
- $alignItems: alignItems,
385
- $direction: direction,
386
- $gap: gap,
387
- $inline: inline,
388
- $justifyContent: justifyContent,
389
- $wrap: wrap
390
- };
391
- return /* @__PURE__ */ jsx(StyledFlex, { className, ref, ...mappedProps, ...rest });
392
- });
393
- const StyledFlex = styled(Box)`
394
- align-items: ${({ $alignItems = "center" }) => $alignItems};
395
- display: ${({ display = "flex", $inline }) => $inline ? "inline-flex" : display};
396
- flex-direction: ${({ $direction = "row" }) => $direction};
397
- flex-shrink: ${({ shrink }) => shrink};
398
- flex-wrap: ${({ $wrap }) => $wrap};
399
- ${({ $gap, theme }) => handleResponsiveValues("gap", $gap, theme)};
400
- justify-content: ${({ $justifyContent }) => $justifyContent};
410
+ const AccordionRoot = styled(RadixAccordion.Root)`
411
+ background-color: ${(props) => props.theme.colors.neutral0};
412
+
413
+ ${(props) => {
414
+ if (props.$size === "S") {
415
+ return css`
416
+ border-radius: ${(props2) => props2.theme.borderRadius};
417
+ border: solid 1px ${(props2) => props2.theme.colors.neutral200};
418
+ `;
419
+ } else {
420
+ return css``;
421
+ }
422
+ }}
401
423
  `;
402
- const focus = css`
403
- position: relative;
404
- outline: none;
424
+ const Item$2 = React.forwardRef((props, forwardedRef) => {
425
+ const { size } = useAccordion("Item");
426
+ return /* @__PURE__ */ jsx(AccordionItem, { $size: size, ref: forwardedRef, ...props });
427
+ });
428
+ const AccordionItem = styled(RadixAccordion.Item)`
429
+ overflow: hidden;
405
430
 
406
- &:after {
407
- transition-property: all;
408
- transition-duration: 0.2s;
409
- border-radius: 8px;
410
- content: '';
411
- position: absolute;
412
- top: -4px;
413
- bottom: -4px;
414
- left: -4px;
415
- right: -4px;
416
- border: 2px solid transparent;
431
+ &:first-child {
432
+ border-top-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
433
+ border-top-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
417
434
  }
418
435
 
419
- &:focus-visible {
420
- outline: none;
436
+ &:last-child {
437
+ border-bottom-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
438
+ border-bottom-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
439
+ }
421
440
 
422
- &:after {
423
- border-radius: 8px;
424
- content: '';
425
- position: absolute;
426
- top: -5px;
427
- bottom: -5px;
428
- left: -5px;
429
- right: -5px;
430
- border: 2px solid ${(props) => props.theme.colors.primary600};
431
- }
441
+ & + & {
442
+ border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
443
+ }
444
+
445
+ /* This applies our desired focus effect correctly. */
446
+ &:focus-within {
447
+ position: relative;
448
+ z-index: 1;
449
+ box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
432
450
  }
433
451
  `;
434
- const rotation$2 = keyframes`
435
- from {
436
- transform: rotate(0deg);
452
+ const Trigger$3 = React.forwardRef(
453
+ ({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
454
+ const { size } = useAccordion("Trigger");
455
+ return /* @__PURE__ */ jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
456
+ caretPosition === "left" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null,
457
+ /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
458
+ Icon ? /* @__PURE__ */ jsx(IconBox$4, { children: /* @__PURE__ */ jsx(Icon, {}) }) : null,
459
+ /* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, children: [
460
+ /* @__PURE__ */ jsx(
461
+ Typography,
462
+ {
463
+ fontWeight: size === "S" ? "bold" : void 0,
464
+ ellipsis: true,
465
+ variant: size === "M" ? "delta" : void 0,
466
+ children
467
+ }
468
+ ),
469
+ description && size === "M" ? /* @__PURE__ */ jsx(Typography, { children: description }) : null
470
+ ] })
471
+ ] }),
472
+ caretPosition === "right" ? /* @__PURE__ */ jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsx(CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null
473
+ ] });
437
474
  }
438
- to {
439
- transform: rotate(359deg);
475
+ );
476
+ const IconBox$4 = styled(Box)`
477
+ color: ${(props) => props.theme.colors.neutral500};
478
+
479
+ @media (prefers-reduced-motion: no-preference) {
480
+ transition: color 120ms ${(props) => props.theme.easings.easeOutQuad};
440
481
  }
441
482
  `;
442
- const LoadingWrapper = styled.div`
443
- animation: ${rotation$2} 2s infinite linear;
444
- will-change: transform;
445
- `;
446
- const TextButtonWrapper = styled(Flex)`
447
- border: none;
483
+ const TriggerIcon = styled(Flex).attrs((props) => ({
484
+ ...props,
485
+ tag: "span"
486
+ }))`
487
+ background-color: ${(props) => props.theme.colors.neutral200};
488
+ width: ${(props) => props.$size === "S" ? "2.4rem" : "3.2rem"};
489
+ height: ${(props) => props.$size === "S" ? "2.4rem" : "3.2rem"};
490
+ flex: ${(props) => props.$size === "S" ? "0 0 2.4rem" : "0 0 3.2rem"};
491
+ border-radius: 50%;
492
+ justify-content: center;
448
493
 
449
- &[aria-disabled='true'] {
450
- pointer-events: none;
451
- svg path {
452
- fill: ${({ theme }) => theme.colors.neutral600};
453
- }
494
+ @media (prefers-reduced-motion: no-preference) {
495
+ transition:
496
+ transform 300ms ${(props) => props.theme.easings.authenticMotion},
497
+ background-color 120ms ${(props) => props.theme.easings.easeOutQuad};
454
498
  }
499
+ `;
500
+ const AccordionTrigger = styled(RadixAccordion.Trigger)`
501
+ display: flex;
502
+ align-items: center;
503
+ justify-content: ${(props) => props.$caretPosition === "left" ? "flex-start" : "space-between"};
504
+ width: 100%;
505
+ gap: ${(props) => props.theme.spaces[4]};
506
+ padding-inline: ${(props) => props.$size === "S" ? props.theme.spaces[4] : props.theme.spaces[6]};
507
+ padding-block: ${(props) => props.$size === "S" ? props.theme.spaces[3] : props.theme.spaces[6]};
508
+ cursor: pointer;
509
+ color: ${(props) => props.theme.colors.neutral800};
455
510
 
456
- svg path {
457
- fill: ${({ theme }) => theme.colors.primary600};
511
+ &[data-disabled] {
512
+ cursor: default;
513
+ color: ${(props) => props.theme.colors.neutral600};
458
514
  }
459
515
 
460
- ${focus}
461
- `;
462
- const TextButton = React.forwardRef(
463
- ({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
464
- const handleClick = onClick && !disabled ? onClick : void 0;
465
- const isDisabled = disabled || loading;
466
- return /* @__PURE__ */ jsxs(
467
- TextButtonWrapper,
468
- {
469
- ref,
470
- "aria-disabled": isDisabled,
471
- onClick: handleClick,
472
- tag: "button",
473
- type: "button",
474
- background: "transparent",
475
- gap: 2,
476
- ...props,
477
- children: [
478
- loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
479
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
480
- endIcon
481
- ]
482
- }
483
- );
516
+ &[data-state='open'] > ${TriggerIcon} {
517
+ transform: rotate(180deg);
484
518
  }
485
- );
486
- TextButton.displayName = "TextButton";
487
- const AccordionToggle = ({
488
- title,
489
- description,
490
- tag,
491
- togglePosition = "right",
492
- action,
493
- ...props
494
- }) => {
495
- const { onToggle, toggle, expanded, id, size, variant: variant2, disabled } = useAccordion();
496
- const ariaControls = `accordion-content-${id}`;
497
- const ariaLabelId = `accordion-label-${id}`;
498
- const ariaDescriptionId = `accordion-desc-${id}`;
499
- const boxPaddingX = size === "M" ? 6 : 4;
500
- const boxPaddingY = size === "M" ? boxPaddingX : boxPaddingX - 2;
501
- let boxBackground = "neutral100";
502
- if (expanded) {
503
- boxBackground = "primary100";
504
- } else if (disabled) {
505
- boxBackground = "neutral150";
506
- } else if (variant2 === "primary") {
507
- boxBackground = "neutral0";
508
- }
509
- const titleColor = expanded ? "primary600" : "neutral700";
510
- const titleProps = {
511
- tag,
512
- fontWeight: size === "S" ? "bold" : void 0,
513
- id: ariaLabelId,
514
- textColor: titleColor,
515
- ellipsis: true,
516
- variant: size === "M" ? "delta" : void 0
517
- };
518
- const descriptionColor = expanded ? "primary600" : "neutral600";
519
- const iconColor = expanded ? "primary200" : "neutral200";
520
- const iconSize = size === "M" ? `3.2rem` : `2.4rem`;
521
- const handleToggle = () => {
522
- if (!disabled) {
523
- if (toggle && !onToggle) {
524
- console.warn(
525
- 'Deprecation warning: Usage of "toggle" prop in Accordion component is deprecated. This is discouraged and will be removed in the next major release. Please use "onToggle" instead'
526
- );
527
- toggle();
528
- } else if (onToggle) {
529
- onToggle();
530
- }
531
- }
532
- };
533
- const dropdownIcon = /* @__PURE__ */ jsx(
534
- Flex,
535
- {
536
- justifyContent: "center",
537
- borderRadius: "50%",
538
- height: iconSize,
539
- width: iconSize,
540
- transform: expanded ? `rotate(180deg)` : void 0,
541
- "data-strapi-dropdown": true,
542
- "aria-hidden": true,
543
- tag: "span",
544
- background: iconColor,
545
- cursor: disabled ? "not-allowed" : "pointer",
546
- shrink: 0,
547
- children: /* @__PURE__ */ jsx(CaretDown, { width: size === "M" ? `1.6rem` : `1.2rem`, fill: expanded ? "primary600" : "neutral600" })
548
- }
549
- );
550
- const stopPropagation = (e) => {
551
- e.stopPropagation();
552
- };
553
- return /* @__PURE__ */ jsx(
554
- FlexWithSize,
555
- {
556
- paddingBottom: boxPaddingY,
557
- paddingLeft: boxPaddingX,
558
- paddingRight: boxPaddingX,
559
- paddingTop: boxPaddingY,
560
- background: boxBackground,
561
- $expanded: expanded,
562
- $size: size,
563
- justifyContent: "space-between",
564
- cursor: disabled ? "not-allowed" : "pointer",
565
- onClick: handleToggle,
566
- children: /* @__PURE__ */ jsxs(Flex, { gap: 3, flex: 1, maxWidth: "100%", children: [
567
- togglePosition === "left" && dropdownIcon,
568
- /* @__PURE__ */ jsxs(
569
- ToggleButton,
570
- {
571
- "aria-disabled": disabled,
572
- "aria-expanded": expanded,
573
- "aria-controls": ariaControls,
574
- "aria-labelledby": ariaLabelId,
575
- "data-strapi-accordion-toggle": true,
576
- $expanded: expanded,
577
- type: "button",
578
- flex: 1,
579
- minWidth: 0,
580
- ...props,
581
- children: [
582
- /* @__PURE__ */ jsx(AccordionTitle, { ...titleProps, children: title }),
583
- description && /* @__PURE__ */ jsx(AccordionDescription, { tag: "p", id: ariaDescriptionId, textColor: descriptionColor, children: description })
584
- ]
585
- }
586
- ),
587
- togglePosition === "right" && /* @__PURE__ */ jsxs(Flex, { gap: 3, children: [
588
- dropdownIcon,
589
- /* @__PURE__ */ jsx(Box, { tag: "span", onClick: stopPropagation, children: action })
590
- ] }),
591
- togglePosition === "left" && /* @__PURE__ */ jsx(Box, { tag: "span", onClick: stopPropagation, children: action })
592
- ] })
593
- }
594
- );
595
- };
596
- const AccordionDescription = styled(Typography)``;
597
- const AccordionTitle = styled(Typography)``;
598
- const ToggleButton = styled(TextButton)`
599
- text-align: left;
600
519
 
601
- // necessary to make the ellipsis prop work on the title
602
- > span {
603
- max-width: 100%;
520
+ /* we remove the default focus because the entire item should have the focus style and the default would be hidden. */
521
+ &:focus-visible {
522
+ outline: none;
604
523
  }
605
524
 
606
- & > svg {
607
- width: 1.4rem;
608
- height: 1.4rem;
609
- fill: ${({ theme, $expanded }) => $expanded ? theme.colors.primary600 : theme.colors.neutral500};
525
+ @media (prefers-reduced-motion: no-preference) {
526
+ transition: color 120ms ${(props) => props.theme.easings.easeOutQuad};
610
527
  }
611
528
  `;
612
- const FlexWithSize = styled(Flex)`
613
- min-height: ${({ theme, $size }) => theme.sizes.accordions[$size]};
614
- border-radius: ${({ theme, $expanded }) => $expanded ? `${theme.borderRadius} ${theme.borderRadius} 0 0` : theme.borderRadius};
529
+ const Actions = React.forwardRef((props, forwardedRef) => {
530
+ const { size } = useAccordion("Trigger");
531
+ return /* @__PURE__ */ jsx(ActionWrapper, { $size: size, ...props, ref: forwardedRef });
532
+ });
533
+ const ActionWrapper = styled(Flex).attrs((props) => ({
534
+ ...props,
535
+ tag: "span"
536
+ }))`
537
+ padding-inline: ${(props) => props.$size === "S" ? props.theme.spaces[2] : props.theme.spaces[6]};
538
+ padding-block: ${(props) => props.$size === "S" ? props.theme.spaces[2] : props.theme.spaces[6]};
615
539
 
616
- &:hover {
617
- ${ToggleButton} {
618
- svg {
619
- fill: ${({ theme }) => theme.colors.primary600};
620
- }
540
+ // Remove default IconButton styles so there are no backgrounds or borders.
541
+ & > button {
542
+ border: none;
543
+ background: none;
544
+ color: ${(props) => props.theme.colors.neutral600};
545
+
546
+ @media (prefers-reduced-motion: no-preference) {
547
+ transition: color 120ms ${(props) => props.theme.easings.easeOutQuad};
621
548
  }
622
549
  }
623
550
  `;
624
- const Accordion = ({
625
- children,
626
- disabled = false,
627
- error,
628
- expanded = false,
629
- hasErrorMessage = true,
630
- id,
631
- onToggle,
632
- toggle,
633
- size = "M",
634
- variant: variant2 = "primary",
635
- shadow
636
- }) => {
637
- const generatedId = useId(id);
638
- const context = React.useMemo(
639
- () => ({ expanded, onToggle, toggle, id: generatedId, size, variant: variant2, disabled }),
640
- [disabled, expanded, generatedId, onToggle, size, toggle, variant2]
641
- );
642
- return /* @__PURE__ */ jsxs(AccordionContext.Provider, { value: context, children: [
643
- /* @__PURE__ */ jsx(
644
- AccordionWrapper,
645
- {
646
- "data-strapi-expanded": expanded,
647
- "aria-disabled": disabled,
648
- hasRadius: true,
649
- shadow,
650
- $expanded: expanded,
651
- $disabled: disabled,
652
- $variant: variant2,
653
- $error: error,
654
- children
655
- }
656
- ),
657
- error && hasErrorMessage && /* @__PURE__ */ jsx(Box, { paddingTop: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "danger600", children: error }) })
658
- ] });
659
- };
660
- const AccordionWrapper = styled(Box)`
661
- border: ${({ theme, $expanded, $variant, $disabled, $error }) => {
662
- if ($error) {
663
- return `1px solid ${theme.colors.danger600} !important`;
664
- }
665
- if ($disabled) {
666
- return `1px solid ${theme.colors.neutral150}`;
667
- }
668
- if ($expanded) {
669
- return `1px solid ${theme.colors.primary600}`;
670
- }
671
- if ($variant === "primary") {
672
- return `1px solid ${theme.colors.neutral0}`;
551
+ const Header = React.forwardRef(({ variant: variant2 = "primary", ...props }, forwardedRef) => {
552
+ return /* @__PURE__ */ jsx(AccordionHeader, { $variant: variant2, ref: forwardedRef, ...props });
553
+ });
554
+ const AccordionHeader = styled(RadixAccordion.Header)`
555
+ display: flex;
556
+ align-items: center;
557
+ background-color: ${(props) => props.$variant === "primary" ? props.theme.colors.neutral0 : props.theme.colors.neutral100};
558
+
559
+ &[data-disabled] {
560
+ background-color: ${(props) => props.theme.colors.neutral150};
673
561
  }
674
- return `1px solid ${theme.colors.neutral100}`;
675
- }};
676
562
 
677
- &:hover:not([aria-disabled='true']) {
678
- border: 1px solid ${({ theme }) => theme.colors.primary600};
563
+ &:not([data-disabled]) {
564
+ &:hover,
565
+ &[data-state='open'] {
566
+ background-color: ${(props) => props.theme.colors.primary100};
679
567
 
680
- ${AccordionTitle} {
681
- color: ${({ theme, $expanded }) => $expanded ? void 0 : theme.colors.primary700};
682
- }
568
+ & > ${AccordionTrigger} {
569
+ color: ${(props) => props.theme.colors.primary600};
683
570
 
684
- ${AccordionDescription} {
685
- color: ${({ theme, $expanded }) => $expanded ? void 0 : theme.colors.primary600};
686
- }
571
+ & ${IconBox$4} {
572
+ color: ${(props) => props.theme.colors.primary600};
573
+ }
687
574
 
688
- & > div:first-child {
689
- background: ${({ theme }) => theme.colors.primary100};
690
- }
575
+ & ${TriggerIcon} {
576
+ background-color: ${(props) => props.theme.colors.primary200};
577
+ }
578
+ }
691
579
 
692
- [data-strapi-dropdown='true'] {
693
- background: ${({ theme }) => theme.colors.primary200};
580
+ & > ${ActionWrapper} > button {
581
+ color: ${(props) => props.theme.colors.primary600};
582
+ }
694
583
  }
695
584
  }
585
+
586
+ @media (prefers-reduced-motion: no-preference) {
587
+ transition: background-color 120ms ${(props) => props.theme.easings.easeOutQuad};
588
+ }
696
589
  `;
697
- const AccordionContent = ({ children, ...props }) => {
698
- const { expanded, id } = useAccordion();
699
- if (!expanded) {
700
- return null;
590
+ const Content$4 = React.forwardRef((props, forwardedRef) => {
591
+ return /* @__PURE__ */ jsx(AccordionContent, { ref: forwardedRef, ...props });
592
+ });
593
+ const slideDown = keyframes`
594
+ from {
595
+ height: 0;
596
+ }
597
+ to {
598
+ height: var(--radix-accordion-content-height);
701
599
  }
702
- const idContent = `accordion-content-${id}`;
703
- const ariaLabelId = `accordion-label-${id}`;
704
- const ariaDescriptionId = `accordion-desc-${id}`;
705
- return /* @__PURE__ */ jsx(Box, { role: "region", id: idContent, "aria-labelledby": ariaLabelId, "aria-describedby": ariaDescriptionId, ...props, children });
706
- };
707
- const KeyboardKeys = {
708
- DOWN: "ArrowDown",
709
- UP: "ArrowUp",
710
- RIGHT: "ArrowRight",
711
- LEFT: "ArrowLeft",
712
- ESCAPE: "Escape",
713
- ENTER: "Enter",
714
- SPACE: " ",
715
- TAB: "Tab",
716
- END: "End",
717
- HOME: "Home",
718
- DELETE: "Delete",
719
- PAGE_UP: "PageUp",
720
- PAGE_DOWN: "PageDown",
721
- BACKSPACE: "Backspace",
722
- CLEAR: "Clear"
723
- };
724
- const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
725
- const isValidFocusedElement = () => {
726
- const focused = document.activeElement;
727
- if (!focused) {
728
- return false;
729
- }
730
- if (tagName) {
731
- return focused.tagName.toLowerCase() === tagName;
732
- }
733
- return focused.hasAttribute(attributeName);
734
- };
735
- const queryElement = (parentEl) => {
736
- if (tagName) {
737
- return parentEl.querySelectorAll(tagName);
738
- }
739
- return parentEl.querySelectorAll(`[${attributeName}]`);
740
- };
741
- const handleKeyDown = (e) => {
742
- switch (e.key) {
743
- case KeyboardKeys.RIGHT:
744
- case KeyboardKeys.DOWN: {
745
- if (isValidFocusedElement()) {
746
- e.preventDefault();
747
- const focused = document.activeElement;
748
- const allElements = [...queryElement(e.currentTarget)];
749
- const focusedIndex = allElements.findIndex((node) => node === focused);
750
- const nextIndex = focusedIndex + 1 < allElements.length ? focusedIndex + 1 : 0;
751
- allElements[nextIndex].focus();
752
- }
753
- break;
754
- }
755
- case KeyboardKeys.LEFT:
756
- case KeyboardKeys.UP: {
757
- if (isValidFocusedElement()) {
758
- e.preventDefault();
759
- const focused = document.activeElement;
760
- const allElements = [...queryElement(e.currentTarget)];
761
- const focusedIndex = allElements.findIndex((node) => node === focused);
762
- const nextIndex = focusedIndex - 1 > -1 ? focusedIndex - 1 : allElements.length - 1;
763
- allElements[nextIndex].focus();
764
- }
765
- break;
766
- }
767
- case KeyboardKeys.HOME: {
768
- if (isValidFocusedElement()) {
769
- e.preventDefault();
770
- const allElements = queryElement(e.currentTarget);
771
- const focusElement = allElements.item(0);
772
- focusElement.focus();
773
- }
774
- break;
775
- }
776
- case KeyboardKeys.END: {
777
- if (isValidFocusedElement()) {
778
- e.preventDefault();
779
- const allElements = queryElement(e.currentTarget);
780
- const focusElement = allElements.item(allElements.length - 1);
781
- focusElement.focus();
782
- }
783
- break;
784
- }
785
- }
786
- };
787
- return /* @__PURE__ */ jsx(Box, { onKeyDown: handleKeyDown, ...props });
788
- };
789
- const AccordionGroup = ({ children, footer, label, labelAction, error }) => {
790
- const childrenArray = React.Children.toArray(children).map((child) => {
791
- return React.cloneElement(child, { hasErrorMessage: false });
792
- });
793
- return /* @__PURE__ */ jsxs(KeyboardNavigable, { attributeName: "data-strapi-accordion-toggle", children: [
794
- label && /* @__PURE__ */ jsxs(Flex, { paddingBottom: 1, children: [
795
- /* @__PURE__ */ jsx(Typography, { variant: "pi", tag: "label", textColor: "neutral800", fontWeight: "bold", children: label }),
796
- labelAction && /* @__PURE__ */ jsx(LabelAction$1, { paddingLeft: 1, children: labelAction })
797
- ] }),
798
- /* @__PURE__ */ jsx(EnhancedGroup, { $footer: footer, children: childrenArray }),
799
- footer && /* @__PURE__ */ jsx(AccordionFooter, { children: footer }),
800
- error && /* @__PURE__ */ jsx(Box, { paddingTop: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "danger600", children: error }) })
801
- ] });
802
- };
803
- const AccordionFooter = styled(Box)`
804
- border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
805
- border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
806
- border-left: 1px solid ${({ theme }) => theme.colors.neutral200};
807
- border-radius: 0 0 ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius};
808
600
  `;
809
- const EnhancedGroup = styled(Box)`
810
- & > * {
811
- & > * {
812
- border-radius: unset;
813
- }
601
+ const slideUp = keyframes`
602
+ from {
603
+ height: var(--radix-accordion-content-height);
814
604
  }
815
-
816
- & > ${AccordionWrapper} {
817
- border-radius: unset;
818
- border-right: 1px solid ${({ theme }) => theme.colors.neutral200};
819
- border-left: 1px solid ${({ theme }) => theme.colors.neutral200};
820
- border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200};
605
+ to {
606
+ height: 0;
821
607
  }
608
+ `;
609
+ const AccordionContent = styled(RadixAccordion.Content)`
610
+ overflow: hidden;
822
611
 
823
- & > ${AccordionWrapper}:first-of-type {
824
- border-top: 1px solid ${({ theme }) => theme.colors.neutral200};
825
- border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
826
- & > * {
827
- border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0;
612
+ @media (prefers-reduced-motion: no-preference) {
613
+ &[data-state='open'] {
614
+ animation: ${slideDown} 0.3s ${(props) => props.theme.easings.authenticMotion};
828
615
  }
829
616
 
830
- &:hover {
831
- border-top: 1px solid ${({ theme }) => theme.colors.primary600};
617
+ &[data-state='closed'] {
618
+ animation: ${slideUp} 0.3s ${(props) => props.theme.easings.authenticMotion};
832
619
  }
833
620
  }
621
+ `;
622
+ const Accordion = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
623
+ __proto__: null,
624
+ Actions,
625
+ Content: Content$4,
626
+ Header,
627
+ Item: Item$2,
628
+ Root: Root$3,
629
+ Trigger: Trigger$3
630
+ }, Symbol.toStringTag, { value: "Module" }));
631
+ const focus = css`
632
+ position: relative;
633
+ outline: none;
834
634
 
835
- & [data-strapi-expanded='true'] {
836
- border: 1px solid ${({ theme }) => theme.colors.primary600};
635
+ &:after {
636
+ transition-property: all;
637
+ transition-duration: 0.2s;
638
+ border-radius: 8px;
639
+ content: '';
640
+ position: absolute;
641
+ top: -4px;
642
+ bottom: -4px;
643
+ left: -4px;
644
+ right: -4px;
645
+ border: 2px solid transparent;
837
646
  }
838
647
 
839
- ${({ theme, $footer }) => `
840
- &:not(${$footer}) {
841
- & > *:last-of-type {
842
- border-radius: 0 0 ${theme.borderRadius} ${theme.borderRadius};
843
- }
648
+ &:focus-visible {
649
+ outline: none;
650
+
651
+ &:after {
652
+ border-radius: 8px;
653
+ content: '';
654
+ position: absolute;
655
+ top: -5px;
656
+ bottom: -5px;
657
+ left: -5px;
658
+ right: -5px;
659
+ border: 2px solid ${(props) => props.theme.colors.primary600};
844
660
  }
845
- `}
846
- `;
847
- const LabelAction$1 = styled(Box)`
848
- svg path {
849
- fill: ${({ theme }) => theme.colors.neutral500};
850
661
  }
851
662
  `;
852
663
  const VisuallyHidden = ({ tag, ...props }) => {
@@ -1073,10 +884,6 @@ const AvatarGroup = styled(Flex)`
1073
884
  margin-left: -${avatarSize / 2}px;
1074
885
  }
1075
886
  `;
1076
- const Base = styled(Flex)`
1077
- border-radius: ${({ theme, $size }) => $size === "S" ? "2px" : theme.borderRadius};
1078
- height: ${({ $size, theme }) => theme.sizes.badge[$size]};
1079
- `;
1080
887
  const Badge = ({
1081
888
  active = false,
1082
889
  size = "M",
@@ -1099,10 +906,25 @@ const Badge = ({
1099
906
  background: active ? "primary200" : backgroundColor,
1100
907
  $size: size,
1101
908
  ...props,
1102
- children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: active ? "primary600" : textColor, children })
909
+ children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: active ? "primary600" : textColor, lineHeight: "1rem", children })
1103
910
  }
1104
911
  );
1105
912
  };
913
+ const Base = styled(Flex)`
914
+ border-radius: ${({ theme, $size }) => $size === "S" ? "2px" : theme.borderRadius};
915
+ ${({ $size, theme }) => {
916
+ if ($size === "S") {
917
+ return css`
918
+ padding-block: 0.3rem;
919
+ padding-inline ${theme.spaces[1]}
920
+ `;
921
+ }
922
+ return css`
923
+ padding-block: 0.7rem;
924
+ padding-inline ${theme.spaces[2]}
925
+ `;
926
+ }};
927
+ `;
1106
928
  const BaseButton = forwardRef(
1107
929
  ({ disabled, children, ...props }, ref) => {
1108
930
  return /* @__PURE__ */ jsx(
@@ -1146,14 +968,8 @@ function useComposedRefs(...refs) {
1146
968
  }
1147
969
  const checkmarkIconDisabled = "data:image/svg+xml,%3csvg%20width='10'%20height='8'%20viewBox='0%200%2010%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.55323%200.396973C8.63135%200.316355%208.76051%200.315811%208.83931%200.395768L9.86256%201.43407C9.93893%201.51157%209.93935%201.6359%209.86349%201.7139L4.06401%207.67724C3.9859%207.75755%203.85707%207.75805%203.77834%207.67834L0.13866%203.99333C0.0617798%203.91549%200.0617102%203.79032%200.138504%203.7124L1.16213%202.67372C1.24038%202.59432%201.36843%202.59422%201.4468%202.67348L3.92174%205.17647L8.55323%200.396973Z'%20fill='%238E8EA9'%20/%3e%3c/svg%3e";
1148
970
  const checkmarkIcon = "data:image/svg+xml,%3csvg%20width='10'%20height='8'%20viewBox='0%200%2010%208'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.55323%200.396973C8.63135%200.316355%208.76051%200.315811%208.83931%200.395768L9.86256%201.43407C9.93893%201.51157%209.93935%201.6359%209.86349%201.7139L4.06401%207.67724C3.9859%207.75755%203.85707%207.75805%203.77834%207.67834L0.13866%203.99333C0.0617798%203.91549%200.0617102%203.79032%200.138504%203.7124L1.16213%202.67372C1.24038%202.59432%201.36843%202.59422%201.4468%202.67348L3.92174%205.17647L8.55323%200.396973Z'%20fill='white'%20/%3e%3c/svg%3e";
1149
- const getCheckboxSize = ({ $size }) => {
1150
- if ($size === "M") {
1151
- return "18px";
1152
- }
1153
- return "20px";
1154
- };
1155
971
  const BaseCheckbox = React.forwardRef(
1156
- ({ indeterminate = false, size = "M", name, value = false, onValueChange, ...inputProps }, forwardedRef) => {
972
+ ({ indeterminate = false, name, value = false, onValueChange, ...inputProps }, forwardedRef) => {
1157
973
  const checkboxRef = React.useRef(null);
1158
974
  const composedRefs = useComposedRefs(checkboxRef, forwardedRef);
1159
975
  React.useEffect(() => {
@@ -1168,10 +984,9 @@ const BaseCheckbox = React.forwardRef(
1168
984
  onValueChange(!value);
1169
985
  }
1170
986
  };
1171
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
987
+ return /* @__PURE__ */ jsx(
1172
988
  CheckboxInput,
1173
989
  {
1174
- $size: size,
1175
990
  checked: value,
1176
991
  onChange: handleValueChange,
1177
992
  type: "checkbox",
@@ -1179,17 +994,17 @@ const BaseCheckbox = React.forwardRef(
1179
994
  name,
1180
995
  ...inputProps
1181
996
  }
1182
- ) });
997
+ );
1183
998
  }
1184
999
  );
1185
1000
  BaseCheckbox.displayName = "BaseCheckbox";
1186
1001
  const CheckboxInput = styled.input`
1187
- height: ${getCheckboxSize};
1188
- min-width: ${getCheckboxSize};
1002
+ min-width: 1.8rem;
1003
+ height: 1.8rem;
1189
1004
  margin: 0;
1005
+ appearance: none;
1190
1006
  border-radius: ${({ theme }) => theme.borderRadius};
1191
1007
  border: 1px solid ${({ theme }) => theme.colors.neutral300};
1192
- -webkit-appearance: none;
1193
1008
  background-color: ${({ theme }) => theme.colors.neutral0};
1194
1009
  cursor: pointer;
1195
1010
 
@@ -1202,8 +1017,8 @@ const CheckboxInput = styled.input`
1202
1017
  display: block;
1203
1018
  position: relative;
1204
1019
  background: ${() => `url("${checkmarkIcon}") no-repeat no-repeat center center`};
1205
- width: 10px;
1206
- height: 10px;
1020
+ width: 1rem;
1021
+ height: 1rem;
1207
1022
  left: 50%;
1208
1023
  top: 50%;
1209
1024
  transform: translateX(-50%) translateY(-50%);
@@ -1262,30 +1077,39 @@ const BaseLink = forwardRef(
1262
1077
  );
1263
1078
  }
1264
1079
  );
1265
- const RadioContext = React.createContext({
1080
+ const useReactId = React["useId".toString()] || (() => void 0);
1081
+ let count = 0;
1082
+ const useId = (initialId) => {
1083
+ const [id, setId] = React.useState(useReactId());
1084
+ React.useLayoutEffect(() => {
1085
+ if (!initialId)
1086
+ setId((reactId) => reactId ?? String(count++));
1087
+ }, [initialId]);
1088
+ return initialId?.toString() ?? (id || "");
1089
+ };
1090
+ const setTabIndexOnFirstItem = (node, selector) => {
1091
+ const list = node.querySelectorAll(selector);
1092
+ if (list && list.length > 0) {
1093
+ list.item(0).setAttribute("tabindex", "0");
1094
+ }
1095
+ };
1096
+ const [RadioProvider, useRadioGroup] = createContext("RadioGroup", {
1266
1097
  onChange: void 0,
1267
1098
  name: "",
1268
- size: "M",
1269
1099
  selected: ""
1270
1100
  });
1271
- const getRadioSize = (size) => {
1272
- if (size === "M") {
1273
- return "18px";
1274
- }
1275
- return "20px";
1276
- };
1277
- const getSelectedRadioSize = (size) => {
1278
- if (size === "M") {
1279
- return "10px";
1280
- }
1281
- return "12px";
1282
- };
1283
- const getSelectedRadioPosition = () => {
1284
- return "3px";
1101
+ const RadioGroup = ({ children, labelledBy, onChange, value = "", name, ...props }) => {
1102
+ const radioGroupRef = React.useRef(null);
1103
+ React.useLayoutEffect(() => {
1104
+ if (!value) {
1105
+ setTabIndexOnFirstItem(radioGroupRef.current, `[name="${name}"]`);
1106
+ }
1107
+ }, [value, name]);
1108
+ return /* @__PURE__ */ jsx(RadioProvider, { onChange, selected: value, name, children: /* @__PURE__ */ jsx("div", { ref: radioGroupRef, role: "radiogroup", "aria-labelledby": labelledBy, ...props, children }) });
1285
1109
  };
1286
1110
  const BaseRadio = React.forwardRef(({ value, disabled = false, ...props }, ref) => {
1287
1111
  const generatedId = useId();
1288
- const { onChange, selected, name, size } = React.useContext(RadioContext);
1112
+ const { onChange, selected, name } = useRadioGroup("BaseRadio");
1289
1113
  const isSelected = selected === value;
1290
1114
  return /* @__PURE__ */ jsx(
1291
1115
  RadioInput,
@@ -1299,7 +1123,6 @@ const BaseRadio = React.forwardRef(({ value, disabled = false, ...props }, ref)
1299
1123
  checked: isSelected,
1300
1124
  disabled,
1301
1125
  id: generatedId,
1302
- $size: size,
1303
1126
  onChange,
1304
1127
  ...props
1305
1128
  }
@@ -1312,9 +1135,8 @@ const RadioInput = styled.input`
1312
1135
  background-color: ${({ theme }) => theme.colors.neutral0};
1313
1136
  border: 1px solid ${({ theme }) => theme.colors.primary600};
1314
1137
  border-radius: 50%;
1315
- height: ${({ $size }) => getRadioSize($size)};
1316
- width: ${({ $size }) => getRadioSize($size)};
1317
- -webkit-appearance: none;
1138
+ height: 1.8rem;
1139
+ width: 1.8rem;
1318
1140
 
1319
1141
  &:after {
1320
1142
  border-radius: 50%;
@@ -1322,10 +1144,10 @@ const RadioInput = styled.input`
1322
1144
  position: relative;
1323
1145
  z-index: 1;
1324
1146
  display: block;
1325
- height: ${({ $size }) => typeof $size === "number" ? $size : getSelectedRadioSize($size)};
1326
- width: ${({ $size }) => typeof $size === "number" ? $size : getSelectedRadioSize($size)};
1327
- left: ${getSelectedRadioPosition};
1328
- top: ${getSelectedRadioPosition};
1147
+ height: 1rem;
1148
+ width: 1rem;
1149
+ left: 0.3rem;
1150
+ top: 0.3rem;
1329
1151
  }
1330
1152
 
1331
1153
  &:checked:after {
@@ -1337,30 +1159,6 @@ const RadioInput = styled.input`
1337
1159
  background: ${({ theme }) => theme.colors.neutral200};
1338
1160
  }
1339
1161
  `;
1340
- const setTabIndexOnFirstItem = (node, selector) => {
1341
- const list = node.querySelectorAll(selector);
1342
- if (list && list.length > 0) {
1343
- list.item(0).setAttribute("tabindex", "0");
1344
- }
1345
- };
1346
- const RadioGroup = ({
1347
- children,
1348
- labelledBy,
1349
- onChange,
1350
- value = "",
1351
- size = "M",
1352
- name,
1353
- ...props
1354
- }) => {
1355
- const radioGroupRef = React.useRef(null);
1356
- React.useLayoutEffect(() => {
1357
- if (!value) {
1358
- setTabIndexOnFirstItem(radioGroupRef.current, `[name="${name}"]`);
1359
- }
1360
- }, [value, name]);
1361
- const context = React.useMemo(() => ({ onChange, selected: value, name, size }), [name, onChange, size, value]);
1362
- return /* @__PURE__ */ jsx(RadioContext.Provider, { value: context, children: /* @__PURE__ */ jsx("div", { ref: radioGroupRef, role: "radiogroup", "aria-labelledby": labelledBy, ...props, children }) });
1363
- };
1364
1162
  const Divider$1 = () => {
1365
1163
  return /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
1366
1164
  };
@@ -1608,7 +1406,7 @@ const Button = forwardRef(
1608
1406
  );
1609
1407
  }
1610
1408
  );
1611
- const rotation$1 = keyframes`
1409
+ const rotation$2 = keyframes`
1612
1410
  from {
1613
1411
  transform: rotate(0deg);
1614
1412
  }
@@ -1617,7 +1415,7 @@ const rotation$1 = keyframes`
1617
1415
  }
1618
1416
  `;
1619
1417
  const LoaderAnimated = styled(Loader$1)`
1620
- animation: ${rotation$1} 2s infinite linear;
1418
+ animation: ${rotation$2} 2s infinite linear;
1621
1419
  will-change: transform;
1622
1420
  `;
1623
1421
  const ButtonWrapper = styled(BaseButton)`
@@ -1736,8 +1534,8 @@ const Viewport$2 = styled(Flex)`
1736
1534
  display: none;
1737
1535
  }
1738
1536
  `;
1739
- const MenuItem$1 = ({ onSelect, disabled = false, ...props }) => {
1740
- return /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, onSelect, disabled, children: props.isLink || props.isExternal ? /* @__PURE__ */ jsx(OptionLink, { color: "neutral800", ...props, isExternal: props.isExternal ?? false, children: /* @__PURE__ */ jsx(Typography, { children: props.children }) }) : /* @__PURE__ */ jsx(OptionButton, { cursor: "pointer", color: "neutral800", background: "transparent", borderStyle: "none", ...props, children: /* @__PURE__ */ jsx(Typography, { children: props.children }) }) });
1537
+ const MenuItem$1 = ({ onSelect, disabled = false, isLink, ...props }) => {
1538
+ return /* @__PURE__ */ jsx(DropdownMenu.Item, { asChild: true, onSelect, disabled, children: isLink || props.isExternal ? /* @__PURE__ */ jsx(OptionLink, { color: "neutral800", ...props, isExternal: props.isExternal ?? false, children: /* @__PURE__ */ jsx(Typography, { children: props.children }) }) : /* @__PURE__ */ jsx(OptionButton, { cursor: "pointer", color: "neutral800", background: "transparent", borderStyle: "none", ...props, children: /* @__PURE__ */ jsx(Typography, { children: props.children }) }) });
1741
1539
  };
1742
1540
  const getOptionStyle = ({ theme }) => css`
1743
1541
  text-align: left;
@@ -1934,12 +1732,8 @@ const CardAction = styled(Flex)`
1934
1732
  return void 0;
1935
1733
  }};
1936
1734
  `;
1937
- const CARD_SIZES = {
1938
- S: 8.8,
1939
- M: 16.4
1940
- };
1941
1735
  const CardAsset = ({ size = "M", children, ...props }) => {
1942
- return /* @__PURE__ */ jsx(CardAssetWrapper, { $size: size, children: children ? /* @__PURE__ */ jsx(Flex, { children }) : /* @__PURE__ */ jsx(CardAssetImg, { ...props, "aria-hidden": true }) });
1736
+ return /* @__PURE__ */ jsx(CardAssetWrapper, { $size: size, children: children ? children : /* @__PURE__ */ jsx(CardAssetImg, { ...props, "aria-hidden": true }) });
1943
1737
  };
1944
1738
  const CardAssetImg = styled.img`
1945
1739
  // inline flows is based on typography and displays an extra white space below the image
@@ -1954,7 +1748,7 @@ const CardAssetImg = styled.img`
1954
1748
  const CardAssetWrapper = styled.div`
1955
1749
  display: flex;
1956
1750
  justify-content: center;
1957
- height: ${({ $size }) => `${CARD_SIZES[$size]}rem`};
1751
+ height: ${({ $size }) => $size === "S" ? "8.8rem" : "16.4rem"};
1958
1752
  width: 100%;
1959
1753
  background: repeating-conic-gradient(${({ theme }) => theme.colors.neutral100} 0% 25%, transparent 0% 50%) 50% / 20px
1960
1754
  20px;
@@ -2007,155 +1801,75 @@ const CardTitle = (props) => {
2007
1801
  const { id } = useCard();
2008
1802
  return /* @__PURE__ */ jsx(Typography, { variant: "pi", id: `${id}-title`, textColor: "neutral800", fontWeight: "bold", tag: "div", ...props });
2009
1803
  };
2010
- const CardSubtitle = (props) => {
2011
- return /* @__PURE__ */ jsx(Typography, { variant: "pi", ...props, textColor: "neutral600", tag: "div" });
2012
- };
2013
- const Portal$1 = React.forwardRef(
2014
- ({ container = globalThis?.document?.body, ...portalProps }, forwardedRef) => {
2015
- return container ? createPortal(/* @__PURE__ */ jsx(Box, { ref: forwardedRef, ...portalProps }), container) : null;
2016
- }
2017
- );
2018
- Portal$1.displayName = "Portal";
2019
- const useTooltipHandlers = (delay) => {
2020
- const [visible, setVisible] = React.useState(false);
2021
- const timerRef = React.useRef(null);
2022
- const clearTimer = () => {
2023
- if (typeof timerRef.current === "number") {
2024
- clearTimeout(timerRef.current);
2025
- timerRef.current = null;
2026
- }
2027
- };
2028
- React.useEffect(() => {
2029
- return () => {
2030
- clearTimer();
2031
- };
2032
- }, []);
2033
- const onFocus = () => {
2034
- setVisible(true);
2035
- };
2036
- const onBlur = () => {
2037
- setVisible(false);
2038
- };
2039
- const onMouseEnter = () => {
2040
- timerRef.current = setTimeout(() => {
2041
- setVisible(true);
2042
- }, delay);
2043
- };
2044
- const onMouseLeave = () => {
2045
- clearTimer();
2046
- setVisible(false);
2047
- };
2048
- return { visible, onFocus, onBlur, onMouseEnter, onMouseLeave };
2049
- };
2050
- const SPACE_BETWEEN = 8;
2051
- const positionBottom = (tooltipRect, toggleSourceRect) => {
2052
- const widthDifference = (tooltipRect.width - toggleSourceRect.width) / 2;
2053
- const left = toggleSourceRect.left - widthDifference;
2054
- const top = toggleSourceRect.top + toggleSourceRect.height + SPACE_BETWEEN + window.pageYOffset;
2055
- return {
2056
- left,
2057
- top
2058
- };
2059
- };
2060
- const positionRight = (tooltipRect, toggleSourceRect) => {
2061
- const heightDifference = (tooltipRect.height - toggleSourceRect.height) / 2;
2062
- const left = toggleSourceRect.left + toggleSourceRect.width + SPACE_BETWEEN;
2063
- const top = toggleSourceRect.top - heightDifference + window.pageYOffset;
2064
- return { left, top };
2065
- };
2066
- const positionLeft = (tooltipRect, toggleSourceRect) => {
2067
- const heightDifference = (tooltipRect.height - toggleSourceRect.height) / 2;
2068
- const left = toggleSourceRect.left - tooltipRect.width - SPACE_BETWEEN;
2069
- const top = toggleSourceRect.top - heightDifference + window.pageYOffset;
2070
- return { left, top };
2071
- };
2072
- const positionTop = (tooltipRect, toggleSourceRect) => {
2073
- const widthDifference = (tooltipRect.width - toggleSourceRect.width) / 2;
2074
- let left = toggleSourceRect.left - widthDifference;
2075
- let top = toggleSourceRect.top - tooltipRect.height - SPACE_BETWEEN + window.pageYOffset;
2076
- const rightSpaceDifference = window.innerWidth - toggleSourceRect.right;
2077
- const overflowRight = toggleSourceRect.left + tooltipRect.width - rightSpaceDifference;
2078
- if (overflowRight > window.innerWidth) {
2079
- left = toggleSourceRect.left - tooltipRect.width - SPACE_BETWEEN;
2080
- top = toggleSourceRect.top + window.scrollY - toggleSourceRect.height / 2;
2081
- } else if (left < 0) {
2082
- left = toggleSourceRect.width + toggleSourceRect.left + SPACE_BETWEEN;
2083
- top = toggleSourceRect.top + window.scrollY - tooltipRect.height / 2 + SPACE_BETWEEN;
2084
- } else if (top < 0 && left > 0) {
2085
- top = toggleSourceRect.top + toggleSourceRect.height + SPACE_BETWEEN;
2086
- }
2087
- return {
2088
- left,
2089
- top
2090
- };
2091
- };
2092
- const positionTooltip = (tooltipNode, toggleSourceNode, position) => {
2093
- const tooltipRect = tooltipNode.getBoundingClientRect();
2094
- const toggleSourceRect = toggleSourceNode.getBoundingClientRect();
2095
- if (position === "bottom") {
2096
- return positionBottom(tooltipRect, toggleSourceRect);
2097
- }
2098
- if (position === "right") {
2099
- return positionRight(tooltipRect, toggleSourceRect);
2100
- }
2101
- if (position === "left") {
2102
- return positionLeft(tooltipRect, toggleSourceRect);
2103
- }
2104
- return positionTop(tooltipRect, toggleSourceRect);
2105
- };
2106
- const useTooltipLayout = (visible, position) => {
2107
- const tooltipWrapperRef = React.useRef(null);
2108
- const toggleSourceRef = React.useRef(null);
2109
- React.useLayoutEffect(() => {
2110
- if (visible) {
2111
- const tooltip = tooltipWrapperRef.current;
2112
- const toggleSource = toggleSourceRef.current;
2113
- if (tooltip && toggleSource) {
2114
- const tooltipPosition = positionTooltip(tooltip, toggleSource, position);
2115
- tooltip.style.left = `${tooltipPosition.left}px`;
2116
- tooltip.style.top = `${tooltipPosition.top}px`;
2117
- }
2118
- }
2119
- }, [position, visible]);
2120
- return { tooltipWrapperRef, toggleSourceRef };
1804
+ const CardSubtitle = (props) => {
1805
+ return /* @__PURE__ */ jsx(Typography, { variant: "pi", ...props, textColor: "neutral600", tag: "div" });
2121
1806
  };
2122
- const Tooltip = ({ children, label, description, delay = 500, position = "top", id, ...props }) => {
2123
- const tooltipId = useId(id);
2124
- const descriptionId = useId();
2125
- const { visible, ...tooltipHandlers } = useTooltipHandlers(delay);
2126
- const { tooltipWrapperRef, toggleSourceRef } = useTooltipLayout(visible, position);
2127
- const childrenClone = React.cloneElement(children, {
2128
- tabIndex: 0,
2129
- "aria-labelledby": label ? tooltipId : void 0,
2130
- "aria-describedby": description ? tooltipId : void 0,
2131
- ...tooltipHandlers
2132
- });
2133
- return /* @__PURE__ */ jsxs(Fragment, { children: [
2134
- /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsxs(
2135
- TooltipWrapper,
1807
+ const KeyboardKeys = {
1808
+ DOWN: "ArrowDown",
1809
+ UP: "ArrowUp",
1810
+ RIGHT: "ArrowRight",
1811
+ LEFT: "ArrowLeft",
1812
+ ESCAPE: "Escape",
1813
+ ENTER: "Enter",
1814
+ SPACE: " ",
1815
+ TAB: "Tab",
1816
+ END: "End",
1817
+ HOME: "Home",
1818
+ DELETE: "Delete",
1819
+ PAGE_UP: "PageUp",
1820
+ PAGE_DOWN: "PageDown",
1821
+ BACKSPACE: "Backspace",
1822
+ CLEAR: "Clear"
1823
+ };
1824
+ const TooltipImpl = React.forwardRef(
1825
+ ({
1826
+ children,
1827
+ description,
1828
+ label,
1829
+ defaultOpen,
1830
+ open,
1831
+ onOpenChange,
1832
+ delayDuration = 500,
1833
+ disableHoverableContent,
1834
+ ...restProps
1835
+ }, forwardedRef) => {
1836
+ return /* @__PURE__ */ jsxs(
1837
+ Tooltip.Root,
2136
1838
  {
2137
- id: tooltipId,
2138
- background: "neutral900",
2139
- hasRadius: true,
2140
- padding: 2,
2141
- role: "tooltip",
2142
- ref: tooltipWrapperRef,
2143
- $visible: visible,
2144
- position: "absolute",
2145
- ...props,
1839
+ defaultOpen,
1840
+ open,
1841
+ onOpenChange,
1842
+ delayDuration,
1843
+ disableHoverableContent,
2146
1844
  children: [
2147
- visible && /* @__PURE__ */ jsx(VisuallyHidden, { id: descriptionId, children: description }),
2148
- /* @__PURE__ */ jsx(Typography, { tag: "p", variant: "pi", fontWeight: "bold", textColor: "neutral0", children: label || description })
1845
+ /* @__PURE__ */ jsx(Tooltip.Trigger, { asChild: true, children }),
1846
+ /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(TooltipContent, { ref: forwardedRef, sideOffset: 8, ...restProps, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", children: label || description }) }) })
2149
1847
  ]
2150
1848
  }
2151
- ) }),
2152
- /* @__PURE__ */ jsx("span", { ref: toggleSourceRef, children: childrenClone })
2153
- ] });
2154
- };
2155
- const TooltipWrapper = styled(Box)`
2156
- /* z-index exist because of its position inside Modals */
2157
- z-index: 4;
2158
- display: ${({ $visible }) => $visible ? "revert" : "none"};
1849
+ );
1850
+ }
1851
+ );
1852
+ const fadeIn = keyframes`
1853
+ from {
1854
+ opacity: 0;
1855
+ }
1856
+ to {
1857
+ opacity: 1;
1858
+ }
1859
+ `;
1860
+ const TooltipContent = styled(Tooltip.Content)`
1861
+ background-color: ${(props) => props.theme.colors.neutral900};
1862
+ color: ${(props) => props.theme.colors.neutral0};
1863
+ padding-inline: ${(props) => props.theme.spaces[2]};
1864
+ padding-block: ${(props) => props.theme.spaces[2]};
1865
+ border-radius: ${(props) => props.theme.borderRadius};
1866
+ z-index: ${(props) => props.theme.zIndices.tooltip};
1867
+ will-change: opacity;
1868
+ transform-origin: var(--radix-tooltip-content-transform-origin);
1869
+
1870
+ @media (prefers-reduced-motion: no-preference) {
1871
+ animation: ${fadeIn} 200ms ${(props) => props.theme.easings.authenticMotion};
1872
+ }
2159
1873
  `;
2160
1874
  const CarouselGrid = styled(Box)`
2161
1875
  grid-template-columns: auto 1fr auto;
@@ -2223,41 +1937,43 @@ const Carousel = React.forwardRef(
2223
1937
  ]
2224
1938
  }
2225
1939
  ),
2226
- secondaryLabel && /* @__PURE__ */ jsx(Box, { paddingTop: 2, paddingLeft: 4, paddingRight: 4, children: /* @__PURE__ */ jsx(Tooltip, { label: secondaryLabel, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", ellipsis: true, children: secondaryLabel }) }) }) })
1940
+ secondaryLabel && /* @__PURE__ */ jsx(Box, { paddingTop: 2, paddingLeft: 4, paddingRight: 4, children: /* @__PURE__ */ jsx(TooltipImpl, { label: secondaryLabel, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", ellipsis: true, children: secondaryLabel }) }) }) })
2227
1941
  ] }) });
2228
1942
  }
2229
1943
  );
2230
- const createContext = (rootComponentName, defaultContext) => {
2231
- const Context = React.createContext(defaultContext);
2232
- const Provider2 = (props) => {
2233
- const { children, ...context } = props;
2234
- const value = React.useMemo(() => context, Object.values(context));
2235
- return /* @__PURE__ */ jsx(Context.Provider, { value, children });
2236
- };
2237
- function useContext(consumerName) {
2238
- const context = React.useContext(Context);
2239
- if (context)
2240
- return context;
2241
- if (defaultContext !== void 0)
2242
- return defaultContext;
2243
- throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
2244
- }
2245
- Provider2.displayName = `${rootComponentName}Provider`;
2246
- return [Provider2, useContext];
1944
+ const EASINGS = {
1945
+ easeInSine: "cubic-bezier(0.47, 0, 0.745, 0.715)",
1946
+ easeOutSine: "cubic-bezier(0.39, 0.575, 0.565, 1)",
1947
+ easeInOutSine: "cubic-bezier(0.39, 0.575, 0.565, 1)",
1948
+ easeInQuad: "cubic-bezier(0.55, 0.085, 0.68, 0.53)",
1949
+ easeOutQuad: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
1950
+ easeInOutQuad: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
1951
+ easeInCubic: "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
1952
+ easeOutCubic: "cubic-bezier(0.215, 0.61, 0.355, 1)",
1953
+ easeInOutCubic: "cubic-bezier(0.215, 0.61, 0.355, 1)",
1954
+ easeInQuart: "cubic-bezier(0.895, 0.03, 0.685, 0.22)",
1955
+ easeOutQuart: "cubic-bezier(0.165, 0.84, 0.44, 1)",
1956
+ easeInOutQuart: "cubic-bezier(0.165, 0.84, 0.44, 1)",
1957
+ easeInQuint: "cubic-bezier(0.755, 0.05, 0.855, 0.06)",
1958
+ easeOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
1959
+ easeInOutQuint: "cubic-bezier(0.23, 1, 0.32, 1)",
1960
+ easeInExpo: "cubic-bezier(0.95, 0.05, 0.795, 0.035)",
1961
+ easeOutExpo: "cubic-bezier(0.19, 1, 0.22, 1)",
1962
+ easeInOutExpo: "cubic-bezier(0.19, 1, 0.22, 1)",
1963
+ easeInCirc: "cubic-bezier(0.6, 0.04, 0.98, 0.335)",
1964
+ easeOutCirc: "cubic-bezier(0.075, 0.82, 0.165, 1)",
1965
+ easeInOutCirc: "cubic-bezier(0.075, 0.82, 0.165, 1)",
1966
+ easeInBack: "cubic-bezier(0.6, -0.28, 0.735, 0.045)",
1967
+ easeOutBack: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
1968
+ easeInOutBack: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
1969
+ easeInOutFast: "cubic-bezier(1,0,0,1)",
1970
+ authenticMotion: "cubic-bezier(.4,0,.2,1)"
2247
1971
  };
2248
1972
  const sizes = {
2249
- input: {
2250
- S: `3.2rem`,
2251
- M: `4rem`
2252
- },
2253
1973
  accordions: {
2254
1974
  S: `4.8rem`,
2255
1975
  M: `8.8rem`
2256
1976
  },
2257
- badge: {
2258
- S: `1.6rem`,
2259
- M: `2.4rem`
2260
- },
2261
1977
  button: {
2262
1978
  S: `3.2rem`,
2263
1979
  M: `3.6rem`,
@@ -2266,8 +1982,15 @@ const sizes = {
2266
1982
  };
2267
1983
  const commonTheme = {
2268
1984
  sizes,
2269
- zIndices: [5, 10, 15, 20],
2270
- // TBD
1985
+ zIndices: {
1986
+ navigation: 100,
1987
+ overlay: 300,
1988
+ modal: 310,
1989
+ dialog: 320,
1990
+ popover: 500,
1991
+ notification: 700,
1992
+ tooltip: 1e3
1993
+ },
2271
1994
  spaces: ["0px", "4px", "8px", "12px", "16px", "20px", "24px", "32px", "40px", "48px", "56px", "64px"],
2272
1995
  borderRadius: "4px",
2273
1996
  mediaQueries: {
@@ -2280,7 +2003,8 @@ const commonTheme = {
2280
2003
  regular: 400,
2281
2004
  semiBold: 500,
2282
2005
  bold: 600
2283
- }
2006
+ },
2007
+ easings: EASINGS
2284
2008
  };
2285
2009
  const lightColorTokenObject = {
2286
2010
  color: {
@@ -3108,7 +2832,7 @@ lodash.exports;
3108
2832
  }
3109
2833
  var runInContext = function runInContext2(context) {
3110
2834
  context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
3111
- var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
2835
+ var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
3112
2836
  var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
3113
2837
  var coreJsData = context["__core-js_shared__"];
3114
2838
  var funcToString = funcProto.toString;
@@ -3631,9 +3355,9 @@ lodash.exports;
3631
3355
  }
3632
3356
  function baseDelay(func, wait, args) {
3633
3357
  if (typeof func != "function") {
3634
- throw new TypeError2(FUNC_ERROR_TEXT);
3358
+ throw new TypeError(FUNC_ERROR_TEXT);
3635
3359
  }
3636
- return setTimeout2(function() {
3360
+ return setTimeout(function() {
3637
3361
  func.apply(undefined$1, args);
3638
3362
  }, wait);
3639
3363
  }
@@ -4413,7 +4137,7 @@ lodash.exports;
4413
4137
  end = end === undefined$1 ? length : end;
4414
4138
  return !start && end >= length ? array : baseSlice(array, start, end);
4415
4139
  }
4416
- var clearTimeout2 = ctxClearTimeout || function(id) {
4140
+ var clearTimeout = ctxClearTimeout || function(id) {
4417
4141
  return root.clearTimeout(id);
4418
4142
  };
4419
4143
  function cloneBuffer(buffer, isDeep) {
@@ -4686,7 +4410,7 @@ lodash.exports;
4686
4410
  while (index--) {
4687
4411
  var func = funcs[index];
4688
4412
  if (typeof func != "function") {
4689
- throw new TypeError2(FUNC_ERROR_TEXT);
4413
+ throw new TypeError(FUNC_ERROR_TEXT);
4690
4414
  }
4691
4415
  if (prereq && !wrapper && getFuncName(func) == "wrapper") {
4692
4416
  var wrapper = new LodashWrapper([], true);
@@ -4910,7 +4634,7 @@ lodash.exports;
4910
4634
  function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
4911
4635
  var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
4912
4636
  if (!isBindKey && typeof func != "function") {
4913
- throw new TypeError2(FUNC_ERROR_TEXT);
4637
+ throw new TypeError(FUNC_ERROR_TEXT);
4914
4638
  }
4915
4639
  var length = partials ? partials.length : 0;
4916
4640
  if (!length) {
@@ -5464,7 +5188,7 @@ lodash.exports;
5464
5188
  return object[key];
5465
5189
  }
5466
5190
  var setData = shortOut(baseSetData);
5467
- var setTimeout2 = ctxSetTimeout || function(func, wait) {
5191
+ var setTimeout = ctxSetTimeout || function(func, wait) {
5468
5192
  return root.setTimeout(func, wait);
5469
5193
  };
5470
5194
  var setToString = shortOut(baseSetToString);
@@ -6177,7 +5901,7 @@ lodash.exports;
6177
5901
  };
6178
5902
  function after(n, func) {
6179
5903
  if (typeof func != "function") {
6180
- throw new TypeError2(FUNC_ERROR_TEXT);
5904
+ throw new TypeError(FUNC_ERROR_TEXT);
6181
5905
  }
6182
5906
  n = toInteger(n);
6183
5907
  return function() {
@@ -6194,7 +5918,7 @@ lodash.exports;
6194
5918
  function before(n, func) {
6195
5919
  var result2;
6196
5920
  if (typeof func != "function") {
6197
- throw new TypeError2(FUNC_ERROR_TEXT);
5921
+ throw new TypeError(FUNC_ERROR_TEXT);
6198
5922
  }
6199
5923
  n = toInteger(n);
6200
5924
  return function() {
@@ -6238,7 +5962,7 @@ lodash.exports;
6238
5962
  function debounce(func, wait, options) {
6239
5963
  var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
6240
5964
  if (typeof func != "function") {
6241
- throw new TypeError2(FUNC_ERROR_TEXT);
5965
+ throw new TypeError(FUNC_ERROR_TEXT);
6242
5966
  }
6243
5967
  wait = toNumber(wait) || 0;
6244
5968
  if (isObject2(options)) {
@@ -6256,7 +5980,7 @@ lodash.exports;
6256
5980
  }
6257
5981
  function leadingEdge(time) {
6258
5982
  lastInvokeTime = time;
6259
- timerId = setTimeout2(timerExpired, wait);
5983
+ timerId = setTimeout(timerExpired, wait);
6260
5984
  return leading ? invokeFunc(time) : result2;
6261
5985
  }
6262
5986
  function remainingWait(time) {
@@ -6272,7 +5996,7 @@ lodash.exports;
6272
5996
  if (shouldInvoke(time)) {
6273
5997
  return trailingEdge(time);
6274
5998
  }
6275
- timerId = setTimeout2(timerExpired, remainingWait(time));
5999
+ timerId = setTimeout(timerExpired, remainingWait(time));
6276
6000
  }
6277
6001
  function trailingEdge(time) {
6278
6002
  timerId = undefined$1;
@@ -6284,7 +6008,7 @@ lodash.exports;
6284
6008
  }
6285
6009
  function cancel() {
6286
6010
  if (timerId !== undefined$1) {
6287
- clearTimeout2(timerId);
6011
+ clearTimeout(timerId);
6288
6012
  }
6289
6013
  lastInvokeTime = 0;
6290
6014
  lastArgs = lastCallTime = lastThis = timerId = undefined$1;
@@ -6302,13 +6026,13 @@ lodash.exports;
6302
6026
  return leadingEdge(lastCallTime);
6303
6027
  }
6304
6028
  if (maxing) {
6305
- clearTimeout2(timerId);
6306
- timerId = setTimeout2(timerExpired, wait);
6029
+ clearTimeout(timerId);
6030
+ timerId = setTimeout(timerExpired, wait);
6307
6031
  return invokeFunc(lastCallTime);
6308
6032
  }
6309
6033
  }
6310
6034
  if (timerId === undefined$1) {
6311
- timerId = setTimeout2(timerExpired, wait);
6035
+ timerId = setTimeout(timerExpired, wait);
6312
6036
  }
6313
6037
  return result2;
6314
6038
  }
@@ -6327,7 +6051,7 @@ lodash.exports;
6327
6051
  }
6328
6052
  function memoize(func, resolver) {
6329
6053
  if (typeof func != "function" || resolver != null && typeof resolver != "function") {
6330
- throw new TypeError2(FUNC_ERROR_TEXT);
6054
+ throw new TypeError(FUNC_ERROR_TEXT);
6331
6055
  }
6332
6056
  var memoized = function() {
6333
6057
  var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
@@ -6344,7 +6068,7 @@ lodash.exports;
6344
6068
  memoize.Cache = MapCache;
6345
6069
  function negate(predicate) {
6346
6070
  if (typeof predicate != "function") {
6347
- throw new TypeError2(FUNC_ERROR_TEXT);
6071
+ throw new TypeError(FUNC_ERROR_TEXT);
6348
6072
  }
6349
6073
  return function() {
6350
6074
  var args = arguments;
@@ -6361,7 +6085,7 @@ lodash.exports;
6361
6085
  return !predicate.apply(this, args);
6362
6086
  };
6363
6087
  }
6364
- function once2(func) {
6088
+ function once(func) {
6365
6089
  return before(2, func);
6366
6090
  }
6367
6091
  var overArgs = castRest(function(func, transforms) {
@@ -6388,14 +6112,14 @@ lodash.exports;
6388
6112
  });
6389
6113
  function rest(func, start) {
6390
6114
  if (typeof func != "function") {
6391
- throw new TypeError2(FUNC_ERROR_TEXT);
6115
+ throw new TypeError(FUNC_ERROR_TEXT);
6392
6116
  }
6393
6117
  start = start === undefined$1 ? start : toInteger(start);
6394
6118
  return baseRest(func, start);
6395
6119
  }
6396
6120
  function spread(func, start) {
6397
6121
  if (typeof func != "function") {
6398
- throw new TypeError2(FUNC_ERROR_TEXT);
6122
+ throw new TypeError(FUNC_ERROR_TEXT);
6399
6123
  }
6400
6124
  start = start == null ? 0 : nativeMax(toInteger(start), 0);
6401
6125
  return baseRest(function(args) {
@@ -6409,7 +6133,7 @@ lodash.exports;
6409
6133
  function throttle(func, wait, options) {
6410
6134
  var leading = true, trailing = true;
6411
6135
  if (typeof func != "function") {
6412
- throw new TypeError2(FUNC_ERROR_TEXT);
6136
+ throw new TypeError(FUNC_ERROR_TEXT);
6413
6137
  }
6414
6138
  if (isObject2(options)) {
6415
6139
  leading = "leading" in options ? !!options.leading : leading;
@@ -7225,7 +6949,7 @@ lodash.exports;
7225
6949
  var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
7226
6950
  pairs = !length ? [] : arrayMap(pairs, function(pair) {
7227
6951
  if (typeof pair[1] != "function") {
7228
- throw new TypeError2(FUNC_ERROR_TEXT);
6952
+ throw new TypeError(FUNC_ERROR_TEXT);
7229
6953
  }
7230
6954
  return [toIteratee(pair[0]), pair[1]];
7231
6955
  });
@@ -7482,7 +7206,7 @@ lodash.exports;
7482
7206
  lodash2.nthArg = nthArg;
7483
7207
  lodash2.omit = omit;
7484
7208
  lodash2.omitBy = omitBy;
7485
- lodash2.once = once2;
7209
+ lodash2.once = once;
7486
7210
  lodash2.orderBy = orderBy;
7487
7211
  lodash2.over = over;
7488
7212
  lodash2.overArgs = overArgs;
@@ -7995,17 +7719,12 @@ const LabelAction = styled(Flex)`
7995
7719
  line-height: 0;
7996
7720
  color: ${({ theme }) => theme.colors.neutral500};
7997
7721
  `;
7998
- const PADDING_Y = {
7999
- S: 0.6,
8000
- M: 0.8
8001
- };
8002
7722
  const Input$2 = React.forwardRef(
8003
7723
  ({
8004
7724
  endAction,
8005
7725
  startAction,
8006
7726
  disabled = false,
8007
7727
  onChange,
8008
- size = "M",
8009
7728
  hasError: hasErrorProp,
8010
7729
  required: requiredProp,
8011
7730
  className,
@@ -8029,6 +7748,8 @@ const Input$2 = React.forwardRef(
8029
7748
  {
8030
7749
  paddingLeft: 3,
8031
7750
  paddingRight: 3,
7751
+ paddingTop: 2,
7752
+ paddingBottom: 2,
8032
7753
  gap: 2,
8033
7754
  justifyContent: "space-between",
8034
7755
  $hasError: hasError || hasErrorProp,
@@ -8051,7 +7772,6 @@ const Input$2 = React.forwardRef(
8051
7772
  $hasRightAction: Boolean(endAction),
8052
7773
  onChange: handleChange,
8053
7774
  "aria-required": required || requiredProp,
8054
- $size: size,
8055
7775
  ...props
8056
7776
  }
8057
7777
  ),
@@ -8064,9 +7784,6 @@ const Input$2 = React.forwardRef(
8064
7784
  const InputElement = styled.input`
8065
7785
  border: none;
8066
7786
  border-radius: ${({ theme }) => theme.borderRadius};
8067
- padding: 0;
8068
- padding-bottom: ${({ $size }) => `${PADDING_Y[$size]}rem`};
8069
- padding-top: ${({ $size }) => `${PADDING_Y[$size]}rem`};
8070
7787
  cursor: ${(props) => props["aria-disabled"] ? "not-allowed" : void 0};
8071
7788
 
8072
7789
  color: ${({ theme }) => theme.colors.neutral800};
@@ -8187,11 +7904,10 @@ const CarouselInput = React.forwardRef(
8187
7904
  ] }) });
8188
7905
  }
8189
7906
  );
8190
- const CarouselActions = ({ horizontal = true, spacing = 1, ...props }) => /* @__PURE__ */ jsx(
7907
+ const CarouselActions = ({ horizontal = true, ...props }) => /* @__PURE__ */ jsx(
8191
7908
  Flex,
8192
7909
  {
8193
7910
  justifyContent: "center",
8194
- gap: spacing,
8195
7911
  direction: horizontal ? "row" : "column",
8196
7912
  alignItems: horizontal ? "center" : "stretch",
8197
7913
  position: "absolute",
@@ -8209,7 +7925,7 @@ const CarouselImage = (props) => {
8209
7925
  setIsError(true);
8210
7926
  };
8211
7927
  if (isError) {
8212
- return /* @__PURE__ */ jsx(Tooltip, { description: props.alt ?? "", children: /* @__PURE__ */ jsx(StyledImage, { tag: "img", height: "100%", maxWidth: "100%", ...props }) });
7928
+ return /* @__PURE__ */ jsx(TooltipImpl, { label: props.alt ?? "", children: /* @__PURE__ */ jsx(StyledImage, { tag: "img", height: "100%", maxWidth: "100%", ...props }) });
8213
7929
  }
8214
7930
  return /* @__PURE__ */ jsx(StyledImage, { tag: "img", height: "100%", maxWidth: "100%", ...props, onError: handleImageError });
8215
7931
  };
@@ -8243,47 +7959,6 @@ const CheckboxLabel = styled(Typography)`
8243
7959
  cursor: ${({ $disabled }) => $disabled ? "not-allowed" : "pointer"};
8244
7960
  }
8245
7961
  `;
8246
- function useControllableState({
8247
- prop,
8248
- defaultProp,
8249
- onChange = () => {
8250
- }
8251
- }) {
8252
- const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
8253
- const isControlled = prop !== void 0;
8254
- const propValue = prop instanceof Function ? prop(uncontrolledProp) : prop;
8255
- const value = isControlled ? propValue : uncontrolledProp;
8256
- const handleChange = useCallbackRef(onChange);
8257
- const setValue = React.useCallback(
8258
- (nextValue) => {
8259
- if (isControlled) {
8260
- const setter = nextValue;
8261
- const value2 = typeof nextValue === "function" ? setter(propValue) : nextValue;
8262
- if (value2 !== propValue) {
8263
- handleChange(value2);
8264
- setUncontrolledProp(nextValue);
8265
- }
8266
- } else {
8267
- setUncontrolledProp(nextValue);
8268
- }
8269
- },
8270
- [isControlled, propValue, setUncontrolledProp, handleChange]
8271
- );
8272
- return [value, setValue];
8273
- }
8274
- function useUncontrolledState({ defaultProp, onChange }) {
8275
- const uncontrolledState = React.useState(defaultProp);
8276
- const [value] = uncontrolledState;
8277
- const prevValueRef = React.useRef(value);
8278
- const handleChange = useCallbackRef(onChange);
8279
- React.useEffect(() => {
8280
- if (prevValueRef.current !== value) {
8281
- handleChange(value);
8282
- prevValueRef.current = value;
8283
- }
8284
- }, [value, prevValueRef, handleChange]);
8285
- return uncontrolledState;
8286
- }
8287
7962
  const loaderSvg = "data:image/svg+xml,%3csvg%20width='63'%20height='63'%20viewBox='0%200%2063%2063'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M42.5563%2011.9816C39.484%2010.3071%2035.8575%209.29097%2032.3354%209.13521C28.6443%208.92888%2024.8295%209.72318%2021.3336%2011.4129C20.9123%2011.5901%2020.5376%2011.8101%2020.1722%2012.0249L20.0108%2012.1179C19.8774%2012.1951%2019.7441%2012.2724%2019.608%2012.3536C19.3253%2012.5146%2019.0492%2012.6744%2018.7544%2012.8792C18.5463%2013.0329%2018.3395%2013.1759%2018.1301%2013.323C17.5658%2013.7208%2016.9868%2014.1317%2016.4983%2014.5979C14.8476%2015.9524%2013.5571%2017.6075%2012.6071%2018.9214C10.4365%2022.1566%209.08622%2025.9567%208.80702%2029.6143L8.7764%2030.1588C8.73328%2030.9196%208.68476%2031.7057%208.75353%2032.4555C8.76648%2032.6084%208.7661%2032.7638%208.77506%2032.914C8.78895%2033.229%208.80152%2033.5373%208.846%2033.8672L9.07396%2035.4221C9.09756%2035.5764%209.1198%2035.7413%209.1633%2035.9263L9.65919%2037.9272L10.138%2039.2823C10.2729%2039.6673%2010.4158%2040.0751%2010.6%2040.43C12.0292%2043.637%2014.1425%2046.4578%2016.7063%2048.585C19.0508%2050.5296%2021.824%2052.0023%2024.7491%2052.8452L26.2371%2053.2376C26.3781%2053.2693%2026.4926%2053.2889%2026.6031%2053.3058L26.7775%2053.3311C27.0052%2053.3636%2027.2195%2053.3986%2027.4445%2053.435C27.8598%2053.5076%2028.2672%2053.5748%2028.7079%2053.6183L30.5641%2053.7229C30.9516%2053.7249%2031.3352%2053.7068%2031.7081%2053.6874C31.9039%2053.681%2032.0984%2053.6681%2032.3288%2053.662C34.5253%2053.4772%2036.5106%2053.0634%2038.0516%2052.4652C38.1769%2052.4171%2038.3008%2052.3796%2038.4234%2052.3355C38.6727%2052.2499%2038.9259%2052.167%2039.1432%2052.0599L40.8591%2051.2626L42.5702%2050.266C42.9009%2050.0682%2043.0205%2049.6414%2042.8282%2049.2984C42.632%2048.9526%2042.2034%2048.8308%2041.8634%2049.0166L40.1792%2049.9218L38.4995%2050.6224C38.3169%2050.6953%2038.121%2050.7534%2037.9224%2050.8155C37.7838%2050.8489%2037.6518%2050.8983%2037.5012%2050.9408C36.0711%2051.435%2034.2445%2051.7425%2032.244%2051.8346C32.0442%2051.8383%2031.8471%2051.8379%2031.654%2051.8403C31.3051%2051.8414%2030.9602%2051.8451%2030.6392%2051.8305L28.9177%2051.6725C28.5476%2051.619%2028.1695%2051.5427%2027.7848%2051.4678C27.5639%2051.4167%2027.3376%2051.3737%2027.1299%2051.3374L26.9529%2051.2987C26.8704%2051.2834%2026.7772%2051.2667%2026.7333%2051.2543L25.3466%2050.8322C22.7651%2049.9789%2020.33%2048.5729%2018.2942%2046.7557C16.1056%2044.7951%2014.3339%2042.2335%2013.1742%2039.3582C12.0276%2036.6013%2011.5988%2033.2792%2011.9716%2030.0076C12.3145%2027.0213%2013.3948%2024.1635%2015.1858%2021.5083C15.3034%2021.3339%2015.421%2021.1596%2015.5212%2021.0196C16.4309%2019.8688%2017.5408%2018.5589%2018.9483%2017.496C19.3367%2017.1525%2019.7862%2016.856%2020.2611%2016.5478C20.4878%2016.4009%2020.7079%2016.2553%2020.8907%2016.1306C21.0974%2016.0048%2021.3188%2015.8831%2021.5348%2015.7694C21.6761%2015.6975%2021.8162%2015.619%2021.9388%2015.5576L22.1002%2015.4646C22.4002%2015.3037%2022.6749%2015.1546%2022.9908%2015.039L24.1186%2014.5715C24.3399%2014.4844%2024.5718%2014.4159%2024.7997%2014.3447C24.953%2014.2982%2025.0982%2014.2635%2025.2635%2014.2078C25.786%2014.0182%2026.3283%2013.9112%2026.9105%2013.7965C27.117%2013.7571%2027.3302%2013.7163%2027.5608%2013.6585C27.7553%2013.611%2027.9737%2013.5969%2028.2082%2013.5762C28.364%2013.5603%2028.5172%2013.5483%2028.6318%2013.5333C28.7876%2013.5173%2028.9342%2013.5066%2029.0927%2013.4867C29.3285%2013.4555%2029.5456%2013.4347%2029.7494%2013.4337C30.0237%2013.44%2030.2994%2013.4357%2030.5777%2013.4274C31.0811%2013.421%2031.5579%2013.4197%2032.0318%2013.4914C34.9664%2013.7352%2037.7144%2014.6085%2040.2052%2016.0868C42.3489%2017.3655%2044.2716%2019.1525%2045.7607%2021.264C47.0255%2023.0628%2047.9756%2025.0528%2048.4928%2027.0393C48.572%2027.3176%2048.6299%2027.5931%2048.6839%2027.8659C48.7154%2028.0428%2048.7563%2028.2145%2048.7892%2028.3636C48.8037%2028.4541%2048.8208%2028.5406%2048.8445%2028.6258C48.8749%2028.7443%2048.8986%2028.864%2048.9116%2028.9651L48.9793%2029.6047C48.9922%2029.7748%2049.0132%2029.9331%2049.0301%2030.0887C49.0668%2030.3268%2049.0889%2030.5608%2049.0964%2030.7561L49.1083%2031.9001C49.1312%2032.3307%2049.089%2032.7116%2049.0522%2033.0673C49.0384%2033.2598%2049.0126%2033.4443%2049.0123%2033.5824C48.9961%2033.6926%2048.9918%2033.7935%2048.9836%2033.8917C48.9753%2034.0072%2048.9724%2034.1148%2048.9414%2034.2554L48.5449%2036.3059C48.3134%2037.8623%2049.3793%2039.3365%2050.9488%2039.5822C52.0417%2039.7601%2053.1536%2039.2819%2053.7711%2038.3664C54.0063%2038.0176%2054.1604%2037.6257%2054.2227%2037.2064L54.5217%2035.2574C54.5514%2035.0756%2054.572%2034.83%2054.5846%2034.5791L54.6028%2034.2338C54.6098%2034.0598%2054.6223%2033.8779%2054.6347%2033.6788C54.6734%2033.1052%2054.7163%2032.4479%2054.6619%2031.8058L54.5867%2030.4289C54.5622%2030.0952%2054.5097%2029.76%2054.4559%2029.4181C54.431%2029.2572%2054.4048%2029.0896%2054.3826%2028.9074L54.2687%2028.104C54.2332%2027.9244%2054.1804%2027.7273%2054.1329%2027.5396L54.0643%2027.2454C54.0195%2027.071%2053.9773%2026.8927%2053.9338%2026.7076C53.8455%2026.3309%2053.7479%2025.9422%2053.613%2025.5571C52.84%2023.0292%2051.5383%2020.5194%2049.8338%2018.2799C47.8544%2015.682%2045.3333%2013.5087%2042.5563%2011.9816Z'%20fill='%234945FF'/%3e%3c/svg%3e";
8288
7963
  const Loader = React.forwardRef(({ children, small = false, ...props }, ref) => {
8289
7964
  return /* @__PURE__ */ jsxs("div", { role: "alert", "aria-live": "assertive", ref, ...props, children: [
@@ -8291,7 +7966,7 @@ const Loader = React.forwardRef(({ children, small = false, ...props }, ref) =>
8291
7966
  /* @__PURE__ */ jsx(LoaderImg, { src: loaderSvg, "aria-hidden": true, $small: small })
8292
7967
  ] });
8293
7968
  });
8294
- const rotation = keyframes`
7969
+ const rotation$1 = keyframes`
8295
7970
  from {
8296
7971
  transform: rotate(0deg);
8297
7972
  }
@@ -8300,7 +7975,7 @@ const rotation = keyframes`
8300
7975
  }
8301
7976
  `;
8302
7977
  const LoaderImg = styled.img`
8303
- animation: ${rotation} 1s infinite linear;
7978
+ animation: ${rotation$1} 1s infinite linear;
8304
7979
  will-change: transform;
8305
7980
  ${({ $small, theme }) => $small && `width: ${theme.spaces[6]}; height: ${theme.spaces[6]};`}
8306
7981
  `;
@@ -8337,23 +8012,22 @@ const Combobox = React.forwardRef(
8337
8012
  onLoadMore,
8338
8013
  placeholder = "Select or enter a value",
8339
8014
  required: requiredProp = false,
8340
- size = "M",
8341
8015
  startIcon,
8342
8016
  textValue,
8343
8017
  value,
8344
8018
  ...restProps
8345
8019
  }, forwardedRef) => {
8346
- const [internalIsOpen, setInternalIsOpen] = useControllableState({
8020
+ const [internalIsOpen, setInternalIsOpen] = useControllableState$1({
8347
8021
  prop: open,
8348
8022
  defaultProp: defaultOpen,
8349
8023
  onChange: onOpenChange
8350
8024
  });
8351
- const [internalTextValue, setInternalTextValue] = useControllableState({
8025
+ const [internalTextValue, setInternalTextValue] = useControllableState$1({
8352
8026
  prop: textValue,
8353
8027
  defaultProp: allowCustomValue && !defaultTextValue ? value : defaultTextValue,
8354
8028
  onChange: onTextValueChange
8355
8029
  });
8356
- const [internalFilterValue, setInternalFilterValue] = useControllableState({
8030
+ const [internalFilterValue, setInternalFilterValue] = useControllableState$1({
8357
8031
  prop: filterValue,
8358
8032
  defaultProp: defaultFilterValue,
8359
8033
  onChange: onFilterValueChange
@@ -8437,7 +8111,7 @@ const Combobox = React.forwardRef(
8437
8111
  onFilterValueChange: handleFilterValueChange,
8438
8112
  isPrintableCharacter: isPrintableCharacter2,
8439
8113
  children: [
8440
- /* @__PURE__ */ jsxs(Trigger$1, { $hasError: hasError, $size: size, className, children: [
8114
+ /* @__PURE__ */ jsxs(Trigger$1, { $hasError: hasError, className, children: [
8441
8115
  /* @__PURE__ */ jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8442
8116
  startIcon ? /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }) : null,
8443
8117
  /* @__PURE__ */ jsx(
@@ -8462,6 +8136,9 @@ const Combobox = React.forwardRef(
8462
8136
  hasRadius: true,
8463
8137
  background: "transparent",
8464
8138
  type: "button",
8139
+ padding: 0,
8140
+ color: "neutral600",
8141
+ borderStyle: "none",
8465
8142
  onClick: handleClearClick,
8466
8143
  "aria-disabled": disabled,
8467
8144
  "aria-label": clearLabel,
@@ -8494,22 +8171,15 @@ const Combobox = React.forwardRef(
8494
8171
  }
8495
8172
  );
8496
8173
  const IconBox$3 = styled(Box)`
8497
- border: none;
8498
-
8499
- svg {
8500
- height: 1.1rem;
8501
- width: 1.1rem;
8502
- }
8503
-
8504
- svg path {
8505
- fill: ${({ theme }) => theme.colors.neutral600};
8506
- }
8174
+ padding: 0;
8507
8175
  `;
8508
8176
  const Trigger$1 = styled(Combobox$1.Trigger)`
8509
8177
  position: relative;
8510
8178
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
8511
8179
  padding-right: ${({ theme }) => theme.spaces[3]};
8512
8180
  padding-left: ${({ theme }) => theme.spaces[3]};
8181
+ padding-top: ${({ theme }) => theme.spaces[2]};
8182
+ padding-bottom: ${({ theme }) => theme.spaces[2]};
8513
8183
  border-radius: ${({ theme }) => theme.borderRadius};
8514
8184
  background: ${({ theme }) => theme.colors.neutral0};
8515
8185
  overflow: hidden;
@@ -8517,7 +8187,6 @@ const Trigger$1 = styled(Combobox$1.Trigger)`
8517
8187
  align-items: center;
8518
8188
  justify-content: space-between;
8519
8189
  gap: ${({ theme }) => theme.spaces[4]};
8520
- min-height: ${({ theme, $size }) => getThemeSize("input")({ theme, size: $size })};
8521
8190
 
8522
8191
  &[data-disabled] {
8523
8192
  color: ${({ theme }) => theme.colors.neutral600};
@@ -8535,6 +8204,7 @@ const Trigger$1 = styled(Combobox$1.Trigger)`
8535
8204
  const TextInput$1 = styled(Combobox$1.TextInput)`
8536
8205
  width: 100%;
8537
8206
  font-size: 1.4rem;
8207
+ line-height: 2.2rem;
8538
8208
  color: ${({ theme }) => theme.colors.neutral800};
8539
8209
  padding: 0;
8540
8210
  border: none;
@@ -8549,13 +8219,10 @@ const TextInput$1 = styled(Combobox$1.TextInput)`
8549
8219
  }
8550
8220
  `;
8551
8221
  const DownIcon$1 = styled(Combobox$1.Icon)`
8552
- & > svg {
8553
- width: 0.6rem;
8554
-
8555
- & > path {
8556
- fill: ${({ theme }) => theme.colors.neutral600};
8557
- }
8558
- }
8222
+ border: none;
8223
+ background: transparent;
8224
+ padding: 0;
8225
+ color: ${({ theme }) => theme.colors.neutral600};
8559
8226
 
8560
8227
  &[aria-disabled='true'] {
8561
8228
  cursor: inherit;
@@ -8569,7 +8236,7 @@ const Content$2 = styled(Combobox$1.Content)`
8569
8236
  width: var(--radix-combobox-trigger-width);
8570
8237
  /* This is from the design-system figma file. */
8571
8238
  max-height: 15rem;
8572
- z-index: ${({ theme }) => theme.zIndices[1]};
8239
+ z-index: ${({ theme }) => theme.zIndices.popover};
8573
8240
  `;
8574
8241
  const Viewport$1 = styled(Combobox$1.Viewport)`
8575
8242
  padding: ${({ theme }) => theme.spaces[1]};
@@ -8606,7 +8273,6 @@ const OptionBox = styled.div`
8606
8273
  font-weight: bold;
8607
8274
  }
8608
8275
  `;
8609
- const ComboboxOption = Option;
8610
8276
  const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
8611
8277
  const useLockScroll = (lockScroll) => {
8612
8278
  React.useEffect(() => {
@@ -8692,6 +8358,12 @@ const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...pr
8692
8358
  };
8693
8359
  return /* @__PURE__ */ jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
8694
8360
  };
8361
+ const Portal$1 = React.forwardRef(
8362
+ ({ container = globalThis?.document?.body, ...portalProps }, forwardedRef) => {
8363
+ return container ? createPortal(/* @__PURE__ */ jsx(Box, { ref: forwardedRef, ...portalProps }), container) : null;
8364
+ }
8365
+ );
8366
+ Portal$1.displayName = "Portal";
8695
8367
  const DialogWrapper = styled(Box)`
8696
8368
  inset: 0;
8697
8369
  background: ${({ theme }) => setOpacity(theme.colors.neutral800, 0.2)};
@@ -8705,7 +8377,7 @@ const DialogContainer = styled(Box)`
8705
8377
  const DialogHeader = styled(Flex)`
8706
8378
  border-bottom: 1px solid ${({ theme }) => theme.colors.neutral150};
8707
8379
  `;
8708
- const Dialog = ({ onClose, title, as = "h2", isOpen, id, zIndex = 4, ...props }) => {
8380
+ const Dialog = ({ onClose, title, as = "h2", isOpen, id, zIndex = "dialog", ...props }) => {
8709
8381
  const generatedId = useId(id);
8710
8382
  useLockScroll(isOpen);
8711
8383
  if (!isOpen) {
@@ -8726,67 +8398,160 @@ const Dialog = ({ onClose, title, as = "h2", isOpen, id, zIndex = 4, ...props })
8726
8398
  /* @__PURE__ */ jsx(Box, { ...props })
8727
8399
  ]
8728
8400
  }
8729
- ) }) }) }) });
8401
+ ) }) }) }) });
8402
+ };
8403
+ const IconContainer = styled(Box)`
8404
+ svg {
8405
+ width: ${({ theme }) => theme.spaces[6]};
8406
+ height: ${({ theme }) => theme.spaces[6]};
8407
+
8408
+ path {
8409
+ fill: ${({ theme }) => theme.colors.danger600};
8410
+ }
8411
+ }
8412
+ `;
8413
+ const DialogBody = ({ children, icon }) => {
8414
+ return /* @__PURE__ */ jsxs(Box, { paddingTop: 8, paddingBottom: 8, paddingLeft: 6, paddingRight: 6, children: [
8415
+ icon && /* @__PURE__ */ jsx(IconContainer, { paddingBottom: 2, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: icon }) }),
8416
+ children
8417
+ ] });
8418
+ };
8419
+ const FooterWrapper = styled(Box)`
8420
+ border-top: 1px solid ${({ theme }) => theme.colors.neutral150};
8421
+
8422
+ button {
8423
+ width: 100%;
8424
+ display: inline-flex;
8425
+ justify-content: center;
8426
+ }
8427
+ `;
8428
+ const DialogFooter = ({ startAction, endAction }) => {
8429
+ return /* @__PURE__ */ jsx(FooterWrapper, { padding: 4, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
8430
+ startAction,
8431
+ endAction
8432
+ ] }) });
8433
+ };
8434
+ let $3db38b7d1fb3fe6a$var$count = 0;
8435
+ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
8436
+ useEffect(() => {
8437
+ var _edgeGuards$, _edgeGuards$2;
8438
+ const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
8439
+ document.body.insertAdjacentElement("afterbegin", (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
8440
+ document.body.insertAdjacentElement("beforeend", (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
8441
+ $3db38b7d1fb3fe6a$var$count++;
8442
+ return () => {
8443
+ if ($3db38b7d1fb3fe6a$var$count === 1)
8444
+ document.querySelectorAll("[data-radix-focus-guard]").forEach(
8445
+ (node) => node.remove()
8446
+ );
8447
+ $3db38b7d1fb3fe6a$var$count--;
8448
+ };
8449
+ }, []);
8450
+ }
8451
+ function $3db38b7d1fb3fe6a$var$createFocusGuard() {
8452
+ const element = document.createElement("span");
8453
+ element.setAttribute("data-radix-focus-guard", "");
8454
+ element.tabIndex = 0;
8455
+ element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
8456
+ return element;
8457
+ }
8458
+ function useControllableState({
8459
+ prop,
8460
+ defaultProp,
8461
+ onChange = () => {
8462
+ }
8463
+ }) {
8464
+ const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
8465
+ const isControlled = prop !== void 0;
8466
+ const propValue = prop instanceof Function ? prop(uncontrolledProp) : prop;
8467
+ const value = isControlled ? propValue : uncontrolledProp;
8468
+ const handleChange = useCallbackRef(onChange);
8469
+ const setValue = React.useCallback(
8470
+ (nextValue) => {
8471
+ if (isControlled) {
8472
+ const setter = nextValue;
8473
+ const value2 = typeof nextValue === "function" ? setter(propValue) : nextValue;
8474
+ if (value2 !== propValue) {
8475
+ handleChange(value2);
8476
+ setUncontrolledProp(nextValue);
8477
+ }
8478
+ } else {
8479
+ setUncontrolledProp(nextValue);
8480
+ }
8481
+ },
8482
+ [isControlled, propValue, setUncontrolledProp, handleChange]
8483
+ );
8484
+ return [value, setValue];
8485
+ }
8486
+ function useUncontrolledState({ defaultProp, onChange }) {
8487
+ const uncontrolledState = React.useState(defaultProp);
8488
+ const [value] = uncontrolledState;
8489
+ const prevValueRef = React.useRef(value);
8490
+ const handleChange = useCallbackRef(onChange);
8491
+ React.useEffect(() => {
8492
+ if (prevValueRef.current !== value) {
8493
+ handleChange(value);
8494
+ prevValueRef.current = value;
8495
+ }
8496
+ }, [value, prevValueRef, handleChange]);
8497
+ return uncontrolledState;
8498
+ }
8499
+ function useDateFormatter(locale, options) {
8500
+ const lastOptions = React.useRef(null);
8501
+ if (options && lastOptions.current && isEqual(options, lastOptions.current)) {
8502
+ options = lastOptions.current;
8503
+ }
8504
+ lastOptions.current = options ?? null;
8505
+ return React.useMemo(() => new DateFormatter(locale, options), [locale, options]);
8506
+ }
8507
+ function isEqual(a, b) {
8508
+ if (a === b) {
8509
+ return true;
8510
+ }
8511
+ const aKeys = Object.keys(a);
8512
+ const bKeys = Object.keys(b);
8513
+ if (aKeys.length !== bKeys.length) {
8514
+ return false;
8515
+ }
8516
+ for (const key of aKeys) {
8517
+ if (b[key] !== a[key]) {
8518
+ return false;
8519
+ }
8520
+ }
8521
+ return true;
8522
+ }
8523
+ const LiveRegionIds = {
8524
+ Log: "live-region-log",
8525
+ Status: "live-region-status",
8526
+ Alert: "live-region-alert"
8730
8527
  };
8731
- const IconContainer = styled(Box)`
8732
- svg {
8733
- width: ${({ theme }) => theme.spaces[6]};
8734
- height: ${({ theme }) => theme.spaces[6]};
8735
-
8736
- path {
8737
- fill: ${({ theme }) => theme.colors.danger600};
8738
- }
8528
+ const notifyLog = (message) => {
8529
+ const logEl = document.querySelector(`#${LiveRegionIds.Log}`);
8530
+ if (logEl) {
8531
+ logEl.innerText = message;
8739
8532
  }
8740
- `;
8741
- const DialogBody = ({ children, icon }) => {
8742
- return /* @__PURE__ */ jsxs(Box, { paddingTop: 8, paddingBottom: 8, paddingLeft: 6, paddingRight: 6, children: [
8743
- icon && /* @__PURE__ */ jsx(IconContainer, { paddingBottom: 2, children: /* @__PURE__ */ jsx(Flex, { justifyContent: "center", children: icon }) }),
8744
- children
8745
- ] });
8746
8533
  };
8747
- const FooterWrapper = styled(Box)`
8748
- border-top: 1px solid ${({ theme }) => theme.colors.neutral150};
8749
-
8750
- button {
8751
- width: 100%;
8752
- display: inline-flex;
8753
- justify-content: center;
8534
+ const notifyStatus = (message) => {
8535
+ const statusEl = document.querySelector(`#${LiveRegionIds.Status}`);
8536
+ if (statusEl) {
8537
+ statusEl.innerText = message;
8754
8538
  }
8755
- `;
8756
- const DialogFooter = ({ startAction, endAction }) => {
8757
- return /* @__PURE__ */ jsx(FooterWrapper, { padding: 4, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
8758
- startAction,
8759
- endAction
8760
- ] }) });
8761
8539
  };
8762
- let $3db38b7d1fb3fe6a$var$count = 0;
8763
- function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {
8764
- useEffect(() => {
8765
- var _edgeGuards$, _edgeGuards$2;
8766
- const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
8767
- document.body.insertAdjacentElement("afterbegin", (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());
8768
- document.body.insertAdjacentElement("beforeend", (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());
8769
- $3db38b7d1fb3fe6a$var$count++;
8540
+ const notifyAlert = (message) => {
8541
+ const alertEl = document.querySelector(`#${LiveRegionIds.Alert}`);
8542
+ if (alertEl) {
8543
+ alertEl.innerText = message;
8544
+ }
8545
+ };
8546
+ const useNotifyAT = () => {
8547
+ React.useEffect(() => {
8770
8548
  return () => {
8771
- if ($3db38b7d1fb3fe6a$var$count === 1)
8772
- document.querySelectorAll("[data-radix-focus-guard]").forEach(
8773
- (node) => node.remove()
8774
- );
8775
- $3db38b7d1fb3fe6a$var$count--;
8549
+ notifyLog("");
8550
+ notifyAlert("");
8551
+ notifyStatus("");
8776
8552
  };
8777
8553
  }, []);
8778
- }
8779
- function $3db38b7d1fb3fe6a$var$createFocusGuard() {
8780
- const element = document.createElement("span");
8781
- element.setAttribute("data-radix-focus-guard", "");
8782
- element.tabIndex = 0;
8783
- element.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none";
8784
- return element;
8785
- }
8786
- const LiveRegionIds = {
8787
- Log: "live-region-log",
8788
- Status: "live-region-status",
8789
- Alert: "live-region-alert"
8554
+ return { notifyLog, notifyAlert, notifyStatus };
8790
8555
  };
8791
8556
  const LiveRegions = () => {
8792
8557
  return /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
@@ -8834,6 +8599,7 @@ ${css`
8834
8599
  button,
8835
8600
  textarea,
8836
8601
  select {
8602
+ padding: 0;
8837
8603
  font: inherit;
8838
8604
  }
8839
8605
 
@@ -8887,16 +8653,6 @@ ${css`
8887
8653
  }
8888
8654
  `}
8889
8655
  `;
8890
- const ThemeProvider = ({ children, theme = lightTheme }) => {
8891
- return /* @__PURE__ */ jsxs(ThemeProvider$1, { theme, children: [
8892
- children,
8893
- /* @__PURE__ */ jsx(LiveRegions, {}),
8894
- /* @__PURE__ */ jsx(GlobalStyle, {})
8895
- ] });
8896
- };
8897
- const useTheme = () => {
8898
- return useTheme$1();
8899
- };
8900
8656
  const DEFAULT_LOCALE = "en-EN";
8901
8657
  const getDefaultLocale = () => {
8902
8658
  if (typeof navigator === "undefined") {
@@ -8910,49 +8666,20 @@ const getDefaultLocale = () => {
8910
8666
  const [Provider, useDesignSystem] = createContext("StrapiDesignSystem", {
8911
8667
  locale: getDefaultLocale()
8912
8668
  });
8913
- const DesignSystemProvider = ({ locale = getDefaultLocale(), ...restProps }) => {
8914
- return /* @__PURE__ */ jsx(Provider, { locale, children: /* @__PURE__ */ jsx(ThemeProvider, { ...restProps }) });
8915
- };
8916
- const PREFIX = "[@strapi/design-system]:";
8917
- const once = (fn) => {
8918
- const func = fn;
8919
- let called = false;
8920
- if (typeof func !== "function") {
8921
- throw new TypeError(`${PREFIX} once requires a function parameter`);
8922
- }
8923
- return (...args) => {
8924
- if (!called) {
8925
- func(...args);
8926
- called = true;
8927
- }
8928
- };
8669
+ const DesignSystemProvider = ({
8670
+ children,
8671
+ locale = getDefaultLocale(),
8672
+ theme = lightTheme,
8673
+ tooltipConfig
8674
+ }) => {
8675
+ return /* @__PURE__ */ jsx(Provider, { locale, children: /* @__PURE__ */ jsxs(ThemeProvider, { theme, children: [
8676
+ /* @__PURE__ */ jsx(Provider$1, { ...tooltipConfig, children }),
8677
+ /* @__PURE__ */ jsx(LiveRegions, {}),
8678
+ /* @__PURE__ */ jsx(GlobalStyle, {})
8679
+ ] }) });
8929
8680
  };
8930
- function useDateFormatter(locale, options) {
8931
- const lastOptions = React.useRef(null);
8932
- if (options && lastOptions.current && isEqual(options, lastOptions.current)) {
8933
- options = lastOptions.current;
8934
- }
8935
- lastOptions.current = options ?? null;
8936
- return React.useMemo(() => new DateFormatter(locale, options), [locale, options]);
8937
- }
8938
- function isEqual(a, b) {
8939
- if (a === b) {
8940
- return true;
8941
- }
8942
- const aKeys = Object.keys(a);
8943
- const bKeys = Object.keys(b);
8944
- if (aKeys.length !== bKeys.length) {
8945
- return false;
8946
- }
8947
- for (const key of aKeys) {
8948
- if (b[key] !== a[key]) {
8949
- return false;
8950
- }
8951
- }
8952
- return true;
8953
- }
8954
8681
  const SelectTrigger = React.forwardRef(
8955
- ({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, size = "M", children, id, ...restProps }, ref) => {
8682
+ ({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, ...restProps }, ref) => {
8956
8683
  const triggerRef = React.useRef(null);
8957
8684
  const handleClearClick = (e) => {
8958
8685
  if (onClear && !disabled) {
@@ -8967,7 +8694,6 @@ const SelectTrigger = React.forwardRef(
8967
8694
  {
8968
8695
  "aria-disabled": disabled,
8969
8696
  $hasError: hasError,
8970
- $size: size,
8971
8697
  ref: composedRefs,
8972
8698
  alignItems: "center",
8973
8699
  justifyContent: "space-between",
@@ -8977,8 +8703,8 @@ const SelectTrigger = React.forwardRef(
8977
8703
  background: disabled ? "neutral150" : "neutral0",
8978
8704
  paddingLeft: 3,
8979
8705
  paddingRight: 3,
8980
- paddingTop: 1,
8981
- paddingBottom: 1,
8706
+ paddingTop: 2,
8707
+ paddingBottom: 2,
8982
8708
  gap: 4,
8983
8709
  cursor: "default",
8984
8710
  "aria-labelledby": labelNode ? `${id}-label` : void 0,
@@ -9026,7 +8752,6 @@ const IconBox$2 = styled(Box)`
9026
8752
  `;
9027
8753
  const StyledTrigger = styled(Flex)`
9028
8754
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
9029
- min-height: ${({ theme, $size }) => getThemeSize("input")({ theme, size: $size })};
9030
8755
 
9031
8756
  &[aria-disabled='true'] {
9032
8757
  color: ${(props) => props.theme.colors.neutral600};
@@ -9041,13 +8766,14 @@ const StyledTrigger = styled(Flex)`
9041
8766
  `;
9042
8767
  const DownIcon = styled(Select.Icon)`
9043
8768
  & > svg {
9044
- width: 1.2rem;
9045
8769
  fill: ${({ theme }) => theme.colors.neutral600};
9046
8770
  }
9047
8771
  `;
9048
8772
  const SelectValue = React.forwardRef(({ children, placeholder, ...restProps }, ref) => /* @__PURE__ */ jsx(ValueType, { ref, ellipsis: true, ...restProps, children: /* @__PURE__ */ jsx(StyledValue, { placeholder, children }) }));
9049
8773
  const ValueType = styled(Typography)`
9050
8774
  flex: 1;
8775
+ font-size: 1.4rem;
8776
+ line-height: 2.2rem;
9051
8777
  `;
9052
8778
  const StyledValue = styled(Select.Value)`
9053
8779
  display: flex;
@@ -9062,7 +8788,7 @@ const SelectContent = styled(Select.Content)`
9062
8788
  min-width: var(--radix-select-trigger-width);
9063
8789
  /* This is from the design-system figma file. */
9064
8790
  max-height: 15rem;
9065
- z-index: ${({ theme }) => theme.zIndices[1]};
8791
+ z-index: ${({ theme }) => theme.zIndices.popover};
9066
8792
  `;
9067
8793
  const SelectViewport = styled(Select.Viewport)`
9068
8794
  padding: ${({ theme }) => theme.spaces[1]};
@@ -9126,7 +8852,6 @@ const SingleSelect = React.forwardRef(
9126
8852
  placeholder,
9127
8853
  required: requiredProp,
9128
8854
  startIcon,
9129
- size = "M",
9130
8855
  value: passedValue,
9131
8856
  ...restProps
9132
8857
  }, forwardedRef) => {
@@ -9195,7 +8920,6 @@ const SingleSelect = React.forwardRef(
9195
8920
  id,
9196
8921
  name,
9197
8922
  startIcon,
9198
- size,
9199
8923
  hasError,
9200
8924
  disabled,
9201
8925
  clearLabel,
@@ -9238,7 +8962,7 @@ const DatePicker$1 = React.forwardRef(
9238
8962
  minDate: minDate2,
9239
8963
  monthSelectLabel = "Month",
9240
8964
  onChange,
9241
- selectedDate,
8965
+ value: valueProp,
9242
8966
  yearSelectLabel = "Year",
9243
8967
  /**
9244
8968
  * Combobox props
@@ -9250,17 +8974,6 @@ const DatePicker$1 = React.forwardRef(
9250
8974
  required: requiredProp = false,
9251
8975
  onClear,
9252
8976
  clearLabel = "Clear",
9253
- size,
9254
- /**
9255
- * @preserve
9256
- * @deprecated This is no longer used.
9257
- */
9258
- ariaLabel: _ariaLabel,
9259
- /**
9260
- * @preserve
9261
- * @deprecated This is no longer used.
9262
- */
9263
- selectedDateLabel: _selectedDateLabel,
9264
8977
  ...restProps
9265
8978
  }, ref) => {
9266
8979
  const timeZone = getLocalTimeZone();
@@ -9278,7 +8991,7 @@ const DatePicker$1 = React.forwardRef(
9278
8991
  const [textValue, setTextValue] = React.useState();
9279
8992
  const [value, setValue] = useControllableState({
9280
8993
  defaultProp: initialDate ? convertUTCDateToCalendarDate(initialDate) : void 0,
9281
- prop: selectedDate ? convertUTCDateToCalendarDate(selectedDate) : void 0,
8994
+ prop: valueProp ? convertUTCDateToCalendarDate(valueProp) : void 0,
9282
8995
  onChange(date) {
9283
8996
  if (onChange) {
9284
8997
  onChange(date?.toDate(timeZone));
@@ -9321,14 +9034,14 @@ const DatePicker$1 = React.forwardRef(
9321
9034
  [value]
9322
9035
  );
9323
9036
  React.useLayoutEffect(() => {
9324
- if (selectedDate) {
9325
- const date = convertUTCDateToCalendarDate(selectedDate);
9037
+ if (valueProp) {
9038
+ const date = convertUTCDateToCalendarDate(valueProp);
9326
9039
  setTextValue(formatter.format(date.toDate(timeZone)));
9327
9040
  setCalendarDate(date);
9328
9041
  } else {
9329
9042
  setTextValue("");
9330
9043
  }
9331
- }, [selectedDate, formatter, timeZone]);
9044
+ }, [valueProp, formatter, timeZone]);
9332
9045
  React.useLayoutEffect(() => {
9333
9046
  if (initialDate && textValue === void 0) {
9334
9047
  const date = convertUTCDateToCalendarDate(initialDate);
@@ -9371,8 +9084,8 @@ const DatePicker$1 = React.forwardRef(
9371
9084
  trigger,
9372
9085
  value,
9373
9086
  children: [
9374
- /* @__PURE__ */ jsxs(DatePickerTrigger, { className, size, hasError, children: [
9375
- /* @__PURE__ */ jsx(StyledCalendarIcon, { "aria-hidden": true }),
9087
+ /* @__PURE__ */ jsxs(DatePickerTrigger, { className, hasError, children: [
9088
+ /* @__PURE__ */ jsx(Calendar, { fill: "neutral500", "aria-hidden": true }),
9376
9089
  /* @__PURE__ */ jsx(DatePickerTextInput, { ref, "aria-describedby": ariaDescription, id, name, ...restProps }),
9377
9090
  textValue && onClear ? /* @__PURE__ */ jsx(
9378
9091
  IconBox$1,
@@ -9417,7 +9130,7 @@ const makeInitialCalendarDate = ({ currentValue, minDate: minDate$1, maxDate: ma
9417
9130
  };
9418
9131
  const DATE_PICKER_TRIGGER_NAME = "DatePickerTrigger";
9419
9132
  const DatePickerTrigger = React.forwardRef(
9420
- ({ hasError, size = "M", ...restProps }, forwardedRef) => {
9133
+ ({ hasError, ...restProps }, forwardedRef) => {
9421
9134
  const context = useDatePickerContext(DATE_PICKER_TRIGGER_NAME);
9422
9135
  const composedRefs = useComposedRefs(forwardedRef, (node) => context.onTriggerChange(node));
9423
9136
  const handleOpenChange = () => {
@@ -9442,7 +9155,6 @@ const DatePickerTrigger = React.forwardRef(
9442
9155
  {
9443
9156
  ref: composedRefs,
9444
9157
  $hasError: hasError,
9445
- $size: size,
9446
9158
  ...restProps,
9447
9159
  paddingLeft: 3,
9448
9160
  paddingRight: 3,
@@ -9475,7 +9187,11 @@ const DatePickerTrigger = React.forwardRef(
9475
9187
  );
9476
9188
  const TriggerElement = styled(Flex)`
9477
9189
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
9478
- min-height: ${({ theme, $size }) => getThemeSize("input")({ theme, size: $size })};
9190
+ padding-block: ${({ theme }) => theme.spaces[2]};
9191
+
9192
+ & > svg {
9193
+ flex: 1 0 auto;
9194
+ }
9479
9195
 
9480
9196
  &[data-disabled] {
9481
9197
  color: ${({ theme }) => theme.colors.neutral600};
@@ -9492,20 +9208,9 @@ const TriggerElement = styled(Flex)`
9492
9208
  `;
9493
9209
  const IconBox$1 = styled(Box)`
9494
9210
  border: none;
9495
-
9496
- svg {
9497
- height: 1.1rem;
9498
- width: 1.1rem;
9499
- }
9500
-
9501
- svg path {
9502
- fill: ${({ theme }) => theme.colors.neutral600};
9503
- }
9504
- `;
9505
- const StyledCalendarIcon = styled(Calendar)`
9506
- & > path {
9507
- fill: ${({ theme }) => theme.colors.neutral500};
9508
- }
9211
+ color: ${({ theme }) => theme.colors.neutral600};
9212
+ padding: 0;
9213
+ cursor: pointer;
9509
9214
  `;
9510
9215
  const DATE_PICKER_TEXT_INPUT_NAME = "DatePickerTextInput";
9511
9216
  const DatePickerTextInput = React.forwardRef(
@@ -9689,8 +9394,8 @@ function constrainValue(date, minValue, maxValue) {
9689
9394
  const Input$1 = styled.input`
9690
9395
  width: 100%;
9691
9396
  font-size: 1.4rem;
9397
+ line-height: 2.2rem;
9692
9398
  color: ${({ theme }) => theme.colors.neutral800};
9693
- height: 100%;
9694
9399
  border: none;
9695
9400
  background-color: transparent;
9696
9401
 
@@ -9789,7 +9494,7 @@ const DatePickerContentImpl = React.forwardRef(
9789
9494
  );
9790
9495
  const ContentElement = styled(Box)`
9791
9496
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
9792
- z-index: ${({ theme }) => theme.zIndices[0]};
9497
+ z-index: ${({ theme }) => theme.zIndices.popover};
9793
9498
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
9794
9499
  `;
9795
9500
  const DATE_PICKER_CALENDAR_NAME = "DatePickerCalendar";
@@ -9839,22 +9544,12 @@ const DatePickerCalendar = React.forwardRef(
9839
9544
  SingleSelect,
9840
9545
  {
9841
9546
  "aria-label": monthSelectLabel,
9842
- size: "S",
9843
9547
  value: months[calendarDate.month - 1],
9844
9548
  onChange: handleMonthChange,
9845
9549
  children: months.map((month) => /* @__PURE__ */ jsx(SingleSelectOption, { value: month, children: month }, month))
9846
9550
  }
9847
9551
  ) }),
9848
- /* @__PURE__ */ jsx(Root$1, { children: /* @__PURE__ */ jsx(
9849
- SingleSelect,
9850
- {
9851
- size: "S",
9852
- value: calendarDate.year.toString(),
9853
- "aria-label": yearSelectLabel,
9854
- onChange: handleYearChange,
9855
- children: years.map((year) => /* @__PURE__ */ jsx(SingleSelectOption, { value: year, children: year }, year))
9856
- }
9857
- ) })
9552
+ /* @__PURE__ */ jsx(Root$1, { children: /* @__PURE__ */ jsx(SingleSelect, { value: calendarDate.year.toString(), "aria-label": yearSelectLabel, onChange: handleYearChange, children: years.map((year) => /* @__PURE__ */ jsx(SingleSelectOption, { value: year, children: year }, year)) }) })
9858
9553
  ] }),
9859
9554
  /* @__PURE__ */ jsxs("table", { role: "grid", children: [
9860
9555
  /* @__PURE__ */ jsx("thead", { "aria-hidden": true, children: /* @__PURE__ */ jsx("tr", { "aria-rowindex": 0, children: weekDays.map((day, index) => /* @__PURE__ */ jsx(DatePickerHeaderCell, { "aria-colindex": index, children: day }, day)) }) }),
@@ -9995,19 +9690,7 @@ const Cell = styled(Box)`
9995
9690
  }
9996
9691
  }
9997
9692
  `;
9998
- const warnOnce$1 = once(console.warn);
9999
9693
  const convertUTCDateToCalendarDate = (date) => {
10000
- if (typeof date === "string") {
10001
- warnOnce$1(
10002
- "It looks like you're passing a string as representation of a Date to the DatePicker. This is deprecated, look to passing a Date instead."
10003
- );
10004
- const timestamp = Date.parse(date);
10005
- if (!Number.isNaN(timestamp)) {
10006
- date = new Date(timestamp);
10007
- } else {
10008
- date = /* @__PURE__ */ new Date();
10009
- }
10010
- }
10011
9694
  const utcDateString = date.toISOString();
10012
9695
  const zonedDateTime = parseAbsolute(utcDateString, "UTC");
10013
9696
  return toCalendarDate(zonedDateTime);
@@ -10019,7 +9702,7 @@ const TimePicker$1 = React.forwardRef(
10019
9702
  ({ step = 15, value: valueProp, defaultValue, onChange, ...restProps }, forwardedRef) => {
10020
9703
  const context = useDesignSystem("TimePicker");
10021
9704
  const [textValue, setTextValue] = React.useState("");
10022
- const [value, setValue] = useControllableState({
9705
+ const [value, setValue] = useControllableState$1({
10023
9706
  prop: valueProp,
10024
9707
  defaultProp: defaultValue,
10025
9708
  onChange
@@ -10126,7 +9809,6 @@ const DateTimePicker = React.forwardRef(
10126
9809
  onChange,
10127
9810
  onClear,
10128
9811
  required = false,
10129
- size = "M",
10130
9812
  step,
10131
9813
  value,
10132
9814
  initialDate,
@@ -10189,10 +9871,9 @@ const DateTimePicker = React.forwardRef(
10189
9871
  DatePicker,
10190
9872
  {
10191
9873
  ...props,
10192
- selectedDate: dateValue?.toDate("UTC"),
9874
+ value: dateValue?.toDate("UTC"),
10193
9875
  onChange: handleDateChange,
10194
9876
  required,
10195
- size,
10196
9877
  onClear: onClear ? handleDateClear : void 0,
10197
9878
  clearLabel: `${clearLabel} date`,
10198
9879
  disabled,
@@ -10203,7 +9884,6 @@ const DateTimePicker = React.forwardRef(
10203
9884
  /* @__PURE__ */ jsx(Root$1, { children: /* @__PURE__ */ jsx(
10204
9885
  TimePicker,
10205
9886
  {
10206
- size,
10207
9887
  hasError,
10208
9888
  value: timeValue,
10209
9889
  onChange: handleTimeChange,
@@ -10218,19 +9898,7 @@ const DateTimePicker = React.forwardRef(
10218
9898
  ] });
10219
9899
  }
10220
9900
  );
10221
- const warnOnce = once(console.warn);
10222
9901
  const convertUTCDateToCalendarDateTime = (date, resetTime = true) => {
10223
- if (typeof date === "string") {
10224
- warnOnce(
10225
- "It looks like you're passing a string as representation of a Date to the DatePicker. This is deprecated, look to passing a Date instead."
10226
- );
10227
- const timestamp = Date.parse(date);
10228
- if (!Number.isNaN(timestamp)) {
10229
- date = new Date(timestamp);
10230
- } else {
10231
- date = /* @__PURE__ */ new Date();
10232
- }
10233
- }
10234
9902
  const utcDateString = date.toISOString();
10235
9903
  let zonedDateTime = parseAbsoluteToLocal(utcDateString);
10236
9904
  if (resetTime) {
@@ -10243,10 +9911,9 @@ const DividerWrapper = styled(Box)`
10243
9911
  border: none;
10244
9912
  /* If contained in a Flex parent we want to prevent the Divider to shink */
10245
9913
  flex-shrink: 0;
10246
- ${({ $unsetMargin }) => $unsetMargin ? "margin: 0;" : ""}
10247
9914
  `;
10248
- const Divider = ({ unsetMargin = true, ...props }) => {
10249
- return /* @__PURE__ */ jsx(DividerWrapper, { ...props, background: "neutral150", tag: "hr", $unsetMargin: unsetMargin });
9915
+ const Divider = (props) => {
9916
+ return /* @__PURE__ */ jsx(DividerWrapper, { ...props, background: "neutral150", tag: "hr" });
10250
9917
  };
10251
9918
  const EmptyStateIconWrapper = styled(Box)`
10252
9919
  svg {
@@ -10307,15 +9974,12 @@ const IconButton = forwardRef(
10307
9974
  ({
10308
9975
  label,
10309
9976
  background,
10310
- borderWidth,
10311
- noBorder = false,
10312
9977
  children,
10313
- icon,
10314
9978
  disabled = false,
10315
9979
  onClick,
10316
9980
  size = SIZES[0],
10317
- "aria-label": ariaLabel,
10318
9981
  variant: variant2 = VARIANTS[0],
9982
+ withTooltip = true,
10319
9983
  ...restProps
10320
9984
  }, ref) => {
10321
9985
  const handleClick = (e) => {
@@ -10323,29 +9987,21 @@ const IconButton = forwardRef(
10323
9987
  onClick(e);
10324
9988
  }
10325
9989
  };
10326
- const component = /* @__PURE__ */ jsxs(
9990
+ const component = /* @__PURE__ */ jsx(
10327
9991
  IconButtonWrapper,
10328
9992
  {
10329
9993
  "aria-disabled": disabled,
10330
9994
  background: disabled ? "neutral150" : background,
10331
- borderWidth: noBorder ? 0 : borderWidth,
10332
9995
  justifyContent: "center",
10333
9996
  ...restProps,
10334
9997
  ref,
10335
9998
  $size: size,
10336
9999
  onClick: handleClick,
10337
10000
  $variant: variant2,
10338
- children: [
10339
- /* @__PURE__ */ jsx(VisuallyHidden, { children: label ?? ariaLabel }),
10340
- React.cloneElement(icon || children, {
10341
- "aria-hidden": true,
10342
- focusable: false
10343
- // See: https://allyjs.io/tutorials/focusing-in-svg.html#making-svg-elements-focusable
10344
- })
10345
- ]
10001
+ children: /* @__PURE__ */ jsx(AccessibleIcon, { label, children })
10346
10002
  }
10347
10003
  );
10348
- return label ? /* @__PURE__ */ jsx(Tooltip, { label, children: component }) : component;
10004
+ return withTooltip ? /* @__PURE__ */ jsx(TooltipImpl, { label, children: component }) : component;
10349
10005
  }
10350
10006
  );
10351
10007
  const IconButtonWrapper = styled(BaseButton)`
@@ -10554,42 +10210,107 @@ const JSONInput = React.forwardRef(
10554
10210
  "aria-describedby": ariaDescription,
10555
10211
  ...boxProps
10556
10212
  }
10557
- );
10558
- }
10559
- );
10560
- const JSONInputContainer = styled(Flex)`
10561
- line-height: ${({ theme }) => theme.lineHeights[2]};
10562
-
10563
- .cm-editor {
10564
- /**
10565
- * Hard coded since the color is the same between themes,
10566
- * theme.colors.neutral800 changes between themes
10567
- */
10568
- background-color: #32324d;
10569
- width: 100%;
10570
- outline: none;
10571
- }
10572
-
10573
- .cm-scroller {
10574
- border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
10575
- /* inputFocusStyle will receive hasError prop */
10576
- ${inputFocusStyle()}
10577
- }
10578
-
10579
- .cm-editor,
10580
- .cm-scroller {
10581
- border-radius: ${({ theme }) => theme.borderRadius};
10582
- }
10583
-
10584
- .cm-gutters,
10585
- .cm-activeLineGutter {
10586
- /**
10587
- * Hard coded since the color is the same between themes,
10588
- * theme.colors.neutral700 changes between themes
10589
- */
10590
- background-color: #4a4a6a;
10591
- }
10592
- `;
10213
+ );
10214
+ }
10215
+ );
10216
+ const JSONInputContainer = styled(Flex)`
10217
+ line-height: ${({ theme }) => theme.lineHeights[2]};
10218
+
10219
+ .cm-editor {
10220
+ /**
10221
+ * Hard coded since the color is the same between themes,
10222
+ * theme.colors.neutral800 changes between themes
10223
+ */
10224
+ background-color: #32324d;
10225
+ width: 100%;
10226
+ outline: none;
10227
+ }
10228
+
10229
+ .cm-scroller {
10230
+ border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
10231
+ /* inputFocusStyle will receive hasError prop */
10232
+ ${inputFocusStyle()}
10233
+ }
10234
+
10235
+ .cm-editor,
10236
+ .cm-scroller {
10237
+ border-radius: ${({ theme }) => theme.borderRadius};
10238
+ }
10239
+
10240
+ .cm-gutters,
10241
+ .cm-activeLineGutter {
10242
+ /**
10243
+ * Hard coded since the color is the same between themes,
10244
+ * theme.colors.neutral700 changes between themes
10245
+ */
10246
+ background-color: #4a4a6a;
10247
+ }
10248
+ `;
10249
+ const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
10250
+ const isValidFocusedElement = () => {
10251
+ const focused = document.activeElement;
10252
+ if (!focused) {
10253
+ return false;
10254
+ }
10255
+ if (tagName) {
10256
+ return focused.tagName.toLowerCase() === tagName;
10257
+ }
10258
+ return focused.hasAttribute(attributeName);
10259
+ };
10260
+ const queryElement = (parentEl) => {
10261
+ if (tagName) {
10262
+ return parentEl.querySelectorAll(tagName);
10263
+ }
10264
+ return parentEl.querySelectorAll(`[${attributeName}]`);
10265
+ };
10266
+ const handleKeyDown = (e) => {
10267
+ switch (e.key) {
10268
+ case KeyboardKeys.RIGHT:
10269
+ case KeyboardKeys.DOWN: {
10270
+ if (isValidFocusedElement()) {
10271
+ e.preventDefault();
10272
+ const focused = document.activeElement;
10273
+ const allElements = [...queryElement(e.currentTarget)];
10274
+ const focusedIndex = allElements.findIndex((node) => node === focused);
10275
+ const nextIndex = focusedIndex + 1 < allElements.length ? focusedIndex + 1 : 0;
10276
+ allElements[nextIndex].focus();
10277
+ }
10278
+ break;
10279
+ }
10280
+ case KeyboardKeys.LEFT:
10281
+ case KeyboardKeys.UP: {
10282
+ if (isValidFocusedElement()) {
10283
+ e.preventDefault();
10284
+ const focused = document.activeElement;
10285
+ const allElements = [...queryElement(e.currentTarget)];
10286
+ const focusedIndex = allElements.findIndex((node) => node === focused);
10287
+ const nextIndex = focusedIndex - 1 > -1 ? focusedIndex - 1 : allElements.length - 1;
10288
+ allElements[nextIndex].focus();
10289
+ }
10290
+ break;
10291
+ }
10292
+ case KeyboardKeys.HOME: {
10293
+ if (isValidFocusedElement()) {
10294
+ e.preventDefault();
10295
+ const allElements = queryElement(e.currentTarget);
10296
+ const focusElement = allElements.item(0);
10297
+ focusElement.focus();
10298
+ }
10299
+ break;
10300
+ }
10301
+ case KeyboardKeys.END: {
10302
+ if (isValidFocusedElement()) {
10303
+ e.preventDefault();
10304
+ const allElements = queryElement(e.currentTarget);
10305
+ const focusElement = allElements.item(allElements.length - 1);
10306
+ focusElement.focus();
10307
+ }
10308
+ break;
10309
+ }
10310
+ }
10311
+ };
10312
+ return /* @__PURE__ */ jsx(Box, { onKeyDown: handleKeyDown, ...props });
10313
+ };
10593
10314
  const LinkButton = forwardRef(
10594
10315
  ({ variant: variant2 = "default", startIcon, endIcon, disabled = false, children, size = "S", ...props }, ref) => {
10595
10316
  const paddingX = size === "S" ? 2 : "10px";
@@ -10647,34 +10368,6 @@ const LinkWrapper$1 = styled(BaseLink)`
10647
10368
 
10648
10369
  ${getVariantStyle}
10649
10370
  `;
10650
- const notifyLog = (message) => {
10651
- const logEl = document.querySelector(`#${LiveRegionIds.Log}`);
10652
- if (logEl) {
10653
- logEl.innerText = message;
10654
- }
10655
- };
10656
- const notifyStatus = (message) => {
10657
- const statusEl = document.querySelector(`#${LiveRegionIds.Status}`);
10658
- if (statusEl) {
10659
- statusEl.innerText = message;
10660
- }
10661
- };
10662
- const notifyAlert = (message) => {
10663
- const alertEl = document.querySelector(`#${LiveRegionIds.Alert}`);
10664
- if (alertEl) {
10665
- alertEl.innerText = message;
10666
- }
10667
- };
10668
- const useNotifyAT = () => {
10669
- React.useEffect(() => {
10670
- return () => {
10671
- notifyLog("");
10672
- notifyAlert("");
10673
- notifyStatus("");
10674
- };
10675
- }, []);
10676
- return { notifyLog, notifyAlert, notifyStatus };
10677
- };
10678
10371
  const MainWrapper = styled(Box)`
10679
10372
  // To prevent global outline on focus visible to force an outline when Main is focused
10680
10373
  &:focus-visible {
@@ -10710,245 +10403,6 @@ const SkipToContent = ({ children }) => {
10710
10403
  }
10711
10404
  );
10712
10405
  };
10713
- const MainNavContext = React.createContext(false);
10714
- const useMainNav = () => React.useContext(MainNavContext);
10715
- const MainNavWrapper = styled(Flex)`
10716
- width: ${({ $condensed }) => $condensed ? "max-content" : `22.4rem`};
10717
- border-right: 1px solid ${({ theme }) => theme.colors.neutral150};
10718
- `;
10719
- const MainNav = ({ condensed = false, ...props }) => {
10720
- return /* @__PURE__ */ jsx(MainNavContext.Provider, { value: condensed, children: /* @__PURE__ */ jsx(
10721
- MainNavWrapper,
10722
- {
10723
- alignItems: "normal",
10724
- tag: "nav",
10725
- background: "neutral0",
10726
- $condensed: condensed,
10727
- direction: "column",
10728
- height: "100vh",
10729
- position: "sticky",
10730
- top: 0,
10731
- zIndex: 2,
10732
- ...props
10733
- }
10734
- ) });
10735
- };
10736
- const BrandIconWrapper = styled.div`
10737
- border-radius: ${({ theme }) => theme.borderRadius};
10738
-
10739
- svg,
10740
- img {
10741
- height: ${({ $condensed }) => $condensed ? `4rem` : `3.2rem`};
10742
- width: ${({ $condensed }) => $condensed ? `4rem` : `3.2rem`};
10743
- }
10744
- `;
10745
- const NavLinkWrapper = styled(BaseLink)`
10746
- text-decoration: unset;
10747
- color: inherit;
10748
- `;
10749
- const NavBrand = forwardRef(
10750
- ({ workplace, title, icon, ...props }, ref) => {
10751
- const condensed = useMainNav();
10752
- props.to = props?.to ?? "/";
10753
- if (condensed) {
10754
- return /* @__PURE__ */ jsx(BaseLink, { ref, ...props, children: /* @__PURE__ */ jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: /* @__PURE__ */ jsxs(BrandIconWrapper, { $condensed: true, children: [
10755
- icon,
10756
- /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
10757
- /* @__PURE__ */ jsx("span", { children: title }),
10758
- /* @__PURE__ */ jsx("span", { children: workplace })
10759
- ] })
10760
- ] }) }) });
10761
- }
10762
- return /* @__PURE__ */ jsx(NavLinkWrapper, { ref, ...props, children: /* @__PURE__ */ jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 4, paddingBottom: 4, children: /* @__PURE__ */ jsxs(Flex, { children: [
10763
- /* @__PURE__ */ jsx(BrandIconWrapper, { "aria-hidden": true, tabIndex: -1, children: icon }),
10764
- /* @__PURE__ */ jsxs(Box, { paddingLeft: 2, children: [
10765
- /* @__PURE__ */ jsxs(Typography, { fontWeight: "bold", textColor: "neutral800", tag: "span", children: [
10766
- title,
10767
- /* @__PURE__ */ jsx(VisuallyHidden, { children: workplace })
10768
- ] }),
10769
- /* @__PURE__ */ jsx(Typography, { variant: "pi", tag: "p", textColor: "neutral600", "aria-hidden": true, children: workplace })
10770
- ] })
10771
- ] }) }) });
10772
- }
10773
- );
10774
- const NavCondense = ({ children, ...props }) => {
10775
- const condensed = useMainNav();
10776
- const Icon = condensed ? ChevronRight : ChevronLeft;
10777
- return /* @__PURE__ */ jsxs(NavCondenseWrapper, { tag: "button", $condensed: condensed, ...props, children: [
10778
- /* @__PURE__ */ jsx(Icon, { width: "1.2rem", "aria-hidden": true, fill: "neutral600" }),
10779
- /* @__PURE__ */ jsx(VisuallyHidden, { children })
10780
- ] });
10781
- };
10782
- const NavCondenseWrapper = styled(Flex).attrs((props) => ({
10783
- justifyContent: "center",
10784
- ...props
10785
- }))`
10786
- background: ${({ theme }) => theme.colors.neutral0};
10787
- border: 1px solid ${({ theme }) => theme.colors.neutral150};
10788
- border-radius: ${({ theme }) => theme.borderRadius};
10789
- position: absolute;
10790
- bottom: 1.3rem; // 9 is the height of the svg and 4 is the padding below
10791
- right: ${({ theme, $condensed }) => $condensed ? 0 : theme.spaces[5]};
10792
- transform: ${({ $condensed }) => $condensed ? `translateX(50%)` : void 0};
10793
- z-index: 2;
10794
- width: 1.8rem;
10795
- height: 2.5rem;
10796
- `;
10797
- const NavFooter = ({ children }) => {
10798
- return /* @__PURE__ */ jsx(Box, { position: "relative", children });
10799
- };
10800
- const NavLink = forwardRef(
10801
- ({ children, icon, badgeContent, badgeAriaLabel, ...props }, ref) => {
10802
- const condensed = useMainNav();
10803
- if (condensed) {
10804
- return /* @__PURE__ */ jsx(MainNavLinkWrapper, { ref, ...props, children: /* @__PURE__ */ jsx(Tooltip, { position: "right", label: children, children: /* @__PURE__ */ jsxs(Flex, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, tag: "span", justifyContent: "center", children: [
10805
- /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingRight: 0, tag: "span", children: icon }),
10806
- badgeContent && /* @__PURE__ */ jsx(CustomBadge, { $condensed: true, "aria-label": badgeAriaLabel, children: badgeContent })
10807
- ] }) }) });
10808
- }
10809
- return /* @__PURE__ */ jsx(MainNavLinkWrapper, { ref, ...props, children: /* @__PURE__ */ jsxs(
10810
- Flex,
10811
- {
10812
- paddingLeft: 3,
10813
- paddingRight: 3,
10814
- paddingTop: 2,
10815
- paddingBottom: 2,
10816
- tag: "span",
10817
- justifyContent: "space-between",
10818
- children: [
10819
- /* @__PURE__ */ jsxs(Flex, { children: [
10820
- /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingRight: 3, tag: "span", children: icon }),
10821
- /* @__PURE__ */ jsx(Typography, { children })
10822
- ] }),
10823
- badgeContent && /* @__PURE__ */ jsx(CustomBadge, { justifyContent: "center", "aria-label": badgeAriaLabel, children: badgeContent })
10824
- ]
10825
- }
10826
- ) });
10827
- }
10828
- );
10829
- const MainNavLinkWrapper = styled(BaseLink)`
10830
- position: relative;
10831
- text-decoration: none;
10832
- display: block;
10833
- border-radius: ${({ theme }) => theme.borderRadius};
10834
- background: ${({ theme }) => theme.colors.neutral0};
10835
- color: ${({ theme }) => theme.colors.neutral600};
10836
-
10837
- svg {
10838
- fill: ${({ theme }) => theme.colors.neutral500};
10839
- }
10840
-
10841
- &:hover {
10842
- background: ${({ theme }) => theme.colors.neutral100};
10843
- color: ${({ theme }) => theme.colors.neutral700};
10844
-
10845
- svg {
10846
- fill: ${({ theme }) => theme.colors.neutral600};
10847
- }
10848
- }
10849
-
10850
- &.active {
10851
- background: ${({ theme }) => theme.colors.primary100};
10852
- color: ${({ theme }) => theme.colors.primary600};
10853
- font-weight: 500;
10854
-
10855
- svg {
10856
- fill: ${({ theme }) => theme.colors.primary600};
10857
- }
10858
- }
10859
- `;
10860
- const CustomBadge = styled(Badge)`
10861
- ${({ theme, $condensed }) => $condensed && css`
10862
- position: absolute;
10863
- // Values based on visual aspect
10864
- top: -${theme.spaces[3]};
10865
- right: -${theme.spaces[1]};
10866
- `}
10867
-
10868
- // overwrite to ensure the badge typography is white on blue.
10869
- & > * {
10870
- color: ${({ theme }) => theme.colors.neutral0};
10871
- }
10872
-
10873
- line-height: 0;
10874
- display: flex;
10875
- justify-content: center;
10876
- align-items: center;
10877
- min-width: ${({ theme }) => theme.spaces[6]};
10878
- height: ${({ theme }) => theme.spaces[5]};
10879
- padding: ${({ theme }) => `0 ${theme.spaces[2]}`};
10880
- border-radius: ${({ theme }) => theme.spaces[10]};
10881
- background: ${({ theme }) => theme.colors.primary600};
10882
- `;
10883
- const NavSection = ({ label, children, horizontal = false, spacing = 2, ...props }) => {
10884
- const condensed = useMainNav();
10885
- if (condensed) {
10886
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
10887
- /* @__PURE__ */ jsxs(Box, { paddingTop: 1, paddingBottom: 1, background: "neutral0", hasRadius: true, tag: "span", children: [
10888
- /* @__PURE__ */ jsx(Divider, {}),
10889
- /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { children: label }) })
10890
- ] }),
10891
- /* @__PURE__ */ jsx(
10892
- Flex,
10893
- {
10894
- tag: "ul",
10895
- gap: spacing,
10896
- direction: horizontal ? "row" : "column",
10897
- alignItems: horizontal ? "center" : "stretch",
10898
- ...props,
10899
- children: React.Children.map(children, (child, index) => {
10900
- return /* @__PURE__ */ jsx("li", { children: child }, index);
10901
- })
10902
- }
10903
- )
10904
- ] });
10905
- }
10906
- return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
10907
- /* @__PURE__ */ jsx(Box, { paddingTop: 1, paddingBottom: 1, background: "neutral0", paddingRight: 3, paddingLeft: 3, hasRadius: true, tag: "span", children: /* @__PURE__ */ jsx(Typography, { variant: "sigma", textColor: "neutral600", children: label }) }),
10908
- /* @__PURE__ */ jsx(
10909
- Flex,
10910
- {
10911
- tag: "ul",
10912
- gap: spacing,
10913
- direction: horizontal ? "row" : "column",
10914
- alignItems: horizontal ? "center" : "stretch",
10915
- ...props,
10916
- children: React.Children.map(children, (child, index) => {
10917
- return /* @__PURE__ */ jsx("li", { children: child }, index);
10918
- })
10919
- }
10920
- )
10921
- ] });
10922
- };
10923
- const BoxGrow = styled(Box)`
10924
- flex-grow: 1;
10925
- overflow-y: auto;
10926
- `;
10927
- const NavSections = ({ children, spacing = 4, horizontal = false, ...props }) => {
10928
- return /* @__PURE__ */ jsx(BoxGrow, { paddingLeft: 3, paddingRight: 2, paddingTop: 3, paddingBottom: 8, children: /* @__PURE__ */ jsx(
10929
- Flex,
10930
- {
10931
- tag: "ul",
10932
- gap: spacing,
10933
- direction: horizontal ? "row" : "column",
10934
- alignItems: horizontal ? "center" : "stretch",
10935
- ...props,
10936
- children: React.Children.map(children, (child, index) => {
10937
- return /* @__PURE__ */ jsx("li", { children: child }, index);
10938
- })
10939
- }
10940
- ) });
10941
- };
10942
- const NavUserBox = styled(Box)`
10943
- border-top: 1px solid ${({ theme }) => theme.colors.neutral150};
10944
- `;
10945
- const NavUser = React.forwardRef(({ src, children, initials, ...props }, ref) => {
10946
- const condensed = useMainNav();
10947
- return /* @__PURE__ */ jsx(NavUserBox, { paddingTop: 3, paddingBottom: 3, paddingLeft: 5, paddingRight: 5, ...props, children: /* @__PURE__ */ jsxs(Flex, { tag: "button", justifyContent: condensed ? "center" : void 0, ref, children: [
10948
- src ? /* @__PURE__ */ jsx(Avatar, { src, alt: "", "aria-hidden": true }) : /* @__PURE__ */ jsx(Initials, { children: initials }),
10949
- condensed ? /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx("span", { children }) }) : /* @__PURE__ */ jsx(Box, { width: "13rem", paddingLeft: 2, tag: "span", children: /* @__PURE__ */ jsx(Typography, { ellipsis: true, textColor: "neutral600", children }) })
10950
- ] }) });
10951
- });
10952
10406
  const ModalContext = React.createContext(() => {
10953
10407
  });
10954
10408
  const useModal = () => React.useContext(ModalContext);
@@ -10958,7 +10412,7 @@ const ModalWrapper = styled(Flex)`
10958
10412
  `;
10959
10413
  const ModalLayout = ({ onClose, labelledBy, ...props }) => {
10960
10414
  useLockScroll(true);
10961
- return /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(ModalContext.Provider, { value: onClose, children: /* @__PURE__ */ jsx(ModalWrapper, { justifyContent: "center", paddingLeft: 8, paddingRight: 8, position: "fixed", zIndex: 4, children: /* @__PURE__ */ jsx(FocusTrap, { children: /* @__PURE__ */ jsx(DismissibleLayer, { onEscapeKeyDown: onClose, onPointerDownOutside: onClose, children: /* @__PURE__ */ jsx(
10415
+ return /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(ModalContext.Provider, { value: onClose, children: /* @__PURE__ */ jsx(ModalWrapper, { justifyContent: "center", paddingLeft: 8, paddingRight: 8, position: "fixed", zIndex: "modal", children: /* @__PURE__ */ jsx(FocusTrap, { children: /* @__PURE__ */ jsx(DismissibleLayer, { onEscapeKeyDown: onClose, onPointerDownOutside: onClose, children: /* @__PURE__ */ jsx(
10962
10416
  Box,
10963
10417
  {
10964
10418
  "aria-labelledby": labelledBy,
@@ -10981,7 +10435,7 @@ const ModalHeader = ({ children, closeLabel = "Close the modal" }) => {
10981
10435
  const onClose = useModal();
10982
10436
  return /* @__PURE__ */ jsx(ModalHeaderWrapper, { paddingTop: 4, paddingBottom: 4, paddingLeft: 5, paddingRight: 5, background: "neutral100", children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", children: [
10983
10437
  children,
10984
- /* @__PURE__ */ jsx(IconButton, { onClick: onClose, "aria-label": closeLabel, icon: /* @__PURE__ */ jsx(Cross, {}) })
10438
+ /* @__PURE__ */ jsx(IconButton, { onClick: onClose, label: closeLabel, withTooltip: false, children: /* @__PURE__ */ jsx(Cross, {}) })
10985
10439
  ] }) });
10986
10440
  };
10987
10441
  const ModalFooterWrapper = styled(Box)`
@@ -11003,7 +10457,7 @@ const ModalBody = (props) => {
11003
10457
  };
11004
10458
  const INITIAL_VALUE = "";
11005
10459
  const NumberInput = React.forwardRef(
11006
- ({ size = "M", startAction, locale: defaultLocale, onValueChange, value, step = 1, disabled = false, ...props }, ref) => {
10460
+ ({ startAction, locale: defaultLocale, onValueChange, value, step = 1, disabled = false, ...props }, ref) => {
11007
10461
  const designContext = useDesignSystem("NumberInput");
11008
10462
  const locale = defaultLocale || designContext.locale;
11009
10463
  const numberParserRef = React.useRef(new NumberParser(locale, { style: "decimal" }));
@@ -11080,7 +10534,6 @@ const NumberInput = React.forwardRef(
11080
10534
  onKeyDown: handleKeyDown,
11081
10535
  onBlur: handleBlur,
11082
10536
  value: inputValue,
11083
- size,
11084
10537
  endAction: /* @__PURE__ */ jsxs(Fragment, { children: [
11085
10538
  /* @__PURE__ */ jsx(
11086
10539
  ArrowButton,
@@ -11218,7 +10671,7 @@ const POPOVER_PLACEMENTS = [
11218
10671
  ];
11219
10672
  const PopoverWrapper = styled(Box)`
11220
10673
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
11221
- z-index: ${({ theme }) => theme.zIndices[0]};
10674
+ z-index: ${({ theme }) => theme.zIndices.popover};
11222
10675
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
11223
10676
  `;
11224
10677
  const Content = React.forwardRef(
@@ -11670,7 +11123,7 @@ const SearchbarInput = styled(Input$2)`
11670
11123
  ${inputFocusStyle()}
11671
11124
  `;
11672
11125
  const Searchbar = React.forwardRef(
11673
- ({ name, size = "M", children, value = "", onClear, clearLabel, ...props }, ref) => {
11126
+ ({ name, children, value = "", onClear, clearLabel, ...props }, ref) => {
11674
11127
  const inputRef = React.useRef(null);
11675
11128
  const isCompleting = value.length > 0;
11676
11129
  const handleClear = (e) => {
@@ -11686,7 +11139,6 @@ const Searchbar = React.forwardRef(
11686
11139
  ref: actualRef,
11687
11140
  value,
11688
11141
  startAction: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true }),
11689
- size,
11690
11142
  endAction: isCompleting ? /* @__PURE__ */ jsx(Action, { label: clearLabel, onClick: handleClear, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) : void 0,
11691
11143
  ...props
11692
11144
  }
@@ -11756,9 +11208,7 @@ const MultiSelect = React.forwardRef(
11756
11208
  onReachEnd,
11757
11209
  placeholder,
11758
11210
  required: requiredProp,
11759
- selectButtonTitle: _deprecatedSelectButtonTitle,
11760
11211
  startIcon,
11761
- size = "M",
11762
11212
  value: passedValue,
11763
11213
  withTags,
11764
11214
  ...restProps
@@ -11806,10 +11256,11 @@ const MultiSelect = React.forwardRef(
11806
11256
  }
11807
11257
  return null;
11808
11258
  };
11809
- const { error, required, ...field } = useField("MultiSelect");
11259
+ const { error, ...field } = useField("MultiSelect");
11810
11260
  const hasError = Boolean(error) || hasErrorProp;
11811
11261
  const id = field.id ?? idProp;
11812
11262
  const name = field.name ?? nameProp;
11263
+ const required = field.required ?? requiredProp;
11813
11264
  let ariaDescription;
11814
11265
  if (error) {
11815
11266
  ariaDescription = `${id}-error`;
@@ -11836,7 +11287,6 @@ const MultiSelect = React.forwardRef(
11836
11287
  "aria-label": restProps["aria-label"],
11837
11288
  "aria-describedby": ariaDescription ?? restProps["aria-describedby"],
11838
11289
  startIcon,
11839
- size,
11840
11290
  hasError,
11841
11291
  disabled,
11842
11292
  clearLabel,
@@ -12058,7 +11508,6 @@ const SubNavHeader = ({
12058
11508
  onClear: handleClear,
12059
11509
  onSubmit,
12060
11510
  clearLabel: "Clear",
12061
- size: "S",
12062
11511
  children: searchLabel
12063
11512
  }
12064
11513
  ) }),
@@ -12068,7 +11517,7 @@ const SubNavHeader = ({
12068
11517
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
12069
11518
  /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
12070
11519
  /* @__PURE__ */ jsx(Typography, { variant: "beta", tag, children: label }),
12071
- searchable && /* @__PURE__ */ jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, icon: /* @__PURE__ */ jsx(Search, {}) })
11520
+ searchable && /* @__PURE__ */ jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsx(Search, {}) })
12072
11521
  ] }),
12073
11522
  /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsx(CustomDivider, {}) })
12074
11523
  ] });
@@ -12705,15 +12154,10 @@ const CellWrapper = styled(RawTd)`
12705
12154
  vertical-align: sub;
12706
12155
  }
12707
12156
  `;
12708
- const ActionWrapper = styled.span`
12709
- svg {
12710
- height: 0.4rem;
12711
- }
12712
- `;
12713
12157
  const Th = ({ children, action, ...props }) => {
12714
12158
  return /* @__PURE__ */ jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
12715
12159
  children,
12716
- /* @__PURE__ */ jsx(ActionWrapper, { children: action })
12160
+ action
12717
12161
  ] }) });
12718
12162
  };
12719
12163
  const Td = ({ children, ...props }) => {
@@ -12751,6 +12195,59 @@ const TFooter = ({ children, icon, ...props }) => {
12751
12195
  ] }) })
12752
12196
  ] });
12753
12197
  };
12198
+ const rotation = keyframes`
12199
+ from {
12200
+ transform: rotate(0deg);
12201
+ }
12202
+ to {
12203
+ transform: rotate(359deg);
12204
+ }
12205
+ `;
12206
+ const LoadingWrapper = styled.div`
12207
+ animation: ${rotation} 2s infinite linear;
12208
+ will-change: transform;
12209
+ `;
12210
+ const TextButtonWrapper = styled(Flex)`
12211
+ border: none;
12212
+
12213
+ &[aria-disabled='true'] {
12214
+ pointer-events: none;
12215
+ svg path {
12216
+ fill: ${({ theme }) => theme.colors.neutral600};
12217
+ }
12218
+ }
12219
+
12220
+ svg path {
12221
+ fill: ${({ theme }) => theme.colors.primary600};
12222
+ }
12223
+
12224
+ ${focus}
12225
+ `;
12226
+ const TextButton = React.forwardRef(
12227
+ ({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
12228
+ const handleClick = onClick && !disabled ? onClick : void 0;
12229
+ const isDisabled = disabled || loading;
12230
+ return /* @__PURE__ */ jsxs(
12231
+ TextButtonWrapper,
12232
+ {
12233
+ ref,
12234
+ "aria-disabled": isDisabled,
12235
+ onClick: handleClick,
12236
+ tag: "button",
12237
+ type: "button",
12238
+ background: "transparent",
12239
+ gap: 2,
12240
+ ...props,
12241
+ children: [
12242
+ loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
12243
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
12244
+ endIcon
12245
+ ]
12246
+ }
12247
+ );
12248
+ }
12249
+ );
12250
+ TextButton.displayName = "TextButton";
12754
12251
  const TextInput = React.forwardRef((props, ref) => {
12755
12252
  return /* @__PURE__ */ jsx(Input$2, { ref, ...props });
12756
12253
  });
@@ -12821,7 +12318,6 @@ const Toggle = React.forwardRef(
12821
12318
  name: nameProp,
12822
12319
  checked: checkedProp,
12823
12320
  onChange,
12824
- size = "M",
12825
12321
  ...props
12826
12322
  }, forwardedRef) => {
12827
12323
  const [checked = false, setChecked] = useControllableState({
@@ -12865,7 +12361,6 @@ const Toggle = React.forwardRef(
12865
12361
  justifyContent: "center",
12866
12362
  background: disabled && isFalseyChecked ? "neutral200" : isFalseyChecked ? "neutral0" : "transparent",
12867
12363
  borderColor: disabled && isFalseyChecked ? "neutral300" : isFalseyChecked ? "neutral200" : disabled ? "neutral150" : "neutral100",
12868
- $size: size,
12869
12364
  children: /* @__PURE__ */ jsx(
12870
12365
  Typography,
12871
12366
  {
@@ -12888,7 +12383,6 @@ const Toggle = React.forwardRef(
12888
12383
  justifyContent: "center",
12889
12384
  background: disabled && checked ? "neutral200" : checked ? "neutral0" : "transparent",
12890
12385
  borderColor: disabled && checked ? "neutral300" : checked ? "neutral200" : disabled ? "neutral150" : "neutral100",
12891
- $size: size,
12892
12386
  children: /* @__PURE__ */ jsx(
12893
12387
  Typography,
12894
12388
  {
@@ -12929,13 +12423,7 @@ const ToggleWrapper = styled(Flex)`
12929
12423
  ${inputFocusStyle()}
12930
12424
  `;
12931
12425
  const ToggleOption = styled(Flex)`
12932
- /**
12933
- We declare the defined value because we want the height of the input when
12934
- the values are in a row to be 40px. But defining a height on the label
12935
- would break the input when it wraps.
12936
- */
12937
- padding-top: ${({ $size }) => `${$size === "S" ? "2px" : "6px"}`};
12938
- padding-bottom: ${({ $size }) => `${$size === "S" ? "2px" : "6px"}`};
12426
+ padding-block: 0.6rem;
12939
12427
  `;
12940
12428
  const Input = styled.input`
12941
12429
  height: 100%;
@@ -12949,9 +12437,6 @@ const Input = styled.input`
12949
12437
  export {
12950
12438
  AccessibleIcon,
12951
12439
  Accordion,
12952
- AccordionContent,
12953
- AccordionGroup,
12954
- AccordionToggle,
12955
12440
  Alert,
12956
12441
  Avatar,
12957
12442
  AvatarGroup,
@@ -12981,7 +12466,7 @@ export {
12981
12466
  CarouselSlide,
12982
12467
  Checkbox,
12983
12468
  Combobox,
12984
- ComboboxOption,
12469
+ Option as ComboboxOption,
12985
12470
  Crumb,
12986
12471
  CrumbLink,
12987
12472
  CrumbSimpleMenu,
@@ -13010,7 +12495,6 @@ export {
13010
12495
  LiveRegions,
13011
12496
  Loader,
13012
12497
  Main,
13013
- MainNav,
13014
12498
  Menu,
13015
12499
  MenuItem,
13016
12500
  ModalBody,
@@ -13021,13 +12505,6 @@ export {
13021
12505
  MultiSelectGroup,
13022
12506
  MultiSelectNested,
13023
12507
  MultiSelectOption,
13024
- NavBrand,
13025
- NavCondense,
13026
- NavFooter,
13027
- NavLink,
13028
- NavSection,
13029
- NavSections,
13030
- NavUser,
13031
12508
  NextLink,
13032
12509
  NumberInput,
13033
12510
  POPOVER_PLACEMENTS,
@@ -13075,10 +12552,9 @@ export {
13075
12552
  Textarea,
13076
12553
  Th,
13077
12554
  Thead,
13078
- ThemeProvider,
13079
12555
  TimePicker$1 as TimePicker,
13080
12556
  Toggle,
13081
- Tooltip,
12557
+ TooltipImpl as Tooltip,
13082
12558
  Tr,
13083
12559
  Typography,
13084
12560
  VisuallyHidden,
@@ -13097,7 +12573,6 @@ export {
13097
12573
  useDesignSystem,
13098
12574
  useField,
13099
12575
  useFilter,
13100
- useNotifyAT,
13101
- useTheme
12576
+ useNotifyAT
13102
12577
  };
13103
12578
  //# sourceMappingURL=index.mjs.map