@strapi/design-system 2.0.0-rc.7 → 2.0.0-rc.9

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 (141) 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 +1 -1
  10. package/dist/components/BaseLink/BaseLink.d.ts.map +1 -1
  11. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  12. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  13. package/dist/components/Breadcrumbs/Crumb.d.ts +1 -1
  14. package/dist/components/Breadcrumbs/Crumb.d.ts.map +1 -1
  15. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts +33 -3
  16. package/dist/components/Breadcrumbs/CrumbSimpleMenu.d.ts.map +1 -1
  17. package/dist/components/Button/Button.d.ts +1 -1
  18. package/dist/components/Button/Button.d.ts.map +1 -1
  19. package/dist/components/Card/Card.d.ts +1 -1
  20. package/dist/components/Card/Card.d.ts.map +1 -1
  21. package/dist/components/Card/CardAction.d.ts +1 -1
  22. package/dist/components/Card/CardAction.d.ts.map +1 -1
  23. package/dist/components/Card/CardBody.d.ts +1 -1
  24. package/dist/components/Card/CardBody.d.ts.map +1 -1
  25. package/dist/components/Card/CardContent.d.ts +1 -1
  26. package/dist/components/Card/CardContent.d.ts.map +1 -1
  27. package/dist/components/Card/CardHeader.d.ts +1 -1
  28. package/dist/components/Card/CardHeader.d.ts.map +1 -1
  29. package/dist/components/Card/CardTimer.d.ts +1 -1
  30. package/dist/components/Card/CardTimer.d.ts.map +1 -1
  31. package/dist/components/Card/CardTitle.d.ts +1 -1
  32. package/dist/components/Card/CardTitle.d.ts.map +1 -1
  33. package/dist/components/CarouselInput/Carousel.d.ts +1 -1
  34. package/dist/components/CarouselInput/Carousel.d.ts.map +1 -1
  35. package/dist/components/CarouselInput/CarouselActions.d.ts +1 -1
  36. package/dist/components/CarouselInput/CarouselActions.d.ts.map +1 -1
  37. package/dist/components/CarouselInput/CarouselImage.d.ts +1 -1
  38. package/dist/components/CarouselInput/CarouselImage.d.ts.map +1 -1
  39. package/dist/components/CarouselInput/CarouselInput.d.ts.map +1 -1
  40. package/dist/components/CarouselInput/CarouselSlide.d.ts +1 -1
  41. package/dist/components/CarouselInput/CarouselSlide.d.ts.map +1 -1
  42. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  43. package/dist/components/Combobox/Combobox.d.ts.map +1 -1
  44. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  45. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  46. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  47. package/dist/components/Dialog/Dialog.d.ts +2 -2
  48. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  49. package/dist/components/Divider/Divider.d.ts +1 -1
  50. package/dist/components/Divider/Divider.d.ts.map +1 -1
  51. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +1 -1
  52. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
  53. package/dist/components/Field/Field.d.ts +2 -2
  54. package/dist/components/Field/Field.d.ts.map +1 -1
  55. package/dist/components/IconButton/IconButton.d.ts +1 -1
  56. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  57. package/dist/components/JSONInput/JSONInput.d.ts +1 -1
  58. package/dist/components/JSONInput/JSONInput.d.ts.map +1 -1
  59. package/dist/components/Link/Link.d.ts.map +1 -1
  60. package/dist/components/Main/Main.d.ts +1 -1
  61. package/dist/components/Main/Main.d.ts.map +1 -1
  62. package/dist/components/Modal/Modal.d.ts +2 -2
  63. package/dist/components/Modal/Modal.d.ts.map +1 -1
  64. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  65. package/dist/components/Pagination/components.d.ts +1 -1
  66. package/dist/components/Pagination/components.d.ts.map +1 -1
  67. package/dist/components/Popover/Popover.d.ts.map +1 -1
  68. package/dist/components/RawTable/RawCell.d.ts +1 -1
  69. package/dist/components/RawTable/RawCell.d.ts.map +1 -1
  70. package/dist/components/RawTable/RawTr.d.ts +1 -1
  71. package/dist/components/RawTable/RawTr.d.ts.map +1 -1
  72. package/dist/components/Select/SelectParts.d.ts +2 -2
  73. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  74. package/dist/components/SimpleMenu/Menu.d.ts +19 -7
  75. package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
  76. package/dist/components/SimpleMenu/SimpleMenu.d.ts +31 -4
  77. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  78. package/dist/components/Status/Status.d.ts +1 -1
  79. package/dist/components/Status/Status.d.ts.map +1 -1
  80. package/dist/components/SubNav/SubNav.d.ts +1 -1
  81. package/dist/components/SubNav/SubNav.d.ts.map +1 -1
  82. package/dist/components/SubNav/SubNavHeader.d.ts +3 -3
  83. package/dist/components/SubNav/SubNavHeader.d.ts.map +1 -1
  84. package/dist/components/SubNav/SubNavLink.d.ts.map +1 -1
  85. package/dist/components/SubNav/SubNavSections.d.ts +1 -1
  86. package/dist/components/SubNav/SubNavSections.d.ts.map +1 -1
  87. package/dist/components/Table/TFooter.d.ts +1 -1
  88. package/dist/components/Table/TFooter.d.ts.map +1 -1
  89. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  90. package/dist/components/Tag/Tag.d.ts +1 -1
  91. package/dist/components/Tag/Tag.d.ts.map +1 -1
  92. package/dist/components/TextButton/TextButton.d.ts +1 -1
  93. package/dist/components/TextButton/TextButton.d.ts.map +1 -1
  94. package/dist/components/Textarea/Textarea.d.ts +1 -1
  95. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  96. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  97. package/dist/components/index.d.ts +0 -5
  98. package/dist/components/index.d.ts.map +1 -1
  99. package/dist/helpers/handleResponsiveValues.d.ts +30 -15
  100. package/dist/helpers/handleResponsiveValues.d.ts.map +1 -1
  101. package/dist/helpers/theme.d.ts +1 -1
  102. package/dist/helpers/theme.d.ts.map +1 -1
  103. package/dist/index.d.ts +1 -0
  104. package/dist/index.d.ts.map +1 -1
  105. package/dist/index.js +655 -512
  106. package/dist/index.js.map +1 -1
  107. package/dist/index.mjs +655 -512
  108. package/dist/index.mjs.map +1 -1
  109. package/dist/primitives/Box/Box.d.ts +84 -0
  110. package/dist/primitives/Box/Box.d.ts.map +1 -0
  111. package/dist/primitives/Box/index.d.ts.map +1 -0
  112. package/dist/{components → primitives}/Flex/Flex.d.ts +7 -8
  113. package/dist/primitives/Flex/Flex.d.ts.map +1 -0
  114. package/dist/primitives/Flex/index.d.ts.map +1 -0
  115. package/dist/{components → primitives}/Grid/Grid.d.ts +4 -3
  116. package/dist/primitives/Grid/Grid.d.ts.map +1 -0
  117. package/dist/primitives/Grid/index.d.ts.map +1 -0
  118. package/dist/{components → primitives}/Typography/Typography.d.ts +5 -9
  119. package/dist/primitives/Typography/Typography.d.ts.map +1 -0
  120. package/dist/primitives/Typography/index.d.ts.map +1 -0
  121. package/dist/primitives/index.d.ts +5 -0
  122. package/dist/primitives/index.d.ts.map +1 -0
  123. package/dist/themes/common-theme.d.ts +8 -4
  124. package/dist/themes/common-theme.d.ts.map +1 -1
  125. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts +1 -1
  126. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts.map +1 -1
  127. package/dist/utilities/Portal/Portal.d.ts +1 -1
  128. package/package.json +3 -3
  129. package/dist/components/Box/Box.d.ts +0 -102
  130. package/dist/components/Box/Box.d.ts.map +0 -1
  131. package/dist/components/Box/index.d.ts.map +0 -1
  132. package/dist/components/Flex/Flex.d.ts.map +0 -1
  133. package/dist/components/Flex/index.d.ts.map +0 -1
  134. package/dist/components/Grid/Grid.d.ts.map +0 -1
  135. package/dist/components/Grid/index.d.ts.map +0 -1
  136. package/dist/components/Typography/Typography.d.ts.map +0 -1
  137. package/dist/components/Typography/index.d.ts.map +0 -1
  138. /package/dist/{components → primitives}/Box/index.d.ts +0 -0
  139. /package/dist/{components → primitives}/Flex/index.d.ts +0 -0
  140. /package/dist/{components → primitives}/Grid/index.d.ts +0 -0
  141. /package/dist/{components → primitives}/Typography/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -80,32 +80,6 @@ const createContext = (rootComponentName, defaultContext) => {
80
80
  Provider2.displayName = `${rootComponentName}Provider`;
81
81
  return [Provider2, useContext];
82
82
  };
83
- const handleResponsiveValues = (property, value, theme) => {
84
- if (!value) {
85
- return void 0;
86
- }
87
- if (typeof value === "object") {
88
- const transformedArray = Array.isArray(value) ? value : [value?.desktop, value?.tablet, value?.mobile];
89
- const spaces = transformedArray.reduce((acc, curr, index) => {
90
- if (curr) {
91
- switch (index) {
92
- case 0:
93
- return `${acc}${property}: ${theme.spaces[curr]};`;
94
- case 1:
95
- return `${acc}${theme.mediaQueries.tablet}{${property}: ${theme.spaces[curr]};}`;
96
- case 2:
97
- return `${acc}${theme.mediaQueries.mobile}{${property}: ${theme.spaces[curr]};}`;
98
- default:
99
- return acc;
100
- }
101
- }
102
- return acc;
103
- }, "");
104
- return spaces;
105
- }
106
- const realValue = theme.spaces[value] ?? value;
107
- return `${property}: ${realValue};`;
108
- };
109
83
  function isKeyOf(o, s) {
110
84
  if (typeof o === "string") {
111
85
  return false;
@@ -116,11 +90,166 @@ function isObject(item) {
116
90
  return item && typeof item === "object" && !Array.isArray(item);
117
91
  }
118
92
  function extractStyleFromTheme(themeSection, key, defaultValue) {
119
- if (key && isKeyOf(themeSection, key)) {
93
+ if (themeSection && key && isKeyOf(themeSection, key)) {
120
94
  return themeSection[key];
121
95
  }
122
96
  return defaultValue;
123
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
+ };
124
253
  const forwardRef = React__namespace.forwardRef;
125
254
  const Box = forwardRef((props, ref) => {
126
255
  const {
@@ -132,8 +261,6 @@ const Box = forwardRef((props, ref) => {
132
261
  fontSize,
133
262
  grow,
134
263
  hasRadius,
135
- hiddenS,
136
- hiddenXS,
137
264
  padding,
138
265
  paddingBottom,
139
266
  paddingLeft,
@@ -147,6 +274,7 @@ const Box = forwardRef((props, ref) => {
147
274
  shadow,
148
275
  shrink,
149
276
  lineHeight,
277
+ fontWeight,
150
278
  width,
151
279
  minWidth,
152
280
  maxWidth,
@@ -184,8 +312,6 @@ const Box = forwardRef((props, ref) => {
184
312
  $fontSize: fontSize,
185
313
  $grow: grow,
186
314
  $hasRadius: hasRadius,
187
- $hiddenS: hiddenS,
188
- $hiddenXS: hiddenXS,
189
315
  $padding: padding,
190
316
  $paddingBottom: paddingBottom,
191
317
  $paddingLeft: paddingLeft,
@@ -199,6 +325,7 @@ const Box = forwardRef((props, ref) => {
199
325
  $shadow: shadow,
200
326
  $shrink: shrink,
201
327
  $lineHeight: lineHeight,
328
+ $fontWeight: fontWeight,
202
329
  $width: width,
203
330
  $minWidth: minWidth,
204
331
  $maxWidth: maxWidth,
@@ -227,110 +354,83 @@ const Box = forwardRef((props, ref) => {
227
354
  return /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { as: AsComponent, ref, ...mappedProps, ...rest });
228
355
  });
229
356
  const StyledBox = styledComponents.styled.div`
230
- // Font
231
- font-size: ${({ $fontSize, theme }) => extractStyleFromTheme(theme.fontSizes, $fontSize, $fontSize)};
232
-
233
- // Colors
234
- background: ${({ theme, $background }) => extractStyleFromTheme(theme.colors, $background, $background)};
235
- color: ${({ theme, $color }) => extractStyleFromTheme(theme.colors, $color, $color)};
236
-
237
- // Spaces
238
- ${({ theme, $padding }) => handleResponsiveValues("padding-block", $padding, theme)}
239
- ${({ theme, $padding }) => handleResponsiveValues("padding-inline", $padding, theme)}
240
- ${({ theme, $paddingTop }) => handleResponsiveValues("padding-block-start", $paddingTop, theme)}
241
- ${({ theme, $paddingRight }) => handleResponsiveValues("padding-inline-end", $paddingRight, theme)}
242
- ${({ theme, $paddingBottom }) => handleResponsiveValues("padding-block-end", $paddingBottom, theme)}
243
- ${({ theme, $paddingLeft }) => handleResponsiveValues("padding-inline-start", $paddingLeft, theme)}
244
-
245
- ${({ theme, $margin }) => handleResponsiveValues("margin-block", $margin, theme)}
246
- ${({ theme, $margin }) => handleResponsiveValues("margin-inline", $margin, theme)}
247
- ${({ theme, $marginLeft }) => handleResponsiveValues("margin-inline-start", $marginLeft, theme)}
248
- ${({ theme, $marginRight }) => handleResponsiveValues("margin-inline-end", $marginRight, theme)}
249
- ${({ theme, $marginTop }) => handleResponsiveValues("margin-block-start", $marginTop, theme)}
250
- ${({ theme, $marginBottom }) => handleResponsiveValues("margin-block-end", $marginBottom, theme)}
251
-
252
- // Responsive hiding
253
- ${({ theme, $hiddenS }) => $hiddenS ? `${theme.mediaQueries.tablet} { display: none; }` : void 0}
254
- ${({ theme, $hiddenXS }) => $hiddenXS ? `${theme.mediaQueries.mobile} { display: none; }` : void 0}
255
-
256
-
257
- // Borders
258
- border-radius: ${({ theme, $hasRadius, $borderRadius }) => $hasRadius ? theme.borderRadius : $borderRadius};
259
- border-style: ${({ $borderStyle }) => $borderStyle};
260
- border-width: ${({ $borderWidth }) => $borderWidth};
261
- border-color: ${({ $borderColor, theme }) => extractStyleFromTheme(theme.colors, $borderColor, void 0)};
262
- border: ${({ theme, $borderColor, $borderStyle, $borderWidth }) => {
263
- if ($borderColor && !$borderStyle && typeof $borderWidth === "undefined") {
264
- return `1px solid ${theme.colors[$borderColor]}`;
265
- }
266
- 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
+ );
267
408
  }};
268
-
269
- // Shadows
270
- box-shadow: ${({ theme, $shadow }) => extractStyleFromTheme(theme.shadows, $shadow, void 0)};
271
-
272
- // Handlers
273
- pointer-events: ${({ $pointerEvents }) => $pointerEvents};
274
-
275
- // Display
276
- display: ${({ $display }) => $display};
277
-
278
- // Position
279
- position: ${({ $position }) => $position};
280
- left: ${({ $left, theme }) => extractStyleFromTheme(theme.spaces, $left, $left)};
281
- right: ${({ $right, theme }) => extractStyleFromTheme(theme.spaces, $right, $right)};
282
- top: ${({ $top, theme }) => extractStyleFromTheme(theme.spaces, $top, $top)};
283
- bottom: ${({ $bottom, theme }) => extractStyleFromTheme(theme.spaces, $bottom, $bottom)};
284
- z-index: ${({ $zIndex, theme }) => extractStyleFromTheme(theme.zIndices, $zIndex, $zIndex)};
285
- overflow: ${({ $overflow }) => $overflow};
286
-
287
- // Size
288
- width: ${({ $width, theme }) => extractStyleFromTheme(theme.spaces, $width, $width)};
289
- max-width: ${({ $maxWidth, theme }) => extractStyleFromTheme(theme.spaces, $maxWidth, $maxWidth)};
290
- min-width: ${({ $minWidth, theme }) => extractStyleFromTheme(theme.spaces, $minWidth, $minWidth)};
291
- height: ${({ $height, theme }) => extractStyleFromTheme(theme.spaces, $height, $height)};
292
- max-height: ${({ $maxHeight, theme }) => extractStyleFromTheme(theme.spaces, $maxHeight, $maxHeight)};
293
- min-height: ${({ $minHeight, theme }) => extractStyleFromTheme(theme.spaces, $minHeight, $minHeight)};
294
-
295
- // Animation
296
- transition: ${({ $transition }) => $transition};
297
- transform: ${({ $transform }) => $transform};
298
- animation: ${({ $animation }) => $animation};
299
-
300
- //Flexbox children props
301
- flex-shrink: ${({ $shrink }) => $shrink};
302
- flex-grow: ${({ $grow }) => $grow};
303
- flex-basis: ${({ $basis }) => $basis};
304
- flex: ${({ $flex }) => $flex};
305
-
306
- // Text
307
- text-align: ${({ $textAlign }) => $textAlign};
308
- text-transform: ${({ $textTransform }) => $textTransform};
309
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
310
-
311
- // Cursor
312
- cursor: ${({ $cursor }) => $cursor};
313
409
  `;
314
410
  const Flex = forwardRef((props, ref) => {
315
- const { className, alignItems, direction, gap, inline, justifyContent, wrap, ...rest } = props;
411
+ const { className, alignItems, direction, inline, gap, justifyContent, wrap, ...rest } = props;
316
412
  const mappedProps = {
317
413
  $alignItems: alignItems,
318
414
  $direction: direction,
319
415
  $gap: gap,
320
- $inline: inline,
321
416
  $justifyContent: justifyContent,
322
- $wrap: wrap
417
+ $wrap: wrap,
418
+ $inline: inline
323
419
  };
324
420
  return /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { className, ref, ...mappedProps, ...rest });
325
421
  });
326
422
  const StyledFlex = styledComponents.styled(Box)`
327
- align-items: ${({ $alignItems = "center" }) => $alignItems};
328
- display: ${({ display = "flex", $inline }) => $inline ? "inline-flex" : display};
329
- flex-direction: ${({ $direction = "row" }) => $direction};
330
- flex-shrink: ${({ shrink }) => shrink};
331
- flex-wrap: ${({ $wrap }) => $wrap};
332
- ${({ $gap, theme }) => handleResponsiveValues("gap", $gap, theme)};
333
- 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
+ )};
334
434
  `;
335
435
  const ALPHA = "alpha";
336
436
  const BETA = "beta";
@@ -405,26 +505,24 @@ const Typography = forwardRef(
405
505
  (props, ref) => {
406
506
  const {
407
507
  ellipsis: ellipsis2,
408
- fontSize,
409
- fontWeight,
410
- lineHeight,
411
- textAlign,
412
508
  textColor = "currentcolor",
413
509
  textDecoration,
414
510
  textTransform,
415
511
  variant: variant2,
512
+ lineHeight,
513
+ fontWeight,
514
+ fontSize,
416
515
  ...rest
417
516
  } = props;
418
517
  const mappedProps = {
419
518
  $ellipsis: ellipsis2,
420
- $fontSize: fontSize,
421
- $fontWeight: fontWeight,
422
- $lineHeight: lineHeight,
423
- $textAlign: textAlign,
424
519
  $textColor: textColor,
425
520
  $textDecoration: textDecoration,
426
521
  $textTransform: textTransform,
427
- $variant: variant2
522
+ $variant: variant2,
523
+ $lineHeight: lineHeight,
524
+ $fontWeight: fontWeight,
525
+ $fontSize: fontSize
428
526
  };
429
527
  return /* @__PURE__ */ jsxRuntime.jsx(StyledTypography, { ref, tag: "span", ...mappedProps, ...rest });
430
528
  }
@@ -433,15 +531,19 @@ const StyledTypography = styledComponents.styled(Box)`
433
531
  ${variant}
434
532
  ${({ $ellipsis }) => $ellipsis ? ellipsis : ""}
435
533
 
436
- // These properties need to come after {variantStyle}, because they might
437
- // overwrite a variant attribute
438
- font-weight: ${({ theme, $fontWeight }) => extractStyleFromTheme(theme.fontWeights, $fontWeight, void 0)};
439
- font-size: ${({ theme, $fontSize }) => extractStyleFromTheme(theme.fontSizes, $fontSize, void 0)};
440
- line-height: ${({ theme, $lineHeight }) => extractStyleFromTheme(theme.lineHeights, $lineHeight, $lineHeight)};
441
- color: ${({ theme, $textColor }) => extractStyleFromTheme(theme.colors, $textColor, $textColor)};
442
- text-align: ${({ $textAlign }) => $textAlign};
443
- text-decoration: ${({ $textDecoration }) => $textDecoration};
444
- 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
+ }}
445
547
  `;
446
548
  const [AccordionProvider, useAccordion] = createContext("Accordion");
447
549
  const Root$8 = React__namespace.forwardRef(({ children, size = "S", ...props }, forwardedRef) => {
@@ -1386,7 +1488,7 @@ const getActiveStyle = ({ theme, $variant }) => {
1386
1488
  color: ${theme.colors[`${getVariantColorName($variant)}600`]};
1387
1489
  `;
1388
1490
  }
1389
- if ($variant === TERTIARY) {
1491
+ if ($variant === TERTIARY || $variant === GHOST) {
1390
1492
  return styledComponents.css`
1391
1493
  background-color: ${theme.colors.neutral150};
1392
1494
  `;
@@ -1526,6 +1628,156 @@ const ButtonWrapper = styledComponents.styled(Flex)`
1526
1628
  border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1527
1629
  }
1528
1630
  `;
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
+ );
1657
+ }
1658
+ );
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);
1668
+
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;
1714
+
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
+ `;
1734
+ }
1735
+ }
1736
+ }}
1737
+ ${getVariantStyle}
1738
+ ${(props) => props.$variant === "tertiary" ? styledComponents.css`
1739
+ color: ${props.theme.colors.neutral500};
1740
+ ` : ""}
1741
+
1742
+ &:hover {
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
+ `;
1529
1781
  const Link = forwardRef(
1530
1782
  ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1531
1783
  return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
@@ -1552,7 +1804,7 @@ const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
1552
1804
  }
1553
1805
 
1554
1806
  &:hover {
1555
- span {
1807
+ & > span {
1556
1808
  color: ${({ theme }) => theme.colors.primary500};
1557
1809
  }
1558
1810
  }
@@ -1565,39 +1817,31 @@ const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
1565
1817
  `;
1566
1818
  const MenuRoot = DropdownMenu__namespace.Root;
1567
1819
  const MenuTrigger = React__namespace.forwardRef(
1568
- ({ size, endIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "0.6rem", height: "0.4rem", "aria-hidden": true }), ...props }, ref) => {
1569
- return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1570
- Button,
1571
- {
1572
- ref,
1573
- type: "button",
1574
- variant: "ghost",
1575
- endIcon,
1576
- paddingTop: size === "S" ? 1 : 2,
1577
- paddingBottom: size === "S" ? 1 : 2,
1578
- paddingLeft: size === "S" ? 3 : 4,
1579
- paddingRight: size === "S" ? 3 : 4,
1580
- ...props
1581
- }
1582
- ) });
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 }) });
1583
1827
  }
1584
1828
  );
1585
1829
  const MenuContent = React__namespace.forwardRef(
1586
1830
  ({ children, intersectionId, popoverPlacement = "bottom-start", ...props }, ref) => {
1587
1831
  const [side, align] = popoverPlacement.split("-");
1588
- 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(
1589
1833
  Viewport$2,
1590
1834
  {
1591
1835
  ref,
1592
1836
  direction: "column",
1593
- borderStyle: "solid",
1594
- borderWidth: "1px",
1595
1837
  borderColor: "neutral150",
1596
1838
  hasRadius: true,
1597
1839
  background: "neutral0",
1598
1840
  shadow: "filterShadow",
1599
1841
  maxHeight: "15rem",
1600
1842
  padding: 1,
1843
+ marginTop: 1,
1844
+ marginBottom: 1,
1601
1845
  alignItems: "flex-start",
1602
1846
  position: "relative",
1603
1847
  overflow: "auto",
@@ -1619,6 +1863,23 @@ const Viewport$2 = styledComponents.styled(Flex)`
1619
1863
  display: none;
1620
1864
  }
1621
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
+ `;
1622
1883
  const MenuItem$1 = ({ onSelect, disabled = false, isLink, ...props }) => {
1623
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 }) }) });
1624
1885
  };
@@ -1628,7 +1889,7 @@ const getOptionStyle = ({ theme }) => styledComponents.css`
1628
1889
  border-radius: ${theme.borderRadius};
1629
1890
  padding: ${theme.spaces[2]} ${theme.spaces[4]};
1630
1891
 
1631
- &[aria-disabled] {
1892
+ &[aria-disabled='true'] {
1632
1893
  cursor: not-allowed;
1633
1894
  color: ${theme.colors.neutral500};
1634
1895
  }
@@ -1901,12 +2162,6 @@ const CheckboxRoot = styledComponents.styled(Checkbox__namespace.Root)`
1901
2162
  // this ensures the checkbox is always a square even in flex-containers.
1902
2163
  flex: 0 0 2rem;
1903
2164
 
1904
- @media (prefers-reduced-motion: no-preference) {
1905
- transition:
1906
- border-color ${(props) => props.theme.motion.timings["120"]} ${(props) => props.theme.motion.easings.easeOutQuad},
1907
- ${(props) => props.theme.transitions.backgroundColor};
1908
- }
1909
-
1910
2165
  &[data-state='checked'],
1911
2166
  &[data-state='indeterminate'] {
1912
2167
  border: 1px solid ${(props) => props.theme.colors.primary600};
@@ -1995,49 +2250,6 @@ const KeyboardKeys = {
1995
2250
  BACKSPACE: "Backspace",
1996
2251
  CLEAR: "Clear"
1997
2252
  };
1998
- const TooltipImpl = React__namespace.forwardRef(
1999
- ({
2000
- children,
2001
- description,
2002
- label,
2003
- defaultOpen,
2004
- open,
2005
- onOpenChange,
2006
- delayDuration = 500,
2007
- disableHoverableContent,
2008
- ...restProps
2009
- }, forwardedRef) => {
2010
- return /* @__PURE__ */ jsxRuntime.jsxs(
2011
- Tooltip__namespace.Root,
2012
- {
2013
- defaultOpen,
2014
- open,
2015
- onOpenChange,
2016
- delayDuration,
2017
- disableHoverableContent,
2018
- children: [
2019
- /* @__PURE__ */ jsxRuntime.jsx(Tooltip__namespace.Trigger, { asChild: true, children }),
2020
- /* @__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 }) }) })
2021
- ]
2022
- }
2023
- );
2024
- }
2025
- );
2026
- const TooltipContent = styledComponents.styled(Tooltip__namespace.Content)`
2027
- background-color: ${(props) => props.theme.colors.neutral900};
2028
- color: ${(props) => props.theme.colors.neutral0};
2029
- padding-inline: ${(props) => props.theme.spaces[2]};
2030
- padding-block: ${(props) => props.theme.spaces[2]};
2031
- border-radius: ${(props) => props.theme.borderRadius};
2032
- z-index: ${(props) => props.theme.zIndices.tooltip};
2033
- will-change: opacity;
2034
- transform-origin: var(--radix-tooltip-content-transform-origin);
2035
-
2036
- @media (prefers-reduced-motion: no-preference) {
2037
- animation: ${ANIMATIONS.fadeIn} ${(props) => props.theme.motion.timings["200"]}
2038
- ${(props) => props.theme.motion.easings.authenticMotion};
2039
- }
2040
- `;
2041
2253
  const CarouselGrid = styledComponents.styled(Box)`
2042
2254
  grid-template-columns: auto 1fr auto;
2043
2255
  grid-template-areas: 'startAction slides endAction';
@@ -2132,9 +2344,11 @@ const commonTheme = {
2132
2344
  },
2133
2345
  spaces: ["0px", "4px", "8px", "12px", "16px", "20px", "24px", "32px", "40px", "48px", "56px", "64px"],
2134
2346
  borderRadius: "4px",
2135
- mediaQueries: {
2136
- tablet: `@media (max-width: 1100px)`,
2137
- 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: 1280px)"
2138
2352
  },
2139
2353
  fontSizes: [`1.1rem`, `1.2rem`, `1.4rem`, "1.6rem", `1.8rem`, `3.2rem`],
2140
2354
  lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5],
@@ -7838,10 +8052,9 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7838
8052
  return null;
7839
8053
  }
7840
8054
  return /* @__PURE__ */ jsxRuntime.jsxs(
7841
- Typography,
8055
+ TypographyLabel,
7842
8056
  {
7843
8057
  ref: composedRefs,
7844
- display: "flex",
7845
8058
  variant: "pi",
7846
8059
  textColor: "neutral800",
7847
8060
  fontWeight: "bold",
@@ -7849,6 +8062,7 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7849
8062
  id: `${id}-label`,
7850
8063
  htmlFor: id,
7851
8064
  tag: "label",
8065
+ ellipsis: true,
7852
8066
  children: [
7853
8067
  children,
7854
8068
  required && /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "1em", textColor: "danger600", children: "*" }),
@@ -7857,6 +8071,9 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7857
8071
  }
7858
8072
  );
7859
8073
  });
8074
+ const TypographyLabel = styledComponents.styled(Typography)`
8075
+ display: flex;
8076
+ `;
7860
8077
  const LabelAction = styledComponents.styled(Flex)`
7861
8078
  line-height: 0;
7862
8079
  color: ${({ theme }) => theme.colors.neutral500};
@@ -7881,11 +8098,24 @@ const Input$2 = React__namespace.forwardRef(
7881
8098
  ariaDescription = `${id}-hint`;
7882
8099
  }
7883
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);
7884
8104
  const handleChange = (e) => {
7885
8105
  if (!disabled && onChange) {
7886
8106
  onChange(e);
7887
8107
  }
7888
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]);
7889
8119
  return /* @__PURE__ */ jsxRuntime.jsxs(
7890
8120
  InputWrapper,
7891
8121
  {
@@ -7904,7 +8134,7 @@ const Input$2 = React__namespace.forwardRef(
7904
8134
  {
7905
8135
  id,
7906
8136
  name,
7907
- ref,
8137
+ ref: inputRef,
7908
8138
  $size: size,
7909
8139
  "aria-describedby": ariaDescription,
7910
8140
  "aria-invalid": hasError || hasErrorProp,
@@ -7913,10 +8143,12 @@ const Input$2 = React__namespace.forwardRef(
7913
8143
  "data-disabled": disabled ? "" : void 0,
7914
8144
  onChange: handleChange,
7915
8145
  "aria-required": required || requiredProp,
8146
+ $hasLeftAction: Boolean(startAction),
8147
+ $hasRightAction: Boolean(endAction),
7916
8148
  ...props
7917
8149
  }
7918
8150
  ),
7919
- endAction
8151
+ endAction && /* @__PURE__ */ jsxRuntime.jsx(EndAction, { ref: endActionRef, children: endAction })
7920
8152
  ]
7921
8153
  }
7922
8154
  );
@@ -7935,19 +8167,6 @@ const InputElement = styledComponents.styled.input`
7935
8167
  width: 100%;
7936
8168
  background: inherit;
7937
8169
 
7938
- ${(props) => {
7939
- switch (props.$size) {
7940
- case "S":
7941
- return styledComponents.css`
7942
- padding-block: ${props.theme.spaces[1]};
7943
- `;
7944
- default:
7945
- return styledComponents.css`
7946
- padding-block: ${props.theme.spaces[2]};
7947
- `;
7948
- }
7949
- }};
7950
-
7951
8170
  ::placeholder {
7952
8171
  color: ${({ theme }) => theme.colors.neutral500};
7953
8172
  opacity: 1;
@@ -7962,32 +8181,42 @@ const InputElement = styledComponents.styled.input`
7962
8181
  outline: none;
7963
8182
  box-shadow: none;
7964
8183
  }
7965
- `;
7966
- const InputWrapper = styledComponents.styled(Flex)`
7967
- border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
7968
- border-radius: ${({ theme }) => theme.borderRadius};
7969
- background: ${({ theme }) => theme.colors.neutral0};
7970
- ${inputFocusStyle()}
7971
8184
 
7972
8185
  ${(props) => {
7973
8186
  switch (props.$size) {
7974
8187
  case "S":
7975
8188
  return styledComponents.css`
7976
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7977
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
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]};
7978
8192
  `;
7979
8193
  default:
7980
8194
  return styledComponents.css`
7981
- padding-inline-start: ${props.$hasLeftAction ? props.theme.spaces[3] : props.theme.spaces[4]};
7982
- padding-inline-end: ${props.$hasRightAction ? props.theme.spaces[3] : props.theme.spaces[4]};
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]};
7983
8198
  `;
7984
8199
  }
7985
8200
  }}
8201
+ `;
8202
+ const EndAction = styledComponents.styled(Flex)`
8203
+ position: absolute;
8204
+ right: ${({ theme }) => theme.spaces[4]};
8205
+ top: 50%;
8206
+ transform: translateY(-50%);
8207
+ `;
8208
+ const InputWrapper = styledComponents.styled(Flex)`
8209
+ border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
8210
+ border-radius: ${({ theme }) => theme.borderRadius};
8211
+ background: ${({ theme }) => theme.colors.neutral0};
8212
+ padding-inline-start: ${({ $hasLeftAction, theme }) => $hasLeftAction ? theme.spaces[4] : 0};
8213
+ position: relative;
7986
8214
 
8215
+ ${inputFocusStyle()}
7987
8216
  ${({ theme, $disabled }) => $disabled ? styledComponents.css`
7988
8217
  color: ${theme.colors.neutral600};
7989
8218
  background: ${theme.colors.neutral150};
7990
- ` : void 0}
8219
+ ` : void 0};
7991
8220
  `;
7992
8221
  const Hint = () => {
7993
8222
  const { id, hint, error } = useField("Hint");
@@ -8268,7 +8497,7 @@ const Combobox = React__namespace.forwardRef(
8268
8497
  children: [
8269
8498
  /* @__PURE__ */ jsxRuntime.jsxs(Trigger$5, { $hasError: hasError, $size: size, className, children: [
8270
8499
  /* @__PURE__ */ jsxRuntime.jsxs(Flex, { flex: "1", tag: "span", gap: 3, children: [
8271
- 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,
8272
8501
  /* @__PURE__ */ jsxRuntime.jsx(
8273
8502
  TextInput$1,
8274
8503
  {
@@ -8302,7 +8531,7 @@ const Combobox = React__namespace.forwardRef(
8302
8531
  children: /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {})
8303
8532
  }
8304
8533
  ) : null,
8305
- /* @__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" }) })
8306
8535
  ] })
8307
8536
  ] }),
8308
8537
  /* @__PURE__ */ jsxRuntime.jsx(uiPrimitives.Combobox.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(Content$5, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsxs(Viewport$1, { ref: viewportRef, children: [
@@ -8391,6 +8620,7 @@ const DownIcon$1 = styledComponents.styled(uiPrimitives.Combobox.Icon)`
8391
8620
  background: transparent;
8392
8621
  padding: 0;
8393
8622
  color: ${({ theme }) => theme.colors.neutral600};
8623
+ display: flex;
8394
8624
 
8395
8625
  &[aria-disabled='true'] {
8396
8626
  cursor: inherit;
@@ -8414,11 +8644,11 @@ const Content$5 = styledComponents.styled(uiPrimitives.Combobox.Content)`
8414
8644
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8415
8645
 
8416
8646
  &[data-side='top'] {
8417
- animation-name: ${ANIMATIONS.slideDownIn};
8647
+ animation-name: ${ANIMATIONS.slideUpIn};
8418
8648
  }
8419
8649
 
8420
8650
  &[data-side='bottom'] {
8421
- animation-name: ${ANIMATIONS.slideUpIn};
8651
+ animation-name: ${ANIMATIONS.slideDownIn};
8422
8652
  }
8423
8653
  }
8424
8654
  }
@@ -8862,6 +9092,7 @@ const SelectTrigger = React__namespace.forwardRef(
8862
9092
  );
8863
9093
  const IconBox$2 = styledComponents.styled(Box)`
8864
9094
  border: none;
9095
+ display: flex;
8865
9096
 
8866
9097
  svg {
8867
9098
  height: 1.1rem;
@@ -8869,7 +9100,7 @@ const IconBox$2 = styledComponents.styled(Box)`
8869
9100
  }
8870
9101
 
8871
9102
  svg path {
8872
- fill: ${({ theme }) => theme.colors.neutral600};
9103
+ fill: ${({ theme }) => theme.colors.neutral500};
8873
9104
  }
8874
9105
  `;
8875
9106
  const StyledTrigger = styledComponents.styled(Flex)`
@@ -8892,7 +9123,7 @@ const StyledTrigger = styledComponents.styled(Flex)`
8892
9123
  }}
8893
9124
 
8894
9125
  &[aria-disabled='true'] {
8895
- color: ${(props) => props.theme.colors.neutral600};
9126
+ color: ${(props) => props.theme.colors.neutral500};
8896
9127
  }
8897
9128
 
8898
9129
  /* Required to ensure the below inputFocusStyles are adhered too */
@@ -8903,8 +9134,9 @@ const StyledTrigger = styledComponents.styled(Flex)`
8903
9134
  ${({ theme, $hasError }) => inputFocusStyle()({ theme, $hasError })};
8904
9135
  `;
8905
9136
  const DownIcon = styledComponents.styled(uiPrimitives.Select.Icon)`
9137
+ display: flex;
8906
9138
  & > svg {
8907
- fill: ${({ theme }) => theme.colors.neutral600};
9139
+ fill: ${({ theme }) => theme.colors.neutral500};
8908
9140
  }
8909
9141
  `;
8910
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 }) }));
@@ -8935,11 +9167,11 @@ const SelectContent = styledComponents.styled(uiPrimitives.Select.Content)`
8935
9167
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
8936
9168
 
8937
9169
  &[data-side='top'] {
8938
- animation-name: ${ANIMATIONS.slideDownIn};
9170
+ animation-name: ${ANIMATIONS.slideUpIn};
8939
9171
  }
8940
9172
 
8941
9173
  &[data-side='bottom'] {
8942
- animation-name: ${ANIMATIONS.slideUpIn};
9174
+ animation-name: ${ANIMATIONS.slideDownIn};
8943
9175
  }
8944
9176
  }
8945
9177
  }
@@ -9597,7 +9829,7 @@ const DatePickerContentImpl = React__namespace.forwardRef(
9597
9829
  (props, forwardedRef) => {
9598
9830
  const { label = "Choose date", ...restProps } = props;
9599
9831
  const { onOpenChange, ...context } = useDatePickerContext(CONTENT_IMPL_NAME);
9600
- const { x, y, refs, strategy } = reactDom$1.useFloating({
9832
+ const { x, y, refs, strategy, placement } = reactDom$1.useFloating({
9601
9833
  strategy: "fixed",
9602
9834
  placement: "bottom-start",
9603
9835
  middleware: [
@@ -9644,6 +9876,7 @@ const DatePickerContentImpl = React__namespace.forwardRef(
9644
9876
  {
9645
9877
  ref: composedRefs,
9646
9878
  "data-state": context.open ? "open" : "closed",
9879
+ "data-side": placement.includes("top") ? "top" : "bottom",
9647
9880
  onContextMenu: (event) => event.preventDefault(),
9648
9881
  id: context.contentId,
9649
9882
  role: "dialog",
@@ -9668,6 +9901,22 @@ const ContentElement = styledComponents.styled(Box)`
9668
9901
  box-shadow: ${({ theme }) => theme.shadows.filterShadow};
9669
9902
  z-index: ${({ theme }) => theme.zIndices.popover};
9670
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
+ }
9671
9920
  `;
9672
9921
  const DATE_PICKER_CALENDAR_NAME = "DatePickerCalendar";
9673
9922
  const DatePickerCalendar = React__namespace.forwardRef(
@@ -10080,250 +10329,44 @@ const Divider = React__namespace.forwardRef((props, forwardedRef) => {
10080
10329
  ref: forwardedRef,
10081
10330
  background: "neutral150",
10082
10331
  ...props,
10083
- "data-orientation": "horizontal",
10084
- role: "separator",
10085
- tag: "div"
10086
- }
10087
- );
10088
- });
10089
- const DividerImpl = styledComponents.styled(Box)`
10090
- height: 1px;
10091
- border: none;
10092
- /* If contained in a Flex parent we want to prevent the Divider to shink */
10093
- flex-shrink: 0;
10094
- `;
10095
- const EmptyStateIconWrapper = styledComponents.styled(Box)`
10096
- svg {
10097
- height: 8.8rem;
10098
- }
10099
- `;
10100
- const EmptyStateLayout = React__namespace.forwardRef(
10101
- ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10102
- return /* @__PURE__ */ jsxRuntime.jsxs(
10103
- Flex,
10104
- {
10105
- ref: forwardedRef,
10106
- alignItems: "center",
10107
- direction: "column",
10108
- padding: 11,
10109
- background: "neutral0",
10110
- hasRadius,
10111
- shadow,
10112
- children: [
10113
- icon ? /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10114
- /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10115
- action
10116
- ]
10117
- }
10118
- );
10119
- }
10120
- );
10121
- const getFocusableNodes = (node, includeNegativeTabIndex) => {
10122
- const nodes = [
10123
- ...node.querySelectorAll(
10124
- 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
10125
- )
10126
- ];
10127
- const focusables = nodes.filter((node2) => {
10128
- if (node2.hasAttribute("disabled"))
10129
- return false;
10130
- if (includeNegativeTabIndex)
10131
- return true;
10132
- return node2.getAttribute("tabindex") !== "-1";
10133
- });
10134
- return focusables;
10135
- };
10136
- const getFocusableNodesWithKeyboardNav = (nodes) => {
10137
- return nodes.filter((node) => {
10138
- if (node.tagName === "INPUT") {
10139
- return node.type !== "checkbox" && node.type !== "radio";
10140
- }
10141
- return false;
10142
- });
10143
- };
10144
- const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
10145
- const trappedRef = React__namespace.useRef(null);
10146
- React__namespace.useEffect(() => {
10147
- let currentFocus = null;
10148
- if (restoreFocus) {
10149
- currentFocus = document.activeElement;
10150
- }
10151
- return () => {
10152
- if (currentFocus) {
10153
- currentFocus.focus();
10154
- }
10155
- };
10156
- }, [restoreFocus]);
10157
- React__namespace.useEffect(() => {
10158
- if (!trappedRef.current || skipAutoFocus)
10159
- return;
10160
- const focusableChildren = getFocusableNodes(trappedRef.current);
10161
- if (focusableChildren.length > 0) {
10162
- const firstElement = focusableChildren[0];
10163
- firstElement.focus();
10164
- } else {
10165
- console.warn(
10166
- "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
10167
- );
10168
- }
10169
- }, [skipAutoFocus]);
10170
- const handleKeyDown = (e) => {
10171
- if (e.key === KeyboardKeys.ESCAPE && onEscape) {
10172
- onEscape();
10173
- return;
10174
- }
10175
- if (e.key !== KeyboardKeys.TAB)
10176
- return;
10177
- const focusableChildren = getFocusableNodes(trappedRef.current);
10178
- if (focusableChildren.length > 0) {
10179
- const firstElement = focusableChildren[0];
10180
- const lastElement = focusableChildren[focusableChildren.length - 1];
10181
- if (e.shiftKey) {
10182
- if (firstElement === document.activeElement) {
10183
- e.preventDefault();
10184
- lastElement.focus();
10185
- }
10186
- } else if (lastElement === document.activeElement) {
10187
- e.preventDefault();
10188
- firstElement.focus();
10189
- }
10332
+ "data-orientation": "horizontal",
10333
+ role: "separator",
10334
+ tag: "div"
10190
10335
  }
10191
- };
10192
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
10193
- };
10194
- const Root$3 = forwardRef((props, forwardedRef) => {
10195
- const { gap = 0, gridCols = 12, ...rest } = props;
10196
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
10336
+ );
10197
10337
  });
10198
- const Wrapper$1 = styledComponents.styled(Box)`
10199
- display: grid;
10200
- grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
10201
- ${({ theme, $gap }) => handleResponsiveValues("gap", $gap, theme)}
10338
+ const DividerImpl = styledComponents.styled(Box)`
10339
+ height: 1px;
10340
+ border: none;
10341
+ /* If contained in a Flex parent we want to prevent the Divider to shink */
10342
+ flex-shrink: 0;
10202
10343
  `;
10203
- const ItemImpl = forwardRef(
10204
- ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item$1, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
10205
- );
10206
- const Item$1 = styledComponents.styled(Flex)`
10207
- grid-column: span ${({ $col }) => $col ?? 1};
10208
- max-width: 100%;
10209
-
10210
- ${({ theme }) => theme.mediaQueries.tablet} {
10211
- grid-column: span ${({ $s }) => $s};
10212
- }
10213
-
10214
- ${({ theme }) => theme.mediaQueries.mobile} {
10215
- grid-column: span ${({ $xs }) => $xs};
10344
+ const EmptyStateIconWrapper = styledComponents.styled(Box)`
10345
+ svg {
10346
+ height: 8.8rem;
10216
10347
  }
10217
10348
  `;
10218
- const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10219
- __proto__: null,
10220
- Item: ItemImpl,
10221
- Root: Root$3
10222
- }, Symbol.toStringTag, { value: "Module" }));
10223
- const IconButton = forwardRef(
10224
- ({
10225
- label,
10226
- background,
10227
- children,
10228
- disabled = false,
10229
- onClick,
10230
- size = "M",
10231
- variant: variant2 = "tertiary",
10232
- withTooltip = true,
10233
- ...restProps
10234
- }, ref) => {
10235
- const handleClick = (e) => {
10236
- if (!disabled && onClick) {
10237
- onClick(e);
10238
- }
10239
- };
10240
- const component = /* @__PURE__ */ jsxRuntime.jsx(
10241
- IconButtonWrapper,
10349
+ const EmptyStateLayout = React__namespace.forwardRef(
10350
+ ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10351
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10352
+ Flex,
10242
10353
  {
10243
- "aria-disabled": disabled,
10244
- background: disabled ? "neutral150" : background,
10245
- tag: "button",
10246
- display: "inline-flex",
10247
- justifyContent: "center",
10248
- hasRadius: true,
10249
- cursor: "pointer",
10250
- ...restProps,
10251
- ref,
10252
- $size: size,
10253
- onClick: handleClick,
10254
- $variant: variant2,
10255
- 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
+ ]
10256
10366
  }
10257
10367
  );
10258
- return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
10259
10368
  }
10260
10369
  );
10261
- const IconButtonWrapper = styledComponents.styled(Flex)`
10262
- text-decoration: none;
10263
-
10264
- ${(props) => {
10265
- switch (props.$size) {
10266
- case "S": {
10267
- return styledComponents.css`
10268
- padding-block: 0.6rem;
10269
- padding-inline: 0.6rem;
10270
- `;
10271
- }
10272
- case "M": {
10273
- return styledComponents.css`
10274
- padding-block: 0.9rem;
10275
- padding-inline: 0.9rem;
10276
- `;
10277
- }
10278
- case "L": {
10279
- return styledComponents.css`
10280
- padding-block: 1.1rem;
10281
- padding-inline: 1.1rem;
10282
- `;
10283
- }
10284
- }
10285
- }}
10286
- ${getVariantStyle}
10287
- ${(props) => props.$variant === "tertiary" ? styledComponents.css`
10288
- color: ${props.theme.colors.neutral600};
10289
- ` : ""}
10290
-
10291
- &:hover {
10292
- ${getHoverStyle}
10293
- }
10294
-
10295
- &:active {
10296
- ${getActiveStyle}
10297
- }
10298
-
10299
- &[aria-disabled='true'] {
10300
- ${getDisabledStyle}
10301
- }
10302
-
10303
- @media (prefers-reduced-motion: no-preference) {
10304
- transition:
10305
- ${(props) => props.theme.transitions.backgroundColor},
10306
- ${(props) => props.theme.transitions.color},
10307
- border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
10308
- }
10309
- `;
10310
- const IconButtonGroup = styledComponents.styled(Flex)`
10311
- & ${IconButtonWrapper}:first-child {
10312
- border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
10313
- }
10314
-
10315
- & ${IconButtonWrapper}:last-child {
10316
- border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
10317
- }
10318
-
10319
- & ${IconButtonWrapper} {
10320
- border-radius: 0;
10321
-
10322
- & + ${IconButtonWrapper} {
10323
- border-left: none;
10324
- }
10325
- }
10326
- `;
10327
10370
  const addMarks = state.StateEffect.define();
10328
10371
  const filterMarks = state.StateEffect.define();
10329
10372
  const lineHighlightMark = view.Decoration.mark({
@@ -10604,7 +10647,7 @@ const Thumb = styledComponents.styled(ScrollArea__namespace.Thumb)`
10604
10647
  min-height: 44px;
10605
10648
  }
10606
10649
  `;
10607
- const Root$2 = Dialog__namespace.Root;
10650
+ const Root$3 = Dialog__namespace.Root;
10608
10651
  const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
10609
10652
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10610
10653
  });
@@ -10624,8 +10667,8 @@ const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
10624
10667
  `;
10625
10668
  const ContentImpl = styledComponents.styled(Dialog__namespace.Content)`
10626
10669
  max-width: 83rem;
10627
- max-height: 80vh;
10628
- height: min-content;
10670
+ max-height: 90vh;
10671
+ height: auto;
10629
10672
  width: 60%;
10630
10673
  overflow: hidden;
10631
10674
  margin: 0 auto;
@@ -10727,7 +10770,7 @@ const Modal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
10727
10770
  Content: Content$2,
10728
10771
  Footer,
10729
10772
  Header,
10730
- Root: Root$2,
10773
+ Root: Root$3,
10731
10774
  Title,
10732
10775
  Trigger: Trigger$2
10733
10776
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10963,7 +11006,7 @@ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Box, {
10963
11006
  /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden, { children }),
10964
11007
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })
10965
11008
  ] });
10966
- const Root$1 = Popover__namespace.Root;
11009
+ const Root$2 = Popover__namespace.Root;
10967
11010
  const Trigger$1 = React__namespace.forwardRef((props, forwardedRef) => {
10968
11011
  return /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10969
11012
  });
@@ -10975,6 +11018,7 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10975
11018
  z-index: ${({ theme }) => theme.zIndices.popover};
10976
11019
  background-color: ${(props) => props.theme.colors.neutral0};
10977
11020
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
11021
+ border-radius: ${({ theme }) => theme.borderRadius};
10978
11022
 
10979
11023
  @media (prefers-reduced-motion: no-preference) {
10980
11024
  animation-duration: ${(props) => props.theme.motion.timings["200"]};
@@ -10983,11 +11027,11 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10983
11027
  animation-timing-function: ${(props) => props.theme.motion.easings.authenticMotion};
10984
11028
 
10985
11029
  &[data-side='top'] {
10986
- animation-name: ${ANIMATIONS.slideDownIn};
11030
+ animation-name: ${ANIMATIONS.slideUpIn};
10987
11031
  }
10988
11032
 
10989
11033
  &[data-side='bottom'] {
10990
- animation-name: ${ANIMATIONS.slideUpIn};
11034
+ animation-name: ${ANIMATIONS.slideDownIn};
10991
11035
  }
10992
11036
  }
10993
11037
 
@@ -10995,11 +11039,11 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10995
11039
  animation-timing-function: ${(props) => props.theme.motion.easings.easeOutQuad};
10996
11040
 
10997
11041
  &[data-side='top'] {
10998
- animation-name: ${ANIMATIONS.slideDownOut};
11042
+ animation-name: ${ANIMATIONS.slideUpOut};
10999
11043
  }
11000
11044
 
11001
11045
  &[data-side='bottom'] {
11002
- animation-name: ${ANIMATIONS.slideUpOut};
11046
+ animation-name: ${ANIMATIONS.slideDownOut};
11003
11047
  }
11004
11048
  }
11005
11049
  }
@@ -11026,7 +11070,7 @@ const PopoverScrollArea = styledComponents.styled(ScrollAreaImpl$1)`
11026
11070
  const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11027
11071
  __proto__: null,
11028
11072
  Content: Content$1,
11029
- Root: Root$1,
11073
+ Root: Root$2,
11030
11074
  ScrollArea: ScrollAreaImpl,
11031
11075
  Trigger: Trigger$1
11032
11076
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11066,7 +11110,7 @@ const RadioGroupRoot = styledComponents.styled(RadioGroup__namespace.Root)`
11066
11110
  flex-direction: column;
11067
11111
  gap: ${(props) => props.theme.spaces[3]};
11068
11112
  `;
11069
- const Item = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11113
+ const Item$1 = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11070
11114
  const id = useId(idProp);
11071
11115
  return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: 2, children: [
11072
11116
  /* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { id, ref: forwardedRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupIndicator, {}) }),
@@ -11135,7 +11179,7 @@ const RadioGroupIndicator = styledComponents.styled(RadioGroup__namespace.Indica
11135
11179
  const Radio = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11136
11180
  __proto__: null,
11137
11181
  Group,
11138
- Item
11182
+ Item: Item$1
11139
11183
  }, Symbol.toStringTag, { value: "Module" }));
11140
11184
  const focusFocusable = (node) => {
11141
11185
  const nextNode = node.querySelector('[tabindex="0"]');
@@ -11234,6 +11278,29 @@ const RawTable = React__namespace.forwardRef(
11234
11278
  ) });
11235
11279
  }
11236
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;
11295
+ };
11296
+ const getFocusableNodesWithKeyboardNav = (nodes) => {
11297
+ return nodes.filter((node) => {
11298
+ if (node.tagName === "INPUT") {
11299
+ return node.type !== "checkbox" && node.type !== "radio";
11300
+ }
11301
+ return false;
11302
+ });
11303
+ };
11237
11304
  const RawTd = React__namespace.forwardRef(
11238
11305
  ({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
11239
11306
  const tdRef = React__namespace.useRef(null);
@@ -11683,7 +11750,8 @@ const SubNavHeader = ({
11683
11750
  },
11684
11751
  onSubmit = () => {
11685
11752
  },
11686
- id
11753
+ id,
11754
+ placeholder
11687
11755
  }) => {
11688
11756
  const [isSearchOpen, setSearchOpen] = React__namespace.useState(false);
11689
11757
  const previousSearchOpenValue = uiPrimitives.usePrev(isSearchOpen);
@@ -11723,7 +11791,7 @@ const SubNavHeader = ({
11723
11791
  name: "searchbar",
11724
11792
  value,
11725
11793
  onChange,
11726
- placeholder: "e.g: strapi-plugin-abcd",
11794
+ placeholder,
11727
11795
  onKeyDown: handleKeyDown,
11728
11796
  ref: searchRef,
11729
11797
  onBlur: handleBlur,
@@ -12012,7 +12080,7 @@ const LabelTypography = styledComponents.styled(Typography)`
12012
12080
  }
12013
12081
  `;
12014
12082
  const [TabsProvider, useTabs] = createContext("Tabs");
12015
- const Root = React__namespace.forwardRef(
12083
+ const Root$1 = React__namespace.forwardRef(
12016
12084
  ({ disabled = false, variant: variant2 = "regular", hasError, ...props }, forwardedRef) => {
12017
12085
  return /* @__PURE__ */ jsxRuntime.jsx(TabsProvider, { disabled, hasError, variant: variant2, children: /* @__PURE__ */ jsxRuntime.jsx(TabsRoot, { ref: forwardedRef, ...props }) });
12018
12086
  }
@@ -12051,10 +12119,6 @@ const TabBar = styledComponents.styled.span`
12051
12119
  left: 0;
12052
12120
  opacity: 0;
12053
12121
  height: 0.2rem;
12054
-
12055
- @media (prefers-reduced-motion: no-preference) {
12056
- transition: ${(props) => `opacity 200ms ${props.theme.motion.easings.authenticMotion}`};
12057
- }
12058
12122
  `;
12059
12123
  const TriggerTypography = styledComponents.styled(Typography)``;
12060
12124
  const TabsTrigger = styledComponents.styled(Tabs__namespace.Trigger)`
@@ -12108,10 +12172,6 @@ const TabsTrigger = styledComponents.styled(Tabs__namespace.Trigger)`
12108
12172
  }
12109
12173
  }}
12110
12174
 
12111
- @media (prefers-reduced-motion: no-preference) {
12112
- transition: ${(props) => `${props.theme.transitions.color}, ${props.theme.transitions.backgroundColor}, box-shadow ${props.theme.motion.timings["120"]} ${props.theme.motion.easings.easeOutQuad}`};
12113
- }
12114
-
12115
12175
  &[data-disabled] {
12116
12176
  cursor: not-allowed;
12117
12177
  color: ${(props) => props.theme.colors.neutral400};
@@ -12138,7 +12198,7 @@ const Tabs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
12138
12198
  __proto__: null,
12139
12199
  Content,
12140
12200
  List,
12141
- Root,
12201
+ Root: Root$1,
12142
12202
  Trigger
12143
12203
  }, Symbol.toStringTag, { value: "Module" }));
12144
12204
  const TableContainer = styledComponents.styled(Box)`
@@ -12360,7 +12420,7 @@ const Textarea = React__namespace.forwardRef(
12360
12420
  } else if (field.hint) {
12361
12421
  ariaDescription = `${id}-hint`;
12362
12422
  }
12363
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12423
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12364
12424
  TextareaElement,
12365
12425
  {
12366
12426
  "aria-invalid": hasError,
@@ -12384,7 +12444,7 @@ const Textarea = React__namespace.forwardRef(
12384
12444
  ) });
12385
12445
  }
12386
12446
  );
12387
- const Wrapper = styledComponents.styled(Box)`
12447
+ const Wrapper$1 = styledComponents.styled(Box)`
12388
12448
  ${inputFocusStyle()}
12389
12449
  `;
12390
12450
  const TextareaElement = styledComponents.styled(Box)`
@@ -12529,6 +12589,39 @@ const Input = styledComponents.styled.input`
12529
12589
  z-index: 0;
12530
12590
  width: 100%;
12531
12591
  `;
12592
+ const Root = forwardRef((props, forwardedRef) => {
12593
+ const { gap = 0, gridCols = 12, ...rest } = props;
12594
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
12595
+ });
12596
+ const Wrapper = styledComponents.styled(Box)`
12597
+ display: grid;
12598
+ grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
12599
+ ${({ theme, $gap }) => handleResponsiveValues({ gap: $gap }, theme)}
12600
+ `;
12601
+ const ItemImpl = forwardRef(
12602
+ ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
12603
+ );
12604
+ const Item = styledComponents.styled(Flex)`
12605
+ grid-column: span ${({ $xs }) => $xs ?? 12};
12606
+ max-width: 100%;
12607
+
12608
+ ${({ theme }) => theme.breakpoints.small} {
12609
+ grid-column: span ${({ $s, $xs }) => $s ?? $xs ?? 12};
12610
+ }
12611
+
12612
+ ${({ theme }) => theme.breakpoints.medium} {
12613
+ grid-column: span ${({ $m, $s, $xs }) => $m ?? $s ?? $xs ?? 12};
12614
+ }
12615
+
12616
+ ${({ theme }) => theme.breakpoints.large} {
12617
+ grid-column: span ${({ $col, $m, $s, $xs }) => $col ?? $m ?? $s ?? $xs ?? 12};
12618
+ }
12619
+ `;
12620
+ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12621
+ __proto__: null,
12622
+ Item: ItemImpl,
12623
+ Root
12624
+ }, Symbol.toStringTag, { value: "Module" }));
12532
12625
  const defaultState = {
12533
12626
  x: 0,
12534
12627
  y: 0,
@@ -12561,6 +12654,56 @@ function useMeasure() {
12561
12654
  }, [element, observer]);
12562
12655
  return [ref, rect];
12563
12656
  }
12657
+ const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
12658
+ const trappedRef = React__namespace.useRef(null);
12659
+ React__namespace.useEffect(() => {
12660
+ let currentFocus = null;
12661
+ if (restoreFocus) {
12662
+ currentFocus = document.activeElement;
12663
+ }
12664
+ return () => {
12665
+ if (currentFocus) {
12666
+ currentFocus.focus();
12667
+ }
12668
+ };
12669
+ }, [restoreFocus]);
12670
+ React__namespace.useEffect(() => {
12671
+ if (!trappedRef.current || skipAutoFocus)
12672
+ return;
12673
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12674
+ if (focusableChildren.length > 0) {
12675
+ const firstElement = focusableChildren[0];
12676
+ firstElement.focus();
12677
+ } else {
12678
+ console.warn(
12679
+ "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
12680
+ );
12681
+ }
12682
+ }, [skipAutoFocus]);
12683
+ const handleKeyDown = (e) => {
12684
+ if (e.key === KeyboardKeys.ESCAPE && onEscape) {
12685
+ onEscape();
12686
+ return;
12687
+ }
12688
+ if (e.key !== KeyboardKeys.TAB)
12689
+ return;
12690
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12691
+ if (focusableChildren.length > 0) {
12692
+ const firstElement = focusableChildren[0];
12693
+ const lastElement = focusableChildren[focusableChildren.length - 1];
12694
+ if (e.shiftKey) {
12695
+ if (firstElement === document.activeElement) {
12696
+ e.preventDefault();
12697
+ lastElement.focus();
12698
+ }
12699
+ } else if (lastElement === document.activeElement) {
12700
+ e.preventDefault();
12701
+ firstElement.focus();
12702
+ }
12703
+ }
12704
+ };
12705
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
12706
+ };
12564
12707
  const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
12565
12708
  const isValidFocusedElement = () => {
12566
12709
  const focused = document.activeElement;