@marigold/components 0.6.0 → 0.7.0

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.
package/dist/index.mjs CHANGED
@@ -34,29 +34,7 @@ var __objRest = (source, exclude) => {
34
34
  import React3 from "react";
35
35
 
36
36
  // src/Inline/Inline.tsx
37
- import React, { Children as Children2 } from "react";
38
-
39
- // src/utils/flatten-children.ts
40
- import {
41
- Children,
42
- isValidElement,
43
- cloneElement
44
- } from "react";
45
- import { isFragment } from "react-is";
46
- var flattenChildren = (children, depth = 0, keys = []) => Children.toArray(children).reduce((acc, node) => {
47
- if (isFragment(node)) {
48
- acc.push.apply(acc, flattenChildren(node.props.children, depth + 1, keys.concat(node.key)));
49
- } else {
50
- if (isValidElement(node)) {
51
- acc.push(cloneElement(node, {
52
- key: keys.concat(String(node.key)).join(".")
53
- }));
54
- } else if (typeof node === "string" || typeof node === "number") {
55
- acc.push(node);
56
- }
57
- }
58
- return acc;
59
- }, []);
37
+ import React from "react";
60
38
 
61
39
  // src/Box.ts
62
40
  import { Box } from "@marigold/system";
@@ -81,11 +59,11 @@ var Inline = (_a) => {
81
59
  __baseCSS: { gap: space, flexWrap: "wrap" },
82
60
  display: "inline-flex",
83
61
  alignItems: ALIGNMENT[align]
84
- }, props), Children2.map(flattenChildren(children), (child) => child));
62
+ }, props), children);
85
63
  };
86
64
 
87
65
  // src/Stack/Stack.tsx
88
- import React2, { Children as Children3 } from "react";
66
+ import React2 from "react";
89
67
  var ALIGNMENT2 = {
90
68
  left: "flex-start",
91
69
  center: "center",
@@ -102,11 +80,11 @@ var Stack = (_a) => {
102
80
  "children"
103
81
  ]);
104
82
  return /* @__PURE__ */ React2.createElement(Box, __spreadProps(__spreadValues({}, props), {
83
+ __baseCSS: { gap: space },
105
84
  display: "flex",
106
85
  flexDirection: "column",
107
- alignItems: ALIGNMENT2[align],
108
- css: { "> * + *": { pt: space } }
109
- }), Children3.map(flattenChildren(children), (child) => /* @__PURE__ */ React2.createElement(Box, null, React2.cloneElement(child, {}, child.props.children))));
86
+ alignItems: ALIGNMENT2[align]
87
+ }), children);
110
88
  };
111
89
 
112
90
  // src/ActionGroup/ActionGroup.tsx
@@ -127,8 +105,69 @@ var ActionGroup = (_a) => {
127
105
  }, props), children);
128
106
  };
129
107
 
130
- // src/Badge/Badge.tsx
108
+ // src/Aside/Aside.tsx
131
109
  import React4 from "react";
110
+ var SIDE_MAP = {
111
+ left: [":not(style):first-of-type", ":last-child"],
112
+ right: [":last-child", ":not(style):first-of-type"]
113
+ };
114
+ var Aside = ({
115
+ children,
116
+ sideWidth,
117
+ space = "none",
118
+ side = "left",
119
+ stretch = true,
120
+ wrap = "50%"
121
+ }) => {
122
+ const [aside, content] = SIDE_MAP[side];
123
+ return /* @__PURE__ */ React4.createElement(Box, {
124
+ css: {
125
+ display: "flex",
126
+ flexWrap: "wrap",
127
+ gap: space,
128
+ alignItems: stretch ? void 0 : "flex-start",
129
+ [`> ${aside}`]: {
130
+ flexBasis: sideWidth,
131
+ flexGrow: 1
132
+ },
133
+ [`> ${content}`]: {
134
+ flexBasis: 0,
135
+ flexGrow: 999,
136
+ minInlineSize: wrap
137
+ }
138
+ }
139
+ }, children);
140
+ };
141
+
142
+ // src/Aspect/Aspect.tsx
143
+ import React5 from "react";
144
+ import { aspect } from "@marigold/tokens";
145
+ var Aspect = React5.forwardRef(function AspectRatio(_a, ref) {
146
+ var _b = _a, { ratio = "square", maxWidth = "100%", children } = _b, props = __objRest(_b, ["ratio", "maxWidth", "children"]);
147
+ return /* @__PURE__ */ React5.createElement(Box, {
148
+ ref,
149
+ __baseCSS: {
150
+ position: "relative",
151
+ overflow: "hidden",
152
+ maxWidth
153
+ }
154
+ }, /* @__PURE__ */ React5.createElement(Box, {
155
+ __baseCSS: {
156
+ aspectRatio: aspect[ratio]
157
+ }
158
+ }), /* @__PURE__ */ React5.createElement(Box, __spreadProps(__spreadValues({}, props), {
159
+ __baseCSS: {
160
+ position: "absolute",
161
+ top: 0,
162
+ right: 0,
163
+ bottom: 0,
164
+ left: 0
165
+ }
166
+ }), children));
167
+ });
168
+
169
+ // src/Badge/Badge.tsx
170
+ import React6 from "react";
132
171
  var Badge = (_a) => {
133
172
  var _b = _a, {
134
173
  variant = "",
@@ -141,14 +180,14 @@ var Badge = (_a) => {
141
180
  "borderColor",
142
181
  "children"
143
182
  ]);
144
- return /* @__PURE__ */ React4.createElement(Box, __spreadValues({
183
+ return /* @__PURE__ */ React6.createElement(Box, __spreadValues({
145
184
  css: { bg: bgColor, borderColor },
146
185
  variant: `badge.${variant}`
147
186
  }, props), children);
148
187
  };
149
188
 
150
189
  // src/Button/Button.tsx
151
- import React5, { forwardRef } from "react";
190
+ import React7, { forwardRef } from "react";
152
191
  import { useButton } from "@react-aria/button";
153
192
  var Button = forwardRef((_a, ref) => {
154
193
  var _b = _a, {
@@ -172,7 +211,7 @@ var Button = forwardRef((_a, ref) => {
172
211
  elementType: typeof as === "string" ? as : "span",
173
212
  isDisabled: disabled
174
213
  }), ref);
175
- return /* @__PURE__ */ React5.createElement(Box, __spreadProps(__spreadValues(__spreadValues({}, buttonProps), props), {
214
+ return /* @__PURE__ */ React7.createElement(Box, __spreadProps(__spreadValues(__spreadValues({}, buttonProps), props), {
176
215
  as,
177
216
  display: "inline-flex",
178
217
  alignItems: "center",
@@ -184,7 +223,7 @@ var Button = forwardRef((_a, ref) => {
184
223
  });
185
224
 
186
225
  // src/Card/Card.tsx
187
- import React6 from "react";
226
+ import React8 from "react";
188
227
  var Card = (_a) => {
189
228
  var _b = _a, {
190
229
  variant = "",
@@ -199,11 +238,11 @@ var Card = (_a) => {
199
238
  "className",
200
239
  "children"
201
240
  ]);
202
- return /* @__PURE__ */ React6.createElement(Box, __spreadProps(__spreadValues({}, props), {
241
+ return /* @__PURE__ */ React8.createElement(Box, __spreadProps(__spreadValues({}, props), {
203
242
  variant: `card.${variant}`,
204
243
  maxWidth: width,
205
244
  className
206
- }), title && /* @__PURE__ */ React6.createElement(Box, {
245
+ }), title && /* @__PURE__ */ React8.createElement(Box, {
207
246
  as: "h2",
208
247
  variant: "text.h2",
209
248
  pb: "small"
@@ -211,110 +250,15 @@ var Card = (_a) => {
211
250
  };
212
251
 
213
252
  // src/Checkbox/Checkbox.tsx
214
- import React10 from "react";
253
+ import React12 from "react";
215
254
  import { useFocusRing } from "@react-aria/focus";
216
255
  import { VisuallyHidden } from "@react-aria/visually-hidden";
217
256
  import { useCheckbox } from "@react-aria/checkbox";
218
-
219
- // ../../node_modules/@react-stately/utils/dist/module.js
220
- import { useCallback, useRef, useState } from "react";
221
- function useControlledState(value, defaultValue, onChange) {
222
- let [stateValue, setStateValue] = useState(value || defaultValue);
223
- let ref = useRef(value !== void 0);
224
- let wasControlled = ref.current;
225
- let isControlled = value !== void 0;
226
- let stateRef = useRef(stateValue);
227
- if (wasControlled !== isControlled) {
228
- console.warn("WARN: A component changed from " + (wasControlled ? "controlled" : "uncontrolled") + " to " + (isControlled ? "controlled" : "uncontrolled") + ".");
229
- }
230
- ref.current = isControlled;
231
- let setValue = useCallback(function(value2) {
232
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
233
- args[_key - 1] = arguments[_key];
234
- }
235
- let onChangeCaller = function onChangeCaller2(value3) {
236
- if (onChange) {
237
- if (!Object.is(stateRef.current, value3)) {
238
- for (var _len2 = arguments.length, onChangeArgs = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
239
- onChangeArgs[_key2 - 1] = arguments[_key2];
240
- }
241
- onChange(value3, ...onChangeArgs);
242
- }
243
- }
244
- if (!isControlled) {
245
- stateRef.current = value3;
246
- }
247
- };
248
- if (typeof value2 === "function") {
249
- let updateFunction = function updateFunction2(oldValue) {
250
- for (var _len3 = arguments.length, functionArgs = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
251
- functionArgs[_key3 - 1] = arguments[_key3];
252
- }
253
- let interceptedValue = value2(isControlled ? stateRef.current : oldValue, ...functionArgs);
254
- onChangeCaller(interceptedValue, ...args);
255
- if (!isControlled) {
256
- return interceptedValue;
257
- }
258
- return oldValue;
259
- };
260
- setStateValue(updateFunction);
261
- } else {
262
- if (!isControlled) {
263
- setStateValue(value2);
264
- }
265
- onChangeCaller(value2, ...args);
266
- }
267
- }, [isControlled, onChange]);
268
- if (isControlled) {
269
- stateRef.current = value;
270
- } else {
271
- value = stateValue;
272
- }
273
- return [value, setValue];
274
- }
275
-
276
- // ../../node_modules/@react-stately/toggle/dist/module.js
277
- function useToggleState(props) {
278
- if (props === void 0) {
279
- props = {};
280
- }
281
- let {
282
- isReadOnly,
283
- onChange
284
- } = props;
285
- let [isSelected, setSelected] = useControlledState(props.isSelected, props.defaultSelected || false, () => {
286
- });
287
- function updateSelected(value) {
288
- if (!isReadOnly) {
289
- setSelected(value);
290
- if (onChange) {
291
- onChange(value);
292
- }
293
- }
294
- }
295
- function toggleState() {
296
- if (!isReadOnly) {
297
- setSelected((prev) => {
298
- let newVal = !prev;
299
- if (onChange) {
300
- onChange(newVal);
301
- }
302
- return newVal;
303
- });
304
- }
305
- }
306
- return {
307
- isSelected,
308
- setSelected: updateSelected,
309
- toggle: toggleState
310
- };
311
- }
312
-
313
- // src/Checkbox/Checkbox.tsx
257
+ import { useToggleState } from "@react-stately/toggle";
314
258
  import { Exclamation } from "@marigold/icons";
315
259
 
316
260
  // src/Checkbox/CheckboxIcon.tsx
317
- import React7 from "react";
261
+ import React9 from "react";
318
262
  import { conditional, SVG } from "@marigold/system";
319
263
  var CheckboxIcon = ({
320
264
  variant = "",
@@ -329,13 +273,13 @@ var CheckboxIcon = ({
329
273
  checked,
330
274
  error
331
275
  };
332
- return /* @__PURE__ */ React7.createElement(SVG, {
276
+ return /* @__PURE__ */ React9.createElement(SVG, {
333
277
  width: "16",
334
278
  height: "32",
335
279
  viewBox: "0 0 16 32",
336
280
  fill: "none",
337
281
  "aria-hidden": "true"
338
- }, /* @__PURE__ */ React7.createElement(Box, {
282
+ }, /* @__PURE__ */ React9.createElement(Box, {
339
283
  as: "rect",
340
284
  x: "0.5",
341
285
  y: "8.5",
@@ -343,13 +287,13 @@ var CheckboxIcon = ({
343
287
  height: "15px",
344
288
  rx: "1.5",
345
289
  variant: conditional(`checkbox.${variant}`, conditionalStates)
346
- }), checked && indeterminated && /* @__PURE__ */ React7.createElement(Box, {
290
+ }), checked && indeterminated && /* @__PURE__ */ React9.createElement(Box, {
347
291
  __baseCSS: { fill: "gray00" },
348
292
  as: "path",
349
293
  fillRule: "evenodd",
350
294
  clipRule: "evenodd",
351
295
  d: "M13.5 17.0402H2.5V15.4688H13.5V17.0402V17.0402Z"
352
- }), checked && !indeterminated && /* @__PURE__ */ React7.createElement(Box, {
296
+ }), checked && !indeterminated && /* @__PURE__ */ React9.createElement(Box, {
353
297
  __baseCSS: { fill: "gray00" },
354
298
  as: "path",
355
299
  fillRule: "evenodd",
@@ -359,7 +303,7 @@ var CheckboxIcon = ({
359
303
  };
360
304
 
361
305
  // src/Label/Label.tsx
362
- import React8 from "react";
306
+ import React10 from "react";
363
307
  import { Required } from "@marigold/icons";
364
308
  var LabelBase = (_a) => {
365
309
  var _b = _a, {
@@ -373,7 +317,7 @@ var LabelBase = (_a) => {
373
317
  "color",
374
318
  "children"
375
319
  ]);
376
- return /* @__PURE__ */ React8.createElement(Box, __spreadProps(__spreadValues({}, props), {
320
+ return /* @__PURE__ */ React10.createElement(Box, __spreadProps(__spreadValues({}, props), {
377
321
  as: "label",
378
322
  __baseCSS: { color },
379
323
  variant: `label.${variant}`
@@ -387,18 +331,18 @@ var Label = (_a) => {
387
331
  "required",
388
332
  "children"
389
333
  ]);
390
- return required ? /* @__PURE__ */ React8.createElement(Box, {
334
+ return required ? /* @__PURE__ */ React10.createElement(Box, {
391
335
  as: "span",
392
336
  display: "inline-flex",
393
337
  alignItems: "center"
394
- }, /* @__PURE__ */ React8.createElement(LabelBase, __spreadValues({}, props), children), required && /* @__PURE__ */ React8.createElement(Required, {
338
+ }, /* @__PURE__ */ React10.createElement(LabelBase, __spreadValues({}, props), children), required && /* @__PURE__ */ React10.createElement(Required, {
395
339
  size: 16,
396
340
  fill: "error"
397
- })) : /* @__PURE__ */ React8.createElement(LabelBase, __spreadValues({}, props), children);
341
+ })) : /* @__PURE__ */ React10.createElement(LabelBase, __spreadValues({}, props), children);
398
342
  };
399
343
 
400
344
  // src/ValidationMessage/ValidationMessage.tsx
401
- import React9 from "react";
345
+ import React11 from "react";
402
346
  var ValidationMessage = (_a) => {
403
347
  var _b = _a, {
404
348
  variant = "error",
@@ -409,7 +353,7 @@ var ValidationMessage = (_a) => {
409
353
  "children",
410
354
  "className"
411
355
  ]);
412
- return /* @__PURE__ */ React9.createElement(Box, __spreadValues({
356
+ return /* @__PURE__ */ React11.createElement(Box, __spreadValues({
413
357
  as: "span",
414
358
  display: "flex",
415
359
  alignItems: "center",
@@ -428,15 +372,15 @@ var CheckboxInput = (_a) => {
428
372
  "indeterminated"
429
373
  ]);
430
374
  const state = useToggleState(props);
431
- const ref = React10.useRef(null);
375
+ const ref = React12.useRef(null);
432
376
  const { inputProps } = useCheckbox(props, state, ref);
433
377
  const { focusProps } = useFocusRing();
434
378
  const _a2 = props, { children } = _a2, restProps = __objRest(_a2, ["children"]);
435
- return /* @__PURE__ */ React10.createElement(Box, {
379
+ return /* @__PURE__ */ React12.createElement(Box, {
436
380
  pr: "xsmall"
437
- }, /* @__PURE__ */ React10.createElement(VisuallyHidden, null, /* @__PURE__ */ React10.createElement("input", __spreadValues(__spreadProps(__spreadValues(__spreadValues({}, inputProps), focusProps), {
381
+ }, /* @__PURE__ */ React12.createElement(VisuallyHidden, null, /* @__PURE__ */ React12.createElement("input", __spreadValues(__spreadProps(__spreadValues(__spreadValues({}, inputProps), focusProps), {
438
382
  ref
439
- }), restProps))), /* @__PURE__ */ React10.createElement(CheckboxIcon, {
383
+ }), restProps))), /* @__PURE__ */ React12.createElement(CheckboxIcon, {
440
384
  checked: props.checked,
441
385
  variant: props.variant,
442
386
  disabled: props.disabled,
@@ -454,7 +398,7 @@ var Checkbox = (_a) => {
454
398
  "labelVariant",
455
399
  "errorMessage"
456
400
  ]);
457
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Box, {
401
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Box, {
458
402
  as: Label,
459
403
  __baseCSS: {
460
404
  ":hover": { cursor: props.disabled ? "not-allowed" : "pointer" }
@@ -463,15 +407,15 @@ var Checkbox = (_a) => {
463
407
  required,
464
408
  variant: `label.${labelVariant}`,
465
409
  color: props.disabled ? "disabled" : "text"
466
- }, /* @__PURE__ */ React10.createElement(CheckboxInput, __spreadValues({
410
+ }, /* @__PURE__ */ React12.createElement(CheckboxInput, __spreadValues({
467
411
  error: props.error
468
- }, props)), props.children), props.error && errorMessage && /* @__PURE__ */ React10.createElement(ValidationMessage, null, /* @__PURE__ */ React10.createElement(Exclamation, {
412
+ }, props)), props.children), props.error && errorMessage && /* @__PURE__ */ React12.createElement(ValidationMessage, null, /* @__PURE__ */ React12.createElement(Exclamation, {
469
413
  size: 16
470
414
  }), errorMessage));
471
415
  };
472
416
 
473
417
  // src/Column/Column.tsx
474
- import React11 from "react";
418
+ import React13 from "react";
475
419
  var transform = (width) => {
476
420
  if (Array.isArray(width)) {
477
421
  return width.map((v) => `${v / 12 * 100}%`);
@@ -486,14 +430,38 @@ var Column = (_a) => {
486
430
  "width",
487
431
  "children"
488
432
  ]);
489
- return /* @__PURE__ */ React11.createElement(Box, __spreadProps(__spreadValues({}, props), {
433
+ return /* @__PURE__ */ React13.createElement(Box, __spreadProps(__spreadValues({}, props), {
490
434
  width: transform(width)
491
435
  }), children);
492
436
  };
493
437
 
494
438
  // src/Columns/Columns.tsx
495
- import React12, { Children as Children4 } from "react";
439
+ import React14, { Children as Children2 } from "react";
496
440
  import { useTheme } from "@marigold/system";
441
+
442
+ // src/utils/flatten-children.ts
443
+ import {
444
+ Children,
445
+ isValidElement,
446
+ cloneElement
447
+ } from "react";
448
+ import { isFragment } from "react-is";
449
+ var flattenChildren = (children, depth = 0, keys = []) => Children.toArray(children).reduce((acc, node) => {
450
+ if (isFragment(node)) {
451
+ acc.push.apply(acc, flattenChildren(node.props.children, depth + 1, keys.concat(node.key)));
452
+ } else {
453
+ if (isValidElement(node)) {
454
+ acc.push(cloneElement(node, {
455
+ key: keys.concat(String(node.key)).join(".")
456
+ }));
457
+ } else if (typeof node === "string" || typeof node === "number") {
458
+ acc.push(node);
459
+ }
460
+ }
461
+ return acc;
462
+ }, []);
463
+
464
+ // src/Columns/Columns.tsx
497
465
  var useAlignment = (direction) => {
498
466
  switch (direction) {
499
467
  case "right":
@@ -524,33 +492,33 @@ var Columns = (_a) => {
524
492
  const { css } = useTheme();
525
493
  const spaceObject = css({ space });
526
494
  const spaceValue = Object.values(spaceObject)[0];
527
- return /* @__PURE__ */ React12.createElement(Box, {
495
+ return /* @__PURE__ */ React14.createElement(Box, {
528
496
  p: space,
529
497
  display: "flex",
530
498
  className
531
- }, /* @__PURE__ */ React12.createElement(Box, __spreadValues({
499
+ }, /* @__PURE__ */ React14.createElement(Box, __spreadValues({
532
500
  width: `calc(100% + ${spaceValue}px)`,
533
501
  m: `${-spaceValue / 2}px`,
534
502
  display: "flex",
535
503
  flexWrap: "wrap",
536
504
  alignItems,
537
505
  justifyContent
538
- }, props), Children4.map(flattenChildren(children), (child) => {
539
- return React12.cloneElement(child, {}, /* @__PURE__ */ React12.createElement(Box, {
506
+ }, props), Children2.map(flattenChildren(children), (child) => {
507
+ return React14.cloneElement(child, {}, /* @__PURE__ */ React14.createElement(Box, {
540
508
  css: { p: `${spaceValue / 2}px` }
541
509
  }, child.props.children));
542
510
  })));
543
511
  };
544
512
 
545
513
  // src/Dialog/Dialog.tsx
546
- import React15 from "react";
514
+ import React17 from "react";
547
515
  import { useOverlayTriggerState } from "@react-stately/overlays";
548
516
  import { OverlayContainer } from "@react-aria/overlays";
549
517
  import { useButton as useButton2 } from "@react-aria/button";
550
518
  import { Close } from "@marigold/icons";
551
519
 
552
520
  // src/Text/Text.tsx
553
- import React13, { forwardRef as forwardRef2 } from "react";
521
+ import React15, { forwardRef as forwardRef2 } from "react";
554
522
  var Text = forwardRef2((_a, ref) => {
555
523
  var _b = _a, {
556
524
  as = "span",
@@ -573,7 +541,7 @@ var Text = forwardRef2((_a, ref) => {
573
541
  "outline",
574
542
  "userSelect"
575
543
  ]);
576
- return /* @__PURE__ */ React13.createElement(Box, __spreadProps(__spreadValues({}, props), {
544
+ return /* @__PURE__ */ React15.createElement(Box, __spreadProps(__spreadValues({}, props), {
577
545
  as,
578
546
  variant: `text.${variant}`,
579
547
  css: {
@@ -589,7 +557,7 @@ var Text = forwardRef2((_a, ref) => {
589
557
  });
590
558
 
591
559
  // src/Dialog/ModalDialog.tsx
592
- import React14 from "react";
560
+ import React16 from "react";
593
561
  import {
594
562
  useOverlay,
595
563
  usePreventScroll,
@@ -608,12 +576,12 @@ var ModalDialog = (_a) => {
608
576
  "children"
609
577
  ]);
610
578
  const _a2 = props, { isDismissable, isOpen, onClose } = _a2, restProps = __objRest(_a2, ["isDismissable", "isOpen", "onClose"]);
611
- const ref = React14.useRef();
579
+ const ref = React16.useRef();
612
580
  const { overlayProps, underlayProps } = useOverlay({ isDismissable, isOpen, onClose }, ref);
613
581
  usePreventScroll();
614
582
  const { modalProps } = useModal();
615
583
  const { dialogProps } = useDialog(props, ref);
616
- return /* @__PURE__ */ React14.createElement(Box, __spreadValues({
584
+ return /* @__PURE__ */ React16.createElement(Box, __spreadValues({
617
585
  __baseCSS: {
618
586
  display: "grid",
619
587
  placeItems: "center",
@@ -625,11 +593,11 @@ var ModalDialog = (_a) => {
625
593
  right: 0
626
594
  },
627
595
  variant: `dialog.${backdropVariant}`
628
- }, underlayProps), /* @__PURE__ */ React14.createElement(FocusScope, {
596
+ }, underlayProps), /* @__PURE__ */ React16.createElement(FocusScope, {
629
597
  contain: true,
630
598
  restoreFocus: true,
631
599
  autoFocus: true
632
- }, /* @__PURE__ */ React14.createElement(Box, __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, overlayProps), dialogProps), modalProps), {
600
+ }, /* @__PURE__ */ React16.createElement(Box, __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, overlayProps), dialogProps), modalProps), {
633
601
  ref,
634
602
  variant: variant ? `dialog.${variant}` : `dialog`
635
603
  }), restProps), children)));
@@ -654,17 +622,17 @@ var Dialog = (_a) => {
654
622
  "title",
655
623
  "variant"
656
624
  ]);
657
- const closeButtonRef = React15.useRef();
625
+ const closeButtonRef = React17.useRef();
658
626
  const { buttonProps: closeButtonProps } = useButton2({
659
627
  onPress: () => close()
660
628
  }, closeButtonRef);
661
- return /* @__PURE__ */ React15.createElement(OverlayContainer, null, /* @__PURE__ */ React15.createElement(ModalDialog, __spreadValues({
629
+ return /* @__PURE__ */ React17.createElement(OverlayContainer, null, /* @__PURE__ */ React17.createElement(ModalDialog, __spreadValues({
662
630
  variant,
663
631
  backdropVariant,
664
632
  isOpen,
665
633
  onClose: close,
666
634
  isDismissable: true
667
- }, props), /* @__PURE__ */ React15.createElement(Box, {
635
+ }, props), /* @__PURE__ */ React17.createElement(Box, {
668
636
  __baseCSS: {
669
637
  display: "flex",
670
638
  justifyContent: "space-between",
@@ -673,12 +641,12 @@ var Dialog = (_a) => {
673
641
  pb: "large"
674
642
  },
675
643
  className
676
- }, /* @__PURE__ */ React15.createElement(Box, {
644
+ }, /* @__PURE__ */ React17.createElement(Box, {
677
645
  pt: "medium"
678
- }, title && /* @__PURE__ */ React15.createElement(Text, {
646
+ }, title && /* @__PURE__ */ React17.createElement(Text, {
679
647
  as: "h4",
680
648
  variant: "headline4"
681
- }, title), children), /* @__PURE__ */ React15.createElement(Box, {
649
+ }, title), children), /* @__PURE__ */ React17.createElement(Box, {
682
650
  __baseCSS: {
683
651
  display: "flex",
684
652
  justifyContent: "flex-end",
@@ -686,7 +654,7 @@ var Dialog = (_a) => {
686
654
  paddingTop: "xsmall",
687
655
  paddingX: "xsmall"
688
656
  }
689
- }, /* @__PURE__ */ React15.createElement(Box, __spreadProps(__spreadValues({
657
+ }, /* @__PURE__ */ React17.createElement(Box, __spreadProps(__spreadValues({
690
658
  as: Button,
691
659
  __baseCSS: {
692
660
  color: "text",
@@ -704,13 +672,13 @@ var Dialog = (_a) => {
704
672
  }
705
673
  }, closeButtonProps), {
706
674
  ref: closeButtonRef
707
- }), /* @__PURE__ */ React15.createElement(Close, {
675
+ }), /* @__PURE__ */ React17.createElement(Close, {
708
676
  size: 16
709
677
  }))))));
710
678
  };
711
679
  var useDialogButtonProps = () => {
712
680
  const state = useOverlayTriggerState({});
713
- const openButtonRef = React15.useRef();
681
+ const openButtonRef = React17.useRef();
714
682
  const { buttonProps: openButtonProps } = useButton2({
715
683
  onPress: () => state.open()
716
684
  }, openButtonRef);
@@ -722,19 +690,19 @@ var useDialogButtonProps = () => {
722
690
  };
723
691
 
724
692
  // src/Divider/Divider.tsx
725
- import React16 from "react";
693
+ import React18 from "react";
726
694
  import { useSeparator } from "@react-aria/separator";
727
695
  var Divider = (_a) => {
728
696
  var _b = _a, { variant = "" } = _b, props = __objRest(_b, ["variant"]);
729
697
  const { separatorProps } = useSeparator(props);
730
- return /* @__PURE__ */ React16.createElement(Box, __spreadValues(__spreadValues({
698
+ return /* @__PURE__ */ React18.createElement(Box, __spreadValues(__spreadValues({
731
699
  __baseCSS: { width: "100%", height: "1px", m: "none", bg: "text" },
732
700
  variant: `divider.${variant}`
733
701
  }, props), separatorProps));
734
702
  };
735
703
 
736
704
  // src/Field/Field.tsx
737
- import React17, { useRef as useRef2 } from "react";
705
+ import React19, { useRef } from "react";
738
706
  import { useTextField } from "@react-aria/textfield";
739
707
  import { Exclamation as Exclamation2 } from "@marigold/icons";
740
708
  var Field = (_a) => {
@@ -755,20 +723,20 @@ var Field = (_a) => {
755
723
  "error",
756
724
  "errorMessage"
757
725
  ]);
758
- const ref = useRef2(null);
726
+ const ref = useRef(null);
759
727
  const { labelProps, inputProps, errorMessageProps } = useTextField(props, ref);
760
- return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Label, __spreadValues({
728
+ return /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(Label, __spreadValues({
761
729
  variant: labelVariant,
762
730
  htmlFor,
763
731
  required
764
- }, labelProps), props.label), /* @__PURE__ */ React17.createElement(Box, __spreadValues(__spreadProps(__spreadValues({
732
+ }, labelProps), props.label), /* @__PURE__ */ React19.createElement(Box, __spreadValues(__spreadProps(__spreadValues({
765
733
  as: "input",
766
734
  type,
767
735
  id: htmlFor,
768
736
  variant: `input.${variant}`
769
737
  }, inputProps), {
770
738
  ref
771
- }), props)), error && errorMessage && /* @__PURE__ */ React17.createElement(ValidationMessage, __spreadValues({}, errorMessageProps), /* @__PURE__ */ React17.createElement(Exclamation2, {
739
+ }), props)), error && errorMessage && /* @__PURE__ */ React19.createElement(ValidationMessage, __spreadValues({}, errorMessageProps), /* @__PURE__ */ React19.createElement(Exclamation2, {
772
740
  size: 16
773
741
  }), errorMessage));
774
742
  };
@@ -777,21 +745,21 @@ var Field = (_a) => {
777
745
  import { VisuallyHidden as VisuallyHidden2 } from "@react-aria/visually-hidden";
778
746
 
779
747
  // src/Image/Image.tsx
780
- import React18 from "react";
748
+ import React20 from "react";
781
749
  var Image = (_a) => {
782
750
  var _b = _a, {
783
751
  variant = "fullWidth"
784
752
  } = _b, props = __objRest(_b, [
785
753
  "variant"
786
754
  ]);
787
- return /* @__PURE__ */ React18.createElement(Box, __spreadProps(__spreadValues({}, props), {
755
+ return /* @__PURE__ */ React20.createElement(Box, __spreadProps(__spreadValues({}, props), {
788
756
  as: "img",
789
757
  variant: `image.${variant}`
790
758
  }));
791
759
  };
792
760
 
793
761
  // src/Link/Link.tsx
794
- import React19, { useRef as useRef3 } from "react";
762
+ import React21, { useRef as useRef2 } from "react";
795
763
  import { useLink } from "@react-aria/link";
796
764
  var Link = (_a) => {
797
765
  var _b = _a, {
@@ -805,12 +773,12 @@ var Link = (_a) => {
805
773
  "children",
806
774
  "disabled"
807
775
  ]);
808
- const ref = useRef3();
776
+ const ref = useRef2();
809
777
  const { linkProps } = useLink(__spreadProps(__spreadValues({}, props), {
810
778
  elementType: typeof as === "string" ? as : "span",
811
779
  isDisabled: disabled
812
780
  }), ref);
813
- return /* @__PURE__ */ React19.createElement(Text, __spreadProps(__spreadValues(__spreadValues({}, props), linkProps), {
781
+ return /* @__PURE__ */ React21.createElement(Text, __spreadProps(__spreadValues(__spreadValues({}, props), linkProps), {
814
782
  as,
815
783
  variant,
816
784
  ref
@@ -818,7 +786,7 @@ var Link = (_a) => {
818
786
  };
819
787
 
820
788
  // src/Menu/Menu.tsx
821
- import React20 from "react";
789
+ import React22 from "react";
822
790
  var Menu = (_a) => {
823
791
  var _b = _a, {
824
792
  variant = "default",
@@ -833,12 +801,12 @@ var Menu = (_a) => {
833
801
  "show",
834
802
  "children"
835
803
  ]);
836
- return /* @__PURE__ */ React20.createElement(Box, __spreadValues({
804
+ return /* @__PURE__ */ React22.createElement(Box, __spreadValues({
837
805
  variant: `menu.${variant}`
838
- }, props), /* @__PURE__ */ React20.createElement(Button, {
806
+ }, props), /* @__PURE__ */ React22.createElement(Button, {
839
807
  onClick,
840
808
  variant: "menu"
841
- }, label), show ? /* @__PURE__ */ React20.createElement(Box, {
809
+ }, label), show ? /* @__PURE__ */ React22.createElement(Box, {
842
810
  display: "block",
843
811
  position: "absolute",
844
812
  minWidth: "120px",
@@ -847,7 +815,7 @@ var Menu = (_a) => {
847
815
  };
848
816
 
849
817
  // src/MenuItem/MenuItem.tsx
850
- import React21 from "react";
818
+ import React23 from "react";
851
819
  var MenuItem = (_a) => {
852
820
  var _b = _a, {
853
821
  variant = "default",
@@ -856,15 +824,15 @@ var MenuItem = (_a) => {
856
824
  "variant",
857
825
  "children"
858
826
  ]);
859
- return /* @__PURE__ */ React21.createElement(Box, {
827
+ return /* @__PURE__ */ React23.createElement(Box, {
860
828
  variant: `menuItem.${variant}`
861
- }, /* @__PURE__ */ React21.createElement(Link, __spreadValues({
829
+ }, /* @__PURE__ */ React23.createElement(Link, __spreadValues({
862
830
  variant: "menuItemLink"
863
831
  }, props), children));
864
832
  };
865
833
 
866
834
  // src/Message/Message.tsx
867
- import React22 from "react";
835
+ import React24 from "react";
868
836
  import { Exclamation as Exclamation3, Info, Notification } from "@marigold/icons";
869
837
  var Message = (_a) => {
870
838
  var _b = _a, {
@@ -878,25 +846,25 @@ var Message = (_a) => {
878
846
  "className",
879
847
  "children"
880
848
  ]);
881
- var icon = /* @__PURE__ */ React22.createElement(Info, null);
849
+ var icon = /* @__PURE__ */ React24.createElement(Info, null);
882
850
  if (variant === "warning") {
883
- icon = /* @__PURE__ */ React22.createElement(Notification, null);
851
+ icon = /* @__PURE__ */ React24.createElement(Notification, null);
884
852
  }
885
853
  if (variant === "error") {
886
- icon = /* @__PURE__ */ React22.createElement(Exclamation3, null);
854
+ icon = /* @__PURE__ */ React24.createElement(Exclamation3, null);
887
855
  }
888
- return /* @__PURE__ */ React22.createElement(Box, __spreadValues({
856
+ return /* @__PURE__ */ React24.createElement(Box, __spreadValues({
889
857
  display: "inline-block",
890
858
  variant: `message.${variant}`,
891
859
  className
892
- }, props), /* @__PURE__ */ React22.createElement(Box, {
860
+ }, props), /* @__PURE__ */ React24.createElement(Box, {
893
861
  display: "flex",
894
862
  alignItems: "center",
895
863
  variant: "message.title"
896
- }, icon, /* @__PURE__ */ React22.createElement(Text, {
864
+ }, icon, /* @__PURE__ */ React24.createElement(Text, {
897
865
  as: "h4",
898
866
  variant: "headline4"
899
- }, messageTitle)), /* @__PURE__ */ React22.createElement(Box, {
867
+ }, messageTitle)), /* @__PURE__ */ React24.createElement(Box, {
900
868
  css: { color: "black" }
901
869
  }, children));
902
870
  };
@@ -906,7 +874,7 @@ import { useTheme as useTheme3, ThemeProvider as ThemeProvider2 } from "@marigol
906
874
  import { SSRProvider } from "@react-aria/ssr";
907
875
 
908
876
  // src/Provider/MarigoldProvider.tsx
909
- import React23 from "react";
877
+ import React25 from "react";
910
878
  import { OverlayProvider } from "@react-aria/overlays";
911
879
  import {
912
880
  Global,
@@ -920,19 +888,19 @@ function MarigoldProvider({
920
888
  }) {
921
889
  const outer = useTheme2();
922
890
  const isTopLevel = outer.theme === __defaultTheme;
923
- return /* @__PURE__ */ React23.createElement(ThemeProvider, {
891
+ return /* @__PURE__ */ React25.createElement(ThemeProvider, {
924
892
  theme
925
- }, isTopLevel ? /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(Global, null), /* @__PURE__ */ React23.createElement(OverlayProvider, null, children)) : children);
893
+ }, isTopLevel ? /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Global, null), /* @__PURE__ */ React25.createElement(OverlayProvider, null, children)) : children);
926
894
  }
927
895
 
928
896
  // src/Radio/Radio.tsx
929
- import React25 from "react";
897
+ import React27 from "react";
930
898
  import { Exclamation as Exclamation4 } from "@marigold/icons";
931
899
  import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
932
900
  import { VisuallyHidden as VisuallyHidden3 } from "@react-aria/visually-hidden";
933
901
 
934
902
  // src/Radio/RadioIcon.tsx
935
- import React24 from "react";
903
+ import React26 from "react";
936
904
  import { conditional as conditional2, SVG as SVG2 } from "@marigold/system";
937
905
  var RadioIcon = ({
938
906
  variant = "",
@@ -946,19 +914,19 @@ var RadioIcon = ({
946
914
  checked,
947
915
  error
948
916
  };
949
- return /* @__PURE__ */ React24.createElement(SVG2, {
917
+ return /* @__PURE__ */ React26.createElement(SVG2, {
950
918
  width: "16",
951
919
  height: "32",
952
920
  viewBox: "0 0 16 32",
953
921
  fill: "none",
954
922
  "aria-hidden": "true"
955
- }, /* @__PURE__ */ React24.createElement(Box, {
923
+ }, /* @__PURE__ */ React26.createElement(Box, {
956
924
  variant: conditional2(`radio.${variant}`, conditionalStates),
957
925
  as: "circle",
958
926
  cx: "8",
959
927
  cy: "16",
960
928
  r: "7.5"
961
- }), checked && /* @__PURE__ */ React24.createElement("circle", {
929
+ }), checked && /* @__PURE__ */ React26.createElement("circle", {
962
930
  fill: "white",
963
931
  cx: "8",
964
932
  cy: "16",
@@ -971,12 +939,12 @@ var RadioInput = (_a) => {
971
939
  var _b = _a, { error } = _b, props = __objRest(_b, ["error"]);
972
940
  const { focusProps } = useFocusRing2();
973
941
  const _a2 = props, { children } = _a2, restProps = __objRest(_a2, ["children"]);
974
- return /* @__PURE__ */ React25.createElement(Box, {
942
+ return /* @__PURE__ */ React27.createElement(Box, {
975
943
  pr: "xsmall"
976
- }, /* @__PURE__ */ React25.createElement(VisuallyHidden3, null, /* @__PURE__ */ React25.createElement("input", __spreadValues(__spreadValues({
944
+ }, /* @__PURE__ */ React27.createElement(VisuallyHidden3, null, /* @__PURE__ */ React27.createElement("input", __spreadValues(__spreadValues({
977
945
  type: "radio",
978
946
  disabled: props.disabled
979
- }, focusProps), restProps))), /* @__PURE__ */ React25.createElement(RadioIcon, {
947
+ }, focusProps), restProps))), /* @__PURE__ */ React27.createElement(RadioIcon, {
980
948
  variant: props.variant,
981
949
  disabled: props.disabled,
982
950
  checked: props.checked,
@@ -993,22 +961,22 @@ var Radio = (_a) => {
993
961
  "labelVariant",
994
962
  "errorMessage"
995
963
  ]);
996
- return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(Box, {
964
+ return /* @__PURE__ */ React27.createElement(React27.Fragment, null, /* @__PURE__ */ React27.createElement(Box, {
997
965
  as: Label,
998
966
  htmlFor: props.id,
999
967
  required,
1000
968
  variant: `label.${labelVariant}`,
1001
969
  css: props.disabled ? { color: "disabled", ":hover": { cursor: "not-allowed" } } : { color: "text", ":hover": { cursor: "pointer" } }
1002
- }, /* @__PURE__ */ React25.createElement(Box, __spreadValues({
970
+ }, /* @__PURE__ */ React27.createElement(Box, __spreadValues({
1003
971
  as: RadioInput,
1004
972
  error: props.error
1005
- }, props)), props.children), props.error && errorMessage && /* @__PURE__ */ React25.createElement(ValidationMessage, null, /* @__PURE__ */ React25.createElement(Exclamation4, {
973
+ }, props)), props.children), props.error && errorMessage && /* @__PURE__ */ React27.createElement(ValidationMessage, null, /* @__PURE__ */ React27.createElement(Exclamation4, {
1006
974
  size: 16
1007
975
  }), errorMessage));
1008
976
  };
1009
977
 
1010
978
  // src/Select/Select.tsx
1011
- import React30, { useRef as useRef6 } from "react";
979
+ import React32, { useRef as useRef5 } from "react";
1012
980
  import { useSelectState } from "@react-stately/select";
1013
981
  import { useButton as useButton3 } from "@react-aria/button";
1014
982
  import { mergeProps as mergeProps2 } from "@react-aria/utils";
@@ -1019,15 +987,15 @@ import { useOverlayTrigger, useOverlayPosition } from "@react-aria/overlays";
1019
987
  import { ArrowDown, ArrowUp, Exclamation as Exclamation5, Required as Required2 } from "@marigold/icons";
1020
988
 
1021
989
  // src/Select/ListBox.tsx
1022
- import React28, { useRef as useRef5 } from "react";
990
+ import React30, { useRef as useRef4 } from "react";
1023
991
  import { useListBox } from "@react-aria/listbox";
1024
992
 
1025
993
  // src/Select/Option.tsx
1026
- import React26, { useEffect, useRef as useRef4, useState as useState2 } from "react";
994
+ import React28, { useEffect, useRef as useRef3, useState } from "react";
1027
995
  import { useOption } from "@react-aria/listbox";
1028
996
  var Option = ({ item, state }) => {
1029
- const ref = useRef4(null);
1030
- const [disabled, setDisabled] = useState2(false);
997
+ const ref = useRef3(null);
998
+ const [disabled, setDisabled] = useState(false);
1031
999
  const { optionProps, isSelected } = useOption({
1032
1000
  key: item.key
1033
1001
  }, state, ref);
@@ -1038,7 +1006,7 @@ var Option = ({ item, state }) => {
1038
1006
  }
1039
1007
  }
1040
1008
  }, [state.disabledKeys, item.key]);
1041
- return /* @__PURE__ */ React26.createElement(Box, __spreadProps(__spreadValues({
1009
+ return /* @__PURE__ */ React28.createElement(Box, __spreadProps(__spreadValues({
1042
1010
  as: "li"
1043
1011
  }, optionProps), {
1044
1012
  ref,
@@ -1047,26 +1015,26 @@ var Option = ({ item, state }) => {
1047
1015
  };
1048
1016
 
1049
1017
  // src/Select/ListBoxSection.tsx
1050
- import React27 from "react";
1018
+ import React29 from "react";
1051
1019
  import { useListBoxSection } from "@react-aria/listbox";
1052
1020
  var ListBoxSection = ({ section, state }) => {
1053
1021
  const { itemProps, headingProps, groupProps } = useListBoxSection({
1054
1022
  heading: section.rendered,
1055
1023
  "aria-label": section["aria-label"]
1056
1024
  });
1057
- return /* @__PURE__ */ React27.createElement(Box, __spreadProps(__spreadValues({
1025
+ return /* @__PURE__ */ React29.createElement(Box, __spreadProps(__spreadValues({
1058
1026
  as: "li"
1059
1027
  }, itemProps), {
1060
1028
  css: {
1061
1029
  cursor: "not-allowed"
1062
1030
  }
1063
- }), section.rendered && /* @__PURE__ */ React27.createElement(Box, __spreadProps(__spreadValues({
1031
+ }), section.rendered && /* @__PURE__ */ React29.createElement(Box, __spreadProps(__spreadValues({
1064
1032
  as: "span"
1065
1033
  }, headingProps), {
1066
1034
  variant: "select.section"
1067
- }), section.rendered), /* @__PURE__ */ React27.createElement(Box, __spreadValues({
1035
+ }), section.rendered), /* @__PURE__ */ React29.createElement(Box, __spreadValues({
1068
1036
  as: "ul"
1069
- }, groupProps), [...section.childNodes].map((node) => /* @__PURE__ */ React27.createElement(Option, {
1037
+ }, groupProps), [...section.childNodes].map((node) => /* @__PURE__ */ React29.createElement(Option, {
1070
1038
  key: node.key,
1071
1039
  item: node,
1072
1040
  state
@@ -1075,10 +1043,10 @@ var ListBoxSection = ({ section, state }) => {
1075
1043
 
1076
1044
  // src/Select/ListBox.tsx
1077
1045
  var ListBox = (props) => {
1078
- const ref = useRef5(null);
1046
+ const ref = useRef4(null);
1079
1047
  const { state, error } = props;
1080
1048
  const { listBoxProps } = useListBox(props, state, ref);
1081
- return /* @__PURE__ */ React28.createElement(Box, __spreadProps(__spreadValues({
1049
+ return /* @__PURE__ */ React30.createElement(Box, __spreadProps(__spreadValues({
1082
1050
  as: "ul",
1083
1051
  p: "none",
1084
1052
  css: {
@@ -1087,11 +1055,11 @@ var ListBox = (props) => {
1087
1055
  }, listBoxProps), {
1088
1056
  variant: error ? "select.listbox.error" : "select.listbox",
1089
1057
  ref
1090
- }), [...state.collection].map((item) => item.type === "section" ? /* @__PURE__ */ React28.createElement(ListBoxSection, {
1058
+ }), [...state.collection].map((item) => item.type === "section" ? /* @__PURE__ */ React30.createElement(ListBoxSection, {
1091
1059
  key: item.key,
1092
1060
  section: item,
1093
1061
  state
1094
- }) : /* @__PURE__ */ React28.createElement(Option, {
1062
+ }) : /* @__PURE__ */ React30.createElement(Option, {
1095
1063
  key: item.key,
1096
1064
  item,
1097
1065
  state
@@ -1099,7 +1067,7 @@ var ListBox = (props) => {
1099
1067
  };
1100
1068
 
1101
1069
  // src/Select/Popover.tsx
1102
- import React29, { forwardRef as forwardRef3 } from "react";
1070
+ import React31, { forwardRef as forwardRef3 } from "react";
1103
1071
  import { FocusScope as FocusScope2 } from "@react-aria/focus";
1104
1072
  import {
1105
1073
  DismissButton,
@@ -1117,12 +1085,12 @@ var Popover = forwardRef3((_a, ref) => {
1117
1085
  isDismissable: true
1118
1086
  }, ref);
1119
1087
  const { modalProps } = useModal2();
1120
- return /* @__PURE__ */ React29.createElement(OverlayContainer2, null, /* @__PURE__ */ React29.createElement(FocusScope2, {
1088
+ return /* @__PURE__ */ React31.createElement(OverlayContainer2, null, /* @__PURE__ */ React31.createElement(FocusScope2, {
1121
1089
  restoreFocus: true
1122
- }, /* @__PURE__ */ React29.createElement(Box, __spreadProps(__spreadValues({}, mergeProps(overlayProps, otherProps, modalProps)), {
1090
+ }, /* @__PURE__ */ React31.createElement(Box, __spreadProps(__spreadValues({}, mergeProps(overlayProps, otherProps, modalProps)), {
1123
1091
  className,
1124
1092
  ref
1125
- }), children, /* @__PURE__ */ React29.createElement(DismissButton, {
1093
+ }), children, /* @__PURE__ */ React31.createElement(DismissButton, {
1126
1094
  onDismiss: onClose
1127
1095
  }))));
1128
1096
  });
@@ -1150,8 +1118,8 @@ var Select = (_a) => {
1150
1118
  ]);
1151
1119
  const state = useSelectState(props);
1152
1120
  const overlayTriggerState = useOverlayTriggerState2({});
1153
- const triggerRef = useRef6();
1154
- const overlayRef = useRef6();
1121
+ const triggerRef = useRef5();
1122
+ const overlayRef = useRef5();
1155
1123
  const { overlayProps } = useOverlayTrigger({ type: "listbox" }, overlayTriggerState, triggerRef);
1156
1124
  const { overlayProps: positionProps } = useOverlayPosition({
1157
1125
  targetRef: triggerRef,
@@ -1164,44 +1132,44 @@ var Select = (_a) => {
1164
1132
  const { labelProps, triggerProps, valueProps, menuProps } = useSelect(props, state, triggerRef);
1165
1133
  const { buttonProps } = useButton3(triggerProps, triggerRef);
1166
1134
  const { focusProps } = useFocusRing3();
1167
- return /* @__PURE__ */ React30.createElement(Box, {
1135
+ return /* @__PURE__ */ React32.createElement(Box, {
1168
1136
  position: "relative",
1169
1137
  display: "inline-block",
1170
1138
  width: width && width
1171
- }, props.label && /* @__PURE__ */ React30.createElement(Box, null, /* @__PURE__ */ React30.createElement(Label, __spreadProps(__spreadValues({}, labelProps), {
1139
+ }, props.label && /* @__PURE__ */ React32.createElement(Box, null, /* @__PURE__ */ React32.createElement(Label, __spreadProps(__spreadValues({}, labelProps), {
1172
1140
  htmlFor: labelProps.id,
1173
1141
  variant: labelVariant
1174
- }), required ? /* @__PURE__ */ React30.createElement(Box, {
1142
+ }), required ? /* @__PURE__ */ React32.createElement(Box, {
1175
1143
  as: "span",
1176
1144
  display: "inline-flex",
1177
1145
  alignItems: "center"
1178
- }, props.label, /* @__PURE__ */ React30.createElement(Required2, {
1146
+ }, props.label, /* @__PURE__ */ React32.createElement(Required2, {
1179
1147
  size: 16,
1180
1148
  fill: "error"
1181
- })) : props.label)), /* @__PURE__ */ React30.createElement(HiddenSelect, {
1149
+ })) : props.label)), /* @__PURE__ */ React32.createElement(HiddenSelect, {
1182
1150
  state,
1183
1151
  triggerRef,
1184
1152
  label: props.label,
1185
1153
  name: props.name,
1186
1154
  isDisabled: disabled
1187
- }), /* @__PURE__ */ React30.createElement(Box, __spreadProps(__spreadValues({
1155
+ }), /* @__PURE__ */ React32.createElement(Box, __spreadProps(__spreadValues({
1188
1156
  as: "button"
1189
1157
  }, mergeProps2(buttonProps, focusProps)), {
1190
1158
  ref: triggerRef,
1191
1159
  variant: error && state.isOpen && !disabled ? "button.select.errorOpened" : error ? "button.select.error" : state.isOpen && !disabled ? "button.select.open" : "button.select",
1192
1160
  disabled,
1193
1161
  className
1194
- }), /* @__PURE__ */ React30.createElement(Box, __spreadProps(__spreadValues({
1162
+ }), /* @__PURE__ */ React32.createElement(Box, __spreadProps(__spreadValues({
1195
1163
  as: "span"
1196
1164
  }, valueProps), {
1197
1165
  variant: disabled ? "select.disabled" : "select"
1198
- }), state.selectedItem ? state.selectedItem.rendered : placeholder), state.isOpen && !disabled ? /* @__PURE__ */ React30.createElement(ArrowUp, {
1166
+ }), state.selectedItem ? state.selectedItem.rendered : placeholder), state.isOpen && !disabled ? /* @__PURE__ */ React32.createElement(ArrowUp, {
1199
1167
  size: 16,
1200
1168
  fill: "text"
1201
- }) : /* @__PURE__ */ React30.createElement(ArrowDown, {
1169
+ }) : /* @__PURE__ */ React32.createElement(ArrowDown, {
1202
1170
  size: 16,
1203
1171
  fill: disabled ? "disabled" : "text"
1204
- })), state.isOpen && !disabled && /* @__PURE__ */ React30.createElement(Box, __spreadProps(__spreadValues(__spreadValues({
1172
+ })), state.isOpen && !disabled && /* @__PURE__ */ React32.createElement(Box, __spreadProps(__spreadValues(__spreadValues({
1205
1173
  as: Popover
1206
1174
  }, overlayProps), positionProps), {
1207
1175
  css: {
@@ -1210,26 +1178,26 @@ var Select = (_a) => {
1210
1178
  ref: overlayRef,
1211
1179
  isOpen: state.isOpen,
1212
1180
  onClose: state.close
1213
- }), /* @__PURE__ */ React30.createElement(ListBox, __spreadProps(__spreadValues({
1181
+ }), /* @__PURE__ */ React32.createElement(ListBox, __spreadProps(__spreadValues({
1214
1182
  error
1215
1183
  }, menuProps), {
1216
1184
  state
1217
- }))), error && errorMessage && /* @__PURE__ */ React30.createElement(Box, {
1185
+ }))), error && errorMessage && /* @__PURE__ */ React32.createElement(Box, {
1218
1186
  as: "span",
1219
1187
  display: "inline-flex",
1220
1188
  alignItems: "center"
1221
- }, /* @__PURE__ */ React30.createElement(Box, {
1189
+ }, /* @__PURE__ */ React32.createElement(Box, {
1222
1190
  as: Exclamation5,
1223
1191
  size: 16,
1224
1192
  css: { color: "error" }
1225
- }), /* @__PURE__ */ React30.createElement(ValidationMessage, null, errorMessage)));
1193
+ }), /* @__PURE__ */ React32.createElement(ValidationMessage, null, errorMessage)));
1226
1194
  };
1227
1195
 
1228
1196
  // src/Slider/Slider.tsx
1229
- import React31 from "react";
1197
+ import React33 from "react";
1230
1198
  var Slider = (_a) => {
1231
1199
  var _b = _a, { variant = "" } = _b, props = __objRest(_b, ["variant"]);
1232
- return /* @__PURE__ */ React31.createElement(Box, __spreadValues({
1200
+ return /* @__PURE__ */ React33.createElement(Box, __spreadValues({
1233
1201
  as: "input",
1234
1202
  type: "range",
1235
1203
  css: { verticalAlign: "middle" },
@@ -1238,10 +1206,11 @@ var Slider = (_a) => {
1238
1206
  };
1239
1207
 
1240
1208
  // src/Switch/Switch.tsx
1241
- import React32, { useRef as useRef7 } from "react";
1209
+ import React34, { useRef as useRef6 } from "react";
1242
1210
  import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
1243
1211
  import { useSwitch } from "@react-aria/switch";
1244
1212
  import { VisuallyHidden as VisuallyHidden4 } from "@react-aria/visually-hidden";
1213
+ import { useToggleState as useToggleState2 } from "@react-stately/toggle";
1245
1214
  import { conditional as conditional3 } from "@marigold/system";
1246
1215
  var Switch = (_a) => {
1247
1216
  var _b = _a, {
@@ -1253,20 +1222,20 @@ var Switch = (_a) => {
1253
1222
  "labelVariant",
1254
1223
  "disabled"
1255
1224
  ]);
1256
- const state = useToggleState(props);
1257
- const ref = useRef7();
1225
+ const state = useToggleState2(props);
1226
+ const ref = useRef6();
1258
1227
  const { inputProps } = useSwitch(props, state, ref);
1259
1228
  const { focusProps } = useFocusRing4();
1260
- return /* @__PURE__ */ React32.createElement(Box, {
1229
+ return /* @__PURE__ */ React34.createElement(Box, {
1261
1230
  as: Label,
1262
1231
  __baseCSS: {
1263
1232
  userSelect: "none"
1264
1233
  },
1265
1234
  variant: labelVariant
1266
- }, props.children, /* @__PURE__ */ React32.createElement(VisuallyHidden4, null, /* @__PURE__ */ React32.createElement("input", __spreadProps(__spreadValues(__spreadValues({}, inputProps), focusProps), {
1235
+ }, props.children, /* @__PURE__ */ React34.createElement(VisuallyHidden4, null, /* @__PURE__ */ React34.createElement("input", __spreadProps(__spreadValues(__spreadValues({}, inputProps), focusProps), {
1267
1236
  disabled,
1268
1237
  ref
1269
- }))), /* @__PURE__ */ React32.createElement(Box, {
1238
+ }))), /* @__PURE__ */ React34.createElement(Box, {
1270
1239
  as: "svg",
1271
1240
  __baseCSS: {
1272
1241
  cursor: disabled ? "not-allowed" : "pointer",
@@ -1274,7 +1243,7 @@ var Switch = (_a) => {
1274
1243
  height: 32
1275
1244
  },
1276
1245
  "aria-hidden": "true"
1277
- }, /* @__PURE__ */ React32.createElement(Box, {
1246
+ }, /* @__PURE__ */ React34.createElement(Box, {
1278
1247
  as: "rect",
1279
1248
  __baseCSS: {
1280
1249
  x: 4,
@@ -1287,7 +1256,7 @@ var Switch = (_a) => {
1287
1256
  checked: state.isSelected,
1288
1257
  disabled
1289
1258
  })
1290
- }), /* @__PURE__ */ React32.createElement(Box, {
1259
+ }), /* @__PURE__ */ React34.createElement(Box, {
1291
1260
  as: "circle",
1292
1261
  __baseCSS: {
1293
1262
  boxShadow: "1px 1px 4px rgba(0, 0, 0, 0.25)",
@@ -1300,7 +1269,7 @@ var Switch = (_a) => {
1300
1269
  };
1301
1270
 
1302
1271
  // src/Textarea/Textarea.tsx
1303
- import React33, { useRef as useRef8 } from "react";
1272
+ import React35, { useRef as useRef7 } from "react";
1304
1273
  import { useTextField as useTextField2 } from "@react-aria/textfield";
1305
1274
  import { Exclamation as Exclamation6 } from "@marigold/icons";
1306
1275
  var Textarea = (_a) => {
@@ -1319,14 +1288,14 @@ var Textarea = (_a) => {
1319
1288
  "required",
1320
1289
  "children"
1321
1290
  ]);
1322
- const ref = useRef8(null);
1291
+ const ref = useRef7(null);
1323
1292
  const { labelProps, inputProps, errorMessageProps } = useTextField2(__spreadProps(__spreadValues({}, props), {
1324
1293
  inputElementType: "textarea"
1325
1294
  }), ref);
1326
- return /* @__PURE__ */ React33.createElement(Box, null, /* @__PURE__ */ React33.createElement(Label, __spreadValues({
1295
+ return /* @__PURE__ */ React35.createElement(Box, null, /* @__PURE__ */ React35.createElement(Label, __spreadValues({
1327
1296
  htmlFor,
1328
1297
  required
1329
- }, labelProps), props.label), /* @__PURE__ */ React33.createElement(Box, __spreadValues(__spreadProps(__spreadValues({
1298
+ }, labelProps), props.label), /* @__PURE__ */ React35.createElement(Box, __spreadValues(__spreadProps(__spreadValues({
1330
1299
  as: "textarea",
1331
1300
  variant: `textarea.${variant}`,
1332
1301
  css: {
@@ -1334,33 +1303,47 @@ var Textarea = (_a) => {
1334
1303
  }
1335
1304
  }, inputProps), {
1336
1305
  ref
1337
- }), props)), error && errorMessage && /* @__PURE__ */ React33.createElement(ValidationMessage, __spreadValues({}, errorMessageProps), /* @__PURE__ */ React33.createElement(Exclamation6, {
1306
+ }), props)), error && errorMessage && /* @__PURE__ */ React35.createElement(ValidationMessage, __spreadValues({}, errorMessageProps), /* @__PURE__ */ React35.createElement(Exclamation6, {
1338
1307
  size: 16
1339
1308
  }), errorMessage));
1340
1309
  };
1341
1310
 
1311
+ // src/Tiles/Tiles.tsx
1312
+ import React36 from "react";
1313
+ var Tiles = React36.forwardRef(function Tiles2(_a, ref) {
1314
+ var _b = _a, { space = "none", itemMinWidth = "250px", children } = _b, props = __objRest(_b, ["space", "itemMinWidth", "children"]);
1315
+ return /* @__PURE__ */ React36.createElement(Box, __spreadValues({
1316
+ ref,
1317
+ display: "grid",
1318
+ __baseCSS: {
1319
+ gap: space,
1320
+ gridTemplateColumns: `repeat(auto-fit, minmax(min(${itemMinWidth}, 100%), 1fr))`
1321
+ }
1322
+ }, props), children);
1323
+ });
1324
+
1342
1325
  // src/Tooltip/Tooltip.tsx
1343
- import React35, { useContext } from "react";
1326
+ import React38, { useContext } from "react";
1344
1327
  import { useTooltip } from "@react-aria/tooltip";
1345
1328
  import { mergeProps as mergeProps3 } from "@react-aria/utils";
1346
1329
 
1347
1330
  // src/Tooltip/TooltipTrigger.tsx
1348
- import React34, { useRef as useRef9 } from "react";
1331
+ import React37, { useRef as useRef8 } from "react";
1349
1332
  import { FocusableProvider } from "@react-aria/focus";
1350
1333
  import { useTooltipTrigger } from "@react-aria/tooltip";
1351
1334
  import {
1352
1335
  useTooltipTriggerState
1353
1336
  } from "@react-stately/tooltip";
1354
- var TooltipContext = React34.createContext({});
1337
+ var TooltipContext = React37.createContext({});
1355
1338
  var TooltipTrigger = (_a) => {
1356
1339
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
1357
- const [trigger, tooltip] = React34.Children.toArray(children);
1340
+ const [trigger, tooltip] = React37.Children.toArray(children);
1358
1341
  const state = useTooltipTriggerState(props);
1359
- const tooltipTriggerRef = useRef9();
1342
+ const tooltipTriggerRef = useRef8();
1360
1343
  const { triggerProps, tooltipProps } = useTooltipTrigger({}, state, tooltipTriggerRef);
1361
- return /* @__PURE__ */ React34.createElement(FocusableProvider, __spreadProps(__spreadValues({}, triggerProps), {
1344
+ return /* @__PURE__ */ React37.createElement(FocusableProvider, __spreadProps(__spreadValues({}, triggerProps), {
1362
1345
  ref: tooltipTriggerRef
1363
- }), trigger, state.isOpen && /* @__PURE__ */ React34.createElement(TooltipContext.Provider, {
1346
+ }), trigger, state.isOpen && /* @__PURE__ */ React37.createElement(TooltipContext.Provider, {
1364
1347
  value: __spreadValues({
1365
1348
  state
1366
1349
  }, tooltipProps)
@@ -1379,16 +1362,16 @@ var Tooltip = (_a) => {
1379
1362
  const _a2 = useContext(TooltipContext), { state } = _a2, tooltipProviderProps = __objRest(_a2, ["state"]);
1380
1363
  const mergedProps = mergeProps3(props, tooltipProviderProps);
1381
1364
  const { tooltipProps } = useTooltip(mergedProps, state);
1382
- return /* @__PURE__ */ React35.createElement(Box, __spreadValues({
1365
+ return /* @__PURE__ */ React38.createElement(Box, __spreadValues({
1383
1366
  position: "relative"
1384
- }, tooltipProps), /* @__PURE__ */ React35.createElement(Box, __spreadValues({
1367
+ }, tooltipProps), /* @__PURE__ */ React38.createElement(Box, __spreadValues({
1385
1368
  position: "absolute",
1386
1369
  variant: `tooltip.${variant}`
1387
1370
  }, mergedProps), children));
1388
1371
  };
1389
1372
 
1390
1373
  // src/Input/Input.tsx
1391
- import React36 from "react";
1374
+ import React39 from "react";
1392
1375
  var Input = (_a) => {
1393
1376
  var _b = _a, {
1394
1377
  variant = "",
@@ -1397,7 +1380,7 @@ var Input = (_a) => {
1397
1380
  "variant",
1398
1381
  "type"
1399
1382
  ]);
1400
- return /* @__PURE__ */ React36.createElement(Box, __spreadProps(__spreadValues({}, props), {
1383
+ return /* @__PURE__ */ React39.createElement(Box, __spreadProps(__spreadValues({}, props), {
1401
1384
  as: "input",
1402
1385
  type,
1403
1386
  variant: `input.${variant}`
@@ -1405,18 +1388,39 @@ var Input = (_a) => {
1405
1388
  };
1406
1389
 
1407
1390
  // src/Container/Container.tsx
1408
- import React37 from "react";
1391
+ import React40 from "react";
1392
+ import { size as tokenSize } from "@marigold/tokens";
1393
+ var ALIGNMENT3 = {
1394
+ left: "flex-start",
1395
+ center: "center",
1396
+ right: "flex-end"
1397
+ };
1409
1398
  var Container = (_a) => {
1410
- var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
1411
- return /* @__PURE__ */ React37.createElement(Box, __spreadProps(__spreadValues({}, props), {
1412
- width: "100%"
1413
- }), children);
1399
+ var _b = _a, {
1400
+ contentType = "content",
1401
+ size = "medium",
1402
+ align = "left",
1403
+ children
1404
+ } = _b, props = __objRest(_b, [
1405
+ "contentType",
1406
+ "size",
1407
+ "align",
1408
+ "children"
1409
+ ]);
1410
+ return /* @__PURE__ */ React40.createElement(Box, __spreadValues({
1411
+ display: "flex",
1412
+ flexDirection: "column",
1413
+ maxWidth: tokenSize[contentType][size],
1414
+ alignItems: ALIGNMENT3[align]
1415
+ }, props), children);
1414
1416
  };
1415
1417
 
1416
1418
  // src/index.ts
1417
1419
  import { Item, Section } from "@react-stately/collections";
1418
1420
  export {
1419
1421
  ActionGroup,
1422
+ Aside,
1423
+ Aspect,
1420
1424
  Badge,
1421
1425
  Box,
1422
1426
  Button,
@@ -1449,6 +1453,7 @@ export {
1449
1453
  Text,
1450
1454
  Textarea,
1451
1455
  ThemeProvider2 as ThemeProvider,
1456
+ Tiles,
1452
1457
  Tooltip,
1453
1458
  TooltipContext,
1454
1459
  TooltipTrigger,