@strapi/design-system 2.0.0-beta.5 → 2.0.0-rc.10

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 (171) 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 +4 -0
  49. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  50. package/dist/components/DatePicker/DatePicker.d.ts +6 -2
  51. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  52. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  53. package/dist/components/Dialog/Dialog.d.ts +2 -2
  54. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  55. package/dist/components/Divider/Divider.d.ts +1 -1
  56. package/dist/components/Divider/Divider.d.ts.map +1 -1
  57. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +3 -3
  58. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
  59. package/dist/components/Field/Field.d.ts +6 -2
  60. package/dist/components/Field/Field.d.ts.map +1 -1
  61. package/dist/components/IconButton/IconButton.d.ts +7 -18
  62. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  63. package/dist/components/JSONInput/JSONInput.d.ts +1 -1
  64. package/dist/components/JSONInput/JSONInput.d.ts.map +1 -1
  65. package/dist/components/Link/Link.d.ts +1 -1
  66. package/dist/components/Link/Link.d.ts.map +1 -1
  67. package/dist/components/LinkButton/LinkButton.d.ts +4 -10
  68. package/dist/components/LinkButton/LinkButton.d.ts.map +1 -1
  69. package/dist/components/Main/Main.d.ts +1 -1
  70. package/dist/components/Main/Main.d.ts.map +1 -1
  71. package/dist/components/Modal/Modal.d.ts +2 -2
  72. package/dist/components/Modal/Modal.d.ts.map +1 -1
  73. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  74. package/dist/components/Pagination/components.d.ts +1 -1
  75. package/dist/components/Pagination/components.d.ts.map +1 -1
  76. package/dist/components/Popover/Popover.d.ts +1 -1
  77. package/dist/components/Popover/Popover.d.ts.map +1 -1
  78. package/dist/components/ProgressBar/ProgressBar.d.ts +8 -11
  79. package/dist/components/ProgressBar/ProgressBar.d.ts.map +1 -1
  80. package/dist/components/RawTable/RawCell.d.ts +2 -2
  81. package/dist/components/RawTable/RawCell.d.ts.map +1 -1
  82. package/dist/components/RawTable/RawTable.d.ts +1 -1
  83. package/dist/components/RawTable/RawTable.d.ts.map +1 -1
  84. package/dist/components/RawTable/RawTr.d.ts +1 -1
  85. package/dist/components/RawTable/RawTr.d.ts.map +1 -1
  86. package/dist/components/Searchbar/Searchbar.d.ts.map +1 -1
  87. package/dist/components/Select/MultiSelect.d.ts +2 -2
  88. package/dist/components/Select/MultiSelect.d.ts.map +1 -1
  89. package/dist/components/Select/SelectParts.d.ts +8 -2
  90. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  91. package/dist/components/Select/SingleSelect.d.ts +2 -2
  92. package/dist/components/Select/SingleSelect.d.ts.map +1 -1
  93. package/dist/components/SimpleMenu/Menu.d.ts +19 -7
  94. package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
  95. package/dist/components/SimpleMenu/SimpleMenu.d.ts +31 -4
  96. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  97. package/dist/components/Status/Status.d.ts +1 -1
  98. package/dist/components/Status/Status.d.ts.map +1 -1
  99. package/dist/components/SubNav/SubNav.d.ts +1 -1
  100. package/dist/components/SubNav/SubNav.d.ts.map +1 -1
  101. package/dist/components/SubNav/SubNavHeader.d.ts +3 -3
  102. package/dist/components/SubNav/SubNavHeader.d.ts.map +1 -1
  103. package/dist/components/SubNav/SubNavLink.d.ts.map +1 -1
  104. package/dist/components/SubNav/SubNavSections.d.ts +1 -1
  105. package/dist/components/SubNav/SubNavSections.d.ts.map +1 -1
  106. package/dist/components/Switch/Switch.d.ts +4 -6
  107. package/dist/components/Switch/Switch.d.ts.map +1 -1
  108. package/dist/components/Table/Cell.d.ts +2 -2
  109. package/dist/components/Table/Cell.d.ts.map +1 -1
  110. package/dist/components/Table/TFooter.d.ts +1 -1
  111. package/dist/components/Table/TFooter.d.ts.map +1 -1
  112. package/dist/components/Table/Table.d.ts +1 -1
  113. package/dist/components/Table/Table.d.ts.map +1 -1
  114. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  115. package/dist/components/Tag/Tag.d.ts +6 -3
  116. package/dist/components/Tag/Tag.d.ts.map +1 -1
  117. package/dist/components/TextButton/TextButton.d.ts +9 -4
  118. package/dist/components/TextButton/TextButton.d.ts.map +1 -1
  119. package/dist/components/Textarea/Textarea.d.ts +1 -1
  120. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  121. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  122. package/dist/components/index.d.ts +0 -6
  123. package/dist/components/index.d.ts.map +1 -1
  124. package/dist/helpers/handleResponsiveValues.d.ts +30 -15
  125. package/dist/helpers/handleResponsiveValues.d.ts.map +1 -1
  126. package/dist/helpers/theme.d.ts +1 -1
  127. package/dist/helpers/theme.d.ts.map +1 -1
  128. package/dist/index.d.ts +1 -0
  129. package/dist/index.d.ts.map +1 -1
  130. package/dist/index.js +1292 -1081
  131. package/dist/index.js.map +1 -1
  132. package/dist/index.mjs +1307 -1098
  133. package/dist/index.mjs.map +1 -1
  134. package/dist/primitives/Box/Box.d.ts +84 -0
  135. package/dist/primitives/Box/Box.d.ts.map +1 -0
  136. package/dist/primitives/Box/index.d.ts.map +1 -0
  137. package/dist/{components → primitives}/Flex/Flex.d.ts +7 -8
  138. package/dist/primitives/Flex/Flex.d.ts.map +1 -0
  139. package/dist/primitives/Flex/index.d.ts.map +1 -0
  140. package/dist/{components → primitives}/Grid/Grid.d.ts +6 -4
  141. package/dist/primitives/Grid/Grid.d.ts.map +1 -0
  142. package/dist/primitives/Grid/index.d.ts.map +1 -0
  143. package/dist/{components → primitives}/Typography/Typography.d.ts +5 -9
  144. package/dist/primitives/Typography/Typography.d.ts.map +1 -0
  145. package/dist/primitives/Typography/index.d.ts.map +1 -0
  146. package/dist/primitives/index.d.ts +5 -0
  147. package/dist/primitives/index.d.ts.map +1 -0
  148. package/dist/styles/global.d.ts.map +1 -1
  149. package/dist/themes/common-theme.d.ts +8 -4
  150. package/dist/themes/common-theme.d.ts.map +1 -1
  151. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts +1 -1
  152. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts.map +1 -1
  153. package/dist/utilities/Portal/Portal.d.ts +1 -1
  154. package/package.json +9 -7
  155. package/dist/components/BaseButton/BaseButton.d.ts +0 -10
  156. package/dist/components/BaseButton/BaseButton.d.ts.map +0 -1
  157. package/dist/components/BaseButton/index.d.ts +0 -2
  158. package/dist/components/BaseButton/index.d.ts.map +0 -1
  159. package/dist/components/Box/Box.d.ts +0 -102
  160. package/dist/components/Box/Box.d.ts.map +0 -1
  161. package/dist/components/Box/index.d.ts.map +0 -1
  162. package/dist/components/Flex/Flex.d.ts.map +0 -1
  163. package/dist/components/Flex/index.d.ts.map +0 -1
  164. package/dist/components/Grid/Grid.d.ts.map +0 -1
  165. package/dist/components/Grid/index.d.ts.map +0 -1
  166. package/dist/components/Typography/Typography.d.ts.map +0 -1
  167. package/dist/components/Typography/index.d.ts.map +0 -1
  168. /package/dist/{components → primitives}/Box/index.d.ts +0 -0
  169. /package/dist/{components → primitives}/Flex/index.d.ts +0 -0
  170. /package/dist/{components → primitives}/Grid/index.d.ts +0 -0
  171. /package/dist/{components → primitives}/Typography/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -25,7 +25,9 @@ const Dialog$1 = require("@radix-ui/react-dialog");
25
25
  const ScrollArea = require("@radix-ui/react-scroll-area");
26
26
  const number = require("@internationalized/number");
27
27
  const Popover$1 = require("@radix-ui/react-popover");
28
+ const Progress = require("@radix-ui/react-progress");
28
29
  const RadioGroup = require("@radix-ui/react-radio-group");
30
+ const Switch = require("@radix-ui/react-switch");
29
31
  const Tabs$1 = require("@radix-ui/react-tabs");
30
32
  function _interopNamespace(e) {
31
33
  if (e && e.__esModule)
@@ -56,7 +58,9 @@ const AlertDialog__namespace = /* @__PURE__ */ _interopNamespace(AlertDialog);
56
58
  const Dialog__namespace = /* @__PURE__ */ _interopNamespace(Dialog$1);
57
59
  const ScrollArea__namespace = /* @__PURE__ */ _interopNamespace(ScrollArea);
58
60
  const Popover__namespace = /* @__PURE__ */ _interopNamespace(Popover$1);
61
+ const Progress__namespace = /* @__PURE__ */ _interopNamespace(Progress);
59
62
  const RadioGroup__namespace = /* @__PURE__ */ _interopNamespace(RadioGroup);
63
+ const Switch__namespace = /* @__PURE__ */ _interopNamespace(Switch);
60
64
  const Tabs__namespace = /* @__PURE__ */ _interopNamespace(Tabs$1);
61
65
  const createContext = (rootComponentName, defaultContext) => {
62
66
  const Context = React__namespace.createContext(defaultContext);
@@ -76,32 +80,6 @@ const createContext = (rootComponentName, defaultContext) => {
76
80
  Provider2.displayName = `${rootComponentName}Provider`;
77
81
  return [Provider2, useContext];
78
82
  };
79
- const handleResponsiveValues = (property, value, theme) => {
80
- if (!value) {
81
- return void 0;
82
- }
83
- if (typeof value === "object") {
84
- const transformedArray = Array.isArray(value) ? value : [value?.desktop, value?.tablet, value?.mobile];
85
- const spaces = transformedArray.reduce((acc, curr, index) => {
86
- if (curr) {
87
- switch (index) {
88
- case 0:
89
- return `${acc}${property}: ${theme.spaces[curr]};`;
90
- case 1:
91
- return `${acc}${theme.mediaQueries.tablet}{${property}: ${theme.spaces[curr]};}`;
92
- case 2:
93
- return `${acc}${theme.mediaQueries.mobile}{${property}: ${theme.spaces[curr]};}`;
94
- default:
95
- return acc;
96
- }
97
- }
98
- return acc;
99
- }, "");
100
- return spaces;
101
- }
102
- const realValue = theme.spaces[value] ?? value;
103
- return `${property}: ${realValue};`;
104
- };
105
83
  function isKeyOf(o, s) {
106
84
  if (typeof o === "string") {
107
85
  return false;
@@ -112,11 +90,166 @@ function isObject(item) {
112
90
  return item && typeof item === "object" && !Array.isArray(item);
113
91
  }
114
92
  function extractStyleFromTheme(themeSection, key, defaultValue) {
115
- if (key && isKeyOf(themeSection, key)) {
93
+ if (themeSection && key && isKeyOf(themeSection, key)) {
116
94
  return themeSection[key];
117
95
  }
118
96
  return defaultValue;
119
97
  }
98
+ const mappedCSSProps = {
99
+ padding: ["padding-block-start", "padding-inline-end", "padding-block-end", "padding-inline-start"],
100
+ paddingTop: "padding-block-start",
101
+ paddingRight: "padding-inline-end",
102
+ paddingBottom: "padding-block-end",
103
+ paddingLeft: "padding-inline-start",
104
+ margin: ["margin-block-start", "margin-inline-end", "margin-block-end", "margin-inline-start"],
105
+ marginLeft: "margin-inline-start",
106
+ marginRight: "margin-inline-end",
107
+ marginTop: "margin-block-start",
108
+ marginBottom: "margin-block-end",
109
+ borderRadius: "border-radius",
110
+ borderStyle: "border-style",
111
+ borderWidth: "border-width",
112
+ borderColor: "border-color",
113
+ fontSize: "font-size",
114
+ fontWeight: "font-weight",
115
+ lineHeight: "line-height",
116
+ zIndex: "z-index",
117
+ boxShadow: "box-shadow",
118
+ pointerEvents: "pointer-events",
119
+ textAlign: "text-align",
120
+ textTransform: "text-transform",
121
+ textDecoration: "text-decoration",
122
+ flexGrow: "flex-grow",
123
+ flexShrink: "flex-shrink",
124
+ flexBasis: "flex-basis",
125
+ minWidth: "min-width",
126
+ maxWidth: "max-width",
127
+ minHeight: "min-height",
128
+ maxHeight: "max-height",
129
+ flexDirection: "flex-direction",
130
+ flexWrap: "flex-wrap",
131
+ justifyContent: "justify-content",
132
+ alignItems: "align-items"
133
+ };
134
+ const fillCssValues = (value) => {
135
+ const [top, right, bottom, left] = value;
136
+ const rightValue = right ?? top;
137
+ const bottomValue = bottom ?? top;
138
+ const leftValue = left ?? rightValue;
139
+ return [top, rightValue, bottomValue, leftValue];
140
+ };
141
+ function getThemeSection(key, theme) {
142
+ switch (key) {
143
+ case "gap":
144
+ case "padding":
145
+ case "margin":
146
+ case "paddingTop":
147
+ case "paddingLeft":
148
+ case "paddingRight":
149
+ case "paddingBottom":
150
+ case "marginTop":
151
+ case "marginLeft":
152
+ case "marginRight":
153
+ case "marginBottom":
154
+ case "left":
155
+ case "right":
156
+ case "top":
157
+ case "bottom":
158
+ case "width":
159
+ case "maxWidth":
160
+ case "minWidth":
161
+ case "height":
162
+ case "maxHeight":
163
+ case "minHeight":
164
+ case "borderRadius":
165
+ case "borderWidth":
166
+ return theme.spaces;
167
+ case "color":
168
+ case "background":
169
+ case "borderColor":
170
+ return theme.colors;
171
+ case "fontSize":
172
+ return theme.fontSizes;
173
+ case "fontWeight":
174
+ return theme.fontWeights;
175
+ case "lineHeight":
176
+ return theme.lineHeights;
177
+ case "zIndex":
178
+ return theme.zIndices;
179
+ case "boxShadow":
180
+ return theme.shadows;
181
+ default:
182
+ return null;
183
+ }
184
+ }
185
+ const handleResponsiveValues = (values, theme) => {
186
+ const stylesByBreakpoint = Object.entries(values).reduce(
187
+ (acc, curr) => {
188
+ const [key, value] = curr;
189
+ const themeSection = getThemeSection(key, theme);
190
+ const cssProperty = Object.prototype.hasOwnProperty.call(mappedCSSProps, key) ? mappedCSSProps[key] : key;
191
+ if (cssProperty && (value || value === 0)) {
192
+ if (typeof value === "object" && !Array.isArray(value)) {
193
+ Object.entries(value).forEach(([breakpointName, breakpointValue]) => {
194
+ acc[breakpointName] = {
195
+ ...acc[breakpointName],
196
+ ...convertCssPropertiesToCssValues(cssProperty, breakpointValue, themeSection)
197
+ };
198
+ });
199
+ } else {
200
+ acc.initial = {
201
+ ...acc.initial,
202
+ ...convertCssPropertiesToCssValues(cssProperty, value, themeSection)
203
+ };
204
+ }
205
+ }
206
+ return acc;
207
+ },
208
+ {
209
+ initial: {},
210
+ small: {},
211
+ medium: {},
212
+ large: {}
213
+ }
214
+ );
215
+ return Object.entries(stylesByBreakpoint).reduce((acc, [key, value]) => {
216
+ if (value && Object.keys(value).length > 0) {
217
+ const breakpointStyles = Object.entries(value).reduce((arr, [property, value2]) => {
218
+ arr.push(`${property}: ${value2};`);
219
+ return arr;
220
+ }, []).join("\n");
221
+ if (key === "initial") {
222
+ acc.push(breakpointStyles);
223
+ } else {
224
+ acc.push(`${theme.breakpoints[key]}{ ${breakpointStyles} }`);
225
+ }
226
+ }
227
+ return acc;
228
+ }, []).join("\n");
229
+ };
230
+ const convertCssPropertiesToCssValues = (property, value, themeSection) => {
231
+ if (Array.isArray(property) && Array.isArray(value)) {
232
+ const shorthandValues = fillCssValues(value);
233
+ return property.reduce((acc, prop, index) => {
234
+ acc[prop] = extractStyleFromTheme(themeSection, shorthandValues[index], shorthandValues[index]);
235
+ return acc;
236
+ }, {});
237
+ } else if (Array.isArray(property) && !Array.isArray(value)) {
238
+ return property.reduce((acc, prop) => {
239
+ acc[prop] = extractStyleFromTheme(themeSection, value, value);
240
+ return acc;
241
+ }, {});
242
+ } else if (!Array.isArray(property) && !Array.isArray(value)) {
243
+ return {
244
+ [property]: extractStyleFromTheme(themeSection, value, value)
245
+ };
246
+ } else {
247
+ console.warn(
248
+ "You've passed an array of values to a property that does not support it. Please check the property and value you're passing."
249
+ );
250
+ return {};
251
+ }
252
+ };
120
253
  const forwardRef = React__namespace.forwardRef;
121
254
  const Box = forwardRef((props, ref) => {
122
255
  const {
@@ -128,8 +261,6 @@ const Box = forwardRef((props, ref) => {
128
261
  fontSize,
129
262
  grow,
130
263
  hasRadius,
131
- hiddenS,
132
- hiddenXS,
133
264
  padding,
134
265
  paddingBottom,
135
266
  paddingLeft,
@@ -143,6 +274,7 @@ const Box = forwardRef((props, ref) => {
143
274
  shadow,
144
275
  shrink,
145
276
  lineHeight,
277
+ fontWeight,
146
278
  width,
147
279
  minWidth,
148
280
  maxWidth,
@@ -180,8 +312,6 @@ const Box = forwardRef((props, ref) => {
180
312
  $fontSize: fontSize,
181
313
  $grow: grow,
182
314
  $hasRadius: hasRadius,
183
- $hiddenS: hiddenS,
184
- $hiddenXS: hiddenXS,
185
315
  $padding: padding,
186
316
  $paddingBottom: paddingBottom,
187
317
  $paddingLeft: paddingLeft,
@@ -195,6 +325,7 @@ const Box = forwardRef((props, ref) => {
195
325
  $shadow: shadow,
196
326
  $shrink: shrink,
197
327
  $lineHeight: lineHeight,
328
+ $fontWeight: fontWeight,
198
329
  $width: width,
199
330
  $minWidth: minWidth,
200
331
  $maxWidth: maxWidth,
@@ -223,110 +354,83 @@ const Box = forwardRef((props, ref) => {
223
354
  return /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { as: AsComponent, ref, ...mappedProps, ...rest });
224
355
  });
225
356
  const StyledBox = styledComponents.styled.div`
226
- // Font
227
- font-size: ${({ $fontSize, theme }) => extractStyleFromTheme(theme.fontSizes, $fontSize, $fontSize)};
228
-
229
- // Colors
230
- background: ${({ theme, $background }) => extractStyleFromTheme(theme.colors, $background, $background)};
231
- color: ${({ theme, $color }) => extractStyleFromTheme(theme.colors, $color, $color)};
232
-
233
- // Spaces
234
- ${({ theme, $padding }) => handleResponsiveValues("padding-block", $padding, theme)}
235
- ${({ theme, $padding }) => handleResponsiveValues("padding-inline", $padding, theme)}
236
- ${({ theme, $paddingTop }) => handleResponsiveValues("padding-block-start", $paddingTop, theme)}
237
- ${({ theme, $paddingRight }) => handleResponsiveValues("padding-inline-end", $paddingRight, theme)}
238
- ${({ theme, $paddingBottom }) => handleResponsiveValues("padding-block-end", $paddingBottom, theme)}
239
- ${({ theme, $paddingLeft }) => handleResponsiveValues("padding-inline-start", $paddingLeft, theme)}
240
-
241
- ${({ theme, $margin }) => handleResponsiveValues("margin-block", $margin, theme)}
242
- ${({ theme, $margin }) => handleResponsiveValues("margin-inline", $margin, theme)}
243
- ${({ theme, $marginLeft }) => handleResponsiveValues("margin-inline-start", $marginLeft, theme)}
244
- ${({ theme, $marginRight }) => handleResponsiveValues("margin-inline-end", $marginRight, theme)}
245
- ${({ theme, $marginTop }) => handleResponsiveValues("margin-block-start", $marginTop, theme)}
246
- ${({ theme, $marginBottom }) => handleResponsiveValues("margin-block-end", $marginBottom, theme)}
247
-
248
- // Responsive hiding
249
- ${({ theme, $hiddenS }) => $hiddenS ? `${theme.mediaQueries.tablet} { display: none; }` : void 0}
250
- ${({ theme, $hiddenXS }) => $hiddenXS ? `${theme.mediaQueries.mobile} { display: none; }` : void 0}
251
-
252
-
253
- // Borders
254
- border-radius: ${({ theme, $hasRadius, $borderRadius }) => $hasRadius ? theme.borderRadius : $borderRadius};
255
- border-style: ${({ $borderStyle }) => $borderStyle};
256
- border-width: ${({ $borderWidth }) => $borderWidth};
257
- border-color: ${({ $borderColor, theme }) => extractStyleFromTheme(theme.colors, $borderColor, void 0)};
258
- border: ${({ theme, $borderColor, $borderStyle, $borderWidth }) => {
259
- if ($borderColor && !$borderStyle && typeof $borderWidth === "undefined") {
260
- return `1px solid ${theme.colors[$borderColor]}`;
261
- }
262
- return void 0;
357
+ ${({ theme, ...props }) => {
358
+ return handleResponsiveValues(
359
+ {
360
+ padding: props.$padding,
361
+ paddingTop: props.$paddingTop,
362
+ paddingBottom: props.$paddingBottom,
363
+ paddingLeft: props.$paddingLeft,
364
+ paddingRight: props.$paddingRight,
365
+ margin: props.$margin,
366
+ marginTop: props.$marginTop,
367
+ marginBottom: props.$marginBottom,
368
+ marginLeft: props.$marginLeft,
369
+ marginRight: props.$marginRight,
370
+ top: props.$top,
371
+ left: props.$left,
372
+ bottom: props.$bottom,
373
+ right: props.$right,
374
+ width: props.$width,
375
+ minWidth: props.$minWidth,
376
+ maxWidth: props.$maxWidth,
377
+ height: props.$height,
378
+ minHeight: props.$minHeight,
379
+ maxHeight: props.$maxHeight,
380
+ color: props.$color,
381
+ background: props.$background,
382
+ fontSize: props.$fontSize,
383
+ fontWeight: props.$fontWeight,
384
+ lineHeight: props.$lineHeight,
385
+ borderRadius: props.$hasRadius ? theme.borderRadius : props.$borderRadius,
386
+ borderStyle: props.$borderColor && !props.$borderStyle ? "solid" : props.$borderStyle,
387
+ borderWidth: props.$borderColor && !props.$borderWidth ? "1px" : props.$borderWidth,
388
+ borderColor: props.$borderColor,
389
+ zIndex: props.$zIndex,
390
+ boxShadow: props.$shadow,
391
+ display: props.$display,
392
+ pointerEvents: props.$pointerEvents,
393
+ cursor: props.$cursor,
394
+ textAlign: props.$textAlign,
395
+ textTransform: props.$textTransform,
396
+ transition: props.$transition,
397
+ transform: props.$transform,
398
+ animation: props.$animation,
399
+ position: props.$position,
400
+ overflow: props.$overflow,
401
+ flex: props.$flex,
402
+ flexShrink: props.$shrink,
403
+ flexGrow: props.$grow,
404
+ flexBasis: props.$basis
405
+ },
406
+ theme
407
+ );
263
408
  }};
264
-
265
- // Shadows
266
- box-shadow: ${({ theme, $shadow }) => extractStyleFromTheme(theme.shadows, $shadow, void 0)};
267
-
268
- // Handlers
269
- pointer-events: ${({ $pointerEvents }) => $pointerEvents};
270
-
271
- // Display
272
- display: ${({ $display }) => $display};
273
-
274
- // Position
275
- position: ${({ $position }) => $position};
276
- left: ${({ $left, theme }) => extractStyleFromTheme(theme.spaces, $left, $left)};
277
- right: ${({ $right, theme }) => extractStyleFromTheme(theme.spaces, $right, $right)};
278
- top: ${({ $top, theme }) => extractStyleFromTheme(theme.spaces, $top, $top)};
279
- bottom: ${({ $bottom, theme }) => extractStyleFromTheme(theme.spaces, $bottom, $bottom)};
280
- z-index: ${({ $zIndex, theme }) => extractStyleFromTheme(theme.zIndices, $zIndex, $zIndex)};
281
- overflow: ${({ $overflow }) => $overflow};
282
-
283
- // Size
284
- width: ${({ $width, theme }) => extractStyleFromTheme(theme.spaces, $width, $width)};
285
- max-width: ${({ $maxWidth, theme }) => extractStyleFromTheme(theme.spaces, $maxWidth, $maxWidth)};
286
- min-width: ${({ $minWidth, theme }) => extractStyleFromTheme(theme.spaces, $minWidth, $minWidth)};
287
- height: ${({ $height, theme }) => extractStyleFromTheme(theme.spaces, $height, $height)};
288
- max-height: ${({ $maxHeight, theme }) => extractStyleFromTheme(theme.spaces, $maxHeight, $maxHeight)};
289
- min-height: ${({ $minHeight, theme }) => extractStyleFromTheme(theme.spaces, $minHeight, $minHeight)};
290
-
291
- // Animation
292
- transition: ${({ $transition }) => $transition};
293
- transform: ${({ $transform }) => $transform};
294
- animation: ${({ $animation }) => $animation};
295
-
296
- //Flexbox children props
297
- flex-shrink: ${({ $shrink }) => $shrink};
298
- flex-grow: ${({ $grow }) => $grow};
299
- flex-basis: ${({ $basis }) => $basis};
300
- flex: ${({ $flex }) => $flex};
301
-
302
- // Text
303
- text-align: ${({ $textAlign }) => $textAlign};
304
- text-transform: ${({ $textTransform }) => $textTransform};
305
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
306
-
307
- // Cursor
308
- cursor: ${({ $cursor }) => $cursor};
309
409
  `;
310
410
  const Flex = forwardRef((props, ref) => {
311
- const { className, alignItems, direction, gap, inline, justifyContent, wrap, ...rest } = props;
411
+ const { className, alignItems, direction, inline, gap, justifyContent, wrap, ...rest } = props;
312
412
  const mappedProps = {
313
413
  $alignItems: alignItems,
314
414
  $direction: direction,
315
415
  $gap: gap,
316
- $inline: inline,
317
416
  $justifyContent: justifyContent,
318
- $wrap: wrap
417
+ $wrap: wrap,
418
+ $inline: inline
319
419
  };
320
420
  return /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { className, ref, ...mappedProps, ...rest });
321
421
  });
322
422
  const StyledFlex = styledComponents.styled(Box)`
323
- align-items: ${({ $alignItems = "center" }) => $alignItems};
324
- display: ${({ display = "flex", $inline }) => $inline ? "inline-flex" : display};
325
- flex-direction: ${({ $direction = "row" }) => $direction};
326
- flex-shrink: ${({ shrink }) => shrink};
327
- flex-wrap: ${({ $wrap }) => $wrap};
328
- ${({ $gap, theme }) => handleResponsiveValues("gap", $gap, theme)};
329
- justify-content: ${({ $justifyContent }) => $justifyContent};
423
+ ${({ theme, $display = "flex", $alignItems = "center", $direction = "row", ...props }) => handleResponsiveValues(
424
+ {
425
+ gap: props.$gap,
426
+ alignItems: $alignItems,
427
+ justifyContent: props.$justifyContent,
428
+ flexWrap: props.$wrap,
429
+ flexDirection: $direction,
430
+ display: props.$inline ? "inline-flex" : $display
431
+ },
432
+ theme
433
+ )};
330
434
  `;
331
435
  const ALPHA = "alpha";
332
436
  const BETA = "beta";
@@ -401,26 +505,24 @@ const Typography = forwardRef(
401
505
  (props, ref) => {
402
506
  const {
403
507
  ellipsis: ellipsis2,
404
- fontSize,
405
- fontWeight,
406
- lineHeight,
407
- textAlign,
408
508
  textColor = "currentcolor",
409
509
  textDecoration,
410
510
  textTransform,
411
511
  variant: variant2,
512
+ lineHeight,
513
+ fontWeight,
514
+ fontSize,
412
515
  ...rest
413
516
  } = props;
414
517
  const mappedProps = {
415
518
  $ellipsis: ellipsis2,
416
- $fontSize: fontSize,
417
- $fontWeight: fontWeight,
418
- $lineHeight: lineHeight,
419
- $textAlign: textAlign,
420
519
  $textColor: textColor,
421
520
  $textDecoration: textDecoration,
422
521
  $textTransform: textTransform,
423
- $variant: variant2
522
+ $variant: variant2,
523
+ $lineHeight: lineHeight,
524
+ $fontWeight: fontWeight,
525
+ $fontSize: fontSize
424
526
  };
425
527
  return /* @__PURE__ */ jsxRuntime.jsx(StyledTypography, { ref, tag: "span", ...mappedProps, ...rest });
426
528
  }
@@ -429,15 +531,19 @@ const StyledTypography = styledComponents.styled(Box)`
429
531
  ${variant}
430
532
  ${({ $ellipsis }) => $ellipsis ? ellipsis : ""}
431
533
 
432
- // These properties need to come after {variantStyle}, because they might
433
- // overwrite a variant attribute
434
- font-weight: ${({ theme, $fontWeight }) => extractStyleFromTheme(theme.fontWeights, $fontWeight, void 0)};
435
- font-size: ${({ theme, $fontSize }) => extractStyleFromTheme(theme.fontSizes, $fontSize, void 0)};
436
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
437
- color: ${({ theme, $textColor }) => extractStyleFromTheme(theme.colors, $textColor, $textColor)};
438
- text-align: ${({ $textAlign }) => $textAlign};
439
- text-decoration: ${({ $textDecoration }) => $textDecoration};
440
- text-transform: ${({ $textTransform }) => $textTransform};
534
+ ${({ theme, ...props }) => {
535
+ return handleResponsiveValues(
536
+ {
537
+ color: props.$textColor,
538
+ textDecoration: props.$textDecoration,
539
+ textTransform: props.$textTransform,
540
+ lineHeight: props.$lineHeight,
541
+ fontWeight: props.$fontWeight,
542
+ fontSize: props.$fontSize
543
+ },
544
+ theme
545
+ );
546
+ }}
441
547
  `;
442
548
  const [AccordionProvider, useAccordion] = createContext("Accordion");
443
549
  const Root$8 = React__namespace.forwardRef(({ children, size = "S", ...props }, forwardedRef) => {
@@ -465,25 +571,38 @@ const AccordionItem = styledComponents.styled(RadixAccordion__namespace.Item)`
465
571
  overflow: hidden;
466
572
 
467
573
  &:first-child {
468
- border-top-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
469
- border-top-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
574
+ border-top-left-radius: 0.3rem;
575
+ border-top-right-radius: 0.3rem;
470
576
  }
471
577
 
472
578
  &:last-child {
473
- border-bottom-left-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
474
- border-bottom-right-radius: ${(props) => props.$size === "S" ? "0.3rem" : ""};
579
+ border-bottom-left-radius: 0.3rem;
580
+ border-bottom-right-radius: 0.3rem;
475
581
  }
476
582
 
477
583
  & + & {
478
584
  border-top: ${(props) => props.$size === "S" ? `solid 1px ${props.theme.colors.neutral200}` : "unset"};
479
585
  }
480
586
 
587
+ &[data-state='open'] {
588
+ box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
589
+ }
590
+
591
+ &:hover {
592
+ box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
593
+ }
594
+
481
595
  /* This applies our desired focus effect correctly. */
482
596
  &:focus-within {
483
597
  position: relative;
484
598
  z-index: 1;
485
599
  box-shadow: 0 0 0 2px ${(props) => props.theme.colors.primary600};
486
600
  }
601
+
602
+ @media (prefers-reduced-motion: no-preference) {
603
+ transition: box-shadow ${(props) => props.theme.motion.timings["120"]}
604
+ ${(props) => props.theme.motion.easings.easeOutQuad};
605
+ }
487
606
  `;
488
607
  const Trigger$7 = React__namespace.forwardRef(
489
608
  ({ caretPosition = "left", description, icon: Icon, children, ...restProps }, forwardedRef) => {
@@ -499,10 +618,11 @@ const Trigger$7 = React__namespace.forwardRef(
499
618
  fontWeight: size === "S" ? "bold" : void 0,
500
619
  ellipsis: true,
501
620
  variant: size === "M" ? "delta" : void 0,
621
+ textAlign: "left",
502
622
  children
503
623
  }
504
624
  ),
505
- description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: description }) : null
625
+ description && size === "M" ? /* @__PURE__ */ jsxRuntime.jsx(Typography, { textAlign: "left", children: description }) : null
506
626
  ] })
507
627
  ] }),
508
628
  caretPosition === "right" ? /* @__PURE__ */ jsxRuntime.jsx(TriggerIcon, { $size: size, children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: size === "S" ? "1.2rem" : "1.6rem", height: size === "S" ? "1.2rem" : "1.6rem" }) }) : null
@@ -1166,51 +1286,32 @@ const Base = styledComponents.styled(Flex)`
1166
1286
  `;
1167
1287
  }};
1168
1288
  `;
1169
- const BaseButton = forwardRef(
1170
- ({ disabled, children, ...props }, ref) => {
1171
- return /* @__PURE__ */ jsxRuntime.jsx(
1172
- BaseButtonWrapper,
1173
- {
1174
- ref,
1175
- "aria-disabled": disabled,
1176
- disabled,
1177
- tag: "button",
1178
- type: "button",
1179
- padding: 2,
1180
- hasRadius: true,
1181
- background: "neutral0",
1182
- borderColor: "neutral200",
1183
- cursor: "pointer",
1184
- ...props,
1185
- children
1186
- }
1187
- );
1188
- }
1189
- );
1190
- const BaseButtonWrapper = styledComponents.styled(Flex)`
1191
- &[aria-disabled='true'] {
1192
- pointer-events: none;
1193
- }
1194
-
1195
- ${focus}
1196
- `;
1197
- const BaseLink = forwardRef(
1198
- ({ href, rel = "noreferrer noopener", target = "_self", disabled = false, isExternal = false, ...props }, ref) => {
1289
+ const BaseLinkImpl = forwardRef(
1290
+ ({ href, disabled = false, isExternal = false, ...props }, ref) => {
1199
1291
  return /* @__PURE__ */ jsxRuntime.jsx(
1200
- Box,
1292
+ BaseLink,
1201
1293
  {
1202
1294
  tag: "a",
1203
1295
  ref,
1204
- target: isExternal ? "_blank" : target,
1205
- rel: isExternal ? rel : void 0,
1206
- href: disabled ? "#" : href,
1296
+ target: isExternal ? "_blank" : void 0,
1297
+ rel: isExternal ? "noreferrer noopener" : void 0,
1298
+ href,
1299
+ tabIndex: disabled ? -1 : void 0,
1207
1300
  "aria-disabled": disabled,
1208
- cursor: "pointer",
1301
+ pointerEvents: disabled ? "none" : void 0,
1302
+ cursor: disabled ? void 0 : "pointer",
1209
1303
  ...props
1210
1304
  }
1211
1305
  );
1212
1306
  }
1213
1307
  );
1308
+ const BaseLink = styledComponents.styled(Box)`
1309
+ text-decoration: none;
1310
+
1311
+ &:visited {
1312
+ color: inherit;
1313
+ }
1314
+ `;
1214
1315
  const Divider$1 = () => {
1215
1316
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true, paddingLeft: 1, paddingRight: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: "neutral500", children: "/" }) });
1216
1317
  };
@@ -1224,30 +1325,34 @@ const AlignedList = styledComponents.styled(Flex)`
1224
1325
  margin-left: ${({ theme }) => `calc(-1*${theme.spaces[2]})`};
1225
1326
  }
1226
1327
  `;
1227
- const Breadcrumbs = ({ label, children, ...props }) => {
1228
- const childrenArray = React__namespace.Children.toArray(children);
1229
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-label": label, tag: "nav", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(AlignedList, { tag: "ol", children: React__namespace.Children.map(childrenArray, (child, index) => {
1230
- const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1231
- return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { inline: true, tag: "li", children: [
1232
- child,
1233
- shouldDisplayDivider && /* @__PURE__ */ jsxRuntime.jsx(Divider$1, {})
1234
- ] });
1235
- }) }) });
1236
- };
1237
- Breadcrumbs.displayName = "Breadcrumbs";
1238
- const Crumb = ({ children, isCurrent = false, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
1239
- Typography,
1240
- {
1241
- variant: "pi",
1242
- textColor: "neutral800",
1243
- fontWeight: isCurrent ? "bold" : "regular",
1244
- "aria-current": isCurrent,
1245
- ...props,
1246
- children
1328
+ const Breadcrumbs = React__namespace.forwardRef(
1329
+ ({ label, children, ...props }, forwardedRef) => {
1330
+ const childrenArray = React__namespace.Children.toArray(children);
1331
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-label": label, tag: "nav", ...props, ref: forwardedRef, children: /* @__PURE__ */ jsxRuntime.jsx(AlignedList, { tag: "ol", children: React__namespace.Children.map(childrenArray, (child, index) => {
1332
+ const shouldDisplayDivider = childrenArray.length > 1 && index + 1 < childrenArray.length;
1333
+ return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { inline: true, tag: "li", children: [
1334
+ child,
1335
+ shouldDisplayDivider && /* @__PURE__ */ jsxRuntime.jsx(Divider$1, {})
1336
+ ] });
1337
+ }) }) });
1247
1338
  }
1248
- ) });
1339
+ );
1340
+ Breadcrumbs.displayName = "Breadcrumbs";
1341
+ const Crumb = React__namespace.forwardRef(
1342
+ ({ children, isCurrent = false, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 2, paddingRight: 2, paddingTop: 1, paddingBottom: 1, ref: forwardedRef, children: /* @__PURE__ */ jsxRuntime.jsx(
1343
+ Typography,
1344
+ {
1345
+ variant: "pi",
1346
+ textColor: "neutral800",
1347
+ fontWeight: isCurrent ? "bold" : "regular",
1348
+ "aria-current": isCurrent,
1349
+ ...props,
1350
+ children
1351
+ }
1352
+ ) })
1353
+ );
1249
1354
  Crumb.displayName = "Crumb";
1250
- const StyledLink = styledComponents.styled(BaseLink)`
1355
+ const StyledLink = styledComponents.styled(BaseLinkImpl)`
1251
1356
  border-radius: ${({ theme }) => theme.borderRadius};
1252
1357
  color: ${({ theme }) => theme.colors.neutral600};
1253
1358
  font-size: ${({ theme }) => theme.fontSizes[1]};
@@ -1261,9 +1366,22 @@ const StyledLink = styledComponents.styled(BaseLink)`
1261
1366
  color: ${({ theme }) => theme.colors.neutral700};
1262
1367
  }
1263
1368
  `;
1264
- const CrumbLink = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(StyledLink, { ...props, children });
1369
+ const CrumbLink = React__namespace.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledLink, { ref: forwardedRef, ...props, children }));
1265
1370
  CrumbLink.displayName = "CrumbLink";
1266
1371
  const stripReactIdOfColon = (str) => str.replaceAll(":", "");
1372
+ function setRef(ref, value) {
1373
+ if (typeof ref === "function") {
1374
+ ref(value);
1375
+ } else if (ref !== null && ref !== void 0) {
1376
+ ref.current = value;
1377
+ }
1378
+ }
1379
+ function composeRefs(...refs) {
1380
+ return (node) => refs.forEach((ref) => setRef(ref, node));
1381
+ }
1382
+ function useComposedRefs(...refs) {
1383
+ return React__namespace.useCallback(composeRefs(...refs), refs);
1384
+ }
1267
1385
  const isSSR = () => typeof window === "undefined" || !window.navigator || /ServerSideRendering|^Deno\//.test(window.navigator.userAgent);
1268
1386
  const useIsomorphicLayoutEffect = isSSR() ? React.useEffect : React.useLayoutEffect;
1269
1387
  const useReactId = React__namespace["useId".toString()] || (() => void 0);
@@ -1313,7 +1431,7 @@ const DANGER = "danger";
1313
1431
  const SUCCESS = "success";
1314
1432
  const GHOST = "ghost";
1315
1433
  const LIGHT_VARIANTS = [SUCCESS_LIGHT, DANGER_LIGHT];
1316
- const VARIANTS$1 = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1434
+ const VARIANTS = [DEFAULT, TERTIARY, SECONDARY, DANGER, SUCCESS, GHOST, ...LIGHT_VARIANTS];
1317
1435
  const BUTTON_SIZES = ["S", "M", "L"];
1318
1436
  const getVariantColorName = (variant2) => {
1319
1437
  if (variant2 === SUCCESS_LIGHT || variant2 === DANGER_LIGHT) {
@@ -1322,7 +1440,7 @@ const getVariantColorName = (variant2) => {
1322
1440
  if (variant2 === TERTIARY) {
1323
1441
  return "neutral";
1324
1442
  }
1325
- if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS$1.every((vari) => vari !== variant2)) {
1443
+ if (variant2 === DEFAULT || variant2 === SECONDARY || VARIANTS.every((vari) => vari !== variant2)) {
1326
1444
  return "primary";
1327
1445
  }
1328
1446
  return `${variant2}`;
@@ -1332,6 +1450,7 @@ const getDisabledStyle = ({ theme }) => {
1332
1450
  border: 1px solid ${theme.colors.neutral200};
1333
1451
  background: ${theme.colors.neutral150};
1334
1452
  color: ${theme.colors.neutral600};
1453
+ cursor: default;
1335
1454
  `;
1336
1455
  };
1337
1456
  const getHoverStyle = ({ theme, $variant }) => {
@@ -1369,7 +1488,7 @@ const getActiveStyle = ({ theme, $variant }) => {
1369
1488
  color: ${theme.colors[`${getVariantColorName($variant)}600`]};
1370
1489
  `;
1371
1490
  }
1372
- if ($variant === TERTIARY) {
1491
+ if ($variant === TERTIARY || $variant === GHOST) {
1373
1492
  return styledComponents.css`
1374
1493
  background-color: ${theme.colors.neutral150};
1375
1494
  `;
@@ -1418,6 +1537,8 @@ const getVariantStyle = ({ theme, $variant }) => {
1418
1537
  }
1419
1538
  default: {
1420
1539
  return styledComponents.css`
1540
+ border: 1px solid ${theme.colors.buttonPrimary600};
1541
+ background: ${theme.colors.buttonPrimary600};
1421
1542
  color: ${theme.colors.buttonNeutral0};
1422
1543
  `;
1423
1544
  }
@@ -1450,21 +1571,22 @@ const Button = forwardRef(
1450
1571
  disabled: isDisabled,
1451
1572
  $size: size,
1452
1573
  $variant: variant2,
1574
+ tag: "button",
1453
1575
  onClick: handleClick,
1454
- alignItems: "center",
1455
- background: "buttonPrimary600",
1456
- borderColor: "buttonPrimary600",
1576
+ hasRadius: true,
1457
1577
  gap: 2,
1458
- inline: fullWidth,
1459
- justifyContent: fullWidth ? "center" : void 0,
1578
+ inline: true,
1579
+ alignItems: "center",
1580
+ justifyContent: "center",
1581
+ width: fullWidth ? "100%" : void 0,
1460
1582
  paddingLeft: 4,
1461
1583
  paddingRight: 4,
1462
- width: fullWidth ? "100%" : void 0,
1584
+ cursor: "pointer",
1463
1585
  ...props,
1464
1586
  children: [
1465
- (startIcon || loading) && /* @__PURE__ */ jsxRuntime.jsx(Box, { "aria-hidden": true, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(LoaderAnimated, {}) : startIcon }),
1587
+ (startIcon || loading) && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(LoaderAnimated, {}) : startIcon }),
1466
1588
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", children }),
1467
- endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: endIcon })
1589
+ endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, children: endIcon })
1468
1590
  ]
1469
1591
  }
1470
1592
  );
@@ -1482,20 +1604,10 @@ const LoaderAnimated = styledComponents.styled(icons.Loader)`
1482
1604
  animation: ${rotation$2} 2s infinite linear;
1483
1605
  will-change: transform;
1484
1606
  `;
1485
- const ButtonWrapper = styledComponents.styled(BaseButton)`
1607
+ const ButtonWrapper = styledComponents.styled(Flex)`
1486
1608
  height: ${({ theme, $size }) => theme.sizes.button[$size]};
1487
-
1488
- svg {
1489
- height: 1.2rem;
1490
- }
1491
-
1492
- &[aria-disabled='true'] {
1493
- ${getDisabledStyle}
1494
-
1495
- &:active {
1496
- ${getDisabledStyle}
1497
- }
1498
- }
1609
+ text-decoration: none;
1610
+ ${getVariantStyle}
1499
1611
 
1500
1612
  &:hover {
1501
1613
  ${getHoverStyle}
@@ -1505,7 +1617,9 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
1505
1617
  ${getActiveStyle}
1506
1618
  }
1507
1619
 
1508
- ${getVariantStyle}
1620
+ &[aria-disabled='true'] {
1621
+ ${getDisabledStyle}
1622
+ }
1509
1623
 
1510
1624
  @media (prefers-reduced-motion: no-preference) {
1511
1625
  transition:
@@ -1514,33 +1628,185 @@ const ButtonWrapper = styledComponents.styled(BaseButton)`
1514
1628
  border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1515
1629
  }
1516
1630
  `;
1517
- const Link = forwardRef(
1518
- ({ children, href, disabled = false, startIcon, endIcon, isExternal = true, ...props }, ref) => {
1519
- return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$2, { ref, href, disabled, isExternal, ...props, children: [
1520
- startIcon,
1521
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
1522
- endIcon,
1523
- href && !endIcon && isExternal && /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, {})
1524
- ] });
1631
+ const TooltipImpl = React__namespace.forwardRef(
1632
+ ({
1633
+ children,
1634
+ description,
1635
+ label,
1636
+ defaultOpen,
1637
+ open,
1638
+ onOpenChange,
1639
+ delayDuration = 500,
1640
+ disableHoverableContent,
1641
+ ...restProps
1642
+ }, forwardedRef) => {
1643
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1644
+ Tooltip__namespace.Root,
1645
+ {
1646
+ defaultOpen,
1647
+ open,
1648
+ onOpenChange,
1649
+ delayDuration,
1650
+ disableHoverableContent,
1651
+ children: [
1652
+ /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Trigger, { asChild: true, children }),
1653
+ /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { ref: forwardedRef, sideOffset: 8, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", fontWeight: "bold", children: label || description }) }) })
1654
+ ]
1655
+ }
1656
+ );
1525
1657
  }
1526
1658
  );
1527
- const LinkWrapper$2 = styledComponents.styled(BaseLink)`
1528
- display: inline-flex;
1529
- align-items: center;
1530
- text-decoration: none;
1531
- gap: ${({ theme }) => theme.spaces[2]};
1532
- pointer-events: ${({ disabled }) => disabled ? "none" : void 0};
1659
+ const TooltipContent = styledComponents.styled(Tooltip__namespace.Content)`
1660
+ background-color: ${(props) => props.theme.colors.neutral900};
1661
+ color: ${(props) => props.theme.colors.neutral0};
1662
+ padding-inline: ${(props) => props.theme.spaces[2]};
1663
+ padding-block: ${(props) => props.theme.spaces[2]};
1664
+ border-radius: ${(props) => props.theme.borderRadius};
1665
+ z-index: ${(props) => props.theme.zIndices.tooltip};
1666
+ will-change: opacity;
1667
+ transform-origin: var(--radix-tooltip-content-transform-origin);
1533
1668
 
1534
- svg {
1535
- font-size: 1rem;
1669
+ @media (prefers-reduced-motion: no-preference) {
1670
+ animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings["200"]}
1671
+ ${(props) => props.theme.motion.easings.authenticMotion};
1672
+ }
1673
+ `;
1674
+ const IconButton = forwardRef(
1675
+ ({
1676
+ label,
1677
+ background,
1678
+ children,
1679
+ disabled = false,
1680
+ onClick,
1681
+ size = "S",
1682
+ variant: variant2 = "tertiary",
1683
+ withTooltip = true,
1684
+ ...restProps
1685
+ }, ref) => {
1686
+ const handleClick = (e) => {
1687
+ if (!disabled && onClick) {
1688
+ onClick(e);
1689
+ }
1690
+ };
1691
+ const component = /* @__PURE__ */ jsxRuntime.jsx(
1692
+ IconButtonWrapper,
1693
+ {
1694
+ "aria-disabled": disabled,
1695
+ background: disabled ? "neutral150" : background,
1696
+ tag: "button",
1697
+ display: "inline-flex",
1698
+ justifyContent: "center",
1699
+ hasRadius: true,
1700
+ cursor: "pointer",
1701
+ ...restProps,
1702
+ ref,
1703
+ $size: size,
1704
+ onClick: handleClick,
1705
+ $variant: variant2,
1706
+ children: /* @__PURE__ */ jsxRuntime.jsx(AccessibleIcon, { label, children })
1707
+ }
1708
+ );
1709
+ return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
1710
+ }
1711
+ );
1712
+ const IconButtonWrapper = styledComponents.styled(Flex)`
1713
+ text-decoration: none;
1536
1714
 
1537
- path {
1538
- fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral600 : theme.colors.primary600};
1715
+ ${(props) => {
1716
+ switch (props.$size) {
1717
+ case "S": {
1718
+ return styledComponents.css`
1719
+ padding-block: 0.7rem;
1720
+ padding-inline: 0.7rem;
1721
+ `;
1722
+ }
1723
+ case "M": {
1724
+ return styledComponents.css`
1725
+ padding-block: 0.9rem;
1726
+ padding-inline: 0.9rem;
1727
+ `;
1728
+ }
1729
+ case "L": {
1730
+ return styledComponents.css`
1731
+ padding-block: 1.1rem;
1732
+ padding-inline: 1.1rem;
1733
+ `;
1539
1734
  }
1540
1735
  }
1736
+ }}
1737
+ ${getVariantStyle}
1738
+ ${(props) => props.$variant === "tertiary" ? styledComponents.css`
1739
+ color: ${props.theme.colors.neutral500};
1740
+ ` : ""}
1541
1741
 
1542
1742
  &:hover {
1543
- color: ${({ theme }) => theme.colors.primary500};
1743
+ ${getHoverStyle}
1744
+ ${(props) => props.$variant === "tertiary" ? styledComponents.css`
1745
+ color: ${props.theme.colors.neutral600};
1746
+ ` : ""}
1747
+ }
1748
+
1749
+ &:active {
1750
+ ${getActiveStyle}
1751
+ }
1752
+
1753
+ &[aria-disabled='true'] {
1754
+ ${getDisabledStyle}
1755
+ }
1756
+
1757
+ @media (prefers-reduced-motion: no-preference) {
1758
+ transition:
1759
+ ${(props) => props.theme.transitions.backgroundColor},
1760
+ ${(props) => props.theme.transitions.color},
1761
+ border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1762
+ }
1763
+ `;
1764
+ const IconButtonGroup = styledComponents.styled(Flex)`
1765
+ & ${IconButtonWrapper}:first-child {
1766
+ border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
1767
+ }
1768
+
1769
+ & ${IconButtonWrapper}:last-child {
1770
+ border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
1771
+ }
1772
+
1773
+ & ${IconButtonWrapper} {
1774
+ border-radius: 0;
1775
+
1776
+ & + ${IconButtonWrapper} {
1777
+ border-left: none;
1778
+ }
1779
+ }
1780
+ `;
1781
+ const Link = forwardRef(
1782
+ ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1783
+ return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
1784
+ startIcon,
1785
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { textColor: disabled ? "neutral600" : "primary600", children }),
1786
+ endIcon,
1787
+ href && !endIcon && isExternal && /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, {})
1788
+ ] });
1789
+ }
1790
+ );
1791
+ const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
1792
+ display: inline-flex;
1793
+ align-items: center;
1794
+ text-decoration: none;
1795
+ gap: ${({ theme }) => theme.spaces[2]};
1796
+ pointer-events: ${({ disabled }) => disabled ? "none" : void 0};
1797
+
1798
+ svg {
1799
+ font-size: 1rem;
1800
+
1801
+ path {
1802
+ fill: ${({ disabled, theme }) => disabled ? theme.colors.neutral600 : theme.colors.primary600};
1803
+ }
1804
+ }
1805
+
1806
+ &:hover {
1807
+ & > span {
1808
+ color: ${({ theme }) => theme.colors.primary500};
1809
+ }
1544
1810
  }
1545
1811
 
1546
1812
  &:active {
@@ -1551,39 +1817,31 @@ const LinkWrapper$2 = styledComponents.styled(BaseLink)`
1551
1817
  `;
1552
1818
  const MenuRoot = DropdownMenu__namespace.Root;
1553
1819
  const MenuTrigger = React__namespace.forwardRef(
1554
- ({ size, endIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "0.6rem", height: "0.4rem", "aria-hidden": true }), ...props }, ref) => {
1555
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1556
- Button,
1557
- {
1558
- ref,
1559
- type: "button",
1560
- variant: "ghost",
1561
- endIcon,
1562
- paddingTop: size === "S" ? 1 : 2,
1563
- paddingBottom: size === "S" ? 1 : 2,
1564
- paddingLeft: size === "S" ? 3 : 4,
1565
- paddingRight: size === "S" ? 3 : 4,
1566
- ...props
1567
- }
1568
- ) });
1820
+ ({ label, endIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "1.2rem", height: "1.2rem", "aria-hidden": true }), tag = Button, icon, ...rest }, ref) => {
1821
+ const props = {
1822
+ ...rest,
1823
+ ref,
1824
+ type: "button"
1825
+ };
1826
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: tag === IconButton ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { label, variant: "tertiary", ...props, children: icon }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { endIcon, variant: "ghost", ...props }) });
1569
1827
  }
1570
1828
  );
1571
1829
  const MenuContent = React__namespace.forwardRef(
1572
1830
  ({ children, intersectionId, popoverPlacement = "bottom-start", ...props }, ref) => {
1573
1831
  const [side, align] = popoverPlacement.split("-");
1574
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Content, { align, side, loop: true, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1832
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align, side, loop: true, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1575
1833
  Viewport$2,
1576
1834
  {
1577
1835
  ref,
1578
1836
  direction: "column",
1579
- borderStyle: "solid",
1580
- borderWidth: "1px",
1581
1837
  borderColor: "neutral150",
1582
1838
  hasRadius: true,
1583
1839
  background: "neutral0",
1584
1840
  shadow: "filterShadow",
1585
1841
  maxHeight: "15rem",
1586
1842
  padding: 1,
1843
+ marginTop: 1,
1844
+ marginBottom: 1,
1587
1845
  alignItems: "flex-start",
1588
1846
  position: "relative",
1589
1847
  overflow: "auto",
@@ -1605,6 +1863,23 @@ const Viewport$2 = styledComponents.styled(Flex)`
1605
1863
  display: none;
1606
1864
  }
1607
1865
  `;
1866
+ const DropdownMenuContent = styledComponents.styled(DropdownMenu__namespace.Content)`
1867
+ @media (prefers-reduced-motion: no-preference) {
1868
+ animation-duration: ${(props) => props.theme.motion.timings["200"]};
1869
+
1870
+ &[data-state='open'] {
1871
+ animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
1872
+
1873
+ &[data-side='top'] {
1874
+ animation-name: ${ANIMATIONS.slideUpIn};
1875
+ }
1876
+
1877
+ &[data-side='bottom'] {
1878
+ animation-name: ${ANIMATIONS.slideDownIn};
1879
+ }
1880
+ }
1881
+ }
1882
+ `;
1608
1883
  const MenuItem$1 = ({ onSelect, disabled = false, isLink, ...props }) => {
1609
1884
  return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Item, { asChild: true, onSelect, disabled, children: isLink || props.isExternal ? /* @__PURE__ */ jsxRuntime.jsx(OptionLink, { color: "neutral800", ...props, isExternal: props.isExternal ?? false, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: props.children }) }) : /* @__PURE__ */ jsxRuntime.jsx(OptionButton, { cursor: "pointer", color: "neutral800", background: "transparent", borderStyle: "none", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: props.children }) }) });
1610
1885
  };
@@ -1614,7 +1889,7 @@ const getOptionStyle = ({ theme }) => styledComponents.css`
1614
1889
  border-radius: ${theme.borderRadius};
1615
1890
  padding: ${theme.spaces[2]} ${theme.spaces[4]};
1616
1891
 
1617
- &[aria-disabled] {
1892
+ &[aria-disabled='true'] {
1618
1893
  cursor: not-allowed;
1619
1894
  color: ${theme.colors.neutral500};
1620
1895
  }
@@ -1719,37 +1994,41 @@ const Menu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
1719
1994
  SubTrigger,
1720
1995
  Trigger: Trigger$6
1721
1996
  }, Symbol.toStringTag, { value: "Module" }));
1722
- const SimpleMenu = ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }) => {
1723
- const contentRef = React__namespace.useRef(null);
1724
- const [internalIsOpen, setInternalIsOpen] = React__namespace.useState(false);
1725
- const handleReachEnd = (entry) => {
1726
- if (onReachEnd) {
1727
- onReachEnd(entry);
1728
- }
1729
- };
1730
- const handleOpenChange = (isOpen) => {
1731
- if (isOpen && typeof onOpen === "function") {
1732
- onOpen();
1733
- } else if (!isOpen && typeof onClose === "function") {
1734
- onClose();
1735
- }
1736
- setInternalIsOpen(isOpen);
1737
- };
1738
- const generatedId = useId();
1739
- const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
1740
- useIntersection(contentRef, handleReachEnd, {
1741
- selectorToWatch: `#${intersectionId}`,
1742
- /**
1743
- * We need to know when the select is open because only then will viewportRef
1744
- * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
1745
- */
1746
- skipWhen: !internalIsOpen
1747
- });
1748
- return /* @__PURE__ */ jsxRuntime.jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
1749
- /* @__PURE__ */ jsxRuntime.jsx(Trigger$6, { ...props, children: props.label }),
1750
- /* @__PURE__ */ jsxRuntime.jsx(Content$6, { intersectionId, popoverPlacement, children })
1751
- ] });
1752
- };
1997
+ const SimpleMenu = React__namespace.forwardRef(
1998
+ ({ children, onOpen, onClose, popoverPlacement, onReachEnd, ...props }, forwardedRef) => {
1999
+ const triggerRef = React__namespace.useRef(null);
2000
+ const composedRef = useComposedRefs(forwardedRef, triggerRef);
2001
+ const contentRef = React__namespace.useRef(null);
2002
+ const [internalIsOpen, setInternalIsOpen] = React__namespace.useState(false);
2003
+ const handleReachEnd = (entry) => {
2004
+ if (onReachEnd) {
2005
+ onReachEnd(entry);
2006
+ }
2007
+ };
2008
+ const handleOpenChange = (isOpen) => {
2009
+ if (isOpen && typeof onOpen === "function") {
2010
+ onOpen();
2011
+ } else if (!isOpen && typeof onClose === "function") {
2012
+ onClose();
2013
+ }
2014
+ setInternalIsOpen(isOpen);
2015
+ };
2016
+ const generatedId = useId();
2017
+ const intersectionId = `intersection-${stripReactIdOfColon(generatedId)}`;
2018
+ useIntersection(contentRef, handleReachEnd, {
2019
+ selectorToWatch: `#${intersectionId}`,
2020
+ /**
2021
+ * We need to know when the select is open because only then will viewportRef
2022
+ * not be null. Because it uses a portal that (sensibly) is not mounted 24/7.
2023
+ */
2024
+ skipWhen: !internalIsOpen
2025
+ });
2026
+ return /* @__PURE__ */ jsxRuntime.jsxs(Root$7, { onOpenChange: handleOpenChange, children: [
2027
+ /* @__PURE__ */ jsxRuntime.jsx(Trigger$6, { ref: composedRef, ...props, children: props.label }),
2028
+ /* @__PURE__ */ jsxRuntime.jsx(Content$6, { ref: contentRef, intersectionId, popoverPlacement, children })
2029
+ ] });
2030
+ }
2031
+ );
1753
2032
  const MenuItem = Item$3;
1754
2033
  const StyledButton = styledComponents.styled(SimpleMenu)`
1755
2034
  padding: ${({ theme }) => `${theme.spaces[1]} ${theme.spaces[2]}`};
@@ -1760,16 +2039,19 @@ const StyledButton = styledComponents.styled(SimpleMenu)`
1760
2039
  background-color: ${({ theme }) => theme.colors.neutral200};
1761
2040
  }
1762
2041
  `;
1763
- const CrumbSimpleMenu = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(StyledButton, { endIcon: null, size: "S", ...props, children });
2042
+ const CrumbSimpleMenu = React__namespace.forwardRef(
2043
+ ({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledButton, { ref: forwardedRef, endIcon: null, size: "S", ...props, children })
2044
+ );
1764
2045
  CrumbSimpleMenu.displayName = "CrumbSimpleMenu";
1765
2046
  const CardContext = React__namespace.createContext({ id: "" });
1766
2047
  const useCard = () => React__namespace.useContext(CardContext);
1767
- const Card = ({ id, ...props }) => {
2048
+ const Card = React__namespace.forwardRef(({ id, ...props }, forwardedRef) => {
1768
2049
  const generatedId = useId(id);
1769
2050
  const context = React__namespace.useMemo(() => ({ id: generatedId }), [generatedId]);
1770
2051
  return /* @__PURE__ */ jsxRuntime.jsx(CardContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
1771
2052
  Box,
1772
2053
  {
2054
+ ref: forwardedRef,
1773
2055
  id,
1774
2056
  tabIndex: 0,
1775
2057
  hasRadius: true,
@@ -1783,10 +2065,10 @@ const Card = ({ id, ...props }) => {
1783
2065
  ...props
1784
2066
  }
1785
2067
  ) });
1786
- };
1787
- const CardActionImpl = ({ position, ...restProps }) => {
1788
- return /* @__PURE__ */ jsxRuntime.jsx(CardAction, { $position: position, ...restProps, direction: "row", gap: 2 });
1789
- };
2068
+ });
2069
+ const CardActionImpl = React__namespace.forwardRef(({ position, ...restProps }, forwardedRef) => {
2070
+ return /* @__PURE__ */ jsxRuntime.jsx(CardAction, { ref: forwardedRef, $position: position, ...restProps, direction: "row", gap: 2 });
2071
+ });
1790
2072
  const CardAction = styledComponents.styled(Flex)`
1791
2073
  position: absolute;
1792
2074
  top: ${({ theme }) => theme.spaces[3]};
@@ -1837,30 +2119,17 @@ const CardBadge = (props) => /* @__PURE__ */ jsxRuntime.jsx(CardBadgeWrapper, {
1837
2119
  const CardBody = (props) => {
1838
2120
  return /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingLeft: 3, paddingRight: 3, paddingTop: 2, paddingBottom: 2, children: /* @__PURE__ */ jsxRuntime.jsx(Flex, { ...props, alignItems: "flex-start" }) });
1839
2121
  };
1840
- function setRef(ref, value) {
1841
- if (typeof ref === "function") {
1842
- ref(value);
1843
- } else if (ref !== null && ref !== void 0) {
1844
- ref.current = value;
1845
- }
1846
- }
1847
- function composeRefs(...refs) {
1848
- return (node) => refs.forEach((ref) => setRef(ref, node));
1849
- }
1850
- function useComposedRefs(...refs) {
1851
- return React__namespace.useCallback(composeRefs(...refs), refs);
1852
- }
1853
2122
  const CheckIcon = ({ fill, ...props }) => {
1854
2123
  const { colors } = styledComponents.useTheme();
1855
2124
  return /* @__PURE__ */ jsxRuntime.jsx(
1856
2125
  Box,
1857
2126
  {
1858
2127
  tag: "svg",
1859
- viewBox: "0 0 10 8",
2128
+ viewBox: "0 0 32 32",
1860
2129
  xmlns: "http://www.w3.org/2000/svg",
1861
2130
  fill: fill ? colors[fill] : void 0,
1862
2131
  ...props,
1863
- children: /* @__PURE__ */ jsxRuntime.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" })
2132
+ children: /* @__PURE__ */ jsxRuntime.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" })
1864
2133
  }
1865
2134
  );
1866
2135
  };
@@ -1873,9 +2142,9 @@ const CheckboxEl = React__namespace.forwardRef(
1873
2142
  onChange: onCheckedChange
1874
2143
  });
1875
2144
  const composedRefs = useComposedRefs(checkboxRef, forwardedRef);
1876
- return /* @__PURE__ */ jsxRuntime.jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Checkbox__namespace.Indicator, { children: [
1877
- checked === true ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { width: "1rem", fill: "neutral0" }) : null,
1878
- checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(Box, { height: "2px", width: "1rem", background: "neutral0", borderRadius: "1px" }) : null
2145
+ return /* @__PURE__ */ jsxRuntime.jsx(CheckboxRoot, { ref: composedRefs, checked, onCheckedChange: setChecked, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Checkbox__namespace.Indicator, { style: { display: "inline-flex" }, children: [
2146
+ checked === true ? /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { width: "1.6rem", fill: "neutral0" }) : null,
2147
+ checked === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(icons.Minus, { fill: "neutral0" }) : null
1879
2148
  ] }) });
1880
2149
  }
1881
2150
  );
@@ -1893,12 +2162,6 @@ const CheckboxRoot = styledComponents.styled(Checkbox__namespace.Root)`
1893
2162
  // this ensures the checkbox is always a square even in flex-containers.
1894
2163
  flex: 0 0 2rem;
1895
2164
 
1896
- @media (prefers-reduced-motion: no-preference) {
1897
- transition:
1898
- border-color ${(props) => props.theme.motion.timings["120"]} ${(props) => props.theme.motion.easings.easeOutQuad},
1899
- ${(props) => props.theme.transitions.backgroundColor};
1900
- }
1901
-
1902
2165
  &[data-state='checked'],
1903
2166
  &[data-state='indeterminate'] {
1904
2167
  border: 1px solid ${(props) => props.theme.colors.primary600};
@@ -1932,10 +2195,10 @@ const CheckboxImpl = React__namespace.forwardRef(({ children, ...restProps }, fo
1932
2195
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { tag: "label", textColor: "neutral800", htmlFor: labelId, children })
1933
2196
  ] });
1934
2197
  });
1935
- const CardCheckbox = (props) => {
2198
+ const CardCheckbox = React__namespace.forwardRef((props, forwardedRef) => {
1936
2199
  const { id } = useCard();
1937
- return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props }) });
1938
- };
2200
+ return /* @__PURE__ */ jsxRuntime.jsx(CardActionImpl, { position: "start", children: /* @__PURE__ */ jsxRuntime.jsx(CheckboxImpl, { "aria-labelledby": `${id}-title`, ...props, ref: forwardedRef }) });
2201
+ });
1939
2202
  const BreakBox = styledComponents.styled(Box)`
1940
2203
  word-break: break-all;
1941
2204
  `;
@@ -1987,49 +2250,6 @@ const KeyboardKeys = {
1987
2250
  BACKSPACE: "Backspace",
1988
2251
  CLEAR: "Clear"
1989
2252
  };
1990
- const TooltipImpl = React__namespace.forwardRef(
1991
- ({
1992
- children,
1993
- description,
1994
- label,
1995
- defaultOpen,
1996
- open,
1997
- onOpenChange,
1998
- delayDuration = 500,
1999
- disableHoverableContent,
2000
- ...restProps
2001
- }, forwardedRef) => {
2002
- return /* @__PURE__ */ jsxRuntime.jsxs(
2003
- Tooltip__namespace.Root,
2004
- {
2005
- defaultOpen,
2006
- open,
2007
- onOpenChange,
2008
- delayDuration,
2009
- disableHoverableContent,
2010
- children: [
2011
- /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Trigger, { asChild: true, children }),
2012
- /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipContent, { ref: forwardedRef, sideOffset: 8, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", fontWeight: "bold", children: label || description }) }) })
2013
- ]
2014
- }
2015
- );
2016
- }
2017
- );
2018
- const TooltipContent = styledComponents.styled(Tooltip__namespace.Content)`
2019
- background-color: ${(props) => props.theme.colors.neutral900};
2020
- color: ${(props) => props.theme.colors.neutral0};
2021
- padding-inline: ${(props) => props.theme.spaces[2]};
2022
- padding-block: ${(props) => props.theme.spaces[2]};
2023
- border-radius: ${(props) => props.theme.borderRadius};
2024
- z-index: ${(props) => props.theme.zIndices.tooltip};
2025
- will-change: opacity;
2026
- transform-origin: var(--radix-tooltip-content-transform-origin);
2027
-
2028
- @media (prefers-reduced-motion: no-preference) {
2029
- animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings["200"]}
2030
- ${(props) => props.theme.motion.easings.authenticMotion};
2031
- }
2032
- `;
2033
2253
  const CarouselGrid = styledComponents.styled(Box)`
2034
2254
  grid-template-columns: auto 1fr auto;
2035
2255
  grid-template-areas: 'startAction slides endAction';
@@ -2124,9 +2344,11 @@ const commonTheme = {
2124
2344
  },
2125
2345
  spaces: ["0px", "4px", "8px", "12px", "16px", "20px", "24px", "32px", "40px", "48px", "56px", "64px"],
2126
2346
  borderRadius: "4px",
2127
- mediaQueries: {
2128
- tablet: `@media (max-width: 1100px)`,
2129
- mobile: `@media (max-width: 550px)`
2347
+ breakpoints: {
2348
+ initial: "@media(min-width: 0px)",
2349
+ small: "@media(min-width: 520px)",
2350
+ medium: "@media(min-width: 768px)",
2351
+ large: "@media(min-width: 1080px)"
2130
2352
  },
2131
2353
  fontSizes: [`1.1rem`, `1.2rem`, `1.4rem`, "1.6rem", `1.8rem`, `3.2rem`],
2132
2354
  lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5],
@@ -2967,7 +3189,7 @@ lodash.exports;
2967
3189
  }
2968
3190
  var runInContext = function runInContext2(context) {
2969
3191
  context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
2970
- 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;
3192
+ 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;
2971
3193
  var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
2972
3194
  var coreJsData = context["__core-js_shared__"];
2973
3195
  var funcToString = funcProto.toString;
@@ -2993,7 +3215,7 @@ lodash.exports;
2993
3215
  }
2994
3216
  }();
2995
3217
  var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
2996
- 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;
3218
+ 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;
2997
3219
  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");
2998
3220
  var metaMap = WeakMap && new WeakMap();
2999
3221
  var realNames = {};
@@ -4739,7 +4961,7 @@ lodash.exports;
4739
4961
  return setWrapToString(result2, func, bitmask);
4740
4962
  }
4741
4963
  function createRound(methodName) {
4742
- var func = Math[methodName];
4964
+ var func = Math2[methodName];
4743
4965
  return function(number2, precision) {
4744
4966
  number2 = toNumber(number2);
4745
4967
  precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
@@ -7830,10 +8052,9 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7830
8052
  return null;
7831
8053
  }
7832
8054
  return /* @__PURE__ */ jsxRuntime.jsxs(
7833
- Typography,
8055
+ TypographyLabel,
7834
8056
  {
7835
8057
  ref: composedRefs,
7836
- display: "flex",
7837
8058
  variant: "pi",
7838
8059
  textColor: "neutral800",
7839
8060
  fontWeight: "bold",
@@ -7841,6 +8062,7 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7841
8062
  id: `${id}-label`,
7842
8063
  htmlFor: id,
7843
8064
  tag: "label",
8065
+ ellipsis: true,
7844
8066
  children: [
7845
8067
  children,
7846
8068
  required && /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "1em", textColor: "danger600", children: "*" }),
@@ -7849,6 +8071,9 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7849
8071
  }
7850
8072
  );
7851
8073
  });
8074
+ const TypographyLabel = styledComponents.styled(Typography)`
8075
+ display: flex;
8076
+ `;
7852
8077
  const LabelAction = styledComponents.styled(Flex)`
7853
8078
  line-height: 0;
7854
8079
  color: ${({ theme }) => theme.colors.neutral500};
@@ -7862,6 +8087,7 @@ const Input$2 = React__namespace.forwardRef(
7862
8087
  hasError: hasErrorProp,
7863
8088
  required: requiredProp,
7864
8089
  className,
8090
+ size = "M",
7865
8091
  ...props
7866
8092
  }, ref) => {
7867
8093
  const { id, error, hint, name, required } = useField("Input");
@@ -7872,22 +8098,34 @@ const Input$2 = React__namespace.forwardRef(
7872
8098
  ariaDescription = `${id}-hint`;
7873
8099
  }
7874
8100
  const hasError = Boolean(error);
8101
+ const endActionRef = React__namespace.useRef(null);
8102
+ const inputElementRef = React__namespace.useRef(null);
8103
+ const inputRef = useComposedRefs(inputElementRef, ref);
7875
8104
  const handleChange = (e) => {
7876
8105
  if (!disabled && onChange) {
7877
8106
  onChange(e);
7878
8107
  }
7879
8108
  };
8109
+ React__namespace.useLayoutEffect(() => {
8110
+ if (endActionRef.current && inputElementRef.current) {
8111
+ const endActionWidth = endActionRef.current.offsetWidth;
8112
+ const inputElement = inputElementRef.current;
8113
+ if (inputElement) {
8114
+ const inputPadding = endActionWidth + 8 + 16;
8115
+ inputElement.style.paddingRight = `${inputPadding}px`;
8116
+ }
8117
+ }
8118
+ }, [endAction]);
7880
8119
  return /* @__PURE__ */ jsxRuntime.jsxs(
7881
8120
  InputWrapper,
7882
8121
  {
7883
- paddingLeft: 3,
7884
- paddingRight: 3,
7885
- paddingTop: 2,
7886
- paddingBottom: 2,
7887
8122
  gap: 2,
7888
8123
  justifyContent: "space-between",
7889
8124
  $hasError: hasError || hasErrorProp,
7890
8125
  $disabled: disabled,
8126
+ $size: size,
8127
+ $hasLeftAction: Boolean(startAction),
8128
+ $hasRightAction: Boolean(endAction),
7891
8129
  className,
7892
8130
  children: [
7893
8131
  startAction,
@@ -7896,20 +8134,21 @@ const Input$2 = React__namespace.forwardRef(
7896
8134
  {
7897
8135
  id,
7898
8136
  name,
7899
- ref,
8137
+ ref: inputRef,
8138
+ $size: size,
7900
8139
  "aria-describedby": ariaDescription,
7901
8140
  "aria-invalid": hasError || hasErrorProp,
7902
8141
  "aria-disabled": disabled,
7903
8142
  disabled,
7904
8143
  "data-disabled": disabled ? "" : void 0,
7905
- $hasLeftAction: Boolean(startAction),
7906
- $hasRightAction: Boolean(endAction),
7907
8144
  onChange: handleChange,
7908
8145
  "aria-required": required || requiredProp,
8146
+ $hasLeftAction: Boolean(startAction),
8147
+ $hasRightAction: Boolean(endAction),
7909
8148
  ...props
7910
8149
  }
7911
8150
  ),
7912
- endAction
8151
+ endAction && /* @__PURE__ */ jsxRuntime.jsx(EndAction, { ref: endActionRef, children: endAction })
7913
8152
  ]
7914
8153
  }
7915
8154
  );
@@ -7942,17 +8181,42 @@ const InputElement = styledComponents.styled.input`
7942
8181
  outline: none;
7943
8182
  box-shadow: none;
7944
8183
  }
8184
+
8185
+ ${(props) => {
8186
+ switch (props.$size) {
8187
+ case "S":
8188
+ return styledComponents.css`
8189
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8190
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8191
+ padding-block: ${props.theme.spaces[1]};
8192
+ `;
8193
+ default:
8194
+ return styledComponents.css`
8195
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8196
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8197
+ padding-block: ${props.theme.spaces[2]};
8198
+ `;
8199
+ }
8200
+ }}
8201
+ `;
8202
+ const EndAction = styledComponents.styled(Flex)`
8203
+ position: absolute;
8204
+ right: ${({ theme }) => theme.spaces[4]};
8205
+ top: 50%;
8206
+ transform: translateY(-50%);
7945
8207
  `;
7946
8208
  const InputWrapper = styledComponents.styled(Flex)`
7947
8209
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
7948
8210
  border-radius: ${({ theme }) => theme.borderRadius};
7949
8211
  background: ${({ theme }) => theme.colors.neutral0};
7950
- ${inputFocusStyle()}
8212
+ padding-inline-start: ${({ $hasLeftAction, theme }) => $hasLeftAction ? theme.spaces[4] : 0};
8213
+ position: relative;
7951
8214
 
8215
+ ${inputFocusStyle()}
7952
8216
  ${({ theme, $disabled }) => $disabled ? styledComponents.css`
7953
8217
  color: ${theme.colors.neutral600};
7954
8218
  background: ${theme.colors.neutral150};
7955
- ` : void 0}
8219
+ ` : void 0};
7956
8220
  `;
7957
8221
  const Hint = () => {
7958
8222
  const { id, hint, error } = useField("Hint");
@@ -8131,6 +8395,7 @@ const Combobox = React__namespace.forwardRef(
8131
8395
  onLoadMore,
8132
8396
  placeholder = "Select or enter a value",
8133
8397
  required: requiredProp = false,
8398
+ size = "M",
8134
8399
  startIcon,
8135
8400
  textValue,
8136
8401
  value,
@@ -8230,9 +8495,9 @@ const Combobox = React__namespace.forwardRef(
8230
8495
  onFilterValueChange: handleFilterValueChange,
8231
8496
  isPrintableCharacter: isPrintableCharacter2,
8232
8497
  children: [
8233
- /* @__PURE__ */ jsxRuntime.jsxs(Trigger$5, { $hasError: hasError, className, children: [
8498
+ /* @__PURE__ */ jsxRuntime.jsxs(Trigger$5, { $hasError: hasError, $size: size, className, children: [
8234
8499
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8235
- startIcon ? /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
8500
+ startIcon ? /* @__PURE__ */ jsxRuntime.jsx(Flex, { flex: "0 0 1.6rem", tag: "span", "aria-hidden": true, children: startIcon }) : null,
8236
8501
  /* @__PURE__ */ jsxRuntime.jsx(
8237
8502
  TextInput$1,
8238
8503
  {
@@ -8266,7 +8531,7 @@ const Combobox = React__namespace.forwardRef(
8266
8531
  children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {})
8267
8532
  }
8268
8533
  ) : null,
8269
- /* @__PURE__ */ jsxRuntime.jsx(DownIcon$1, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}) })
8534
+ /* @__PURE__ */ jsxRuntime.jsx(DownIcon$1, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { fill: "neutral500" }) })
8270
8535
  ] })
8271
8536
  ] }),
8272
8537
  /* @__PURE__ */ jsxRuntime.jsx(uiPrimitives.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Content$5, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(Viewport$1, { ref: viewportRef, children: [
@@ -8295,10 +8560,6 @@ const IconBox$3 = styledComponents.styled(Box)`
8295
8560
  const Trigger$5 = styledComponents.styled(uiPrimitives.Combobox.Trigger)`
8296
8561
  position: relative;
8297
8562
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
8298
- padding-right: ${({ theme }) => theme.spaces[3]};
8299
- padding-left: ${({ theme }) => theme.spaces[3]};
8300
- padding-top: ${({ theme }) => theme.spaces[2]};
8301
- padding-bottom: ${({ theme }) => theme.spaces[2]};
8302
8563
  border-radius: ${({ theme }) => theme.borderRadius};
8303
8564
  background: ${({ theme }) => theme.colors.neutral0};
8304
8565
  overflow: hidden;
@@ -8307,6 +8568,23 @@ const Trigger$5 = styledComponents.styled(uiPrimitives.Combobox.Trigger)`
8307
8568
  justify-content: space-between;
8308
8569
  gap: ${({ theme }) => theme.spaces[4]};
8309
8570
 
8571
+ ${(props) => {
8572
+ switch (props.$size) {
8573
+ case "S":
8574
+ return styledComponents.css`
8575
+ padding-inline-start: ${({ theme }) => theme.spaces[4]};
8576
+ padding-inline-end: ${({ theme }) => theme.spaces[3]};
8577
+ padding-block: ${({ theme }) => theme.spaces[1]};
8578
+ `;
8579
+ default:
8580
+ return styledComponents.css`
8581
+ padding-inline-start: ${({ theme }) => theme.spaces[4]};
8582
+ padding-inline-end: ${({ theme }) => theme.spaces[3]};
8583
+ padding-block: ${({ theme }) => theme.spaces[2]};
8584
+ `;
8585
+ }
8586
+ }}
8587
+
8310
8588
  &[data-disabled] {
8311
8589
  color: ${({ theme }) => theme.colors.neutral600};
8312
8590
  background: ${({ theme }) => theme.colors.neutral150};
@@ -8342,6 +8620,7 @@ const DownIcon$1 = styledComponents.styled(uiPrimitives.Combobox.Icon)`
8342
8620
  background: transparent;
8343
8621
  padding: 0;
8344
8622
  color: ${({ theme }) => theme.colors.neutral600};
8623
+ display: flex;
8345
8624
 
8346
8625
  &[aria-disabled='true'] {
8347
8626
  cursor: inherit;
@@ -8365,11 +8644,11 @@ const Content$5 = styledComponents.styled(uiPrimitives.Combobox.Content)`
8365
8644
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8366
8645
 
8367
8646
  &[data-side='top'] {
8368
- animation-name: ${ANIMATIONS.slideDownIn};
8647
+ animation-name: ${ANIMATIONS.slideUpIn};
8369
8648
  }
8370
8649
 
8371
8650
  &[data-side='bottom'] {
8372
- animation-name: ${ANIMATIONS.slideUpIn};
8651
+ animation-name: ${ANIMATIONS.slideDownIn};
8373
8652
  }
8374
8653
  }
8375
8654
  }
@@ -8465,19 +8744,7 @@ const ContentImpl$1 = styledComponents.styled(AlertDialog__namespace.Content)`
8465
8744
  }
8466
8745
  `;
8467
8746
  const Header$1 = React__namespace.forwardRef(({ children, ...restProps }, forwardedRef) => {
8468
- return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
8469
- Title$1,
8470
- {
8471
- tag: "h2",
8472
- ref: forwardedRef,
8473
- padding: 6,
8474
- justifyContent: "center",
8475
- variant: "h2",
8476
- fontWeight: "bold",
8477
- ...restProps,
8478
- children
8479
- }
8480
- ) });
8747
+ return /* @__PURE__ */ jsxRuntime.jsx(AlertDialog__namespace.Title, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Title$1, { tag: "h2", variant: "beta", ref: forwardedRef, padding: 6, fontWeight: "bold", ...restProps, children }) });
8481
8748
  });
8482
8749
  const Title$1 = styledComponents.styled(Typography)`
8483
8750
  display: flex;
@@ -8651,8 +8918,7 @@ ${styledComponents.css`
8651
8918
  img,
8652
8919
  picture,
8653
8920
  video,
8654
- canvas,
8655
- svg {
8921
+ canvas {
8656
8922
  display: block;
8657
8923
  max-width: 100%;
8658
8924
  }
@@ -8767,7 +9033,7 @@ const Portal$1 = React__namespace.forwardRef(
8767
9033
  );
8768
9034
  Portal$1.displayName = "Portal";
8769
9035
  const SelectTrigger = React__namespace.forwardRef(
8770
- ({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, ...restProps }, ref) => {
9036
+ ({ onClear, clearLabel = "Clear", startIcon, disabled, hasError, children, id, size = "M", withTags, ...restProps }, ref) => {
8771
9037
  const triggerRef = React__namespace.useRef(null);
8772
9038
  const handleClearClick = (e) => {
8773
9039
  if (onClear && !disabled) {
@@ -8789,17 +9055,15 @@ const SelectTrigger = React__namespace.forwardRef(
8789
9055
  overflow: "hidden",
8790
9056
  hasRadius: true,
8791
9057
  background: disabled ? "neutral150" : "neutral0",
8792
- paddingLeft: 3,
8793
- paddingRight: 3,
8794
- paddingTop: 2,
8795
- paddingBottom: 2,
8796
9058
  gap: 4,
8797
9059
  cursor: "default",
8798
9060
  "aria-labelledby": labelNode ? `${id}-label` : void 0,
9061
+ $size: size,
9062
+ $withTags: withTags,
8799
9063
  ...restProps,
8800
9064
  children: [
8801
9065
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8802
- startIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9066
+ startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { tag: "span", "aria-hidden": true, children: startIcon }),
8803
9067
  children
8804
9068
  ] }),
8805
9069
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { tag: "span", gap: 3, children: [
@@ -8828,6 +9092,7 @@ const SelectTrigger = React__namespace.forwardRef(
8828
9092
  );
8829
9093
  const IconBox$2 = styledComponents.styled(Box)`
8830
9094
  border: none;
9095
+ display: flex;
8831
9096
 
8832
9097
  svg {
8833
9098
  height: 1.1rem;
@@ -8835,14 +9100,30 @@ const IconBox$2 = styledComponents.styled(Box)`
8835
9100
  }
8836
9101
 
8837
9102
  svg path {
8838
- fill: ${({ theme }) => theme.colors.neutral600};
9103
+ fill: ${({ theme }) => theme.colors.neutral500};
8839
9104
  }
8840
9105
  `;
8841
9106
  const StyledTrigger = styledComponents.styled(Flex)`
8842
9107
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
9108
+ ${(props) => {
9109
+ switch (props.$size) {
9110
+ case "S":
9111
+ return styledComponents.css`
9112
+ padding-block: ${props.theme.spaces[1]};
9113
+ padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
9114
+ padding-inline-end: ${props.theme.spaces[3]};
9115
+ `;
9116
+ default:
9117
+ return styledComponents.css`
9118
+ padding-block: ${props.$withTags ? "0.3rem" : props.theme.spaces[2]};
9119
+ padding-inline-start: ${props.$withTags ? props.theme.spaces[1] : props.theme.spaces[4]};
9120
+ padding-inline-end: ${props.theme.spaces[3]};
9121
+ `;
9122
+ }
9123
+ }}
8843
9124
 
8844
9125
  &[aria-disabled='true'] {
8845
- color: ${(props) => props.theme.colors.neutral600};
9126
+ color: ${(props) => props.theme.colors.neutral500};
8846
9127
  }
8847
9128
 
8848
9129
  /* Required to ensure the below inputFocusStyles are adhered too */
@@ -8853,8 +9134,9 @@ const StyledTrigger = styledComponents.styled(Flex)`
8853
9134
  ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};
8854
9135
  `;
8855
9136
  const DownIcon = styledComponents.styled(uiPrimitives.Select.Icon)`
9137
+ display: flex;
8856
9138
  & > svg {
8857
- fill: ${({ theme }) => theme.colors.neutral600};
9139
+ fill: ${({ theme }) => theme.colors.neutral500};
8858
9140
  }
8859
9141
  `;
8860
9142
  const SelectValue = React__namespace.forwardRef(({ children, placeholder, ...restProps }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ValueType, { ref, ellipsis: true, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(StyledValue, { placeholder, children }) }));
@@ -8874,8 +9156,7 @@ const SelectContent = styledComponents.styled(uiPrimitives.Select.Content)`
8874
9156
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
8875
9157
  border-radius: ${({ theme }) => theme.borderRadius};
8876
9158
  min-width: var(--radix-select-trigger-width);
8877
- /* This is from the design-system figma file. */
8878
- max-height: 15rem;
9159
+ max-height: 15.6rem;
8879
9160
  z-index: ${({ theme }) => theme.zIndices.popover};
8880
9161
 
8881
9162
  @media (prefers-reduced-motion: no-preference) {
@@ -8886,11 +9167,11 @@ const SelectContent = styledComponents.styled(uiPrimitives.Select.Content)`
8886
9167
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8887
9168
 
8888
9169
  &[data-side='top'] {
8889
- animation-name: ${ANIMATIONS.slideDownIn};
9170
+ animation-name: ${ANIMATIONS.slideUpIn};
8890
9171
  }
8891
9172
 
8892
9173
  &[data-side='bottom'] {
8893
- animation-name: ${ANIMATIONS.slideUpIn};
9174
+ animation-name: ${ANIMATIONS.slideDownIn};
8894
9175
  }
8895
9176
  }
8896
9177
  }
@@ -8959,6 +9240,7 @@ const SingleSelect = React__namespace.forwardRef(
8959
9240
  onReachEnd,
8960
9241
  placeholder,
8961
9242
  required: requiredProp,
9243
+ size,
8962
9244
  startIcon,
8963
9245
  value: passedValue,
8964
9246
  ...restProps
@@ -9034,6 +9316,7 @@ const SingleSelect = React__namespace.forwardRef(
9034
9316
  onClear: value && onClear ? handleOnClear : void 0,
9035
9317
  "aria-label": restProps["aria-label"],
9036
9318
  "aria-describedby": ariaDescription ?? restProps["aria-describedby"],
9319
+ size,
9037
9320
  children: /* @__PURE__ */ jsxRuntime.jsx(Value, { placeholder, textColor: value ? "neutral800" : "neutral600", children: value && customizeContent ? customizeContent(value) : void 0 })
9038
9321
  }
9039
9322
  ),
@@ -9050,7 +9333,7 @@ const SingleSelectOption = React__namespace.forwardRef(
9050
9333
  ({ value, startIcon, children, ...restProps }, ref) => {
9051
9334
  return /* @__PURE__ */ jsxRuntime.jsxs(Item$2, { ref, value: value.toString(), ...restProps, children: [
9052
9335
  startIcon && /* @__PURE__ */ jsxRuntime.jsx(Box, { tag: "span", "aria-hidden": true, children: startIcon }),
9053
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
9336
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { lineHeight: "20px", children: /* @__PURE__ */ jsxRuntime.jsx(ItemText, { children }) })
9054
9337
  ] });
9055
9338
  }
9056
9339
  );
@@ -9082,6 +9365,7 @@ const DatePicker$1 = React__namespace.forwardRef(
9082
9365
  required: requiredProp = false,
9083
9366
  onClear,
9084
9367
  clearLabel = "Clear",
9368
+ size = "M",
9085
9369
  ...restProps
9086
9370
  }, ref) => {
9087
9371
  const timeZone = date.getLocalTimeZone();
@@ -9192,7 +9476,7 @@ const DatePicker$1 = React__namespace.forwardRef(
9192
9476
  trigger,
9193
9477
  value,
9194
9478
  children: [
9195
- /* @__PURE__ */ jsxRuntime.jsxs(DatePickerTrigger, { className, hasError, children: [
9479
+ /* @__PURE__ */ jsxRuntime.jsxs(DatePickerTrigger, { className, hasError, size, children: [
9196
9480
  /* @__PURE__ */ jsxRuntime.jsx(icons.Calendar, { fill: "neutral500", "aria-hidden": true }),
9197
9481
  /* @__PURE__ */ jsxRuntime.jsx(DatePickerTextInput, { ref, "aria-describedby": ariaDescription, id, name, ...restProps }),
9198
9482
  textValue && onClear ? /* @__PURE__ */ jsxRuntime.jsx(
@@ -9238,7 +9522,7 @@ const makeInitialCalendarDate = ({ currentValue, minDate, maxDate }) => {
9238
9522
  };
9239
9523
  const DATE_PICKER_TRIGGER_NAME = "DatePickerTrigger";
9240
9524
  const DatePickerTrigger = React__namespace.forwardRef(
9241
- ({ hasError, ...restProps }, forwardedRef) => {
9525
+ ({ hasError, size, ...restProps }, forwardedRef) => {
9242
9526
  const context = useDatePickerContext(DATE_PICKER_TRIGGER_NAME);
9243
9527
  const composedRefs = useComposedRefs(forwardedRef, (node) => context.onTriggerChange(node));
9244
9528
  const handleOpenChange = () => {
@@ -9263,9 +9547,8 @@ const DatePickerTrigger = React__namespace.forwardRef(
9263
9547
  {
9264
9548
  ref: composedRefs,
9265
9549
  $hasError: hasError,
9550
+ $size: size,
9266
9551
  ...restProps,
9267
- paddingLeft: 3,
9268
- paddingRight: 3,
9269
9552
  hasRadius: true,
9270
9553
  gap: 3,
9271
9554
  overflow: "hidden",
@@ -9295,11 +9578,24 @@ const DatePickerTrigger = React__namespace.forwardRef(
9295
9578
  );
9296
9579
  const TriggerElement = styledComponents.styled(Flex)`
9297
9580
  border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
9298
- padding-block: ${({ theme }) => theme.spaces[2]};
9299
-
9300
- & > svg {
9301
- flex: 1 0 auto;
9302
- }
9581
+ ${(props) => {
9582
+ switch (props.$size) {
9583
+ case "S":
9584
+ return styledComponents.css`
9585
+ padding-block: ${props.theme.spaces[1]};
9586
+ padding-inline: ${props.theme.spaces[3]};
9587
+ `;
9588
+ default:
9589
+ return styledComponents.css`
9590
+ padding-block: ${props.theme.spaces[2]};
9591
+ padding-inline: ${props.theme.spaces[3]};
9592
+ `;
9593
+ }
9594
+ }}
9595
+
9596
+ & > svg {
9597
+ flex: 1 0 auto;
9598
+ }
9303
9599
 
9304
9600
  &[data-disabled] {
9305
9601
  color: ${({ theme }) => theme.colors.neutral600};
@@ -9533,7 +9829,7 @@ const DatePickerContentImpl = React__namespace.forwardRef(
9533
9829
  (props, forwardedRef) => {
9534
9830
  const { label = "Choose date", ...restProps } = props;
9535
9831
  const { onOpenChange, ...context } = useDatePickerContext(CONTENT_IMPL_NAME);
9536
- const { x, y, refs, strategy } = reactDom$1.useFloating({
9832
+ const { x, y, refs, strategy, placement } = reactDom$1.useFloating({
9537
9833
  strategy: "fixed",
9538
9834
  placement: "bottom-start",
9539
9835
  middleware: [
@@ -9580,6 +9876,7 @@ const DatePickerContentImpl = React__namespace.forwardRef(
9580
9876
  {
9581
9877
  ref: composedRefs,
9582
9878
  "data-state": context.open ? "open" : "closed",
9879
+ "data-side": placement.includes("top") ? "top" : "bottom",
9583
9880
  onContextMenu: (event) => event.preventDefault(),
9584
9881
  id: context.contentId,
9585
9882
  role: "dialog",
@@ -9604,6 +9901,22 @@ const ContentElement = styledComponents.styled(Box)`
9604
9901
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
9605
9902
  z-index: ${({ theme }) => theme.zIndices.popover};
9606
9903
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
9904
+
9905
+ @media (prefers-reduced-motion: no-preference) {
9906
+ animation-duration: ${(props) => props.theme.motion.timings["200"]};
9907
+
9908
+ &[data-state='open'] {
9909
+ animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
9910
+
9911
+ &[data-side='top'] {
9912
+ animation-name: ${ANIMATIONS.slideUpIn};
9913
+ }
9914
+
9915
+ &[data-side='bottom'] {
9916
+ animation-name: ${ANIMATIONS.slideDownIn};
9917
+ }
9918
+ }
9919
+ }
9607
9920
  `;
9608
9921
  const DATE_PICKER_CALENDAR_NAME = "DatePickerCalendar";
9609
9922
  const DatePickerCalendar = React__namespace.forwardRef(
@@ -9912,6 +10225,7 @@ const DateTimePicker = React__namespace.forwardRef(
9912
10225
  step,
9913
10226
  value,
9914
10227
  initialDate,
10228
+ size,
9915
10229
  ...props
9916
10230
  }, forwardedRef) => {
9917
10231
  const DatePickerElement2 = React__namespace.useRef(null);
@@ -9971,6 +10285,7 @@ const DateTimePicker = React__namespace.forwardRef(
9971
10285
  DatePicker,
9972
10286
  {
9973
10287
  ...props,
10288
+ size,
9974
10289
  value: dateValue?.toDate("UTC"),
9975
10290
  onChange: handleDateChange,
9976
10291
  required,
@@ -9984,6 +10299,7 @@ const DateTimePicker = React__namespace.forwardRef(
9984
10299
  /* @__PURE__ */ jsxRuntime.jsx(Root$6, { children: /* @__PURE__ */ jsxRuntime.jsx(
9985
10300
  TimePicker,
9986
10301
  {
10302
+ size,
9987
10303
  hasError,
9988
10304
  value: timeValue,
9989
10305
  onChange: handleTimeChange,
@@ -10030,238 +10346,27 @@ const EmptyStateIconWrapper = styledComponents.styled(Box)`
10030
10346
  height: 8.8rem;
10031
10347
  }
10032
10348
  `;
10033
- const EmptyStateLayout = ({
10034
- icon,
10035
- content,
10036
- action,
10037
- hasRadius = true,
10038
- shadow = "tableShadow"
10039
- }) => {
10040
- return /* @__PURE__ */ jsxRuntime.jsxs(
10041
- Flex,
10042
- {
10043
- alignItems: "center",
10044
- direction: "column",
10045
- padding: 11,
10046
- background: "neutral0",
10047
- hasRadius,
10048
- shadow,
10049
- children: [
10050
- icon ? /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10051
- /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10052
- action
10053
- ]
10054
- }
10055
- );
10056
- };
10057
- const getFocusableNodes = (node, includeNegativeTabIndex) => {
10058
- const nodes = [
10059
- ...node.querySelectorAll(
10060
- 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
10061
- )
10062
- ];
10063
- const focusables = nodes.filter((node2) => {
10064
- if (node2.hasAttribute("disabled"))
10065
- return false;
10066
- if (includeNegativeTabIndex)
10067
- return true;
10068
- return node2.getAttribute("tabindex") !== "-1";
10069
- });
10070
- return focusables;
10071
- };
10072
- const getFocusableNodesWithKeyboardNav = (nodes) => {
10073
- return nodes.filter((node) => {
10074
- if (node.tagName === "INPUT") {
10075
- return node.type !== "checkbox" && node.type !== "radio";
10076
- }
10077
- return false;
10078
- });
10079
- };
10080
- const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
10081
- const trappedRef = React__namespace.useRef(null);
10082
- React__namespace.useEffect(() => {
10083
- let currentFocus = null;
10084
- if (restoreFocus) {
10085
- currentFocus = document.activeElement;
10086
- }
10087
- return () => {
10088
- if (currentFocus) {
10089
- currentFocus.focus();
10090
- }
10091
- };
10092
- }, [restoreFocus]);
10093
- React__namespace.useEffect(() => {
10094
- if (!trappedRef.current || skipAutoFocus)
10095
- return;
10096
- const focusableChildren = getFocusableNodes(trappedRef.current);
10097
- if (focusableChildren.length > 0) {
10098
- const firstElement = focusableChildren[0];
10099
- firstElement.focus();
10100
- } else {
10101
- console.warn(
10102
- "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
10103
- );
10104
- }
10105
- }, [skipAutoFocus]);
10106
- const handleKeyDown = (e) => {
10107
- if (e.key === KeyboardKeys.ESCAPE && onEscape) {
10108
- onEscape();
10109
- return;
10110
- }
10111
- if (e.key !== KeyboardKeys.TAB)
10112
- return;
10113
- const focusableChildren = getFocusableNodes(trappedRef.current);
10114
- if (focusableChildren.length > 0) {
10115
- const firstElement = focusableChildren[0];
10116
- const lastElement = focusableChildren[focusableChildren.length - 1];
10117
- if (e.shiftKey) {
10118
- if (firstElement === document.activeElement) {
10119
- e.preventDefault();
10120
- lastElement.focus();
10121
- }
10122
- } else if (lastElement === document.activeElement) {
10123
- e.preventDefault();
10124
- firstElement.focus();
10125
- }
10126
- }
10127
- };
10128
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
10129
- };
10130
- const Root$3 = forwardRef((props, forwardedRef) => {
10131
- const { gap = 0, gridCols = 12, ...rest } = props;
10132
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
10133
- });
10134
- const Wrapper$1 = styledComponents.styled(Box)`
10135
- display: grid;
10136
- grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
10137
- ${({ theme, $gap }) => handleResponsiveValues("gap", $gap, theme)}
10138
- `;
10139
- const ItemImpl = forwardRef(
10140
- ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
10141
- );
10142
- const Item$1 = styledComponents.styled(Box)`
10143
- grid-column: span ${({ $col }) => $col ?? 1};
10144
- max-width: 100%;
10145
-
10146
- ${({ theme }) => theme.mediaQueries.tablet} {
10147
- grid-column: span ${({ $s }) => $s};
10148
- }
10149
-
10150
- ${({ theme }) => theme.mediaQueries.mobile} {
10151
- grid-column: span ${({ $xs }) => $xs};
10152
- }
10153
- `;
10154
- const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10155
- __proto__: null,
10156
- Item: ItemImpl,
10157
- Root: Root$3
10158
- }, Symbol.toStringTag, { value: "Module" }));
10159
- const VARIANT_DEFAULT = "tertiary";
10160
- const VARIANT_SECONDARY = "secondary";
10161
- const SIZES = ["S", "M", "L"];
10162
- const VARIANTS = [VARIANT_DEFAULT, VARIANT_SECONDARY];
10163
- const IconButton = forwardRef(
10164
- ({
10165
- label,
10166
- background,
10167
- children,
10168
- disabled = false,
10169
- onClick,
10170
- size = SIZES[0],
10171
- variant: variant2 = VARIANTS[0],
10172
- withTooltip = true,
10173
- ...restProps
10174
- }, ref) => {
10175
- const handleClick = (e) => {
10176
- if (!disabled && onClick) {
10177
- onClick(e);
10178
- }
10179
- };
10180
- const component = /* @__PURE__ */ jsxRuntime.jsx(
10181
- IconButtonWrapper,
10349
+ const EmptyStateLayout = React__namespace.forwardRef(
10350
+ ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10351
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10352
+ Flex,
10182
10353
  {
10183
- "aria-disabled": disabled,
10184
- background: disabled ? "neutral150" : background,
10185
- justifyContent: "center",
10186
- ...restProps,
10187
- ref,
10188
- $size: size,
10189
- onClick: handleClick,
10190
- $variant: variant2,
10191
- children: /* @__PURE__ */ jsxRuntime.jsx(AccessibleIcon, { label, children })
10354
+ ref: forwardedRef,
10355
+ alignItems: "center",
10356
+ direction: "column",
10357
+ padding: 11,
10358
+ background: "neutral0",
10359
+ hasRadius,
10360
+ shadow,
10361
+ children: [
10362
+ icon ? /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10363
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10364
+ action
10365
+ ]
10192
10366
  }
10193
10367
  );
10194
- return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
10195
10368
  }
10196
10369
  );
10197
- const IconButtonWrapper = styledComponents.styled(BaseButton)`
10198
- background-color: ${({ theme, $variant }) => {
10199
- if ($variant === VARIANT_SECONDARY) {
10200
- return theme.colors.primary100;
10201
- }
10202
- return void 0;
10203
- }};
10204
- border-color: ${({ theme, $variant }) => {
10205
- if ($variant === VARIANT_SECONDARY) {
10206
- return theme.colors.primary200;
10207
- }
10208
- return theme.colors.neutral200;
10209
- }};
10210
- height: ${({ theme, $size }) => theme.sizes.button[$size]};
10211
- width: ${({ theme, $size }) => theme.sizes.button[$size]};
10212
- color: ${({ theme, $variant }) => {
10213
- if ($variant === VARIANT_SECONDARY) {
10214
- return theme.colors.primary500;
10215
- }
10216
- return theme.colors.neutral500;
10217
- }};
10218
-
10219
- &:hover,
10220
- &:focus {
10221
- color: ${({ theme, $variant }) => {
10222
- if ($variant === VARIANT_SECONDARY) {
10223
- return theme.colors.primary600;
10224
- }
10225
- return theme.colors.neutral600;
10226
- }};
10227
- }
10228
-
10229
- &[aria-disabled='true'] {
10230
- color: ${({ theme }) => theme.colors.neutral600};
10231
- }
10232
- `;
10233
- const IconButtonGroup = styledComponents.styled(Flex)`
10234
- & ${IconButtonWrapper}:first-child {
10235
- border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
10236
- }
10237
-
10238
- & ${IconButtonWrapper}:last-child {
10239
- border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
10240
- }
10241
-
10242
- & ${IconButtonWrapper} {
10243
- border-radius: 0;
10244
- color: ${({ theme }) => theme.colors.neutral700};
10245
-
10246
- & + ${IconButtonWrapper} {
10247
- border-left: none;
10248
- }
10249
-
10250
- &:hover {
10251
- background-color: ${({ theme }) => theme.colors.neutral100};
10252
- color: ${({ theme }) => theme.colors.neutral800};
10253
- }
10254
-
10255
- &:active {
10256
- background-color: ${({ theme }) => theme.colors.neutral150};
10257
- color: ${({ theme }) => theme.colors.neutral900};
10258
- }
10259
-
10260
- &[aria-disabled='true'] {
10261
- color: ${({ theme }) => theme.colors.neutral600};
10262
- }
10263
- }
10264
- `;
10265
10370
  const addMarks = state.StateEffect.define();
10266
10371
  const filterMarks = state.StateEffect.define();
10267
10372
  const lineHighlightMark = view.Decoration.mark({
@@ -10439,62 +10544,19 @@ const JSONInputContainer = styledComponents.styled(Flex)`
10439
10544
  }
10440
10545
  `;
10441
10546
  const LinkButton = forwardRef(
10442
- ({ variant: variant2 = "default", startIcon, endIcon, disabled = false, children, size = "S", ...props }, ref) => {
10443
- const paddingX = size === "S" ? 2 : "10px";
10444
- const paddingY = 4;
10445
- return /* @__PURE__ */ jsxRuntime.jsxs(
10446
- LinkWrapper$1,
10547
+ ({ disabled, ...restProps }, ref) => {
10548
+ return /* @__PURE__ */ jsxRuntime.jsx(
10549
+ Button,
10447
10550
  {
10448
10551
  ref,
10449
- "aria-disabled": disabled,
10450
- $variant: variant2,
10451
- background: "buttonPrimary600",
10452
- borderColor: "buttonPrimary600",
10453
- hasRadius: true,
10454
- display: "inline-flex",
10455
- paddingBottom: paddingX,
10456
- paddingLeft: paddingY,
10457
- paddingRight: paddingY,
10458
- paddingTop: paddingX,
10459
- pointerEvents: disabled ? "none" : void 0,
10460
- ...props,
10461
- children: [
10462
- startIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: startIcon }),
10463
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: size === "S" ? "pi" : void 0, fontWeight: "bold", textColor: "buttonNeutral0", children }),
10464
- endIcon && /* @__PURE__ */ jsxRuntime.jsx(Flex, { "aria-hidden": true, children: endIcon })
10465
- ]
10552
+ tag: BaseLinkImpl,
10553
+ tabIndex: disabled ? -1 : void 0,
10554
+ disabled,
10555
+ ...restProps
10466
10556
  }
10467
10557
  );
10468
10558
  }
10469
10559
  );
10470
- const LinkWrapper$1 = styledComponents.styled(BaseLink)`
10471
- gap: ${({ theme }) => theme.spaces[2]};
10472
-
10473
- ${focus}
10474
-
10475
- &[aria-disabled='true'] {
10476
- pointer-events: none;
10477
- }
10478
-
10479
- text-decoration: none;
10480
-
10481
- &[aria-disabled='true'] {
10482
- ${getDisabledStyle}
10483
- &:active {
10484
- ${getDisabledStyle}
10485
- }
10486
- }
10487
-
10488
- &:hover {
10489
- ${getHoverStyle}
10490
- }
10491
-
10492
- &:active {
10493
- ${getActiveStyle}
10494
- }
10495
-
10496
- ${getVariantStyle}
10497
- `;
10498
10560
  const MainWrapper = styledComponents.styled(Box)`
10499
10561
  // To prevent global outline on focus visible to force an outline when Main is focused
10500
10562
  &:focus-visible {
@@ -10530,6 +10592,7 @@ const SkipToContent = ({ children }) => {
10530
10592
  }
10531
10593
  );
10532
10594
  };
10595
+ const setOpacity = (hex, alpha) => `${hex}${Math.floor(alpha * 255).toString(16).padStart(2, "0")}`;
10533
10596
  const ScrollAreaImpl$1 = React__namespace.forwardRef(
10534
10597
  ({ children, viewportRef, ...restProps }, forwardedRef) => {
10535
10598
  return /* @__PURE__ */ jsxRuntime.jsxs(ScrollAreaRoot, { ref: forwardedRef, ...restProps, children: [
@@ -10547,7 +10610,7 @@ const ScrollAreaRoot = styledComponents.styled(ScrollArea__namespace.Root)`
10547
10610
  `;
10548
10611
  const ScrollAreaViewport = styledComponents.styled(ScrollArea__namespace.Viewport)`
10549
10612
  min-width: 100%;
10550
- padding-inline-end: 4px;
10613
+ padding-inline: 4px;
10551
10614
  `;
10552
10615
  const Scrollbar = styledComponents.styled(ScrollArea__namespace.Scrollbar)`
10553
10616
  display: flex;
@@ -10584,22 +10647,18 @@ const Thumb = styledComponents.styled(ScrollArea__namespace.Thumb)`
10584
10647
  min-height: 44px;
10585
10648
  }
10586
10649
  `;
10587
- const Root$2 = Dialog__namespace.Root;
10650
+ const Root$3 = Dialog__namespace.Root;
10588
10651
  const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
10589
10652
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10590
10653
  });
10591
10654
  const Content$2 = React__namespace.forwardRef((props, forwardedRef) => {
10592
- return /* @__PURE__ */ jsxRuntime.jsxs(Dialog__namespace.Portal, { children: [
10593
- /* @__PURE__ */ jsxRuntime.jsx(Overlay, {}),
10594
- /* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props })
10595
- ] });
10655
+ return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, { children: /* @__PURE__ */ jsxRuntime.jsx(ContentImpl, { ref: forwardedRef, ...props }) }) });
10596
10656
  });
10597
10657
  const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
10598
- background-color: ${(props) => props.theme.colors.neutral800};
10658
+ background: ${(props) => setOpacity(props.theme.colors.neutral800, 0.2)};
10599
10659
  position: fixed;
10600
10660
  inset: 0;
10601
10661
  z-index: ${(props) => props.theme.zIndices.overlay};
10602
- opacity: 0.2;
10603
10662
 
10604
10663
  @media (prefers-reduced-motion: no-preference) {
10605
10664
  animation: ${ANIMATIONS.overlayFadeIn} ${(props) => props.theme.motion.timings["200"]}
@@ -10608,8 +10667,8 @@ const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
10608
10667
  `;
10609
10668
  const ContentImpl = styledComponents.styled(Dialog__namespace.Content)`
10610
10669
  max-width: 83rem;
10611
- max-height: 80vh;
10612
- height: min-content;
10670
+ max-height: 90vh;
10671
+ height: auto;
10613
10672
  width: 60%;
10614
10673
  overflow: hidden;
10615
10674
  margin: 0 auto;
@@ -10711,7 +10770,7 @@ const Modal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
10711
10770
  Content: Content$2,
10712
10771
  Footer,
10713
10772
  Header,
10714
- Root: Root$2,
10773
+ Root: Root$3,
10715
10774
  Title,
10716
10775
  Trigger: Trigger$2
10717
10776
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10794,7 +10853,7 @@ const NumberInput = React__namespace.forwardRef(
10794
10853
  onKeyDown: handleKeyDown,
10795
10854
  onBlur: handleBlur,
10796
10855
  value: inputValue,
10797
- endAction: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
10856
+ endAction: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", children: [
10798
10857
  /* @__PURE__ */ jsxRuntime.jsx(
10799
10858
  ArrowButton,
10800
10859
  {
@@ -10828,13 +10887,14 @@ const NumberInput = React__namespace.forwardRef(
10828
10887
  );
10829
10888
  const ArrowButton = styledComponents.styled.button`
10830
10889
  display: flex;
10831
- height: 1rem;
10832
- align-items: ${({ $reverse }) => $reverse ? "flex-end" : "flex-start"};
10890
+ justify-content: center;
10891
+ align-items: center;
10833
10892
  transform: translateY(${({ $reverse }) => $reverse ? `-2px` : `2px`});
10834
10893
  cursor: ${({ disabled }) => disabled ? "not-allowed" : void 0};
10894
+ height: 1.1rem;
10895
+
10835
10896
  svg {
10836
- display: block;
10837
- height: 0.4rem;
10897
+ width: 1.2rem;
10838
10898
  transform: ${({ $reverse }) => $reverse ? "rotateX(180deg)" : void 0};
10839
10899
  }
10840
10900
  `;
@@ -10897,7 +10957,7 @@ const NextLink = forwardRef(
10897
10957
  ] });
10898
10958
  }
10899
10959
  );
10900
- const LinkWrapper = styledComponents.styled(BaseLink)`
10960
+ const LinkWrapper = styledComponents.styled(BaseLinkImpl)`
10901
10961
  padding: ${({ theme }) => theme.spaces[3]};
10902
10962
  border-radius: ${({ theme }) => theme.borderRadius};
10903
10963
  box-shadow: ${({ $active, theme }) => $active ? theme.shadows.filterShadow : void 0};
@@ -10946,7 +11006,7 @@ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Box, {
10946
11006
  /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden, { children }),
10947
11007
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })
10948
11008
  ] });
10949
- const Root$1 = Popover__namespace.Root;
11009
+ const Root$2 = Popover__namespace.Root;
10950
11010
  const Trigger$1 = React__namespace.forwardRef((props, forwardedRef) => {
10951
11011
  return /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10952
11012
  });
@@ -10958,6 +11018,7 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10958
11018
  z-index: ${({ theme }) => theme.zIndices.popover};
10959
11019
  background-color: ${(props) => props.theme.colors.neutral0};
10960
11020
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
11021
+ border-radius: ${({ theme }) => theme.borderRadius};
10961
11022
 
10962
11023
  @media (prefers-reduced-motion: no-preference) {
10963
11024
  animation-duration: ${(props) => props.theme.motion.timings["200"]};
@@ -10966,11 +11027,11 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10966
11027
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
10967
11028
 
10968
11029
  &[data-side='top'] {
10969
- animation-name: ${ANIMATIONS.slideDownIn};
11030
+ animation-name: ${ANIMATIONS.slideUpIn};
10970
11031
  }
10971
11032
 
10972
11033
  &[data-side='bottom'] {
10973
- animation-name: ${ANIMATIONS.slideUpIn};
11034
+ animation-name: ${ANIMATIONS.slideDownIn};
10974
11035
  }
10975
11036
  }
10976
11037
 
@@ -10978,68 +11039,69 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10978
11039
  animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};
10979
11040
 
10980
11041
  &[data-side='top'] {
10981
- animation-name: ${ANIMATIONS.slideDownOut};
11042
+ animation-name: ${ANIMATIONS.slideUpOut};
10982
11043
  }
10983
11044
 
10984
11045
  &[data-side='bottom'] {
10985
- animation-name: ${ANIMATIONS.slideUpOut};
11046
+ animation-name: ${ANIMATIONS.slideDownOut};
10986
11047
  }
10987
11048
  }
10988
11049
  }
10989
11050
  `;
10990
- const ScrollAreaImpl = ({ children, intersectionId, onReachEnd, ...props }) => {
10991
- const popoverRef = React__namespace.useRef(null);
10992
- const generatedIntersectionId = useId();
10993
- useIntersection(popoverRef, onReachEnd ?? (() => {
10994
- }), {
10995
- selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
10996
- skipWhen: !intersectionId || !onReachEnd
10997
- });
10998
- return /* @__PURE__ */ jsxRuntime.jsxs(PopoverScrollArea, { ref: popoverRef, ...props, children: [
10999
- children,
11000
- intersectionId && onReachEnd && /* @__PURE__ */ jsxRuntime.jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
11001
- ] });
11002
- };
11051
+ const ScrollAreaImpl = React__namespace.forwardRef(
11052
+ ({ children, intersectionId, onReachEnd, ...props }, forwardedRef) => {
11053
+ const popoverRef = React__namespace.useRef(null);
11054
+ const composedRef = useComposedRefs(popoverRef, forwardedRef);
11055
+ const generatedIntersectionId = useId();
11056
+ useIntersection(popoverRef, onReachEnd ?? (() => {
11057
+ }), {
11058
+ selectorToWatch: `#${stripReactIdOfColon(generatedIntersectionId)}`,
11059
+ skipWhen: !intersectionId || !onReachEnd
11060
+ });
11061
+ return /* @__PURE__ */ jsxRuntime.jsxs(PopoverScrollArea, { ref: composedRef, ...props, children: [
11062
+ children,
11063
+ intersectionId && onReachEnd && /* @__PURE__ */ jsxRuntime.jsx(Box, { id: stripReactIdOfColon(generatedIntersectionId), width: "100%", height: "1px" })
11064
+ ] });
11065
+ }
11066
+ );
11003
11067
  const PopoverScrollArea = styledComponents.styled(ScrollAreaImpl$1)`
11004
11068
  height: 20rem;
11005
11069
  `;
11006
11070
  const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11007
11071
  __proto__: null,
11008
11072
  Content: Content$1,
11009
- Root: Root$1,
11073
+ Root: Root$2,
11010
11074
  ScrollArea: ScrollAreaImpl,
11011
11075
  Trigger: Trigger$1
11012
11076
  }, Symbol.toStringTag, { value: "Module" }));
11013
- const ProgressbarBase = styledComponents.styled(Box)`
11014
- &:before {
11015
- background-color: ${({ theme }) => theme.colors.neutral0};
11016
- border-radius: ${({ theme }) => theme.borderRadius};
11017
- bottom: 0;
11018
- content: '';
11019
- position: absolute;
11020
- top: 0;
11021
- width: ${({ $value }) => `${$value}%`};
11077
+ const ProgressBar = React__namespace.forwardRef(
11078
+ ({ size = "M", value, ...restProps }, forwardedRef) => {
11079
+ return /* @__PURE__ */ jsxRuntime.jsx(ProgressRoot, { ref: forwardedRef, $size: size, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(ProgressIndicator, { style: { transform: `translate3D(-${100 - (value ?? 0)}%, 0, 0)` } }) });
11080
+ }
11081
+ );
11082
+ const ProgressRoot = styledComponents.styled(Progress__namespace.Root)`
11083
+ position: relative;
11084
+ overflow: hidden;
11085
+ width: ${(props) => props.$size === "S" ? "7.8rem" : "10.2rem"};
11086
+ height: ${(props) => props.$size === "S" ? "0.4rem" : "0.8rem"};
11087
+ background-color: ${(props) => props.theme.colors.neutral600};
11088
+ border-radius: ${(props) => props.theme.borderRadius};
11089
+
11090
+ /* Fix overflow clipping in Safari */
11091
+ /* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
11092
+ transform: translateZ(0);
11093
+ `;
11094
+ const ProgressIndicator = styledComponents.styled(Progress__namespace.Indicator)`
11095
+ background-color: ${({ theme }) => theme.colors.neutral0};
11096
+ border-radius: ${({ theme }) => theme.borderRadius};
11097
+ width: 100%;
11098
+ height: 100%;
11099
+
11100
+ @media (prefers-reduced-motion: no-preference) {
11101
+ transition: transform ${(props) => props.theme.motion.timings["320"]}
11102
+ ${(props) => props.theme.motion.easings.authenticMotion};
11022
11103
  }
11023
11104
  `;
11024
- const ProgressBar = ({ min = 0, max = 100, value = 0, children, size = "M", ...props }) => {
11025
- return /* @__PURE__ */ jsxRuntime.jsx(
11026
- ProgressbarBase,
11027
- {
11028
- background: "neutral600",
11029
- hasRadius: true,
11030
- "aria-label": children,
11031
- "aria-valuemax": max,
11032
- "aria-valuemin": min,
11033
- "aria-valuenow": value,
11034
- height: size === "S" ? 1 : 2,
11035
- position: "relative",
11036
- role: "progressbar",
11037
- $value: value,
11038
- width: size === "S" ? "78px" : "102px",
11039
- ...props
11040
- }
11041
- );
11042
- };
11043
11105
  const Group = React__namespace.forwardRef((props, forwardedRef) => {
11044
11106
  return /* @__PURE__ */ jsxRuntime.jsx(RadioGroupRoot, { ref: forwardedRef, ...props });
11045
11107
  });
@@ -11048,7 +11110,7 @@ const RadioGroupRoot = styledComponents.styled(RadioGroup__namespace.Root)`
11048
11110
  flex-direction: column;
11049
11111
  gap: ${(props) => props.theme.spaces[3]};
11050
11112
  `;
11051
- const Item = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11113
+ const Item$1 = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11052
11114
  const id = useId(idProp);
11053
11115
  return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: 2, children: [
11054
11116
  /* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { id, ref: forwardedRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupIndicator, {}) }),
@@ -11117,7 +11179,7 @@ const RadioGroupIndicator = styledComponents.styled(RadioGroup__namespace.Indica
11117
11179
  const Radio = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11118
11180
  __proto__: null,
11119
11181
  Group,
11120
- Item
11182
+ Item: Item$1
11121
11183
  }, Symbol.toStringTag, { value: "Module" }));
11122
11184
  const focusFocusable = (node) => {
11123
11185
  const nextNode = node.querySelector('[tabindex="0"]');
@@ -11133,172 +11195,194 @@ const RawTableContext = React__namespace.createContext({
11133
11195
  }
11134
11196
  });
11135
11197
  const useTable = () => React__namespace.useContext(RawTableContext);
11136
- const RawTable = ({
11137
- colCount,
11138
- rowCount,
11139
- jumpStep = 3,
11140
- initialCol = 0,
11141
- initialRow = 0,
11142
- ...props
11143
- }) => {
11144
- const tableRef = React__namespace.useRef(null);
11145
- const mountedRef = React__namespace.useRef(false);
11146
- const [rowIndex, setRowIndex] = React__namespace.useState(initialRow);
11147
- const [colIndex, setColIndex] = React__namespace.useState(initialCol);
11148
- const setTableValues = React__namespace.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11149
- setColIndex(colIndex2);
11150
- setRowIndex(rowIndex2);
11151
- }, []);
11152
- React__namespace.useEffect(() => {
11153
- if (mountedRef.current) {
11154
- focusFocusable(tableRef.current);
11155
- }
11156
- if (!mountedRef.current) {
11157
- mountedRef.current = true;
11158
- }
11159
- }, [colIndex, rowIndex]);
11160
- const handleKeyDown = (e) => {
11161
- switch (e.key) {
11162
- case KeyboardKeys.RIGHT: {
11163
- e.preventDefault();
11164
- setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11165
- break;
11166
- }
11167
- case KeyboardKeys.LEFT: {
11168
- e.preventDefault();
11169
- setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11170
- break;
11198
+ const RawTable = React__namespace.forwardRef(
11199
+ ({ colCount, rowCount, jumpStep = 3, initialCol = 0, initialRow = 0, ...props }, forwardedRef) => {
11200
+ const tableRef = React__namespace.useRef(null);
11201
+ const mountedRef = React__namespace.useRef(false);
11202
+ const composedRef = useComposedRefs(tableRef, forwardedRef);
11203
+ const [rowIndex, setRowIndex] = React__namespace.useState(initialRow);
11204
+ const [colIndex, setColIndex] = React__namespace.useState(initialCol);
11205
+ const setTableValues = React__namespace.useCallback(({ colIndex: colIndex2, rowIndex: rowIndex2 }) => {
11206
+ setColIndex(colIndex2);
11207
+ setRowIndex(rowIndex2);
11208
+ }, []);
11209
+ React__namespace.useEffect(() => {
11210
+ if (mountedRef.current) {
11211
+ focusFocusable(tableRef.current);
11171
11212
  }
11172
- case KeyboardKeys.UP: {
11173
- e.preventDefault();
11174
- setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11175
- break;
11213
+ if (!mountedRef.current) {
11214
+ mountedRef.current = true;
11176
11215
  }
11177
- case KeyboardKeys.DOWN: {
11178
- e.preventDefault();
11179
- setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11180
- break;
11181
- }
11182
- case KeyboardKeys.HOME: {
11183
- e.preventDefault();
11184
- if (e.ctrlKey) {
11185
- setRowIndex(0);
11216
+ }, [colIndex, rowIndex]);
11217
+ const handleKeyDown = (e) => {
11218
+ switch (e.key) {
11219
+ case KeyboardKeys.RIGHT: {
11220
+ e.preventDefault();
11221
+ setColIndex((prevColIndex) => prevColIndex < colCount - 1 ? prevColIndex + 1 : prevColIndex);
11222
+ break;
11186
11223
  }
11187
- setColIndex(0);
11188
- break;
11189
- }
11190
- case KeyboardKeys.END: {
11191
- e.preventDefault();
11192
- if (e.ctrlKey) {
11193
- setRowIndex(rowCount - 1);
11224
+ case KeyboardKeys.LEFT: {
11225
+ e.preventDefault();
11226
+ setColIndex((prevColIndex) => prevColIndex > 0 ? prevColIndex - 1 : prevColIndex);
11227
+ break;
11228
+ }
11229
+ case KeyboardKeys.UP: {
11230
+ e.preventDefault();
11231
+ setRowIndex((prevRowIndex) => prevRowIndex > 0 ? prevRowIndex - 1 : prevRowIndex);
11232
+ break;
11233
+ }
11234
+ case KeyboardKeys.DOWN: {
11235
+ e.preventDefault();
11236
+ setRowIndex((prevRowIndex) => prevRowIndex < rowCount - 1 ? prevRowIndex + 1 : prevRowIndex);
11237
+ break;
11238
+ }
11239
+ case KeyboardKeys.HOME: {
11240
+ e.preventDefault();
11241
+ if (e.ctrlKey) {
11242
+ setRowIndex(0);
11243
+ }
11244
+ setColIndex(0);
11245
+ break;
11246
+ }
11247
+ case KeyboardKeys.END: {
11248
+ e.preventDefault();
11249
+ if (e.ctrlKey) {
11250
+ setRowIndex(rowCount - 1);
11251
+ }
11252
+ setColIndex(colCount - 1);
11253
+ break;
11254
+ }
11255
+ case KeyboardKeys.PAGE_DOWN: {
11256
+ e.preventDefault();
11257
+ setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11258
+ break;
11259
+ }
11260
+ case KeyboardKeys.PAGE_UP: {
11261
+ e.preventDefault();
11262
+ setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11263
+ break;
11194
11264
  }
11195
- setColIndex(colCount - 1);
11196
- break;
11197
- }
11198
- case KeyboardKeys.PAGE_DOWN: {
11199
- e.preventDefault();
11200
- setRowIndex((prevRowIndex) => prevRowIndex + jumpStep < rowCount ? prevRowIndex + jumpStep : rowCount - 1);
11201
- break;
11202
11265
  }
11203
- case KeyboardKeys.PAGE_UP: {
11204
- e.preventDefault();
11205
- setRowIndex((prevRowIndex) => prevRowIndex - jumpStep > 0 ? prevRowIndex - jumpStep : 0);
11206
- break;
11266
+ };
11267
+ const context = React__namespace.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11268
+ return /* @__PURE__ */ jsxRuntime.jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
11269
+ "table",
11270
+ {
11271
+ role: "grid",
11272
+ ref: composedRef,
11273
+ "aria-rowcount": rowCount,
11274
+ "aria-colcount": colCount,
11275
+ onKeyDown: handleKeyDown,
11276
+ ...props
11207
11277
  }
11208
- }
11209
- };
11210
- const context = React__namespace.useMemo(() => ({ rowIndex, colIndex, setTableValues }), [colIndex, rowIndex, setTableValues]);
11211
- return /* @__PURE__ */ jsxRuntime.jsx(RawTableContext.Provider, { value: context, children: /* @__PURE__ */ jsxRuntime.jsx(
11212
- "table",
11213
- {
11214
- role: "grid",
11215
- ref: tableRef,
11216
- "aria-rowcount": rowCount,
11217
- "aria-colcount": colCount,
11218
- onKeyDown: handleKeyDown,
11219
- ...props
11220
- }
11221
- ) });
11278
+ ) });
11279
+ }
11280
+ );
11281
+ const getFocusableNodes = (node, includeNegativeTabIndex) => {
11282
+ const nodes = [
11283
+ ...node.querySelectorAll(
11284
+ 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
11285
+ )
11286
+ ];
11287
+ const focusables = nodes.filter((node2) => {
11288
+ if (node2.hasAttribute("disabled"))
11289
+ return false;
11290
+ if (includeNegativeTabIndex)
11291
+ return true;
11292
+ return node2.getAttribute("tabindex") !== "-1";
11293
+ });
11294
+ return focusables;
11222
11295
  };
11223
- const RawTd = ({ coords = { col: 0, row: 0 }, tag = "td", ...props }) => {
11224
- const tdRef = React__namespace.useRef(null);
11225
- const { rowIndex, colIndex, setTableValues } = useTable();
11226
- const [isActive, setIsActive] = React__namespace.useState(false);
11227
- const handleKeyDown = (e) => {
11228
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11229
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11230
- return;
11296
+ const getFocusableNodesWithKeyboardNav = (nodes) => {
11297
+ return nodes.filter((node) => {
11298
+ if (node.tagName === "INPUT") {
11299
+ return node.type !== "checkbox" && node.type !== "radio";
11231
11300
  }
11232
- if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11233
- e.preventDefault();
11234
- const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11235
- if (e.key === KeyboardKeys.RIGHT) {
11236
- const nextNode = focusableNodes[focussedButtonIndex + 1];
11237
- if (nextNode) {
11238
- e.stopPropagation();
11239
- nextNode.focus();
11240
- }
11241
- } else if (e.key === KeyboardKeys.LEFT) {
11242
- const nextNode = focusableNodes[focussedButtonIndex - 1];
11243
- if (nextNode) {
11244
- e.stopPropagation();
11245
- nextNode.focus();
11246
- }
11301
+ return false;
11302
+ });
11303
+ };
11304
+ const RawTd = React__namespace.forwardRef(
11305
+ ({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
11306
+ const tdRef = React__namespace.useRef(null);
11307
+ const composedRef = useComposedRefs(forwardedRef, tdRef);
11308
+ const { rowIndex, colIndex, setTableValues } = useTable();
11309
+ const [isActive, setIsActive] = React__namespace.useState(false);
11310
+ const handleKeyDown = (e) => {
11311
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11312
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length === 0) {
11313
+ return;
11247
11314
  }
11248
- return;
11249
- }
11250
- const isEnterKey = e.key === KeyboardKeys.ENTER;
11251
- if (isEnterKey && !isActive) {
11252
- setIsActive(true);
11253
- } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11254
- if (isEnterKey && document.activeElement?.tagName === "A") {
11315
+ if (focusableNodes.length > 1 && !focusableNodes.find((node) => node.tagName !== "BUTTON")) {
11316
+ e.preventDefault();
11317
+ const focussedButtonIndex = focusableNodes.findIndex((node) => node === document.activeElement);
11318
+ if (e.key === KeyboardKeys.RIGHT) {
11319
+ const nextNode = focusableNodes[focussedButtonIndex + 1];
11320
+ if (nextNode) {
11321
+ e.stopPropagation();
11322
+ nextNode.focus();
11323
+ }
11324
+ } else if (e.key === KeyboardKeys.LEFT) {
11325
+ const nextNode = focusableNodes[focussedButtonIndex - 1];
11326
+ if (nextNode) {
11327
+ e.stopPropagation();
11328
+ nextNode.focus();
11329
+ }
11330
+ }
11255
11331
  return;
11256
11332
  }
11257
- setIsActive(false);
11258
- tdRef.current.focus();
11259
- } else if (isActive) {
11260
- e.stopPropagation();
11261
- }
11262
- };
11263
- const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11264
- useIsomorphicLayoutEffect(() => {
11265
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11266
- if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11267
- tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11268
- focusableNodes.forEach((node, index) => {
11269
- node.setAttribute("tabIndex", isActive ? "0" : "-1");
11270
- if (isActive && index === 0) {
11271
- node.focus();
11333
+ const isEnterKey = e.key === KeyboardKeys.ENTER;
11334
+ if (isEnterKey && !isActive) {
11335
+ setIsActive(true);
11336
+ } else if ((e.key === KeyboardKeys.ESCAPE || isEnterKey) && isActive) {
11337
+ if (isEnterKey && document.activeElement?.tagName === "A") {
11338
+ return;
11272
11339
  }
11273
- });
11274
- } else {
11340
+ setIsActive(false);
11341
+ tdRef.current.focus();
11342
+ } else if (isActive) {
11343
+ e.stopPropagation();
11344
+ }
11345
+ };
11346
+ const isFocused = rowIndex === coords.row - 1 && colIndex === coords.col - 1;
11347
+ useIsomorphicLayoutEffect(() => {
11348
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11349
+ if (focusableNodes.length === 0 || focusableNodes.length === 1 && getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || focusableNodes.length > 1 && Boolean(focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11350
+ tdRef.current.setAttribute("tabIndex", !isActive && isFocused ? "0" : "-1");
11351
+ focusableNodes.forEach((node, index) => {
11352
+ node.setAttribute("tabIndex", isActive ? "0" : "-1");
11353
+ if (isActive && index === 0) {
11354
+ node.focus();
11355
+ }
11356
+ });
11357
+ } else {
11358
+ focusableNodes.forEach((node) => {
11359
+ node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11360
+ });
11361
+ }
11362
+ }, [isActive, isFocused]);
11363
+ const handleFocusableNodeFocus = React__namespace.useCallback(() => {
11364
+ const focusableNodes = getFocusableNodes(tdRef.current, true);
11365
+ if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11366
+ setIsActive(true);
11367
+ }
11368
+ setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11369
+ }, [coords, setTableValues]);
11370
+ useIsomorphicLayoutEffect(() => {
11371
+ const cell = tdRef.current;
11372
+ const focusableNodes = getFocusableNodes(cell, true);
11275
11373
  focusableNodes.forEach((node) => {
11276
- node.setAttribute("tabIndex", isFocused ? "0" : "-1");
11374
+ node.addEventListener("focus", handleFocusableNodeFocus);
11277
11375
  });
11278
- }
11279
- }, [isActive, isFocused]);
11280
- const handleFocusableNodeFocus = React__namespace.useCallback(() => {
11281
- const focusableNodes = getFocusableNodes(tdRef.current, true);
11282
- if (focusableNodes.length >= 1 && (getFocusableNodesWithKeyboardNav(focusableNodes).length !== 0 || !focusableNodes.find((node) => node.tagName !== "BUTTON"))) {
11283
- setIsActive(true);
11284
- }
11285
- setTableValues({ rowIndex: coords.row - 1, colIndex: coords.col - 1 });
11286
- }, [coords, setTableValues]);
11287
- useIsomorphicLayoutEffect(() => {
11288
- const cell = tdRef.current;
11289
- const focusableNodes = getFocusableNodes(cell, true);
11290
- focusableNodes.forEach((node) => {
11291
- node.addEventListener("focus", handleFocusableNodeFocus);
11292
- });
11293
- return () => {
11294
- const focusableNodes2 = getFocusableNodes(cell, true);
11295
- focusableNodes2.forEach((node) => {
11296
- node.removeEventListener("focus", handleFocusableNodeFocus);
11297
- });
11298
- };
11299
- }, [handleFocusableNodeFocus]);
11300
- return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "gridcell", tag, ref: tdRef, onKeyDown: handleKeyDown, ...props });
11301
- };
11376
+ return () => {
11377
+ const focusableNodes2 = getFocusableNodes(cell, true);
11378
+ focusableNodes2.forEach((node) => {
11379
+ node.removeEventListener("focus", handleFocusableNodeFocus);
11380
+ });
11381
+ };
11382
+ }, [handleFocusableNodeFocus]);
11383
+ return /* @__PURE__ */ jsxRuntime.jsx(Box, { role: "gridcell", tag, ref: composedRef, onKeyDown: handleKeyDown, ...props });
11384
+ }
11385
+ );
11302
11386
  const RawTh = (props) => /* @__PURE__ */ jsxRuntime.jsx(RawTd, { ...props, tag: "th" });
11303
11387
  const RawThead = ({ children, ...props }) => {
11304
11388
  const childrenClone = React__namespace.Children.toArray(children).map((child) => {
@@ -11349,14 +11433,18 @@ const SearchbarWrapper = styledComponents.styled.div`
11349
11433
  &:focus-within {
11350
11434
  ${SearchIcon} {
11351
11435
  fill: ${({ theme }) => theme.colors.primary600};
11352
- path {
11353
- }
11354
11436
  }
11355
11437
  }
11356
11438
  `;
11357
11439
  const SearchbarInput = styledComponents.styled(Input$2)`
11358
11440
  border: 1px solid transparent;
11359
11441
 
11442
+ &:hover {
11443
+ button {
11444
+ cursor: pointer;
11445
+ }
11446
+ }
11447
+
11360
11448
  ${inputFocusStyle()}
11361
11449
  `;
11362
11450
  const Searchbar = React__namespace.forwardRef(
@@ -11376,7 +11464,17 @@ const Searchbar = React__namespace.forwardRef(
11376
11464
  ref: actualRef,
11377
11465
  value,
11378
11466
  startAction: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { "aria-hidden": true }),
11379
- endAction: isCompleting ? /* @__PURE__ */ jsxRuntime.jsx(Action$1, { label: clearLabel, onClick: handleClear, children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}) }) : void 0,
11467
+ endAction: isCompleting ? /* @__PURE__ */ jsxRuntime.jsx(
11468
+ Action$1,
11469
+ {
11470
+ label: clearLabel,
11471
+ onClick: handleClear,
11472
+ onMouseDown: (e) => {
11473
+ e.preventDefault();
11474
+ },
11475
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {})
11476
+ }
11477
+ ) : void 0,
11380
11478
  ...props
11381
11479
  }
11382
11480
  )
@@ -11384,47 +11482,60 @@ const Searchbar = React__namespace.forwardRef(
11384
11482
  }
11385
11483
  );
11386
11484
  const SearchForm = (props) => /* @__PURE__ */ jsxRuntime.jsx("form", { ...props, role: "search" });
11387
- const Tag = ({ children, icon, disabled = false, onClick, ...props }) => {
11485
+ const ButtonBox$1 = styledComponents.styled(Box)`
11486
+ display: inline-flex;
11487
+ border: none;
11488
+
11489
+ & > svg {
11490
+ height: 1.2rem;
11491
+ width: 1.2rem;
11492
+ }
11493
+
11494
+ & > svg path {
11495
+ fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11496
+ }
11497
+
11498
+ &:hover {
11499
+ cursor: ${({ $iconAction }) => $iconAction ? "pointer" : "initial"};
11500
+ }
11501
+ `;
11502
+ const Tag = ({ children, icon, label, disabled = false, onClick, ...props }) => {
11388
11503
  const handleClick = (e) => {
11389
11504
  if (disabled || !onClick)
11390
11505
  return;
11391
11506
  onClick(e);
11392
11507
  };
11393
11508
  return /* @__PURE__ */ jsxRuntime.jsxs(
11394
- TagWrapper,
11509
+ Flex,
11395
11510
  {
11396
- tag: "button",
11511
+ inline: true,
11397
11512
  background: disabled ? "neutral200" : "primary100",
11398
11513
  color: disabled ? "neutral700" : "primary600",
11399
11514
  paddingLeft: 3,
11400
- paddingRight: 3,
11401
- onClick: handleClick,
11402
- "aria-disabled": disabled,
11403
- disabled,
11404
- borderWidth: "1px",
11405
- borderStyle: "solid",
11515
+ paddingRight: 1,
11406
11516
  borderColor: disabled ? "neutral300" : "primary200",
11407
11517
  hasRadius: true,
11408
11518
  height: "3.2rem",
11409
- gap: 2,
11410
11519
  ...props,
11411
11520
  children: [
11412
11521
  /* @__PURE__ */ jsxRuntime.jsx(TagText, { $disabled: disabled, variant: "pi", fontWeight: "bold", children }),
11413
- icon
11522
+ /* @__PURE__ */ jsxRuntime.jsx(
11523
+ ButtonBox$1,
11524
+ {
11525
+ tag: "button",
11526
+ disabled,
11527
+ "aria-disabled": disabled,
11528
+ "aria-label": label,
11529
+ padding: 2,
11530
+ onClick: handleClick,
11531
+ $iconAction: !!onClick,
11532
+ children: icon
11533
+ }
11534
+ )
11414
11535
  ]
11415
11536
  }
11416
11537
  );
11417
11538
  };
11418
- const TagWrapper = styledComponents.styled(Flex)`
11419
- & > svg {
11420
- height: 0.8rem;
11421
- width: 0.8rem;
11422
- }
11423
-
11424
- & > svg path {
11425
- fill: ${({ theme, ...p }) => p["aria-disabled"] ? theme.colors.neutral600 : theme.colors.primary600};
11426
- }
11427
- `;
11428
11539
  const TagText = styledComponents.styled(Typography)`
11429
11540
  color: inherit;
11430
11541
  border-right: 1px solid ${({ theme, $disabled }) => $disabled ? theme.colors.neutral300 : theme.colors.primary200};
@@ -11445,6 +11556,7 @@ const MultiSelect = React__namespace.forwardRef(
11445
11556
  onReachEnd,
11446
11557
  placeholder,
11447
11558
  required: requiredProp,
11559
+ size,
11448
11560
  startIcon,
11449
11561
  value: passedValue,
11450
11562
  withTags,
@@ -11489,7 +11601,17 @@ const MultiSelect = React__namespace.forwardRef(
11489
11601
  const value = typeof passedValue !== "undefined" && passedValue !== null ? passedValue : internalValue;
11490
11602
  const renderTags = (arg) => {
11491
11603
  if (arg && typeof arg === "object" && arg.value) {
11492
- return /* @__PURE__ */ jsxRuntime.jsx(Tag, { tabIndex: -1, disabled, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}), onClick: handleTagClick(arg.value), children: arg.textValue }, arg.value);
11604
+ return /* @__PURE__ */ jsxRuntime.jsx(
11605
+ Tag,
11606
+ {
11607
+ tabIndex: -1,
11608
+ disabled,
11609
+ icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, { width: `${14 / 16}rem`, height: `${14 / 16}rem` }),
11610
+ onClick: handleTagClick(arg.value),
11611
+ children: arg.textValue
11612
+ },
11613
+ arg.value
11614
+ );
11493
11615
  }
11494
11616
  return null;
11495
11617
  };
@@ -11528,7 +11650,8 @@ const MultiSelect = React__namespace.forwardRef(
11528
11650
  disabled,
11529
11651
  clearLabel,
11530
11652
  onClear: value?.length ? onClear : void 0,
11531
- paddingLeft: withTags && value?.length ? 1 : 3,
11653
+ withTags: Boolean(withTags && (value?.length ?? 0 > 0)),
11654
+ size,
11532
11655
  children: /* @__PURE__ */ jsxRuntime.jsx(Value, { placeholder, textColor: value?.length ? "neutral800" : "neutral600", children: value?.length ? withTags ? renderTags : customizeContent ? customizeContent(value) : void 0 : void 0 })
11533
11656
  }
11534
11657
  ),
@@ -11637,7 +11760,8 @@ const SubNavHeader = ({
11637
11760
  },
11638
11761
  onSubmit = () => {
11639
11762
  },
11640
- id
11763
+ id,
11764
+ placeholder
11641
11765
  }) => {
11642
11766
  const [isSearchOpen, setSearchOpen] = React__namespace.useState(false);
11643
11767
  const previousSearchOpenValue = uiPrimitives.usePrev(isSearchOpen);
@@ -11677,7 +11801,7 @@ const SubNavHeader = ({
11677
11801
  name: "searchbar",
11678
11802
  value,
11679
11803
  onChange,
11680
- placeholder: "e.g: strapi-plugin-abcd",
11804
+ placeholder,
11681
11805
  onKeyDown: handleKeyDown,
11682
11806
  ref: searchRef,
11683
11807
  onBlur: handleBlur,
@@ -11691,7 +11815,7 @@ const SubNavHeader = ({
11691
11815
  ] });
11692
11816
  }
11693
11817
  return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { direction: "column", alignItems: "flex-start", paddingLeft: 6, paddingTop: 6, paddingBottom: 2, paddingRight: 4, children: [
11694
- /* @__PURE__ */ jsxRuntime.jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", children: [
11818
+ /* @__PURE__ */ jsxRuntime.jsxs(Flex, { justifyContent: "space-between", alignItems: "flex-start", width: "100%", gap: 2, children: [
11695
11819
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "beta", tag, children: label }),
11696
11820
  searchable && /* @__PURE__ */ jsxRuntime.jsx(IconButton, { ref: searchButtonRef, onClick: toggleSearch, label: searchLabel, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Search, {}) })
11697
11821
  ] }),
@@ -11720,7 +11844,13 @@ const SubNavLink = forwardRef(
11720
11844
  );
11721
11845
  }
11722
11846
  );
11723
- const SubNavLinkWrapper = styledComponents.styled(BaseLink)`
11847
+ const CustomBullet = styledComponents.styled.span`
11848
+ width: 0.4rem;
11849
+ height: 0.4rem;
11850
+ background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
11851
+ border-radius: 50%;
11852
+ `;
11853
+ const SubNavLinkWrapper = styledComponents.styled(BaseLinkImpl)`
11724
11854
  display: flex;
11725
11855
  align-items: center;
11726
11856
  justify-content: space-between;
@@ -11739,18 +11869,16 @@ const SubNavLinkWrapper = styledComponents.styled(BaseLink)`
11739
11869
  font-weight: 500;
11740
11870
  `;
11741
11871
  }}
11872
+
11873
+ ${CustomBullet} {
11874
+ background-color: ${({ theme }) => theme.colors.primary600};
11875
+ }
11742
11876
  }
11743
11877
 
11744
11878
  &:focus-visible {
11745
11879
  outline-offset: -2px;
11746
11880
  }
11747
11881
  `;
11748
- const CustomBullet = styledComponents.styled.span`
11749
- width: 0.4rem;
11750
- height: 0.4rem;
11751
- background-color: ${({ theme, $active }) => $active ? theme.colors.primary600 : theme.colors.neutral600};
11752
- border-radius: 50%;
11753
- `;
11754
11882
  const IconWrapper = styledComponents.styled.div`
11755
11883
  svg {
11756
11884
  height: 1.6rem;
@@ -11881,74 +12009,88 @@ const SubNavSections = ({ children, spacing = 2, horizontal = false, ...props })
11881
12009
  }
11882
12010
  ) });
11883
12011
  };
11884
- const Switch = React__namespace.forwardRef(
11885
- ({ label, onChange, onLabel = "On", offLabel = "Off", selected, visibleLabels = false, ...props }, ref) => {
11886
- return /* @__PURE__ */ jsxRuntime.jsx(
11887
- SwitchButton,
11888
- {
11889
- ref,
11890
- role: "switch",
11891
- "aria-checked": selected,
11892
- "aria-label": label,
11893
- onClick: onChange,
11894
- type: "button",
11895
- ...props,
11896
- children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { children: [
11897
- /* @__PURE__ */ jsxRuntime.jsxs(SwitchContent, { $visibleLabels: visibleLabels, children: [
11898
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: onLabel }),
11899
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: offLabel })
11900
- ] }),
11901
- visibleLabels && /* @__PURE__ */ jsxRuntime.jsx(Box, { tag: "span", "aria-hidden": true, paddingLeft: 2, color: selected ? "success600" : "danger600", children: selected ? onLabel : offLabel })
11902
- ] })
11903
- }
11904
- );
12012
+ const SwitchImpl = React__namespace.forwardRef(
12013
+ ({
12014
+ visibleLabels,
12015
+ onLabel = "On",
12016
+ offLabel = "Off",
12017
+ onCheckedChange: onCheckedChangeProp,
12018
+ checked: checkedProp,
12019
+ defaultChecked,
12020
+ disabled,
12021
+ ...restProps
12022
+ }, forwardedRef) => {
12023
+ const [internalChecked, setInternalChecked] = useControllableState$1({
12024
+ prop: checkedProp,
12025
+ defaultProp: defaultChecked
12026
+ });
12027
+ const handleCheckChange = (checked) => {
12028
+ setInternalChecked(checked);
12029
+ };
12030
+ return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: 3, children: [
12031
+ /* @__PURE__ */ jsxRuntime.jsx(
12032
+ SwitchRoot,
12033
+ {
12034
+ ref: forwardedRef,
12035
+ onCheckedChange: uiPrimitives.composeEventHandlers(onCheckedChangeProp, handleCheckChange),
12036
+ checked: internalChecked,
12037
+ disabled,
12038
+ ...restProps,
12039
+ children: /* @__PURE__ */ jsxRuntime.jsx(SwitchThumb, {})
12040
+ }
12041
+ ),
12042
+ visibleLabels ? /* @__PURE__ */ jsxRuntime.jsx(LabelTypography, { "aria-hidden": true, "data-disabled": disabled, "data-state": internalChecked ? "checked" : "unchecked", children: internalChecked ? onLabel : offLabel }) : null
12043
+ ] });
11905
12044
  }
11906
12045
  );
11907
- const SwitchContent = styledComponents.styled.div`
11908
- background: ${({ theme }) => theme.colors.danger500};
11909
- border: none;
11910
- border-radius: 16px;
11911
- position: relative;
11912
- height: 2.4rem;
12046
+ const SwitchRoot = styledComponents.styled(Switch__namespace.Root)`
11913
12047
  width: 4rem;
12048
+ height: 2.4rem;
12049
+ border-radius: 1.2rem;
12050
+ background-color: ${({ theme }) => theme.colors.danger500};
11914
12051
 
11915
- & > span {
11916
- font-size: ${({ $visibleLabels }) => $visibleLabels ? "1rem" : 0};
12052
+ &[data-state='checked'] {
12053
+ background-color: ${({ theme }) => theme.colors.success500};
11917
12054
  }
11918
12055
 
11919
- &:before {
11920
- content: '';
11921
- background: ${({ theme }) => theme.colors.neutral0};
11922
- width: 1rem;
11923
- height: 1rem;
11924
- border-radius: 50%;
11925
- position: absolute;
11926
- transition: all 0.5s;
11927
- left: ${({ theme }) => theme.spaces[1]};
11928
- top: ${({ theme }) => theme.spaces[1]};
12056
+ &[data-disabled] {
12057
+ background-color: ${({ theme }) => theme.colors.neutral300};
11929
12058
  }
11930
12059
 
11931
- @media (prefers-reduced-motion: reduce) {
11932
- &:before {
11933
- transition: none;
11934
- }
12060
+ @media (prefers-reduced-motion: no-preference) {
12061
+ transition: ${(props) => props.theme.transitions.backgroundColor};
11935
12062
  }
11936
12063
  `;
11937
- const SwitchButton = styledComponents.styled.button`
11938
- background: transparent;
11939
- padding: 0;
11940
- border: none;
12064
+ const SwitchThumb = styledComponents.styled(Switch__namespace.Thumb)`
12065
+ display: block;
12066
+ height: 1.6rem;
12067
+ width: 1.6rem;
12068
+ border-radius: 50%;
12069
+ background-color: ${({ theme }) => theme.colors.neutral0};
12070
+ transform: translateX(4px);
12071
+
12072
+ &[data-state='checked'] {
12073
+ transform: translateX(20px);
12074
+ }
11941
12075
 
11942
- &[aria-checked='true'] ${SwitchContent} {
11943
- background: ${({ theme }) => theme.colors.success500};
12076
+ @media (prefers-reduced-motion: no-preference) {
12077
+ transition: transform ${(props) => props.theme.motion.timings["120"]}
12078
+ ${(props) => props.theme.motion.easings.authenticMotion};
12079
+ }
12080
+ `;
12081
+ const LabelTypography = styledComponents.styled(Typography)`
12082
+ color: ${(props) => props.theme.colors.danger600};
12083
+
12084
+ &[data-state='checked'] {
12085
+ color: ${(props) => props.theme.colors.success600};
11944
12086
  }
11945
12087
 
11946
- &[aria-checked='true'] ${SwitchContent}:before {
11947
- transform: translateX(1rem);
12088
+ &[data-disabled='true'] {
12089
+ color: ${({ theme }) => theme.colors.neutral500};
11948
12090
  }
11949
12091
  `;
11950
12092
  const [TabsProvider, useTabs] = createContext("Tabs");
11951
- const Root = React__namespace.forwardRef(
12093
+ const Root$1 = React__namespace.forwardRef(
11952
12094
  ({ disabled = false, variant: variant2 = "regular", hasError, ...props }, forwardedRef) => {
11953
12095
  return /* @__PURE__ */ jsxRuntime.jsx(TabsProvider, { disabled, hasError, variant: variant2, children: /* @__PURE__ */ jsxRuntime.jsx(TabsRoot, { ref: forwardedRef, ...props }) });
11954
12096
  }
@@ -11987,10 +12129,6 @@ const TabBar = styledComponents.styled.span`
11987
12129
  left: 0;
11988
12130
  opacity: 0;
11989
12131
  height: 0.2rem;
11990
-
11991
- @media (prefers-reduced-motion: no-preference) {
11992
- transition: ${(props) => `opacity 200ms ${props.theme.motion.easings.authenticMotion}`};
11993
- }
11994
12132
  `;
11995
12133
  const TriggerTypography = styledComponents.styled(Typography)``;
11996
12134
  const TabsTrigger = styledComponents.styled(Tabs__namespace.Trigger)`
@@ -12044,10 +12182,6 @@ const TabsTrigger = styledComponents.styled(Tabs__namespace.Trigger)`
12044
12182
  }
12045
12183
  }}
12046
12184
 
12047
- @media (prefers-reduced-motion: no-preference) {
12048
- transition: ${(props) => `${props.theme.transitions.color}, ${props.theme.transitions.backgroundColor}, box-shadow ${props.theme.motion.timings["120"]} ${props.theme.motion.easings.easeOutQuad}`};
12049
- }
12050
-
12051
12185
  &[data-disabled] {
12052
12186
  cursor: not-allowed;
12053
12187
  color: ${(props) => props.theme.colors.neutral400};
@@ -12074,7 +12208,7 @@ const Tabs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
12074
12208
  __proto__: null,
12075
12209
  Content,
12076
12210
  List,
12077
- Root,
12211
+ Root: Root$1,
12078
12212
  Trigger
12079
12213
  }, Symbol.toStringTag, { value: "Module" }));
12080
12214
  const TableContainer = styledComponents.styled(Box)`
@@ -12114,7 +12248,7 @@ const TableBox = styledComponents.styled(Box)`
12114
12248
  const ScrollContainer = styledComponents.styled(Box)`
12115
12249
  overflow-x: auto;
12116
12250
  `;
12117
- const Table = ({ footer, ...props }) => {
12251
+ const Table = React__namespace.forwardRef(({ footer, ...props }, forwardedRef) => {
12118
12252
  const tableRef = React__namespace.useRef(null);
12119
12253
  const [overflowing, setOverflowing] = React__namespace.useState();
12120
12254
  const handleScroll = (e) => {
@@ -12137,10 +12271,10 @@ const Table = ({ footer, ...props }) => {
12137
12271
  }
12138
12272
  }, []);
12139
12273
  return /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { shadow: "tableShadow", hasRadius: true, background: "neutral0", children: [
12140
- /* @__PURE__ */ jsxRuntime.jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsx(TableWrapper, { ...props }) }) }),
12274
+ /* @__PURE__ */ jsxRuntime.jsx(TableBox, { $overflowing: overflowing, position: "relative", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollContainer, { ref: tableRef, onScroll: handleScroll, paddingLeft: 6, paddingRight: 6, children: /* @__PURE__ */ jsxRuntime.jsx(TableWrapper, { ref: forwardedRef, ...props }) }) }),
12141
12275
  footer
12142
12276
  ] });
12143
- };
12277
+ });
12144
12278
  const TbodyWrapper = styledComponents.styled(RawTbody)`
12145
12279
  & tr:last-of-type {
12146
12280
  border-bottom: none;
@@ -12181,7 +12315,6 @@ const Tr = (props) => {
12181
12315
  const CellWrapper = styledComponents.styled(RawTd)`
12182
12316
  vertical-align: middle;
12183
12317
  text-align: left;
12184
- color: ${({ theme }) => theme.colors.neutral600};
12185
12318
  outline-offset: -4px;
12186
12319
 
12187
12320
  /**
@@ -12191,15 +12324,15 @@ const CellWrapper = styledComponents.styled(RawTd)`
12191
12324
  vertical-align: sub;
12192
12325
  }
12193
12326
  `;
12194
- const Th = ({ children, action, ...props }) => {
12195
- return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { as: RawTh, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { children: [
12327
+ const Th = React__namespace.forwardRef(({ children, action, ...props }, forwardedRef) => {
12328
+ return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { color: "neutral600", as: RawTh, ref: forwardedRef, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { children: [
12196
12329
  children,
12197
12330
  action
12198
12331
  ] }) });
12199
- };
12200
- const Td = ({ children, ...props }) => {
12201
- return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { ...props, children });
12202
- };
12332
+ });
12333
+ const Td = React__namespace.forwardRef(({ children, ...props }, forwardedRef) => {
12334
+ return /* @__PURE__ */ jsxRuntime.jsx(CellWrapper, { color: "neutral800", ref: forwardedRef, ...props, children });
12335
+ });
12203
12336
  const IconBox = styledComponents.styled(Box)`
12204
12337
  height: 2.4rem;
12205
12338
  width: 2.4rem;
@@ -12232,6 +12365,28 @@ const TFooter = ({ children, icon, ...props }) => {
12232
12365
  ] }) })
12233
12366
  ] });
12234
12367
  };
12368
+ const TextButton = forwardRef(
12369
+ ({ children, startIcon, endIcon, disabled = false, loading = false, ...props }, ref) => {
12370
+ const isDisabled = disabled || loading;
12371
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12372
+ TextButtonWrapper,
12373
+ {
12374
+ ref,
12375
+ disabled: isDisabled,
12376
+ "aria-disabled": isDisabled,
12377
+ tag: "button",
12378
+ type: "button",
12379
+ gap: 2,
12380
+ ...props,
12381
+ children: [
12382
+ loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Loader, {}) }) : startIcon,
12383
+ /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", children }),
12384
+ endIcon
12385
+ ]
12386
+ }
12387
+ );
12388
+ }
12389
+ );
12235
12390
  const rotation = styledComponents.keyframes`
12236
12391
  from {
12237
12392
  transform: rotate(0deg);
@@ -12240,51 +12395,24 @@ const rotation = styledComponents.keyframes`
12240
12395
  transform: rotate(359deg);
12241
12396
  }
12242
12397
  `;
12243
- const LoadingWrapper = styledComponents.styled.div`
12398
+ const LoadingWrapper = styledComponents.styled.span`
12399
+ display: flex;
12244
12400
  animation: ${rotation} 2s infinite linear;
12245
12401
  will-change: transform;
12246
12402
  `;
12247
12403
  const TextButtonWrapper = styledComponents.styled(Flex)`
12248
12404
  border: none;
12405
+ background-color: transparent;
12406
+ color: ${(props) => props.theme.colors.primary600};
12407
+ cursor: pointer;
12249
12408
 
12250
12409
  &[aria-disabled='true'] {
12251
12410
  pointer-events: none;
12252
- svg path {
12253
- fill: ${({ theme }) => theme.colors.neutral600};
12254
- }
12255
- }
12256
-
12257
- svg path {
12258
- fill: ${({ theme }) => theme.colors.primary600};
12411
+ color: ${(props) => props.theme.colors.neutral600};
12259
12412
  }
12260
12413
 
12261
12414
  ${focus}
12262
12415
  `;
12263
- const TextButton = React__namespace.forwardRef(
12264
- ({ children, startIcon, endIcon, onClick, disabled = false, loading = false, ...props }, ref) => {
12265
- const handleClick = onClick && !disabled ? onClick : void 0;
12266
- const isDisabled = disabled || loading;
12267
- return /* @__PURE__ */ jsxRuntime.jsxs(
12268
- TextButtonWrapper,
12269
- {
12270
- ref,
12271
- "aria-disabled": isDisabled,
12272
- onClick: handleClick,
12273
- tag: "button",
12274
- type: "button",
12275
- background: "transparent",
12276
- gap: 2,
12277
- ...props,
12278
- children: [
12279
- loading ? /* @__PURE__ */ jsxRuntime.jsx(LoadingWrapper, { "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(icons.Loader, {}) }) : startIcon,
12280
- /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "pi", textColor: isDisabled ? "neutral600" : "primary600", children }),
12281
- endIcon
12282
- ]
12283
- }
12284
- );
12285
- }
12286
- );
12287
- TextButton.displayName = "TextButton";
12288
12416
  const TextInput = React__namespace.forwardRef((props, ref) => {
12289
12417
  return /* @__PURE__ */ jsxRuntime.jsx(Input$2, { ref, ...props });
12290
12418
  });
@@ -12302,7 +12430,7 @@ const Textarea = React__namespace.forwardRef(
12302
12430
  } else if (field.hint) {
12303
12431
  ariaDescription = `${id}-hint`;
12304
12432
  }
12305
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12433
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12306
12434
  TextareaElement,
12307
12435
  {
12308
12436
  "aria-invalid": hasError,
@@ -12313,11 +12441,11 @@ const Textarea = React__namespace.forwardRef(
12313
12441
  disabled,
12314
12442
  fontSize: 2,
12315
12443
  hasRadius: true,
12316
- height: "10.5rem",
12317
12444
  ref,
12318
12445
  lineHeight: 4,
12319
12446
  padding: 4,
12320
12447
  width: "100%",
12448
+ height: "100%",
12321
12449
  id,
12322
12450
  name,
12323
12451
  "aria-describedby": ariaDescription,
@@ -12326,7 +12454,8 @@ const Textarea = React__namespace.forwardRef(
12326
12454
  ) });
12327
12455
  }
12328
12456
  );
12329
- const Wrapper = styledComponents.styled(Box)`
12457
+ const Wrapper$1 = styledComponents.styled(Box)`
12458
+ height: 10.5rem;
12330
12459
  ${inputFocusStyle()}
12331
12460
  `;
12332
12461
  const TextareaElement = styledComponents.styled(Box)`
@@ -12471,6 +12600,39 @@ const Input = styledComponents.styled.input`
12471
12600
  z-index: 0;
12472
12601
  width: 100%;
12473
12602
  `;
12603
+ const Root = forwardRef((props, forwardedRef) => {
12604
+ const { gap = 0, gridCols = 12, ...rest } = props;
12605
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
12606
+ });
12607
+ const Wrapper = styledComponents.styled(Box)`
12608
+ display: grid;
12609
+ grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
12610
+ ${({ theme, $gap }) => handleResponsiveValues({ gap: $gap }, theme)}
12611
+ `;
12612
+ const ItemImpl = forwardRef(
12613
+ ({ col, s, xs, m, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item, { ref: forwardedRef, $col: col, $s: s, $xs: xs, $m: m, ...props })
12614
+ );
12615
+ const Item = styledComponents.styled(Flex)`
12616
+ grid-column: span ${({ $xs }) => $xs ?? 12};
12617
+ max-width: 100%;
12618
+
12619
+ ${({ theme }) => theme.breakpoints.small} {
12620
+ grid-column: span ${({ $s, $xs }) => $s ?? $xs ?? 12};
12621
+ }
12622
+
12623
+ ${({ theme }) => theme.breakpoints.medium} {
12624
+ grid-column: span ${({ $m, $s, $xs }) => $m ?? $s ?? $xs ?? 12};
12625
+ }
12626
+
12627
+ ${({ theme }) => theme.breakpoints.large} {
12628
+ grid-column: span ${({ $col, $m, $s, $xs }) => $col ?? $m ?? $s ?? $xs ?? 12};
12629
+ }
12630
+ `;
12631
+ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12632
+ __proto__: null,
12633
+ Item: ItemImpl,
12634
+ Root
12635
+ }, Symbol.toStringTag, { value: "Module" }));
12474
12636
  const defaultState = {
12475
12637
  x: 0,
12476
12638
  y: 0,
@@ -12503,6 +12665,56 @@ function useMeasure() {
12503
12665
  }, [element, observer]);
12504
12666
  return [ref, rect];
12505
12667
  }
12668
+ const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
12669
+ const trappedRef = React__namespace.useRef(null);
12670
+ React__namespace.useEffect(() => {
12671
+ let currentFocus = null;
12672
+ if (restoreFocus) {
12673
+ currentFocus = document.activeElement;
12674
+ }
12675
+ return () => {
12676
+ if (currentFocus) {
12677
+ currentFocus.focus();
12678
+ }
12679
+ };
12680
+ }, [restoreFocus]);
12681
+ React__namespace.useEffect(() => {
12682
+ if (!trappedRef.current || skipAutoFocus)
12683
+ return;
12684
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12685
+ if (focusableChildren.length > 0) {
12686
+ const firstElement = focusableChildren[0];
12687
+ firstElement.focus();
12688
+ } else {
12689
+ console.warn(
12690
+ "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
12691
+ );
12692
+ }
12693
+ }, [skipAutoFocus]);
12694
+ const handleKeyDown = (e) => {
12695
+ if (e.key === KeyboardKeys.ESCAPE && onEscape) {
12696
+ onEscape();
12697
+ return;
12698
+ }
12699
+ if (e.key !== KeyboardKeys.TAB)
12700
+ return;
12701
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12702
+ if (focusableChildren.length > 0) {
12703
+ const firstElement = focusableChildren[0];
12704
+ const lastElement = focusableChildren[focusableChildren.length - 1];
12705
+ if (e.shiftKey) {
12706
+ if (firstElement === document.activeElement) {
12707
+ e.preventDefault();
12708
+ lastElement.focus();
12709
+ }
12710
+ } else if (lastElement === document.activeElement) {
12711
+ e.preventDefault();
12712
+ firstElement.focus();
12713
+ }
12714
+ }
12715
+ };
12716
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
12717
+ };
12506
12718
  const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
12507
12719
  const isValidFocusedElement = () => {
12508
12720
  const focused = document.activeElement;
@@ -12589,8 +12801,7 @@ exports.Accordion = Accordion;
12589
12801
  exports.Alert = Alert;
12590
12802
  exports.Avatar = Avatar;
12591
12803
  exports.Badge = Badge;
12592
- exports.BaseButton = BaseButton;
12593
- exports.BaseLink = BaseLink;
12804
+ exports.BaseLink = BaseLinkImpl;
12594
12805
  exports.Box = Box;
12595
12806
  exports.Breadcrumbs = Breadcrumbs;
12596
12807
  exports.Button = Button;
@@ -12673,7 +12884,7 @@ exports.SubNavLink = SubNavLink;
12673
12884
  exports.SubNavLinkSection = SubNavLinkSection;
12674
12885
  exports.SubNavSection = SubNavSection;
12675
12886
  exports.SubNavSections = SubNavSections;
12676
- exports.Switch = Switch;
12887
+ exports.Switch = SwitchImpl;
12677
12888
  exports.TFooter = TFooter;
12678
12889
  exports.Table = Table;
12679
12890
  exports.Tabs = Tabs;