@strapi/design-system 2.0.0-beta.6 → 2.0.0-rc.11

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 (165) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/dist/components/Alert/Alert.d.ts +1 -1
  4. package/dist/components/Alert/Alert.d.ts.map +1 -1
  5. package/dist/components/Avatar/Avatar.d.ts +1 -1
  6. package/dist/components/Avatar/Avatar.d.ts.map +1 -1
  7. package/dist/components/Badge/Badge.d.ts +4 -4
  8. package/dist/components/Badge/Badge.d.ts.map +1 -1
  9. package/dist/components/BaseLink/BaseLink.d.ts +3 -3
  10. package/dist/components/BaseLink/BaseLink.d.ts.map +1 -1
  11. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +3 -5
  12. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  13. package/dist/components/Breadcrumbs/Crumb.d.ts +3 -5
  14. package/dist/components/Breadcrumbs/Crumb.d.ts.map +1 -1
  15. package/dist/components/Breadcrumbs/CrumbLink.d.ts +2 -4
  16. package/dist/components/Breadcrumbs/CrumbLink.d.ts.map +1 -1
  17. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts +33 -6
  18. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts.map +1 -1
  19. package/dist/components/Button/Button.d.ts +3 -2
  20. package/dist/components/Button/Button.d.ts.map +1 -1
  21. package/dist/components/Button/utils.d.ts.map +1 -1
  22. package/dist/components/Card/Card.d.ts +3 -2
  23. package/dist/components/Card/Card.d.ts.map +1 -1
  24. package/dist/components/Card/CardAction.d.ts +3 -2
  25. package/dist/components/Card/CardAction.d.ts.map +1 -1
  26. package/dist/components/Card/CardBody.d.ts +1 -1
  27. package/dist/components/Card/CardBody.d.ts.map +1 -1
  28. package/dist/components/Card/CardCheckbox.d.ts +2 -1
  29. package/dist/components/Card/CardCheckbox.d.ts.map +1 -1
  30. package/dist/components/Card/CardContent.d.ts +1 -1
  31. package/dist/components/Card/CardContent.d.ts.map +1 -1
  32. package/dist/components/Card/CardHeader.d.ts +1 -1
  33. package/dist/components/Card/CardHeader.d.ts.map +1 -1
  34. package/dist/components/Card/CardTimer.d.ts +1 -1
  35. package/dist/components/Card/CardTimer.d.ts.map +1 -1
  36. package/dist/components/Card/CardTitle.d.ts +1 -1
  37. package/dist/components/Card/CardTitle.d.ts.map +1 -1
  38. package/dist/components/CarouselInput/Carousel.d.ts +1 -1
  39. package/dist/components/CarouselInput/Carousel.d.ts.map +1 -1
  40. package/dist/components/CarouselInput/CarouselActions.d.ts +1 -1
  41. package/dist/components/CarouselInput/CarouselActions.d.ts.map +1 -1
  42. package/dist/components/CarouselInput/CarouselImage.d.ts +1 -1
  43. package/dist/components/CarouselInput/CarouselImage.d.ts.map +1 -1
  44. package/dist/components/CarouselInput/CarouselInput.d.ts.map +1 -1
  45. package/dist/components/CarouselInput/CarouselSlide.d.ts +1 -1
  46. package/dist/components/CarouselInput/CarouselSlide.d.ts.map +1 -1
  47. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  48. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  49. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  50. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  51. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  52. package/dist/components/Dialog/Dialog.d.ts +2 -2
  53. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  54. package/dist/components/Divider/Divider.d.ts +1 -1
  55. package/dist/components/Divider/Divider.d.ts.map +1 -1
  56. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +3 -3
  57. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
  58. package/dist/components/Field/Field.d.ts +2 -2
  59. package/dist/components/Field/Field.d.ts.map +1 -1
  60. package/dist/components/IconButton/IconButton.d.ts +7 -18
  61. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  62. package/dist/components/JSONInput/JSONInput.d.ts +1 -1
  63. package/dist/components/JSONInput/JSONInput.d.ts.map +1 -1
  64. package/dist/components/Link/Link.d.ts.map +1 -1
  65. package/dist/components/LinkButton/LinkButton.d.ts +4 -10
  66. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  67. package/dist/components/Main/Main.d.ts +1 -1
  68. package/dist/components/Main/Main.d.ts.map +1 -1
  69. package/dist/components/Modal/Modal.d.ts +2 -2
  70. package/dist/components/Modal/Modal.d.ts.map +1 -1
  71. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  72. package/dist/components/Pagination/components.d.ts +1 -1
  73. package/dist/components/Pagination/components.d.ts.map +1 -1
  74. package/dist/components/Popover/Popover.d.ts +1 -1
  75. package/dist/components/Popover/Popover.d.ts.map +1 -1
  76. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -2
  77. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  78. package/dist/components/RawTable/RawCell.d.ts +2 -2
  79. package/dist/components/RawTable/RawCell.d.ts.map +1 -1
  80. package/dist/components/RawTable/RawTable.d.ts +1 -1
  81. package/dist/components/RawTable/RawTable.d.ts.map +1 -1
  82. package/dist/components/RawTable/RawTr.d.ts +1 -1
  83. package/dist/components/RawTable/RawTr.d.ts.map +1 -1
  84. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  85. package/dist/components/Select/MultiSelect.d.ts.map +1 -1
  86. package/dist/components/Select/SelectParts.d.ts +2 -2
  87. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  88. package/dist/components/Select/SingleSelect.d.ts.map +1 -1
  89. package/dist/components/SimpleMenu/Menu.d.ts +19 -7
  90. package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
  91. package/dist/components/SimpleMenu/SimpleMenu.d.ts +31 -4
  92. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  93. package/dist/components/Status/Status.d.ts +1 -1
  94. package/dist/components/Status/Status.d.ts.map +1 -1
  95. package/dist/components/SubNav/SubNav.d.ts +1 -1
  96. package/dist/components/SubNav/SubNav.d.ts.map +1 -1
  97. package/dist/components/SubNav/SubNavHeader.d.ts +3 -3
  98. package/dist/components/SubNav/SubNavHeader.d.ts.map +1 -1
  99. package/dist/components/SubNav/SubNavLink.d.ts.map +1 -1
  100. package/dist/components/SubNav/SubNavSections.d.ts +1 -1
  101. package/dist/components/SubNav/SubNavSections.d.ts.map +1 -1
  102. package/dist/components/Table/Cell.d.ts +2 -2
  103. package/dist/components/Table/Cell.d.ts.map +1 -1
  104. package/dist/components/Table/TFooter.d.ts +1 -1
  105. package/dist/components/Table/TFooter.d.ts.map +1 -1
  106. package/dist/components/Table/Table.d.ts +1 -1
  107. package/dist/components/Table/Table.d.ts.map +1 -1
  108. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  109. package/dist/components/Tag/Tag.d.ts +6 -3
  110. package/dist/components/Tag/Tag.d.ts.map +1 -1
  111. package/dist/components/TextButton/TextButton.d.ts +9 -4
  112. package/dist/components/TextButton/TextButton.d.ts.map +1 -1
  113. package/dist/components/Textarea/Textarea.d.ts +1 -1
  114. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  115. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  116. package/dist/components/index.d.ts +0 -6
  117. package/dist/components/index.d.ts.map +1 -1
  118. package/dist/helpers/handleResponsiveValues.d.ts +30 -15
  119. package/dist/helpers/handleResponsiveValues.d.ts.map +1 -1
  120. package/dist/helpers/theme.d.ts +1 -1
  121. package/dist/helpers/theme.d.ts.map +1 -1
  122. package/dist/index.d.ts +1 -0
  123. package/dist/index.d.ts.map +1 -1
  124. package/dist/index.js +1143 -1009
  125. package/dist/index.js.map +1 -1
  126. package/dist/index.mjs +1145 -1011
  127. package/dist/index.mjs.map +1 -1
  128. package/dist/primitives/Box/Box.d.ts +84 -0
  129. package/dist/primitives/Box/Box.d.ts.map +1 -0
  130. package/dist/primitives/Box/index.d.ts.map +1 -0
  131. package/dist/{components → primitives}/Flex/Flex.d.ts +7 -8
  132. package/dist/primitives/Flex/Flex.d.ts.map +1 -0
  133. package/dist/primitives/Flex/index.d.ts.map +1 -0
  134. package/dist/{components → primitives}/Grid/Grid.d.ts +6 -4
  135. package/dist/primitives/Grid/Grid.d.ts.map +1 -0
  136. package/dist/primitives/Grid/index.d.ts.map +1 -0
  137. package/dist/{components → primitives}/Typography/Typography.d.ts +5 -9
  138. package/dist/primitives/Typography/Typography.d.ts.map +1 -0
  139. package/dist/primitives/Typography/index.d.ts.map +1 -0
  140. package/dist/primitives/index.d.ts +5 -0
  141. package/dist/primitives/index.d.ts.map +1 -0
  142. package/dist/styles/global.d.ts.map +1 -1
  143. package/dist/themes/common-theme.d.ts +8 -4
  144. package/dist/themes/common-theme.d.ts.map +1 -1
  145. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts +1 -1
  146. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts.map +1 -1
  147. package/dist/utilities/Portal/Portal.d.ts +1 -1
  148. package/package.json +7 -7
  149. package/dist/components/BaseButton/BaseButton.d.ts +0 -10
  150. package/dist/components/BaseButton/BaseButton.d.ts.map +0 -1
  151. package/dist/components/BaseButton/index.d.ts +0 -2
  152. package/dist/components/BaseButton/index.d.ts.map +0 -1
  153. package/dist/components/Box/Box.d.ts +0 -102
  154. package/dist/components/Box/Box.d.ts.map +0 -1
  155. package/dist/components/Box/index.d.ts.map +0 -1
  156. package/dist/components/Flex/Flex.d.ts.map +0 -1
  157. package/dist/components/Flex/index.d.ts.map +0 -1
  158. package/dist/components/Grid/Grid.d.ts.map +0 -1
  159. package/dist/components/Grid/index.d.ts.map +0 -1
  160. package/dist/components/Typography/Typography.d.ts.map +0 -1
  161. package/dist/components/Typography/index.d.ts.map +0 -1
  162. /package/dist/{components → primitives}/Box/index.d.ts +0 -0
  163. /package/dist/{components → primitives}/Flex/index.d.ts +0 -0
  164. /package/dist/{components → primitives}/Grid/index.d.ts +0 -0
  165. /package/dist/{components → primitives}/Typography/index.d.ts +0 -0
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import * as DismissibleLayerPrimitive from "@radix-ui/react-dismissable-layer";
9
9
  import { useCallbackRef, Combobox as Combobox$1, Select, composeEventHandlers, usePrev } from "@strapi/ui-primitives";
10
10
  import { composeEventHandlers as composeEventHandlers2, useCallbackRef as useCallbackRef2, useCollator, useFilter } from "@strapi/ui-primitives";
11
11
  import * as RadixAccordion from "@radix-ui/react-accordion";
12
- import { CaretDown, Cross, CheckCircle, WarningCircle, Information, Loader as Loader$1, ExternalLink, ChevronRight, ChevronLeft, Calendar, Clock, Search } from "@strapi/icons";
12
+ import { CaretDown, Cross, CheckCircle, WarningCircle, Information, Loader as Loader$1, ExternalLink, ChevronRight, Minus, ChevronLeft, Calendar, Clock, Search } from "@strapi/icons";
13
13
  import * as Avatar$1 from "@radix-ui/react-avatar";
14
14
  import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
15
15
  import * as Checkbox from "@radix-ui/react-checkbox";
@@ -48,32 +48,6 @@ const createContext = (rootComponentName, defaultContext) => {
48
48
  Provider2.displayName = `${rootComponentName}Provider`;
49
49
  return [Provider2, useContext];
50
50
  };
51
- const handleResponsiveValues = (property, value, theme) => {
52
- if (!value) {
53
- return void 0;
54
- }
55
- if (typeof value === "object") {
56
- const transformedArray = Array.isArray(value) ? value : [value?.desktop, value?.tablet, value?.mobile];
57
- const spaces = transformedArray.reduce((acc, curr, index) => {
58
- if (curr) {
59
- switch (index) {
60
- case 0:
61
- return `${acc}${property}: ${theme.spaces[curr]};`;
62
- case 1:
63
- return `${acc}${theme.mediaQueries.tablet}{${property}: ${theme.spaces[curr]};}`;
64
- case 2:
65
- return `${acc}${theme.mediaQueries.mobile}{${property}: ${theme.spaces[curr]};}`;
66
- default:
67
- return acc;
68
- }
69
- }
70
- return acc;
71
- }, "");
72
- return spaces;
73
- }
74
- const realValue = theme.spaces[value] ?? value;
75
- return `${property}: ${realValue};`;
76
- };
77
51
  function isKeyOf(o, s) {
78
52
  if (typeof o === "string") {
79
53
  return false;
@@ -84,11 +58,166 @@ function isObject(item) {
84
58
  return item && typeof item === "object" && !Array.isArray(item);
85
59
  }
86
60
  function extractStyleFromTheme(themeSection, key, defaultValue) {
87
- if (key && isKeyOf(themeSection, key)) {
61
+ if (themeSection && key && isKeyOf(themeSection, key)) {
88
62
  return themeSection[key];
89
63
  }
90
64
  return defaultValue;
91
65
  }
66
+ const mappedCSSProps = {
67
+ padding: ["padding-block-start", "padding-inline-end", "padding-block-end", "padding-inline-start"],
68
+ paddingTop: "padding-block-start",
69
+ paddingRight: "padding-inline-end",
70
+ paddingBottom: "padding-block-end",
71
+ paddingLeft: "padding-inline-start",
72
+ margin: ["margin-block-start", "margin-inline-end", "margin-block-end", "margin-inline-start"],
73
+ marginLeft: "margin-inline-start",
74
+ marginRight: "margin-inline-end",
75
+ marginTop: "margin-block-start",
76
+ marginBottom: "margin-block-end",
77
+ borderRadius: "border-radius",
78
+ borderStyle: "border-style",
79
+ borderWidth: "border-width",
80
+ borderColor: "border-color",
81
+ fontSize: "font-size",
82
+ fontWeight: "font-weight",
83
+ lineHeight: "line-height",
84
+ zIndex: "z-index",
85
+ boxShadow: "box-shadow",
86
+ pointerEvents: "pointer-events",
87
+ textAlign: "text-align",
88
+ textTransform: "text-transform",
89
+ textDecoration: "text-decoration",
90
+ flexGrow: "flex-grow",
91
+ flexShrink: "flex-shrink",
92
+ flexBasis: "flex-basis",
93
+ minWidth: "min-width",
94
+ maxWidth: "max-width",
95
+ minHeight: "min-height",
96
+ maxHeight: "max-height",
97
+ flexDirection: "flex-direction",
98
+ flexWrap: "flex-wrap",
99
+ justifyContent: "justify-content",
100
+ alignItems: "align-items"
101
+ };
102
+ const fillCssValues = (value) => {
103
+ const [top, right, bottom, left] = value;
104
+ const rightValue = right ?? top;
105
+ const bottomValue = bottom ?? top;
106
+ const leftValue = left ?? rightValue;
107
+ return [top, rightValue, bottomValue, leftValue];
108
+ };
109
+ function getThemeSection(key, theme) {
110
+ switch (key) {
111
+ case "gap":
112
+ case "padding":
113
+ case "margin":
114
+ case "paddingTop":
115
+ case "paddingLeft":
116
+ case "paddingRight":
117
+ case "paddingBottom":
118
+ case "marginTop":
119
+ case "marginLeft":
120
+ case "marginRight":
121
+ case "marginBottom":
122
+ case "left":
123
+ case "right":
124
+ case "top":
125
+ case "bottom":
126
+ case "width":
127
+ case "maxWidth":
128
+ case "minWidth":
129
+ case "height":
130
+ case "maxHeight":
131
+ case "minHeight":
132
+ case "borderRadius":
133
+ case "borderWidth":
134
+ return theme.spaces;
135
+ case "color":
136
+ case "background":
137
+ case "borderColor":
138
+ return theme.colors;
139
+ case "fontSize":
140
+ return theme.fontSizes;
141
+ case "fontWeight":
142
+ return theme.fontWeights;
143
+ case "lineHeight":
144
+ return theme.lineHeights;
145
+ case "zIndex":
146
+ return theme.zIndices;
147
+ case "boxShadow":
148
+ return theme.shadows;
149
+ default:
150
+ return null;
151
+ }
152
+ }
153
+ const handleResponsiveValues = (values, theme) => {
154
+ const stylesByBreakpoint = Object.entries(values).reduce(
155
+ (acc, curr) => {
156
+ const [key, value] = curr;
157
+ const themeSection = getThemeSection(key, theme);
158
+ const cssProperty = Object.prototype.hasOwnProperty.call(mappedCSSProps, key) ? mappedCSSProps[key] : key;
159
+ if (cssProperty && (value || value === 0)) {
160
+ if (typeof value === "object" && !Array.isArray(value)) {
161
+ Object.entries(value).forEach(([breakpointName, breakpointValue]) => {
162
+ acc[breakpointName] = {
163
+ ...acc[breakpointName],
164
+ ...convertCssPropertiesToCssValues(cssProperty, breakpointValue, themeSection)
165
+ };
166
+ });
167
+ } else {
168
+ acc.initial = {
169
+ ...acc.initial,
170
+ ...convertCssPropertiesToCssValues(cssProperty, value, themeSection)
171
+ };
172
+ }
173
+ }
174
+ return acc;
175
+ },
176
+ {
177
+ initial: {},
178
+ small: {},
179
+ medium: {},
180
+ large: {}
181
+ }
182
+ );
183
+ return Object.entries(stylesByBreakpoint).reduce((acc, [key, value]) => {
184
+ if (value && Object.keys(value).length > 0) {
185
+ const breakpointStyles = Object.entries(value).reduce((arr, [property, value2]) => {
186
+ arr.push(`${property}: ${value2};`);
187
+ return arr;
188
+ }, []).join("\n");
189
+ if (key === "initial") {
190
+ acc.push(breakpointStyles);
191
+ } else {
192
+ acc.push(`${theme.breakpoints[key]}{ ${breakpointStyles} }`);
193
+ }
194
+ }
195
+ return acc;
196
+ }, []).join("\n");
197
+ };
198
+ const convertCssPropertiesToCssValues = (property, value, themeSection) => {
199
+ if (Array.isArray(property) && Array.isArray(value)) {
200
+ const shorthandValues = fillCssValues(value);
201
+ return property.reduce((acc, prop, index) => {
202
+ acc[prop] = extractStyleFromTheme(themeSection, shorthandValues[index], shorthandValues[index]);
203
+ return acc;
204
+ }, {});
205
+ } else if (Array.isArray(property) && !Array.isArray(value)) {
206
+ return property.reduce((acc, prop) => {
207
+ acc[prop] = extractStyleFromTheme(themeSection, value, value);
208
+ return acc;
209
+ }, {});
210
+ } else if (!Array.isArray(property) && !Array.isArray(value)) {
211
+ return {
212
+ [property]: extractStyleFromTheme(themeSection, value, value)
213
+ };
214
+ } else {
215
+ console.warn(
216
+ "You've passed an array of values to a property that does not support it. Please check the property and value you're passing."
217
+ );
218
+ return {};
219
+ }
220
+ };
92
221
  const forwardRef = React.forwardRef;
93
222
  const Box = forwardRef((props, ref) => {
94
223
  const {
@@ -100,8 +229,6 @@ const Box = forwardRef((props, ref) => {
100
229
  fontSize,
101
230
  grow,
102
231
  hasRadius,
103
- hiddenS,
104
- hiddenXS,
105
232
  padding,
106
233
  paddingBottom,
107
234
  paddingLeft,
@@ -115,6 +242,7 @@ const Box = forwardRef((props, ref) => {
115
242
  shadow,
116
243
  shrink,
117
244
  lineHeight,
245
+ fontWeight,
118
246
  width,
119
247
  minWidth,
120
248
  maxWidth,
@@ -152,8 +280,6 @@ const Box = forwardRef((props, ref) => {
152
280
  $fontSize: fontSize,
153
281
  $grow: grow,
154
282
  $hasRadius: hasRadius,
155
- $hiddenS: hiddenS,
156
- $hiddenXS: hiddenXS,
157
283
  $padding: padding,
158
284
  $paddingBottom: paddingBottom,
159
285
  $paddingLeft: paddingLeft,
@@ -167,6 +293,7 @@ const Box = forwardRef((props, ref) => {
167
293
  $shadow: shadow,
168
294
  $shrink: shrink,
169
295
  $lineHeight: lineHeight,
296
+ $fontWeight: fontWeight,
170
297
  $width: width,
171
298
  $minWidth: minWidth,
172
299
  $maxWidth: maxWidth,
@@ -195,110 +322,83 @@ const Box = forwardRef((props, ref) => {
195
322
  return /* @__PURE__ */ jsx(StyledBox, { as: AsComponent, ref, ...mappedProps, ...rest });
196
323
  });
197
324
  const StyledBox = styled.div`
198
- // Font
199
- font-size: ${({ $fontSize, theme }) => extractStyleFromTheme(theme.fontSizes, $fontSize, $fontSize)};
200
-
201
- // Colors
202
- background: ${({ theme, $background }) => extractStyleFromTheme(theme.colors, $background, $background)};
203
- color: ${({ theme, $color }) => extractStyleFromTheme(theme.colors, $color, $color)};
204
-
205
- // Spaces
206
- ${({ theme, $padding }) => handleResponsiveValues("padding-block", $padding, theme)}
207
- ${({ theme, $padding }) => handleResponsiveValues("padding-inline", $padding, theme)}
208
- ${({ theme, $paddingTop }) => handleResponsiveValues("padding-block-start", $paddingTop, theme)}
209
- ${({ theme, $paddingRight }) => handleResponsiveValues("padding-inline-end", $paddingRight, theme)}
210
- ${({ theme, $paddingBottom }) => handleResponsiveValues("padding-block-end", $paddingBottom, theme)}
211
- ${({ theme, $paddingLeft }) => handleResponsiveValues("padding-inline-start", $paddingLeft, theme)}
212
-
213
- ${({ theme, $margin }) => handleResponsiveValues("margin-block", $margin, theme)}
214
- ${({ theme, $margin }) => handleResponsiveValues("margin-inline", $margin, theme)}
215
- ${({ theme, $marginLeft }) => handleResponsiveValues("margin-inline-start", $marginLeft, theme)}
216
- ${({ theme, $marginRight }) => handleResponsiveValues("margin-inline-end", $marginRight, theme)}
217
- ${({ theme, $marginTop }) => handleResponsiveValues("margin-block-start", $marginTop, theme)}
218
- ${({ theme, $marginBottom }) => handleResponsiveValues("margin-block-end", $marginBottom, theme)}
219
-
220
- // Responsive hiding
221
- ${({ theme, $hiddenS }) => $hiddenS ? `${theme.mediaQueries.tablet} { display: none; }` : void 0}
222
- ${({ theme, $hiddenXS }) => $hiddenXS ? `${theme.mediaQueries.mobile} { display: none; }` : void 0}
223
-
224
-
225
- // Borders
226
- border-radius: ${({ theme, $hasRadius, $borderRadius }) => $hasRadius ? theme.borderRadius : $borderRadius};
227
- border-style: ${({ $borderStyle }) => $borderStyle};
228
- border-width: ${({ $borderWidth }) => $borderWidth};
229
- border-color: ${({ $borderColor, theme }) => extractStyleFromTheme(theme.colors, $borderColor, void 0)};
230
- border: ${({ theme, $borderColor, $borderStyle, $borderWidth }) => {
231
- if ($borderColor && !$borderStyle && typeof $borderWidth === "undefined") {
232
- return `1px solid ${theme.colors[$borderColor]}`;
233
- }
234
- return void 0;
325
+ ${({ theme, ...props }) => {
326
+ return handleResponsiveValues(
327
+ {
328
+ padding: props.$padding,
329
+ paddingTop: props.$paddingTop,
330
+ paddingBottom: props.$paddingBottom,
331
+ paddingLeft: props.$paddingLeft,
332
+ paddingRight: props.$paddingRight,
333
+ margin: props.$margin,
334
+ marginTop: props.$marginTop,
335
+ marginBottom: props.$marginBottom,
336
+ marginLeft: props.$marginLeft,
337
+ marginRight: props.$marginRight,
338
+ top: props.$top,
339
+ left: props.$left,
340
+ bottom: props.$bottom,
341
+ right: props.$right,
342
+ width: props.$width,
343
+ minWidth: props.$minWidth,
344
+ maxWidth: props.$maxWidth,
345
+ height: props.$height,
346
+ minHeight: props.$minHeight,
347
+ maxHeight: props.$maxHeight,
348
+ color: props.$color,
349
+ background: props.$background,
350
+ fontSize: props.$fontSize,
351
+ fontWeight: props.$fontWeight,
352
+ lineHeight: props.$lineHeight,
353
+ borderRadius: props.$hasRadius ? theme.borderRadius : props.$borderRadius,
354
+ borderStyle: props.$borderColor && !props.$borderStyle ? "solid" : props.$borderStyle,
355
+ borderWidth: props.$borderColor && !props.$borderWidth ? "1px" : props.$borderWidth,
356
+ borderColor: props.$borderColor,
357
+ zIndex: props.$zIndex,
358
+ boxShadow: props.$shadow,
359
+ display: props.$display,
360
+ pointerEvents: props.$pointerEvents,
361
+ cursor: props.$cursor,
362
+ textAlign: props.$textAlign,
363
+ textTransform: props.$textTransform,
364
+ transition: props.$transition,
365
+ transform: props.$transform,
366
+ animation: props.$animation,
367
+ position: props.$position,
368
+ overflow: props.$overflow,
369
+ flex: props.$flex,
370
+ flexShrink: props.$shrink,
371
+ flexGrow: props.$grow,
372
+ flexBasis: props.$basis
373
+ },
374
+ theme
375
+ );
235
376
  }};
236
-
237
- // Shadows
238
- box-shadow: ${({ theme, $shadow }) => extractStyleFromTheme(theme.shadows, $shadow, void 0)};
239
-
240
- // Handlers
241
- pointer-events: ${({ $pointerEvents }) => $pointerEvents};
242
-
243
- // Display
244
- display: ${({ $display }) => $display};
245
-
246
- // Position
247
- position: ${({ $position }) => $position};
248
- left: ${({ $left, theme }) => extractStyleFromTheme(theme.spaces, $left, $left)};
249
- right: ${({ $right, theme }) => extractStyleFromTheme(theme.spaces, $right, $right)};
250
- top: ${({ $top, theme }) => extractStyleFromTheme(theme.spaces, $top, $top)};
251
- bottom: ${({ $bottom, theme }) => extractStyleFromTheme(theme.spaces, $bottom, $bottom)};
252
- z-index: ${({ $zIndex, theme }) => extractStyleFromTheme(theme.zIndices, $zIndex, $zIndex)};
253
- overflow: ${({ $overflow }) => $overflow};
254
-
255
- // Size
256
- width: ${({ $width, theme }) => extractStyleFromTheme(theme.spaces, $width, $width)};
257
- max-width: ${({ $maxWidth, theme }) => extractStyleFromTheme(theme.spaces, $maxWidth, $maxWidth)};
258
- min-width: ${({ $minWidth, theme }) => extractStyleFromTheme(theme.spaces, $minWidth, $minWidth)};
259
- height: ${({ $height, theme }) => extractStyleFromTheme(theme.spaces, $height, $height)};
260
- max-height: ${({ $maxHeight, theme }) => extractStyleFromTheme(theme.spaces, $maxHeight, $maxHeight)};
261
- min-height: ${({ $minHeight, theme }) => extractStyleFromTheme(theme.spaces, $minHeight, $minHeight)};
262
-
263
- // Animation
264
- transition: ${({ $transition }) => $transition};
265
- transform: ${({ $transform }) => $transform};
266
- animation: ${({ $animation }) => $animation};
267
-
268
- //Flexbox children props
269
- flex-shrink: ${({ $shrink }) => $shrink};
270
- flex-grow: ${({ $grow }) => $grow};
271
- flex-basis: ${({ $basis }) => $basis};
272
- flex: ${({ $flex }) => $flex};
273
-
274
- // Text
275
- text-align: ${({ $textAlign }) => $textAlign};
276
- text-transform: ${({ $textTransform }) => $textTransform};
277
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
278
-
279
- // Cursor
280
- cursor: ${({ $cursor }) => $cursor};
281
377
  `;
282
378
  const Flex = forwardRef((props, ref) => {
283
- const { className, alignItems, direction, gap, inline, justifyContent, wrap, ...rest } = props;
379
+ const { className, alignItems, direction, inline, gap, justifyContent, wrap, ...rest } = props;
284
380
  const mappedProps = {
285
381
  $alignItems: alignItems,
286
382
  $direction: direction,
287
383
  $gap: gap,
288
- $inline: inline,
289
384
  $justifyContent: justifyContent,
290
- $wrap: wrap
385
+ $wrap: wrap,
386
+ $inline: inline
291
387
  };
292
388
  return /* @__PURE__ */ jsx(StyledFlex, { className, ref, ...mappedProps, ...rest });
293
389
  });
294
390
  const StyledFlex = styled(Box)`
295
- align-items: ${({ $alignItems = "center" }) => $alignItems};
296
- display: ${({ display = "flex", $inline }) => $inline ? "inline-flex" : display};
297
- flex-direction: ${({ $direction = "row" }) => $direction};
298
- flex-shrink: ${({ shrink }) => shrink};
299
- flex-wrap: ${({ $wrap }) => $wrap};
300
- ${({ $gap, theme }) => handleResponsiveValues("gap", $gap, theme)};
301
- justify-content: ${({ $justifyContent }) => $justifyContent};
391
+ ${({ theme, $display = "flex", $alignItems = "center", $direction = "row", ...props }) => handleResponsiveValues(
392
+ {
393
+ gap: props.$gap,
394
+ alignItems: $alignItems,
395
+ justifyContent: props.$justifyContent,
396
+ flexWrap: props.$wrap,
397
+ flexDirection: $direction,
398
+ display: props.$inline ? "inline-flex" : $display
399
+ },
400
+ theme
401
+ )};
302
402
  `;
303
403
  const ALPHA = "alpha";
304
404
  const BETA = "beta";
@@ -373,26 +473,24 @@ const Typography = forwardRef(
373
473
  (props, ref) => {
374
474
  const {
375
475
  ellipsis: ellipsis2,
376
- fontSize,
377
- fontWeight,
378
- lineHeight,
379
- textAlign,
380
476
  textColor = "currentcolor",
381
477
  textDecoration,
382
478
  textTransform,
383
479
  variant: variant2,
480
+ lineHeight,
481
+ fontWeight,
482
+ fontSize,
384
483
  ...rest
385
484
  } = props;
386
485
  const mappedProps = {
387
486
  $ellipsis: ellipsis2,
388
- $fontSize: fontSize,
389
- $fontWeight: fontWeight,
390
- $lineHeight: lineHeight,
391
- $textAlign: textAlign,
392
487
  $textColor: textColor,
393
488
  $textDecoration: textDecoration,
394
489
  $textTransform: textTransform,
395
- $variant: variant2
490
+ $variant: variant2,
491
+ $lineHeight: lineHeight,
492
+ $fontWeight: fontWeight,
493
+ $fontSize: fontSize
396
494
  };
397
495
  return /* @__PURE__ */ jsx(StyledTypography, { ref, tag: "span", ...mappedProps, ...rest });
398
496
  }
@@ -401,15 +499,19 @@ const StyledTypography = styled(Box)`
401
499
  ${variant}
402
500
  ${({ $ellipsis }) => $ellipsis ? ellipsis : ""}
403
501
 
404
- // These properties need to come after {variantStyle}, because they might
405
- // overwrite a variant attribute
406
- font-weight: ${({ theme, $fontWeight }) => extractStyleFromTheme(theme.fontWeights, $fontWeight, void 0)};
407
- font-size: ${({ theme, $fontSize }) => extractStyleFromTheme(theme.fontSizes, $fontSize, void 0)};
408
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
409
- color: ${({ theme, $textColor }) => extractStyleFromTheme(theme.colors, $textColor, $textColor)};
410
- text-align: ${({ $textAlign }) => $textAlign};
411
- text-decoration: ${({ $textDecoration }) => $textDecoration};
412
- text-transform: ${({ $textTransform }) => $textTransform};
502
+ ${({ theme, ...props }) => {
503
+ return handleResponsiveValues(
504
+ {
505
+ color: props.$textColor,
506
+ textDecoration: props.$textDecoration,
507
+ textTransform: props.$textTransform,
508
+ lineHeight: props.$lineHeight,
509
+ fontWeight: props.$fontWeight,
510
+ fontSize: props.$fontSize
511
+ },
512
+ theme
513
+ );
514
+ }}
413
515
  `;
414
516
  const [AccordionProvider, useAccordion] = createContext("Accordion");
415
517
  const Root$8 = React.forwardRef(({ children, size = "S", ...props }, forwardedRef) => {
@@ -431,30 +533,48 @@ const AccordionRoot = styled(RadixAccordion.Root)`
431
533
  `;
432
534
  const Item$5 = React.forwardRef((props, forwardedRef) => {
433
535
  const { size } = useAccordion("Item");
434
- return /* @__PURE__ */ jsx(AccordionItem, { $size: size, ref: forwardedRef, ...props });
536
+ return /* @__PURE__ */ jsx(AccordionItem, { $size: size, "data-size": size, ref: forwardedRef, ...props });
435
537
  });
436
538
  const AccordionItem = styled(RadixAccordion.Item)`
437
539
  overflow: hidden;
540
+ margin: 1px 0;
438
541
 
439
542
  &:first-child {
440
- border-top-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
441
- border-top-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
543
+ border-top-left-radius: 0.3rem;
544
+ border-top-right-radius: 0.3rem;
545
+ margin-top: 0;
442
546
  }
443
547
 
444
548
  &:last-child {
445
- border-bottom-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
446
- border-bottom-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
549
+ border-bottom-left-radius: 0.3rem;
550
+ border-bottom-right-radius: 0.3rem;
551
+ margin-bottom: 0;
552
+ }
553
+
554
+ &[data-size='S'] {
555
+ & + & {
556
+ border-top: solid 1px ${(props) => props.theme.colors.neutral200};
557
+ }
558
+ }
559
+
560
+ &[data-state='open'] {
561
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
447
562
  }
448
563
 
449
- & + & {
450
- border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
564
+ &:not([data-disabled]):hover {
565
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
451
566
  }
452
567
 
453
568
  /* This applies our desired focus effect correctly. */
454
569
  &:focus-within {
455
570
  position: relative;
456
571
  z-index: 1;
457
- box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
572
+ box-shadow: 0 0 0 1px ${(props) => props.theme.colors.primary600};
573
+ }
574
+
575
+ @media (prefers-reduced-motion: no-preference) {
576
+ transition: box-shadow ${(props) => props.theme.motion.timings["120"]}
577
+ ${(props) => props.theme.motion.easings.easeOutQuad};
458
578
  }
459
579
  `;
460
580
  const Trigger$7 = React.forwardRef(
@@ -463,7 +583,7 @@ const Trigger$7 = React.forwardRef(
463
583
  return /* @__PURE__ */ jsxs(AccordionTrigger, { $caretPosition: caretPosition, $size: size, ref: forwardedRef, ...restProps, children: [
464
584
  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,
465
585
  /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 2, children: [
466
- Icon ? /* @__PURE__ */ jsx(IconBox$4, { children: /* @__PURE__ */ jsx(Icon, {}) }) : null,
586
+ Icon && size === "S" ? /* @__PURE__ */ jsx(IconBox$4, { children: /* @__PURE__ */ jsx(Icon, {}) }) : null,
467
587
  /* @__PURE__ */ jsxs(Flex, { alignItems: "flex-start", direction: "column", tag: "span", ref: forwardedRef, children: [
468
588
  /* @__PURE__ */ jsx(
469
589
  Typography,
@@ -471,10 +591,11 @@ const Trigger$7 = React.forwardRef(
471
591
  fontWeight: size === "S" ? "bold" : void 0,
472
592
  ellipsis: true,
473
593
  variant: size === "M" ? "delta" : void 0,
594
+ textAlign: "left",
474
595
  children
475
596
  }
476
597
  ),
477
- description && size === "M" ? /* @__PURE__ */ jsx(Typography, { children: description }) : null
598
+ description && size === "M" ? /* @__PURE__ */ jsx(Typography, { textAlign: "left", children: description }) : null
478
599
  ] })
479
600
  ] }),
480
601
  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
@@ -483,6 +604,7 @@ const Trigger$7 = React.forwardRef(
483
604
  );
484
605
  const IconBox$4 = styled(Box)`
485
606
  color: ${(props) => props.theme.colors.neutral500};
607
+ display: flex;
486
608
 
487
609
  @media (prefers-reduced-motion: no-preference) {
488
610
  transition: ${(props) => props.theme.transitions.color};
@@ -1138,51 +1260,32 @@ const Base = styled(Flex)`
1138
1260
  `;
1139
1261
  }};
1140
1262
  `;
1141
- const BaseButton = forwardRef(
1142
- ({ disabled, children, ...props }, ref) => {
1143
- return /* @__PURE__ */ jsx(
1144
- BaseButtonWrapper,
1145
- {
1146
- ref,
1147
- "aria-disabled": disabled,
1148
- disabled,
1149
- tag: "button",
1150
- type: "button",
1151
- padding: 2,
1152
- hasRadius: true,
1153
- background: "neutral0",
1154
- borderColor: "neutral200",
1155
- cursor: "pointer",
1156
- ...props,
1157
- children
1158
- }
1159
- );
1160
- }
1161
- );
1162
- const BaseButtonWrapper = styled(Flex)`
1163
- &[aria-disabled='true'] {
1164
- pointer-events: none;
1165
- }
1166
-
1167
- ${focus}
1168
- `;
1169
- const BaseLink = forwardRef(
1170
- ({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
1263
+ const BaseLinkImpl = forwardRef(
1264
+ ({ href, disabled = false, isExternal = false, ...props }, ref) => {
1171
1265
  return /* @__PURE__ */ jsx(
1172
- Box,
1266
+ BaseLink,
1173
1267
  {
1174
1268
  tag: "a",
1175
1269
  ref,
1176
- target: isExternal ? "_blank" : target,
1177
- rel: isExternal ? rel : void 0,
1178
- href: disabled ? "#" : href,
1270
+ target: isExternal ? "_blank" : void 0,
1271
+ rel: isExternal ? "noreferrer noopener" : void 0,
1272
+ href,
1273
+ tabIndex: disabled ? -1 : void 0,
1179
1274
  "aria-disabled": disabled,
1180
- cursor: "pointer",
1275
+ pointerEvents: disabled ? "none" : void 0,
1276
+ cursor: disabled ? void 0 : "pointer",
1181
1277
  ...props
1182
1278
  }
1183
1279
  );
1184
1280
  }
1185
1281
  );
1282
+ const BaseLink = styled(Box)`
1283
+ text-decoration: none;
1284
+
1285
+ &:visited {
1286
+ color: inherit;
1287
+ }
1288
+ `;
1186
1289
  const Divider$1 = () => {
1187
1290
  return /* @__PURE__ */ jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
1188
1291
  };
@@ -1196,30 +1299,34 @@ const AlignedList = styled(Flex)`
1196
1299
  margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
1197
1300
  }
1198
1301
  `;
1199
- const Breadcrumbs = ({ label, children, ...props }) => {
1200
- const childrenArray = React.Children.toArray(children);
1201
- return /* @__PURE__ */ jsx(Box, { "aria-label": label, tag: "nav", ...props, children: /* @__PURE__ */ jsx(AlignedList, { tag: "ol", children: React.Children.map(childrenArray, (child, index) => {
1202
- const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1203
- return /* @__PURE__ */ jsxs(Flex, { inline: true, tag: "li", children: [
1204
- child,
1205
- shouldDisplayDivider && /* @__PURE__ */ jsx(Divider$1, {})
1206
- ] });
1207
- }) }) });
1208
- };
1209
- Breadcrumbs.displayName = "Breadcrumbs";
1210
- const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsx(
1211
- Typography,
1212
- {
1213
- variant: "pi",
1214
- textColor: "neutral800",
1215
- fontWeight: isCurrent ? "bold" : "regular",
1216
- "aria-current": isCurrent,
1217
- ...props,
1218
- children
1302
+ const Breadcrumbs = React.forwardRef(
1303
+ ({ label, children, ...props }, forwardedRef) => {
1304
+ const childrenArray = React.Children.toArray(children);
1305
+ return /* @__PURE__ */ jsx(Box, { "aria-label": label, tag: "nav", ...props, ref: forwardedRef, children: /* @__PURE__ */ jsx(AlignedList, { tag: "ol", children: React.Children.map(childrenArray, (child, index) => {
1306
+ const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1307
+ return /* @__PURE__ */ jsxs(Flex, { inline: true, tag: "li", children: [
1308
+ child,
1309
+ shouldDisplayDivider && /* @__PURE__ */ jsx(Divider$1, {})
1310
+ ] });
1311
+ }) }) });
1219
1312
  }
1220
- ) });
1313
+ );
1314
+ Breadcrumbs.displayName = "Breadcrumbs";
1315
+ const Crumb = React.forwardRef(
1316
+ ({ children, isCurrent = false, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, ref: forwardedRef, children: /* @__PURE__ */ jsx(
1317
+ Typography,
1318
+ {
1319
+ variant: "pi",
1320
+ textColor: "neutral800",
1321
+ fontWeight: isCurrent ? "bold" : "regular",
1322
+ "aria-current": isCurrent,
1323
+ ...props,
1324
+ children
1325
+ }
1326
+ ) })
1327
+ );
1221
1328
  Crumb.displayName = "Crumb";
1222
- const StyledLink = styled(BaseLink)`
1329
+ const StyledLink = styled(BaseLinkImpl)`
1223
1330
  border-radius: ${({ theme }) => theme.borderRadius};
1224
1331
  color: ${({ theme }) => theme.colors.neutral600};
1225
1332
  font-size: ${({ theme }) => theme.fontSizes[1]};
@@ -1233,9 +1340,22 @@ const StyledLink = styled(BaseLink)`
1233
1340
  color: ${({ theme }) => theme.colors.neutral700};
1234
1341
  }
1235
1342
  `;
1236
- const CrumbLink = ({ children, ...props }) => /* @__PURE__ */ jsx(StyledLink, { ...props, children });
1343
+ const CrumbLink = React.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledLink, { ref: forwardedRef, ...props, children }));
1237
1344
  CrumbLink.displayName = "CrumbLink";
1238
1345
  const stripReactIdOfColon = (str) => str.replaceAll(":", "");
1346
+ function setRef(ref, value) {
1347
+ if (typeof ref === "function") {
1348
+ ref(value);
1349
+ } else if (ref !== null && ref !== void 0) {
1350
+ ref.current = value;
1351
+ }
1352
+ }
1353
+ function composeRefs(...refs) {
1354
+ return (node) => refs.forEach((ref) => setRef(ref, node));
1355
+ }
1356
+ function useComposedRefs(...refs) {
1357
+ return React.useCallback(composeRefs(...refs), refs);
1358
+ }
1239
1359
  const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
1240
1360
  const useIsomorphicLayoutEffect = isSSR() ? useEffect : useLayoutEffect;
1241
1361
  const useReactId = React["useId".toString()] || (() => void 0);
@@ -1285,7 +1405,7 @@ const DANGER = "danger";
1285
1405
  const SUCCESS = "success";
1286
1406
  const GHOST = "ghost";
1287
1407
  const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
1288
- const VARIANTS$1 = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1408
+ const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1289
1409
  const BUTTON_SIZES = ["S", "M", "L"];
1290
1410
  const getVariantColorName = (variant2) => {
1291
1411
  if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
@@ -1294,7 +1414,7 @@ const getVariantColorName = (variant2) => {
1294
1414
  if (variant2 === TERTIARY) {
1295
1415
  return "neutral";
1296
1416
  }
1297
- if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS$1.every((vari) => vari !== variant2)) {
1417
+ if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
1298
1418
  return "primary";
1299
1419
  }
1300
1420
  return `${variant2}`;
@@ -1304,6 +1424,7 @@ const getDisabledStyle = ({ theme }) => {
1304
1424
  border: 1px solid ${theme.colors.neutral200};
1305
1425
  background: ${theme.colors.neutral150};
1306
1426
  color: ${theme.colors.neutral600};
1427
+ cursor: default;
1307
1428
  `;
1308
1429
  };
1309
1430
  const getHoverStyle = ({ theme, $variant }) => {
@@ -1341,7 +1462,7 @@ const getActiveStyle = ({ theme, $variant }) => {
1341
1462
  color: ${theme.colors[`${getVariantColorName($variant)}600`]};
1342
1463
  `;
1343
1464
  }
1344
- if ($variant === TERTIARY) {
1465
+ if ($variant === TERTIARY || $variant === GHOST) {
1345
1466
  return css`
1346
1467
  background-color: ${theme.colors.neutral150};
1347
1468
  `;
@@ -1390,6 +1511,8 @@ const getVariantStyle = ({ theme, $variant }) => {
1390
1511
  }
1391
1512
  default: {
1392
1513
  return css`
1514
+ border: 1px solid ${theme.colors.buttonPrimary600};
1515
+ background: ${theme.colors.buttonPrimary600};
1393
1516
  color: ${theme.colors.buttonNeutral0};
1394
1517
  `;
1395
1518
  }
@@ -1422,21 +1545,22 @@ const Button = forwardRef(
1422
1545
  disabled: isDisabled,
1423
1546
  $size: size,
1424
1547
  $variant: variant2,
1548
+ tag: "button",
1425
1549
  onClick: handleClick,
1426
- alignItems: "center",
1427
- background: "buttonPrimary600",
1428
- borderColor: "buttonPrimary600",
1550
+ hasRadius: true,
1429
1551
  gap: 2,
1430
- inline: fullWidth,
1431
- justifyContent: fullWidth ? "center" : void 0,
1552
+ inline: true,
1553
+ alignItems: "center",
1554
+ justifyContent: "center",
1555
+ width: fullWidth ? "100%" : void 0,
1432
1556
  paddingLeft: 4,
1433
1557
  paddingRight: 4,
1434
- width: fullWidth ? "100%" : void 0,
1558
+ cursor: "pointer",
1435
1559
  ...props,
1436
1560
  children: [
1437
- (startIcon || loading) && /* @__PURE__ */ jsx(Box, { "aria-hidden": true, children: loading ? /* @__PURE__ */ jsx(LoaderAnimated, {}) : startIcon }),
1561
+ (startIcon || loading) && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: loading ? /* @__PURE__ */ jsx(LoaderAnimated, {}) : startIcon }),
1438
1562
  /* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
1439
- endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
1563
+ endIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: endIcon })
1440
1564
  ]
1441
1565
  }
1442
1566
  );
@@ -1454,20 +1578,10 @@ const LoaderAnimated = styled(Loader$1)`
1454
1578
  animation: ${rotation$2} 2s infinite linear;
1455
1579
  will-change: transform;
1456
1580
  `;
1457
- const ButtonWrapper = styled(BaseButton)`
1581
+ const ButtonWrapper = styled(Flex)`
1458
1582
  height: ${({ theme, $size }) => theme.sizes.button[$size]};
1459
-
1460
- svg {
1461
- height: 1.2rem;
1462
- }
1463
-
1464
- &[aria-disabled='true'] {
1465
- ${getDisabledStyle}
1466
-
1467
- &:active {
1468
- ${getDisabledStyle}
1469
- }
1470
- }
1583
+ text-decoration: none;
1584
+ ${getVariantStyle}
1471
1585
 
1472
1586
  &:hover {
1473
1587
  ${getHoverStyle}
@@ -1477,7 +1591,9 @@ const ButtonWrapper = styled(BaseButton)`
1477
1591
  ${getActiveStyle}
1478
1592
  }
1479
1593
 
1480
- ${getVariantStyle}
1594
+ &[aria-disabled='true'] {
1595
+ ${getDisabledStyle}
1596
+ }
1481
1597
 
1482
1598
  @media (prefers-reduced-motion: no-preference) {
1483
1599
  transition:
@@ -1486,76 +1602,220 @@ const ButtonWrapper = styled(BaseButton)`
1486
1602
  border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1487
1603
  }
1488
1604
  `;
1489
- const Link = forwardRef(
1490
- ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1491
- return /* @__PURE__ */ jsxs(LinkWrapper$2, { ref, href, disabled, isExternal, ...props, children: [
1492
- startIcon,
1493
- /* @__PURE__ */ jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
1494
- endIcon,
1495
- href && !endIcon && isExternal && /* @__PURE__ */ jsx(ExternalLink, {})
1496
- ] });
1605
+ const TooltipImpl = React.forwardRef(
1606
+ ({
1607
+ children,
1608
+ description,
1609
+ label,
1610
+ defaultOpen,
1611
+ open,
1612
+ onOpenChange,
1613
+ delayDuration = 500,
1614
+ disableHoverableContent,
1615
+ ...restProps
1616
+ }, forwardedRef) => {
1617
+ return /* @__PURE__ */ jsxs(
1618
+ Tooltip.Root,
1619
+ {
1620
+ defaultOpen,
1621
+ open,
1622
+ onOpenChange,
1623
+ delayDuration,
1624
+ disableHoverableContent,
1625
+ children: [
1626
+ /* @__PURE__ */ jsx(Tooltip.Trigger, { asChild: true, children }),
1627
+ /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(TooltipContent, { ref: forwardedRef, sideOffset: 8, ...restProps, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", children: label || description }) }) })
1628
+ ]
1629
+ }
1630
+ );
1497
1631
  }
1498
1632
  );
1499
- const LinkWrapper$2 = styled(BaseLink)`
1500
- display: inline-flex;
1501
- align-items: center;
1502
- text-decoration: none;
1503
- gap: ${({ theme }) => theme.spaces[2]};
1504
- pointer-events: ${({ disabled }) => disabled ? "none" : void 0};
1505
-
1506
- svg {
1507
- font-size: 1rem;
1508
-
1509
- path {
1510
- fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral600 : theme.colors.primary600};
1511
- }
1512
- }
1513
-
1514
- &:hover {
1515
- color: ${({ theme }) => theme.colors.primary500};
1516
- }
1633
+ const TooltipContent = styled(Tooltip.Content)`
1634
+ background-color: ${(props) => props.theme.colors.neutral900};
1635
+ color: ${(props) => props.theme.colors.neutral0};
1636
+ padding-inline: ${(props) => props.theme.spaces[2]};
1637
+ padding-block: ${(props) => props.theme.spaces[2]};
1638
+ border-radius: ${(props) => props.theme.borderRadius};
1639
+ z-index: ${(props) => props.theme.zIndices.tooltip};
1640
+ will-change: opacity;
1641
+ transform-origin: var(--radix-tooltip-content-transform-origin);
1517
1642
 
1518
- &:active {
1519
- color: ${({ theme }) => theme.colors.primary700};
1643
+ @media (prefers-reduced-motion: no-preference) {
1644
+ animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings["200"]}
1645
+ ${(props) => props.theme.motion.easings.authenticMotion};
1520
1646
  }
1521
-
1522
- ${focus};
1523
1647
  `;
1524
- const MenuRoot = DropdownMenu.Root;
1525
- const MenuTrigger = React.forwardRef(
1526
- ({ size, endIcon = /* @__PURE__ */ jsx(CaretDown, { width: "0.6rem", height: "0.4rem", "aria-hidden": true }), ...props }, ref) => {
1527
- return /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
1528
- Button,
1648
+ const IconButton = forwardRef(
1649
+ ({
1650
+ label,
1651
+ background,
1652
+ children,
1653
+ disabled = false,
1654
+ onClick,
1655
+ size = "S",
1656
+ variant: variant2 = "tertiary",
1657
+ withTooltip = true,
1658
+ ...restProps
1659
+ }, ref) => {
1660
+ const handleClick = (e) => {
1661
+ if (!disabled && onClick) {
1662
+ onClick(e);
1663
+ }
1664
+ };
1665
+ const component = /* @__PURE__ */ jsx(
1666
+ IconButtonWrapper,
1529
1667
  {
1668
+ "aria-disabled": disabled,
1669
+ background: disabled ? "neutral150" : background,
1670
+ tag: "button",
1671
+ display: "inline-flex",
1672
+ justifyContent: "center",
1673
+ hasRadius: true,
1674
+ cursor: "pointer",
1675
+ ...restProps,
1530
1676
  ref,
1531
- type: "button",
1532
- variant: "ghost",
1533
- endIcon,
1534
- paddingTop: size === "S" ? 1 : 2,
1535
- paddingBottom: size === "S" ? 1 : 2,
1536
- paddingLeft: size === "S" ? 3 : 4,
1537
- paddingRight: size === "S" ? 3 : 4,
1538
- ...props
1677
+ $size: size,
1678
+ onClick: handleClick,
1679
+ $variant: variant2,
1680
+ children: /* @__PURE__ */ jsx(AccessibleIcon, { label, children })
1539
1681
  }
1540
- ) });
1541
- }
1682
+ );
1683
+ return withTooltip ? /* @__PURE__ */ jsx(TooltipImpl, { label, children: component }) : component;
1684
+ }
1685
+ );
1686
+ const IconButtonWrapper = styled(Flex)`
1687
+ text-decoration: none;
1688
+
1689
+ ${(props) => {
1690
+ switch (props.$size) {
1691
+ case "S": {
1692
+ return css`
1693
+ padding-block: 0.7rem;
1694
+ padding-inline: 0.7rem;
1695
+ `;
1696
+ }
1697
+ case "M": {
1698
+ return css`
1699
+ padding-block: 0.9rem;
1700
+ padding-inline: 0.9rem;
1701
+ `;
1702
+ }
1703
+ case "L": {
1704
+ return css`
1705
+ padding-block: 1.1rem;
1706
+ padding-inline: 1.1rem;
1707
+ `;
1708
+ }
1709
+ }
1710
+ }}
1711
+ ${getVariantStyle}
1712
+ ${(props) => props.$variant === "tertiary" ? css`
1713
+ color: ${props.theme.colors.neutral500};
1714
+ ` : ""}
1715
+
1716
+ &:hover {
1717
+ ${getHoverStyle}
1718
+ ${(props) => props.$variant === "tertiary" ? css`
1719
+ color: ${props.theme.colors.neutral600};
1720
+ ` : ""}
1721
+ }
1722
+
1723
+ &:active {
1724
+ ${getActiveStyle}
1725
+ }
1726
+
1727
+ &[aria-disabled='true'] {
1728
+ ${getDisabledStyle}
1729
+ }
1730
+
1731
+ @media (prefers-reduced-motion: no-preference) {
1732
+ transition:
1733
+ ${(props) => props.theme.transitions.backgroundColor},
1734
+ ${(props) => props.theme.transitions.color},
1735
+ border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1736
+ }
1737
+ `;
1738
+ const IconButtonGroup = styled(Flex)`
1739
+ & ${IconButtonWrapper}:first-child {
1740
+ border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
1741
+ }
1742
+
1743
+ & ${IconButtonWrapper}:last-child {
1744
+ border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
1745
+ }
1746
+
1747
+ & ${IconButtonWrapper} {
1748
+ border-radius: 0;
1749
+
1750
+ & + ${IconButtonWrapper} {
1751
+ border-left: none;
1752
+ }
1753
+ }
1754
+ `;
1755
+ const Link = forwardRef(
1756
+ ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1757
+ return /* @__PURE__ */ jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
1758
+ startIcon,
1759
+ /* @__PURE__ */ jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
1760
+ endIcon,
1761
+ href && !endIcon && isExternal && /* @__PURE__ */ jsx(ExternalLink, {})
1762
+ ] });
1763
+ }
1764
+ );
1765
+ const LinkWrapper$1 = styled(BaseLinkImpl)`
1766
+ display: inline-flex;
1767
+ align-items: center;
1768
+ text-decoration: none;
1769
+ gap: ${({ theme }) => theme.spaces[2]};
1770
+ pointer-events: ${({ disabled }) => disabled ? "none" : void 0};
1771
+
1772
+ svg {
1773
+ font-size: 1rem;
1774
+
1775
+ path {
1776
+ fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral600 : theme.colors.primary600};
1777
+ }
1778
+ }
1779
+
1780
+ &:hover {
1781
+ & > span {
1782
+ color: ${({ theme }) => theme.colors.primary500};
1783
+ }
1784
+ }
1785
+
1786
+ &:active {
1787
+ color: ${({ theme }) => theme.colors.primary700};
1788
+ }
1789
+
1790
+ ${focus};
1791
+ `;
1792
+ const MenuRoot = DropdownMenu.Root;
1793
+ const MenuTrigger = React.forwardRef(
1794
+ ({ label, endIcon = /* @__PURE__ */ jsx(CaretDown, { width: "1.2rem", height: "1.2rem", "aria-hidden": true }), tag = Button, icon, ...rest }, ref) => {
1795
+ const props = {
1796
+ ...rest,
1797
+ ref,
1798
+ type: "button"
1799
+ };
1800
+ return /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: tag === IconButton ? /* @__PURE__ */ jsx(IconButton, { label, variant: "tertiary", ...props, children: icon }) : /* @__PURE__ */ jsx(Button, { endIcon, variant: "ghost", ...props }) });
1801
+ }
1542
1802
  );
1543
1803
  const MenuContent = React.forwardRef(
1544
1804
  ({ children, intersectionId, popoverPlacement = "bottom-start", ...props }, ref) => {
1545
1805
  const [side, align] = popoverPlacement.split("-");
1546
- return /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(DropdownMenu.Content, { align, side, loop: true, asChild: true, children: /* @__PURE__ */ jsxs(
1806
+ return /* @__PURE__ */ jsx(DropdownMenu.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuContent, { align, side, loop: true, asChild: true, children: /* @__PURE__ */ jsxs(
1547
1807
  Viewport$2,
1548
1808
  {
1549
1809
  ref,
1550
1810
  direction: "column",
1551
- borderStyle: "solid",
1552
- borderWidth: "1px",
1553
1811
  borderColor: "neutral150",
1554
1812
  hasRadius: true,
1555
1813
  background: "neutral0",
1556
1814
  shadow: "filterShadow",
1557
1815
  maxHeight: "15rem",
1558
1816
  padding: 1,
1817
+ marginTop: 1,
1818
+ marginBottom: 1,
1559
1819
  alignItems: "flex-start",
1560
1820
  position: "relative",
1561
1821
  overflow: "auto",
@@ -1577,6 +1837,23 @@ const Viewport$2 = styled(Flex)`
1577
1837
  display: none;
1578
1838
  }
1579
1839
  `;
1840
+ const DropdownMenuContent = styled(DropdownMenu.Content)`
1841
+ @media (prefers-reduced-motion: no-preference) {
1842
+ animation-duration: ${(props) => props.theme.motion.timings["200"]};
1843
+
1844
+ &[data-state='open'] {
1845
+ animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
1846
+
1847
+ &[data-side='top'] {
1848
+ animation-name: ${ANIMATIONS.slideUpIn};
1849
+ }
1850
+
1851
+ &[data-side='bottom'] {
1852
+ animation-name: ${ANIMATIONS.slideDownIn};
1853
+ }
1854
+ }
1855
+ }
1856
+ `;
1580
1857
  const MenuItem$1 = ({ onSelect, disabled = false, isLink, ...props }) => {
1581
1858
  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 }) }) });
1582
1859
  };
@@ -1586,7 +1863,7 @@ const getOptionStyle = ({ theme }) => css`
1586
1863
  border-radius: ${theme.borderRadius};
1587
1864
  padding: ${theme.spaces[2]} ${theme.spaces[4]};
1588
1865
 
1589
- &[aria-disabled] {
1866
+ &[aria-disabled='true'] {
1590
1867
  cursor: not-allowed;
1591
1868
  color: ${theme.colors.neutral500};
1592
1869
  }
@@ -1691,37 +1968,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
1691
1968
  SubTrigger,
1692
1969
  Trigger: Trigger$6
1693
1970
  }, Symbol.toStringTag, { value: "Module" }));
1694
- const SimpleMenu = ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }) => {
1695
- const contentRef = React.useRef(null);
1696
- const [internalIsOpen, setInternalIsOpen] = React.useState(false);
1697
- const handleReachEnd = (entry) => {
1698
- if (onReachEnd) {
1699
- onReachEnd(entry);
1700
- }
1701
- };
1702
- const handleOpenChange = (isOpen) => {
1703
- if (isOpen && typeof onOpen === "function") {
1704
- onOpen();
1705
- } else if (!isOpen && typeof onClose === "function") {
1706
- onClose();
1707
- }
1708
- setInternalIsOpen(isOpen);
1709
- };
1710
- const generatedId = useId();
1711
- const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
1712
- useIntersection(contentRef, handleReachEnd, {
1713
- selectorToWatch: `#${intersectionId}`,
1714
- /**
1715
- * We need to know when the select is open because only then will viewportRef
1716
- * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
1717
- */
1718
- skipWhen: !internalIsOpen
1719
- });
1720
- return /* @__PURE__ */ jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
1721
- /* @__PURE__ */ jsx(Trigger$6, { ...props, children: props.label }),
1722
- /* @__PURE__ */ jsx(Content$6, { intersectionId, popoverPlacement, children })
1723
- ] });
1724
- };
1971
+ const SimpleMenu = React.forwardRef(
1972
+ ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {
1973
+ const triggerRef = React.useRef(null);
1974
+ const composedRef = useComposedRefs(forwardedRef, triggerRef);
1975
+ const contentRef = React.useRef(null);
1976
+ const [internalIsOpen, setInternalIsOpen] = React.useState(false);
1977
+ const handleReachEnd = (entry) => {
1978
+ if (onReachEnd) {
1979
+ onReachEnd(entry);
1980
+ }
1981
+ };
1982
+ const handleOpenChange = (isOpen) => {
1983
+ if (isOpen && typeof onOpen === "function") {
1984
+ onOpen();
1985
+ } else if (!isOpen && typeof onClose === "function") {
1986
+ onClose();
1987
+ }
1988
+ setInternalIsOpen(isOpen);
1989
+ };
1990
+ const generatedId = useId();
1991
+ const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
1992
+ useIntersection(contentRef, handleReachEnd, {
1993
+ selectorToWatch: `#${intersectionId}`,
1994
+ /**
1995
+ * We need to know when the select is open because only then will viewportRef
1996
+ * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
1997
+ */
1998
+ skipWhen: !internalIsOpen
1999
+ });
2000
+ return /* @__PURE__ */ jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
2001
+ /* @__PURE__ */ jsx(Trigger$6, { ref: composedRef, ...props, children: props.label }),
2002
+ /* @__PURE__ */ jsx(Content$6, { ref: contentRef, intersectionId, popoverPlacement, children })
2003
+ ] });
2004
+ }
2005
+ );
1725
2006
  const MenuItem = Item$3;
1726
2007
  const StyledButton = styled(SimpleMenu)`
1727
2008
  padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
@@ -1732,16 +2013,19 @@ const StyledButton = styled(SimpleMenu)`
1732
2013
  background-color: ${({ theme }) => theme.colors.neutral200};
1733
2014
  }
1734
2015
  `;
1735
- const CrumbSimpleMenu = ({ children, ...props }) => /* @__PURE__ */ jsx(StyledButton, { endIcon: null, size: "S", ...props, children });
2016
+ const CrumbSimpleMenu = React.forwardRef(
2017
+ ({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsx(StyledButton, { ref: forwardedRef, endIcon: null, size: "S", ...props, children })
2018
+ );
1736
2019
  CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
1737
2020
  const CardContext = React.createContext({ id: "" });
1738
2021
  const useCard = () => React.useContext(CardContext);
1739
- const Card = ({ id, ...props }) => {
2022
+ const Card = React.forwardRef(({ id, ...props }, forwardedRef) => {
1740
2023
  const generatedId = useId(id);
1741
2024
  const context = React.useMemo(() => ({ id: generatedId }), [generatedId]);
1742
2025
  return /* @__PURE__ */ jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
1743
2026
  Box,
1744
2027
  {
2028
+ ref: forwardedRef,
1745
2029
  id,
1746
2030
  tabIndex: 0,
1747
2031
  hasRadius: true,
@@ -1755,10 +2039,10 @@ const Card = ({ id, ...props }) => {
1755
2039
  ...props
1756
2040
  }
1757
2041
  ) });
1758
- };
1759
- const CardActionImpl = ({ position, ...restProps }) => {
1760
- return /* @__PURE__ */ jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
1761
- };
2042
+ });
2043
+ const CardActionImpl = React.forwardRef(({ position, ...restProps }, forwardedRef) => {
2044
+ return /* @__PURE__ */ jsx(CardAction, { ref: forwardedRef, $position: position, ...restProps, direction: "row", gap: 2 });
2045
+ });
1762
2046
  const CardAction = styled(Flex)`
1763
2047
  position: absolute;
1764
2048
  top: ${({ theme }) => theme.spaces[3]};
@@ -1809,30 +2093,17 @@ const CardBadge = (props) => /* @__PURE__ */ jsx(CardBadgeWrapper, { children: /
1809
2093
  const CardBody = (props) => {
1810
2094
  return /* @__PURE__ */ jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsx(Flex, { ...props, alignItems: "flex-start" }) });
1811
2095
  };
1812
- function setRef(ref, value) {
1813
- if (typeof ref === "function") {
1814
- ref(value);
1815
- } else if (ref !== null && ref !== void 0) {
1816
- ref.current = value;
1817
- }
1818
- }
1819
- function composeRefs(...refs) {
1820
- return (node) => refs.forEach((ref) => setRef(ref, node));
1821
- }
1822
- function useComposedRefs(...refs) {
1823
- return React.useCallback(composeRefs(...refs), refs);
1824
- }
1825
2096
  const CheckIcon = ({ fill, ...props }) => {
1826
2097
  const { colors } = useTheme();
1827
2098
  return /* @__PURE__ */ jsx(
1828
2099
  Box,
1829
2100
  {
1830
2101
  tag: "svg",
1831
- viewBox: "0 0 10 8",
2102
+ viewBox: "0 0 32 32",
1832
2103
  xmlns: "http://www.w3.org/2000/svg",
1833
2104
  fill: fill ? colors[fill] : void 0,
1834
2105
  ...props,
1835
- children: /* @__PURE__ */ jsx("path", { d: "M8.55323 0.396973C8.63135 0.316355 8.76051 0.315811 8.83931 0.395768L9.86256 1.43407C9.93893 1.51157 9.93935 1.6359 9.86349 1.7139L4.06401 7.67724C3.9859 7.75755 3.85707 7.75805 3.77834 7.67834L0.13866 3.99333C0.0617798 3.91549 0.0617102 3.79032 0.138504 3.7124L1.16213 2.67372C1.24038 2.59432 1.36843 2.59422 1.4468 2.67348L3.92174 5.17647L8.55323 0.396973Z" })
2106
+ children: /* @__PURE__ */ jsx("path", { d: "M29.0613 10.0613L13.0613 26.0613C12.9219 26.2011 12.7563 26.3121 12.574 26.3878C12.3917 26.4635 12.1962 26.5024 11.9988 26.5024C11.8013 26.5024 11.6059 26.4635 11.4235 26.3878C11.2412 26.3121 11.0756 26.2011 10.9363 26.0613L3.93626 19.0613C3.79673 18.9217 3.68605 18.7561 3.61053 18.5738C3.53502 18.3915 3.49615 18.1961 3.49615 17.9988C3.49615 17.8014 3.53502 17.606 3.61053 17.4237C3.68605 17.2414 3.79673 17.0758 3.93626 16.9363C4.07579 16.7967 4.24143 16.686 4.42374 16.6105C4.60604 16.535 4.80143 16.4962 4.99876 16.4962C5.19608 16.4962 5.39147 16.535 5.57378 16.6105C5.75608 16.686 5.92173 16.7967 6.06126 16.9363L12 22.875L26.9388 7.93876C27.2205 7.65697 27.6027 7.49866 28.0013 7.49866C28.3998 7.49866 28.782 7.65697 29.0638 7.93876C29.3455 8.22055 29.5039 8.60274 29.5039 9.00126C29.5039 9.39977 29.3455 9.78197 29.0638 10.0638L29.0613 10.0613Z" })
1836
2107
  }
1837
2108
  );
1838
2109
  };
@@ -1845,9 +2116,9 @@ const CheckboxEl = React.forwardRef(
1845
2116
  onChange: onCheckedChange
1846
2117
  });
1847
2118
  const composedRefs = useComposedRefs(checkboxRef, forwardedRef);
1848
- return /* @__PURE__ */ jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxs(Checkbox.Indicator, { children: [
1849
- checked === true ? /* @__PURE__ */ jsx(CheckIcon, { width: "1rem", fill: "neutral0" }) : null,
1850
- checked === "indeterminate" ? /* @__PURE__ */ jsx(Box, { height: "2px", width: "1rem", background: "neutral0", borderRadius: "1px" }) : null
2119
+ return /* @__PURE__ */ jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxs(Checkbox.Indicator, { style: { display: "inline-flex" }, children: [
2120
+ checked === true ? /* @__PURE__ */ jsx(CheckIcon, { width: "1.6rem", fill: "neutral0" }) : null,
2121
+ checked === "indeterminate" ? /* @__PURE__ */ jsx(Minus, { fill: "neutral0" }) : null
1851
2122
  ] }) });
1852
2123
  }
1853
2124
  );
@@ -1865,12 +2136,6 @@ const CheckboxRoot = styled(Checkbox.Root)`
1865
2136
  // this ensures the checkbox is always a square even in flex-containers.
1866
2137
  flex: 0 0 2rem;
1867
2138
 
1868
- @media (prefers-reduced-motion: no-preference) {
1869
- transition:
1870
- border-color ${(props) => props.theme.motion.timings["120"]} ${(props) => props.theme.motion.easings.easeOutQuad},
1871
- ${(props) => props.theme.transitions.backgroundColor};
1872
- }
1873
-
1874
2139
  &[data-state='checked'],
1875
2140
  &[data-state='indeterminate'] {
1876
2141
  border: 1px solid ${(props) => props.theme.colors.primary600};
@@ -1904,10 +2169,10 @@ const CheckboxImpl = React.forwardRef(({ children, ...restProps }, forwardedRef)
1904
2169
  /* @__PURE__ */ jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
1905
2170
  ] });
1906
2171
  });
1907
- const CardCheckbox = (props) => {
2172
+ const CardCheckbox = React.forwardRef((props, forwardedRef) => {
1908
2173
  const { id } = useCard();
1909
- return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
1910
- };
2174
+ return /* @__PURE__ */ jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
2175
+ });
1911
2176
  const BreakBox = styled(Box)`
1912
2177
  word-break: break-all;
1913
2178
  `;
@@ -1959,49 +2224,6 @@ const KeyboardKeys = {
1959
2224
  BACKSPACE: "Backspace",
1960
2225
  CLEAR: "Clear"
1961
2226
  };
1962
- const TooltipImpl = React.forwardRef(
1963
- ({
1964
- children,
1965
- description,
1966
- label,
1967
- defaultOpen,
1968
- open,
1969
- onOpenChange,
1970
- delayDuration = 500,
1971
- disableHoverableContent,
1972
- ...restProps
1973
- }, forwardedRef) => {
1974
- return /* @__PURE__ */ jsxs(
1975
- Tooltip.Root,
1976
- {
1977
- defaultOpen,
1978
- open,
1979
- onOpenChange,
1980
- delayDuration,
1981
- disableHoverableContent,
1982
- children: [
1983
- /* @__PURE__ */ jsx(Tooltip.Trigger, { asChild: true, children }),
1984
- /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(TooltipContent, { ref: forwardedRef, sideOffset: 8, ...restProps, children: /* @__PURE__ */ jsx(Typography, { variant: "pi", fontWeight: "bold", children: label || description }) }) })
1985
- ]
1986
- }
1987
- );
1988
- }
1989
- );
1990
- const TooltipContent = styled(Tooltip.Content)`
1991
- background-color: ${(props) => props.theme.colors.neutral900};
1992
- color: ${(props) => props.theme.colors.neutral0};
1993
- padding-inline: ${(props) => props.theme.spaces[2]};
1994
- padding-block: ${(props) => props.theme.spaces[2]};
1995
- border-radius: ${(props) => props.theme.borderRadius};
1996
- z-index: ${(props) => props.theme.zIndices.tooltip};
1997
- will-change: opacity;
1998
- transform-origin: var(--radix-tooltip-content-transform-origin);
1999
-
2000
- @media (prefers-reduced-motion: no-preference) {
2001
- animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings["200"]}
2002
- ${(props) => props.theme.motion.easings.authenticMotion};
2003
- }
2004
- `;
2005
2227
  const CarouselGrid = styled(Box)`
2006
2228
  grid-template-columns: auto 1fr auto;
2007
2229
  grid-template-areas: 'startAction slides endAction';
@@ -2060,8 +2282,8 @@ const Carousel = React.forwardRef(
2060
2282
  position: "relative",
2061
2283
  children: [
2062
2284
  childrenArray && childrenArray.length > 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
2063
- /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onPrevious, $area: "startAction", ref: prevActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: previousLabel, children: /* @__PURE__ */ jsx(ChevronLeft, { width: "6px", height: "10px", fill: "neutral600" }) }) }),
2064
- /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onNext, $area: "endAction", ref: nextActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: nextLabel, children: /* @__PURE__ */ jsx(ChevronRight, { width: "6px", height: "10px", fill: "neutral600" }) }) })
2285
+ /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onPrevious, $area: "startAction", ref: prevActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: previousLabel, children: /* @__PURE__ */ jsx(ChevronLeft, { width: "1.6rem", height: "1.6rem", fill: "neutral600" }) }) }),
2286
+ /* @__PURE__ */ jsx(CarouselAction, { tag: "button", onClick: onNext, $area: "endAction", ref: nextActionRef, type: "button", children: /* @__PURE__ */ jsx(AccessibleIcon, { label: nextLabel, children: /* @__PURE__ */ jsx(ChevronRight, { width: "1.6rem", height: "1.6rem", fill: "neutral600" }) }) })
2065
2287
  ] }),
2066
2288
  /* @__PURE__ */ jsx(CarouselSlides, { "aria-live": "polite", paddingLeft: 2, paddingRight: 2, width: "100%", overflow: "hidden", children: childrenArray }),
2067
2289
  actions
@@ -2096,9 +2318,11 @@ const commonTheme = {
2096
2318
  },
2097
2319
  spaces: ["0px", "4px", "8px", "12px", "16px", "20px", "24px", "32px", "40px", "48px", "56px", "64px"],
2098
2320
  borderRadius: "4px",
2099
- mediaQueries: {
2100
- tablet: `@media (max-width: 1100px)`,
2101
- mobile: `@media (max-width: 550px)`
2321
+ breakpoints: {
2322
+ initial: "@media(min-width: 0px)",
2323
+ small: "@media(min-width: 520px)",
2324
+ medium: "@media(min-width: 768px)",
2325
+ large: "@media(min-width: 1080px)"
2102
2326
  },
2103
2327
  fontSizes: [`1.1rem`, `1.2rem`, `1.4rem`, "1.6rem", `1.8rem`, `3.2rem`],
2104
2328
  lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5],
@@ -2939,7 +3163,7 @@ lodash.exports;
2939
3163
  }
2940
3164
  var runInContext = function runInContext2(context) {
2941
3165
  context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2942
- var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
3166
+ 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;
2943
3167
  var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
2944
3168
  var coreJsData = context["__core-js_shared__"];
2945
3169
  var funcToString = funcProto.toString;
@@ -2965,7 +3189,7 @@ lodash.exports;
2965
3189
  }
2966
3190
  }();
2967
3191
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2968
- var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse;
3192
+ var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined$1, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
2969
3193
  var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
2970
3194
  var metaMap = WeakMap && new WeakMap();
2971
3195
  var realNames = {};
@@ -4711,7 +4935,7 @@ lodash.exports;
4711
4935
  return setWrapToString(result2, func, bitmask);
4712
4936
  }
4713
4937
  function createRound(methodName) {
4714
- var func = Math[methodName];
4938
+ var func = Math2[methodName];
4715
4939
  return function(number, precision) {
4716
4940
  number = toNumber(number);
4717
4941
  precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
@@ -7802,10 +8026,9 @@ const Label = React.forwardRef(({ children, action, ...props }, ref) => {
7802
8026
  return null;
7803
8027
  }
7804
8028
  return /* @__PURE__ */ jsxs(
7805
- Typography,
8029
+ TypographyLabel,
7806
8030
  {
7807
8031
  ref: composedRefs,
7808
- display: "flex",
7809
8032
  variant: "pi",
7810
8033
  textColor: "neutral800",
7811
8034
  fontWeight: "bold",
@@ -7813,6 +8036,7 @@ const Label = React.forwardRef(({ children, action, ...props }, ref) => {
7813
8036
  id: `${id}-label`,
7814
8037
  htmlFor: id,
7815
8038
  tag: "label",
8039
+ ellipsis: true,
7816
8040
  children: [
7817
8041
  children,
7818
8042
  required && /* @__PURE__ */ jsx(Typography, { "aria-hidden": true, lineHeight: "1em", textColor: "danger600", children: "*" }),
@@ -7821,6 +8045,9 @@ const Label = React.forwardRef(({ children, action, ...props }, ref) => {
7821
8045
  }
7822
8046
  );
7823
8047
  });
8048
+ const TypographyLabel = styled(Typography)`
8049
+ display: flex;
8050
+ `;
7824
8051
  const LabelAction = styled(Flex)`
7825
8052
  line-height: 0;
7826
8053
  color: ${({ theme }) => theme.colors.neutral500};
@@ -7845,11 +8072,24 @@ const Input$2 = React.forwardRef(
7845
8072
  ariaDescription = `${id}-hint`;
7846
8073
  }
7847
8074
  const hasError = Boolean(error);
8075
+ const endActionRef = React.useRef(null);
8076
+ const inputElementRef = React.useRef(null);
8077
+ const inputRef = useComposedRefs(inputElementRef, ref);
7848
8078
  const handleChange = (e) => {
7849
8079
  if (!disabled && onChange) {
7850
8080
  onChange(e);
7851
8081
  }
7852
8082
  };
8083
+ React.useLayoutEffect(() => {
8084
+ if (endActionRef.current && inputElementRef.current) {
8085
+ const endActionWidth = endActionRef.current.offsetWidth;
8086
+ const inputElement = inputElementRef.current;
8087
+ if (inputElement) {
8088
+ const inputPadding = endActionWidth + 8 + 16;
8089
+ inputElement.style.paddingRight = `${inputPadding}px`;
8090
+ }
8091
+ }
8092
+ }, [endAction]);
7853
8093
  return /* @__PURE__ */ jsxs(
7854
8094
  InputWrapper,
7855
8095
  {
@@ -7857,6 +8097,9 @@ const Input$2 = React.forwardRef(
7857
8097
  justifyContent: "space-between",
7858
8098
  $hasError: hasError || hasErrorProp,
7859
8099
  $disabled: disabled,
8100
+ $size: size,
8101
+ $hasLeftAction: Boolean(startAction),
8102
+ $hasRightAction: Boolean(endAction),
7860
8103
  className,
7861
8104
  children: [
7862
8105
  startAction,
@@ -7865,9 +8108,7 @@ const Input$2 = React.forwardRef(
7865
8108
  {
7866
8109
  id,
7867
8110
  name,
7868
- ref,
7869
- $hasLeftAction: Boolean(startAction),
7870
- $hasRightAction: Boolean(endAction),
8111
+ ref: inputRef,
7871
8112
  $size: size,
7872
8113
  "aria-describedby": ariaDescription,
7873
8114
  "aria-invalid": hasError || hasErrorProp,
@@ -7876,10 +8117,12 @@ const Input$2 = React.forwardRef(
7876
8117
  "data-disabled": disabled ? "" : void 0,
7877
8118
  onChange: handleChange,
7878
8119
  "aria-required": required || requiredProp,
8120
+ $hasLeftAction: Boolean(startAction),
8121
+ $hasRightAction: Boolean(endAction),
7879
8122
  ...props
7880
8123
  }
7881
8124
  ),
7882
- endAction
8125
+ endAction && /* @__PURE__ */ jsx(EndAction, { ref: endActionRef, children: endAction })
7883
8126
  ]
7884
8127
  }
7885
8128
  );
@@ -7898,23 +8141,6 @@ const InputElement = styled.input`
7898
8141
  width: 100%;
7899
8142
  background: inherit;
7900
8143
 
7901
- ${(props) => {
7902
- switch (props.$size) {
7903
- case "S":
7904
- return css`
7905
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7906
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7907
- padding-block: ${props.theme.spaces[1]};
7908
- `;
7909
- default:
7910
- return css`
7911
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7912
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7913
- padding-block: ${props.theme.spaces[2]};
7914
- `;
7915
- }
7916
- }};
7917
-
7918
8144
  ::placeholder {
7919
8145
  color: ${({ theme }) => theme.colors.neutral500};
7920
8146
  opacity: 1;
@@ -7929,17 +8155,42 @@ const InputElement = styled.input`
7929
8155
  outline: none;
7930
8156
  box-shadow: none;
7931
8157
  }
8158
+
8159
+ ${(props) => {
8160
+ switch (props.$size) {
8161
+ case "S":
8162
+ return css`
8163
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8164
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8165
+ padding-block: ${props.theme.spaces[1]};
8166
+ `;
8167
+ default:
8168
+ return css`
8169
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8170
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8171
+ padding-block: ${props.theme.spaces[2]};
8172
+ `;
8173
+ }
8174
+ }}
8175
+ `;
8176
+ const EndAction = styled(Flex)`
8177
+ position: absolute;
8178
+ right: ${({ theme }) => theme.spaces[4]};
8179
+ top: 50%;
8180
+ transform: translateY(-50%);
7932
8181
  `;
7933
8182
  const InputWrapper = styled(Flex)`
7934
8183
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
7935
8184
  border-radius: ${({ theme }) => theme.borderRadius};
7936
8185
  background: ${({ theme }) => theme.colors.neutral0};
7937
- ${inputFocusStyle()}
8186
+ padding-inline-start: ${({ $hasLeftAction, theme }) => $hasLeftAction ? theme.spaces[4] : 0};
8187
+ position: relative;
7938
8188
 
8189
+ ${inputFocusStyle()}
7939
8190
  ${({ theme, $disabled }) => $disabled ? css`
7940
8191
  color: ${theme.colors.neutral600};
7941
8192
  background: ${theme.colors.neutral150};
7942
- ` : void 0}
8193
+ ` : void 0};
7943
8194
  `;
7944
8195
  const Hint = () => {
7945
8196
  const { id, hint, error } = useField("Hint");
@@ -8034,6 +8285,7 @@ const CarouselActions = ({ horizontal = true, ...props }) => /* @__PURE__ */ jsx
8034
8285
  position: "absolute",
8035
8286
  width: "100%",
8036
8287
  bottom: 1,
8288
+ gap: 1,
8037
8289
  ...props
8038
8290
  }
8039
8291
  );
@@ -8220,7 +8472,7 @@ const Combobox = React.forwardRef(
8220
8472
  children: [
8221
8473
  /* @__PURE__ */ jsxs(Trigger$5, { $hasError: hasError, $size: size, className, children: [
8222
8474
  /* @__PURE__ */ jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8223
- startIcon ? /* @__PURE__ */ jsx(Box, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
8475
+ startIcon ? /* @__PURE__ */ jsx(Flex, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
8224
8476
  /* @__PURE__ */ jsx(
8225
8477
  TextInput$1,
8226
8478
  {
@@ -8254,7 +8506,7 @@ const Combobox = React.forwardRef(
8254
8506
  children: /* @__PURE__ */ jsx(Cross, {})
8255
8507
  }
8256
8508
  ) : null,
8257
- /* @__PURE__ */ jsx(DownIcon$1, { children: /* @__PURE__ */ jsx(CaretDown, {}) })
8509
+ /* @__PURE__ */ jsx(DownIcon$1, { children: /* @__PURE__ */ jsx(CaretDown, { fill: "neutral500" }) })
8258
8510
  ] })
8259
8511
  ] }),
8260
8512
  /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Content$5, { sideOffset: 4, children: /* @__PURE__ */ jsxs(Viewport$1, { ref: viewportRef, children: [
@@ -8343,6 +8595,7 @@ const DownIcon$1 = styled(Combobox$1.Icon)`
8343
8595
  background: transparent;
8344
8596
  padding: 0;
8345
8597
  color: ${({ theme }) => theme.colors.neutral600};
8598
+ display: flex;
8346
8599
 
8347
8600
  &[aria-disabled='true'] {
8348
8601
  cursor: inherit;
@@ -8366,11 +8619,11 @@ const Content$5 = styled(Combobox$1.Content)`
8366
8619
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8367
8620
 
8368
8621
  &[data-side='top'] {
8369
- animation-name: ${ANIMATIONS.slideDownIn};
8622
+ animation-name: ${ANIMATIONS.slideUpIn};
8370
8623
  }
8371
8624
 
8372
8625
  &[data-side='bottom'] {
8373
- animation-name: ${ANIMATIONS.slideUpIn};
8626
+ animation-name: ${ANIMATIONS.slideDownIn};
8374
8627
  }
8375
8628
  }
8376
8629
  }
@@ -8466,19 +8719,7 @@ const ContentImpl$1 = styled(AlertDialog.Content)`
8466
8719
  }
8467
8720
  `;
8468
8721
  const Header$1 = React.forwardRef(({ children, ...restProps }, forwardedRef) => {
8469
- return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(
8470
- Title$1,
8471
- {
8472
- tag: "h2",
8473
- ref: forwardedRef,
8474
- padding: 6,
8475
- justifyContent: "center",
8476
- variant: "h2",
8477
- fontWeight: "bold",
8478
- ...restProps,
8479
- children
8480
- }
8481
- ) });
8722
+ return /* @__PURE__ */ jsx(AlertDialog.Title, { asChild: true, children: /* @__PURE__ */ jsx(Title$1, { tag: "h2", variant: "beta", ref: forwardedRef, padding: 6, fontWeight: "bold", ...restProps, children }) });
8482
8723
  });
8483
8724
  const Title$1 = styled(Typography)`
8484
8725
  display: flex;
@@ -8652,8 +8893,7 @@ ${css`
8652
8893
  img,
8653
8894
  picture,
8654
8895
  video,
8655
- canvas,
8656
- svg {
8896
+ canvas {
8657
8897
  display: block;
8658
8898
  max-width: 100%;
8659
8899
  }
@@ -8798,7 +9038,7 @@ const SelectTrigger = React.forwardRef(
8798
9038
  ...restProps,
8799
9039
  children: [
8800
9040
  /* @__PURE__ */ jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8801
- startIcon && /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9041
+ startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
8802
9042
  children
8803
9043
  ] }),
8804
9044
  /* @__PURE__ */ jsxs(Flex, { tag: "span", gap: 3, children: [
@@ -8827,6 +9067,7 @@ const SelectTrigger = React.forwardRef(
8827
9067
  );
8828
9068
  const IconBox$2 = styled(Box)`
8829
9069
  border: none;
9070
+ display: flex;
8830
9071
 
8831
9072
  svg {
8832
9073
  height: 1.1rem;
@@ -8834,7 +9075,7 @@ const IconBox$2 = styled(Box)`
8834
9075
  }
8835
9076
 
8836
9077
  svg path {
8837
- fill: ${({ theme }) => theme.colors.neutral600};
9078
+ fill: ${({ theme }) => theme.colors.neutral500};
8838
9079
  }
8839
9080
  `;
8840
9081
  const StyledTrigger = styled(Flex)`
@@ -8857,7 +9098,7 @@ const StyledTrigger = styled(Flex)`
8857
9098
  }}
8858
9099
 
8859
9100
  &[aria-disabled='true'] {
8860
- color: ${(props) => props.theme.colors.neutral600};
9101
+ color: ${(props) => props.theme.colors.neutral500};
8861
9102
  }
8862
9103
 
8863
9104
  /* Required to ensure the below inputFocusStyles are adhered too */
@@ -8868,8 +9109,9 @@ const StyledTrigger = styled(Flex)`
8868
9109
  ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};
8869
9110
  `;
8870
9111
  const DownIcon = styled(Select.Icon)`
9112
+ display: flex;
8871
9113
  & > svg {
8872
- fill: ${({ theme }) => theme.colors.neutral600};
9114
+ fill: ${({ theme }) => theme.colors.neutral500};
8873
9115
  }
8874
9116
  `;
8875
9117
  const SelectValue = React.forwardRef(({ children, placeholder, ...restProps }, ref) => /* @__PURE__ */ jsx(ValueType, { ref, ellipsis: true, ...restProps, children: /* @__PURE__ */ jsx(StyledValue, { placeholder, children }) }));
@@ -8889,8 +9131,7 @@ const SelectContent = styled(Select.Content)`
8889
9131
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
8890
9132
  border-radius: ${({ theme }) => theme.borderRadius};
8891
9133
  min-width: var(--radix-select-trigger-width);
8892
- /* This is from the design-system figma file. */
8893
- max-height: 15rem;
9134
+ max-height: 15.6rem;
8894
9135
  z-index: ${({ theme }) => theme.zIndices.popover};
8895
9136
 
8896
9137
  @media (prefers-reduced-motion: no-preference) {
@@ -8901,11 +9142,11 @@ const SelectContent = styled(Select.Content)`
8901
9142
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8902
9143
 
8903
9144
  &[data-side='top'] {
8904
- animation-name: ${ANIMATIONS.slideDownIn};
9145
+ animation-name: ${ANIMATIONS.slideUpIn};
8905
9146
  }
8906
9147
 
8907
9148
  &[data-side='bottom'] {
8908
- animation-name: ${ANIMATIONS.slideUpIn};
9149
+ animation-name: ${ANIMATIONS.slideDownIn};
8909
9150
  }
8910
9151
  }
8911
9152
  }
@@ -9066,8 +9307,8 @@ const SingleSelect = React.forwardRef(
9066
9307
  const SingleSelectOption = React.forwardRef(
9067
9308
  ({ value, startIcon, children, ...restProps }, ref) => {
9068
9309
  return /* @__PURE__ */ jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
9069
- startIcon && /* @__PURE__ */ jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9070
- /* @__PURE__ */ jsx(Typography, { children: /* @__PURE__ */ jsx(ItemText, { children }) })
9310
+ startIcon && /* @__PURE__ */ jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
9311
+ /* @__PURE__ */ jsx(Typography, { lineHeight: "20px", width: "100%", children: /* @__PURE__ */ jsx(ItemText, { children }) })
9071
9312
  ] });
9072
9313
  }
9073
9314
  );
@@ -9563,7 +9804,7 @@ const DatePickerContentImpl = React.forwardRef(
9563
9804
  (props, forwardedRef) => {
9564
9805
  const { label = "Choose date", ...restProps } = props;
9565
9806
  const { onOpenChange, ...context } = useDatePickerContext(CONTENT_IMPL_NAME);
9566
- const { x, y, refs, strategy } = useFloating({
9807
+ const { x, y, refs, strategy, placement } = useFloating({
9567
9808
  strategy: "fixed",
9568
9809
  placement: "bottom-start",
9569
9810
  middleware: [
@@ -9610,6 +9851,7 @@ const DatePickerContentImpl = React.forwardRef(
9610
9851
  {
9611
9852
  ref: composedRefs,
9612
9853
  "data-state": context.open ? "open" : "closed",
9854
+ "data-side": placement.includes("top") ? "top" : "bottom",
9613
9855
  onContextMenu: (event) => event.preventDefault(),
9614
9856
  id: context.contentId,
9615
9857
  role: "dialog",
@@ -9634,6 +9876,22 @@ const ContentElement = styled(Box)`
9634
9876
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
9635
9877
  z-index: ${({ theme }) => theme.zIndices.popover};
9636
9878
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
9879
+
9880
+ @media (prefers-reduced-motion: no-preference) {
9881
+ animation-duration: ${(props) => props.theme.motion.timings["200"]};
9882
+
9883
+ &[data-state='open'] {
9884
+ animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
9885
+
9886
+ &[data-side='top'] {
9887
+ animation-name: ${ANIMATIONS.slideUpIn};
9888
+ }
9889
+
9890
+ &[data-side='bottom'] {
9891
+ animation-name: ${ANIMATIONS.slideDownIn};
9892
+ }
9893
+ }
9894
+ }
9637
9895
  `;
9638
9896
  const DATE_PICKER_CALENDAR_NAME = "DatePickerCalendar";
9639
9897
  const DatePickerCalendar = React.forwardRef(
@@ -10063,238 +10321,27 @@ const EmptyStateIconWrapper = styled(Box)`
10063
10321
  height: 8.8rem;
10064
10322
  }
10065
10323
  `;
10066
- const EmptyStateLayout = ({
10067
- icon,
10068
- content,
10069
- action,
10070
- hasRadius = true,
10071
- shadow = "tableShadow"
10072
- }) => {
10073
- return /* @__PURE__ */ jsxs(
10074
- Flex,
10075
- {
10076
- alignItems: "center",
10077
- direction: "column",
10078
- padding: 11,
10079
- background: "neutral0",
10080
- hasRadius,
10081
- shadow,
10082
- children: [
10083
- icon ? /* @__PURE__ */ jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10084
- /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10085
- action
10086
- ]
10087
- }
10088
- );
10089
- };
10090
- const getFocusableNodes = (node, includeNegativeTabIndex) => {
10091
- const nodes = [
10092
- ...node.querySelectorAll(
10093
- 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
10094
- )
10095
- ];
10096
- const focusables = nodes.filter((node2) => {
10097
- if (node2.hasAttribute("disabled"))
10098
- return false;
10099
- if (includeNegativeTabIndex)
10100
- return true;
10101
- return node2.getAttribute("tabindex") !== "-1";
10102
- });
10103
- return focusables;
10104
- };
10105
- const getFocusableNodesWithKeyboardNav = (nodes) => {
10106
- return nodes.filter((node) => {
10107
- if (node.tagName === "INPUT") {
10108
- return node.type !== "checkbox" && node.type !== "radio";
10109
- }
10110
- return false;
10111
- });
10112
- };
10113
- const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
10114
- const trappedRef = React.useRef(null);
10115
- React.useEffect(() => {
10116
- let currentFocus = null;
10117
- if (restoreFocus) {
10118
- currentFocus = document.activeElement;
10119
- }
10120
- return () => {
10121
- if (currentFocus) {
10122
- currentFocus.focus();
10123
- }
10124
- };
10125
- }, [restoreFocus]);
10126
- React.useEffect(() => {
10127
- if (!trappedRef.current || skipAutoFocus)
10128
- return;
10129
- const focusableChildren = getFocusableNodes(trappedRef.current);
10130
- if (focusableChildren.length > 0) {
10131
- const firstElement = focusableChildren[0];
10132
- firstElement.focus();
10133
- } else {
10134
- console.warn(
10135
- "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
10136
- );
10137
- }
10138
- }, [skipAutoFocus]);
10139
- const handleKeyDown = (e) => {
10140
- if (e.key === KeyboardKeys.ESCAPE && onEscape) {
10141
- onEscape();
10142
- return;
10143
- }
10144
- if (e.key !== KeyboardKeys.TAB)
10145
- return;
10146
- const focusableChildren = getFocusableNodes(trappedRef.current);
10147
- if (focusableChildren.length > 0) {
10148
- const firstElement = focusableChildren[0];
10149
- const lastElement = focusableChildren[focusableChildren.length - 1];
10150
- if (e.shiftKey) {
10151
- if (firstElement === document.activeElement) {
10152
- e.preventDefault();
10153
- lastElement.focus();
10154
- }
10155
- } else if (lastElement === document.activeElement) {
10156
- e.preventDefault();
10157
- firstElement.focus();
10158
- }
10159
- }
10160
- };
10161
- return /* @__PURE__ */ jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
10162
- };
10163
- const Root$3 = forwardRef((props, forwardedRef) => {
10164
- const { gap = 0, gridCols = 12, ...rest } = props;
10165
- return /* @__PURE__ */ jsx(Wrapper$1, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
10166
- });
10167
- const Wrapper$1 = styled(Box)`
10168
- display: grid;
10169
- grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
10170
- ${({ theme, $gap }) => handleResponsiveValues("gap", $gap, theme)}
10171
- `;
10172
- const ItemImpl = forwardRef(
10173
- ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
10174
- );
10175
- const Item$1 = styled(Box)`
10176
- grid-column: span ${({ $col }) => $col ?? 1};
10177
- max-width: 100%;
10178
-
10179
- ${({ theme }) => theme.mediaQueries.tablet} {
10180
- grid-column: span ${({ $s }) => $s};
10181
- }
10182
-
10183
- ${({ theme }) => theme.mediaQueries.mobile} {
10184
- grid-column: span ${({ $xs }) => $xs};
10185
- }
10186
- `;
10187
- const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10188
- __proto__: null,
10189
- Item: ItemImpl,
10190
- Root: Root$3
10191
- }, Symbol.toStringTag, { value: "Module" }));
10192
- const VARIANT_DEFAULT = "tertiary";
10193
- const VARIANT_SECONDARY = "secondary";
10194
- const SIZES = ["S", "M", "L"];
10195
- const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
10196
- const IconButton = forwardRef(
10197
- ({
10198
- label,
10199
- background,
10200
- children,
10201
- disabled = false,
10202
- onClick,
10203
- size = SIZES[0],
10204
- variant: variant2 = VARIANTS[0],
10205
- withTooltip = true,
10206
- ...restProps
10207
- }, ref) => {
10208
- const handleClick = (e) => {
10209
- if (!disabled && onClick) {
10210
- onClick(e);
10211
- }
10212
- };
10213
- const component = /* @__PURE__ */ jsx(
10214
- IconButtonWrapper,
10324
+ const EmptyStateLayout = React.forwardRef(
10325
+ ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10326
+ return /* @__PURE__ */ jsxs(
10327
+ Flex,
10215
10328
  {
10216
- "aria-disabled": disabled,
10217
- background: disabled ? "neutral150" : background,
10218
- justifyContent: "center",
10219
- ...restProps,
10220
- ref,
10221
- $size: size,
10222
- onClick: handleClick,
10223
- $variant: variant2,
10224
- children: /* @__PURE__ */ jsx(AccessibleIcon, { label, children })
10329
+ ref: forwardedRef,
10330
+ alignItems: "center",
10331
+ direction: "column",
10332
+ padding: 11,
10333
+ background: "neutral0",
10334
+ hasRadius,
10335
+ shadow,
10336
+ children: [
10337
+ icon ? /* @__PURE__ */ jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10338
+ /* @__PURE__ */ jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10339
+ action
10340
+ ]
10225
10341
  }
10226
10342
  );
10227
- return withTooltip ? /* @__PURE__ */ jsx(TooltipImpl, { label, children: component }) : component;
10228
10343
  }
10229
10344
  );
10230
- const IconButtonWrapper = styled(BaseButton)`
10231
- background-color: ${({ theme, $variant }) => {
10232
- if ($variant === VARIANT_SECONDARY) {
10233
- return theme.colors.primary100;
10234
- }
10235
- return void 0;
10236
- }};
10237
- border-color: ${({ theme, $variant }) => {
10238
- if ($variant === VARIANT_SECONDARY) {
10239
- return theme.colors.primary200;
10240
- }
10241
- return theme.colors.neutral200;
10242
- }};
10243
- height: ${({ theme, $size }) => theme.sizes.button[$size]};
10244
- width: ${({ theme, $size }) => theme.sizes.button[$size]};
10245
- color: ${({ theme, $variant }) => {
10246
- if ($variant === VARIANT_SECONDARY) {
10247
- return theme.colors.primary500;
10248
- }
10249
- return theme.colors.neutral500;
10250
- }};
10251
-
10252
- &:hover,
10253
- &:focus {
10254
- color: ${({ theme, $variant }) => {
10255
- if ($variant === VARIANT_SECONDARY) {
10256
- return theme.colors.primary600;
10257
- }
10258
- return theme.colors.neutral600;
10259
- }};
10260
- }
10261
-
10262
- &[aria-disabled='true'] {
10263
- color: ${({ theme }) => theme.colors.neutral600};
10264
- }
10265
- `;
10266
- const IconButtonGroup = styled(Flex)`
10267
- & ${IconButtonWrapper}:first-child {
10268
- border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
10269
- }
10270
-
10271
- & ${IconButtonWrapper}:last-child {
10272
- border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
10273
- }
10274
-
10275
- & ${IconButtonWrapper} {
10276
- border-radius: 0;
10277
- color: ${({ theme }) => theme.colors.neutral700};
10278
-
10279
- & + ${IconButtonWrapper} {
10280
- border-left: none;
10281
- }
10282
-
10283
- &:hover {
10284
- background-color: ${({ theme }) => theme.colors.neutral100};
10285
- color: ${({ theme }) => theme.colors.neutral800};
10286
- }
10287
-
10288
- &:active {
10289
- background-color: ${({ theme }) => theme.colors.neutral150};
10290
- color: ${({ theme }) => theme.colors.neutral900};
10291
- }
10292
-
10293
- &[aria-disabled='true'] {
10294
- color: ${({ theme }) => theme.colors.neutral600};
10295
- }
10296
- }
10297
- `;
10298
10345
  const addMarks = StateEffect.define();
10299
10346
  const filterMarks = StateEffect.define();
10300
10347
  const lineHighlightMark = Decoration.mark({
@@ -10472,72 +10519,29 @@ const JSONInputContainer = styled(Flex)`
10472
10519
  }
10473
10520
  `;
10474
10521
  const LinkButton = forwardRef(
10475
- ({ variant: variant2 = "default", startIcon, endIcon, disabled = false, children, size = "S", ...props }, ref) => {
10476
- const paddingX = size === "S" ? 2 : "10px";
10477
- const paddingY = 4;
10478
- return /* @__PURE__ */ jsxs(
10479
- LinkWrapper$1,
10522
+ ({ disabled, ...restProps }, ref) => {
10523
+ return /* @__PURE__ */ jsx(
10524
+ Button,
10480
10525
  {
10481
10526
  ref,
10482
- "aria-disabled": disabled,
10483
- $variant: variant2,
10484
- background: "buttonPrimary600",
10485
- borderColor: "buttonPrimary600",
10486
- hasRadius: true,
10487
- display: "inline-flex",
10488
- paddingBottom: paddingX,
10489
- paddingLeft: paddingY,
10490
- paddingRight: paddingY,
10491
- paddingTop: paddingX,
10492
- pointerEvents: disabled ? "none" : void 0,
10493
- ...props,
10494
- children: [
10495
- startIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: startIcon }),
10496
- /* @__PURE__ */ jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
10497
- endIcon && /* @__PURE__ */ jsx(Flex, { "aria-hidden": true, children: endIcon })
10498
- ]
10527
+ tag: BaseLinkImpl,
10528
+ tabIndex: disabled ? -1 : void 0,
10529
+ disabled,
10530
+ ...restProps
10499
10531
  }
10500
10532
  );
10501
10533
  }
10502
10534
  );
10503
- const LinkWrapper$1 = styled(BaseLink)`
10504
- gap: ${({ theme }) => theme.spaces[2]};
10505
-
10506
- ${focus}
10507
-
10508
- &[aria-disabled='true'] {
10509
- pointer-events: none;
10535
+ const MainWrapper = styled(Box)`
10536
+ // To prevent global outline on focus visible to force an outline when Main is focused
10537
+ &:focus-visible {
10538
+ outline: none;
10510
10539
  }
10511
-
10512
- text-decoration: none;
10513
-
10514
- &[aria-disabled='true'] {
10515
- ${getDisabledStyle}
10516
- &:active {
10517
- ${getDisabledStyle}
10518
- }
10519
- }
10520
-
10521
- &:hover {
10522
- ${getHoverStyle}
10523
- }
10524
-
10525
- &:active {
10526
- ${getActiveStyle}
10527
- }
10528
-
10529
- ${getVariantStyle}
10530
- `;
10531
- const MainWrapper = styled(Box)`
10532
- // To prevent global outline on focus visible to force an outline when Main is focused
10533
- &:focus-visible {
10534
- outline: none;
10535
- }
10536
- `;
10537
- const Main = ({ labelledBy = "main-content-title", ...props }) => {
10538
- return /* @__PURE__ */ jsx(MainWrapper, { "aria-labelledby": labelledBy, tag: "main", id: "main-content", tabIndex: -1, ...props });
10539
- };
10540
- const AnchorBox = styled(Box)`
10540
+ `;
10541
+ const Main = ({ labelledBy = "main-content-title", ...props }) => {
10542
+ return /* @__PURE__ */ jsx(MainWrapper, { "aria-labelledby": labelledBy, tag: "main", id: "main-content", tabIndex: -1, ...props });
10543
+ };
10544
+ const AnchorBox = styled(Box)`
10541
10545
  text-decoration: none;
10542
10546
 
10543
10547
  &:focus {
@@ -10563,6 +10567,7 @@ const SkipToContent = ({ children }) => {
10563
10567
  }
10564
10568
  );
10565
10569
  };
10570
+ const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
10566
10571
  const ScrollAreaImpl$1 = React.forwardRef(
10567
10572
  ({ children, viewportRef, ...restProps }, forwardedRef) => {
10568
10573
  return /* @__PURE__ */ jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
@@ -10617,22 +10622,18 @@ const Thumb = styled(ScrollArea.Thumb)`
10617
10622
  min-height: 44px;
10618
10623
  }
10619
10624
  `;
10620
- const Root$2 = Dialog$1.Root;
10625
+ const Root$3 = Dialog$1.Root;
10621
10626
  const Trigger$2 = React.forwardRef((props, forwardedRef) => {
10622
10627
  return /* @__PURE__ */ jsx(Dialog$1.Trigger, { ...props, asChild: true, ref: forwardedRef });
10623
10628
  });
10624
10629
  const Content$2 = React.forwardRef((props, forwardedRef) => {
10625
- return /* @__PURE__ */ jsxs(Dialog$1.Portal, { children: [
10626
- /* @__PURE__ */ jsx(Overlay, {}),
10627
- /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props })
10628
- ] });
10630
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, { children: /* @__PURE__ */ jsx(Overlay, { children: /* @__PURE__ */ jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
10629
10631
  });
10630
10632
  const Overlay = styled(Dialog$1.Overlay)`
10631
- background-color: ${(props) => props.theme.colors.neutral800};
10633
+ background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
10632
10634
  position: fixed;
10633
10635
  inset: 0;
10634
10636
  z-index: ${(props) => props.theme.zIndices.overlay};
10635
- opacity: 0.2;
10636
10637
 
10637
10638
  @media (prefers-reduced-motion: no-preference) {
10638
10639
  animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
@@ -10641,8 +10642,8 @@ const Overlay = styled(Dialog$1.Overlay)`
10641
10642
  `;
10642
10643
  const ContentImpl = styled(Dialog$1.Content)`
10643
10644
  max-width: 83rem;
10644
- max-height: 80vh;
10645
- height: min-content;
10645
+ max-height: 90vh;
10646
+ height: auto;
10646
10647
  width: 60%;
10647
10648
  overflow: hidden;
10648
10649
  margin: 0 auto;
@@ -10744,7 +10745,7 @@ const Modal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
10744
10745
  Content: Content$2,
10745
10746
  Footer,
10746
10747
  Header,
10747
- Root: Root$2,
10748
+ Root: Root$3,
10748
10749
  Title,
10749
10750
  Trigger: Trigger$2
10750
10751
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10931,7 +10932,7 @@ const NextLink = forwardRef(
10931
10932
  ] });
10932
10933
  }
10933
10934
  );
10934
- const LinkWrapper = styled(BaseLink)`
10935
+ const LinkWrapper = styled(BaseLinkImpl)`
10935
10936
  padding: ${({ theme }) => theme.spaces[3]};
10936
10937
  border-radius: ${({ theme }) => theme.borderRadius};
10937
10938
  box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
@@ -10980,7 +10981,7 @@ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxs(Box, { ...props, c
10980
10981
  /* @__PURE__ */ jsx(VisuallyHidden, { children }),
10981
10982
  /* @__PURE__ */ jsx(Typography, { "aria-hidden": true, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })
10982
10983
  ] });
10983
- const Root$1 = Popover$1.Root;
10984
+ const Root$2 = Popover$1.Root;
10984
10985
  const Trigger$1 = React.forwardRef((props, forwardedRef) => {
10985
10986
  return /* @__PURE__ */ jsx(Popover$1.Trigger, { ...props, asChild: true, ref: forwardedRef });
10986
10987
  });
@@ -10992,6 +10993,7 @@ const PopoverContent = styled(Popover$1.Content)`
10992
10993
  z-index: ${({ theme }) => theme.zIndices.popover};
10993
10994
  background-color: ${(props) => props.theme.colors.neutral0};
10994
10995
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
10996
+ border-radius: ${({ theme }) => theme.borderRadius};
10995
10997
 
10996
10998
  @media (prefers-reduced-motion: no-preference) {
10997
10999
  animation-duration: ${(props) => props.theme.motion.timings["200"]};
@@ -11000,11 +11002,11 @@ const PopoverContent = styled(Popover$1.Content)`
11000
11002
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
11001
11003
 
11002
11004
  &[data-side='top'] {
11003
- animation-name: ${ANIMATIONS.slideDownIn};
11005
+ animation-name: ${ANIMATIONS.slideUpIn};
11004
11006
  }
11005
11007
 
11006
11008
  &[data-side='bottom'] {
11007
- animation-name: ${ANIMATIONS.slideUpIn};
11009
+ animation-name: ${ANIMATIONS.slideDownIn};
11008
11010
  }
11009
11011
  }
11010
11012
 
@@ -11012,35 +11014,38 @@ const PopoverContent = styled(Popover$1.Content)`
11012
11014
  animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};
11013
11015
 
11014
11016
  &[data-side='top'] {
11015
- animation-name: ${ANIMATIONS.slideDownOut};
11017
+ animation-name: ${ANIMATIONS.slideUpOut};
11016
11018
  }
11017
11019
 
11018
11020
  &[data-side='bottom'] {
11019
- animation-name: ${ANIMATIONS.slideUpOut};
11021
+ animation-name: ${ANIMATIONS.slideDownOut};
11020
11022
  }
11021
11023
  }
11022
11024
  }
11023
11025
  `;
11024
- const ScrollAreaImpl = ({ children, intersectionId, onReachEnd, ...props }) => {
11025
- const popoverRef = React.useRef(null);
11026
- const generatedIntersectionId = useId();
11027
- useIntersection(popoverRef, onReachEnd ?? (() => {
11028
- }), {
11029
- selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
11030
- skipWhen: !intersectionId || !onReachEnd
11031
- });
11032
- return /* @__PURE__ */ jsxs(PopoverScrollArea, { ref: popoverRef, ...props, children: [
11033
- children,
11034
- intersectionId && onReachEnd && /* @__PURE__ */ jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
11035
- ] });
11036
- };
11026
+ const ScrollAreaImpl = React.forwardRef(
11027
+ ({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {
11028
+ const popoverRef = React.useRef(null);
11029
+ const composedRef = useComposedRefs(popoverRef, forwardedRef);
11030
+ const generatedIntersectionId = useId();
11031
+ useIntersection(popoverRef, onReachEnd ?? (() => {
11032
+ }), {
11033
+ selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
11034
+ skipWhen: !intersectionId || !onReachEnd
11035
+ });
11036
+ return /* @__PURE__ */ jsxs(PopoverScrollArea, { ref: composedRef, ...props, children: [
11037
+ children,
11038
+ intersectionId && onReachEnd && /* @__PURE__ */ jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
11039
+ ] });
11040
+ }
11041
+ );
11037
11042
  const PopoverScrollArea = styled(ScrollAreaImpl$1)`
11038
11043
  height: 20rem;
11039
11044
  `;
11040
11045
  const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11041
11046
  __proto__: null,
11042
11047
  Content: Content$1,
11043
- Root: Root$1,
11048
+ Root: Root$2,
11044
11049
  ScrollArea: ScrollAreaImpl,
11045
11050
  Trigger: Trigger$1
11046
11051
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11080,7 +11085,7 @@ const RadioGroupRoot = styled(RadioGroup.Root)`
11080
11085
  flex-direction: column;
11081
11086
  gap: ${(props) => props.theme.spaces[3]};
11082
11087
  `;
11083
- const Item = React.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11088
+ const Item$1 = React.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11084
11089
  const id = useId(idProp);
11085
11090
  return /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
11086
11091
  /* @__PURE__ */ jsx(RadioGroupItem, { id, ref: forwardedRef, ...restProps, children: /* @__PURE__ */ jsx(RadioGroupIndicator, {}) }),
@@ -11149,7 +11154,7 @@ const RadioGroupIndicator = styled(RadioGroup.Indicator)`
11149
11154
  const Radio = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11150
11155
  __proto__: null,
11151
11156
  Group,
11152
- Item
11157
+ Item: Item$1
11153
11158
  }, Symbol.toStringTag, { value: "Module" }));
11154
11159
  const focusFocusable = (node) => {
11155
11160
  const nextNode = node.querySelector('[tabindex="0"]');
@@ -11165,172 +11170,194 @@ const RawTableContext = React.createContext({
11165
11170
  }
11166
11171
  });
11167
11172
  const useTable = () => React.useContext(RawTableContext);
11168
- const RawTable = ({
11169
- colCount,
11170
- rowCount,
11171
- jumpStep = 3,
11172
- initialCol = 0,
11173
- initialRow = 0,
11174
- ...props
11175
- }) => {
11176
- const tableRef = React.useRef(null);
11177
- const mountedRef = React.useRef(false);
11178
- const [rowIndex, setRowIndex] = React.useState(initialRow);
11179
- const [colIndex, setColIndex] = React.useState(initialCol);
11180
- const setTableValues = React.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11181
- setColIndex(colIndex2);
11182
- setRowIndex(rowIndex2);
11183
- }, []);
11184
- React.useEffect(() => {
11185
- if (mountedRef.current) {
11186
- focusFocusable(tableRef.current);
11187
- }
11188
- if (!mountedRef.current) {
11189
- mountedRef.current = true;
11190
- }
11191
- }, [colIndex, rowIndex]);
11192
- const handleKeyDown = (e) => {
11193
- switch (e.key) {
11194
- case KeyboardKeys.RIGHT: {
11195
- e.preventDefault();
11196
- setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11197
- break;
11198
- }
11199
- case KeyboardKeys.LEFT: {
11200
- e.preventDefault();
11201
- setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11202
- break;
11203
- }
11204
- case KeyboardKeys.UP: {
11205
- e.preventDefault();
11206
- setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11207
- break;
11173
+ const RawTable = React.forwardRef(
11174
+ ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {
11175
+ const tableRef = React.useRef(null);
11176
+ const mountedRef = React.useRef(false);
11177
+ const composedRef = useComposedRefs(tableRef, forwardedRef);
11178
+ const [rowIndex, setRowIndex] = React.useState(initialRow);
11179
+ const [colIndex, setColIndex] = React.useState(initialCol);
11180
+ const setTableValues = React.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11181
+ setColIndex(colIndex2);
11182
+ setRowIndex(rowIndex2);
11183
+ }, []);
11184
+ React.useEffect(() => {
11185
+ if (mountedRef.current) {
11186
+ focusFocusable(tableRef.current);
11208
11187
  }
11209
- case KeyboardKeys.DOWN: {
11210
- e.preventDefault();
11211
- setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11212
- break;
11188
+ if (!mountedRef.current) {
11189
+ mountedRef.current = true;
11213
11190
  }
11214
- case KeyboardKeys.HOME: {
11215
- e.preventDefault();
11216
- if (e.ctrlKey) {
11217
- setRowIndex(0);
11191
+ }, [colIndex, rowIndex]);
11192
+ const handleKeyDown = (e) => {
11193
+ switch (e.key) {
11194
+ case KeyboardKeys.RIGHT: {
11195
+ e.preventDefault();
11196
+ setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11197
+ break;
11218
11198
  }
11219
- setColIndex(0);
11220
- break;
11221
- }
11222
- case KeyboardKeys.END: {
11223
- e.preventDefault();
11224
- if (e.ctrlKey) {
11225
- setRowIndex(rowCount - 1);
11199
+ case KeyboardKeys.LEFT: {
11200
+ e.preventDefault();
11201
+ setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11202
+ break;
11203
+ }
11204
+ case KeyboardKeys.UP: {
11205
+ e.preventDefault();
11206
+ setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11207
+ break;
11208
+ }
11209
+ case KeyboardKeys.DOWN: {
11210
+ e.preventDefault();
11211
+ setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11212
+ break;
11213
+ }
11214
+ case KeyboardKeys.HOME: {
11215
+ e.preventDefault();
11216
+ if (e.ctrlKey) {
11217
+ setRowIndex(0);
11218
+ }
11219
+ setColIndex(0);
11220
+ break;
11221
+ }
11222
+ case KeyboardKeys.END: {
11223
+ e.preventDefault();
11224
+ if (e.ctrlKey) {
11225
+ setRowIndex(rowCount - 1);
11226
+ }
11227
+ setColIndex(colCount - 1);
11228
+ break;
11229
+ }
11230
+ case KeyboardKeys.PAGE_DOWN: {
11231
+ e.preventDefault();
11232
+ setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11233
+ break;
11234
+ }
11235
+ case KeyboardKeys.PAGE_UP: {
11236
+ e.preventDefault();
11237
+ setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11238
+ break;
11226
11239
  }
11227
- setColIndex(colCount - 1);
11228
- break;
11229
- }
11230
- case KeyboardKeys.PAGE_DOWN: {
11231
- e.preventDefault();
11232
- setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11233
- break;
11234
11240
  }
11235
- case KeyboardKeys.PAGE_UP: {
11236
- e.preventDefault();
11237
- setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11238
- break;
11241
+ };
11242
+ const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11243
+ return /* @__PURE__ */ jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
11244
+ "table",
11245
+ {
11246
+ role: "grid",
11247
+ ref: composedRef,
11248
+ "aria-rowcount": rowCount,
11249
+ "aria-colcount": colCount,
11250
+ onKeyDown: handleKeyDown,
11251
+ ...props
11239
11252
  }
11240
- }
11241
- };
11242
- const context = React.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11243
- return /* @__PURE__ */ jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsx(
11244
- "table",
11245
- {
11246
- role: "grid",
11247
- ref: tableRef,
11248
- "aria-rowcount": rowCount,
11249
- "aria-colcount": colCount,
11250
- onKeyDown: handleKeyDown,
11251
- ...props
11252
- }
11253
- ) });
11253
+ ) });
11254
+ }
11255
+ );
11256
+ const getFocusableNodes = (node, includeNegativeTabIndex) => {
11257
+ const nodes = [
11258
+ ...node.querySelectorAll(
11259
+ 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
11260
+ )
11261
+ ];
11262
+ const focusables = nodes.filter((node2) => {
11263
+ if (node2.hasAttribute("disabled"))
11264
+ return false;
11265
+ if (includeNegativeTabIndex)
11266
+ return true;
11267
+ return node2.getAttribute("tabindex") !== "-1";
11268
+ });
11269
+ return focusables;
11254
11270
  };
11255
- const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
11256
- const tdRef = React.useRef(null);
11257
- const { rowIndex, colIndex, setTableValues } = useTable();
11258
- const [isActive, setIsActive] = React.useState(false);
11259
- const handleKeyDown = (e) => {
11260
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11261
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11262
- return;
11271
+ const getFocusableNodesWithKeyboardNav = (nodes) => {
11272
+ return nodes.filter((node) => {
11273
+ if (node.tagName === "INPUT") {
11274
+ return node.type !== "checkbox" && node.type !== "radio";
11263
11275
  }
11264
- if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11265
- e.preventDefault();
11266
- const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11267
- if (e.key === KeyboardKeys.RIGHT) {
11268
- const nextNode = focusableNodes[focussedButtonIndex + 1];
11269
- if (nextNode) {
11270
- e.stopPropagation();
11271
- nextNode.focus();
11272
- }
11273
- } else if (e.key === KeyboardKeys.LEFT) {
11274
- const nextNode = focusableNodes[focussedButtonIndex - 1];
11275
- if (nextNode) {
11276
- e.stopPropagation();
11277
- nextNode.focus();
11278
- }
11276
+ return false;
11277
+ });
11278
+ };
11279
+ const RawTd = React.forwardRef(
11280
+ ({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
11281
+ const tdRef = React.useRef(null);
11282
+ const composedRef = useComposedRefs(forwardedRef, tdRef);
11283
+ const { rowIndex, colIndex, setTableValues } = useTable();
11284
+ const [isActive, setIsActive] = React.useState(false);
11285
+ const handleKeyDown = (e) => {
11286
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11287
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11288
+ return;
11279
11289
  }
11280
- return;
11281
- }
11282
- const isEnterKey = e.key === KeyboardKeys.ENTER;
11283
- if (isEnterKey && !isActive) {
11284
- setIsActive(true);
11285
- } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11286
- if (isEnterKey && document.activeElement?.tagName === "A") {
11290
+ if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11291
+ e.preventDefault();
11292
+ const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11293
+ if (e.key === KeyboardKeys.RIGHT) {
11294
+ const nextNode = focusableNodes[focussedButtonIndex + 1];
11295
+ if (nextNode) {
11296
+ e.stopPropagation();
11297
+ nextNode.focus();
11298
+ }
11299
+ } else if (e.key === KeyboardKeys.LEFT) {
11300
+ const nextNode = focusableNodes[focussedButtonIndex - 1];
11301
+ if (nextNode) {
11302
+ e.stopPropagation();
11303
+ nextNode.focus();
11304
+ }
11305
+ }
11287
11306
  return;
11288
11307
  }
11289
- setIsActive(false);
11290
- tdRef.current.focus();
11291
- } else if (isActive) {
11292
- e.stopPropagation();
11293
- }
11294
- };
11295
- const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11296
- useIsomorphicLayoutEffect(() => {
11297
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11298
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11299
- tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11300
- focusableNodes.forEach((node, index) => {
11301
- node.setAttribute("tabIndex", isActive ? "0" : "-1");
11302
- if (isActive && index === 0) {
11303
- node.focus();
11308
+ const isEnterKey = e.key === KeyboardKeys.ENTER;
11309
+ if (isEnterKey && !isActive) {
11310
+ setIsActive(true);
11311
+ } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11312
+ if (isEnterKey && document.activeElement?.tagName === "A") {
11313
+ return;
11304
11314
  }
11305
- });
11306
- } else {
11315
+ setIsActive(false);
11316
+ tdRef.current.focus();
11317
+ } else if (isActive) {
11318
+ e.stopPropagation();
11319
+ }
11320
+ };
11321
+ const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11322
+ useIsomorphicLayoutEffect(() => {
11323
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11324
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11325
+ tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11326
+ focusableNodes.forEach((node, index) => {
11327
+ node.setAttribute("tabIndex", isActive ? "0" : "-1");
11328
+ if (isActive && index === 0) {
11329
+ node.focus();
11330
+ }
11331
+ });
11332
+ } else {
11333
+ focusableNodes.forEach((node) => {
11334
+ node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11335
+ });
11336
+ }
11337
+ }, [isActive, isFocused]);
11338
+ const handleFocusableNodeFocus = React.useCallback(() => {
11339
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11340
+ if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11341
+ setIsActive(true);
11342
+ }
11343
+ setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11344
+ }, [coords, setTableValues]);
11345
+ useIsomorphicLayoutEffect(() => {
11346
+ const cell = tdRef.current;
11347
+ const focusableNodes = getFocusableNodes(cell, true);
11307
11348
  focusableNodes.forEach((node) => {
11308
- node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11349
+ node.addEventListener("focus", handleFocusableNodeFocus);
11309
11350
  });
11310
- }
11311
- }, [isActive, isFocused]);
11312
- const handleFocusableNodeFocus = React.useCallback(() => {
11313
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11314
- if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11315
- setIsActive(true);
11316
- }
11317
- setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11318
- }, [coords, setTableValues]);
11319
- useIsomorphicLayoutEffect(() => {
11320
- const cell = tdRef.current;
11321
- const focusableNodes = getFocusableNodes(cell, true);
11322
- focusableNodes.forEach((node) => {
11323
- node.addEventListener("focus", handleFocusableNodeFocus);
11324
- });
11325
- return () => {
11326
- const focusableNodes2 = getFocusableNodes(cell, true);
11327
- focusableNodes2.forEach((node) => {
11328
- node.removeEventListener("focus", handleFocusableNodeFocus);
11329
- });
11330
- };
11331
- }, [handleFocusableNodeFocus]);
11332
- return /* @__PURE__ */ jsx(Box, { role: "gridcell", tag, ref: tdRef, onKeyDown: handleKeyDown, ...props });
11333
- };
11351
+ return () => {
11352
+ const focusableNodes2 = getFocusableNodes(cell, true);
11353
+ focusableNodes2.forEach((node) => {
11354
+ node.removeEventListener("focus", handleFocusableNodeFocus);
11355
+ });
11356
+ };
11357
+ }, [handleFocusableNodeFocus]);
11358
+ return /* @__PURE__ */ jsx(Box, { role: "gridcell", tag, ref: composedRef, onKeyDown: handleKeyDown, ...props });
11359
+ }
11360
+ );
11334
11361
  const RawTh = (props) => /* @__PURE__ */ jsx(RawTd, { ...props, tag: "th" });
11335
11362
  const RawThead = ({ children, ...props }) => {
11336
11363
  const childrenClone = React.Children.toArray(children).map((child) => {
@@ -11381,14 +11408,18 @@ const SearchbarWrapper = styled.div`
11381
11408
  &:focus-within {
11382
11409
  ${SearchIcon} {
11383
11410
  fill: ${({ theme }) => theme.colors.primary600};
11384
- path {
11385
- }
11386
11411
  }
11387
11412
  }
11388
11413
  `;
11389
11414
  const SearchbarInput = styled(Input$2)`
11390
11415
  border: 1px solid transparent;
11391
11416
 
11417
+ &:hover {
11418
+ button {
11419
+ cursor: pointer;
11420
+ }
11421
+ }
11422
+
11392
11423
  ${inputFocusStyle()}
11393
11424
  `;
11394
11425
  const Searchbar = React.forwardRef(
@@ -11408,7 +11439,17 @@ const Searchbar = React.forwardRef(
11408
11439
  ref: actualRef,
11409
11440
  value,
11410
11441
  startAction: /* @__PURE__ */ jsx(SearchIcon, { "aria-hidden": true }),
11411
- endAction: isCompleting ? /* @__PURE__ */ jsx(Action$1, { label: clearLabel, onClick: handleClear, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) : void 0,
11442
+ endAction: isCompleting ? /* @__PURE__ */ jsx(
11443
+ Action$1,
11444
+ {
11445
+ label: clearLabel,
11446
+ onClick: handleClear,
11447
+ onMouseDown: (e) => {
11448
+ e.preventDefault();
11449
+ },
11450
+ children: /* @__PURE__ */ jsx(CloseIcon, {})
11451
+ }
11452
+ ) : void 0,
11412
11453
  ...props
11413
11454
  }
11414
11455
  )
@@ -11416,47 +11457,60 @@ const Searchbar = React.forwardRef(
11416
11457
  }
11417
11458
  );
11418
11459
  const SearchForm = (props) => /* @__PURE__ */ jsx("form", { ...props, role: "search" });
11419
- const Tag = ({ children, icon, disabled = false, onClick, ...props }) => {
11460
+ const ButtonBox$1 = styled(Box)`
11461
+ display: inline-flex;
11462
+ border: none;
11463
+
11464
+ & > svg {
11465
+ height: 1.2rem;
11466
+ width: 1.2rem;
11467
+ }
11468
+
11469
+ & > svg path {
11470
+ fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11471
+ }
11472
+
11473
+ &:hover {
11474
+ cursor: ${({ $iconAction }) => $iconAction ? "pointer" : "initial"};
11475
+ }
11476
+ `;
11477
+ const Tag = ({ children, icon, label, disabled = false, onClick, ...props }) => {
11420
11478
  const handleClick = (e) => {
11421
11479
  if (disabled || !onClick)
11422
11480
  return;
11423
11481
  onClick(e);
11424
11482
  };
11425
11483
  return /* @__PURE__ */ jsxs(
11426
- TagWrapper,
11484
+ Flex,
11427
11485
  {
11428
- tag: "button",
11486
+ inline: true,
11429
11487
  background: disabled ? "neutral200" : "primary100",
11430
11488
  color: disabled ? "neutral700" : "primary600",
11431
11489
  paddingLeft: 3,
11432
- paddingRight: 3,
11433
- onClick: handleClick,
11434
- "aria-disabled": disabled,
11435
- disabled,
11436
- borderWidth: "1px",
11437
- borderStyle: "solid",
11490
+ paddingRight: 1,
11438
11491
  borderColor: disabled ? "neutral300" : "primary200",
11439
11492
  hasRadius: true,
11440
11493
  height: "3.2rem",
11441
- gap: 2,
11442
11494
  ...props,
11443
11495
  children: [
11444
11496
  /* @__PURE__ */ jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
11445
- icon
11497
+ /* @__PURE__ */ jsx(
11498
+ ButtonBox$1,
11499
+ {
11500
+ tag: "button",
11501
+ disabled,
11502
+ "aria-disabled": disabled,
11503
+ "aria-label": label,
11504
+ padding: 2,
11505
+ onClick: handleClick,
11506
+ $iconAction: !!onClick,
11507
+ children: icon
11508
+ }
11509
+ )
11446
11510
  ]
11447
11511
  }
11448
11512
  );
11449
11513
  };
11450
- const TagWrapper = styled(Flex)`
11451
- & > svg {
11452
- height: 0.8rem;
11453
- width: 0.8rem;
11454
- }
11455
-
11456
- & > svg path {
11457
- fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11458
- }
11459
- `;
11460
11514
  const TagText = styled(Typography)`
11461
11515
  color: inherit;
11462
11516
  border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
@@ -11522,7 +11576,17 @@ const MultiSelect = React.forwardRef(
11522
11576
  const value = typeof passedValue !== "undefined" && passedValue !== null ? passedValue : internalValue;
11523
11577
  const renderTags = (arg) => {
11524
11578
  if (arg && typeof arg === "object" && arg.value) {
11525
- return /* @__PURE__ */ jsx(Tag, { tabIndex: -1, disabled, icon: /* @__PURE__ */ jsx(Cross, {}), onClick: handleTagClick(arg.value), children: arg.textValue }, arg.value);
11579
+ return /* @__PURE__ */ jsx(
11580
+ Tag,
11581
+ {
11582
+ tabIndex: -1,
11583
+ disabled,
11584
+ icon: /* @__PURE__ */ jsx(Cross, { width: `${14 / 16}rem`, height: `${14 / 16}rem` }),
11585
+ onClick: handleTagClick(arg.value),
11586
+ children: arg.textValue
11587
+ },
11588
+ arg.value
11589
+ );
11526
11590
  }
11527
11591
  return null;
11528
11592
  };
@@ -11671,7 +11735,8 @@ const SubNavHeader = ({
11671
11735
  },
11672
11736
  onSubmit = () => {
11673
11737
  },
11674
- id
11738
+ id,
11739
+ placeholder
11675
11740
  }) => {
11676
11741
  const [isSearchOpen, setSearchOpen] = React.useState(false);
11677
11742
  const previousSearchOpenValue = usePrev(isSearchOpen);
@@ -11711,7 +11776,7 @@ const SubNavHeader = ({
11711
11776
  name: "searchbar",
11712
11777
  value,
11713
11778
  onChange,
11714
- placeholder: "e.g: strapi-plugin-abcd",
11779
+ placeholder,
11715
11780
  onKeyDown: handleKeyDown,
11716
11781
  ref: searchRef,
11717
11782
  onBlur: handleBlur,
@@ -11725,7 +11790,7 @@ const SubNavHeader = ({
11725
11790
  ] });
11726
11791
  }
11727
11792
  return /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
11728
- /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
11793
+ /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", width: "100%", gap: 2, children: [
11729
11794
  /* @__PURE__ */ jsx(Typography, { variant: "beta", tag, children: label }),
11730
11795
  searchable && /* @__PURE__ */ jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsx(Search, {}) })
11731
11796
  ] }),
@@ -11760,7 +11825,7 @@ const CustomBullet = styled.span`
11760
11825
  background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
11761
11826
  border-radius: 50%;
11762
11827
  `;
11763
- const SubNavLinkWrapper = styled(BaseLink)`
11828
+ const SubNavLinkWrapper = styled(BaseLinkImpl)`
11764
11829
  display: flex;
11765
11830
  align-items: center;
11766
11831
  justify-content: space-between;
@@ -12000,7 +12065,7 @@ const LabelTypography = styled(Typography)`
12000
12065
  }
12001
12066
  `;
12002
12067
  const [TabsProvider, useTabs] = createContext("Tabs");
12003
- const Root = React.forwardRef(
12068
+ const Root$1 = React.forwardRef(
12004
12069
  ({ disabled = false, variant: variant2 = "regular", hasError, ...props }, forwardedRef) => {
12005
12070
  return /* @__PURE__ */ jsx(TabsProvider, { disabled, hasError, variant: variant2, children: /* @__PURE__ */ jsx(TabsRoot, { ref: forwardedRef, ...props }) });
12006
12071
  }
@@ -12039,10 +12104,6 @@ const TabBar = styled.span`
12039
12104
  left: 0;
12040
12105
  opacity: 0;
12041
12106
  height: 0.2rem;
12042
-
12043
- @media (prefers-reduced-motion: no-preference) {
12044
- transition: ${(props) => `opacity 200ms ${props.theme.motion.easings.authenticMotion}`};
12045
- }
12046
12107
  `;
12047
12108
  const TriggerTypography = styled(Typography)``;
12048
12109
  const TabsTrigger = styled(Tabs$1.Trigger)`
@@ -12096,10 +12157,6 @@ const TabsTrigger = styled(Tabs$1.Trigger)`
12096
12157
  }
12097
12158
  }}
12098
12159
 
12099
- @media (prefers-reduced-motion: no-preference) {
12100
- transition: ${(props) => `${props.theme.transitions.color}, ${props.theme.transitions.backgroundColor}, box-shadow ${props.theme.motion.timings["120"]} ${props.theme.motion.easings.easeOutQuad}`};
12101
- }
12102
-
12103
12160
  &[data-disabled] {
12104
12161
  cursor: not-allowed;
12105
12162
  color: ${(props) => props.theme.colors.neutral400};
@@ -12126,7 +12183,7 @@ const Tabs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
12126
12183
  __proto__: null,
12127
12184
  Content,
12128
12185
  List,
12129
- Root,
12186
+ Root: Root$1,
12130
12187
  Trigger
12131
12188
  }, Symbol.toStringTag, { value: "Module" }));
12132
12189
  const TableContainer = styled(Box)`
@@ -12166,7 +12223,7 @@ const TableBox = styled(Box)`
12166
12223
  const ScrollContainer = styled(Box)`
12167
12224
  overflow-x: auto;
12168
12225
  `;
12169
- const Table = ({ footer, ...props }) => {
12226
+ const Table = React.forwardRef(({ footer, ...props }, forwardedRef) => {
12170
12227
  const tableRef = React.useRef(null);
12171
12228
  const [overflowing, setOverflowing] = React.useState();
12172
12229
  const handleScroll = (e) => {
@@ -12189,10 +12246,10 @@ const Table = ({ footer, ...props }) => {
12189
12246
  }
12190
12247
  }, []);
12191
12248
  return /* @__PURE__ */ jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
12192
- /* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ...props }) }) }),
12249
+ /* @__PURE__ */ jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsx(TableWrapper, { ref: forwardedRef, ...props }) }) }),
12193
12250
  footer
12194
12251
  ] });
12195
- };
12252
+ });
12196
12253
  const TbodyWrapper = styled(RawTbody)`
12197
12254
  & tr:last-of-type {
12198
12255
  border-bottom: none;
@@ -12233,7 +12290,6 @@ const Tr = (props) => {
12233
12290
  const CellWrapper = styled(RawTd)`
12234
12291
  vertical-align: middle;
12235
12292
  text-align: left;
12236
- color: ${({ theme }) => theme.colors.neutral600};
12237
12293
  outline-offset: -4px;
12238
12294
 
12239
12295
  /**
@@ -12243,15 +12299,15 @@ const CellWrapper = styled(RawTd)`
12243
12299
  vertical-align: sub;
12244
12300
  }
12245
12301
  `;
12246
- const Th = ({ children, action, ...props }) => {
12247
- return /* @__PURE__ */ jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
12302
+ const Th = React.forwardRef(({ children, action, ...props }, forwardedRef) => {
12303
+ return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral600", as: RawTh, ref: forwardedRef, ...props, children: /* @__PURE__ */ jsxs(Flex, { children: [
12248
12304
  children,
12249
12305
  action
12250
12306
  ] }) });
12251
- };
12252
- const Td = ({ children, ...props }) => {
12253
- return /* @__PURE__ */ jsx(CellWrapper, { ...props, children });
12254
- };
12307
+ });
12308
+ const Td = React.forwardRef(({ children, ...props }, forwardedRef) => {
12309
+ return /* @__PURE__ */ jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
12310
+ });
12255
12311
  const IconBox = styled(Box)`
12256
12312
  height: 2.4rem;
12257
12313
  width: 2.4rem;
@@ -12284,6 +12340,28 @@ const TFooter = ({ children, icon, ...props }) => {
12284
12340
  ] }) })
12285
12341
  ] });
12286
12342
  };
12343
+ const TextButton = forwardRef(
12344
+ ({ children, startIcon, endIcon, disabled = false, loading = false, ...props }, ref) => {
12345
+ const isDisabled = disabled || loading;
12346
+ return /* @__PURE__ */ jsxs(
12347
+ TextButtonWrapper,
12348
+ {
12349
+ ref,
12350
+ disabled: isDisabled,
12351
+ "aria-disabled": isDisabled,
12352
+ tag: "button",
12353
+ type: "button",
12354
+ gap: 2,
12355
+ ...props,
12356
+ children: [
12357
+ loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
12358
+ /* @__PURE__ */ jsx(Typography, { variant: "pi", children }),
12359
+ endIcon
12360
+ ]
12361
+ }
12362
+ );
12363
+ }
12364
+ );
12287
12365
  const rotation = keyframes`
12288
12366
  from {
12289
12367
  transform: rotate(0deg);
@@ -12292,51 +12370,24 @@ const rotation = keyframes`
12292
12370
  transform: rotate(359deg);
12293
12371
  }
12294
12372
  `;
12295
- const LoadingWrapper = styled.div`
12373
+ const LoadingWrapper = styled.span`
12374
+ display: flex;
12296
12375
  animation: ${rotation} 2s infinite linear;
12297
12376
  will-change: transform;
12298
12377
  `;
12299
12378
  const TextButtonWrapper = styled(Flex)`
12300
12379
  border: none;
12380
+ background-color: transparent;
12381
+ color: ${(props) => props.theme.colors.primary600};
12382
+ cursor: pointer;
12301
12383
 
12302
12384
  &[aria-disabled='true'] {
12303
12385
  pointer-events: none;
12304
- svg path {
12305
- fill: ${({ theme }) => theme.colors.neutral600};
12306
- }
12307
- }
12308
-
12309
- svg path {
12310
- fill: ${({ theme }) => theme.colors.primary600};
12386
+ color: ${(props) => props.theme.colors.neutral600};
12311
12387
  }
12312
12388
 
12313
12389
  ${focus}
12314
12390
  `;
12315
- const TextButton = React.forwardRef(
12316
- ({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
12317
- const handleClick = onClick && !disabled ? onClick : void 0;
12318
- const isDisabled = disabled || loading;
12319
- return /* @__PURE__ */ jsxs(
12320
- TextButtonWrapper,
12321
- {
12322
- ref,
12323
- "aria-disabled": isDisabled,
12324
- onClick: handleClick,
12325
- tag: "button",
12326
- type: "button",
12327
- background: "transparent",
12328
- gap: 2,
12329
- ...props,
12330
- children: [
12331
- loading ? /* @__PURE__ */ jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsx(Loader$1, {}) }) : startIcon,
12332
- /* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
12333
- endIcon
12334
- ]
12335
- }
12336
- );
12337
- }
12338
- );
12339
- TextButton.displayName = "TextButton";
12340
12391
  const TextInput = React.forwardRef((props, ref) => {
12341
12392
  return /* @__PURE__ */ jsx(Input$2, { ref, ...props });
12342
12393
  });
@@ -12354,7 +12405,7 @@ const Textarea = React.forwardRef(
12354
12405
  } else if (field.hint) {
12355
12406
  ariaDescription = `${id}-hint`;
12356
12407
  }
12357
- return /* @__PURE__ */ jsx(Wrapper, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsx(
12408
+ return /* @__PURE__ */ jsx(Wrapper$1, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsx(
12358
12409
  TextareaElement,
12359
12410
  {
12360
12411
  "aria-invalid": hasError,
@@ -12365,11 +12416,11 @@ const Textarea = React.forwardRef(
12365
12416
  disabled,
12366
12417
  fontSize: 2,
12367
12418
  hasRadius: true,
12368
- height: "10.5rem",
12369
12419
  ref,
12370
12420
  lineHeight: 4,
12371
12421
  padding: 4,
12372
12422
  width: "100%",
12423
+ height: "100%",
12373
12424
  id,
12374
12425
  name,
12375
12426
  "aria-describedby": ariaDescription,
@@ -12378,7 +12429,8 @@ const Textarea = React.forwardRef(
12378
12429
  ) });
12379
12430
  }
12380
12431
  );
12381
- const Wrapper = styled(Box)`
12432
+ const Wrapper$1 = styled(Box)`
12433
+ height: 10.5rem;
12382
12434
  ${inputFocusStyle()}
12383
12435
  `;
12384
12436
  const TextareaElement = styled(Box)`
@@ -12523,6 +12575,39 @@ const Input = styled.input`
12523
12575
  z-index: 0;
12524
12576
  width: 100%;
12525
12577
  `;
12578
+ const Root = forwardRef((props, forwardedRef) => {
12579
+ const { gap = 0, gridCols = 12, ...rest } = props;
12580
+ return /* @__PURE__ */ jsx(Wrapper, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
12581
+ });
12582
+ const Wrapper = styled(Box)`
12583
+ display: grid;
12584
+ grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
12585
+ ${({ theme, $gap }) => handleResponsiveValues({ gap: $gap }, theme)}
12586
+ `;
12587
+ const ItemImpl = forwardRef(
12588
+ ({ col, s, xs, m, ...props }, forwardedRef) => /* @__PURE__ */ jsx(Item, { ref: forwardedRef, $col: col, $s: s, $xs: xs, $m: m, ...props })
12589
+ );
12590
+ const Item = styled(Flex)`
12591
+ grid-column: span ${({ $xs }) => $xs ?? 12};
12592
+ max-width: 100%;
12593
+
12594
+ ${({ theme }) => theme.breakpoints.small} {
12595
+ grid-column: span ${({ $s, $xs }) => $s ?? $xs ?? 12};
12596
+ }
12597
+
12598
+ ${({ theme }) => theme.breakpoints.medium} {
12599
+ grid-column: span ${({ $m, $s, $xs }) => $m ?? $s ?? $xs ?? 12};
12600
+ }
12601
+
12602
+ ${({ theme }) => theme.breakpoints.large} {
12603
+ grid-column: span ${({ $col, $m, $s, $xs }) => $col ?? $m ?? $s ?? $xs ?? 12};
12604
+ }
12605
+ `;
12606
+ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12607
+ __proto__: null,
12608
+ Item: ItemImpl,
12609
+ Root
12610
+ }, Symbol.toStringTag, { value: "Module" }));
12526
12611
  const defaultState = {
12527
12612
  x: 0,
12528
12613
  y: 0,
@@ -12555,6 +12640,56 @@ function useMeasure() {
12555
12640
  }, [element, observer]);
12556
12641
  return [ref, rect];
12557
12642
  }
12643
+ const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
12644
+ const trappedRef = React.useRef(null);
12645
+ React.useEffect(() => {
12646
+ let currentFocus = null;
12647
+ if (restoreFocus) {
12648
+ currentFocus = document.activeElement;
12649
+ }
12650
+ return () => {
12651
+ if (currentFocus) {
12652
+ currentFocus.focus();
12653
+ }
12654
+ };
12655
+ }, [restoreFocus]);
12656
+ React.useEffect(() => {
12657
+ if (!trappedRef.current || skipAutoFocus)
12658
+ return;
12659
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12660
+ if (focusableChildren.length > 0) {
12661
+ const firstElement = focusableChildren[0];
12662
+ firstElement.focus();
12663
+ } else {
12664
+ console.warn(
12665
+ "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
12666
+ );
12667
+ }
12668
+ }, [skipAutoFocus]);
12669
+ const handleKeyDown = (e) => {
12670
+ if (e.key === KeyboardKeys.ESCAPE && onEscape) {
12671
+ onEscape();
12672
+ return;
12673
+ }
12674
+ if (e.key !== KeyboardKeys.TAB)
12675
+ return;
12676
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12677
+ if (focusableChildren.length > 0) {
12678
+ const firstElement = focusableChildren[0];
12679
+ const lastElement = focusableChildren[focusableChildren.length - 1];
12680
+ if (e.shiftKey) {
12681
+ if (firstElement === document.activeElement) {
12682
+ e.preventDefault();
12683
+ lastElement.focus();
12684
+ }
12685
+ } else if (lastElement === document.activeElement) {
12686
+ e.preventDefault();
12687
+ firstElement.focus();
12688
+ }
12689
+ }
12690
+ };
12691
+ return /* @__PURE__ */ jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
12692
+ };
12558
12693
  const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
12559
12694
  const isValidFocusedElement = () => {
12560
12695
  const focused = document.activeElement;
@@ -12626,8 +12761,7 @@ export {
12626
12761
  Alert,
12627
12762
  Avatar,
12628
12763
  Badge,
12629
- BaseButton,
12630
- BaseLink,
12764
+ BaseLinkImpl as BaseLink,
12631
12765
  Box,
12632
12766
  Breadcrumbs,
12633
12767
  Button,