@marigold/components 4.1.4 → 4.2.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
@@ -241,33 +241,36 @@ var Center = ({
241
241
  }, children);
242
242
 
243
243
  // src/Checkbox/Checkbox.tsx
244
- import React11, { forwardRef as forwardRef2 } from "react";
244
+ import React13, { forwardRef as forwardRef2 } from "react";
245
245
  import { useCheckbox, useCheckboxGroupItem } from "@react-aria/checkbox";
246
246
  import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
247
247
  import { useHover as useHover2 } from "@react-aria/interactions";
248
248
  import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
249
249
  import { useToggleState } from "@react-stately/toggle";
250
250
  import {
251
- Box as Box7,
252
- useComponentStyles as useComponentStyles7,
253
- useStateProps as useStateProps2
251
+ Box as Box9,
252
+ useComponentStyles as useComponentStyles8,
253
+ useStateProps as useStateProps3
254
254
  } from "@marigold/system";
255
255
 
256
256
  // src/Checkbox/CheckboxGroup.tsx
257
- import React10, { createContext, useContext } from "react";
257
+ import React12, { createContext, useContext } from "react";
258
258
  import { useCheckboxGroup } from "@react-aria/checkbox";
259
259
  import {
260
260
  useCheckboxGroupState
261
261
  } from "@react-stately/checkbox";
262
+ import { Box as Box8, useStateProps as useStateProps2 } from "@marigold/system";
263
+
264
+ // src/FieldBase/FieldBase.tsx
265
+ import React11 from "react";
262
266
  import {
263
- Box as Box6,
264
- useComponentStyles as useComponentStyles6
267
+ Box as Box7,
268
+ useComponentStyles as useComponentStyles7
265
269
  } from "@marigold/system";
266
270
 
267
271
  // src/Label/Label.tsx
268
272
  import React9 from "react";
269
- import { Required } from "@marigold/icons";
270
- import { Box as Box5, useComponentStyles as useComponentStyles5 } from "@marigold/system";
273
+ import { Box as Box5, SVG, useComponentStyles as useComponentStyles5 } from "@marigold/system";
271
274
  var Label = ({
272
275
  as = "label",
273
276
  required,
@@ -281,12 +284,105 @@ var Label = ({
281
284
  ...props,
282
285
  as,
283
286
  "aria-required": required,
287
+ __baseCSS: { display: "flex" },
284
288
  css: styles
285
- }, children, required && /* @__PURE__ */ React9.createElement(Required, {
289
+ }, children, required && /* @__PURE__ */ React9.createElement(SVG, {
290
+ viewBox: "0 0 24 24",
286
291
  role: "presentation",
287
292
  size: 16,
288
293
  fill: "error"
289
- }));
294
+ }, /* @__PURE__ */ React9.createElement("path", {
295
+ d: "M10.8 3.84003H13.2V9.85259L18.1543 7.01815L19.3461 9.10132L14.3584 11.9549L19.3371 14.7999L18.1463 16.8836L13.2 14.0572V20.16H10.8V13.9907L5.76116 16.8735L4.56935 14.7903L9.5232 11.9561L4.56 9.12003L5.75073 7.03624L10.8 9.92154V3.84003Z"
296
+ })));
297
+ };
298
+
299
+ // src/HelpText/HelpText.tsx
300
+ import React10 from "react";
301
+ import {
302
+ Box as Box6,
303
+ SVG as SVG2,
304
+ useComponentStyles as useComponentStyles6
305
+ } from "@marigold/system";
306
+ var HelpText = ({
307
+ variant,
308
+ size,
309
+ disabled,
310
+ description,
311
+ descriptionProps,
312
+ error,
313
+ errorMessage,
314
+ errorMessageProps,
315
+ ...props
316
+ }) => {
317
+ var _a;
318
+ const hasErrorMessage = errorMessage && error;
319
+ const styles = useComponentStyles6(
320
+ "HelpText",
321
+ { variant, size },
322
+ { parts: ["container", "icon"] }
323
+ );
324
+ return /* @__PURE__ */ React10.createElement(Box6, {
325
+ ...hasErrorMessage ? errorMessageProps : descriptionProps,
326
+ ...props,
327
+ __baseCSS: { display: "flex", alignItems: "center", gap: 4 },
328
+ css: styles.container
329
+ }, hasErrorMessage ? /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(SVG2, {
330
+ viewBox: "0 0 24 24",
331
+ role: "presentation",
332
+ size: ((_a = styles == null ? void 0 : styles.icon) == null ? void 0 : _a.size) || 16
333
+ }, /* @__PURE__ */ React10.createElement("path", {
334
+ d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z"
335
+ })), errorMessage) : /* @__PURE__ */ React10.createElement(React10.Fragment, null, description));
336
+ };
337
+
338
+ // src/FieldBase/FieldBase.tsx
339
+ var FieldBase = ({
340
+ children,
341
+ variant,
342
+ size,
343
+ width = "100%",
344
+ disabled,
345
+ required,
346
+ label,
347
+ labelProps,
348
+ description,
349
+ descriptionProps,
350
+ error,
351
+ errorMessage,
352
+ errorMessageProps,
353
+ stateProps,
354
+ ...props
355
+ }) => {
356
+ const hasHelpText = !!description || errorMessage && error;
357
+ const style = useComponentStyles7("Field", { variant, size });
358
+ return /* @__PURE__ */ React11.createElement(Box7, {
359
+ ...props,
360
+ __baseCSS: {
361
+ display: "flex",
362
+ flexDirection: "column",
363
+ width,
364
+ position: "relative"
365
+ },
366
+ css: style
367
+ }, label && /* @__PURE__ */ React11.createElement(Label, {
368
+ required,
369
+ variant,
370
+ size,
371
+ ...labelProps,
372
+ ...stateProps
373
+ }, label), /* @__PURE__ */ React11.createElement(Box7, {
374
+ __baseCSS: { display: "flex", flexDirection: "column" }
375
+ }, children, hasHelpText && /* @__PURE__ */ React11.createElement(HelpText, {
376
+ ...stateProps,
377
+ variant,
378
+ size,
379
+ disabled,
380
+ description,
381
+ descriptionProps,
382
+ error,
383
+ errorMessage,
384
+ errorMessageProps
385
+ })));
290
386
  };
291
387
 
292
388
  // src/Checkbox/CheckboxGroup.tsx
@@ -296,8 +392,6 @@ var CheckboxGroupContext = createContext(
296
392
  var useCheckboxGroupContext = () => useContext(CheckboxGroupContext);
297
393
  var CheckboxGroup = ({
298
394
  children,
299
- variant,
300
- size,
301
395
  required,
302
396
  disabled,
303
397
  readOnly,
@@ -312,50 +406,54 @@ var CheckboxGroup = ({
312
406
  ...rest
313
407
  };
314
408
  const state = useCheckboxGroupState(props);
315
- const { groupProps, labelProps } = useCheckboxGroup(props, state);
316
- const styles = useComponentStyles6(
317
- "CheckboxGroup",
318
- { variant, size },
319
- { parts: ["container", "group"] }
320
- );
321
- return /* @__PURE__ */ React10.createElement(Box6, {
322
- ...groupProps,
323
- css: styles.container
324
- }, props.label && /* @__PURE__ */ React10.createElement(Label, {
325
- as: "span",
409
+ const { groupProps, labelProps, descriptionProps, errorMessageProps } = useCheckboxGroup(props, state);
410
+ const stateProps = useStateProps2({
411
+ disabled,
412
+ readOnly,
413
+ error
414
+ });
415
+ return /* @__PURE__ */ React12.createElement(FieldBase, {
416
+ label: props.label,
417
+ labelProps: { as: "span", ...labelProps },
418
+ description: props.description,
419
+ descriptionProps,
420
+ error,
421
+ errorMessage: props.errorMessage,
422
+ errorMessageProps,
423
+ disabled,
424
+ stateProps,
326
425
  required,
327
- ...labelProps
328
- }, props.label), /* @__PURE__ */ React10.createElement(Box6, {
426
+ ...groupProps
427
+ }, /* @__PURE__ */ React12.createElement(Box8, {
329
428
  role: "presentation",
330
429
  __baseCSS: {
331
430
  display: "flex",
332
431
  flexDirection: "column",
333
432
  alignItems: "start"
334
- },
335
- css: styles.group
336
- }, /* @__PURE__ */ React10.createElement(CheckboxGroupContext.Provider, {
337
- value: { variant, size, error, ...state }
433
+ }
434
+ }, /* @__PURE__ */ React12.createElement(CheckboxGroupContext.Provider, {
435
+ value: { error, ...state }
338
436
  }, children)));
339
437
  };
340
438
 
341
439
  // src/Checkbox/Checkbox.tsx
342
- var CheckMark = () => /* @__PURE__ */ React11.createElement("svg", {
440
+ var CheckMark = () => /* @__PURE__ */ React13.createElement("svg", {
343
441
  viewBox: "0 0 12 10"
344
- }, /* @__PURE__ */ React11.createElement("path", {
442
+ }, /* @__PURE__ */ React13.createElement("path", {
345
443
  fill: "currentColor",
346
444
  stroke: "none",
347
445
  d: "M11.915 1.548 10.367 0 4.045 6.315 1.557 3.827 0 5.373l4.045 4.046 7.87-7.871Z"
348
446
  }));
349
- var IndeterminateMark = () => /* @__PURE__ */ React11.createElement("svg", {
447
+ var IndeterminateMark = () => /* @__PURE__ */ React13.createElement("svg", {
350
448
  width: "12",
351
449
  height: "3",
352
450
  viewBox: "0 0 12 3"
353
- }, /* @__PURE__ */ React11.createElement("path", {
451
+ }, /* @__PURE__ */ React13.createElement("path", {
354
452
  fill: "currentColor",
355
453
  stroke: "none",
356
454
  d: "M11.5 2.04018H0.5V0.46875H11.5V2.04018Z"
357
455
  }));
358
- var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React11.createElement(Box7, {
456
+ var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React13.createElement(Box9, {
359
457
  "aria-hidden": "true",
360
458
  __baseCSS: {
361
459
  flex: "0 0 16px",
@@ -371,7 +469,7 @@ var Icon = ({ css, checked, indeterminate, ...props }) => /* @__PURE__ */ React1
371
469
  },
372
470
  css,
373
471
  ...props
374
- }, indeterminate ? /* @__PURE__ */ React11.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React11.createElement(CheckMark, null) : null);
472
+ }, indeterminate ? /* @__PURE__ */ React13.createElement(IndeterminateMark, null) : checked ? /* @__PURE__ */ React13.createElement(CheckMark, null) : null);
375
473
  var Checkbox = forwardRef2(
376
474
  ({
377
475
  size,
@@ -417,17 +515,17 @@ var Checkbox = forwardRef2(
417
515
  }),
418
516
  inputRef
419
517
  );
420
- const styles = useComponentStyles7(
518
+ const styles = useComponentStyles8(
421
519
  "Checkbox",
422
520
  {
423
- variant: (groupState == null ? void 0 : groupState.variant) || variant,
424
- size: (groupState == null ? void 0 : groupState.size) || size
521
+ variant,
522
+ size
425
523
  },
426
524
  { parts: ["container", "label", "checkbox"] }
427
525
  );
428
526
  const { hoverProps, isHovered } = useHover2({});
429
527
  const { isFocusVisible, focusProps } = useFocusRing2();
430
- const stateProps = useStateProps2({
528
+ const stateProps = useStateProps3({
431
529
  hover: isHovered,
432
530
  focus: isFocusVisible,
433
531
  checked: inputProps.checked,
@@ -436,7 +534,7 @@ var Checkbox = forwardRef2(
436
534
  readOnly,
437
535
  indeterminate
438
536
  });
439
- return /* @__PURE__ */ React11.createElement(Box7, {
537
+ return /* @__PURE__ */ React13.createElement(Box9, {
440
538
  as: "label",
441
539
  __baseCSS: {
442
540
  display: "flex",
@@ -447,7 +545,7 @@ var Checkbox = forwardRef2(
447
545
  css: styles.container,
448
546
  ...hoverProps,
449
547
  ...stateProps
450
- }, /* @__PURE__ */ React11.createElement(Box7, {
548
+ }, /* @__PURE__ */ React13.createElement(Box9, {
451
549
  as: "input",
452
550
  ref: inputRef,
453
551
  css: {
@@ -462,12 +560,12 @@ var Checkbox = forwardRef2(
462
560
  },
463
561
  ...inputProps,
464
562
  ...focusProps
465
- }), /* @__PURE__ */ React11.createElement(Icon, {
563
+ }), /* @__PURE__ */ React13.createElement(Icon, {
466
564
  checked: inputProps.checked,
467
565
  indeterminate,
468
566
  css: styles.checkbox,
469
567
  ...stateProps
470
- }), props.children && /* @__PURE__ */ React11.createElement(Box7, {
568
+ }), props.children && /* @__PURE__ */ React13.createElement(Box9, {
471
569
  css: styles.label,
472
570
  ...stateProps
473
571
  }, props.children));
@@ -475,7 +573,7 @@ var Checkbox = forwardRef2(
475
573
  );
476
574
 
477
575
  // src/Columns/Columns.tsx
478
- import React12, {
576
+ import React14, {
479
577
  Children,
480
578
  cloneElement,
481
579
  isValidElement
@@ -495,7 +593,7 @@ var Columns = ({
495
593
  )}`
496
594
  );
497
595
  }
498
- return /* @__PURE__ */ React12.createElement(Box, {
596
+ return /* @__PURE__ */ React14.createElement(Box, {
499
597
  css: {
500
598
  display: "flex",
501
599
  flexWrap: "wrap",
@@ -507,7 +605,7 @@ var Columns = ({
507
605
  }
508
606
  },
509
607
  ...props
510
- }, Children.map(children, (child, idx) => /* @__PURE__ */ React12.createElement(Box, {
608
+ }, Children.map(children, (child, idx) => /* @__PURE__ */ React14.createElement(Box, {
511
609
  css: {
512
610
  flexGrow: columns[idx]
513
611
  }
@@ -515,7 +613,7 @@ var Columns = ({
515
613
  };
516
614
 
517
615
  // src/Container/Container.tsx
518
- import React13 from "react";
616
+ import React15 from "react";
519
617
  import { size as tokenSize } from "@marigold/tokens";
520
618
  var ALIGN_ITEMS = {
521
619
  left: "start",
@@ -546,7 +644,7 @@ var Container = ({
546
644
  ...props
547
645
  }) => {
548
646
  const maxWidth = tokenSize[contentType][size];
549
- return /* @__PURE__ */ React13.createElement(Box, {
647
+ return /* @__PURE__ */ React15.createElement(Box, {
550
648
  display: "grid",
551
649
  css: {
552
650
  gridTemplateColumns: ALIGN[align](maxWidth).gridTemplateColumns,
@@ -560,22 +658,22 @@ var Container = ({
560
658
  };
561
659
 
562
660
  // src/Dialog/Dialog.tsx
563
- import React21, { useRef as useRef3 } from "react";
661
+ import React24, { useRef as useRef3 } from "react";
564
662
  import { useButton as useButton2 } from "@react-aria/button";
565
663
  import { useDialog } from "@react-aria/dialog";
566
664
  import {
567
- Box as Box10,
568
- useComponentStyles as useComponentStyles11
665
+ Box as Box13,
666
+ useComponentStyles as useComponentStyles12
569
667
  } from "@marigold/system";
570
668
 
571
669
  // src/Header/Header.tsx
572
- import React14 from "react";
670
+ import React16 from "react";
573
671
  import {
574
- useComponentStyles as useComponentStyles8
672
+ useComponentStyles as useComponentStyles9
575
673
  } from "@marigold/system";
576
674
  var Header = ({ children, variant, size, ...props }) => {
577
- const styles = useComponentStyles8("Header", { variant, size });
578
- return /* @__PURE__ */ React14.createElement(Box, {
675
+ const styles = useComponentStyles9("Header", { variant, size });
676
+ return /* @__PURE__ */ React16.createElement(Box, {
579
677
  as: "header",
580
678
  ...props,
581
679
  css: styles
@@ -583,10 +681,10 @@ var Header = ({ children, variant, size, ...props }) => {
583
681
  };
584
682
 
585
683
  // src/Headline/Headline.tsx
586
- import React15 from "react";
684
+ import React17 from "react";
587
685
  import {
588
- Box as Box8,
589
- useComponentStyles as useComponentStyles9
686
+ Box as Box10,
687
+ useComponentStyles as useComponentStyles10
590
688
  } from "@marigold/system";
591
689
  var Headline = ({
592
690
  children,
@@ -597,11 +695,11 @@ var Headline = ({
597
695
  level = "1",
598
696
  ...props
599
697
  }) => {
600
- const styles = useComponentStyles9("Headline", {
698
+ const styles = useComponentStyles10("Headline", {
601
699
  variant,
602
700
  size: size != null ? size : `level-${level}`
603
701
  });
604
- return /* @__PURE__ */ React15.createElement(Box8, {
702
+ return /* @__PURE__ */ React17.createElement(Box10, {
605
703
  as: `h${level}`,
606
704
  ...props,
607
705
  css: [styles, { color, textAlign: align }]
@@ -614,22 +712,22 @@ var DialogContext = createContext2({});
614
712
  var useDialogContext = () => useContext2(DialogContext);
615
713
 
616
714
  // src/Dialog/DialogTrigger.tsx
617
- import React20, { useRef as useRef2 } from "react";
715
+ import React23, { useRef as useRef2 } from "react";
618
716
  import { PressResponder } from "@react-aria/interactions";
619
717
  import { useOverlayTriggerState } from "@react-stately/overlays";
620
718
 
621
719
  // src/Overlay/Modal.tsx
622
- import React17, { forwardRef as forwardRef3 } from "react";
720
+ import React19, { forwardRef as forwardRef3 } from "react";
623
721
  import { FocusScope } from "@react-aria/focus";
624
722
  import { useModal, useOverlay, usePreventScroll } from "@react-aria/overlays";
625
723
  import { mergeProps as mergeProps2, useObjectRef as useObjectRef3 } from "@react-aria/utils";
626
724
 
627
725
  // src/Overlay/Underlay.tsx
628
- import React16 from "react";
629
- import { Box as Box9, useComponentStyles as useComponentStyles10 } from "@marigold/system";
726
+ import React18 from "react";
727
+ import { Box as Box11, useComponentStyles as useComponentStyles11 } from "@marigold/system";
630
728
  var Underlay = ({ size, variant, ...props }) => {
631
- const styles = useComponentStyles10("Underlay", { size, variant });
632
- return /* @__PURE__ */ React16.createElement(Box9, {
729
+ const styles = useComponentStyles11("Underlay", { size, variant });
730
+ return /* @__PURE__ */ React18.createElement(Box11, {
633
731
  __baseCSS: {
634
732
  position: "fixed",
635
733
  inset: 0,
@@ -655,13 +753,14 @@ var Modal = forwardRef3(
655
753
  );
656
754
  usePreventScroll();
657
755
  const { modalProps } = useModal({});
658
- return /* @__PURE__ */ React17.createElement(FocusScope, {
756
+ return /* @__PURE__ */ React19.createElement(FocusScope, {
659
757
  contain: true,
660
758
  restoreFocus: true,
661
759
  autoFocus: true
662
- }, /* @__PURE__ */ React17.createElement(Underlay, {
663
- ...underlayProps
664
- }), /* @__PURE__ */ React17.createElement("div", {
760
+ }, /* @__PURE__ */ React19.createElement(Underlay, {
761
+ ...underlayProps,
762
+ variant: "modal"
763
+ }), /* @__PURE__ */ React19.createElement("div", {
665
764
  style: {
666
765
  display: "flex",
667
766
  alignItems: "center",
@@ -673,68 +772,163 @@ var Modal = forwardRef3(
673
772
  },
674
773
  ref: modalRef,
675
774
  ...mergeProps2(props, overlayProps, modalProps)
676
- }, /* @__PURE__ */ React17.createElement("div", {
775
+ }, /* @__PURE__ */ React19.createElement("div", {
677
776
  style: { pointerEvents: "auto" }
678
777
  }, children)));
679
778
  }
680
779
  );
681
780
 
682
781
  // src/Overlay/Overlay.tsx
683
- import React18 from "react";
684
- import { OverlayContainer } from "@react-aria/overlays";
685
- var Overlay = ({
686
- children,
687
- open = false,
688
- container,
689
- ...props
690
- }) => {
691
- if (!open) {
782
+ import React20, { useRef } from "react";
783
+ import { Transition } from "react-transition-group";
784
+ import {
785
+ Overlay as ReactAriaOverlay
786
+ } from "@react-aria/overlays";
787
+ var duration = 300;
788
+ var defaultStyle = {
789
+ transition: `opacity ${duration}ms ease-in-out`,
790
+ opacity: 0
791
+ };
792
+ var transitionStyles = {
793
+ entering: { opacity: 1 },
794
+ entered: { opacity: 1 },
795
+ exiting: { opacity: 0 },
796
+ exited: { opacity: 0 },
797
+ unmounted: { opacity: 0 }
798
+ };
799
+ var Overlay = ({ children, container, open }) => {
800
+ const nodeRef = useRef(null);
801
+ let mountOverlay = open;
802
+ if (!mountOverlay) {
692
803
  return null;
693
804
  }
694
- return /* @__PURE__ */ React18.createElement(OverlayContainer, {
805
+ return /* @__PURE__ */ React20.createElement(ReactAriaOverlay, {
695
806
  portalContainer: container
696
- }, /* @__PURE__ */ React18.createElement(Box, {
697
- ...props
698
- }, children));
807
+ }, /* @__PURE__ */ React20.createElement(Transition, {
808
+ nodeRef,
809
+ timeout: duration,
810
+ in: open,
811
+ appear: true
812
+ }, (state) => /* @__PURE__ */ React20.createElement("div", {
813
+ ref: nodeRef,
814
+ "data-testid": "overlay",
815
+ style: {
816
+ ...defaultStyle,
817
+ ...transitionStyles[state]
818
+ }
819
+ }, children)));
699
820
  };
700
821
 
701
822
  // src/Overlay/Popover.tsx
702
- import React19, { forwardRef as forwardRef4, useRef } from "react";
703
- import { useModal as useModal2, useOverlay as useOverlay2 } from "@react-aria/overlays";
704
- import { mergeProps as mergeProps3 } from "@react-aria/utils";
823
+ import React21, { forwardRef as forwardRef4 } from "react";
824
+ import {
825
+ DismissButton,
826
+ usePopover
827
+ } from "@react-aria/overlays";
828
+ import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
829
+ import { FocusScope as FocusScope2 } from "@react-aria/focus";
705
830
  var Popover = forwardRef4(
831
+ (props, ref) => {
832
+ const popoverRef = useObjectRef4(ref);
833
+ let { children, state, ...otherProps } = props;
834
+ return /* @__PURE__ */ React21.createElement(Overlay, {
835
+ open: state.isOpen,
836
+ ...otherProps
837
+ }, /* @__PURE__ */ React21.createElement(PopoverWrapper, {
838
+ ref: popoverRef,
839
+ ...props
840
+ }, children));
841
+ }
842
+ );
843
+ var PopoverWrapper = forwardRef4(
706
844
  ({
707
845
  children,
708
- open,
709
- dismissable,
846
+ isNonModal,
847
+ state,
710
848
  keyboardDismissDisabled,
711
- shouldCloseOnBlur,
712
- minWidth = 0,
713
849
  ...props
714
850
  }, ref) => {
715
- const fallbackRef = useRef(null);
716
- const popoverRef = ref || fallbackRef;
717
- const { overlayProps } = useOverlay2(
851
+ const { popoverProps, underlayProps } = usePopover(
718
852
  {
719
- isOpen: open,
720
- isDismissable: dismissable,
853
+ ...props,
854
+ isNonModal,
721
855
  isKeyboardDismissDisabled: keyboardDismissDisabled,
722
- shouldCloseOnBlur,
723
- ...props
856
+ popoverRef: ref,
857
+ placement: "bottom left"
724
858
  },
725
- popoverRef
859
+ state
726
860
  );
727
- const { modalProps } = useModal2({});
728
- const style = { minWidth };
729
- return /* @__PURE__ */ React19.createElement(Overlay, {
730
- open
731
- }, /* @__PURE__ */ React19.createElement(Box, {
732
- ref: popoverRef,
733
- role: "presentation",
734
- ...mergeProps3(props, overlayProps, modalProps, style)
861
+ return /* @__PURE__ */ React21.createElement(FocusScope2, {
862
+ restoreFocus: true
863
+ }, !isNonModal && /* @__PURE__ */ React21.createElement(Underlay, {
864
+ ...underlayProps
865
+ }), /* @__PURE__ */ React21.createElement("div", {
866
+ ...popoverProps,
867
+ style: {
868
+ ...popoverProps.style,
869
+ minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
870
+ },
871
+ ref,
872
+ role: "presentation"
873
+ }, !isNonModal && /* @__PURE__ */ React21.createElement(DismissButton, {
874
+ onDismiss: state.close
875
+ }), children, /* @__PURE__ */ React21.createElement(DismissButton, {
876
+ onDismiss: state.close
877
+ })));
878
+ }
879
+ );
880
+
881
+ // src/Overlay/Tray.tsx
882
+ import React22 from "react";
883
+ import { Box as Box12 } from "@marigold/system";
884
+ import { FocusScope as FocusScope3 } from "@react-aria/focus";
885
+ import {
886
+ DismissButton as DismissButton2,
887
+ useModalOverlay
888
+ } from "@react-aria/overlays";
889
+ import { useObjectRef as useObjectRef5 } from "@react-aria/utils";
890
+ import { forwardRef as forwardRef5 } from "react";
891
+ var Tray = forwardRef5(
892
+ ({ state, children, ...props }, ref) => {
893
+ const trayRef = useObjectRef5(ref);
894
+ return /* @__PURE__ */ React22.createElement(Overlay, {
895
+ open: state.isOpen
896
+ }, /* @__PURE__ */ React22.createElement(TrayWrapper, {
897
+ state,
898
+ ...props,
899
+ ref: trayRef
735
900
  }, children));
736
901
  }
737
902
  );
903
+ var TrayWrapper = forwardRef5(
904
+ ({ children, state, ...props }, ref) => {
905
+ let { modalProps, underlayProps } = useModalOverlay(
906
+ {
907
+ ...props,
908
+ isDismissable: true
909
+ },
910
+ state,
911
+ ref
912
+ );
913
+ return /* @__PURE__ */ React22.createElement(FocusScope3, {
914
+ contain: true,
915
+ restoreFocus: true,
916
+ autoFocus: true
917
+ }, /* @__PURE__ */ React22.createElement(Underlay, {
918
+ ...underlayProps,
919
+ variant: "modal"
920
+ }, /* @__PURE__ */ React22.createElement(Box12, {
921
+ ...modalProps,
922
+ ref,
923
+ __baseCSS: { position: "absolute", width: "100%", bottom: 0 },
924
+ "data-testid": "tray"
925
+ }, /* @__PURE__ */ React22.createElement(DismissButton2, {
926
+ onDismiss: state.close
927
+ }), children, /* @__PURE__ */ React22.createElement(DismissButton2, {
928
+ onDismiss: state.close
929
+ }))));
930
+ }
931
+ );
738
932
 
739
933
  // src/Dialog/DialogTrigger.tsx
740
934
  var DialogTrigger = ({
@@ -742,19 +936,19 @@ var DialogTrigger = ({
742
936
  dismissable = true,
743
937
  keyboardDismissable = true
744
938
  }) => {
745
- const [dialogTrigger, dialog] = React20.Children.toArray(children);
939
+ const [dialogTrigger, dialog] = React23.Children.toArray(children);
746
940
  const dialogTriggerRef = useRef2(null);
747
941
  const state = useOverlayTriggerState({});
748
942
  const ctx = { open: state.isOpen, close: state.close };
749
- return /* @__PURE__ */ React20.createElement(DialogContext.Provider, {
943
+ return /* @__PURE__ */ React23.createElement(DialogContext.Provider, {
750
944
  value: ctx
751
- }, /* @__PURE__ */ React20.createElement(PressResponder, {
945
+ }, /* @__PURE__ */ React23.createElement(PressResponder, {
752
946
  ref: dialogTriggerRef,
753
947
  isPressed: state.isOpen,
754
948
  onPress: state.toggle
755
- }, dialogTrigger), /* @__PURE__ */ React20.createElement(Overlay, {
949
+ }, dialogTrigger), /* @__PURE__ */ React23.createElement(Overlay, {
756
950
  open: state.isOpen
757
- }, /* @__PURE__ */ React20.createElement(Modal, {
951
+ }, /* @__PURE__ */ React23.createElement(Modal, {
758
952
  open: state.isOpen,
759
953
  onClose: state.close,
760
954
  dismissable,
@@ -772,9 +966,9 @@ var CloseButton = ({ css }) => {
772
966
  },
773
967
  ref
774
968
  );
775
- return /* @__PURE__ */ React21.createElement(Box10, {
969
+ return /* @__PURE__ */ React24.createElement(Box13, {
776
970
  css: { display: "flex", justifyContent: "flex-end" }
777
- }, /* @__PURE__ */ React21.createElement(Box10, {
971
+ }, /* @__PURE__ */ React24.createElement(Box13, {
778
972
  as: "button",
779
973
  __baseCSS: {
780
974
  outline: "none",
@@ -788,19 +982,19 @@ var CloseButton = ({ css }) => {
788
982
  css,
789
983
  ref,
790
984
  ...buttonProps
791
- }, /* @__PURE__ */ React21.createElement("svg", {
985
+ }, /* @__PURE__ */ React24.createElement("svg", {
792
986
  viewBox: "0 0 20 20",
793
987
  fill: "currentColor"
794
- }, /* @__PURE__ */ React21.createElement("path", {
988
+ }, /* @__PURE__ */ React24.createElement("path", {
795
989
  fillRule: "evenodd",
796
990
  clipRule: "evenodd",
797
991
  d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
798
992
  }))));
799
993
  };
800
994
  var addTitleProps = (children, titleProps) => {
801
- const childs = React21.Children.toArray(children);
995
+ const childs = React24.Children.toArray(children);
802
996
  const titleIndex = childs.findIndex(
803
- (child) => React21.isValidElement(child) && (child.type === Header || child.type === Headline)
997
+ (child) => React24.isValidElement(child) && (child.type === Header || child.type === Headline)
804
998
  );
805
999
  if (titleIndex < 0) {
806
1000
  console.warn(
@@ -808,7 +1002,7 @@ var addTitleProps = (children, titleProps) => {
808
1002
  );
809
1003
  return children;
810
1004
  }
811
- const titleChild = React21.cloneElement(
1005
+ const titleChild = React24.cloneElement(
812
1006
  childs[titleIndex],
813
1007
  titleProps
814
1008
  );
@@ -825,29 +1019,29 @@ var Dialog = ({
825
1019
  const ref = useRef3(null);
826
1020
  const { close } = useDialogContext();
827
1021
  const { dialogProps, titleProps } = useDialog(props, ref);
828
- const styles = useComponentStyles11(
1022
+ const styles = useComponentStyles12(
829
1023
  "Dialog",
830
1024
  { variant, size },
831
1025
  { parts: ["container", "closeButton"] }
832
1026
  );
833
- return /* @__PURE__ */ React21.createElement(Box10, {
1027
+ return /* @__PURE__ */ React24.createElement(Box13, {
834
1028
  __baseCSS: { bg: "#fff" },
835
1029
  css: styles.container,
836
1030
  ...dialogProps
837
- }, closeButton && /* @__PURE__ */ React21.createElement(CloseButton, {
1031
+ }, closeButton && /* @__PURE__ */ React24.createElement(CloseButton, {
838
1032
  css: styles.closeButton
839
1033
  }), typeof children === "function" ? children({ close, titleProps }) : props["aria-labelledby"] ? children : addTitleProps(children, titleProps));
840
1034
  };
841
1035
  Dialog.Trigger = DialogTrigger;
842
1036
 
843
1037
  // src/Divider/Divider.tsx
844
- import React22 from "react";
1038
+ import React25 from "react";
845
1039
  import { useSeparator } from "@react-aria/separator";
846
- import { Box as Box11, useComponentStyles as useComponentStyles12 } from "@marigold/system";
1040
+ import { Box as Box14, useComponentStyles as useComponentStyles13 } from "@marigold/system";
847
1041
  var Divider = ({ variant, ...props }) => {
848
1042
  const { separatorProps } = useSeparator(props);
849
- const styles = useComponentStyles12("Divider", { variant });
850
- return /* @__PURE__ */ React22.createElement(Box11, {
1043
+ const styles = useComponentStyles13("Divider", { variant });
1044
+ return /* @__PURE__ */ React25.createElement(Box14, {
851
1045
  css: styles,
852
1046
  ...props,
853
1047
  ...separatorProps
@@ -855,13 +1049,13 @@ var Divider = ({ variant, ...props }) => {
855
1049
  };
856
1050
 
857
1051
  // src/Footer/Footer.tsx
858
- import React23 from "react";
1052
+ import React26 from "react";
859
1053
  import {
860
- useComponentStyles as useComponentStyles13
1054
+ useComponentStyles as useComponentStyles14
861
1055
  } from "@marigold/system";
862
1056
  var Footer = ({ children, variant, size, ...props }) => {
863
- const styles = useComponentStyles13("Footer", { variant, size });
864
- return /* @__PURE__ */ React23.createElement(Box, {
1057
+ const styles = useComponentStyles14("Footer", { variant, size });
1058
+ return /* @__PURE__ */ React26.createElement(Box, {
865
1059
  as: "footer",
866
1060
  ...props,
867
1061
  css: styles
@@ -869,9 +1063,9 @@ var Footer = ({ children, variant, size, ...props }) => {
869
1063
  };
870
1064
 
871
1065
  // src/Image/Image.tsx
872
- import React24 from "react";
873
- import { Box as Box12 } from "@marigold/system";
874
- import { useComponentStyles as useComponentStyles14 } from "@marigold/system";
1066
+ import React27 from "react";
1067
+ import { Box as Box15 } from "@marigold/system";
1068
+ import { useComponentStyles as useComponentStyles15 } from "@marigold/system";
875
1069
  var Image = ({
876
1070
  variant,
877
1071
  size,
@@ -879,13 +1073,13 @@ var Image = ({
879
1073
  position,
880
1074
  ...props
881
1075
  }) => {
882
- const styles = useComponentStyles14("Image", { variant, size });
1076
+ const styles = useComponentStyles15("Image", { variant, size });
883
1077
  const css = {
884
1078
  ...styles,
885
1079
  objectFit: fit,
886
1080
  objectPosition: position
887
1081
  };
888
- return /* @__PURE__ */ React24.createElement(Box12, {
1082
+ return /* @__PURE__ */ React27.createElement(Box15, {
889
1083
  ...props,
890
1084
  as: "img",
891
1085
  __baseCSS: fit ? { width: " 100%", height: "100%" } : {},
@@ -894,7 +1088,7 @@ var Image = ({
894
1088
  };
895
1089
 
896
1090
  // src/Inline/Inline.tsx
897
- import React25 from "react";
1091
+ import React28 from "react";
898
1092
  var ALIGNMENT_X = {
899
1093
  left: "flex-start",
900
1094
  center: "center",
@@ -911,7 +1105,7 @@ var Inline = ({
911
1105
  alignY = "center",
912
1106
  children,
913
1107
  ...props
914
- }) => /* @__PURE__ */ React25.createElement(Box, {
1108
+ }) => /* @__PURE__ */ React28.createElement(Box, {
915
1109
  css: {
916
1110
  display: "flex",
917
1111
  flexWrap: "wrap",
@@ -923,12 +1117,12 @@ var Inline = ({
923
1117
  }, children);
924
1118
 
925
1119
  // src/Input/Input.tsx
926
- import React26, { forwardRef as forwardRef5 } from "react";
927
- import { Box as Box13, useComponentStyles as useComponentStyles15 } from "@marigold/system";
928
- var Input = forwardRef5(
1120
+ import React29, { forwardRef as forwardRef6 } from "react";
1121
+ import { Box as Box16, useComponentStyles as useComponentStyles16 } from "@marigold/system";
1122
+ var Input = forwardRef6(
929
1123
  ({ variant, size, type = "text", ...props }, ref) => {
930
- const styles = useComponentStyles15("Input", { variant, size });
931
- return /* @__PURE__ */ React26.createElement(Box13, {
1124
+ const styles = useComponentStyles16("Input", { variant, size });
1125
+ return /* @__PURE__ */ React29.createElement(Box16, {
932
1126
  ...props,
933
1127
  ref,
934
1128
  as: "input",
@@ -939,11 +1133,11 @@ var Input = forwardRef5(
939
1133
  );
940
1134
 
941
1135
  // src/Link/Link.tsx
942
- import React27, { forwardRef as forwardRef6 } from "react";
1136
+ import React30, { forwardRef as forwardRef7 } from "react";
943
1137
  import { useLink } from "@react-aria/link";
944
- import { useComponentStyles as useComponentStyles16 } from "@marigold/system";
945
- import { useObjectRef as useObjectRef4 } from "@react-aria/utils";
946
- var Link = forwardRef6(
1138
+ import { useComponentStyles as useComponentStyles17 } from "@marigold/system";
1139
+ import { useObjectRef as useObjectRef6 } from "@react-aria/utils";
1140
+ var Link = forwardRef7(
947
1141
  ({
948
1142
  as = "a",
949
1143
  variant,
@@ -954,7 +1148,7 @@ var Link = forwardRef6(
954
1148
  onPressStart,
955
1149
  ...props
956
1150
  }, ref) => {
957
- const linkRef = useObjectRef4(ref);
1151
+ const linkRef = useObjectRef6(ref);
958
1152
  const { linkProps } = useLink(
959
1153
  {
960
1154
  ...props,
@@ -963,8 +1157,8 @@ var Link = forwardRef6(
963
1157
  },
964
1158
  linkRef
965
1159
  );
966
- const styles = useComponentStyles16("Link", { variant, size });
967
- return /* @__PURE__ */ React27.createElement(React27.Fragment, null, " ", /* @__PURE__ */ React27.createElement(Box, {
1160
+ const styles = useComponentStyles17("Link", { variant, size });
1161
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, " ", /* @__PURE__ */ React30.createElement(Box, {
968
1162
  as,
969
1163
  role: "link",
970
1164
  css: styles,
@@ -976,10 +1170,10 @@ var Link = forwardRef6(
976
1170
  );
977
1171
 
978
1172
  // src/List/List.tsx
979
- import React29 from "react";
1173
+ import React32 from "react";
980
1174
  import {
981
- Box as Box15,
982
- useComponentStyles as useComponentStyles17
1175
+ Box as Box18,
1176
+ useComponentStyles as useComponentStyles18
983
1177
  } from "@marigold/system";
984
1178
 
985
1179
  // src/List/Context.ts
@@ -988,11 +1182,11 @@ var ListContext = createContext3({});
988
1182
  var useListContext = () => useContext3(ListContext);
989
1183
 
990
1184
  // src/List/ListItem.tsx
991
- import React28 from "react";
992
- import { Box as Box14 } from "@marigold/system";
1185
+ import React31 from "react";
1186
+ import { Box as Box17 } from "@marigold/system";
993
1187
  var ListItem = ({ children, ...props }) => {
994
1188
  const { styles } = useListContext();
995
- return /* @__PURE__ */ React28.createElement(Box14, {
1189
+ return /* @__PURE__ */ React31.createElement(Box17, {
996
1190
  ...props,
997
1191
  as: "li",
998
1192
  css: styles
@@ -1007,89 +1201,85 @@ var List = ({
1007
1201
  size,
1008
1202
  ...props
1009
1203
  }) => {
1010
- const styles = useComponentStyles17(
1204
+ const styles = useComponentStyles18(
1011
1205
  "List",
1012
1206
  { variant, size },
1013
1207
  { parts: ["ul", "ol", "item"] }
1014
1208
  );
1015
- return /* @__PURE__ */ React29.createElement(Box15, {
1209
+ return /* @__PURE__ */ React32.createElement(Box18, {
1016
1210
  ...props,
1017
1211
  as,
1018
1212
  css: styles[as]
1019
- }, /* @__PURE__ */ React29.createElement(ListContext.Provider, {
1213
+ }, /* @__PURE__ */ React32.createElement(ListContext.Provider, {
1020
1214
  value: { styles: styles.item }
1021
1215
  }, children));
1022
1216
  };
1023
1217
  List.Item = ListItem;
1024
1218
 
1025
1219
  // src/Menu/Menu.tsx
1026
- import React32, { useRef as useRef6 } from "react";
1027
- import { FocusScope as FocusScope2 } from "@react-aria/focus";
1220
+ import React35, { useRef as useRef6 } from "react";
1028
1221
  import { useMenu } from "@react-aria/menu";
1029
- import { DismissButton } from "@react-aria/overlays";
1030
1222
  import { Item } from "@react-stately/collections";
1031
1223
  import { useTreeState } from "@react-stately/tree";
1032
1224
  import {
1033
- Box as Box17,
1034
- useComponentStyles as useComponentStyles18
1225
+ Box as Box20,
1226
+ useComponentStyles as useComponentStyles19
1035
1227
  } from "@marigold/system";
1036
1228
 
1037
1229
  // src/Menu/Context.ts
1038
- import { createContext as createContext4, useContext as useContext4 } from "react";
1230
+ import {
1231
+ createContext as createContext4,
1232
+ useContext as useContext4
1233
+ } from "react";
1039
1234
  var MenuContext = createContext4({});
1040
1235
  var useMenuContext = () => useContext4(MenuContext);
1041
1236
 
1042
1237
  // src/Menu/MenuTrigger.tsx
1043
- import React30, { useRef as useRef4 } from "react";
1238
+ import React33, { useRef as useRef4 } from "react";
1044
1239
  import { useMenuTriggerState } from "@react-stately/menu";
1045
- import { useMenuTrigger } from "@react-aria/menu";
1046
- import { useOverlayPosition } from "@react-aria/overlays";
1047
1240
  import { PressResponder as PressResponder2 } from "@react-aria/interactions";
1241
+ import { useMenuTrigger } from "@react-aria/menu";
1242
+ import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
1243
+ import { useResponsiveValue } from "@marigold/system";
1048
1244
  var MenuTrigger = ({ disabled, children }) => {
1049
- const [menuTrigger, menu] = React30.Children.toArray(children);
1245
+ const [menuTrigger, menu] = React33.Children.toArray(children);
1050
1246
  const menuTriggerRef = useRef4(null);
1051
- const overlayRef = useRef4(null);
1247
+ const menuRef = useObjectRef7();
1052
1248
  const state = useMenuTriggerState({});
1053
1249
  const { menuTriggerProps, menuProps } = useMenuTrigger(
1054
1250
  { trigger: "press", isDisabled: disabled },
1055
1251
  state,
1056
1252
  menuTriggerRef
1057
1253
  );
1058
- const { overlayProps: positionProps } = useOverlayPosition({
1059
- targetRef: menuTriggerRef,
1060
- overlayRef,
1061
- isOpen: state.isOpen,
1062
- placement: "bottom left"
1063
- });
1064
1254
  const menuContext = {
1065
1255
  ...menuProps,
1256
+ ref: menuRef,
1066
1257
  open: state.isOpen,
1067
1258
  onClose: state.close,
1068
1259
  autoFocus: state.focusStrategy
1069
1260
  };
1070
- return /* @__PURE__ */ React30.createElement(MenuContext.Provider, {
1261
+ const isSmallScreen = useResponsiveValue([true, false, false], 2);
1262
+ return /* @__PURE__ */ React33.createElement(MenuContext.Provider, {
1071
1263
  value: menuContext
1072
- }, /* @__PURE__ */ React30.createElement(PressResponder2, {
1264
+ }, /* @__PURE__ */ React33.createElement(PressResponder2, {
1073
1265
  ...menuTriggerProps,
1074
1266
  ref: menuTriggerRef,
1075
1267
  isPressed: state.isOpen
1076
- }, menuTrigger), /* @__PURE__ */ React30.createElement(Popover, {
1077
- open: state.isOpen,
1078
- onClose: state.close,
1079
- dismissable: true,
1080
- shouldCloseOnBlur: true,
1081
- ref: overlayRef,
1082
- minWidth: menuTriggerRef.current ? menuTriggerRef.current.offsetWidth : void 0,
1083
- ...positionProps
1268
+ }, menuTrigger), isSmallScreen ? /* @__PURE__ */ React33.createElement(Tray, {
1269
+ state
1270
+ }, menu) : /* @__PURE__ */ React33.createElement(Popover, {
1271
+ triggerRef: menuTriggerRef,
1272
+ scrollRef: menuRef,
1273
+ state
1084
1274
  }, menu));
1085
1275
  };
1086
1276
 
1087
1277
  // src/Menu/MenuItem.tsx
1088
- import React31, { useRef as useRef5 } from "react";
1278
+ import React34, { useRef as useRef5 } from "react";
1089
1279
  import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
1090
1280
  import { useMenuItem } from "@react-aria/menu";
1091
- import { mergeProps as mergeProps4 } from "@react-aria/utils";
1092
- import { Box as Box16, useStateProps as useStateProps3 } from "@marigold/system";
1281
+ import { mergeProps as mergeProps3 } from "@react-aria/utils";
1282
+ import { Box as Box19, useStateProps as useStateProps4 } from "@marigold/system";
1093
1283
  var MenuItem = ({ item, state, onAction, css }) => {
1094
1284
  const ref = useRef5(null);
1095
1285
  const { onClose } = useMenuContext();
@@ -1103,10 +1293,10 @@ var MenuItem = ({ item, state, onAction, css }) => {
1103
1293
  ref
1104
1294
  );
1105
1295
  const { isFocusVisible, focusProps } = useFocusRing3();
1106
- const stateProps = useStateProps3({
1296
+ const stateProps = useStateProps4({
1107
1297
  focus: isFocusVisible
1108
1298
  });
1109
- return /* @__PURE__ */ React31.createElement(Box16, {
1299
+ return /* @__PURE__ */ React34.createElement(Box19, {
1110
1300
  as: "li",
1111
1301
  ref,
1112
1302
  __baseCSS: {
@@ -1115,28 +1305,26 @@ var MenuItem = ({ item, state, onAction, css }) => {
1115
1305
  }
1116
1306
  },
1117
1307
  css,
1118
- ...mergeProps4(menuItemProps, focusProps),
1308
+ ...mergeProps3(menuItemProps, focusProps),
1119
1309
  ...stateProps
1120
1310
  }, item.rendered);
1121
1311
  };
1122
1312
 
1123
1313
  // src/Menu/Menu.tsx
1314
+ import { useSyncRef } from "@react-aria/utils";
1124
1315
  var Menu = ({ variant, size, ...props }) => {
1125
- const menuContext = useMenuContext();
1316
+ const { ref: scrollRef, ...menuContext } = useMenuContext();
1126
1317
  const ownProps = { ...props, ...menuContext };
1127
1318
  const ref = useRef6(null);
1128
1319
  const state = useTreeState({ ...ownProps, selectionMode: "none" });
1129
1320
  const { menuProps } = useMenu(ownProps, state, ref);
1130
- const styles = useComponentStyles18(
1321
+ useSyncRef({ ref: scrollRef }, ref);
1322
+ const styles = useComponentStyles19(
1131
1323
  "Menu",
1132
1324
  { variant, size },
1133
1325
  { parts: ["container", "item"] }
1134
1326
  );
1135
- return /* @__PURE__ */ React32.createElement(FocusScope2, {
1136
- restoreFocus: true
1137
- }, /* @__PURE__ */ React32.createElement("div", null, /* @__PURE__ */ React32.createElement(DismissButton, {
1138
- onDismiss: ownProps.onClose
1139
- }), /* @__PURE__ */ React32.createElement(Box17, {
1327
+ return /* @__PURE__ */ React35.createElement(Box20, {
1140
1328
  as: "ul",
1141
1329
  ref,
1142
1330
  __baseCSS: {
@@ -1146,23 +1334,20 @@ var Menu = ({ variant, size, ...props }) => {
1146
1334
  },
1147
1335
  css: styles.container,
1148
1336
  ...menuProps
1149
- }, [...state.collection].map((item) => /* @__PURE__ */ React32.createElement(MenuItem, {
1337
+ }, [...state.collection].map((item) => /* @__PURE__ */ React35.createElement(MenuItem, {
1150
1338
  key: item.key,
1151
1339
  item,
1152
1340
  state,
1153
1341
  onAction: props.onSelect,
1154
1342
  css: styles.item
1155
- }))), /* @__PURE__ */ React32.createElement(DismissButton, {
1156
- onDismiss: ownProps.onClose
1157
1343
  })));
1158
1344
  };
1159
1345
  Menu.Trigger = MenuTrigger;
1160
1346
  Menu.Item = Item;
1161
1347
 
1162
1348
  // src/Message/Message.tsx
1163
- import React33 from "react";
1164
- import { Exclamation, Info, Notification } from "@marigold/icons";
1165
- import { useComponentStyles as useComponentStyles19 } from "@marigold/system";
1349
+ import React36 from "react";
1350
+ import { useComponentStyles as useComponentStyles20 } from "@marigold/system";
1166
1351
  var Message = ({
1167
1352
  messageTitle,
1168
1353
  variant = "info",
@@ -1170,7 +1355,7 @@ var Message = ({
1170
1355
  children,
1171
1356
  ...props
1172
1357
  }) => {
1173
- const styles = useComponentStyles19(
1358
+ const styles = useComponentStyles20(
1174
1359
  "Message",
1175
1360
  {
1176
1361
  variant,
@@ -1178,151 +1363,77 @@ var Message = ({
1178
1363
  },
1179
1364
  { parts: ["container", "icon", "title", "content"] }
1180
1365
  );
1181
- var icon = /* @__PURE__ */ React33.createElement(Info, null);
1366
+ var icon = /* @__PURE__ */ React36.createElement("svg", {
1367
+ viewBox: "0 0 24 24"
1368
+ }, /* @__PURE__ */ React36.createElement("path", {
1369
+ d: "M12 2.85938C6.95437 2.85938 2.85938 6.95437 2.85938 12C2.85938 17.0456 6.95437 21.1406 12 21.1406C17.0456 21.1406 21.1406 17.0456 21.1406 12C21.1406 6.95437 17.0456 2.85938 12 2.85938ZM12.7875 15.9374H11.2125V11.2124H12.7875V15.9374ZM12.7875 9.6375H11.2125V8.0625H12.7875V9.6375Z"
1370
+ }));
1182
1371
  if (variant === "warning") {
1183
- icon = /* @__PURE__ */ React33.createElement(Notification, null);
1372
+ icon = /* @__PURE__ */ React36.createElement("svg", {
1373
+ viewBox: "0 0 24 24"
1374
+ }, /* @__PURE__ */ React36.createElement("path", {
1375
+ d: "M19.2 3H4.8C3.81 3 3.009 3.81 3.009 4.8L3 21L6.6 17.4H19.2C20.19 17.4 21 16.59 21 15.6V4.8C21 3.81 20.19 3 19.2 3ZM12.9 13.8H11.1V12H12.9V13.8ZM12.9 10.2001H11.1V6.60008H12.9V10.2001Z"
1376
+ }));
1184
1377
  }
1185
1378
  if (variant === "error") {
1186
- icon = /* @__PURE__ */ React33.createElement(Exclamation, null);
1379
+ icon = /* @__PURE__ */ React36.createElement("svg", {
1380
+ viewBox: "0 0 24 24"
1381
+ }, /* @__PURE__ */ React36.createElement("path", {
1382
+ d: "M2.25 20.3097H21.75L12 3.46875L2.25 20.3097ZM12.8864 17.2606H11.1136V15.4879H12.8864V17.2606ZM12.8864 13.7151H11.1136V10.1697H12.8864V13.7151Z"
1383
+ }));
1187
1384
  }
1188
- return /* @__PURE__ */ React33.createElement(Box, {
1385
+ return /* @__PURE__ */ React36.createElement(Box, {
1189
1386
  css: styles.container,
1190
1387
  ...props
1191
- }, /* @__PURE__ */ React33.createElement(Box, {
1388
+ }, /* @__PURE__ */ React36.createElement(Box, {
1192
1389
  __baseCSS: { display: "flex", alignItems: "top", gap: 4 }
1193
- }, /* @__PURE__ */ React33.createElement(Box, {
1390
+ }, /* @__PURE__ */ React36.createElement(Box, {
1194
1391
  role: "presentation",
1195
1392
  __baseCSS: { flex: "0 0 16px" },
1196
1393
  css: styles.icon
1197
- }, icon), /* @__PURE__ */ React33.createElement(Box, {
1394
+ }, icon), /* @__PURE__ */ React36.createElement(Box, {
1198
1395
  css: styles.title
1199
- }, messageTitle)), /* @__PURE__ */ React33.createElement(Box, {
1396
+ }, messageTitle)), /* @__PURE__ */ React36.createElement(Box, {
1200
1397
  css: styles.content
1201
1398
  }, children));
1202
1399
  };
1203
1400
 
1204
1401
  // src/NumberField/NumberField.tsx
1205
- import React37, { forwardRef as forwardRef7 } from "react";
1402
+ import React38, { forwardRef as forwardRef8 } from "react";
1206
1403
  import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
1207
1404
  import { useHover as useHover4 } from "@react-aria/interactions";
1208
1405
  import { useLocale } from "@react-aria/i18n";
1209
1406
  import { useNumberField } from "@react-aria/numberfield";
1210
- import { mergeProps as mergeProps6, useObjectRef as useObjectRef5 } from "@react-aria/utils";
1407
+ import { mergeProps as mergeProps5, useObjectRef as useObjectRef8 } from "@react-aria/utils";
1211
1408
  import { useNumberFieldState } from "@react-stately/numberfield";
1212
1409
  import {
1213
- Box as Box21,
1214
- useComponentStyles as useComponentStyles22,
1215
- useStateProps as useStateProps5
1216
- } from "@marigold/system";
1217
-
1218
- // src/FieldBase/FieldBase.tsx
1219
- import React35 from "react";
1220
- import {
1221
- Box as Box19,
1222
- useComponentStyles as useComponentStyles21
1223
- } from "@marigold/system";
1224
-
1225
- // src/HelpText/HelpText.tsx
1226
- import React34 from "react";
1227
- import { Exclamation as Exclamation2 } from "@marigold/icons";
1228
- import {
1229
- Box as Box18,
1230
- useComponentStyles as useComponentStyles20
1410
+ Box as Box22,
1411
+ useComponentStyles as useComponentStyles21,
1412
+ useStateProps as useStateProps6
1231
1413
  } from "@marigold/system";
1232
- var HelpText = ({
1233
- variant,
1234
- size,
1235
- disabled,
1236
- description,
1237
- descriptionProps,
1238
- error,
1239
- errorMessage,
1240
- errorMessageProps,
1241
- ...props
1242
- }) => {
1243
- var _a;
1244
- const hasErrorMessage = errorMessage && error;
1245
- const styles = useComponentStyles20(
1246
- "HelpText",
1247
- { variant, size },
1248
- { parts: ["container", "icon"] }
1249
- );
1250
- return /* @__PURE__ */ React34.createElement(Box18, {
1251
- ...hasErrorMessage ? errorMessageProps : descriptionProps,
1252
- ...props,
1253
- __baseCSS: { display: "flex", alignItems: "center", gap: 4 },
1254
- css: styles.container
1255
- }, hasErrorMessage ? /* @__PURE__ */ React34.createElement(React34.Fragment, null, /* @__PURE__ */ React34.createElement(Exclamation2, {
1256
- role: "presentation",
1257
- size: ((_a = styles == null ? void 0 : styles.icon) == null ? void 0 : _a.size) || 16
1258
- }), errorMessage) : /* @__PURE__ */ React34.createElement(React34.Fragment, null, description));
1259
- };
1260
-
1261
- // src/FieldBase/FieldBase.tsx
1262
- var FieldBase = ({
1263
- children,
1264
- variant,
1265
- size,
1266
- width = "100%",
1267
- disabled,
1268
- required,
1269
- label,
1270
- labelProps,
1271
- description,
1272
- descriptionProps,
1273
- error,
1274
- errorMessage,
1275
- errorMessageProps,
1276
- stateProps
1277
- }) => {
1278
- const hasHelpText = !!description || errorMessage && error;
1279
- const style = useComponentStyles21("Field", { variant, size });
1280
- return /* @__PURE__ */ React35.createElement(Box19, {
1281
- __baseCSS: { display: "flex", flexDirection: "column", width },
1282
- css: style
1283
- }, label && /* @__PURE__ */ React35.createElement(Label, {
1284
- required,
1285
- variant,
1286
- size,
1287
- ...labelProps,
1288
- ...stateProps
1289
- }, label), /* @__PURE__ */ React35.createElement(Box19, {
1290
- __baseCSS: { display: "flex", flexDirection: "column" }
1291
- }, children, hasHelpText && /* @__PURE__ */ React35.createElement(HelpText, {
1292
- ...stateProps,
1293
- variant,
1294
- size,
1295
- disabled,
1296
- description,
1297
- descriptionProps,
1298
- error,
1299
- errorMessage,
1300
- errorMessageProps
1301
- })));
1302
- };
1303
1414
 
1304
1415
  // src/NumberField/StepButton.tsx
1305
- import React36, { useRef as useRef7 } from "react";
1416
+ import React37, { useRef as useRef7 } from "react";
1306
1417
  import { useButton as useButton3 } from "@react-aria/button";
1307
1418
  import { useHover as useHover3 } from "@react-aria/interactions";
1308
- import { mergeProps as mergeProps5 } from "@react-aria/utils";
1309
- import { Box as Box20, useStateProps as useStateProps4 } from "@marigold/system";
1310
- var Plus = () => /* @__PURE__ */ React36.createElement(Box20, {
1419
+ import { mergeProps as mergeProps4 } from "@react-aria/utils";
1420
+ import { Box as Box21, useStateProps as useStateProps5 } from "@marigold/system";
1421
+ var Plus = () => /* @__PURE__ */ React37.createElement(Box21, {
1311
1422
  as: "svg",
1312
1423
  __baseCSS: { width: 16, height: 16 },
1313
1424
  viewBox: "0 0 20 20",
1314
1425
  fill: "currentColor"
1315
- }, /* @__PURE__ */ React36.createElement("path", {
1426
+ }, /* @__PURE__ */ React37.createElement("path", {
1316
1427
  fillRule: "evenodd",
1317
1428
  clipRule: "evenodd",
1318
1429
  d: "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"
1319
1430
  }));
1320
- var Minus = () => /* @__PURE__ */ React36.createElement(Box20, {
1431
+ var Minus = () => /* @__PURE__ */ React37.createElement(Box21, {
1321
1432
  as: "svg",
1322
1433
  __baseCSS: { width: 16, height: 16 },
1323
1434
  viewBox: "0 0 20 20",
1324
1435
  fill: "currentColor"
1325
- }, /* @__PURE__ */ React36.createElement("path", {
1436
+ }, /* @__PURE__ */ React37.createElement("path", {
1326
1437
  fillRule: "evenodd",
1327
1438
  clipRule: "evenodd",
1328
1439
  d: "M3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
@@ -1334,13 +1445,13 @@ var StepButton = ({ direction, css, ...props }) => {
1334
1445
  ref
1335
1446
  );
1336
1447
  const { hoverProps, isHovered } = useHover3(props);
1337
- const stateProps = useStateProps4({
1448
+ const stateProps = useStateProps5({
1338
1449
  active: isPressed,
1339
1450
  hover: isHovered,
1340
1451
  disabled: props.isDisabled
1341
1452
  });
1342
1453
  const Icon3 = direction === "up" ? Plus : Minus;
1343
- return /* @__PURE__ */ React36.createElement(Box20, {
1454
+ return /* @__PURE__ */ React37.createElement(Box21, {
1344
1455
  __baseCSS: {
1345
1456
  display: "flex",
1346
1457
  alignItems: "center",
@@ -1348,13 +1459,13 @@ var StepButton = ({ direction, css, ...props }) => {
1348
1459
  cursor: props.isDisabled ? "not-allowed" : "pointer"
1349
1460
  },
1350
1461
  css,
1351
- ...mergeProps5(buttonProps, hoverProps),
1462
+ ...mergeProps4(buttonProps, hoverProps),
1352
1463
  ...stateProps
1353
- }, /* @__PURE__ */ React36.createElement(Icon3, null));
1464
+ }, /* @__PURE__ */ React37.createElement(Icon3, null));
1354
1465
  };
1355
1466
 
1356
1467
  // src/NumberField/NumberField.tsx
1357
- var NumberField = forwardRef7(
1468
+ var NumberField = forwardRef8(
1358
1469
  ({
1359
1470
  variant,
1360
1471
  size,
@@ -1375,7 +1486,7 @@ var NumberField = forwardRef7(
1375
1486
  };
1376
1487
  const showStepper = !hideStepper;
1377
1488
  const { locale } = useLocale();
1378
- const inputRef = useObjectRef5(ref);
1489
+ const inputRef = useObjectRef8(ref);
1379
1490
  const state = useNumberFieldState({ ...props, locale });
1380
1491
  const {
1381
1492
  labelProps,
@@ -1392,19 +1503,19 @@ var NumberField = forwardRef7(
1392
1503
  isTextInput: true,
1393
1504
  autoFocus: props.autoFocus
1394
1505
  });
1395
- const styles = useComponentStyles22(
1506
+ const styles = useComponentStyles21(
1396
1507
  "NumberField",
1397
1508
  { variant, size },
1398
1509
  { parts: ["group", "stepper"] }
1399
1510
  );
1400
- const stateProps = useStateProps5({
1511
+ const stateProps = useStateProps6({
1401
1512
  hover: isHovered,
1402
1513
  focus: isFocused,
1403
1514
  disabled,
1404
1515
  readOnly,
1405
1516
  error
1406
1517
  });
1407
- return /* @__PURE__ */ React37.createElement(FieldBase, {
1518
+ return /* @__PURE__ */ React38.createElement(FieldBase, {
1408
1519
  label: props.label,
1409
1520
  labelProps,
1410
1521
  required,
@@ -1417,7 +1528,7 @@ var NumberField = forwardRef7(
1417
1528
  variant,
1418
1529
  size,
1419
1530
  width
1420
- }, /* @__PURE__ */ React37.createElement(Box21, {
1531
+ }, /* @__PURE__ */ React38.createElement(Box22, {
1421
1532
  "data-group": true,
1422
1533
  __baseCSS: {
1423
1534
  display: "flex",
@@ -1428,19 +1539,19 @@ var NumberField = forwardRef7(
1428
1539
  }
1429
1540
  },
1430
1541
  css: styles.group,
1431
- ...mergeProps6(groupProps, focusProps, hoverProps),
1542
+ ...mergeProps5(groupProps, focusProps, hoverProps),
1432
1543
  ...stateProps
1433
- }, showStepper && /* @__PURE__ */ React37.createElement(StepButton, {
1544
+ }, showStepper && /* @__PURE__ */ React38.createElement(StepButton, {
1434
1545
  direction: "down",
1435
1546
  css: styles.stepper,
1436
1547
  ...decrementButtonProps
1437
- }), /* @__PURE__ */ React37.createElement(Input, {
1548
+ }), /* @__PURE__ */ React38.createElement(Input, {
1438
1549
  ref: inputRef,
1439
1550
  variant,
1440
1551
  size,
1441
1552
  ...inputProps,
1442
1553
  ...stateProps
1443
- }), showStepper && /* @__PURE__ */ React37.createElement(StepButton, {
1554
+ }), showStepper && /* @__PURE__ */ React38.createElement(StepButton, {
1444
1555
  direction: "up",
1445
1556
  css: styles.stepper,
1446
1557
  ...incrementButtonProps
@@ -1453,7 +1564,7 @@ import { useTheme as useTheme2, ThemeProvider as ThemeProvider2 } from "@marigol
1453
1564
  import { SSRProvider } from "@react-aria/ssr";
1454
1565
 
1455
1566
  // src/Provider/MarigoldProvider.tsx
1456
- import React38 from "react";
1567
+ import React39 from "react";
1457
1568
  import { OverlayProvider } from "@react-aria/overlays";
1458
1569
  import {
1459
1570
  Global,
@@ -1476,26 +1587,26 @@ function MarigoldProvider({
1476
1587
  Nested themes with a "root" property must specify a "selector" to prevent accidentally overriding global CSS`
1477
1588
  );
1478
1589
  }
1479
- return /* @__PURE__ */ React38.createElement(ThemeProvider, {
1590
+ return /* @__PURE__ */ React39.createElement(ThemeProvider, {
1480
1591
  theme
1481
- }, /* @__PURE__ */ React38.createElement(Global, {
1592
+ }, /* @__PURE__ */ React39.createElement(Global, {
1482
1593
  normalizeDocument: isTopLevel && normalizeDocument,
1483
1594
  selector
1484
- }), isTopLevel ? /* @__PURE__ */ React38.createElement(OverlayProvider, null, children) : children);
1595
+ }), isTopLevel ? /* @__PURE__ */ React39.createElement(OverlayProvider, null, children) : children);
1485
1596
  }
1486
1597
 
1487
1598
  // src/Radio/Radio.tsx
1488
- import React40, {
1489
- forwardRef as forwardRef8
1599
+ import React41, {
1600
+ forwardRef as forwardRef9
1490
1601
  } from "react";
1491
1602
  import { useHover as useHover5 } from "@react-aria/interactions";
1492
1603
  import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
1493
1604
  import { useRadio } from "@react-aria/radio";
1494
- import { useObjectRef as useObjectRef6 } from "@react-aria/utils";
1605
+ import { mergeProps as mergeProps6, useObjectRef as useObjectRef9 } from "@react-aria/utils";
1495
1606
  import {
1496
- Box as Box23,
1497
- useComponentStyles as useComponentStyles24,
1498
- useStateProps as useStateProps6
1607
+ Box as Box24,
1608
+ useComponentStyles as useComponentStyles22,
1609
+ useStateProps as useStateProps8
1499
1610
  } from "@marigold/system";
1500
1611
 
1501
1612
  // src/Radio/Context.ts
@@ -1506,18 +1617,13 @@ var RadioGroupContext = createContext5(
1506
1617
  var useRadioGroupContext = () => useContext5(RadioGroupContext);
1507
1618
 
1508
1619
  // src/Radio/RadioGroup.tsx
1509
- import React39 from "react";
1620
+ import React40 from "react";
1510
1621
  import { useRadioGroup } from "@react-aria/radio";
1511
1622
  import { useRadioGroupState } from "@react-stately/radio";
1512
- import {
1513
- Box as Box22,
1514
- useComponentStyles as useComponentStyles23
1515
- } from "@marigold/system";
1623
+ import { Box as Box23, useStateProps as useStateProps7 } from "@marigold/system";
1516
1624
  var RadioGroup = ({
1517
1625
  children,
1518
1626
  orientation = "vertical",
1519
- size,
1520
- variant,
1521
1627
  width,
1522
1628
  required,
1523
1629
  disabled,
@@ -1533,20 +1639,26 @@ var RadioGroup = ({
1533
1639
  ...rest
1534
1640
  };
1535
1641
  const state = useRadioGroupState(props);
1536
- const { radioGroupProps, labelProps } = useRadioGroup(props, state);
1537
- const styles = useComponentStyles23(
1538
- "RadioGroup",
1539
- { variant, size },
1540
- { parts: ["container", "group"] }
1541
- );
1542
- return /* @__PURE__ */ React39.createElement(Box22, {
1543
- ...radioGroupProps,
1544
- css: styles.container
1545
- }, props.label && /* @__PURE__ */ React39.createElement(Label, {
1546
- as: "span",
1642
+ const { radioGroupProps, labelProps, errorMessageProps, descriptionProps } = useRadioGroup(props, state);
1643
+ const stateProps = useStateProps7({
1644
+ disabled,
1645
+ readOnly,
1646
+ error
1647
+ });
1648
+ return /* @__PURE__ */ React40.createElement(FieldBase, {
1649
+ width,
1650
+ label: props.label,
1651
+ labelProps: { as: "span", ...labelProps },
1652
+ description: props.description,
1653
+ descriptionProps,
1654
+ error,
1655
+ errorMessage: props.errorMessage,
1656
+ errorMessageProps,
1657
+ disabled,
1658
+ stateProps,
1547
1659
  required,
1548
- ...labelProps
1549
- }, props.label), /* @__PURE__ */ React39.createElement(Box22, {
1660
+ ...radioGroupProps
1661
+ }, /* @__PURE__ */ React40.createElement(Box23, {
1550
1662
  role: "presentation",
1551
1663
  "data-orientation": orientation,
1552
1664
  __baseCSS: {
@@ -1554,23 +1666,22 @@ var RadioGroup = ({
1554
1666
  flexDirection: orientation === "vertical" ? "column" : "row",
1555
1667
  alignItems: "start",
1556
1668
  gap: orientation === "vertical" ? "0.5ch" : "1.5ch"
1557
- },
1558
- css: styles.group
1559
- }, /* @__PURE__ */ React39.createElement(RadioGroupContext.Provider, {
1560
- value: { variant, size, width, error, ...state }
1669
+ }
1670
+ }, /* @__PURE__ */ React40.createElement(RadioGroupContext.Provider, {
1671
+ value: { width, error, state }
1561
1672
  }, children)));
1562
1673
  };
1563
1674
 
1564
1675
  // src/Radio/Radio.tsx
1565
- var Dot = () => /* @__PURE__ */ React40.createElement("svg", {
1676
+ var Dot = () => /* @__PURE__ */ React41.createElement("svg", {
1566
1677
  viewBox: "0 0 6 6"
1567
- }, /* @__PURE__ */ React40.createElement("circle", {
1678
+ }, /* @__PURE__ */ React41.createElement("circle", {
1568
1679
  fill: "currentColor",
1569
1680
  cx: "3",
1570
1681
  cy: "3",
1571
1682
  r: "3"
1572
1683
  }));
1573
- var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React40.createElement(Box23, {
1684
+ var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React41.createElement(Box24, {
1574
1685
  "aria-hidden": "true",
1575
1686
  __baseCSS: {
1576
1687
  width: 16,
@@ -1585,30 +1696,30 @@ var Icon2 = ({ checked, css, ...props }) => /* @__PURE__ */ React40.createElemen
1585
1696
  },
1586
1697
  css,
1587
1698
  ...props
1588
- }, checked ? /* @__PURE__ */ React40.createElement(Dot, null) : null);
1589
- var Radio = forwardRef8(
1699
+ }, checked ? /* @__PURE__ */ React41.createElement(Dot, null) : null);
1700
+ var Radio = forwardRef9(
1590
1701
  ({ width, disabled, ...props }, ref) => {
1591
1702
  const {
1592
1703
  variant,
1593
1704
  size,
1594
1705
  error,
1595
1706
  width: groupWidth,
1596
- ...state
1707
+ state
1597
1708
  } = useRadioGroupContext();
1598
- const inputRef = useObjectRef6(ref);
1709
+ const inputRef = useObjectRef9(ref);
1599
1710
  const { inputProps } = useRadio(
1600
1711
  { isDisabled: disabled, ...props },
1601
1712
  state,
1602
1713
  inputRef
1603
1714
  );
1604
- const styles = useComponentStyles24(
1715
+ const styles = useComponentStyles22(
1605
1716
  "Radio",
1606
1717
  { variant: variant || props.variant, size: size || props.size },
1607
1718
  { parts: ["container", "label", "radio"] }
1608
1719
  );
1609
- const { hoverProps, isHovered } = useHover5({});
1720
+ const { hoverProps, isHovered } = useHover5({ isDisabled: disabled });
1610
1721
  const { isFocusVisible, focusProps } = useFocusRing5();
1611
- const stateProps = useStateProps6({
1722
+ const stateProps = useStateProps8({
1612
1723
  hover: isHovered,
1613
1724
  focus: isFocusVisible,
1614
1725
  checked: inputProps.checked,
@@ -1616,7 +1727,7 @@ var Radio = forwardRef8(
1616
1727
  readOnly: props.readOnly,
1617
1728
  error
1618
1729
  });
1619
- return /* @__PURE__ */ React40.createElement(Box23, {
1730
+ return /* @__PURE__ */ React41.createElement(Box24, {
1620
1731
  as: "label",
1621
1732
  __baseCSS: {
1622
1733
  display: "flex",
@@ -1626,9 +1737,8 @@ var Radio = forwardRef8(
1626
1737
  width: width || groupWidth || "100%"
1627
1738
  },
1628
1739
  css: styles.container,
1629
- ...hoverProps,
1630
- ...stateProps
1631
- }, /* @__PURE__ */ React40.createElement(Box23, {
1740
+ ...mergeProps6(hoverProps, stateProps)
1741
+ }, /* @__PURE__ */ React41.createElement(Box24, {
1632
1742
  as: "input",
1633
1743
  ref: inputRef,
1634
1744
  css: {
@@ -1641,13 +1751,12 @@ var Radio = forwardRef8(
1641
1751
  opacity: 1e-4,
1642
1752
  cursor: inputProps.disabled ? "not-allowed" : "pointer"
1643
1753
  },
1644
- ...inputProps,
1645
- ...focusProps
1646
- }), /* @__PURE__ */ React40.createElement(Icon2, {
1754
+ ...mergeProps6(inputProps, focusProps)
1755
+ }), /* @__PURE__ */ React41.createElement(Icon2, {
1647
1756
  checked: inputProps.checked,
1648
1757
  css: styles.radio,
1649
1758
  ...stateProps
1650
- }), /* @__PURE__ */ React40.createElement(Box23, {
1759
+ }), /* @__PURE__ */ React41.createElement(Box24, {
1651
1760
  css: styles.label,
1652
1761
  ...stateProps
1653
1762
  }, props.children));
@@ -1656,30 +1765,30 @@ var Radio = forwardRef8(
1656
1765
  Radio.Group = RadioGroup;
1657
1766
 
1658
1767
  // src/Select/Select.tsx
1659
- import React44, {
1660
- forwardRef as forwardRef10,
1768
+ import React45, {
1769
+ forwardRef as forwardRef11,
1661
1770
  useRef as useRef9
1662
1771
  } from "react";
1663
1772
  import { useButton as useButton4 } from "@react-aria/button";
1664
- import { FocusScope as FocusScope3, useFocusRing as useFocusRing6 } from "@react-aria/focus";
1773
+ import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
1665
1774
  import { useLocalizedStringFormatter } from "@react-aria/i18n";
1666
- import { DismissButton as DismissButton2, useOverlayPosition as useOverlayPosition2 } from "@react-aria/overlays";
1667
1775
  import { HiddenSelect, useSelect } from "@react-aria/select";
1668
1776
  import { useSelectState } from "@react-stately/select";
1669
1777
  import { Item as Item2, Section } from "@react-stately/collections";
1670
- import { mergeProps as mergeProps7, useObjectRef as useObjectRef8 } from "@react-aria/utils";
1778
+ import { mergeProps as mergeProps7, useObjectRef as useObjectRef11 } from "@react-aria/utils";
1671
1779
  import {
1672
- Box as Box27,
1673
- useComponentStyles as useComponentStyles26,
1674
- useStateProps as useStateProps8
1780
+ Box as Box28,
1781
+ useComponentStyles as useComponentStyles24,
1782
+ useResponsiveValue as useResponsiveValue2,
1783
+ useStateProps as useStateProps10
1675
1784
  } from "@marigold/system";
1676
1785
 
1677
1786
  // src/ListBox/ListBox.tsx
1678
- import React43, { forwardRef as forwardRef9 } from "react";
1679
- import { useObjectRef as useObjectRef7 } from "@react-aria/utils";
1787
+ import React44, { forwardRef as forwardRef10 } from "react";
1788
+ import { useObjectRef as useObjectRef10 } from "@react-aria/utils";
1680
1789
  import {
1681
- Box as Box26,
1682
- useComponentStyles as useComponentStyles25
1790
+ Box as Box27,
1791
+ useComponentStyles as useComponentStyles23
1683
1792
  } from "@marigold/system";
1684
1793
  import { useListBox } from "@react-aria/listbox";
1685
1794
 
@@ -1689,14 +1798,14 @@ var ListBoxContext = createContext6({});
1689
1798
  var useListBoxContext = () => useContext6(ListBoxContext);
1690
1799
 
1691
1800
  // src/ListBox/ListBoxSection.tsx
1692
- import React42 from "react";
1801
+ import React43 from "react";
1693
1802
  import { useListBoxSection } from "@react-aria/listbox";
1694
- import { Box as Box25 } from "@marigold/system";
1803
+ import { Box as Box26 } from "@marigold/system";
1695
1804
 
1696
1805
  // src/ListBox/ListBoxOption.tsx
1697
- import React41, { useRef as useRef8 } from "react";
1806
+ import React42, { useRef as useRef8 } from "react";
1698
1807
  import { useOption } from "@react-aria/listbox";
1699
- import { Box as Box24, useStateProps as useStateProps7 } from "@marigold/system";
1808
+ import { Box as Box25, useStateProps as useStateProps9 } from "@marigold/system";
1700
1809
  var ListBoxOption = ({ item, state }) => {
1701
1810
  const ref = useRef8(null);
1702
1811
  const { optionProps, isSelected, isDisabled, isFocused } = useOption(
@@ -1707,12 +1816,12 @@ var ListBoxOption = ({ item, state }) => {
1707
1816
  ref
1708
1817
  );
1709
1818
  const { styles } = useListBoxContext();
1710
- const stateProps = useStateProps7({
1819
+ const stateProps = useStateProps9({
1711
1820
  selected: isSelected,
1712
1821
  disabled: isDisabled,
1713
1822
  focusVisible: isFocused
1714
1823
  });
1715
- return /* @__PURE__ */ React41.createElement(Box24, {
1824
+ return /* @__PURE__ */ React42.createElement(Box25, {
1716
1825
  as: "li",
1717
1826
  ref,
1718
1827
  css: styles.option,
@@ -1728,19 +1837,19 @@ var ListBoxSection = ({ section, state }) => {
1728
1837
  "aria-label": section["aria-label"]
1729
1838
  });
1730
1839
  const { styles } = useListBoxContext();
1731
- return /* @__PURE__ */ React42.createElement(Box25, {
1840
+ return /* @__PURE__ */ React43.createElement(Box26, {
1732
1841
  as: "li",
1733
1842
  css: styles.section,
1734
1843
  ...itemProps
1735
- }, section.rendered && /* @__PURE__ */ React42.createElement(Box25, {
1844
+ }, section.rendered && /* @__PURE__ */ React43.createElement(Box26, {
1736
1845
  css: styles.sectionTitle,
1737
1846
  ...headingProps
1738
- }, section.rendered), /* @__PURE__ */ React42.createElement(Box25, {
1847
+ }, section.rendered), /* @__PURE__ */ React43.createElement(Box26, {
1739
1848
  as: "ul",
1740
1849
  __baseCSS: { listStyle: "none", p: 0 },
1741
1850
  css: styles.list,
1742
1851
  ...groupProps
1743
- }, [...section.childNodes].map((node) => /* @__PURE__ */ React42.createElement(ListBoxOption, {
1852
+ }, [...section.childNodes].map((node) => /* @__PURE__ */ React43.createElement(ListBoxOption, {
1744
1853
  key: node.key,
1745
1854
  item: node,
1746
1855
  state
@@ -1748,31 +1857,31 @@ var ListBoxSection = ({ section, state }) => {
1748
1857
  };
1749
1858
 
1750
1859
  // src/ListBox/ListBox.tsx
1751
- var ListBox = forwardRef9(
1860
+ var ListBox = forwardRef10(
1752
1861
  ({ state, variant, size, ...props }, ref) => {
1753
- const innerRef = useObjectRef7(ref);
1862
+ const innerRef = useObjectRef10(ref);
1754
1863
  const { listBoxProps } = useListBox(props, state, innerRef);
1755
- const styles = useComponentStyles25(
1864
+ const styles = useComponentStyles23(
1756
1865
  "ListBox",
1757
1866
  { variant, size },
1758
1867
  { parts: ["container", "list", "option", "section", "sectionTitle"] }
1759
1868
  );
1760
- return /* @__PURE__ */ React43.createElement(ListBoxContext.Provider, {
1869
+ return /* @__PURE__ */ React44.createElement(ListBoxContext.Provider, {
1761
1870
  value: { styles }
1762
- }, /* @__PURE__ */ React43.createElement(Box26, {
1871
+ }, /* @__PURE__ */ React44.createElement(Box27, {
1763
1872
  css: styles.container
1764
- }, /* @__PURE__ */ React43.createElement(Box26, {
1873
+ }, /* @__PURE__ */ React44.createElement(Box27, {
1765
1874
  as: "ul",
1766
1875
  ref: innerRef,
1767
1876
  __baseCSS: { listStyle: "none", p: 0 },
1768
1877
  css: styles.list,
1769
1878
  ...listBoxProps
1770
1879
  }, [...state.collection].map(
1771
- (item) => item.type === "section" ? /* @__PURE__ */ React43.createElement(ListBoxSection, {
1880
+ (item) => item.type === "section" ? /* @__PURE__ */ React44.createElement(ListBoxSection, {
1772
1881
  key: item.key,
1773
1882
  section: item,
1774
1883
  state
1775
- }) : /* @__PURE__ */ React43.createElement(ListBoxOption, {
1884
+ }) : /* @__PURE__ */ React44.createElement(ListBoxOption, {
1776
1885
  key: item.key,
1777
1886
  item,
1778
1887
  state
@@ -1792,22 +1901,21 @@ var messages = {
1792
1901
  };
1793
1902
 
1794
1903
  // src/Select/Select.tsx
1795
- var Chevron = ({ css }) => /* @__PURE__ */ React44.createElement(Box27, {
1904
+ var Chevron = ({ css }) => /* @__PURE__ */ React45.createElement(Box28, {
1796
1905
  as: "svg",
1797
1906
  __baseCSS: { width: 16, height: 16, fill: "none" },
1798
1907
  css,
1799
1908
  viewBox: "0 0 24 24",
1800
1909
  stroke: "currentColor",
1801
1910
  strokeWidth: 2
1802
- }, /* @__PURE__ */ React44.createElement("path", {
1911
+ }, /* @__PURE__ */ React45.createElement("path", {
1803
1912
  strokeLinecap: "round",
1804
1913
  strokeLinejoin: "round",
1805
1914
  d: "M19 9l-7 7-7-7"
1806
1915
  }));
1807
- var Select = forwardRef10(
1916
+ var Select = forwardRef11(
1808
1917
  ({ variant, size, width, open, disabled, required, error, ...rest }, ref) => {
1809
1918
  const formatMessage = useLocalizedStringFormatter(messages);
1810
- const buttonRef = useObjectRef8(ref);
1811
1919
  const props = {
1812
1920
  isOpen: open,
1813
1921
  isDisabled: disabled,
@@ -1817,6 +1925,9 @@ var Select = forwardRef10(
1817
1925
  ...rest
1818
1926
  };
1819
1927
  const state = useSelectState(props);
1928
+ const buttonRef = useObjectRef11(ref);
1929
+ const listboxRef = useRef9(null);
1930
+ const isSmallScreen = useResponsiveValue2([true, false, false], 2);
1820
1931
  const {
1821
1932
  labelProps,
1822
1933
  triggerProps,
@@ -1830,25 +1941,18 @@ var Select = forwardRef10(
1830
1941
  buttonRef
1831
1942
  );
1832
1943
  const { focusProps, isFocusVisible } = useFocusRing6();
1833
- const overlayRef = useRef9(null);
1834
- const { overlayProps: positionProps } = useOverlayPosition2({
1835
- targetRef: buttonRef,
1836
- overlayRef,
1837
- isOpen: state.isOpen,
1838
- placement: "bottom left"
1839
- });
1840
- const styles = useComponentStyles26(
1944
+ const styles = useComponentStyles24(
1841
1945
  "Select",
1842
1946
  { variant, size },
1843
1947
  { parts: ["container", "button", "icon"] }
1844
1948
  );
1845
- const stateProps = useStateProps8({
1949
+ const stateProps = useStateProps10({
1846
1950
  disabled,
1847
1951
  error,
1848
1952
  focusVisible: isFocusVisible,
1849
1953
  expanded: state.isOpen
1850
1954
  });
1851
- return /* @__PURE__ */ React44.createElement(FieldBase, {
1955
+ return /* @__PURE__ */ React45.createElement(FieldBase, {
1852
1956
  variant,
1853
1957
  size,
1854
1958
  width,
@@ -1862,13 +1966,13 @@ var Select = forwardRef10(
1862
1966
  stateProps,
1863
1967
  disabled,
1864
1968
  required
1865
- }, /* @__PURE__ */ React44.createElement(HiddenSelect, {
1969
+ }, /* @__PURE__ */ React45.createElement(HiddenSelect, {
1866
1970
  state,
1867
1971
  triggerRef: buttonRef,
1868
1972
  label: props.label,
1869
1973
  name: props.name,
1870
1974
  isDisabled: disabled
1871
- }), /* @__PURE__ */ React44.createElement(Box27, {
1975
+ }), /* @__PURE__ */ React45.createElement(Box28, {
1872
1976
  as: "button",
1873
1977
  __baseCSS: {
1874
1978
  display: "flex",
@@ -1881,52 +1985,51 @@ var Select = forwardRef10(
1881
1985
  ref: buttonRef,
1882
1986
  ...mergeProps7(buttonProps, focusProps),
1883
1987
  ...stateProps
1884
- }, /* @__PURE__ */ React44.createElement(Box27, {
1988
+ }, /* @__PURE__ */ React45.createElement(Box28, {
1885
1989
  css: {
1886
1990
  overflow: "hidden",
1887
1991
  whiteSpace: "nowrap"
1888
1992
  },
1889
1993
  ...valueProps
1890
- }, state.selectedItem ? state.selectedItem.rendered : props.placeholder), /* @__PURE__ */ React44.createElement(Chevron, {
1994
+ }, state.selectedItem ? state.selectedItem.rendered : props.placeholder), /* @__PURE__ */ React45.createElement(Chevron, {
1891
1995
  css: styles.icon
1892
- })), /* @__PURE__ */ React44.createElement(Popover, {
1893
- open: state.isOpen,
1894
- onClose: state.close,
1895
- dismissable: true,
1896
- shouldCloseOnBlur: true,
1897
- minWidth: buttonRef.current ? buttonRef.current.offsetWidth : void 0,
1898
- ref: overlayRef,
1899
- ...positionProps
1900
- }, /* @__PURE__ */ React44.createElement(FocusScope3, {
1901
- restoreFocus: true
1902
- }, /* @__PURE__ */ React44.createElement(DismissButton2, {
1903
- onDismiss: state.close
1904
- }), /* @__PURE__ */ React44.createElement(ListBox, {
1996
+ })), isSmallScreen ? /* @__PURE__ */ React45.createElement(Tray, {
1997
+ state
1998
+ }, /* @__PURE__ */ React45.createElement(ListBox, {
1999
+ ref: listboxRef,
1905
2000
  state,
1906
2001
  variant,
1907
2002
  size,
1908
2003
  ...menuProps
1909
- }), /* @__PURE__ */ React44.createElement(DismissButton2, {
1910
- onDismiss: state.close
1911
- }))));
2004
+ })) : /* @__PURE__ */ React45.createElement(Popover, {
2005
+ state,
2006
+ triggerRef: buttonRef,
2007
+ scrollRef: listboxRef
2008
+ }, /* @__PURE__ */ React45.createElement(ListBox, {
2009
+ ref: listboxRef,
2010
+ state,
2011
+ variant,
2012
+ size,
2013
+ ...menuProps
2014
+ })));
1912
2015
  }
1913
2016
  );
1914
2017
  Select.Option = Item2;
1915
2018
  Select.Section = Section;
1916
2019
 
1917
2020
  // src/Slider/Slider.tsx
1918
- import React46, { forwardRef as forwardRef11 } from "react";
2021
+ import React47, { forwardRef as forwardRef12 } from "react";
1919
2022
  import { useSlider } from "@react-aria/slider";
1920
2023
  import { useSliderState } from "@react-stately/slider";
1921
2024
  import { useNumberFormatter } from "@react-aria/i18n";
1922
- import { useObjectRef as useObjectRef9 } from "@react-aria/utils";
1923
- import { useComponentStyles as useComponentStyles27 } from "@marigold/system";
2025
+ import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
2026
+ import { useComponentStyles as useComponentStyles25 } from "@marigold/system";
1924
2027
 
1925
2028
  // src/Slider/Thumb.tsx
1926
- import React45, { useEffect } from "react";
2029
+ import React46, { useEffect } from "react";
1927
2030
  import { useSliderThumb } from "@react-aria/slider";
1928
2031
  import { mergeProps as mergeProps8 } from "@react-aria/utils";
1929
- import { useStateProps as useStateProps9 } from "@marigold/system";
2032
+ import { useStateProps as useStateProps11 } from "@marigold/system";
1930
2033
 
1931
2034
  // src/VisuallyHidden/VisuallyHidden.tsx
1932
2035
  import { VisuallyHidden } from "@react-aria/visually-hidden";
@@ -1935,10 +2038,10 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
1935
2038
  import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
1936
2039
  var Thumb = ({ state, trackRef, styles, ...props }) => {
1937
2040
  const { disabled } = props;
1938
- const inputRef = React45.useRef(null);
2041
+ const inputRef = React46.useRef(null);
1939
2042
  const { isFocusVisible, focusProps, isFocused } = useFocusRing7();
1940
2043
  const focused = isFocused || isFocusVisible || state.isThumbDragging(0);
1941
- const stateProps = useStateProps9({
2044
+ const stateProps = useStateProps11({
1942
2045
  focus: focused,
1943
2046
  disabled
1944
2047
  });
@@ -1954,12 +2057,12 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
1954
2057
  useEffect(() => {
1955
2058
  state.setThumbEditable(0, !disabled);
1956
2059
  }, [disabled, state]);
1957
- return /* @__PURE__ */ React45.createElement(Box, {
2060
+ return /* @__PURE__ */ React46.createElement(Box, {
1958
2061
  __baseCSS: { top: "50%" },
1959
2062
  css: styles,
1960
2063
  ...thumbProps,
1961
2064
  ...stateProps
1962
- }, /* @__PURE__ */ React45.createElement(VisuallyHidden, null, /* @__PURE__ */ React45.createElement(Box, {
2065
+ }, /* @__PURE__ */ React46.createElement(VisuallyHidden, null, /* @__PURE__ */ React46.createElement(Box, {
1963
2066
  as: "input",
1964
2067
  type: "range",
1965
2068
  ref: inputRef,
@@ -1968,10 +2071,10 @@ var Thumb = ({ state, trackRef, styles, ...props }) => {
1968
2071
  };
1969
2072
 
1970
2073
  // src/Slider/Slider.tsx
1971
- var Slider = forwardRef11(
2074
+ var Slider = forwardRef12(
1972
2075
  ({ variant, size, width = "100%", ...props }, ref) => {
1973
2076
  const { formatOptions } = props;
1974
- const trackRef = useObjectRef9(ref);
2077
+ const trackRef = useObjectRef12(ref);
1975
2078
  const numberFormatter = useNumberFormatter(formatOptions);
1976
2079
  const state = useSliderState({ ...props, numberFormatter });
1977
2080
  const { groupProps, trackProps, labelProps, outputProps } = useSlider(
@@ -1982,12 +2085,12 @@ var Slider = forwardRef11(
1982
2085
  state,
1983
2086
  trackRef
1984
2087
  );
1985
- const styles = useComponentStyles27(
2088
+ const styles = useComponentStyles25(
1986
2089
  "Slider",
1987
2090
  { variant, size },
1988
2091
  { parts: ["track", "thumb", "label", "output"] }
1989
2092
  );
1990
- return /* @__PURE__ */ React46.createElement(Box, {
2093
+ return /* @__PURE__ */ React47.createElement(Box, {
1991
2094
  __baseCSS: {
1992
2095
  display: "flex",
1993
2096
  flexDirection: "column",
@@ -1995,18 +2098,18 @@ var Slider = forwardRef11(
1995
2098
  width
1996
2099
  },
1997
2100
  ...groupProps
1998
- }, /* @__PURE__ */ React46.createElement(Box, {
2101
+ }, /* @__PURE__ */ React47.createElement(Box, {
1999
2102
  __baseCSS: { display: "flex", alignSelf: "stretch" }
2000
- }, props.children && /* @__PURE__ */ React46.createElement(Box, {
2103
+ }, props.children && /* @__PURE__ */ React47.createElement(Box, {
2001
2104
  as: "label",
2002
2105
  __baseCSS: styles.label,
2003
2106
  ...labelProps
2004
- }, props.children), /* @__PURE__ */ React46.createElement(Box, {
2107
+ }, props.children), /* @__PURE__ */ React47.createElement(Box, {
2005
2108
  as: "output",
2006
2109
  ...outputProps,
2007
2110
  __baseCSS: { flex: "1 0 auto", textAlign: "end" },
2008
2111
  css: styles.output
2009
- }, state.getThumbValueLabel(0))), /* @__PURE__ */ React46.createElement(Box, {
2112
+ }, state.getThumbValueLabel(0))), /* @__PURE__ */ React47.createElement(Box, {
2010
2113
  ...trackProps,
2011
2114
  ref: trackRef,
2012
2115
  __baseCSS: {
@@ -2014,13 +2117,13 @@ var Slider = forwardRef11(
2014
2117
  width: "100%",
2015
2118
  cursor: props.disabled ? "not-allowed" : "pointer"
2016
2119
  }
2017
- }, /* @__PURE__ */ React46.createElement(Box, {
2120
+ }, /* @__PURE__ */ React47.createElement(Box, {
2018
2121
  __baseCSS: {
2019
2122
  top: "50%",
2020
2123
  transform: "translateY(-50%)"
2021
2124
  },
2022
2125
  css: styles.track
2023
- }), /* @__PURE__ */ React46.createElement(Thumb, {
2126
+ }), /* @__PURE__ */ React47.createElement(Thumb, {
2024
2127
  state,
2025
2128
  trackRef,
2026
2129
  disabled: props.disabled,
@@ -2030,16 +2133,16 @@ var Slider = forwardRef11(
2030
2133
  );
2031
2134
 
2032
2135
  // src/Split/Split.tsx
2033
- import React47 from "react";
2034
- import { Box as Box28 } from "@marigold/system";
2035
- var Split = (props) => /* @__PURE__ */ React47.createElement(Box28, {
2136
+ import React48 from "react";
2137
+ import { Box as Box29 } from "@marigold/system";
2138
+ var Split = (props) => /* @__PURE__ */ React48.createElement(Box29, {
2036
2139
  ...props,
2037
2140
  role: "separator",
2038
2141
  css: { flexGrow: 1 }
2039
2142
  });
2040
2143
 
2041
2144
  // src/Stack/Stack.tsx
2042
- import React48 from "react";
2145
+ import React49 from "react";
2043
2146
  var ALIGNMENT_X2 = {
2044
2147
  none: "initial",
2045
2148
  left: "flex-start",
@@ -2059,7 +2162,7 @@ var Stack = ({
2059
2162
  alignY = "none",
2060
2163
  stretch = false,
2061
2164
  ...props
2062
- }) => /* @__PURE__ */ React48.createElement(Box, {
2165
+ }) => /* @__PURE__ */ React49.createElement(Box, {
2063
2166
  css: {
2064
2167
  display: "flex",
2065
2168
  flexDirection: "column",
@@ -2073,16 +2176,16 @@ var Stack = ({
2073
2176
  }, children);
2074
2177
 
2075
2178
  // src/Switch/Switch.tsx
2076
- import React49, { forwardRef as forwardRef12 } from "react";
2179
+ import React50, { forwardRef as forwardRef13 } from "react";
2077
2180
  import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
2078
2181
  import { useSwitch } from "@react-aria/switch";
2079
- import { useObjectRef as useObjectRef10 } from "@react-aria/utils";
2182
+ import { useObjectRef as useObjectRef13 } from "@react-aria/utils";
2080
2183
  import { useToggleState as useToggleState2 } from "@react-stately/toggle";
2081
2184
  import {
2082
- useComponentStyles as useComponentStyles28,
2083
- useStateProps as useStateProps10
2185
+ useComponentStyles as useComponentStyles26,
2186
+ useStateProps as useStateProps12
2084
2187
  } from "@marigold/system";
2085
- var Switch = forwardRef12(
2188
+ var Switch = forwardRef13(
2086
2189
  ({
2087
2190
  variant,
2088
2191
  size,
@@ -2093,7 +2196,7 @@ var Switch = forwardRef12(
2093
2196
  defaultChecked,
2094
2197
  ...rest
2095
2198
  }, ref) => {
2096
- const inputRef = useObjectRef10(ref);
2199
+ const inputRef = useObjectRef13(ref);
2097
2200
  const props = {
2098
2201
  isSelected: checked,
2099
2202
  isDisabled: disabled,
@@ -2104,18 +2207,18 @@ var Switch = forwardRef12(
2104
2207
  const state = useToggleState2(props);
2105
2208
  const { inputProps } = useSwitch(props, state, inputRef);
2106
2209
  const { isFocusVisible, focusProps } = useFocusRing8();
2107
- const stateProps = useStateProps10({
2210
+ const stateProps = useStateProps12({
2108
2211
  checked: state.isSelected,
2109
2212
  disabled,
2110
2213
  readOnly,
2111
2214
  focus: isFocusVisible
2112
2215
  });
2113
- const styles = useComponentStyles28(
2216
+ const styles = useComponentStyles26(
2114
2217
  "Switch",
2115
2218
  { variant, size },
2116
2219
  { parts: ["container", "label", "track", "thumb"] }
2117
2220
  );
2118
- return /* @__PURE__ */ React49.createElement(Box, {
2221
+ return /* @__PURE__ */ React50.createElement(Box, {
2119
2222
  as: "label",
2120
2223
  __baseCSS: {
2121
2224
  display: "flex",
@@ -2126,7 +2229,7 @@ var Switch = forwardRef12(
2126
2229
  width
2127
2230
  },
2128
2231
  css: styles.container
2129
- }, /* @__PURE__ */ React49.createElement(Box, {
2232
+ }, /* @__PURE__ */ React50.createElement(Box, {
2130
2233
  as: "input",
2131
2234
  ref: inputRef,
2132
2235
  css: {
@@ -2141,9 +2244,9 @@ var Switch = forwardRef12(
2141
2244
  },
2142
2245
  ...inputProps,
2143
2246
  ...focusProps
2144
- }), props.children && /* @__PURE__ */ React49.createElement(Box, {
2247
+ }), props.children && /* @__PURE__ */ React50.createElement(Box, {
2145
2248
  css: styles.label
2146
- }, props.children), /* @__PURE__ */ React49.createElement(Box, {
2249
+ }, props.children), /* @__PURE__ */ React50.createElement(Box, {
2147
2250
  __baseCSS: {
2148
2251
  position: "relative",
2149
2252
  width: 48,
@@ -2154,7 +2257,7 @@ var Switch = forwardRef12(
2154
2257
  },
2155
2258
  css: styles.track,
2156
2259
  ...stateProps
2157
- }, /* @__PURE__ */ React49.createElement(Box, {
2260
+ }, /* @__PURE__ */ React50.createElement(Box, {
2158
2261
  __baseCSS: {
2159
2262
  display: "block",
2160
2263
  position: "absolute",
@@ -2178,7 +2281,7 @@ var Switch = forwardRef12(
2178
2281
  );
2179
2282
 
2180
2283
  // src/Table/Table.tsx
2181
- import React58, { useRef as useRef16 } from "react";
2284
+ import React59, { useRef as useRef16 } from "react";
2182
2285
  import { useTable } from "@react-aria/table";
2183
2286
  import {
2184
2287
  Cell,
@@ -2189,8 +2292,8 @@ import {
2189
2292
  useTableState
2190
2293
  } from "@react-stately/table";
2191
2294
  import {
2192
- Box as Box34,
2193
- useComponentStyles as useComponentStyles29
2295
+ Box as Box35,
2296
+ useComponentStyles as useComponentStyles28
2194
2297
  } from "@marigold/system";
2195
2298
 
2196
2299
  // src/Table/Context.tsx
@@ -2199,21 +2302,21 @@ var TableContext = createContext7({});
2199
2302
  var useTableContext = () => useContext7(TableContext);
2200
2303
 
2201
2304
  // src/Table/TableBody.tsx
2202
- import React50 from "react";
2305
+ import React51 from "react";
2203
2306
  import { useTableRowGroup } from "@react-aria/table";
2204
2307
  var TableBody = ({ children }) => {
2205
2308
  const { rowGroupProps } = useTableRowGroup();
2206
- return /* @__PURE__ */ React50.createElement("tbody", {
2309
+ return /* @__PURE__ */ React51.createElement("tbody", {
2207
2310
  ...rowGroupProps
2208
2311
  }, children);
2209
2312
  };
2210
2313
 
2211
2314
  // src/Table/TableCell.tsx
2212
- import React51, { useRef as useRef10 } from "react";
2315
+ import React52, { useRef as useRef10 } from "react";
2213
2316
  import { useTableCell } from "@react-aria/table";
2214
2317
  import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
2215
2318
  import { mergeProps as mergeProps9 } from "@react-aria/utils";
2216
- import { Box as Box29, useStateProps as useStateProps11 } from "@marigold/system";
2319
+ import { Box as Box30, useStateProps as useStateProps13 } from "@marigold/system";
2217
2320
  var TableCell = ({ cell }) => {
2218
2321
  const ref = useRef10(null);
2219
2322
  const { interactive, state, styles } = useTableContext();
@@ -2231,8 +2334,8 @@ var TableCell = ({ cell }) => {
2231
2334
  onPointerDown: (e) => e.stopPropagation()
2232
2335
  };
2233
2336
  const { focusProps, isFocusVisible } = useFocusRing9();
2234
- const stateProps = useStateProps11({ disabled, focusVisible: isFocusVisible });
2235
- return /* @__PURE__ */ React51.createElement(Box29, {
2337
+ const stateProps = useStateProps13({ disabled, focusVisible: isFocusVisible });
2338
+ return /* @__PURE__ */ React52.createElement(Box30, {
2236
2339
  as: "td",
2237
2340
  ref,
2238
2341
  css: styles.cell,
@@ -2242,11 +2345,11 @@ var TableCell = ({ cell }) => {
2242
2345
  };
2243
2346
 
2244
2347
  // src/Table/TableCheckboxCell.tsx
2245
- import React52, { useRef as useRef11 } from "react";
2348
+ import React53, { useRef as useRef11 } from "react";
2246
2349
  import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
2247
2350
  import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
2248
2351
  import { mergeProps as mergeProps10 } from "@react-aria/utils";
2249
- import { Box as Box30, useStateProps as useStateProps12 } from "@marigold/system";
2352
+ import { Box as Box31, useStateProps as useStateProps14 } from "@marigold/system";
2250
2353
 
2251
2354
  // src/Table/utils.ts
2252
2355
  var mapCheckboxProps = ({
@@ -2284,8 +2387,8 @@ var TableCheckboxCell = ({ cell }) => {
2284
2387
  useTableSelectionCheckbox({ key: cell.parentKey }, state)
2285
2388
  );
2286
2389
  const { focusProps, isFocusVisible } = useFocusRing10();
2287
- const stateProps = useStateProps12({ disabled, focusVisible: isFocusVisible });
2288
- return /* @__PURE__ */ React52.createElement(Box30, {
2390
+ const stateProps = useStateProps14({ disabled, focusVisible: isFocusVisible });
2391
+ return /* @__PURE__ */ React53.createElement(Box31, {
2289
2392
  as: "td",
2290
2393
  ref,
2291
2394
  __baseCSS: {
@@ -2296,22 +2399,22 @@ var TableCheckboxCell = ({ cell }) => {
2296
2399
  css: styles.cell,
2297
2400
  ...mergeProps10(gridCellProps, focusProps),
2298
2401
  ...stateProps
2299
- }, /* @__PURE__ */ React52.createElement(Checkbox, {
2402
+ }, /* @__PURE__ */ React53.createElement(Checkbox, {
2300
2403
  ...checkboxProps
2301
2404
  }));
2302
2405
  };
2303
2406
 
2304
2407
  // src/Table/TableColumnHeader.tsx
2305
- import React53, { useRef as useRef12 } from "react";
2408
+ import React54, { useRef as useRef12 } from "react";
2306
2409
  import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
2307
2410
  import { useHover as useHover6 } from "@react-aria/interactions";
2308
2411
  import { useTableColumnHeader } from "@react-aria/table";
2309
2412
  import { mergeProps as mergeProps11 } from "@react-aria/utils";
2310
- import { Box as Box31, useStateProps as useStateProps13 } from "@marigold/system";
2413
+ import { Box as Box32, useStateProps as useStateProps15 } from "@marigold/system";
2311
2414
  var SortIndicator = ({
2312
2415
  direction = "ascending",
2313
2416
  visible
2314
- }) => /* @__PURE__ */ React53.createElement(Box31, {
2417
+ }) => /* @__PURE__ */ React54.createElement(Box32, {
2315
2418
  as: "span",
2316
2419
  role: "presentation",
2317
2420
  "aria-hidden": "true",
@@ -2334,11 +2437,11 @@ var TableColumnHeader = ({ column }) => {
2334
2437
  );
2335
2438
  const { hoverProps, isHovered } = useHover6({});
2336
2439
  const { focusProps, isFocusVisible } = useFocusRing11();
2337
- const stateProps = useStateProps13({
2440
+ const stateProps = useStateProps15({
2338
2441
  hover: isHovered,
2339
2442
  focusVisible: isFocusVisible
2340
2443
  });
2341
- return /* @__PURE__ */ React53.createElement(Box31, {
2444
+ return /* @__PURE__ */ React54.createElement(Box32, {
2342
2445
  as: "th",
2343
2446
  colSpan: column.colspan,
2344
2447
  ref,
@@ -2346,45 +2449,51 @@ var TableColumnHeader = ({ column }) => {
2346
2449
  css: styles.header,
2347
2450
  ...mergeProps11(columnHeaderProps, hoverProps, focusProps),
2348
2451
  ...stateProps
2349
- }, column.rendered, column.props.allowsSorting && /* @__PURE__ */ React53.createElement(SortIndicator, {
2452
+ }, column.rendered, column.props.allowsSorting && /* @__PURE__ */ React54.createElement(SortIndicator, {
2350
2453
  direction: (_a = state.sortDescriptor) == null ? void 0 : _a.direction,
2351
2454
  visible: ((_b = state.sortDescriptor) == null ? void 0 : _b.column) === column.key
2352
2455
  }));
2353
2456
  };
2354
2457
 
2355
2458
  // src/Table/TableHeader.tsx
2356
- import React54 from "react";
2459
+ import React55 from "react";
2357
2460
  import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
2358
2461
  var TableHeader = ({ children }) => {
2359
2462
  const { rowGroupProps } = useTableRowGroup2();
2360
- return /* @__PURE__ */ React54.createElement("thead", {
2463
+ return /* @__PURE__ */ React55.createElement("thead", {
2361
2464
  ...rowGroupProps
2362
2465
  }, children);
2363
2466
  };
2364
2467
 
2365
2468
  // src/Table/TableHeaderRow.tsx
2366
- import React55, { useRef as useRef13 } from "react";
2469
+ import React56, { useRef as useRef13 } from "react";
2367
2470
  import { useTableHeaderRow } from "@react-aria/table";
2368
2471
  var TableHeaderRow = ({ item, children }) => {
2369
2472
  const { state } = useTableContext();
2370
2473
  const ref = useRef13(null);
2371
2474
  const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
2372
- return /* @__PURE__ */ React55.createElement("tr", {
2475
+ return /* @__PURE__ */ React56.createElement("tr", {
2373
2476
  ...rowProps,
2374
2477
  ref
2375
2478
  }, children);
2376
2479
  };
2377
2480
 
2378
2481
  // src/Table/TableRow.tsx
2379
- import React56, { useRef as useRef14 } from "react";
2482
+ import React57, { useRef as useRef14 } from "react";
2380
2483
  import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
2381
2484
  import { useHover as useHover7 } from "@react-aria/interactions";
2382
2485
  import { useTableRow } from "@react-aria/table";
2383
2486
  import { mergeProps as mergeProps12 } from "@react-aria/utils";
2384
- import { Box as Box32, useStateProps as useStateProps14 } from "@marigold/system";
2487
+ import { Box as Box33, useComponentStyles as useComponentStyles27, useStateProps as useStateProps16 } from "@marigold/system";
2385
2488
  var TableRow = ({ children, row }) => {
2386
2489
  const ref = useRef14(null);
2387
- const { interactive, state, styles } = useTableContext();
2490
+ const { interactive, state, ...ctx } = useTableContext();
2491
+ const { variant, size } = row.props;
2492
+ const { row: styles } = useComponentStyles27(
2493
+ "Table",
2494
+ { variant: variant || ctx.variant, size: size || ctx.size },
2495
+ { parts: ["row"] }
2496
+ );
2388
2497
  const { rowProps, isPressed } = useTableRow(
2389
2498
  {
2390
2499
  node: row
@@ -2398,27 +2507,27 @@ var TableRow = ({ children, row }) => {
2398
2507
  const { hoverProps, isHovered } = useHover7({
2399
2508
  isDisabled: disabled || !interactive
2400
2509
  });
2401
- const stateProps = useStateProps14({
2510
+ const stateProps = useStateProps16({
2402
2511
  disabled,
2403
2512
  selected,
2404
2513
  hover: isHovered,
2405
2514
  focusVisible: isFocusVisible,
2406
2515
  active: isPressed
2407
2516
  });
2408
- return /* @__PURE__ */ React56.createElement(Box32, {
2517
+ return /* @__PURE__ */ React57.createElement(Box33, {
2409
2518
  as: "tr",
2410
2519
  ref,
2411
2520
  __baseCSS: {
2412
2521
  cursor: !interactive ? "text" : disabled ? "default" : "pointer"
2413
2522
  },
2414
- css: styles.row,
2523
+ css: styles,
2415
2524
  ...mergeProps12(rowProps, focusProps, hoverProps),
2416
2525
  ...stateProps
2417
2526
  }, children);
2418
2527
  };
2419
2528
 
2420
2529
  // src/Table/TableSelectAllCell.tsx
2421
- import React57, { useRef as useRef15 } from "react";
2530
+ import React58, { useRef as useRef15 } from "react";
2422
2531
  import { useFocusRing as useFocusRing13 } from "@react-aria/focus";
2423
2532
  import { useHover as useHover8 } from "@react-aria/interactions";
2424
2533
  import {
@@ -2426,7 +2535,7 @@ import {
2426
2535
  useTableSelectAllCheckbox
2427
2536
  } from "@react-aria/table";
2428
2537
  import { mergeProps as mergeProps13 } from "@react-aria/utils";
2429
- import { Box as Box33, useStateProps as useStateProps15 } from "@marigold/system";
2538
+ import { Box as Box34, useStateProps as useStateProps17 } from "@marigold/system";
2430
2539
  var TableSelectAllCell = ({ column }) => {
2431
2540
  const ref = useRef15(null);
2432
2541
  const { state, styles } = useTableContext();
@@ -2440,11 +2549,11 @@ var TableSelectAllCell = ({ column }) => {
2440
2549
  const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
2441
2550
  const { hoverProps, isHovered } = useHover8({});
2442
2551
  const { focusProps, isFocusVisible } = useFocusRing13();
2443
- const stateProps = useStateProps15({
2552
+ const stateProps = useStateProps17({
2444
2553
  hover: isHovered,
2445
2554
  focusVisible: isFocusVisible
2446
2555
  });
2447
- return /* @__PURE__ */ React57.createElement(Box33, {
2556
+ return /* @__PURE__ */ React58.createElement(Box34, {
2448
2557
  as: "th",
2449
2558
  ref,
2450
2559
  __baseCSS: {
@@ -2455,7 +2564,7 @@ var TableSelectAllCell = ({ column }) => {
2455
2564
  css: styles.header,
2456
2565
  ...mergeProps13(columnHeaderProps, hoverProps, focusProps),
2457
2566
  ...stateProps
2458
- }, /* @__PURE__ */ React57.createElement(Checkbox, {
2567
+ }, /* @__PURE__ */ React58.createElement(Checkbox, {
2459
2568
  ...checkboxProps
2460
2569
  }));
2461
2570
  };
@@ -2476,15 +2585,15 @@ var Table = ({
2476
2585
  showSelectionCheckboxes: selectionMode === "multiple" && props.selectionBehavior !== "replace"
2477
2586
  });
2478
2587
  const { gridProps } = useTable(props, state, tableRef);
2479
- const styles = useComponentStyles29(
2588
+ const styles = useComponentStyles28(
2480
2589
  "Table",
2481
2590
  { variant, size },
2482
2591
  { parts: ["table", "header", "row", "cell"] }
2483
2592
  );
2484
2593
  const { collection } = state;
2485
- return /* @__PURE__ */ React58.createElement(TableContext.Provider, {
2594
+ return /* @__PURE__ */ React59.createElement(TableContext.Provider, {
2486
2595
  value: { state, interactive, styles }
2487
- }, /* @__PURE__ */ React58.createElement(Box34, {
2596
+ }, /* @__PURE__ */ React59.createElement(Box35, {
2488
2597
  as: "table",
2489
2598
  ref: tableRef,
2490
2599
  __baseCSS: {
@@ -2496,30 +2605,30 @@ var Table = ({
2496
2605
  },
2497
2606
  css: styles.table,
2498
2607
  ...gridProps
2499
- }, /* @__PURE__ */ React58.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React58.createElement(TableHeaderRow, {
2608
+ }, /* @__PURE__ */ React59.createElement(TableHeader, null, collection.headerRows.map((headerRow) => /* @__PURE__ */ React59.createElement(TableHeaderRow, {
2500
2609
  key: headerRow.key,
2501
2610
  item: headerRow
2502
2611
  }, [...headerRow.childNodes].map(
2503
2612
  (column) => {
2504
2613
  var _a;
2505
- return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React58.createElement(TableSelectAllCell, {
2614
+ return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React59.createElement(TableSelectAllCell, {
2506
2615
  key: column.key,
2507
2616
  column
2508
- }) : /* @__PURE__ */ React58.createElement(TableColumnHeader, {
2617
+ }) : /* @__PURE__ */ React59.createElement(TableColumnHeader, {
2509
2618
  key: column.key,
2510
2619
  column
2511
2620
  });
2512
2621
  }
2513
- )))), /* @__PURE__ */ React58.createElement(TableBody, null, [...collection.body.childNodes].map((row) => /* @__PURE__ */ React58.createElement(TableRow, {
2622
+ )))), /* @__PURE__ */ React59.createElement(TableBody, null, [...collection.body.childNodes].map((row) => /* @__PURE__ */ React59.createElement(TableRow, {
2514
2623
  key: row.key,
2515
2624
  row
2516
2625
  }, [...row.childNodes].map(
2517
2626
  (cell) => {
2518
2627
  var _a;
2519
- return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React58.createElement(TableCheckboxCell, {
2628
+ return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ React59.createElement(TableCheckboxCell, {
2520
2629
  key: cell.key,
2521
2630
  cell
2522
- }) : /* @__PURE__ */ React58.createElement(TableCell, {
2631
+ }) : /* @__PURE__ */ React59.createElement(TableCell, {
2523
2632
  key: cell.key,
2524
2633
  cell
2525
2634
  });
@@ -2533,11 +2642,11 @@ Table.Header = Header2;
2533
2642
  Table.Row = Row;
2534
2643
 
2535
2644
  // src/Text/Text.tsx
2536
- import React59 from "react";
2645
+ import React60 from "react";
2537
2646
  import {
2538
- useComponentStyles as useComponentStyles30
2647
+ useComponentStyles as useComponentStyles29
2539
2648
  } from "@marigold/system";
2540
- import { Box as Box35 } from "@marigold/system";
2649
+ import { Box as Box36 } from "@marigold/system";
2541
2650
  var Text = ({
2542
2651
  variant,
2543
2652
  size,
@@ -2550,11 +2659,11 @@ var Text = ({
2550
2659
  children,
2551
2660
  ...props
2552
2661
  }) => {
2553
- const styles = useComponentStyles30("Text", {
2662
+ const styles = useComponentStyles29("Text", {
2554
2663
  variant,
2555
2664
  size
2556
2665
  });
2557
- return /* @__PURE__ */ React59.createElement(Box35, {
2666
+ return /* @__PURE__ */ React60.createElement(Box36, {
2558
2667
  as: "p",
2559
2668
  ...props,
2560
2669
  css: [
@@ -2565,17 +2674,17 @@ var Text = ({
2565
2674
  };
2566
2675
 
2567
2676
  // src/TextArea/TextArea.tsx
2568
- import React60, { forwardRef as forwardRef13 } from "react";
2677
+ import React61, { forwardRef as forwardRef14 } from "react";
2569
2678
  import { useHover as useHover9 } from "@react-aria/interactions";
2570
2679
  import { useFocusRing as useFocusRing14 } from "@react-aria/focus";
2571
2680
  import { useTextField } from "@react-aria/textfield";
2572
- import { useObjectRef as useObjectRef11 } from "@react-aria/utils";
2681
+ import { useObjectRef as useObjectRef14 } from "@react-aria/utils";
2573
2682
  import {
2574
- Box as Box36,
2575
- useComponentStyles as useComponentStyles31,
2576
- useStateProps as useStateProps16
2683
+ Box as Box37,
2684
+ useComponentStyles as useComponentStyles30,
2685
+ useStateProps as useStateProps18
2577
2686
  } from "@marigold/system";
2578
- var TextArea = forwardRef13(
2687
+ var TextArea = forwardRef14(
2579
2688
  ({
2580
2689
  variant,
2581
2690
  size,
@@ -2588,7 +2697,7 @@ var TextArea = forwardRef13(
2588
2697
  ...props
2589
2698
  }, ref) => {
2590
2699
  const { label, description, errorMessage } = props;
2591
- const textAreaRef = useObjectRef11(ref);
2700
+ const textAreaRef = useObjectRef14(ref);
2592
2701
  const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField(
2593
2702
  {
2594
2703
  inputElementType: "textarea",
@@ -2602,15 +2711,15 @@ var TextArea = forwardRef13(
2602
2711
  );
2603
2712
  const { hoverProps, isHovered } = useHover9({});
2604
2713
  const { focusProps, isFocusVisible } = useFocusRing14();
2605
- const stateProps = useStateProps16({
2714
+ const stateProps = useStateProps18({
2606
2715
  hover: isHovered,
2607
2716
  focus: isFocusVisible,
2608
2717
  disabled,
2609
2718
  readOnly,
2610
2719
  error
2611
2720
  });
2612
- const styles = useComponentStyles31("TextArea", { variant, size });
2613
- return /* @__PURE__ */ React60.createElement(FieldBase, {
2721
+ const styles = useComponentStyles30("TextArea", { variant, size });
2722
+ return /* @__PURE__ */ React61.createElement(FieldBase, {
2614
2723
  label,
2615
2724
  labelProps,
2616
2725
  required,
@@ -2623,7 +2732,7 @@ var TextArea = forwardRef13(
2623
2732
  variant,
2624
2733
  size,
2625
2734
  width
2626
- }, /* @__PURE__ */ React60.createElement(Box36, {
2735
+ }, /* @__PURE__ */ React61.createElement(Box37, {
2627
2736
  as: "textarea",
2628
2737
  css: styles,
2629
2738
  ref: textAreaRef,
@@ -2637,16 +2746,16 @@ var TextArea = forwardRef13(
2637
2746
  );
2638
2747
 
2639
2748
  // src/TextField/TextField.tsx
2640
- import React61, { forwardRef as forwardRef14 } from "react";
2749
+ import React62, { forwardRef as forwardRef15 } from "react";
2641
2750
  import { useHover as useHover10 } from "@react-aria/interactions";
2642
2751
  import { useFocusRing as useFocusRing15 } from "@react-aria/focus";
2643
2752
  import { useTextField as useTextField2 } from "@react-aria/textfield";
2644
- import { useObjectRef as useObjectRef12 } from "@react-aria/utils";
2645
- import { useStateProps as useStateProps17 } from "@marigold/system";
2646
- var TextField = forwardRef14(
2753
+ import { useObjectRef as useObjectRef15 } from "@react-aria/utils";
2754
+ import { useStateProps as useStateProps19 } from "@marigold/system";
2755
+ var TextField = forwardRef15(
2647
2756
  ({ variant, size, width, disabled, required, readOnly, error, ...props }, ref) => {
2648
2757
  const { label, description, errorMessage, autoFocus } = props;
2649
- const inputRef = useObjectRef12(ref);
2758
+ const inputRef = useObjectRef15(ref);
2650
2759
  const { labelProps, inputProps, descriptionProps, errorMessageProps } = useTextField2(
2651
2760
  {
2652
2761
  isDisabled: disabled,
@@ -2662,14 +2771,14 @@ var TextField = forwardRef14(
2662
2771
  isTextInput: true,
2663
2772
  autoFocus
2664
2773
  });
2665
- const stateProps = useStateProps17({
2774
+ const stateProps = useStateProps19({
2666
2775
  hover: isHovered,
2667
2776
  focus: isFocusVisible,
2668
2777
  disabled,
2669
2778
  readOnly,
2670
2779
  error
2671
2780
  });
2672
- return /* @__PURE__ */ React61.createElement(FieldBase, {
2781
+ return /* @__PURE__ */ React62.createElement(FieldBase, {
2673
2782
  label,
2674
2783
  labelProps,
2675
2784
  required,
@@ -2682,7 +2791,7 @@ var TextField = forwardRef14(
2682
2791
  variant,
2683
2792
  size,
2684
2793
  width
2685
- }, /* @__PURE__ */ React61.createElement(Input, {
2794
+ }, /* @__PURE__ */ React62.createElement(Input, {
2686
2795
  ref: inputRef,
2687
2796
  variant,
2688
2797
  size,
@@ -2695,7 +2804,7 @@ var TextField = forwardRef14(
2695
2804
  );
2696
2805
 
2697
2806
  // src/Tiles/Tiles.tsx
2698
- import React62 from "react";
2807
+ import React63 from "react";
2699
2808
  import { useTheme as useTheme3 } from "@marigold/system";
2700
2809
  var Tiles = ({
2701
2810
  space = "none",
@@ -2711,7 +2820,7 @@ var Tiles = ({
2711
2820
  if (stretch) {
2712
2821
  column = `minmax(${column}, 1fr)`;
2713
2822
  }
2714
- return /* @__PURE__ */ React62.createElement(Box, {
2823
+ return /* @__PURE__ */ React63.createElement(Box, {
2715
2824
  ...props,
2716
2825
  css: {
2717
2826
  display: "grid",
@@ -2723,11 +2832,11 @@ var Tiles = ({
2723
2832
  };
2724
2833
 
2725
2834
  // src/Tooltip/Tooltip.tsx
2726
- import React64 from "react";
2835
+ import React65 from "react";
2727
2836
  import { useTooltip } from "@react-aria/tooltip";
2728
2837
  import {
2729
- Box as Box37,
2730
- useComponentStyles as useComponentStyles32
2838
+ Box as Box38,
2839
+ useComponentStyles as useComponentStyles31
2731
2840
  } from "@marigold/system";
2732
2841
 
2733
2842
  // src/Tooltip/Context.ts
@@ -2736,9 +2845,9 @@ var TooltipContext = createContext8({});
2736
2845
  var useTooltipContext = () => useContext8(TooltipContext);
2737
2846
 
2738
2847
  // src/Tooltip/TooltipTrigger.tsx
2739
- import React63, { useRef as useRef17 } from "react";
2848
+ import React64, { useRef as useRef17 } from "react";
2740
2849
  import { FocusableProvider } from "@react-aria/focus";
2741
- import { useOverlayPosition as useOverlayPosition3 } from "@react-aria/overlays";
2850
+ import { useOverlayPosition } from "@react-aria/overlays";
2742
2851
  import { useTooltipTrigger } from "@react-aria/tooltip";
2743
2852
  import { useTooltipTriggerState } from "@react-stately/tooltip";
2744
2853
  var TooltipTrigger = ({
@@ -2749,7 +2858,7 @@ var TooltipTrigger = ({
2749
2858
  children,
2750
2859
  ...rest
2751
2860
  }) => {
2752
- const [tooltipTrigger, tooltip] = React63.Children.toArray(children);
2861
+ const [tooltipTrigger, tooltip] = React64.Children.toArray(children);
2753
2862
  const props = {
2754
2863
  ...rest,
2755
2864
  isDisabled: disabled,
@@ -2769,7 +2878,7 @@ var TooltipTrigger = ({
2769
2878
  overlayProps: positionProps,
2770
2879
  placement: overlayPlacement,
2771
2880
  arrowProps
2772
- } = useOverlayPosition3({
2881
+ } = useOverlayPosition({
2773
2882
  placement: props.placement,
2774
2883
  targetRef: tooltipTriggerRef,
2775
2884
  offset: props.offset,
@@ -2777,10 +2886,10 @@ var TooltipTrigger = ({
2777
2886
  isOpen: state.isOpen,
2778
2887
  overlayRef
2779
2888
  });
2780
- return /* @__PURE__ */ React63.createElement(FocusableProvider, {
2889
+ return /* @__PURE__ */ React64.createElement(FocusableProvider, {
2781
2890
  ref: tooltipTriggerRef,
2782
2891
  ...triggerProps
2783
- }, tooltipTrigger, /* @__PURE__ */ React63.createElement(TooltipContext.Provider, {
2892
+ }, tooltipTrigger, /* @__PURE__ */ React64.createElement(TooltipContext.Provider, {
2784
2893
  value: {
2785
2894
  state,
2786
2895
  overlayRef,
@@ -2789,7 +2898,7 @@ var TooltipTrigger = ({
2789
2898
  ...tooltipProps,
2790
2899
  ...positionProps
2791
2900
  }
2792
- }, /* @__PURE__ */ React63.createElement(Overlay, {
2901
+ }, /* @__PURE__ */ React64.createElement(Overlay, {
2793
2902
  open: state.isOpen
2794
2903
  }, tooltip)));
2795
2904
  };
@@ -2798,18 +2907,18 @@ var TooltipTrigger = ({
2798
2907
  var Tooltip = ({ children, variant, size }) => {
2799
2908
  const { arrowProps, state, overlayRef, placement, ...rest } = useTooltipContext();
2800
2909
  const { tooltipProps } = useTooltip({}, state);
2801
- const styles = useComponentStyles32(
2910
+ const styles = useComponentStyles31(
2802
2911
  "Tooltip",
2803
2912
  { variant, size },
2804
2913
  { parts: ["container", "arrow"] }
2805
2914
  );
2806
- return /* @__PURE__ */ React64.createElement(Box37, {
2915
+ return /* @__PURE__ */ React65.createElement(Box38, {
2807
2916
  ...tooltipProps,
2808
2917
  ...rest,
2809
2918
  ref: overlayRef,
2810
2919
  css: styles.container,
2811
2920
  "data-placement": placement
2812
- }, /* @__PURE__ */ React64.createElement("div", null, children), /* @__PURE__ */ React64.createElement(Box37, {
2921
+ }, /* @__PURE__ */ React65.createElement("div", null, children), /* @__PURE__ */ React65.createElement(Box38, {
2813
2922
  ...arrowProps,
2814
2923
  __baseCSS: {
2815
2924
  position: "absolute",
@@ -2826,122 +2935,122 @@ var Tooltip = ({ children, variant, size }) => {
2826
2935
  Tooltip.Trigger = TooltipTrigger;
2827
2936
 
2828
2937
  // src/XLoader/XLoader.tsx
2829
- import { SVG } from "@marigold/system";
2830
- import React65, { forwardRef as forwardRef15 } from "react";
2831
- var XLoader = forwardRef15((props, ref) => /* @__PURE__ */ React65.createElement(SVG, {
2938
+ import { SVG as SVG3 } from "@marigold/system";
2939
+ import React66, { forwardRef as forwardRef16 } from "react";
2940
+ var XLoader = forwardRef16((props, ref) => /* @__PURE__ */ React66.createElement(SVG3, {
2832
2941
  id: "XLoader",
2833
2942
  xmlns: "http://www.w3.org/2000/svg",
2834
2943
  size: 150,
2835
2944
  viewBox: "0 0 150 150",
2836
2945
  ...props,
2837
2946
  ...ref
2838
- }, /* @__PURE__ */ React65.createElement("path", {
2947
+ }, /* @__PURE__ */ React66.createElement("path", {
2839
2948
  id: "XMLID_1_",
2840
2949
  d: "M35.3 27h26.5l54 74.1H88.7z"
2841
- }), /* @__PURE__ */ React65.createElement("path", {
2950
+ }), /* @__PURE__ */ React66.createElement("path", {
2842
2951
  id: "XMLID_5_",
2843
2952
  d: "M124.3 12.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
2844
- }, /* @__PURE__ */ React65.createElement("animate", {
2953
+ }, /* @__PURE__ */ React66.createElement("animate", {
2845
2954
  attributeName: "opacity",
2846
2955
  attributeType: "XML",
2847
2956
  values: "1; .01; 1; 1; 1;",
2848
2957
  begin: "1.0s",
2849
2958
  dur: "2.5s",
2850
2959
  repeatCount: "indefinite"
2851
- })), /* @__PURE__ */ React65.createElement("path", {
2960
+ })), /* @__PURE__ */ React66.createElement("path", {
2852
2961
  id: "XMLID_18_",
2853
2962
  d: "M115.9 24.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
2854
- }, /* @__PURE__ */ React65.createElement("animate", {
2963
+ }, /* @__PURE__ */ React66.createElement("animate", {
2855
2964
  attributeName: "opacity",
2856
2965
  attributeType: "XML",
2857
2966
  values: "1; .01; 1; 1; 1;",
2858
2967
  begin: "0.9s",
2859
2968
  dur: "2.5s",
2860
2969
  repeatCount: "indefinite"
2861
- })), /* @__PURE__ */ React65.createElement("path", {
2970
+ })), /* @__PURE__ */ React66.createElement("path", {
2862
2971
  id: "XMLID_19_",
2863
2972
  d: "M107.5 35.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
2864
- }, /* @__PURE__ */ React65.createElement("animate", {
2973
+ }, /* @__PURE__ */ React66.createElement("animate", {
2865
2974
  attributeName: "opacity",
2866
2975
  attributeType: "XML",
2867
2976
  values: "1; .01; 1; 1; 1;",
2868
2977
  begin: "0.8s",
2869
2978
  dur: "2.5s",
2870
2979
  repeatCount: "indefinite"
2871
- })), /* @__PURE__ */ React65.createElement("path", {
2980
+ })), /* @__PURE__ */ React66.createElement("path", {
2872
2981
  id: "XMLID_20_",
2873
2982
  d: "M99.1 47.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
2874
- }, /* @__PURE__ */ React65.createElement("animate", {
2983
+ }, /* @__PURE__ */ React66.createElement("animate", {
2875
2984
  attributeName: "opacity",
2876
2985
  attributeType: "XML",
2877
2986
  values: "1; .01; 1; 1; 1;",
2878
2987
  begin: "0.7s",
2879
2988
  dur: "2.5s",
2880
2989
  repeatCount: "indefinite"
2881
- })), /* @__PURE__ */ React65.createElement("path", {
2990
+ })), /* @__PURE__ */ React66.createElement("path", {
2882
2991
  id: "XMLID_21_",
2883
2992
  d: "M90.7 59H90c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.8-2.2 4.9-4.9 4.9z"
2884
- }, /* @__PURE__ */ React65.createElement("animate", {
2993
+ }, /* @__PURE__ */ React66.createElement("animate", {
2885
2994
  attributeName: "opacity",
2886
2995
  attributeType: "XML",
2887
2996
  values: "1; .01; 1; 1; 1;",
2888
2997
  begin: "0.6s",
2889
2998
  dur: "2.5s",
2890
2999
  repeatCount: "indefinite"
2891
- })), /* @__PURE__ */ React65.createElement("path", {
3000
+ })), /* @__PURE__ */ React66.createElement("path", {
2892
3001
  id: "XMLID_22_",
2893
3002
  d: "M68 89.8h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.8c0 2.6-2.2 4.8-4.9 4.8z"
2894
- }, /* @__PURE__ */ React65.createElement("animate", {
3003
+ }, /* @__PURE__ */ React66.createElement("animate", {
2895
3004
  attributeName: "opacity",
2896
3005
  attributeType: "XML",
2897
3006
  values: "1; .01; 1; 1; 1;",
2898
3007
  begin: "0.5s",
2899
3008
  dur: "2.5s",
2900
3009
  repeatCount: "indefinite"
2901
- })), /* @__PURE__ */ React65.createElement("path", {
3010
+ })), /* @__PURE__ */ React66.createElement("path", {
2902
3011
  id: "XMLID_23_",
2903
3012
  d: "M59.6 101.4h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c0 2.7-2.2 4.9-4.9 4.9z"
2904
- }, /* @__PURE__ */ React65.createElement("animate", {
3013
+ }, /* @__PURE__ */ React66.createElement("animate", {
2905
3014
  attributeName: "opacity",
2906
3015
  attributeType: "XML",
2907
3016
  values: "1; .01; 1; 1; 1;",
2908
3017
  begin: "0.4s",
2909
3018
  dur: "2.5s",
2910
3019
  repeatCount: "indefinite"
2911
- })), /* @__PURE__ */ React65.createElement("path", {
3020
+ })), /* @__PURE__ */ React66.createElement("path", {
2912
3021
  id: "XMLID_24_",
2913
3022
  d: "M51.2 112.9h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z"
2914
- }, /* @__PURE__ */ React65.createElement("animate", {
3023
+ }, /* @__PURE__ */ React66.createElement("animate", {
2915
3024
  attributeName: "opacity",
2916
3025
  attributeType: "XML",
2917
3026
  values: "1; .01; 1; 1; 1;",
2918
3027
  begin: "0.3s",
2919
3028
  dur: "2.5s",
2920
3029
  repeatCount: "indefinite"
2921
- })), /* @__PURE__ */ React65.createElement("path", {
3030
+ })), /* @__PURE__ */ React66.createElement("path", {
2922
3031
  id: "XMLID_25_",
2923
3032
  d: "M42.8 124.5h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z"
2924
- }, /* @__PURE__ */ React65.createElement("animate", {
3033
+ }, /* @__PURE__ */ React66.createElement("animate", {
2925
3034
  attributeName: "opacity",
2926
3035
  attributeType: "XML",
2927
3036
  values: "1; .01; 1; 1; 1;",
2928
3037
  begin: "0.2s",
2929
3038
  dur: "2.5s",
2930
3039
  repeatCount: "indefinite"
2931
- })), /* @__PURE__ */ React65.createElement("path", {
3040
+ })), /* @__PURE__ */ React66.createElement("path", {
2932
3041
  id: "XMLID_26_",
2933
3042
  d: "M34.4 136h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.7-2.2 4.9-4.9 4.9z"
2934
- }, /* @__PURE__ */ React65.createElement("animate", {
3043
+ }, /* @__PURE__ */ React66.createElement("animate", {
2935
3044
  attributeName: "opacity",
2936
3045
  attributeType: "XML",
2937
3046
  values: "1; .01; 1; 1; 1;",
2938
3047
  begin: "0.1s",
2939
3048
  dur: "2.5s",
2940
3049
  repeatCount: "indefinite"
2941
- })), /* @__PURE__ */ React65.createElement("path", {
3050
+ })), /* @__PURE__ */ React66.createElement("path", {
2942
3051
  id: "XMLID_27_",
2943
3052
  d: "M26 147.6h-.7c-2.7 0-4.9-2.2-4.9-4.9v-.7c0-2.7 2.2-4.9 4.9-4.9h.7c2.7 0 4.9 2.2 4.9 4.9v.7c-.1 2.8-2.2 4.9-4.9 4.9z"
2944
- }, /* @__PURE__ */ React65.createElement("animate", {
3053
+ }, /* @__PURE__ */ React66.createElement("animate", {
2945
3054
  attributeName: "opacity",
2946
3055
  attributeType: "XML",
2947
3056
  values: "1; .01; 1; 1; 1;",
@@ -2978,6 +3087,7 @@ export {
2978
3087
  MarigoldProvider,
2979
3088
  Menu,
2980
3089
  Message,
3090
+ Modal,
2981
3091
  NumberField,
2982
3092
  Overlay,
2983
3093
  Popover,
@@ -2995,6 +3105,8 @@ export {
2995
3105
  ThemeProvider2 as ThemeProvider,
2996
3106
  Tiles,
2997
3107
  Tooltip,
3108
+ Tray,
3109
+ TrayWrapper,
2998
3110
  Underlay,
2999
3111
  VisuallyHidden,
3000
3112
  XLoader,