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

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 (139) 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/Combobox/Combobox.d.ts.map +1 -1
  43. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  44. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
  45. package/dist/components/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  46. package/dist/components/Dialog/Dialog.d.ts +2 -2
  47. package/dist/components/Dialog/Dialog.d.ts.map +1 -1
  48. package/dist/components/Divider/Divider.d.ts +1 -1
  49. package/dist/components/Divider/Divider.d.ts.map +1 -1
  50. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts +1 -1
  51. package/dist/components/EmptyStateLayout/EmptyStateLayout.d.ts.map +1 -1
  52. package/dist/components/Field/Field.d.ts +2 -2
  53. package/dist/components/Field/Field.d.ts.map +1 -1
  54. package/dist/components/IconButton/IconButton.d.ts +1 -1
  55. package/dist/components/IconButton/IconButton.d.ts.map +1 -1
  56. package/dist/components/JSONInput/JSONInput.d.ts +1 -1
  57. package/dist/components/JSONInput/JSONInput.d.ts.map +1 -1
  58. package/dist/components/Link/Link.d.ts.map +1 -1
  59. package/dist/components/Main/Main.d.ts +1 -1
  60. package/dist/components/Main/Main.d.ts.map +1 -1
  61. package/dist/components/Modal/Modal.d.ts +2 -2
  62. package/dist/components/Modal/Modal.d.ts.map +1 -1
  63. package/dist/components/NumberInput/NumberInput.d.ts.map +1 -1
  64. package/dist/components/Pagination/components.d.ts +1 -1
  65. package/dist/components/Pagination/components.d.ts.map +1 -1
  66. package/dist/components/Popover/Popover.d.ts.map +1 -1
  67. package/dist/components/RawTable/RawCell.d.ts +1 -1
  68. package/dist/components/RawTable/RawCell.d.ts.map +1 -1
  69. package/dist/components/RawTable/RawTr.d.ts +1 -1
  70. package/dist/components/RawTable/RawTr.d.ts.map +1 -1
  71. package/dist/components/Select/SelectParts.d.ts +2 -2
  72. package/dist/components/Select/SelectParts.d.ts.map +1 -1
  73. package/dist/components/SimpleMenu/Menu.d.ts +19 -7
  74. package/dist/components/SimpleMenu/Menu.d.ts.map +1 -1
  75. package/dist/components/SimpleMenu/SimpleMenu.d.ts +31 -4
  76. package/dist/components/SimpleMenu/SimpleMenu.d.ts.map +1 -1
  77. package/dist/components/Status/Status.d.ts +1 -1
  78. package/dist/components/Status/Status.d.ts.map +1 -1
  79. package/dist/components/SubNav/SubNav.d.ts +1 -1
  80. package/dist/components/SubNav/SubNav.d.ts.map +1 -1
  81. package/dist/components/SubNav/SubNavHeader.d.ts +3 -3
  82. package/dist/components/SubNav/SubNavHeader.d.ts.map +1 -1
  83. package/dist/components/SubNav/SubNavLink.d.ts.map +1 -1
  84. package/dist/components/SubNav/SubNavSections.d.ts +1 -1
  85. package/dist/components/SubNav/SubNavSections.d.ts.map +1 -1
  86. package/dist/components/Table/TFooter.d.ts +1 -1
  87. package/dist/components/Table/TFooter.d.ts.map +1 -1
  88. package/dist/components/Tag/Tag.d.ts +1 -1
  89. package/dist/components/Tag/Tag.d.ts.map +1 -1
  90. package/dist/components/TextButton/TextButton.d.ts +1 -1
  91. package/dist/components/TextButton/TextButton.d.ts.map +1 -1
  92. package/dist/components/Textarea/Textarea.d.ts +1 -1
  93. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  94. package/dist/components/Toggle/Toggle.d.ts.map +1 -1
  95. package/dist/components/index.d.ts +0 -5
  96. package/dist/components/index.d.ts.map +1 -1
  97. package/dist/helpers/handleResponsiveValues.d.ts +30 -15
  98. package/dist/helpers/handleResponsiveValues.d.ts.map +1 -1
  99. package/dist/helpers/theme.d.ts +1 -1
  100. package/dist/helpers/theme.d.ts.map +1 -1
  101. package/dist/index.d.ts +1 -0
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +615 -497
  104. package/dist/index.js.map +1 -1
  105. package/dist/index.mjs +615 -497
  106. package/dist/index.mjs.map +1 -1
  107. package/dist/primitives/Box/Box.d.ts +84 -0
  108. package/dist/primitives/Box/Box.d.ts.map +1 -0
  109. package/dist/primitives/Box/index.d.ts.map +1 -0
  110. package/dist/{components → primitives}/Flex/Flex.d.ts +7 -8
  111. package/dist/primitives/Flex/Flex.d.ts.map +1 -0
  112. package/dist/primitives/Flex/index.d.ts.map +1 -0
  113. package/dist/{components → primitives}/Grid/Grid.d.ts +4 -3
  114. package/dist/primitives/Grid/Grid.d.ts.map +1 -0
  115. package/dist/primitives/Grid/index.d.ts.map +1 -0
  116. package/dist/{components → primitives}/Typography/Typography.d.ts +5 -9
  117. package/dist/primitives/Typography/Typography.d.ts.map +1 -0
  118. package/dist/primitives/Typography/index.d.ts.map +1 -0
  119. package/dist/primitives/index.d.ts +5 -0
  120. package/dist/primitives/index.d.ts.map +1 -0
  121. package/dist/themes/common-theme.d.ts +8 -4
  122. package/dist/themes/common-theme.d.ts.map +1 -1
  123. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts +1 -1
  124. package/dist/utilities/KeyboardNavigable/KeyboardNavigable.d.ts.map +1 -1
  125. package/dist/utilities/Portal/Portal.d.ts +1 -1
  126. package/package.json +3 -3
  127. package/dist/components/Box/Box.d.ts +0 -102
  128. package/dist/components/Box/Box.d.ts.map +0 -1
  129. package/dist/components/Box/index.d.ts.map +0 -1
  130. package/dist/components/Flex/Flex.d.ts.map +0 -1
  131. package/dist/components/Flex/index.d.ts.map +0 -1
  132. package/dist/components/Grid/Grid.d.ts.map +0 -1
  133. package/dist/components/Grid/index.d.ts.map +0 -1
  134. package/dist/components/Typography/Typography.d.ts.map +0 -1
  135. package/dist/components/Typography/index.d.ts.map +0 -1
  136. /package/dist/{components → primitives}/Box/index.d.ts +0 -0
  137. /package/dist/{components → primitives}/Flex/index.d.ts +0 -0
  138. /package/dist/{components → primitives}/Grid/index.d.ts +0 -0
  139. /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,153 @@ 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.neutral600};
1740
+ ` : ""}
1741
+
1742
+ &:hover {
1743
+ ${getHoverStyle}
1744
+ }
1745
+
1746
+ &:active {
1747
+ ${getActiveStyle}
1748
+ }
1749
+
1750
+ &[aria-disabled='true'] {
1751
+ ${getDisabledStyle}
1752
+ }
1753
+
1754
+ @media (prefers-reduced-motion: no-preference) {
1755
+ transition:
1756
+ ${(props) => props.theme.transitions.backgroundColor},
1757
+ ${(props) => props.theme.transitions.color},
1758
+ border-color ${(props) => props.theme.motion.timings["200"]} ${(props) => props.theme.motion.easings.easeOutQuad};
1759
+ }
1760
+ `;
1761
+ const IconButtonGroup = styledComponents.styled(Flex)`
1762
+ & ${IconButtonWrapper}:first-child {
1763
+ border-radius: ${({ theme }) => `${theme.borderRadius} 0 0 ${theme.borderRadius}`};
1764
+ }
1765
+
1766
+ & ${IconButtonWrapper}:last-child {
1767
+ border-radius: ${({ theme }) => `0 ${theme.borderRadius} ${theme.borderRadius} 0`};
1768
+ }
1769
+
1770
+ & ${IconButtonWrapper} {
1771
+ border-radius: 0;
1772
+
1773
+ & + ${IconButtonWrapper} {
1774
+ border-left: none;
1775
+ }
1776
+ }
1777
+ `;
1529
1778
  const Link = forwardRef(
1530
1779
  ({ children, href, disabled = false, startIcon, endIcon, isExternal = false, ...props }, ref) => {
1531
1780
  return /* @__PURE__ */ jsxRuntime.jsxs(LinkWrapper$1, { ref, href, disabled, isExternal, ...props, children: [
@@ -1552,7 +1801,7 @@ const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
1552
1801
  }
1553
1802
 
1554
1803
  &:hover {
1555
- span {
1804
+ & > span {
1556
1805
  color: ${({ theme }) => theme.colors.primary500};
1557
1806
  }
1558
1807
  }
@@ -1565,21 +1814,18 @@ const LinkWrapper$1 = styledComponents.styled(BaseLinkImpl)`
1565
1814
  `;
1566
1815
  const MenuRoot = DropdownMenu__namespace.Root;
1567
1816
  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
- ) });
1817
+ ({ label, size, endIcon = /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "1.2rem", height: "1.2rem", "aria-hidden": true }), tag = Button, icon, ...rest }, ref) => {
1818
+ const props = {
1819
+ ...rest,
1820
+ ref,
1821
+ type: "button",
1822
+ variant: "ghost",
1823
+ paddingTop: size === "S" ? 1 : 2,
1824
+ paddingBottom: size === "S" ? 1 : 2,
1825
+ paddingLeft: size === "S" ? 3 : 4,
1826
+ paddingRight: size === "S" ? 3 : 4
1827
+ };
1828
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenu__namespace.Trigger, { asChild: true, children: tag === IconButton ? /* @__PURE__ */ jsxRuntime.jsx(IconButton, { label, ...props, children: icon }) : /* @__PURE__ */ jsxRuntime.jsx(Button, { endIcon, ...props }) });
1583
1829
  }
1584
1830
  );
1585
1831
  const MenuContent = React__namespace.forwardRef(
@@ -1590,8 +1836,6 @@ const MenuContent = React__namespace.forwardRef(
1590
1836
  {
1591
1837
  ref,
1592
1838
  direction: "column",
1593
- borderStyle: "solid",
1594
- borderWidth: "1px",
1595
1839
  borderColor: "neutral150",
1596
1840
  hasRadius: true,
1597
1841
  background: "neutral0",
@@ -1628,7 +1872,7 @@ const getOptionStyle = ({ theme }) => styledComponents.css`
1628
1872
  border-radius: ${theme.borderRadius};
1629
1873
  padding: ${theme.spaces[2]} ${theme.spaces[4]};
1630
1874
 
1631
- &[aria-disabled] {
1875
+ &[aria-disabled='true'] {
1632
1876
  cursor: not-allowed;
1633
1877
  color: ${theme.colors.neutral500};
1634
1878
  }
@@ -1995,49 +2239,6 @@ const KeyboardKeys = {
1995
2239
  BACKSPACE: "Backspace",
1996
2240
  CLEAR: "Clear"
1997
2241
  };
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
2242
  const CarouselGrid = styledComponents.styled(Box)`
2042
2243
  grid-template-columns: auto 1fr auto;
2043
2244
  grid-template-areas: 'startAction slides endAction';
@@ -2132,9 +2333,11 @@ const commonTheme = {
2132
2333
  },
2133
2334
  spaces: ["0px", "4px", "8px", "12px", "16px", "20px", "24px", "32px", "40px", "48px", "56px", "64px"],
2134
2335
  borderRadius: "4px",
2135
- mediaQueries: {
2136
- tablet: `@media (max-width: 1100px)`,
2137
- mobile: `@media (max-width: 550px)`
2336
+ breakpoints: {
2337
+ initial: "@media(min-width: 0px)",
2338
+ small: "@media(min-width: 520px)",
2339
+ medium: "@media(min-width: 768px)",
2340
+ large: "@media(min-width: 1280px)"
2138
2341
  },
2139
2342
  fontSizes: [`1.1rem`, `1.2rem`, `1.4rem`, "1.6rem", `1.8rem`, `3.2rem`],
2140
2343
  lineHeights: [1.14, 1.22, 1.25, 1.33, 1.43, 1.45, 1.5],
@@ -7849,6 +8052,7 @@ const Label = React__namespace.forwardRef(({ children, action, ...props }, ref)
7849
8052
  id: `${id}-label`,
7850
8053
  htmlFor: id,
7851
8054
  tag: "label",
8055
+ ellipsis: true,
7852
8056
  children: [
7853
8057
  children,
7854
8058
  required && /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "1em", textColor: "danger600", children: "*" }),
@@ -7881,11 +8085,24 @@ const Input$2 = React__namespace.forwardRef(
7881
8085
  ariaDescription = `${id}-hint`;
7882
8086
  }
7883
8087
  const hasError = Boolean(error);
8088
+ const endActionRef = React__namespace.useRef(null);
8089
+ const inputElementRef = React__namespace.useRef(null);
8090
+ const inputRef = useComposedRefs(inputElementRef, ref);
7884
8091
  const handleChange = (e) => {
7885
8092
  if (!disabled && onChange) {
7886
8093
  onChange(e);
7887
8094
  }
7888
8095
  };
8096
+ React__namespace.useLayoutEffect(() => {
8097
+ if (endActionRef.current && inputElementRef.current) {
8098
+ const endActionWidth = endActionRef.current.offsetWidth;
8099
+ const inputElement = inputElementRef.current;
8100
+ if (inputElement) {
8101
+ const inputPadding = endActionWidth + 8 + 16;
8102
+ inputElement.style.paddingRight = `${inputPadding}px`;
8103
+ }
8104
+ }
8105
+ }, [endAction]);
7889
8106
  return /* @__PURE__ */ jsxRuntime.jsxs(
7890
8107
  InputWrapper,
7891
8108
  {
@@ -7904,7 +8121,7 @@ const Input$2 = React__namespace.forwardRef(
7904
8121
  {
7905
8122
  id,
7906
8123
  name,
7907
- ref,
8124
+ ref: inputRef,
7908
8125
  $size: size,
7909
8126
  "aria-describedby": ariaDescription,
7910
8127
  "aria-invalid": hasError || hasErrorProp,
@@ -7913,10 +8130,12 @@ const Input$2 = React__namespace.forwardRef(
7913
8130
  "data-disabled": disabled ? "" : void 0,
7914
8131
  onChange: handleChange,
7915
8132
  "aria-required": required || requiredProp,
8133
+ $hasLeftAction: Boolean(startAction),
8134
+ $hasRightAction: Boolean(endAction),
7916
8135
  ...props
7917
8136
  }
7918
8137
  ),
7919
- endAction
8138
+ endAction && /* @__PURE__ */ jsxRuntime.jsx(EndAction, { ref: endActionRef, children: endAction })
7920
8139
  ]
7921
8140
  }
7922
8141
  );
@@ -7935,19 +8154,6 @@ const InputElement = styledComponents.styled.input`
7935
8154
  width: 100%;
7936
8155
  background: inherit;
7937
8156
 
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
8157
  ::placeholder {
7952
8158
  color: ${({ theme }) => theme.colors.neutral500};
7953
8159
  opacity: 1;
@@ -7962,32 +8168,42 @@ const InputElement = styledComponents.styled.input`
7962
8168
  outline: none;
7963
8169
  box-shadow: none;
7964
8170
  }
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
8171
 
7972
8172
  ${(props) => {
7973
8173
  switch (props.$size) {
7974
8174
  case "S":
7975
8175
  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]};
8176
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8177
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8178
+ padding-block: ${props.theme.spaces[1]};
7978
8179
  `;
7979
8180
  default:
7980
8181
  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]};
8182
+ padding-inline-start: ${props.$hasLeftAction ? 0 : props.theme.spaces[4]};
8183
+ padding-inline-end: ${props.$hasRightAction ? 0 : props.theme.spaces[4]};
8184
+ padding-block: ${props.theme.spaces[2]};
7983
8185
  `;
7984
8186
  }
7985
8187
  }}
8188
+ `;
8189
+ const EndAction = styledComponents.styled(Flex)`
8190
+ position: absolute;
8191
+ right: ${({ theme }) => theme.spaces[4]};
8192
+ top: 50%;
8193
+ transform: translateY(-50%);
8194
+ `;
8195
+ const InputWrapper = styledComponents.styled(Flex)`
8196
+ border: 1px solid ${({ theme, $hasError }) => $hasError ? theme.colors.danger600 : theme.colors.neutral200};
8197
+ border-radius: ${({ theme }) => theme.borderRadius};
8198
+ background: ${({ theme }) => theme.colors.neutral0};
8199
+ padding-inline-start: ${({ $hasLeftAction, theme }) => $hasLeftAction ? theme.spaces[4] : 0};
8200
+ position: relative;
7986
8201
 
8202
+ ${inputFocusStyle()}
7987
8203
  ${({ theme, $disabled }) => $disabled ? styledComponents.css`
7988
8204
  color: ${theme.colors.neutral600};
7989
8205
  background: ${theme.colors.neutral150};
7990
- ` : void 0}
8206
+ ` : void 0};
7991
8207
  `;
7992
8208
  const Hint = () => {
7993
8209
  const { id, hint, error } = useField("Hint");
@@ -10064,266 +10280,60 @@ const DateTimePicker = React__namespace.forwardRef(
10064
10280
  ) })
10065
10281
  ] });
10066
10282
  }
10067
- );
10068
- const convertUTCDateToCalendarDateTime = (date$1, resetTime = true) => {
10069
- const utcDateString = date$1.toISOString();
10070
- let zonedDateTime = date.parseAbsoluteToLocal(utcDateString);
10071
- if (resetTime) {
10072
- zonedDateTime = zonedDateTime.set({ hour: 0, minute: 0 });
10073
- }
10074
- return date.toCalendarDateTime(zonedDateTime);
10075
- };
10076
- const Divider = React__namespace.forwardRef((props, forwardedRef) => {
10077
- return /* @__PURE__ */ jsxRuntime.jsx(
10078
- DividerImpl,
10079
- {
10080
- ref: forwardedRef,
10081
- background: "neutral150",
10082
- ...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
- }
10190
- }
10191
- };
10192
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
10283
+ );
10284
+ const convertUTCDateToCalendarDateTime = (date$1, resetTime = true) => {
10285
+ const utcDateString = date$1.toISOString();
10286
+ let zonedDateTime = date.parseAbsoluteToLocal(utcDateString);
10287
+ if (resetTime) {
10288
+ zonedDateTime = zonedDateTime.set({ hour: 0, minute: 0 });
10289
+ }
10290
+ return date.toCalendarDateTime(zonedDateTime);
10193
10291
  };
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 });
10292
+ const Divider = React__namespace.forwardRef((props, forwardedRef) => {
10293
+ return /* @__PURE__ */ jsxRuntime.jsx(
10294
+ DividerImpl,
10295
+ {
10296
+ ref: forwardedRef,
10297
+ background: "neutral150",
10298
+ ...props,
10299
+ "data-orientation": "horizontal",
10300
+ role: "separator",
10301
+ tag: "div"
10302
+ }
10303
+ );
10197
10304
  });
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)}
10305
+ const DividerImpl = styledComponents.styled(Box)`
10306
+ height: 1px;
10307
+ border: none;
10308
+ /* If contained in a Flex parent we want to prevent the Divider to shink */
10309
+ flex-shrink: 0;
10202
10310
  `;
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};
10311
+ const EmptyStateIconWrapper = styledComponents.styled(Box)`
10312
+ svg {
10313
+ height: 8.8rem;
10216
10314
  }
10217
10315
  `;
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,
10316
+ const EmptyStateLayout = React__namespace.forwardRef(
10317
+ ({ icon, content, action, hasRadius = true, shadow = "tableShadow" }, forwardedRef) => {
10318
+ return /* @__PURE__ */ jsxRuntime.jsxs(
10319
+ Flex,
10242
10320
  {
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 })
10321
+ ref: forwardedRef,
10322
+ alignItems: "center",
10323
+ direction: "column",
10324
+ padding: 11,
10325
+ background: "neutral0",
10326
+ hasRadius,
10327
+ shadow,
10328
+ children: [
10329
+ icon ? /* @__PURE__ */ jsxRuntime.jsx(EmptyStateIconWrapper, { paddingBottom: 6, "aria-hidden": true, children: icon }) : null,
10330
+ /* @__PURE__ */ jsxRuntime.jsx(Box, { paddingBottom: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "delta", tag: "p", textAlign: "center", textColor: "neutral600", children: content }) }),
10331
+ action
10332
+ ]
10256
10333
  }
10257
10334
  );
10258
- return withTooltip ? /* @__PURE__ */ jsxRuntime.jsx(TooltipImpl, { label, children: component }) : component;
10259
10335
  }
10260
10336
  );
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
10337
  const addMarks = state.StateEffect.define();
10328
10338
  const filterMarks = state.StateEffect.define();
10329
10339
  const lineHighlightMark = view.Decoration.mark({
@@ -10604,7 +10614,7 @@ const Thumb = styledComponents.styled(ScrollArea__namespace.Thumb)`
10604
10614
  min-height: 44px;
10605
10615
  }
10606
10616
  `;
10607
- const Root$2 = Dialog__namespace.Root;
10617
+ const Root$3 = Dialog__namespace.Root;
10608
10618
  const Trigger$2 = React__namespace.forwardRef((props, forwardedRef) => {
10609
10619
  return /* @__PURE__ */ jsxRuntime.jsx(Dialog__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10610
10620
  });
@@ -10624,8 +10634,8 @@ const Overlay = styledComponents.styled(Dialog__namespace.Overlay)`
10624
10634
  `;
10625
10635
  const ContentImpl = styledComponents.styled(Dialog__namespace.Content)`
10626
10636
  max-width: 83rem;
10627
- max-height: 80vh;
10628
- height: min-content;
10637
+ max-height: 90vh;
10638
+ height: auto;
10629
10639
  width: 60%;
10630
10640
  overflow: hidden;
10631
10641
  margin: 0 auto;
@@ -10727,7 +10737,7 @@ const Modal = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
10727
10737
  Content: Content$2,
10728
10738
  Footer,
10729
10739
  Header,
10730
- Root: Root$2,
10740
+ Root: Root$3,
10731
10741
  Title,
10732
10742
  Trigger: Trigger$2
10733
10743
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10963,7 +10973,7 @@ const Dots = ({ children, ...props }) => /* @__PURE__ */ jsxRuntime.jsxs(Box, {
10963
10973
  /* @__PURE__ */ jsxRuntime.jsx(VisuallyHidden, { children }),
10964
10974
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { "aria-hidden": true, lineHeight: "revert", textColor: "neutral800", variant: "pi", children: "…" })
10965
10975
  ] });
10966
- const Root$1 = Popover__namespace.Root;
10976
+ const Root$2 = Popover__namespace.Root;
10967
10977
  const Trigger$1 = React__namespace.forwardRef((props, forwardedRef) => {
10968
10978
  return /* @__PURE__ */ jsxRuntime.jsx(Popover__namespace.Trigger, { ...props, asChild: true, ref: forwardedRef });
10969
10979
  });
@@ -10975,6 +10985,7 @@ const PopoverContent = styledComponents.styled(Popover__namespace.Content)`
10975
10985
  z-index: ${({ theme }) => theme.zIndices.popover};
10976
10986
  background-color: ${(props) => props.theme.colors.neutral0};
10977
10987
  border: 1px solid ${({ theme }) => theme.colors.neutral150};
10988
+ border-radius: ${({ theme }) => theme.borderRadius};
10978
10989
 
10979
10990
  @media (prefers-reduced-motion: no-preference) {
10980
10991
  animation-duration: ${(props) => props.theme.motion.timings["200"]};
@@ -11026,7 +11037,7 @@ const PopoverScrollArea = styledComponents.styled(ScrollAreaImpl$1)`
11026
11037
  const Popover = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11027
11038
  __proto__: null,
11028
11039
  Content: Content$1,
11029
- Root: Root$1,
11040
+ Root: Root$2,
11030
11041
  ScrollArea: ScrollAreaImpl,
11031
11042
  Trigger: Trigger$1
11032
11043
  }, Symbol.toStringTag, { value: "Module" }));
@@ -11066,7 +11077,7 @@ const RadioGroupRoot = styledComponents.styled(RadioGroup__namespace.Root)`
11066
11077
  flex-direction: column;
11067
11078
  gap: ${(props) => props.theme.spaces[3]};
11068
11079
  `;
11069
- const Item = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11080
+ const Item$1 = React__namespace.forwardRef(({ children, id: idProp, ...restProps }, forwardedRef) => {
11070
11081
  const id = useId(idProp);
11071
11082
  return /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: 2, children: [
11072
11083
  /* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { id, ref: forwardedRef, ...restProps, children: /* @__PURE__ */ jsxRuntime.jsx(RadioGroupIndicator, {}) }),
@@ -11135,7 +11146,7 @@ const RadioGroupIndicator = styledComponents.styled(RadioGroup__namespace.Indica
11135
11146
  const Radio = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11136
11147
  __proto__: null,
11137
11148
  Group,
11138
- Item
11149
+ Item: Item$1
11139
11150
  }, Symbol.toStringTag, { value: "Module" }));
11140
11151
  const focusFocusable = (node) => {
11141
11152
  const nextNode = node.querySelector('[tabindex="0"]');
@@ -11234,6 +11245,29 @@ const RawTable = React__namespace.forwardRef(
11234
11245
  ) });
11235
11246
  }
11236
11247
  );
11248
+ const getFocusableNodes = (node, includeNegativeTabIndex) => {
11249
+ const nodes = [
11250
+ ...node.querySelectorAll(
11251
+ 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])'
11252
+ )
11253
+ ];
11254
+ const focusables = nodes.filter((node2) => {
11255
+ if (node2.hasAttribute("disabled"))
11256
+ return false;
11257
+ if (includeNegativeTabIndex)
11258
+ return true;
11259
+ return node2.getAttribute("tabindex") !== "-1";
11260
+ });
11261
+ return focusables;
11262
+ };
11263
+ const getFocusableNodesWithKeyboardNav = (nodes) => {
11264
+ return nodes.filter((node) => {
11265
+ if (node.tagName === "INPUT") {
11266
+ return node.type !== "checkbox" && node.type !== "radio";
11267
+ }
11268
+ return false;
11269
+ });
11270
+ };
11237
11271
  const RawTd = React__namespace.forwardRef(
11238
11272
  ({ coords = { col: 0, row: 0 }, tag = "td", ...props }, forwardedRef) => {
11239
11273
  const tdRef = React__namespace.useRef(null);
@@ -11683,7 +11717,8 @@ const SubNavHeader = ({
11683
11717
  },
11684
11718
  onSubmit = () => {
11685
11719
  },
11686
- id
11720
+ id,
11721
+ placeholder
11687
11722
  }) => {
11688
11723
  const [isSearchOpen, setSearchOpen] = React__namespace.useState(false);
11689
11724
  const previousSearchOpenValue = uiPrimitives.usePrev(isSearchOpen);
@@ -11723,7 +11758,7 @@ const SubNavHeader = ({
11723
11758
  name: "searchbar",
11724
11759
  value,
11725
11760
  onChange,
11726
- placeholder: "e.g: strapi-plugin-abcd",
11761
+ placeholder,
11727
11762
  onKeyDown: handleKeyDown,
11728
11763
  ref: searchRef,
11729
11764
  onBlur: handleBlur,
@@ -12012,7 +12047,7 @@ const LabelTypography = styledComponents.styled(Typography)`
12012
12047
  }
12013
12048
  `;
12014
12049
  const [TabsProvider, useTabs] = createContext("Tabs");
12015
- const Root = React__namespace.forwardRef(
12050
+ const Root$1 = React__namespace.forwardRef(
12016
12051
  ({ disabled = false, variant: variant2 = "regular", hasError, ...props }, forwardedRef) => {
12017
12052
  return /* @__PURE__ */ jsxRuntime.jsx(TabsProvider, { disabled, hasError, variant: variant2, children: /* @__PURE__ */ jsxRuntime.jsx(TabsRoot, { ref: forwardedRef, ...props }) });
12018
12053
  }
@@ -12138,7 +12173,7 @@ const Tabs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
12138
12173
  __proto__: null,
12139
12174
  Content,
12140
12175
  List,
12141
- Root,
12176
+ Root: Root$1,
12142
12177
  Trigger
12143
12178
  }, Symbol.toStringTag, { value: "Module" }));
12144
12179
  const TableContainer = styledComponents.styled(Box)`
@@ -12360,7 +12395,7 @@ const Textarea = React__namespace.forwardRef(
12360
12395
  } else if (field.hint) {
12361
12396
  ariaDescription = `${id}-hint`;
12362
12397
  }
12363
- return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12398
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper$1, { borderColor: hasError ? "danger600" : "neutral200", $hasError: hasError, hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsx(
12364
12399
  TextareaElement,
12365
12400
  {
12366
12401
  "aria-invalid": hasError,
@@ -12384,7 +12419,7 @@ const Textarea = React__namespace.forwardRef(
12384
12419
  ) });
12385
12420
  }
12386
12421
  );
12387
- const Wrapper = styledComponents.styled(Box)`
12422
+ const Wrapper$1 = styledComponents.styled(Box)`
12388
12423
  ${inputFocusStyle()}
12389
12424
  `;
12390
12425
  const TextareaElement = styledComponents.styled(Box)`
@@ -12529,6 +12564,39 @@ const Input = styledComponents.styled.input`
12529
12564
  z-index: 0;
12530
12565
  width: 100%;
12531
12566
  `;
12567
+ const Root = forwardRef((props, forwardedRef) => {
12568
+ const { gap = 0, gridCols = 12, ...rest } = props;
12569
+ return /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { ref: forwardedRef, $gap: gap, $gridCols: gridCols, ...rest });
12570
+ });
12571
+ const Wrapper = styledComponents.styled(Box)`
12572
+ display: grid;
12573
+ grid-template-columns: repeat(${({ $gridCols }) => $gridCols}, 1fr);
12574
+ ${({ theme, $gap }) => handleResponsiveValues({ gap: $gap }, theme)}
12575
+ `;
12576
+ const ItemImpl = forwardRef(
12577
+ ({ col, s, xs, ...props }, forwardedRef) => /* @__PURE__ */ jsxRuntime.jsx(Item, { ref: forwardedRef, $col: col, $s: s, $xs: xs, ...props })
12578
+ );
12579
+ const Item = styledComponents.styled(Flex)`
12580
+ grid-column: span ${({ $xs }) => $xs ?? 12};
12581
+ max-width: 100%;
12582
+
12583
+ ${({ theme }) => theme.breakpoints.small} {
12584
+ grid-column: span ${({ $s, $xs }) => $s ?? $xs ?? 12};
12585
+ }
12586
+
12587
+ ${({ theme }) => theme.breakpoints.medium} {
12588
+ grid-column: span ${({ $m, $s, $xs }) => $m ?? $s ?? $xs ?? 12};
12589
+ }
12590
+
12591
+ ${({ theme }) => theme.breakpoints.large} {
12592
+ grid-column: span ${({ $col, $m, $s, $xs }) => $col ?? $m ?? $s ?? $xs ?? 12};
12593
+ }
12594
+ `;
12595
+ const Grid = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12596
+ __proto__: null,
12597
+ Item: ItemImpl,
12598
+ Root
12599
+ }, Symbol.toStringTag, { value: "Module" }));
12532
12600
  const defaultState = {
12533
12601
  x: 0,
12534
12602
  y: 0,
@@ -12561,6 +12629,56 @@ function useMeasure() {
12561
12629
  }, [element, observer]);
12562
12630
  return [ref, rect];
12563
12631
  }
12632
+ const FocusTrap = ({ onEscape, restoreFocus = true, skipAutoFocus = false, ...props }) => {
12633
+ const trappedRef = React__namespace.useRef(null);
12634
+ React__namespace.useEffect(() => {
12635
+ let currentFocus = null;
12636
+ if (restoreFocus) {
12637
+ currentFocus = document.activeElement;
12638
+ }
12639
+ return () => {
12640
+ if (currentFocus) {
12641
+ currentFocus.focus();
12642
+ }
12643
+ };
12644
+ }, [restoreFocus]);
12645
+ React__namespace.useEffect(() => {
12646
+ if (!trappedRef.current || skipAutoFocus)
12647
+ return;
12648
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12649
+ if (focusableChildren.length > 0) {
12650
+ const firstElement = focusableChildren[0];
12651
+ firstElement.focus();
12652
+ } else {
12653
+ console.warn(
12654
+ "[FocusTrap]: it seems there are no focusable elements in the focus trap tree. Make sure there s at least one."
12655
+ );
12656
+ }
12657
+ }, [skipAutoFocus]);
12658
+ const handleKeyDown = (e) => {
12659
+ if (e.key === KeyboardKeys.ESCAPE && onEscape) {
12660
+ onEscape();
12661
+ return;
12662
+ }
12663
+ if (e.key !== KeyboardKeys.TAB)
12664
+ return;
12665
+ const focusableChildren = getFocusableNodes(trappedRef.current);
12666
+ if (focusableChildren.length > 0) {
12667
+ const firstElement = focusableChildren[0];
12668
+ const lastElement = focusableChildren[focusableChildren.length - 1];
12669
+ if (e.shiftKey) {
12670
+ if (firstElement === document.activeElement) {
12671
+ e.preventDefault();
12672
+ lastElement.focus();
12673
+ }
12674
+ } else if (lastElement === document.activeElement) {
12675
+ e.preventDefault();
12676
+ firstElement.focus();
12677
+ }
12678
+ }
12679
+ };
12680
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: trappedRef, onKeyDown: handleKeyDown, ...props });
12681
+ };
12564
12682
  const KeyboardNavigable = ({ tagName, attributeName = "", ...props }) => {
12565
12683
  const isValidFocusedElement = () => {
12566
12684
  const focused = document.activeElement;