@marigold/components 6.10.0 → 7.0.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
@@ -252,7 +252,6 @@ var Aside = ({
252
252
  sideWidth,
253
253
  space = 0,
254
254
  side = "left",
255
- stretch = true,
256
255
  wrap = "50%"
257
256
  }) => {
258
257
  const [left, right] = Children2.toArray(children);
@@ -260,34 +259,24 @@ var Aside = ({
260
259
  aside: createVar({ sideWidth }),
261
260
  content: createVar({ wrap })
262
261
  };
263
- return /* @__PURE__ */ jsxs2(
264
- "div",
265
- {
266
- className: cn2(
267
- "flex flex-wrap",
268
- gapSpace[space],
269
- !stretch && "items-start"
270
- ),
271
- children: [
272
- /* @__PURE__ */ jsx5(
273
- "div",
274
- {
275
- className: classNames[side === "left" ? "aside" : "content"],
276
- style: vars[side === "left" ? "aside" : "content"],
277
- children: left
278
- }
279
- ),
280
- /* @__PURE__ */ jsx5(
281
- "div",
282
- {
283
- className: classNames[side === "right" ? "aside" : "content"],
284
- style: vars[side === "right" ? "aside" : "content"],
285
- children: right
286
- }
287
- )
288
- ]
289
- }
290
- );
262
+ return /* @__PURE__ */ jsxs2("div", { className: cn2("flex flex-wrap", gapSpace[space]), children: [
263
+ /* @__PURE__ */ jsx5(
264
+ "div",
265
+ {
266
+ className: classNames[side === "left" ? "aside" : "content"],
267
+ style: vars[side === "left" ? "aside" : "content"],
268
+ children: left
269
+ }
270
+ ),
271
+ /* @__PURE__ */ jsx5(
272
+ "div",
273
+ {
274
+ className: classNames[side === "right" ? "aside" : "content"],
275
+ style: vars[side === "right" ? "aside" : "content"],
276
+ children: right
277
+ }
278
+ )
279
+ ] });
291
280
  };
292
281
 
293
282
  // src/Aspect/Aspect.tsx
@@ -313,31 +302,26 @@ var Aspect = ({
313
302
  };
314
303
 
315
304
  // src/Autocomplete/Autocomplete.tsx
316
- import { useRef as useRef7 } from "react";
317
- import { useSearchAutocomplete } from "@react-aria/autocomplete";
318
- import { useFilter } from "@react-aria/i18n";
319
- import { Item as Item2 } from "@react-stately/collections";
320
- import { useComboBoxState } from "@react-stately/combobox";
321
-
322
- // src/FieldBase/FieldBase.tsx
323
305
  import {
324
- cn as cn6,
325
- width as twWidth,
326
- useClassNames as useClassNames4
327
- } from "@marigold/system";
306
+ forwardRef as forwardRef8
307
+ } from "react";
308
+ import React2 from "react";
309
+ import { ComboBox, ComboBoxStateContext as ComboBoxStateContext2 } from "react-aria-components";
328
310
 
329
- // src/HelpText/HelpText.tsx
330
- import { SVG as SVG3, cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
331
- import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
311
+ // src/FieldBase/_FieldBase.tsx
312
+ import { forwardRef as forwardRef3 } from "react";
313
+ import { cn as cn6, width as twWidth, useClassNames as useClassNames4 } from "@marigold/system";
314
+
315
+ // src/HelpText/_HelpText.tsx
316
+ import { FieldError, Text } from "react-aria-components";
317
+ import { cn as cn4, useClassNames as useClassNames2 } from "@marigold/system";
318
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
332
319
  var HelpText = ({
333
320
  variant,
334
321
  size,
335
- disabled,
336
322
  description,
337
- descriptionProps,
338
323
  error,
339
324
  errorMessage,
340
- errorMessageProps,
341
325
  ...props
342
326
  }) => {
343
327
  const hasErrorMessage = errorMessage && error;
@@ -346,31 +330,37 @@ var HelpText = ({
346
330
  variant,
347
331
  size
348
332
  });
349
- return /* @__PURE__ */ jsx7(
350
- "div",
351
- {
352
- ...props,
353
- ...hasErrorMessage ? errorMessageProps : descriptionProps,
354
- className: cn4("flex items-center gap-1", classNames2.container),
355
- children: hasErrorMessage ? /* @__PURE__ */ jsxs3(Fragment, { children: [
356
- /* @__PURE__ */ jsx7(
357
- SVG3,
358
- {
359
- className: cn4("h-4 w-4", classNames2.icon),
360
- viewBox: "0 0 24 24",
361
- role: "presentation",
362
- children: /* @__PURE__ */ jsx7("path", { 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" })
363
- }
364
- ),
365
- errorMessage
366
- ] }) : /* @__PURE__ */ jsx7(Fragment, { children: description })
367
- }
368
- );
333
+ if (!description && !errorMessage) {
334
+ return null;
335
+ }
336
+ return /* @__PURE__ */ jsxs3("div", { className: cn4(classNames2.container), children: [
337
+ /* @__PURE__ */ jsxs3(
338
+ FieldError,
339
+ {
340
+ ...props,
341
+ className: "grid grid-flow-col items-center justify-start gap-1",
342
+ children: [
343
+ /* @__PURE__ */ jsx7(
344
+ "svg",
345
+ {
346
+ className: cn4("h-4 w-4", classNames2.icon),
347
+ viewBox: "0 0 24 24",
348
+ role: "presentation",
349
+ fill: "currentColor",
350
+ children: /* @__PURE__ */ jsx7("path", { 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" })
351
+ }
352
+ ),
353
+ errorMessage
354
+ ]
355
+ }
356
+ ),
357
+ !hasErrorMessage && /* @__PURE__ */ jsx7(Text, { slot: "description", children: description })
358
+ ] });
369
359
  };
370
360
 
371
361
  // src/Label/Label.tsx
372
362
  import { Label } from "react-aria-components";
373
- import { SVG as SVG4, cn as cn5, createVar as createVar3, useClassNames as useClassNames3 } from "@marigold/system";
363
+ import { SVG as SVG3, cn as cn5, createVar as createVar3, useClassNames as useClassNames3 } from "@marigold/system";
374
364
 
375
365
  // src/FieldBase/FieldGroup.tsx
376
366
  import { createContext, useContext } from "react";
@@ -395,7 +385,7 @@ var _Label = ({ size, variant, children, ...props }) => {
395
385
  children: [
396
386
  children,
397
387
  /* @__PURE__ */ jsx9(
398
- SVG4,
388
+ SVG3,
399
389
  {
400
390
  viewBox: "0 0 24 24",
401
391
  role: "presentation",
@@ -409,66 +399,62 @@ var _Label = ({ size, variant, children, ...props }) => {
409
399
  );
410
400
  };
411
401
 
412
- // src/FieldBase/FieldBase.tsx
402
+ // src/FieldBase/_FieldBase.tsx
413
403
  import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
414
- var FieldBase = ({
415
- children,
416
- variant,
417
- size,
418
- width = "full",
419
- disabled,
420
- label,
421
- labelProps,
422
- description,
423
- descriptionProps,
424
- error,
425
- errorMessage,
426
- errorMessageProps,
427
- stateProps,
428
- ...props
429
- }) => {
430
- const hasHelpText = !!description || errorMessage && error;
404
+ var fixedForwardRef = forwardRef3;
405
+ var _FieldBase = (props, ref) => {
406
+ const {
407
+ as: Component = "div",
408
+ children,
409
+ label,
410
+ size,
411
+ variant,
412
+ width = "full",
413
+ description,
414
+ errorMessage,
415
+ className,
416
+ stateProps,
417
+ ...rest
418
+ } = props;
431
419
  const classNames2 = useClassNames4({
432
420
  component: "Field",
433
421
  variant,
434
422
  size
435
423
  });
436
424
  return /* @__PURE__ */ jsxs5(
437
- "div",
425
+ Component,
438
426
  {
439
- ...props,
440
- ...stateProps,
441
- className: cn6("group/field", twWidth[width], classNames2),
427
+ ref,
428
+ className: cn6("group/field", twWidth[width], classNames2, className),
429
+ "data-required": props.isRequired ? true : void 0,
430
+ "data-error": props.isInvalid ? true : void 0,
431
+ ...rest,
442
432
  children: [
443
- label ? /* @__PURE__ */ jsx10(_Label, { variant, size, ...labelProps, children: label }) : /* @__PURE__ */ jsx10("span", { "aria-hidden": "true" }),
433
+ label ? /* @__PURE__ */ jsx10(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx10("span", { "aria-hidden": "true" }),
444
434
  children,
445
- hasHelpText && /* @__PURE__ */ jsx10(
435
+ /* @__PURE__ */ jsx10(
446
436
  HelpText,
447
437
  {
448
438
  variant,
449
439
  size,
450
- disabled,
451
440
  description,
452
- descriptionProps,
453
- error,
454
441
  errorMessage,
455
- errorMessageProps
442
+ error: props.isInvalid
456
443
  }
457
444
  )
458
445
  ]
459
446
  }
460
447
  );
461
448
  };
449
+ var FieldBase = fixedForwardRef(_FieldBase);
462
450
 
463
451
  // src/Input/Input.tsx
464
- import {
465
- cloneElement as cloneElement2,
466
- forwardRef as forwardRef3
467
- } from "react";
452
+ import { cloneElement as cloneElement2, forwardRef as forwardRef4 } from "react";
453
+ import { Input } from "react-aria-components";
468
454
  import { cn as cn7, useClassNames as useClassNames5 } from "@marigold/system";
469
455
  import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
470
- var Input = forwardRef3(
471
- ({ type = "text", icon, action, variant, size, ...props }, ref) => {
456
+ var _Input = forwardRef4(
457
+ ({ type, icon, action, variant, size, className, ...props }, ref) => {
472
458
  const classNames2 = useClassNames5({
473
459
  component: "Input",
474
460
  variant,
@@ -499,7 +485,7 @@ var Input = forwardRef3(
499
485
  children: [
500
486
  inputIcon,
501
487
  /* @__PURE__ */ jsx11(
502
- "input",
488
+ Input,
503
489
  {
504
490
  ...props,
505
491
  className: cn7(
@@ -507,7 +493,8 @@ var Input = forwardRef3(
507
493
  "disabled:cursor-not-allowed",
508
494
  "[&[type=file]]:border-none [&[type=file]]:p-0",
509
495
  "[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0",
510
- classNames2.input
496
+ classNames2.input,
497
+ className
511
498
  ),
512
499
  ref,
513
500
  type
@@ -521,10 +508,11 @@ var Input = forwardRef3(
521
508
  );
522
509
 
523
510
  // src/ListBox/ListBox.tsx
524
- import { forwardRef as forwardRef4 } from "react";
525
- import { useListBox } from "@react-aria/listbox";
526
- import { useObjectRef } from "@react-aria/utils";
527
- import { cn as cn8, useClassNames as useClassNames6 } from "@marigold/system";
511
+ import {
512
+ forwardRef as forwardRef5
513
+ } from "react";
514
+ import { ListBox } from "react-aria-components";
515
+ import { cn as cn9, useClassNames as useClassNames6 } from "@marigold/system";
528
516
 
529
517
  // src/ListBox/Context.ts
530
518
  import { createContext as createContext2, useContext as useContext2 } from "react";
@@ -532,83 +520,58 @@ var ListBoxContext = createContext2({});
532
520
  var useListBoxContext = () => useContext2(ListBoxContext);
533
521
 
534
522
  // src/ListBox/ListBoxOption.tsx
535
- import { useRef as useRef3 } from "react";
536
- import { useOption } from "@react-aria/listbox";
537
- import { mergeProps as mergeProps3 } from "@react-aria/utils";
538
- import { useStateProps as useStateProps2 } from "@marigold/system";
523
+ import { ListBoxItem } from "react-aria-components";
539
524
  import { jsx as jsx12 } from "react/jsx-runtime";
540
- var ListBoxOption = ({ item, state }) => {
541
- const ref = useRef3(null);
542
- const { optionProps, isSelected, isDisabled, isFocused } = useOption(
543
- {
544
- key: item.key
545
- },
546
- state,
547
- ref
548
- );
549
- const { onPointerUp, ...props } = optionProps;
525
+ var _ListBoxItem = (props) => {
550
526
  const { classNames: classNames2 } = useListBoxContext();
551
- const stateProps = useStateProps2({
552
- selected: isSelected,
553
- disabled: isDisabled,
554
- focusVisible: isFocused
555
- });
556
- return /* @__PURE__ */ jsx12(
557
- "li",
558
- {
559
- ref,
560
- className: classNames2.option,
561
- ...mergeProps3(props, { onPointerDown: onPointerUp }, { ...stateProps }),
562
- children: item.props.children
563
- }
564
- );
527
+ return /* @__PURE__ */ jsx12(ListBoxItem, { ...props, className: classNames2.option });
565
528
  };
566
529
 
567
530
  // src/ListBox/ListBoxSection.tsx
568
- import { useListBoxSection } from "@react-aria/listbox";
569
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
570
- var ListBoxSection = ({ section, state }) => {
531
+ import { Section } from "react-aria-components";
532
+ import { cn as cn8 } from "@marigold/system";
533
+ import { jsx as jsx13 } from "react/jsx-runtime";
534
+ var _Section = (props) => {
571
535
  const { classNames: classNames2 } = useListBoxContext();
572
- const { itemProps, headingProps, groupProps } = useListBoxSection({
573
- heading: section.rendered,
574
- "aria-label": section["aria-label"]
575
- });
576
- return /* @__PURE__ */ jsxs7("li", { className: classNames2.section, ...itemProps, children: [
577
- section.rendered && /* @__PURE__ */ jsx13("div", { className: classNames2.sectionTitle, ...headingProps, children: section.rendered }),
578
- /* @__PURE__ */ jsx13("ul", { className: classNames2.list, ...groupProps, children: [...section.props.children].map((node) => /* @__PURE__ */ jsx13(ListBoxOption, { item: node, state }, node.key)) })
579
- ] });
536
+ return /* @__PURE__ */ jsx13(
537
+ Section,
538
+ {
539
+ ...props,
540
+ className: cn8(classNames2.section, classNames2.sectionTitle)
541
+ }
542
+ );
580
543
  };
581
544
 
582
545
  // src/ListBox/ListBox.tsx
583
546
  import { jsx as jsx14 } from "react/jsx-runtime";
584
- var ListBox = forwardRef4(
585
- ({ state, variant, size, ...props }, ref) => {
586
- const innerRef = useObjectRef(ref);
587
- const { listBoxProps } = useListBox(props, state, innerRef);
547
+ var _ListBox = forwardRef5(
548
+ ({ variant, size, ...props }, ref) => {
588
549
  const classNames2 = useClassNames6({ component: "ListBox", variant, size });
589
- return /* @__PURE__ */ jsx14(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx14(
590
- "div",
550
+ return /* @__PURE__ */ jsx14(ListBoxContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx14("div", { className: classNames2.container, children: /* @__PURE__ */ jsx14(
551
+ ListBox,
591
552
  {
592
- className: cn8(
593
- "overflow-y-auto overflow-x-hidden",
594
- classNames2.container
553
+ ...props,
554
+ className: cn9(
555
+ "overflow-y-auto sm:max-h-[75vh] lg:max-h-[45vh]",
556
+ classNames2.list
595
557
  ),
596
- children: /* @__PURE__ */ jsx14("ul", { className: classNames2.list, ref: innerRef, ...listBoxProps, children: [...state.collection].map(
597
- (item) => item.type === "section" ? /* @__PURE__ */ jsx14(ListBoxSection, { section: item, state }, item.key) : /* @__PURE__ */ jsx14(ListBoxOption, { item, state }, item.key)
598
- ) })
558
+ ref,
559
+ children: props.children
599
560
  }
600
- ) });
561
+ ) }) });
601
562
  }
602
563
  );
564
+ _ListBox.Item = _ListBoxItem;
565
+ _ListBox.Section = _Section;
603
566
 
604
- // src/Overlay/Modal.tsx
605
- import { forwardRef as forwardRef5 } from "react";
606
- import { Modal } from "react-aria-components";
607
- import { useTheme } from "@marigold/system";
567
+ // src/Overlay/Popover.tsx
568
+ import { forwardRef as forwardRef6 } from "react";
569
+ import { Popover } from "react-aria-components";
570
+ import { cn as cn11, useClassNames as useClassNames8, useSmallScreen, useTheme } from "@marigold/system";
608
571
 
609
572
  // src/Overlay/Underlay.tsx
610
573
  import { ModalOverlay } from "react-aria-components";
611
- import { cn as cn9, useClassNames as useClassNames7 } from "@marigold/system";
574
+ import { cn as cn10, useClassNames as useClassNames7 } from "@marigold/system";
612
575
  import { jsx as jsx15 } from "react/jsx-runtime";
613
576
  var Underlay = ({
614
577
  size,
@@ -628,245 +591,115 @@ var Underlay = ({
628
591
  return /* @__PURE__ */ jsx15(
629
592
  ModalOverlay,
630
593
  {
631
- className: ({ isEntering, isExiting }) => cn9(
594
+ className: ({ isEntering, isExiting }) => cn10(
632
595
  "fixed inset-0 z-10 flex min-h-full items-center justify-center overflow-y-auto backdrop-blur ",
633
596
  isEntering ? "animate-in fade-in duration-300 ease-out" : "",
634
597
  isExiting ? "animate-out fade-out duration-200 ease-in" : "",
635
598
  classNames2
636
599
  ),
637
600
  ...props,
601
+ "data-testid": "underlay-id",
638
602
  children: props.children
639
603
  }
640
604
  );
641
605
  };
642
606
 
643
- // src/Overlay/Modal.tsx
644
- import { jsx as jsx16 } from "react/jsx-runtime";
645
- var _Modal = forwardRef5(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
646
- const theme = useTheme();
647
- const props = {
648
- isOpen: open,
649
- isDismissable: dismissable,
650
- isKeyboardDismissDisabled: keyboardDismissable,
651
- ...rest
652
- };
653
- return /* @__PURE__ */ jsx16(
654
- Underlay,
655
- {
656
- dismissable,
657
- keyboardDismissable,
658
- open,
659
- variant: "modal",
660
- children: /* @__PURE__ */ jsx16(Modal, { ref, "data-theme": theme.name, ...props, children: props.children })
661
- }
662
- );
663
- });
664
-
665
- // src/Overlay/Overlay.tsx
666
- import { useRef as useRef4 } from "react";
667
- import {
668
- Overlay as ReactAriaOverlay
669
- } from "@react-aria/overlays";
670
- import { useTheme as useTheme2 } from "@marigold/system";
671
- import { jsx as jsx17 } from "react/jsx-runtime";
672
- var Overlay = ({ children, container, open }) => {
673
- const nodeRef = useRef4(null);
674
- const theme = useTheme2();
675
- let mountOverlay = open;
676
- if (!mountOverlay) {
677
- return null;
678
- }
679
- return /* @__PURE__ */ jsx17(ReactAriaOverlay, { portalContainer: container, children: /* @__PURE__ */ jsx17(
680
- "div",
681
- {
682
- ref: nodeRef,
683
- "data-testid": "overlay",
684
- "data-theme": theme.name,
685
- className: "opacity-100",
686
- children
687
- }
688
- ) });
689
- };
690
-
691
607
  // src/Overlay/Popover.tsx
692
- import { forwardRef as forwardRef6, useRef as useRef5 } from "react";
693
- import { FocusScope } from "@react-aria/focus";
694
- import {
695
- DismissButton,
696
- usePopover
697
- } from "@react-aria/overlays";
698
- import { cn as cn10, useClassNames as useClassNames8 } from "@marigold/system";
699
- import { jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
700
- var Popover = forwardRef6(
701
- (props, ref) => {
702
- const fallbackRef = useRef5(null);
703
- const popoverRef = ref || fallbackRef;
704
- let { children, state, ...otherProps } = props;
705
- return /* @__PURE__ */ jsx18(Overlay, { open: state.isOpen, ...otherProps, children: /* @__PURE__ */ jsx18(PopoverWrapper, { ref: popoverRef, ...props, children }) });
706
- }
707
- );
708
- var PopoverWrapper = forwardRef6(
709
- ({
710
- children,
711
- isNonModal,
712
- state,
713
- keyboardDismissDisabled,
714
- ...props
715
- }, ref) => {
716
- const { popoverProps, underlayProps, placement } = usePopover(
717
- {
718
- ...props,
719
- isNonModal,
720
- isKeyboardDismissDisabled: keyboardDismissDisabled,
721
- popoverRef: ref,
722
- placement: "bottom left"
723
- },
724
- state
725
- );
608
+ import { Fragment, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
609
+ var _Popover = forwardRef6(
610
+ ({ keyboardDismissDisabled, placement, open, children, ...rest }, ref) => {
611
+ const props = {
612
+ isKeyboardDismissDisabled: keyboardDismissDisabled,
613
+ isOpen: open,
614
+ placement,
615
+ ...rest
616
+ };
726
617
  const classNames2 = useClassNames8({
727
618
  component: "Popover",
728
- variant: placement
619
+ variant: placement,
620
+ // Make Popover as wide as trigger element
621
+ className: "w-[--trigger-width]"
729
622
  });
730
- return /* @__PURE__ */ jsxs8(FocusScope, { restoreFocus: true, children: [
731
- !isNonModal && /* @__PURE__ */ jsx18(Underlay, { ...underlayProps }),
732
- /* @__PURE__ */ jsxs8(
733
- "div",
623
+ const isSmallScreen = useSmallScreen();
624
+ const theme = useTheme();
625
+ return /* @__PURE__ */ jsx16(Fragment, { children: isSmallScreen ? /* @__PURE__ */ jsxs7(Fragment, { children: [
626
+ /* @__PURE__ */ jsx16(Underlay, { open, variant: "modal" }),
627
+ /* @__PURE__ */ jsx16(
628
+ Popover,
734
629
  {
735
- ...popoverProps,
736
- className: cn10(
737
- "flex flex-col sm:max-h-[75vh] lg:max-h-[45vh]",
738
- classNames2
739
- ),
740
- style: {
741
- ...popoverProps.style,
742
- minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
743
- },
744
630
  ref,
745
- role: "presentation",
746
- children: [
747
- !isNonModal && /* @__PURE__ */ jsx18(DismissButton, { onDismiss: state.close }),
748
- children,
749
- /* @__PURE__ */ jsx18(DismissButton, { onDismiss: state.close })
750
- ]
631
+ ...props,
632
+ className: cn11(
633
+ "!left-0 bottom-0 !mt-auto flex !max-h-fit w-full flex-col"
634
+ ),
635
+ "data-theme": theme.name,
636
+ children
751
637
  }
752
638
  )
753
- ] });
639
+ ] }) : /* @__PURE__ */ jsx16(
640
+ Popover,
641
+ {
642
+ ref,
643
+ ...props,
644
+ className: classNames2,
645
+ offset: 0,
646
+ "data-theme": theme.name,
647
+ children
648
+ }
649
+ ) });
754
650
  }
755
651
  );
756
652
 
757
- // src/Overlay/Tray.tsx
653
+ // src/Autocomplete/ClearButton.tsx
654
+ import React from "react";
655
+ import { ComboBoxStateContext } from "react-aria-components";
656
+ import { cn as cn13 } from "@marigold/system";
657
+
658
+ // src/Button/Button.tsx
758
659
  import { forwardRef as forwardRef7 } from "react";
759
- import { FocusScope as FocusScope2 } from "@react-aria/focus";
760
- import {
761
- DismissButton as DismissButton2,
762
- useModalOverlay
763
- } from "@react-aria/overlays";
764
- import { useObjectRef as useObjectRef2 } from "@react-aria/utils";
765
-
766
- // src/Overlay/_Underlay.tsx
767
- import { cn as cn11, useClassNames as useClassNames9 } from "@marigold/system";
768
- import { jsx as jsx19 } from "react/jsx-runtime";
769
- var Underlay2 = ({ size, variant, ...props }) => {
770
- const classNames2 = useClassNames9({ component: "Underlay", size, variant });
771
- return /* @__PURE__ */ jsx19("div", { className: cn11("fixed inset-0 z-40", classNames2), ...props });
772
- };
773
-
774
- // src/Overlay/Tray.tsx
775
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
776
- var Tray = forwardRef7(
777
- ({ state, children, ...props }, ref) => {
778
- const trayRef = useObjectRef2(ref);
779
- return /* @__PURE__ */ jsx20(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx20(TrayWrapper, { state, ...props, ref: trayRef, children }) });
780
- }
781
- );
782
- var TrayWrapper = forwardRef7(
783
- ({ children, state, ...props }, ref) => {
784
- let { modalProps, underlayProps } = useModalOverlay(
660
+ import { Button } from "react-aria-components";
661
+ import { cn as cn12, useClassNames as useClassNames9 } from "@marigold/system";
662
+ import { jsx as jsx17 } from "react/jsx-runtime";
663
+ var _Button = forwardRef7(
664
+ ({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
665
+ const classNames2 = useClassNames9({
666
+ component: "Button",
667
+ variant,
668
+ size,
669
+ className
670
+ });
671
+ return /* @__PURE__ */ jsx17(
672
+ Button,
785
673
  {
786
674
  ...props,
787
- isDismissable: true
788
- },
789
- state,
790
- ref
791
- );
792
- return /* @__PURE__ */ jsx20(FocusScope2, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsx20(Underlay2, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ jsxs9(
793
- "div",
794
- {
795
- ...modalProps,
796
675
  ref,
797
- className: "absolute bottom-0 w-full",
798
- "data-testid": "tray",
799
- children: [
800
- /* @__PURE__ */ jsx20(DismissButton2, { onDismiss: state.close }),
801
- children,
802
- /* @__PURE__ */ jsx20(DismissButton2, { onDismiss: state.close })
803
- ]
676
+ className: cn12(
677
+ "inline-flex items-center justify-center gap-[0.5ch]",
678
+ classNames2,
679
+ fullWidth ? "w-full" : void 0
680
+ ),
681
+ isDisabled: disabled,
682
+ children
804
683
  }
805
- ) }) });
684
+ );
806
685
  }
807
686
  );
808
687
 
809
688
  // src/Autocomplete/ClearButton.tsx
810
- import { useRef as useRef6 } from "react";
811
- import { useButton as useButton2 } from "@react-aria/button";
812
- import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
813
- import { useHover } from "@react-aria/interactions";
814
- import { mergeProps as mergeProps4 } from "@react-aria/utils";
815
- import { cn as cn12, useStateProps as useStateProps3 } from "@marigold/system";
816
- import { jsx as jsx21 } from "react/jsx-runtime";
817
- var ClearButton = ({
818
- preventFocus,
819
- disabled,
820
- onClick,
821
- onPress,
822
- onPressStart,
823
- onPressEnd,
824
- onPressChange,
825
- onPressUp,
826
- excludeFromTabOrder,
827
- preventFocusOnPress,
828
- className,
829
- ...props
830
- }) => {
831
- const buttonRef = useRef6(null);
832
- const { hoverProps, isHovered } = useHover({ isDisabled: disabled });
833
- const { isFocusVisible, focusProps } = useFocusRing2({
834
- autoFocus: props.autoFocus
835
- });
836
- const { buttonProps, isPressed } = useButton2(
689
+ import { jsx as jsx18 } from "react/jsx-runtime";
690
+ var AutocompleteClearButton = ({ className }) => {
691
+ let state = React.useContext(ComboBoxStateContext);
692
+ return /* @__PURE__ */ jsx18(
693
+ _Button,
837
694
  {
838
- ...props,
839
- onClick,
840
- onPress,
841
- onPressStart,
842
- onPressEnd,
843
- onPressChange,
844
- onPressUp,
845
- excludeFromTabOrder,
846
- preventFocusOnPress,
847
- isDisabled: disabled
848
- },
849
- buttonRef
850
- );
851
- if (preventFocus) {
852
- delete buttonProps.tabIndex;
853
- }
854
- const stateProps = useStateProps3({
855
- active: isPressed,
856
- focusVisible: isFocusVisible,
857
- hover: isHovered
858
- });
859
- return /* @__PURE__ */ jsx21(
860
- "button",
861
- {
862
- ...mergeProps4(buttonProps, focusProps, hoverProps, props),
863
- ...stateProps,
864
- ref: buttonRef,
865
- className: cn12(
695
+ "aria-label": "Clear",
696
+ onPress: () => state == null ? void 0 : state.setInputValue(""),
697
+ variant: "icon",
698
+ className: cn13(
866
699
  "cursor-pointer appearance-none border-none p-0 pr-1",
867
700
  className
868
701
  ),
869
- children: /* @__PURE__ */ jsx21(
702
+ children: /* @__PURE__ */ jsx18(
870
703
  "svg",
871
704
  {
872
705
  xmlns: "http://www.w3.org/2000/svg",
@@ -874,7 +707,7 @@ var ClearButton = ({
874
707
  fill: "currentColor",
875
708
  width: 20,
876
709
  height: 20,
877
- children: /* @__PURE__ */ jsx21("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
710
+ children: /* @__PURE__ */ jsx18("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" })
878
711
  }
879
712
  )
880
713
  }
@@ -882,8 +715,29 @@ var ClearButton = ({
882
715
  };
883
716
 
884
717
  // src/Autocomplete/Autocomplete.tsx
885
- import { Fragment as Fragment2, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
886
- var SearchIcon = (props) => /* @__PURE__ */ jsx22(
718
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
719
+ var SearchInput = ({ onSubmit, ref }) => {
720
+ const state = React2.useContext(ComboBoxStateContext2);
721
+ return /* @__PURE__ */ jsx19(
722
+ _Input,
723
+ {
724
+ ref,
725
+ icon: /* @__PURE__ */ jsx19(SearchIcon, {}),
726
+ action: (state == null ? void 0 : state.inputValue) !== "" ? /* @__PURE__ */ jsx19(AutocompleteClearButton, {}) : void 0,
727
+ onKeyDown: (e) => {
728
+ if (e.key === "Enter" || e.key === "Escape") {
729
+ e.preventDefault();
730
+ }
731
+ if (e.key === "Enter") {
732
+ if (state.selectionManager.focusedKey === null) {
733
+ onSubmit == null ? void 0 : onSubmit(null, state.inputValue);
734
+ }
735
+ }
736
+ }
737
+ }
738
+ );
739
+ };
740
+ var SearchIcon = (props) => /* @__PURE__ */ jsx19(
887
741
  "svg",
888
742
  {
889
743
  xmlns: "http://www.w3.org/2000/svg",
@@ -892,238 +746,94 @@ var SearchIcon = (props) => /* @__PURE__ */ jsx22(
892
746
  width: 24,
893
747
  height: 24,
894
748
  ...props,
895
- children: /* @__PURE__ */ jsx22("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
749
+ children: /* @__PURE__ */ jsx19("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
896
750
  }
897
751
  );
898
- var Autocomplete = ({
899
- disabled,
900
- required,
901
- readOnly,
902
- error,
903
- onChange,
904
- value,
905
- defaultValue,
906
- variant,
907
- size,
908
- width,
909
- ...rest
910
- }) => {
911
- const { contains } = useFilter({ sensitivity: "base" });
912
- const props = {
913
- ...rest,
914
- onInputChange: onChange,
915
- inputValue: value,
916
- defaultInputValue: defaultValue,
917
- isDisabled: disabled,
918
- isRequired: required,
919
- isReadOnly: readOnly,
920
- validationState: error ? "invalid" : "valid"
921
- };
922
- const state = useComboBoxState({
923
- ...props,
924
- defaultFilter: contains,
925
- allowsCustomValue: true,
926
- onSelectionChange: (key) => {
927
- var _a;
928
- return key !== null && ((_a = props.onSubmit) == null ? void 0 : _a.call(props, key, null));
929
- },
930
- selectedKey: void 0,
931
- defaultSelectedKey: void 0
932
- });
933
- const inputRef = useRef7(null);
934
- const listBoxRef = useRef7(null);
935
- const popoverRef = useRef7(null);
936
- const { inputProps, listBoxProps, labelProps, clearButtonProps } = useSearchAutocomplete(
937
- {
938
- ...props,
939
- onSubmit: (value2, key) => {
940
- var _a;
941
- return (_a = props.onSubmit) == null ? void 0 : _a.call(props, key, value2);
942
- },
943
- popoverRef,
944
- listBoxRef,
945
- inputRef
946
- },
947
- state
948
- );
949
- const { isDisabled, ...restClearButtonProps } = clearButtonProps;
950
- return /* @__PURE__ */ jsxs10(Fragment2, { children: [
951
- /* @__PURE__ */ jsx22(
952
- FieldBase,
953
- {
954
- label: props.label,
955
- labelProps,
956
- description: props.description,
957
- error,
958
- errorMessage: props.errorMessage,
959
- disabled,
960
- width,
961
- children: /* @__PURE__ */ jsx22(
962
- Input,
963
- {
964
- ...inputProps,
965
- ref: inputRef,
966
- icon: /* @__PURE__ */ jsx22(SearchIcon, {}),
967
- action: state.inputValue !== "" ? /* @__PURE__ */ jsx22(
968
- ClearButton,
969
- {
970
- preventFocus: true,
971
- disabled: isDisabled,
972
- ...restClearButtonProps
973
- }
974
- ) : null
975
- }
976
- )
977
- }
978
- ),
979
- /* @__PURE__ */ jsx22(
980
- Popover,
981
- {
982
- state,
983
- ref: popoverRef,
984
- triggerRef: inputRef,
985
- scrollRef: listBoxRef,
986
- isNonModal: true,
987
- children: /* @__PURE__ */ jsx22(ListBox, { ref: listBoxRef, state, ...listBoxProps })
988
- }
989
- )
990
- ] });
991
- };
992
- Autocomplete.Item = Item2;
993
-
994
- // src/ComboBox/ComboBox.tsx
995
- import React from "react";
996
- import { useComboBox } from "@react-aria/combobox";
997
- import { useFilter as useFilter2 } from "@react-aria/i18n";
998
- import { Item as Item3 } from "@react-stately/collections";
999
- import { useComboBoxState as useComboBoxState2 } from "@react-stately/combobox";
1000
-
1001
- // src/Button/Button.tsx
1002
- import { forwardRef as forwardRef8 } from "react";
1003
- import { Button } from "react-aria-components";
1004
- import { cn as cn13, useClassNames as useClassNames10 } from "@marigold/system";
1005
- import { jsx as jsx23 } from "react/jsx-runtime";
1006
- var _Button = forwardRef8(
1007
- ({ children, variant, size, className, disabled, fullWidth, ...props }, ref) => {
1008
- const classNames2 = useClassNames10({
1009
- component: "Button",
1010
- variant,
1011
- size,
1012
- className
1013
- });
1014
- return /* @__PURE__ */ jsx23(
1015
- Button,
1016
- {
1017
- ...props,
1018
- ref,
1019
- className: cn13(
1020
- "inline-flex items-center justify-center gap-[0.5ch]",
1021
- classNames2,
1022
- fullWidth ? "w-full" : void 0
1023
- ),
1024
- isDisabled: disabled,
1025
- children
1026
- }
1027
- );
752
+ var _Autocomplete = forwardRef8(
753
+ ({
754
+ children,
755
+ defaultValue,
756
+ value,
757
+ onChange,
758
+ onSubmit,
759
+ disabled,
760
+ error,
761
+ readOnly,
762
+ required,
763
+ ...rest
764
+ }, ref) => {
765
+ const props = {
766
+ onSelectionChange: (key) => key !== null && (onSubmit == null ? void 0 : onSubmit(key, null)),
767
+ defaultInputValue: defaultValue,
768
+ inputValue: value,
769
+ onInputChange: onChange,
770
+ allowsCustomValue: true,
771
+ isDisabled: disabled,
772
+ isInvalid: error,
773
+ isReadOnly: readOnly,
774
+ isRequired: required,
775
+ ...rest
776
+ };
777
+ return /* @__PURE__ */ jsx19(Fragment2, { children: /* @__PURE__ */ jsxs8(FieldBase, { as: ComboBox, ...props, children: [
778
+ /* @__PURE__ */ jsx19(SearchInput, { onSubmit, ref }),
779
+ /* @__PURE__ */ jsx19(_Popover, { children: /* @__PURE__ */ jsx19(_ListBox, { children }) })
780
+ ] }) });
1028
781
  }
1029
782
  );
783
+ _Autocomplete.Item = _ListBox.Item;
1030
784
 
1031
785
  // src/ComboBox/ComboBox.tsx
1032
- import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1033
- var ComboBox = ({
1034
- error,
1035
- width,
1036
- disabled,
1037
- required,
1038
- readOnly,
1039
- defaultValue,
1040
- value,
1041
- onChange,
1042
- variant,
1043
- size,
1044
- ...rest
1045
- }) => {
1046
- const props = {
1047
- isDisabled: disabled,
1048
- isRequired: required,
1049
- isReadOnly: readOnly,
1050
- defaultInputValue: defaultValue,
1051
- inputValue: value,
1052
- onInputChange: onChange,
786
+ import { forwardRef as forwardRef9 } from "react";
787
+ import { ComboBox as ComboBox2 } from "react-aria-components";
788
+ import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
789
+ var _ComboBox = forwardRef9(
790
+ ({
791
+ variant,
792
+ size,
793
+ required,
794
+ disabled,
795
+ readOnly,
796
+ error,
797
+ defaultValue,
798
+ value,
799
+ onChange,
800
+ children,
1053
801
  ...rest
1054
- };
1055
- const { contains } = useFilter2({ sensitivity: "base" });
1056
- const state = useComboBoxState2({ ...props, defaultFilter: contains });
1057
- const buttonRef = React.useRef(null);
1058
- const inputRef = React.useRef(null);
1059
- const listBoxRef = React.useRef(null);
1060
- const popoverRef = React.useRef(null);
1061
- const {
1062
- buttonProps: triggerProps,
1063
- inputProps,
1064
- listBoxProps,
1065
- labelProps
1066
- } = useComboBox(
1067
- { ...props, inputRef, buttonRef, listBoxRef, popoverRef },
1068
- state
1069
- );
1070
- const errorMessageProps = { "aria-invalid": error };
1071
- const { label, description, errorMessage } = props;
1072
- return /* @__PURE__ */ jsxs11(Fragment3, { children: [
1073
- /* @__PURE__ */ jsx24(
1074
- FieldBase,
1075
- {
1076
- label,
1077
- labelProps,
1078
- description,
1079
- error,
1080
- errorMessage,
1081
- errorMessageProps,
1082
- width,
1083
- children: /* @__PURE__ */ jsx24(
1084
- Input,
1085
- {
1086
- ...inputProps,
1087
- ref: inputRef,
1088
- action: /* @__PURE__ */ jsx24(
1089
- _Button,
1090
- {
1091
- className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0",
1092
- ref: buttonRef,
1093
- ...triggerProps,
1094
- children: /* @__PURE__ */ jsx24(ChevronDown, { className: "h-4 w-4" })
1095
- }
1096
- )
1097
- }
1098
- )
1099
- }
1100
- ),
1101
- /* @__PURE__ */ jsx24(
1102
- Popover,
1103
- {
1104
- state,
1105
- ref: popoverRef,
1106
- triggerRef: inputRef,
1107
- scrollRef: listBoxRef,
1108
- isNonModal: true,
1109
- children: /* @__PURE__ */ jsx24(ListBox, { ref: listBoxRef, state, ...listBoxProps })
1110
- }
1111
- )
1112
- ] });
1113
- };
1114
- ComboBox.Item = Item3;
802
+ }, ref) => {
803
+ const props = {
804
+ isDisabled: disabled,
805
+ isReadOnly: readOnly,
806
+ isRequired: required,
807
+ isInvalid: error,
808
+ defaultInputValue: defaultValue,
809
+ inputValue: value,
810
+ onInputChange: onChange,
811
+ ...rest
812
+ };
813
+ return /* @__PURE__ */ jsxs9(FieldBase, { as: ComboBox2, ref, ...props, children: [
814
+ /* @__PURE__ */ jsx20(
815
+ _Input,
816
+ {
817
+ action: /* @__PURE__ */ jsx20(_Button, { className: "absolute right-2 h-4 w-4 border-none bg-transparent p-0", children: /* @__PURE__ */ jsx20(ChevronDown, { className: "h-4 w-4" }) })
818
+ }
819
+ ),
820
+ /* @__PURE__ */ jsx20(_Popover, { children: /* @__PURE__ */ jsx20(_ListBox, { children }) })
821
+ ] });
822
+ }
823
+ );
824
+ _ComboBox.Item = _ListBox.Item;
1115
825
 
1116
826
  // src/Badge/Badge.tsx
1117
- import { useClassNames as useClassNames11 } from "@marigold/system";
1118
- import { jsx as jsx25 } from "react/jsx-runtime";
827
+ import { useClassNames as useClassNames10 } from "@marigold/system";
828
+ import { jsx as jsx21 } from "react/jsx-runtime";
1119
829
  var Badge = ({ variant, size, children, ...props }) => {
1120
- const classNames2 = useClassNames11({ component: "Badge", variant, size });
1121
- return /* @__PURE__ */ jsx25("div", { ...props, className: classNames2, children });
830
+ const classNames2 = useClassNames10({ component: "Badge", variant, size });
831
+ return /* @__PURE__ */ jsx21("div", { ...props, className: classNames2, children });
1122
832
  };
1123
833
 
1124
834
  // src/Breakout/Breakout.tsx
1125
835
  import { alignment, cn as cn14, createVar as createVar4 } from "@marigold/system";
1126
- import { jsx as jsx26 } from "react/jsx-runtime";
836
+ import { jsx as jsx22 } from "react/jsx-runtime";
1127
837
  var Breakout = ({
1128
838
  height,
1129
839
  children,
@@ -1133,7 +843,7 @@ var Breakout = ({
1133
843
  ...props
1134
844
  }) => {
1135
845
  var _a, _b, _c, _d;
1136
- return /* @__PURE__ */ jsx26(
846
+ return /* @__PURE__ */ jsx22(
1137
847
  "div",
1138
848
  {
1139
849
  className: cn14(
@@ -1151,11 +861,11 @@ var Breakout = ({
1151
861
  };
1152
862
 
1153
863
  // src/Body/Body.tsx
1154
- import { useClassNames as useClassNames12 } from "@marigold/system";
1155
- import { jsx as jsx27 } from "react/jsx-runtime";
864
+ import { useClassNames as useClassNames11 } from "@marigold/system";
865
+ import { jsx as jsx23 } from "react/jsx-runtime";
1156
866
  var Body = ({ children, variant, size, ...props }) => {
1157
- const classNames2 = useClassNames12({ component: "Body", variant, size });
1158
- return /* @__PURE__ */ jsx27("section", { ...props, className: classNames2, children });
867
+ const classNames2 = useClassNames11({ component: "Body", variant, size });
868
+ return /* @__PURE__ */ jsx23("section", { ...props, className: classNames2, children });
1159
869
  };
1160
870
 
1161
871
  // src/Card/Card.tsx
@@ -1169,9 +879,9 @@ import {
1169
879
  paddingSpaceX,
1170
880
  paddingSpaceY,
1171
881
  paddingTop,
1172
- useClassNames as useClassNames13
882
+ useClassNames as useClassNames12
1173
883
  } from "@marigold/system";
1174
- import { jsx as jsx28 } from "react/jsx-runtime";
884
+ import { jsx as jsx24 } from "react/jsx-runtime";
1175
885
  var Card = ({
1176
886
  children,
1177
887
  variant,
@@ -1186,8 +896,8 @@ var Card = ({
1186
896
  pr,
1187
897
  ...props
1188
898
  }) => {
1189
- const classNames2 = useClassNames13({ component: "Card", variant, size });
1190
- return /* @__PURE__ */ jsx28(
899
+ const classNames2 = useClassNames12({ component: "Card", variant, size });
900
+ return /* @__PURE__ */ jsx24(
1191
901
  "div",
1192
902
  {
1193
903
  ...props,
@@ -1210,14 +920,14 @@ var Card = ({
1210
920
 
1211
921
  // src/Center/Center.tsx
1212
922
  import { cn as cn16, createVar as createVar5, gapSpace as gapSpace3 } from "@marigold/system";
1213
- import { jsx as jsx29 } from "react/jsx-runtime";
923
+ import { jsx as jsx25 } from "react/jsx-runtime";
1214
924
  var Center = ({
1215
925
  maxWidth = "100%",
1216
926
  space = 0,
1217
927
  children,
1218
928
  ...props
1219
929
  }) => {
1220
- return /* @__PURE__ */ jsx29(
930
+ return /* @__PURE__ */ jsx25(
1221
931
  "div",
1222
932
  {
1223
933
  ...props,
@@ -1233,11 +943,11 @@ var Center = ({
1233
943
  };
1234
944
 
1235
945
  // src/Checkbox/Checkbox.tsx
1236
- import { forwardRef as forwardRef9 } from "react";
946
+ import { forwardRef as forwardRef10 } from "react";
1237
947
  import { Checkbox } from "react-aria-components";
1238
- import { cn as cn17, useClassNames as useClassNames14 } from "@marigold/system";
1239
- import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs12 } from "react/jsx-runtime";
1240
- var CheckMark = () => /* @__PURE__ */ jsx30("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx30(
948
+ import { cn as cn17, useClassNames as useClassNames13 } from "@marigold/system";
949
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs10 } from "react/jsx-runtime";
950
+ var CheckMark = () => /* @__PURE__ */ jsx26("svg", { viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx26(
1241
951
  "path",
1242
952
  {
1243
953
  fill: "currentColor",
@@ -1245,7 +955,7 @@ var CheckMark = () => /* @__PURE__ */ jsx30("svg", { viewBox: "0 0 12 10", child
1245
955
  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"
1246
956
  }
1247
957
  ) });
1248
- var IndeterminateMark = () => /* @__PURE__ */ jsx30("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx30(
958
+ var IndeterminateMark = () => /* @__PURE__ */ jsx26("svg", { width: "12", height: "3", viewBox: "0 0 12 3", children: /* @__PURE__ */ jsx26(
1249
959
  "path",
1250
960
  {
1251
961
  fill: "currentColor",
@@ -1254,7 +964,7 @@ var IndeterminateMark = () => /* @__PURE__ */ jsx30("svg", { width: "12", height
1254
964
  }
1255
965
  ) });
1256
966
  var Icon = ({ className, checked, indeterminate, ...props }) => {
1257
- return /* @__PURE__ */ jsx30(
967
+ return /* @__PURE__ */ jsx26(
1258
968
  "div",
1259
969
  {
1260
970
  "aria-hidden": "true",
@@ -1266,11 +976,11 @@ var Icon = ({ className, checked, indeterminate, ...props }) => {
1266
976
  className
1267
977
  ),
1268
978
  ...props,
1269
- children: indeterminate ? /* @__PURE__ */ jsx30(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx30(CheckMark, {}) : null
979
+ children: indeterminate ? /* @__PURE__ */ jsx26(IndeterminateMark, {}) : checked ? /* @__PURE__ */ jsx26(CheckMark, {}) : null
1270
980
  }
1271
981
  );
1272
982
  };
1273
- var _Checkbox = forwardRef9(
983
+ var _Checkbox = forwardRef10(
1274
984
  ({
1275
985
  className,
1276
986
  indeterminate,
@@ -1295,8 +1005,8 @@ var _Checkbox = forwardRef9(
1295
1005
  defaultSelected: defaultChecked,
1296
1006
  ...rest
1297
1007
  };
1298
- const classNames2 = useClassNames14({ component: "Checkbox", variant, size });
1299
- return /* @__PURE__ */ jsx30(
1008
+ const classNames2 = useClassNames13({ component: "Checkbox", variant, size });
1009
+ return /* @__PURE__ */ jsx26(
1300
1010
  Checkbox,
1301
1011
  {
1302
1012
  ref,
@@ -1306,128 +1016,26 @@ var _Checkbox = forwardRef9(
1306
1016
  classNames2.container
1307
1017
  ),
1308
1018
  ...props,
1309
- children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs12(Fragment4, { children: [
1310
- /* @__PURE__ */ jsx30(
1019
+ children: ({ isSelected, isIndeterminate }) => /* @__PURE__ */ jsxs10(Fragment3, { children: [
1020
+ /* @__PURE__ */ jsx26(
1311
1021
  Icon,
1312
1022
  {
1313
1023
  checked: isSelected,
1314
- indeterminate: isIndeterminate,
1315
- className: classNames2.checkbox
1316
- }
1317
- ),
1318
- /* @__PURE__ */ jsx30("div", { className: classNames2.label, children })
1319
- ] })
1320
- }
1321
- );
1322
- }
1323
- );
1324
-
1325
- // src/Checkbox/CheckboxGroup.tsx
1326
- import { CheckboxGroup } from "react-aria-components";
1327
- import { useClassNames as useClassNames17 } from "@marigold/system";
1328
-
1329
- // src/FieldBase/_FieldBase.tsx
1330
- import { forwardRef as forwardRef10 } from "react";
1331
- import { cn as cn19, width as twWidth2, useClassNames as useClassNames16 } from "@marigold/system";
1332
-
1333
- // src/HelpText/_HelpText.tsx
1334
- import { FieldError, Text } from "react-aria-components";
1335
- import { cn as cn18, useClassNames as useClassNames15 } from "@marigold/system";
1336
- import { jsx as jsx31, jsxs as jsxs13 } from "react/jsx-runtime";
1337
- var HelpText2 = ({
1338
- variant,
1339
- size,
1340
- description,
1341
- error,
1342
- errorMessage,
1343
- isInvalid,
1344
- ...props
1345
- }) => {
1346
- const hasErrorMessage = errorMessage && error;
1347
- const classNames2 = useClassNames15({
1348
- component: "HelpText",
1349
- variant,
1350
- size
1351
- });
1352
- if (!description && !errorMessage) {
1353
- return null;
1354
- }
1355
- return /* @__PURE__ */ jsxs13("div", { className: cn18(classNames2.container), children: [
1356
- /* @__PURE__ */ jsxs13(
1357
- FieldError,
1358
- {
1359
- ...props,
1360
- className: "grid grid-flow-col items-center justify-start gap-1",
1361
- children: [
1362
- /* @__PURE__ */ jsx31(
1363
- "svg",
1364
- {
1365
- className: cn18("h-4 w-4", classNames2.icon),
1366
- viewBox: "0 0 24 24",
1367
- role: "presentation",
1368
- fill: "currentColor",
1369
- children: /* @__PURE__ */ jsx31("path", { 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" })
1370
- }
1371
- ),
1372
- errorMessage
1373
- ]
1374
- }
1375
- ),
1376
- !hasErrorMessage && /* @__PURE__ */ jsx31(Text, { slot: "description", children: description })
1377
- ] });
1378
- };
1379
-
1380
- // src/FieldBase/_FieldBase.tsx
1381
- import { jsx as jsx32, jsxs as jsxs14 } from "react/jsx-runtime";
1382
- var fixedForwardRef = forwardRef10;
1383
- var _FieldBase = (props, ref) => {
1384
- const {
1385
- as: Component = "div",
1386
- children,
1387
- label,
1388
- size,
1389
- variant,
1390
- width = "full",
1391
- description,
1392
- errorMessage,
1393
- className,
1394
- stateProps,
1395
- ...rest
1396
- } = props;
1397
- const classNames2 = useClassNames16({
1398
- component: "Field",
1399
- variant,
1400
- size
1401
- });
1402
- return /* @__PURE__ */ jsxs14(
1403
- Component,
1404
- {
1405
- ref,
1406
- className: cn19("group/field", twWidth2[width], classNames2, className),
1407
- "data-required": props.isRequired ? true : void 0,
1408
- "data-error": props.isInvalid ? true : void 0,
1409
- ...rest,
1410
- children: [
1411
- label ? /* @__PURE__ */ jsx32(_Label, { variant, size, children: label }) : /* @__PURE__ */ jsx32("span", { "aria-hidden": "true" }),
1412
- children,
1413
- /* @__PURE__ */ jsx32(
1414
- HelpText2,
1415
- {
1416
- variant,
1417
- size,
1418
- description,
1419
- errorMessage,
1420
- error: props.isInvalid
1421
- }
1422
- )
1423
- ]
1424
- }
1425
- );
1426
- };
1427
- var FieldBase2 = fixedForwardRef(_FieldBase);
1024
+ indeterminate: isIndeterminate,
1025
+ className: classNames2.checkbox
1026
+ }
1027
+ ),
1028
+ /* @__PURE__ */ jsx26("div", { className: classNames2.label, children })
1029
+ ] })
1030
+ }
1031
+ );
1032
+ }
1033
+ );
1428
1034
 
1429
1035
  // src/Checkbox/CheckboxGroup.tsx
1430
- import { jsx as jsx33 } from "react/jsx-runtime";
1036
+ import { CheckboxGroup } from "react-aria-components";
1037
+ import { useClassNames as useClassNames14 } from "@marigold/system";
1038
+ import { jsx as jsx27 } from "react/jsx-runtime";
1431
1039
  var _CheckboxGroup = ({
1432
1040
  children,
1433
1041
  variant,
@@ -1438,7 +1046,7 @@ var _CheckboxGroup = ({
1438
1046
  error,
1439
1047
  ...rest
1440
1048
  }) => {
1441
- const classNames2 = useClassNames17({
1049
+ const classNames2 = useClassNames14({
1442
1050
  component: "Checkbox",
1443
1051
  variant,
1444
1052
  size,
@@ -1452,13 +1060,13 @@ var _CheckboxGroup = ({
1452
1060
  isInvalid: error,
1453
1061
  ...rest
1454
1062
  };
1455
- return /* @__PURE__ */ jsx33(FieldBase2, { as: CheckboxGroup, ...props, children });
1063
+ return /* @__PURE__ */ jsx27(FieldBase, { as: CheckboxGroup, ...props, children });
1456
1064
  };
1457
1065
 
1458
1066
  // src/Columns/Columns.tsx
1459
1067
  import { Children as Children3, cloneElement as cloneElement3, isValidElement as isValidElement2 } from "react";
1460
- import { cn as cn20, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
1461
- import { jsx as jsx34 } from "react/jsx-runtime";
1068
+ import { cn as cn18, createVar as createVar6, gapSpace as gapSpace4 } from "@marigold/system";
1069
+ import { jsx as jsx28 } from "react/jsx-runtime";
1462
1070
  var Columns = ({
1463
1071
  space = 0,
1464
1072
  columns,
@@ -1474,19 +1082,19 @@ var Columns = ({
1474
1082
  )}`
1475
1083
  );
1476
1084
  }
1477
- return /* @__PURE__ */ jsx34(
1085
+ return /* @__PURE__ */ jsx28(
1478
1086
  "div",
1479
1087
  {
1480
- className: cn20(
1088
+ className: cn18(
1481
1089
  "flex flex-wrap items-stretch",
1482
1090
  stretch && "h-full",
1483
1091
  gapSpace4[space]
1484
1092
  ),
1485
1093
  ...props,
1486
- children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx34(
1094
+ children: Children3.map(children, (child, idx) => /* @__PURE__ */ jsx28(
1487
1095
  "div",
1488
1096
  {
1489
- className: cn20(
1097
+ className: cn18(
1490
1098
  "grow-[--columnSize] basis-[calc((var(--collapseAt)_-_100%)_*_999)]"
1491
1099
  ),
1492
1100
  style: createVar6({ collapseAt, columnSize: columns[idx] }),
@@ -1499,13 +1107,13 @@ var Columns = ({
1499
1107
 
1500
1108
  // src/Container/Container.tsx
1501
1109
  import {
1502
- cn as cn21,
1110
+ cn as cn19,
1503
1111
  createVar as createVar7,
1504
1112
  gridColsAlign,
1505
1113
  gridColumn,
1506
1114
  placeItems
1507
1115
  } from "@marigold/system";
1508
- import { jsx as jsx35 } from "react/jsx-runtime";
1116
+ import { jsx as jsx29 } from "react/jsx-runtime";
1509
1117
  var content = {
1510
1118
  small: "20ch",
1511
1119
  medium: "45ch",
@@ -1525,11 +1133,11 @@ var Container = ({
1525
1133
  ...props
1526
1134
  }) => {
1527
1135
  const maxWidth = contentType === "content" ? content[size] : header[size];
1528
- return /* @__PURE__ */ jsx35(
1136
+ return /* @__PURE__ */ jsx29(
1529
1137
  "div",
1530
1138
  {
1531
1139
  ...props,
1532
- className: cn21(
1140
+ className: cn19(
1533
1141
  "grid",
1534
1142
  placeItems[alignItems],
1535
1143
  gridColsAlign[align],
@@ -1544,19 +1152,19 @@ var Container = ({
1544
1152
  // src/Dialog/Dialog.tsx
1545
1153
  import { useContext as useContext3 } from "react";
1546
1154
  import { Dialog, OverlayTriggerStateContext } from "react-aria-components";
1547
- import { cn as cn23, useClassNames as useClassNames19 } from "@marigold/system";
1155
+ import { cn as cn21, useClassNames as useClassNames16 } from "@marigold/system";
1548
1156
 
1549
1157
  // src/Headline/Headline.tsx
1550
1158
  import { Heading } from "react-aria-components";
1551
1159
  import {
1552
- cn as cn22,
1160
+ cn as cn20,
1553
1161
  createVar as createVar8,
1554
1162
  get,
1555
1163
  textAlign,
1556
- useClassNames as useClassNames18,
1557
- useTheme as useTheme3
1164
+ useClassNames as useClassNames15,
1165
+ useTheme as useTheme2
1558
1166
  } from "@marigold/system";
1559
- import { jsx as jsx36 } from "react/jsx-runtime";
1167
+ import { jsx as jsx30 } from "react/jsx-runtime";
1560
1168
  var _Headline = ({
1561
1169
  variant,
1562
1170
  size,
@@ -1566,18 +1174,18 @@ var _Headline = ({
1566
1174
  level = 1,
1567
1175
  ...props
1568
1176
  }) => {
1569
- const theme = useTheme3();
1570
- const classNames2 = useClassNames18({
1177
+ const theme = useTheme2();
1178
+ const classNames2 = useClassNames15({
1571
1179
  component: "Headline",
1572
1180
  variant,
1573
1181
  size: size != null ? size : `level-${level}`
1574
1182
  });
1575
- return /* @__PURE__ */ jsx36(
1183
+ return /* @__PURE__ */ jsx30(
1576
1184
  Heading,
1577
1185
  {
1578
1186
  level: Number(level),
1579
1187
  ...props,
1580
- className: cn22(classNames2, "text-[--color]", textAlign[align]),
1188
+ className: cn20(classNames2, "text-[--color]", textAlign[align]),
1581
1189
  style: createVar8({
1582
1190
  color: color && theme.colors && get(
1583
1191
  theme.colors,
@@ -1594,11 +1202,39 @@ var _Headline = ({
1594
1202
  // src/Dialog/DialogTrigger.tsx
1595
1203
  import { Children as Children4 } from "react";
1596
1204
  import { DialogTrigger } from "react-aria-components";
1597
- import { jsx as jsx37, jsxs as jsxs15 } from "react/jsx-runtime";
1205
+
1206
+ // src/Overlay/Modal.tsx
1207
+ import { forwardRef as forwardRef11 } from "react";
1208
+ import { Modal } from "react-aria-components";
1209
+ import { useTheme as useTheme3 } from "@marigold/system";
1210
+ import { jsx as jsx31 } from "react/jsx-runtime";
1211
+ var _Modal = forwardRef11(({ open, dismissable, keyboardDismissable, ...rest }, ref) => {
1212
+ const theme = useTheme3();
1213
+ const props = {
1214
+ isOpen: open,
1215
+ isDismissable: dismissable,
1216
+ isKeyboardDismissDisabled: keyboardDismissable,
1217
+ ...rest
1218
+ };
1219
+ return /* @__PURE__ */ jsx31(
1220
+ Underlay,
1221
+ {
1222
+ dismissable,
1223
+ keyboardDismissable,
1224
+ open,
1225
+ variant: "modal",
1226
+ children: /* @__PURE__ */ jsx31(Modal, { ref, "data-theme": theme.name, ...props, children: props.children })
1227
+ }
1228
+ );
1229
+ });
1230
+
1231
+ // src/Dialog/DialogTrigger.tsx
1232
+ import { jsx as jsx32, jsxs as jsxs11 } from "react/jsx-runtime";
1598
1233
  var _DialogTrigger = ({
1599
1234
  open,
1600
1235
  dismissable,
1601
1236
  keyboardDismissable,
1237
+ isNonModal,
1602
1238
  ...rest
1603
1239
  }) => {
1604
1240
  const props = {
@@ -1609,9 +1245,11 @@ var _DialogTrigger = ({
1609
1245
  const [dialogTrigger, dialog] = children;
1610
1246
  const hasDialogTrigger = dialogTrigger.type !== _Dialog;
1611
1247
  const currentDialog = children.length < 2 ? !hasDialogTrigger && dialogTrigger : dialog;
1612
- return /* @__PURE__ */ jsxs15(DialogTrigger, { ...props, children: [
1248
+ if (isNonModal)
1249
+ return /* @__PURE__ */ jsx32(DialogTrigger, { ...props, children: props.children });
1250
+ return /* @__PURE__ */ jsxs11(DialogTrigger, { ...props, children: [
1613
1251
  hasDialogTrigger && dialogTrigger,
1614
- /* @__PURE__ */ jsx37(
1252
+ /* @__PURE__ */ jsx32(
1615
1253
  _Modal,
1616
1254
  {
1617
1255
  dismissable,
@@ -1623,18 +1261,18 @@ var _DialogTrigger = ({
1623
1261
  };
1624
1262
 
1625
1263
  // src/Dialog/Dialog.tsx
1626
- import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs16 } from "react/jsx-runtime";
1264
+ import { Fragment as Fragment4, jsx as jsx33, jsxs as jsxs12 } from "react/jsx-runtime";
1627
1265
  var CloseButton = ({ className }) => {
1628
1266
  const { close } = useContext3(OverlayTriggerStateContext);
1629
- return /* @__PURE__ */ jsx38("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx38(
1267
+ return /* @__PURE__ */ jsx33("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx33(
1630
1268
  "button",
1631
1269
  {
1632
- className: cn23(
1270
+ className: cn21(
1633
1271
  "h-4 w-4 cursor-pointer border-none p-0 leading-normal outline-0",
1634
1272
  className
1635
1273
  ),
1636
1274
  onClick: close,
1637
- children: /* @__PURE__ */ jsx38("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx38(
1275
+ children: /* @__PURE__ */ jsx33("svg", { viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx33(
1638
1276
  "path",
1639
1277
  {
1640
1278
  fillRule: "evenodd",
@@ -1645,7 +1283,7 @@ var CloseButton = ({ className }) => {
1645
1283
  }
1646
1284
  ) });
1647
1285
  };
1648
- var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx38(_Headline, { slot: "title", children });
1286
+ var DialogHeadline = ({ children }) => /* @__PURE__ */ jsx33(_Headline, { slot: "title", children });
1649
1287
  var _Dialog = ({
1650
1288
  variant,
1651
1289
  size,
@@ -1653,7 +1291,7 @@ var _Dialog = ({
1653
1291
  isNonModal,
1654
1292
  ...props
1655
1293
  }) => {
1656
- const classNames2 = useClassNames19({ component: "Dialog", variant, size });
1294
+ const classNames2 = useClassNames16({ component: "Dialog", variant, size });
1657
1295
  let state = useContext3(OverlayTriggerStateContext);
1658
1296
  let children = props.children;
1659
1297
  if (typeof children === "function") {
@@ -1662,13 +1300,13 @@ var _Dialog = ({
1662
1300
  })
1663
1301
  });
1664
1302
  }
1665
- return /* @__PURE__ */ jsx38(
1303
+ return /* @__PURE__ */ jsx33(
1666
1304
  Dialog,
1667
1305
  {
1668
1306
  ...props,
1669
- className: cn23("relative outline-none", classNames2.container),
1670
- children: /* @__PURE__ */ jsxs16(Fragment5, { children: [
1671
- closeButton && /* @__PURE__ */ jsx38(CloseButton, { className: classNames2.closeButton }),
1307
+ className: cn21("relative outline-none", classNames2.container),
1308
+ children: /* @__PURE__ */ jsxs12(Fragment4, { children: [
1309
+ closeButton && /* @__PURE__ */ jsx33(CloseButton, { className: classNames2.closeButton }),
1672
1310
  children
1673
1311
  ] })
1674
1312
  }
@@ -1679,32 +1317,132 @@ _Dialog.Headline = DialogHeadline;
1679
1317
 
1680
1318
  // src/Divider/Divider.tsx
1681
1319
  import { Separator } from "react-aria-components";
1682
- import { useClassNames as useClassNames20 } from "@marigold/system";
1683
- import { jsx as jsx39 } from "react/jsx-runtime";
1320
+ import { useClassNames as useClassNames17 } from "@marigold/system";
1321
+ import { jsx as jsx34 } from "react/jsx-runtime";
1684
1322
  var _Divider = ({ variant, ...props }) => {
1685
- const classNames2 = useClassNames20({ component: "Divider", variant });
1686
- return /* @__PURE__ */ jsx39(Separator, { className: classNames2, ...props });
1323
+ const classNames2 = useClassNames17({ component: "Divider", variant });
1324
+ return /* @__PURE__ */ jsx34(Separator, { className: classNames2, ...props });
1325
+ };
1326
+
1327
+ // src/FieldBase/FieldBase.tsx
1328
+ import {
1329
+ cn as cn23,
1330
+ width as twWidth2,
1331
+ useClassNames as useClassNames19
1332
+ } from "@marigold/system";
1333
+
1334
+ // src/HelpText/HelpText.tsx
1335
+ import { SVG as SVG4, cn as cn22, useClassNames as useClassNames18 } from "@marigold/system";
1336
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs13 } from "react/jsx-runtime";
1337
+ var HelpText2 = ({
1338
+ variant,
1339
+ size,
1340
+ disabled,
1341
+ description,
1342
+ descriptionProps,
1343
+ error,
1344
+ errorMessage,
1345
+ errorMessageProps,
1346
+ ...props
1347
+ }) => {
1348
+ const hasErrorMessage = errorMessage && error;
1349
+ const classNames2 = useClassNames18({
1350
+ component: "HelpText",
1351
+ variant,
1352
+ size
1353
+ });
1354
+ return /* @__PURE__ */ jsx35(
1355
+ "div",
1356
+ {
1357
+ ...props,
1358
+ ...hasErrorMessage ? errorMessageProps : descriptionProps,
1359
+ className: cn22("flex items-center gap-1", classNames2.container),
1360
+ children: hasErrorMessage ? /* @__PURE__ */ jsxs13(Fragment5, { children: [
1361
+ /* @__PURE__ */ jsx35(
1362
+ SVG4,
1363
+ {
1364
+ className: cn22("h-4 w-4", classNames2.icon),
1365
+ viewBox: "0 0 24 24",
1366
+ role: "presentation",
1367
+ children: /* @__PURE__ */ jsx35("path", { 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" })
1368
+ }
1369
+ ),
1370
+ errorMessage
1371
+ ] }) : /* @__PURE__ */ jsx35(Fragment5, { children: description })
1372
+ }
1373
+ );
1374
+ };
1375
+
1376
+ // src/FieldBase/FieldBase.tsx
1377
+ import { jsx as jsx36, jsxs as jsxs14 } from "react/jsx-runtime";
1378
+ var FieldBase2 = ({
1379
+ children,
1380
+ variant,
1381
+ size,
1382
+ width = "full",
1383
+ disabled,
1384
+ label,
1385
+ labelProps,
1386
+ description,
1387
+ descriptionProps,
1388
+ error,
1389
+ errorMessage,
1390
+ errorMessageProps,
1391
+ stateProps,
1392
+ ...props
1393
+ }) => {
1394
+ const hasHelpText = !!description || errorMessage && error;
1395
+ const classNames2 = useClassNames19({
1396
+ component: "Field",
1397
+ variant,
1398
+ size
1399
+ });
1400
+ return /* @__PURE__ */ jsxs14(
1401
+ "div",
1402
+ {
1403
+ ...props,
1404
+ ...stateProps,
1405
+ className: cn23("group/field", twWidth2[width], classNames2),
1406
+ children: [
1407
+ label ? /* @__PURE__ */ jsx36(_Label, { variant, size, ...labelProps, children: label }) : /* @__PURE__ */ jsx36("span", { "aria-hidden": "true" }),
1408
+ children,
1409
+ hasHelpText && /* @__PURE__ */ jsx36(
1410
+ HelpText2,
1411
+ {
1412
+ variant,
1413
+ size,
1414
+ disabled,
1415
+ description,
1416
+ descriptionProps,
1417
+ error,
1418
+ errorMessage,
1419
+ errorMessageProps
1420
+ }
1421
+ )
1422
+ ]
1423
+ }
1424
+ );
1687
1425
  };
1688
1426
 
1689
1427
  // src/Footer/Footer.tsx
1690
- import { useClassNames as useClassNames21 } from "@marigold/system";
1691
- import { jsx as jsx40 } from "react/jsx-runtime";
1428
+ import { useClassNames as useClassNames20 } from "@marigold/system";
1429
+ import { jsx as jsx37 } from "react/jsx-runtime";
1692
1430
  var Footer = ({ children, variant, size, ...props }) => {
1693
- const classNames2 = useClassNames21({ component: "Footer", variant, size });
1694
- return /* @__PURE__ */ jsx40("footer", { ...props, className: classNames2, children });
1431
+ const classNames2 = useClassNames20({ component: "Footer", variant, size });
1432
+ return /* @__PURE__ */ jsx37("footer", { ...props, className: classNames2, children });
1695
1433
  };
1696
1434
 
1697
1435
  // src/Header/Header.tsx
1698
1436
  import { Header } from "react-aria-components";
1699
- import { useClassNames as useClassNames22 } from "@marigold/system";
1700
- import { jsx as jsx41 } from "react/jsx-runtime";
1437
+ import { useClassNames as useClassNames21 } from "@marigold/system";
1438
+ import { jsx as jsx38 } from "react/jsx-runtime";
1701
1439
  var _Header = ({ variant, size, ...props }) => {
1702
- const classNames2 = useClassNames22({
1440
+ const classNames2 = useClassNames21({
1703
1441
  component: "Header",
1704
1442
  variant,
1705
1443
  size
1706
1444
  });
1707
- return /* @__PURE__ */ jsx41(Header, { className: classNames2, ...props, children: props.children });
1445
+ return /* @__PURE__ */ jsx38(Header, { className: classNames2, ...props, children: props.children });
1708
1446
  };
1709
1447
 
1710
1448
  // src/Image/Image.tsx
@@ -1712,9 +1450,9 @@ import {
1712
1450
  cn as cn24,
1713
1451
  objectFit,
1714
1452
  objectPosition,
1715
- useClassNames as useClassNames23
1453
+ useClassNames as useClassNames22
1716
1454
  } from "@marigold/system";
1717
- import { jsx as jsx42 } from "react/jsx-runtime";
1455
+ import { jsx as jsx39 } from "react/jsx-runtime";
1718
1456
  var Image = ({
1719
1457
  variant,
1720
1458
  size,
@@ -1722,8 +1460,8 @@ var Image = ({
1722
1460
  position = "none",
1723
1461
  ...props
1724
1462
  }) => {
1725
- const classNames2 = useClassNames23({ component: "Image", variant, size });
1726
- return /* @__PURE__ */ jsx42(
1463
+ const classNames2 = useClassNames22({ component: "Image", variant, size });
1464
+ return /* @__PURE__ */ jsx39(
1727
1465
  "img",
1728
1466
  {
1729
1467
  ...props,
@@ -1744,7 +1482,7 @@ import {
1744
1482
  cn as cn25,
1745
1483
  gapSpace as gapSpace5
1746
1484
  } from "@marigold/system";
1747
- import { jsx as jsx43 } from "react/jsx-runtime";
1485
+ import { jsx as jsx40 } from "react/jsx-runtime";
1748
1486
  var Inline = ({
1749
1487
  space = 0,
1750
1488
  orientation,
@@ -1754,7 +1492,7 @@ var Inline = ({
1754
1492
  ...props
1755
1493
  }) => {
1756
1494
  var _a2, _b2, _c, _d;
1757
- return /* @__PURE__ */ jsx43(
1495
+ return /* @__PURE__ */ jsx40(
1758
1496
  "div",
1759
1497
  {
1760
1498
  ...props,
@@ -1771,43 +1509,43 @@ var Inline = ({
1771
1509
 
1772
1510
  // src/DateField/DateField.tsx
1773
1511
  import { createCalendar } from "@internationalized/date";
1774
- import { useRef as useRef9 } from "react";
1512
+ import { useRef as useRef4 } from "react";
1775
1513
  import { useDateField } from "@react-aria/datepicker";
1776
- import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
1514
+ import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
1777
1515
  import { useLocale } from "@react-aria/i18n";
1778
- import { useHover as useHover2 } from "@react-aria/interactions";
1779
- import { mergeProps as mergeProps6 } from "@react-aria/utils";
1516
+ import { useHover } from "@react-aria/interactions";
1517
+ import { mergeProps as mergeProps4 } from "@react-aria/utils";
1780
1518
  import { useDateFieldState } from "@react-stately/datepicker";
1781
- import { cn as cn27, useClassNames as useClassNames24, useStateProps as useStateProps5 } from "@marigold/system";
1519
+ import { cn as cn27, useClassNames as useClassNames23, useStateProps as useStateProps3 } from "@marigold/system";
1782
1520
 
1783
1521
  // src/DateField/DateSegment.tsx
1784
- import { useRef as useRef8 } from "react";
1522
+ import { useRef as useRef3 } from "react";
1785
1523
  import { useDateSegment } from "@react-aria/datepicker";
1786
- import { useFocusRing as useFocusRing3 } from "@react-aria/focus";
1787
- import { mergeProps as mergeProps5 } from "@react-aria/utils";
1788
- import { cn as cn26, useStateProps as useStateProps4 } from "@marigold/system";
1789
- import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
1524
+ import { useFocusRing as useFocusRing2 } from "@react-aria/focus";
1525
+ import { mergeProps as mergeProps3 } from "@react-aria/utils";
1526
+ import { cn as cn26, useStateProps as useStateProps2 } from "@marigold/system";
1527
+ import { jsx as jsx41, jsxs as jsxs15 } from "react/jsx-runtime";
1790
1528
  var DateSegment = ({
1791
1529
  className,
1792
1530
  segment,
1793
1531
  state,
1794
1532
  isPrevPlaceholder
1795
1533
  }) => {
1796
- const ref = useRef8(null);
1534
+ const ref = useRef3(null);
1797
1535
  const { segmentProps } = useDateSegment(segment, state, ref);
1798
- const { focusProps, isFocused } = useFocusRing3({
1536
+ const { focusProps, isFocused } = useFocusRing2({
1799
1537
  within: true,
1800
1538
  isTextInput: true
1801
1539
  });
1802
- const stateProps = useStateProps4({
1540
+ const stateProps = useStateProps2({
1803
1541
  disabled: state.isDisabled,
1804
1542
  focusVisible: isFocused
1805
1543
  });
1806
1544
  const { isPlaceholder, placeholder, text, type, maxValue } = segment;
1807
- return /* @__PURE__ */ jsxs17(
1545
+ return /* @__PURE__ */ jsxs15(
1808
1546
  "div",
1809
1547
  {
1810
- ...mergeProps5(segmentProps, stateProps, focusProps),
1548
+ ...mergeProps3(segmentProps, stateProps, focusProps),
1811
1549
  ref,
1812
1550
  className: cn26(
1813
1551
  "group/segment",
@@ -1820,7 +1558,7 @@ var DateSegment = ({
1820
1558
  minWidth: maxValue != null ? String(maxValue).length + "ch" : void 0
1821
1559
  },
1822
1560
  children: [
1823
- /* @__PURE__ */ jsx44(
1561
+ /* @__PURE__ */ jsx41(
1824
1562
  "span",
1825
1563
  {
1826
1564
  "aria-hidden": "true",
@@ -1831,14 +1569,14 @@ var DateSegment = ({
1831
1569
  children: isPlaceholder && (placeholder == null ? void 0 : placeholder.toUpperCase())
1832
1570
  }
1833
1571
  ),
1834
- /* @__PURE__ */ jsx44("span", { children: isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text })
1572
+ /* @__PURE__ */ jsx41("span", { children: isPlaceholder ? "" : type === "month" || type === "day" ? Number(text) < 10 ? "0" + text : text : text })
1835
1573
  ]
1836
1574
  }
1837
1575
  );
1838
1576
  };
1839
1577
 
1840
1578
  // src/DateField/DateField.tsx
1841
- import { jsx as jsx45, jsxs as jsxs18 } from "react/jsx-runtime";
1579
+ import { jsx as jsx42, jsxs as jsxs16 } from "react/jsx-runtime";
1842
1580
  var DateField = ({
1843
1581
  disabled,
1844
1582
  readOnly,
@@ -1867,20 +1605,20 @@ var DateField = ({
1867
1605
  locale,
1868
1606
  createCalendar
1869
1607
  });
1870
- const ref = useRef9(null);
1608
+ const ref = useRef4(null);
1871
1609
  const { fieldProps, labelProps, descriptionProps } = useDateField(
1872
1610
  props,
1873
1611
  state,
1874
1612
  ref
1875
1613
  );
1876
- const classNames2 = useClassNames24({ component: "DateField", variant, size });
1877
- const { focusProps, isFocused } = useFocusRing4({
1614
+ const classNames2 = useClassNames23({ component: "DateField", variant, size });
1615
+ const { focusProps, isFocused } = useFocusRing3({
1878
1616
  within: true,
1879
1617
  isTextInput: true,
1880
1618
  autoFocus: props.autoFocus
1881
1619
  });
1882
- const { hoverProps, isHovered } = useHover2({ isDisabled: disabled });
1883
- const stateProps = useStateProps5({
1620
+ const { hoverProps, isHovered } = useHover({ isDisabled: disabled });
1621
+ const stateProps = useStateProps3({
1884
1622
  hover: isHovered,
1885
1623
  error,
1886
1624
  readOnly,
@@ -1888,8 +1626,8 @@ var DateField = ({
1888
1626
  required,
1889
1627
  focus: isFocused || isPressed
1890
1628
  });
1891
- return /* @__PURE__ */ jsx45(
1892
- FieldBase,
1629
+ return /* @__PURE__ */ jsx42(
1630
+ FieldBase2,
1893
1631
  {
1894
1632
  error,
1895
1633
  errorMessage,
@@ -1903,10 +1641,10 @@ var DateField = ({
1903
1641
  variant,
1904
1642
  size,
1905
1643
  width,
1906
- children: /* @__PURE__ */ jsxs18(
1644
+ children: /* @__PURE__ */ jsxs16(
1907
1645
  "div",
1908
1646
  {
1909
- ...mergeProps6(fieldProps, focusProps, stateProps, hoverProps),
1647
+ ...mergeProps4(fieldProps, focusProps, stateProps, hoverProps),
1910
1648
  className: cn27(
1911
1649
  "relative flex flex-row flex-nowrap",
1912
1650
  "cursor-text aria-disabled:cursor-not-allowed",
@@ -1915,9 +1653,9 @@ var DateField = ({
1915
1653
  "data-testid": "date-field",
1916
1654
  ref: triggerRef,
1917
1655
  children: [
1918
- /* @__PURE__ */ jsx45("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
1656
+ /* @__PURE__ */ jsx42("div", { ref, className: "flex basis-full items-center", children: state.segments.map((segment, i) => {
1919
1657
  var _a;
1920
- return /* @__PURE__ */ jsx45(
1658
+ return /* @__PURE__ */ jsx42(
1921
1659
  DateSegment,
1922
1660
  {
1923
1661
  className: classNames2.segment,
@@ -1928,7 +1666,7 @@ var DateField = ({
1928
1666
  i
1929
1667
  );
1930
1668
  }) }),
1931
- action ? action : /* @__PURE__ */ jsx45("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx45(
1669
+ action ? action : /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx42(
1932
1670
  "svg",
1933
1671
  {
1934
1672
  "data-testid": "action",
@@ -1936,7 +1674,7 @@ var DateField = ({
1936
1674
  viewBox: "0 0 24 24",
1937
1675
  width: 24,
1938
1676
  height: 24,
1939
- children: /* @__PURE__ */ jsx45("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
1677
+ children: /* @__PURE__ */ jsx42("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
1940
1678
  }
1941
1679
  ) })
1942
1680
  ]
@@ -1947,70 +1685,30 @@ var DateField = ({
1947
1685
  };
1948
1686
 
1949
1687
  // src/Calendar/Calendar.tsx
1950
- import { createCalendar as createCalendar2 } from "@internationalized/date";
1951
- import { useRef as useRef12, useState } from "react";
1952
- import {
1953
- useCalendar
1954
- } from "@react-aria/calendar";
1955
- import { useDateFormatter as useDateFormatter3, useLocale as useLocale3 } from "@react-aria/i18n";
1956
- import { useCalendarState } from "@react-stately/calendar";
1957
- import { ChevronDown as ChevronDown2, ChevronLeft, ChevronRight } from "@marigold/icons";
1958
- import { cn as cn29, useClassNames as useClassNames26, useStateProps as useStateProps7 } from "@marigold/system";
1688
+ import { useState } from "react";
1689
+ import { Calendar } from "react-aria-components";
1690
+ import { cn as cn31, useClassNames as useClassNames28 } from "@marigold/system";
1959
1691
 
1960
1692
  // src/Calendar/CalendarGrid.tsx
1961
- import { getWeeksInMonth, startOfWeek, today } from "@internationalized/date";
1962
- import { useMemo } from "react";
1963
- import { useCalendarGrid } from "@react-aria/calendar";
1964
- import { useLocale as useLocale2 } from "@react-aria/i18n";
1965
- import { useDateFormatter } from "@react-aria/i18n";
1966
-
1967
- // src/Calendar/CalendarCell.tsx
1968
- import { useRef as useRef10 } from "react";
1969
- import { useCalendarCell } from "@react-aria/calendar";
1970
- import { useHover as useHover3 } from "@react-aria/interactions";
1971
- import { mergeProps as mergeProps7 } from "@react-aria/utils";
1972
- import { cn as cn28, useClassNames as useClassNames25, useStateProps as useStateProps6 } from "@marigold/system";
1973
- import { jsx as jsx46 } from "react/jsx-runtime";
1974
- var CalendarCell = (props) => {
1975
- const ref = useRef10(null);
1976
- const { state } = props;
1977
- let { cellProps, buttonProps, formattedDate, isOutsideVisibleRange } = useCalendarCell(props, state, ref);
1978
- const classNames2 = useClassNames25({
1979
- component: "Calendar"
1980
- });
1981
- const isDisabled = cellProps["aria-disabled"];
1982
- const { hoverProps, isHovered } = useHover3({
1983
- isDisabled: isDisabled || cellProps["aria-selected"]
1984
- });
1985
- const stateProps = useStateProps6({
1986
- disabled: isDisabled,
1987
- hover: isHovered,
1988
- selected: cellProps["aria-selected"]
1989
- });
1990
- return /* @__PURE__ */ jsx46("td", { className: "group/cell", ...cellProps, children: /* @__PURE__ */ jsx46(
1991
- "div",
1992
- {
1993
- className: cn28(
1994
- "flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
1995
- classNames2.calendarCell
1996
- ),
1997
- hidden: isOutsideVisibleRange,
1998
- ref,
1999
- ...mergeProps7(buttonProps, stateProps, hoverProps),
2000
- children: formattedDate
2001
- }
2002
- ) });
2003
- };
1693
+ import {
1694
+ CalendarCell,
1695
+ CalendarGrid,
1696
+ CalendarGridBody
1697
+ } from "react-aria-components";
1698
+ import { cn as cn28, useClassNames as useClassNames25 } from "@marigold/system";
2004
1699
 
2005
- // src/Calendar/CalendarGrid.tsx
2006
- import { jsx as jsx47, jsxs as jsxs19 } from "react/jsx-runtime";
2007
- var CalendarGrid = ({ state, ...props }) => {
1700
+ // src/Calendar/CalendarGridHeader.tsx
1701
+ import { startOfWeek, today } from "@internationalized/date";
1702
+ import { useContext as useContext4, useMemo } from "react";
1703
+ import { CalendarStateContext } from "react-aria-components";
1704
+ import { useCalendarGrid } from "@react-aria/calendar";
1705
+ import { useDateFormatter, useLocale as useLocale2 } from "@react-aria/i18n";
1706
+ import { useClassNames as useClassNames24 } from "@marigold/system";
1707
+ import { jsx as jsx43 } from "react/jsx-runtime";
1708
+ function CalendarGridHeader(props) {
1709
+ const state = useContext4(CalendarStateContext);
1710
+ const { headerProps } = useCalendarGrid(props, state);
2008
1711
  const { locale } = useLocale2();
2009
- const { gridProps, headerProps } = useCalendarGrid(props, state);
2010
- const numberOfWeeksInMonth = getWeeksInMonth(
2011
- state.visibleRange.start,
2012
- locale
2013
- );
2014
1712
  const dayFormatter = useDateFormatter({
2015
1713
  weekday: "short",
2016
1714
  timeZone: state.timeZone
@@ -2023,50 +1721,144 @@ var CalendarGrid = ({ state, ...props }) => {
2023
1721
  return dayFormatter.format(dateDay);
2024
1722
  });
2025
1723
  }, [locale, state.timeZone, dayFormatter]);
2026
- return /* @__PURE__ */ jsxs19(
2027
- "table",
1724
+ const classNames2 = useClassNames24({ component: "Calendar" });
1725
+ return /* @__PURE__ */ jsx43("thead", { ...headerProps, children: /* @__PURE__ */ jsx43("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx43("th", { className: classNames2.calendarHeader, children: day.substring(0, 2) }, index)) }) });
1726
+ }
1727
+
1728
+ // src/Calendar/CalendarGrid.tsx
1729
+ import { jsx as jsx44, jsxs as jsxs17 } from "react/jsx-runtime";
1730
+ var _CalendarGrid = () => {
1731
+ const classNames2 = useClassNames25({ component: "Calendar" });
1732
+ return /* @__PURE__ */ jsxs17(CalendarGrid, { className: classNames2.calendarGrid, children: [
1733
+ /* @__PURE__ */ jsx44(CalendarGridHeader, {}),
1734
+ /* @__PURE__ */ jsx44(CalendarGridBody, { children: (date) => /* @__PURE__ */ jsx44(
1735
+ CalendarCell,
1736
+ {
1737
+ date,
1738
+ className: cn28(
1739
+ "flex h-[30px] w-[30px] cursor-pointer items-center justify-center rounded-full p-[5.3px] text-sm font-normal aria-disabled:cursor-default",
1740
+ classNames2.calendarCell
1741
+ )
1742
+ }
1743
+ ) })
1744
+ ] });
1745
+ };
1746
+
1747
+ // src/Calendar/CalendarListBox.tsx
1748
+ import { useContext as useContext5 } from "react";
1749
+ import { CalendarStateContext as CalendarStateContext2 } from "react-aria-components";
1750
+ import { ChevronDown as ChevronDown2 } from "@marigold/icons";
1751
+ import { cn as cn29, useClassNames as useClassNames26 } from "@marigold/system";
1752
+
1753
+ // src/Calendar/useFormattedMonths.tsx
1754
+ import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
1755
+ function useFormattedMonths(timeZone, focusedDate) {
1756
+ let months = [];
1757
+ let formatter = useDateFormatter2({
1758
+ month: "long",
1759
+ timeZone
1760
+ });
1761
+ let numMonths = focusedDate.calendar.getMonthsInYear(focusedDate);
1762
+ for (let i = 1; i <= numMonths; i++) {
1763
+ let date = focusedDate.set({ month: i });
1764
+ months.push(formatter.format(date.toDate(timeZone)));
1765
+ }
1766
+ return months;
1767
+ }
1768
+
1769
+ // src/Calendar/CalendarListBox.tsx
1770
+ import { jsx as jsx45, jsxs as jsxs18 } from "react/jsx-runtime";
1771
+ function CalendarListBox({
1772
+ type,
1773
+ isDisabled,
1774
+ setSelectedDropdown
1775
+ }) {
1776
+ const state = useContext5(CalendarStateContext2);
1777
+ const months = useFormattedMonths(state.timeZone, state.focusedDate);
1778
+ const buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
1779
+ const { select: selectClassNames } = useClassNames26({ component: "Select" });
1780
+ return /* @__PURE__ */ jsxs18(
1781
+ "button",
2028
1782
  {
2029
- className: "w-full border-spacing-[6px]",
2030
- ...gridProps,
2031
- cellPadding: "8",
1783
+ disabled: isDisabled,
1784
+ onClick: () => setSelectedDropdown(type),
1785
+ className: cn29(buttonStyles, selectClassNames),
1786
+ "data-testid": type,
2032
1787
  children: [
2033
- /* @__PURE__ */ jsx47("thead", { ...headerProps, children: /* @__PURE__ */ jsx47("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsx47("th", { style: { fontWeight: "bolder" }, children: day.substring(0, 2) }, index)) }) }),
2034
- /* @__PURE__ */ jsx47("tbody", { children: [...new Array(numberOfWeeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ jsx47("tr", { children: state.getDatesInWeek(weekIndex).map(
2035
- (date, i) => date ? /* @__PURE__ */ jsx47(
2036
- CalendarCell,
2037
- {
2038
- date,
2039
- state
2040
- },
2041
- i
2042
- ) : /* @__PURE__ */ jsx47("td", {}, i)
2043
- ) }, weekIndex)) })
1788
+ type === "month" ? months[state.focusedDate.month - 1].substring(0, 3) : state.focusedDate.year,
1789
+ /* @__PURE__ */ jsx45(ChevronDown2, {})
2044
1790
  ]
2045
1791
  }
2046
1792
  );
2047
- };
1793
+ }
2048
1794
 
2049
- // src/Calendar/MonthDropdown.tsx
2050
- import { jsx as jsx48 } from "react/jsx-runtime";
2051
- var MonthDropdown = ({
2052
- state,
2053
- setSelectedDropdown,
2054
- months
2055
- }) => {
1795
+ // src/Calendar/MonthControls.tsx
1796
+ import React4 from "react";
1797
+ import { Button as Button2 } from "react-aria-components";
1798
+ import { ChevronLeft, ChevronRight } from "@marigold/icons";
1799
+ import { cn as cn30, useClassNames as useClassNames27 } from "@marigold/system";
1800
+ import { jsx as jsx46, jsxs as jsxs19 } from "react/jsx-runtime";
1801
+ function MonthControls() {
1802
+ const classNames2 = useClassNames27({ component: "Calendar" });
1803
+ const buttonClassNames = useClassNames27({ component: "Button" });
1804
+ return /* @__PURE__ */ jsxs19(
1805
+ "div",
1806
+ {
1807
+ className: cn30(
1808
+ "flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
1809
+ classNames2.calendarControllers
1810
+ ),
1811
+ children: [
1812
+ /* @__PURE__ */ jsx46(
1813
+ Button2,
1814
+ {
1815
+ className: cn30(
1816
+ "inline-flex items-center justify-center gap-[0.5ch]",
1817
+ buttonClassNames
1818
+ ),
1819
+ slot: "previous",
1820
+ children: /* @__PURE__ */ jsx46(ChevronLeft, {})
1821
+ }
1822
+ ),
1823
+ /* @__PURE__ */ jsx46(
1824
+ Button2,
1825
+ {
1826
+ className: cn30(
1827
+ "inline-flex items-center justify-center gap-[0.5ch]",
1828
+ buttonClassNames
1829
+ ),
1830
+ slot: "next",
1831
+ children: /* @__PURE__ */ jsx46(ChevronRight, {})
1832
+ }
1833
+ )
1834
+ ]
1835
+ }
1836
+ );
1837
+ }
1838
+ var MonthControls_default = React4.memo(MonthControls);
1839
+
1840
+ // src/Calendar/MonthListBox.tsx
1841
+ import { useContext as useContext6 } from "react";
1842
+ import { CalendarStateContext as CalendarStateContext3 } from "react-aria-components";
1843
+ import { jsx as jsx47 } from "react/jsx-runtime";
1844
+ var MonthListBox = ({ setSelectedDropdown }) => {
1845
+ const state = useContext6(CalendarStateContext3);
1846
+ const months = useFormattedMonths(state.timeZone, state.focusedDate);
2056
1847
  let onChange = (index) => {
2057
1848
  let value = Number(index) + 1;
2058
1849
  let date = state.focusedDate.set({ month: value });
2059
1850
  state.setFocusedDate(date);
2060
1851
  };
2061
- return /* @__PURE__ */ jsx48(
1852
+ return /* @__PURE__ */ jsx47(
2062
1853
  "ul",
2063
1854
  {
2064
1855
  "data-testid": "monthOptions",
2065
1856
  className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
2066
1857
  children: months.map((month, index) => {
2067
- return /* @__PURE__ */ jsx48("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx48(
1858
+ return /* @__PURE__ */ jsx47("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx47(
2068
1859
  _Button,
2069
1860
  {
1861
+ slot: "previous",
2070
1862
  variant: index === state.focusedDate.month - 1 ? "secondary" : "text",
2071
1863
  size: "small",
2072
1864
  onPress: () => {
@@ -2081,15 +1873,21 @@ var MonthDropdown = ({
2081
1873
  }
2082
1874
  );
2083
1875
  };
2084
- var MonthDropdown_default = MonthDropdown;
1876
+ var MonthListBox_default = MonthListBox;
2085
1877
 
2086
- // src/Calendar/YearDropdown.tsx
2087
- import { useEffect as useEffect2, useRef as useRef11 } from "react";
2088
- import { useDateFormatter as useDateFormatter2 } from "@react-aria/i18n";
2089
- import { jsx as jsx49 } from "react/jsx-runtime";
2090
- var YearDropdown = ({ state, setSelectedDropdown }) => {
1878
+ // src/Calendar/YearListBox.tsx
1879
+ import {
1880
+ useContext as useContext7,
1881
+ useEffect as useEffect2,
1882
+ useRef as useRef5
1883
+ } from "react";
1884
+ import { CalendarStateContext as CalendarStateContext4 } from "react-aria-components";
1885
+ import { useDateFormatter as useDateFormatter3 } from "@react-aria/i18n";
1886
+ import { jsx as jsx48 } from "react/jsx-runtime";
1887
+ var YearListBox = ({ setSelectedDropdown }) => {
1888
+ const state = useContext7(CalendarStateContext4);
2091
1889
  const years = [];
2092
- let formatter = useDateFormatter2({
1890
+ let formatter = useDateFormatter3({
2093
1891
  year: "numeric",
2094
1892
  timeZone: state.timeZone
2095
1893
  });
@@ -2100,7 +1898,7 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
2100
1898
  formatted: formatter.format(date.toDate(state.timeZone))
2101
1899
  });
2102
1900
  }
2103
- const activeButtonRef = useRef11(null);
1901
+ const activeButtonRef = useRef5(null);
2104
1902
  useEffect2(() => {
2105
1903
  if (activeButtonRef.current) {
2106
1904
  const activeButton = activeButtonRef.current;
@@ -2115,21 +1913,22 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
2115
1913
  let date = years[index].value;
2116
1914
  state.setFocusedDate(date);
2117
1915
  };
2118
- return /* @__PURE__ */ jsx49(
1916
+ return /* @__PURE__ */ jsx48(
2119
1917
  "ul",
2120
1918
  {
2121
1919
  "data-testid": "yearOptions",
2122
1920
  className: "grid h-full max-h-[300px] min-w-[300px] grid-cols-3 gap-y-10 overflow-y-scroll p-2",
2123
1921
  children: years.map((year, index) => {
2124
1922
  const isActive = +year.formatted === state.focusedDate.year;
2125
- return /* @__PURE__ */ jsx49("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx49(
1923
+ return /* @__PURE__ */ jsx48("li", { className: "flex justify-center", children: /* @__PURE__ */ jsx48(
2126
1924
  "div",
2127
1925
  {
2128
1926
  ref: isActive ? activeButtonRef : null,
2129
1927
  style: { height: "100%", width: "100%" },
2130
- children: /* @__PURE__ */ jsx49(
1928
+ children: /* @__PURE__ */ jsx48(
2131
1929
  _Button,
2132
1930
  {
1931
+ slot: "previous",
2133
1932
  disabled: state.isDisabled,
2134
1933
  variant: isActive ? "secondary" : "text",
2135
1934
  size: "small",
@@ -2148,146 +1947,214 @@ var YearDropdown = ({ state, setSelectedDropdown }) => {
2148
1947
  }
2149
1948
  );
2150
1949
  };
2151
- var YearDropdown_default = YearDropdown;
1950
+ var YearListBox_default = YearListBox;
2152
1951
 
2153
1952
  // src/Calendar/Calendar.tsx
2154
- import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs20 } from "react/jsx-runtime";
2155
- var buttonStyles = "flex items-center justify-between gap-1 overflow-hidden";
2156
- var Calendar = ({
1953
+ import { Fragment as Fragment6, jsx as jsx49, jsxs as jsxs20 } from "react/jsx-runtime";
1954
+ var _Calendar = ({
2157
1955
  disabled,
2158
1956
  readOnly,
2159
1957
  size,
2160
1958
  variant,
2161
1959
  ...rest
2162
1960
  }) => {
2163
- const { locale } = useLocale3();
2164
1961
  const props = {
2165
1962
  isDisabled: disabled,
2166
1963
  isReadOnly: readOnly,
2167
1964
  ...rest
2168
1965
  };
2169
- const state = useCalendarState({
2170
- ...props,
2171
- locale,
2172
- createCalendar: createCalendar2
2173
- });
2174
- const ref = useRef12(null);
2175
- const { calendarProps, prevButtonProps, nextButtonProps } = useCalendar(
2176
- props,
2177
- state
2178
- );
2179
- const {
2180
- isDisabled: prevIsDisabled,
2181
- onFocusChange: prevFocusChange,
2182
- ...prevPropsRest
2183
- } = prevButtonProps;
2184
- const {
2185
- isDisabled: nextIsDisabled,
2186
- onFocusChange: nextFocusChange,
2187
- ...nextPropsRest
2188
- } = nextButtonProps;
2189
- const calendarState = useStateProps7({
2190
- disabled: state.isDisabled,
2191
- focusVisible: state.isFocused
2192
- });
2193
- const classNames2 = useClassNames26({ component: "Calendar" });
2194
- const { select: selectClassNames } = useClassNames26({ component: "Select" });
1966
+ const classNames2 = useClassNames28({ component: "Calendar" });
2195
1967
  const [selectedDropdown, setSelectedDropdown] = useState();
2196
- let months = [];
2197
- let formatter = useDateFormatter3({
2198
- month: "long",
2199
- timeZone: state.timeZone
2200
- });
2201
- let numMonths = state.focusedDate.calendar.getMonthsInYear(state.focusedDate);
2202
- for (let i = 1; i <= numMonths; i++) {
2203
- let date = state.focusedDate.set({ month: i });
2204
- months.push(formatter.format(date.toDate(state.timeZone)));
2205
- }
2206
- const selectedValue = {
2207
- month: months[state.focusedDate.month - 1].substring(0, 3),
2208
- year: state.focusedDate.year
1968
+ const ViewMap = {
1969
+ month: /* @__PURE__ */ jsx49(MonthListBox_default, { setSelectedDropdown }),
1970
+ year: /* @__PURE__ */ jsx49(YearListBox_default, { setSelectedDropdown })
2209
1971
  };
2210
- return /* @__PURE__ */ jsx50(
2211
- "div",
1972
+ return /* @__PURE__ */ jsx49(
1973
+ Calendar,
2212
1974
  {
2213
- tabIndex: -1,
2214
- className: cn29(
1975
+ className: cn31(
2215
1976
  "flex min-h-[350px] w-[360px] flex-col rounded-sm p-4 shadow-[0_4px_4px_rgba(165,165,165,0.25)]",
2216
1977
  classNames2.calendar
2217
1978
  ),
2218
- ...calendarProps,
2219
- ...calendarState,
2220
- ref,
2221
- children: selectedDropdown ? selectedDropdown === "month" ? /* @__PURE__ */ jsx50(
2222
- MonthDropdown_default,
2223
- {
2224
- setSelectedDropdown,
2225
- months,
2226
- state
2227
- }
2228
- ) : /* @__PURE__ */ jsx50(
2229
- YearDropdown_default,
2230
- {
2231
- setSelectedDropdown,
2232
- state
2233
- }
2234
- ) : /* @__PURE__ */ jsxs20(Fragment6, { children: [
1979
+ ...props,
1980
+ children: selectedDropdown ? ViewMap[selectedDropdown] : /* @__PURE__ */ jsxs20(Fragment6, { children: [
2235
1981
  /* @__PURE__ */ jsxs20("div", { className: "mb-4 flex items-center justify-between", children: [
2236
1982
  /* @__PURE__ */ jsxs20("div", { className: "flex w-full gap-4", children: [
2237
- /* @__PURE__ */ jsxs20(
2238
- "button",
1983
+ /* @__PURE__ */ jsx49(
1984
+ CalendarListBox,
2239
1985
  {
2240
- disabled: state.isDisabled,
2241
- onClick: () => setSelectedDropdown("month"),
2242
- className: cn29(buttonStyles, selectClassNames),
2243
- "data-testid": "month",
2244
- children: [
2245
- selectedValue.month,
2246
- /* @__PURE__ */ jsx50(ChevronDown2, {})
2247
- ]
1986
+ type: "month",
1987
+ isDisabled: props.isDisabled,
1988
+ setSelectedDropdown
2248
1989
  }
2249
1990
  ),
2250
- /* @__PURE__ */ jsxs20(
2251
- "button",
1991
+ /* @__PURE__ */ jsx49(
1992
+ CalendarListBox,
2252
1993
  {
2253
- disabled: state.isDisabled,
2254
- onClick: () => setSelectedDropdown("year"),
2255
- className: cn29(buttonStyles, selectClassNames),
2256
- "data-testid": "year",
2257
- children: [
2258
- selectedValue.year,
2259
- /* @__PURE__ */ jsx50(ChevronDown2, {})
2260
- ]
1994
+ type: "year",
1995
+ isDisabled: props.isDisabled,
1996
+ setSelectedDropdown
2261
1997
  }
2262
1998
  )
2263
1999
  ] }),
2264
- /* @__PURE__ */ jsxs20(
2265
- "div",
2266
- {
2267
- className: cn29(
2268
- "flex w-full flex-nowrap justify-end gap-[10px] [&_button:disabled]:cursor-not-allowed [&_button]:px-2 [&_button]:py-1",
2269
- classNames2.calendarControllers
2270
- ),
2271
- children: [
2272
- /* @__PURE__ */ jsx50(_Button, { ...prevPropsRest, disabled: prevIsDisabled, children: /* @__PURE__ */ jsx50(ChevronLeft, {}) }),
2273
- /* @__PURE__ */ jsx50(_Button, { ...nextPropsRest, disabled: nextIsDisabled, children: /* @__PURE__ */ jsx50(ChevronRight, {}) })
2274
- ]
2275
- }
2276
- )
2000
+ /* @__PURE__ */ jsx49(MonthControls_default, {})
2277
2001
  ] }),
2278
- /* @__PURE__ */ jsx50(CalendarGrid, { state })
2002
+ /* @__PURE__ */ jsx49(_CalendarGrid, {})
2279
2003
  ] })
2280
2004
  }
2281
2005
  );
2282
2006
  };
2283
2007
 
2284
2008
  // src/DatePicker/DatePicker.tsx
2285
- import { useRef as useRef13 } from "react";
2009
+ import { useRef as useRef8 } from "react";
2286
2010
  import { useDatePicker } from "@react-aria/datepicker";
2287
- import { mergeProps as mergeProps8 } from "@react-aria/utils";
2011
+ import { mergeProps as mergeProps5 } from "@react-aria/utils";
2288
2012
  import { useDatePickerState } from "@react-stately/datepicker";
2289
- import { useClassNames as useClassNames27, useStateProps as useStateProps8 } from "@marigold/system";
2290
- import { Fragment as Fragment7, jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
2013
+ import { useClassNames as useClassNames31, useStateProps as useStateProps4 } from "@marigold/system";
2014
+
2015
+ // src/Overlay/Overlay.tsx
2016
+ import { useRef as useRef6 } from "react";
2017
+ import {
2018
+ Overlay as ReactAriaOverlay
2019
+ } from "@react-aria/overlays";
2020
+ import { useTheme as useTheme4 } from "@marigold/system";
2021
+ import { jsx as jsx50 } from "react/jsx-runtime";
2022
+ var Overlay = ({ children, container, open }) => {
2023
+ const nodeRef = useRef6(null);
2024
+ const theme = useTheme4();
2025
+ let mountOverlay = open;
2026
+ if (!mountOverlay) {
2027
+ return null;
2028
+ }
2029
+ return /* @__PURE__ */ jsx50(ReactAriaOverlay, { portalContainer: container, children: /* @__PURE__ */ jsx50(
2030
+ "div",
2031
+ {
2032
+ ref: nodeRef,
2033
+ "data-testid": "overlay",
2034
+ "data-theme": theme.name,
2035
+ className: "opacity-100",
2036
+ children
2037
+ }
2038
+ ) });
2039
+ };
2040
+
2041
+ // src/Overlay/_Popover.tsx
2042
+ import { forwardRef as forwardRef12, useRef as useRef7 } from "react";
2043
+ import { FocusScope } from "@react-aria/focus";
2044
+ import {
2045
+ DismissButton,
2046
+ usePopover
2047
+ } from "@react-aria/overlays";
2048
+ import { useClassNames as useClassNames29 } from "@marigold/system";
2049
+ import { jsx as jsx51, jsxs as jsxs21 } from "react/jsx-runtime";
2050
+ var Popover2 = forwardRef12(
2051
+ (props, ref) => {
2052
+ const fallbackRef = useRef7(null);
2053
+ const popoverRef = ref || fallbackRef;
2054
+ let { children, state, ...otherProps } = props;
2055
+ return /* @__PURE__ */ jsx51(Overlay, { open: state.isOpen, ...otherProps, children: /* @__PURE__ */ jsx51(PopoverWrapper, { ref: popoverRef, ...props, children }) });
2056
+ }
2057
+ );
2058
+ var PopoverWrapper = forwardRef12(
2059
+ ({
2060
+ children,
2061
+ isNonModal,
2062
+ state,
2063
+ keyboardDismissDisabled,
2064
+ ...props
2065
+ }, ref) => {
2066
+ const { popoverProps, underlayProps, placement } = usePopover(
2067
+ {
2068
+ ...props,
2069
+ isNonModal,
2070
+ isKeyboardDismissDisabled: keyboardDismissDisabled,
2071
+ popoverRef: ref,
2072
+ placement: "bottom left"
2073
+ },
2074
+ state
2075
+ );
2076
+ const classNames2 = useClassNames29({
2077
+ component: "Popover",
2078
+ variant: placement
2079
+ });
2080
+ return /* @__PURE__ */ jsxs21(FocusScope, { restoreFocus: true, children: [
2081
+ !isNonModal && /* @__PURE__ */ jsx51(Underlay, { ...underlayProps }),
2082
+ /* @__PURE__ */ jsxs21(
2083
+ "div",
2084
+ {
2085
+ ...popoverProps,
2086
+ className: classNames2,
2087
+ style: {
2088
+ ...popoverProps.style,
2089
+ minWidth: props.triggerRef.current ? props.triggerRef.current.offsetWidth : void 0
2090
+ },
2091
+ ref,
2092
+ role: "presentation",
2093
+ children: [
2094
+ !isNonModal && /* @__PURE__ */ jsx51(DismissButton, { onDismiss: state.close }),
2095
+ children,
2096
+ /* @__PURE__ */ jsx51(DismissButton, { onDismiss: state.close })
2097
+ ]
2098
+ }
2099
+ )
2100
+ ] });
2101
+ }
2102
+ );
2103
+
2104
+ // src/Overlay/Tray.tsx
2105
+ import { forwardRef as forwardRef13 } from "react";
2106
+ import { FocusScope as FocusScope2 } from "@react-aria/focus";
2107
+ import {
2108
+ DismissButton as DismissButton2,
2109
+ useModalOverlay
2110
+ } from "@react-aria/overlays";
2111
+ import { useObjectRef } from "@react-aria/utils";
2112
+
2113
+ // src/Overlay/_Underlay.tsx
2114
+ import { cn as cn32, useClassNames as useClassNames30 } from "@marigold/system";
2115
+ import { jsx as jsx52 } from "react/jsx-runtime";
2116
+ var Underlay2 = ({ size, variant, ...props }) => {
2117
+ const classNames2 = useClassNames30({ component: "Underlay", size, variant });
2118
+ return /* @__PURE__ */ jsx52("div", { className: cn32("fixed inset-0 z-40", classNames2), ...props });
2119
+ };
2120
+
2121
+ // src/Overlay/Tray.tsx
2122
+ import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
2123
+ var Tray = forwardRef13(
2124
+ ({ state, children, ...props }, ref) => {
2125
+ const trayRef = useObjectRef(ref);
2126
+ return /* @__PURE__ */ jsx53(Overlay, { open: state.isOpen, children: /* @__PURE__ */ jsx53(TrayWrapper, { state, ...props, ref: trayRef, children }) });
2127
+ }
2128
+ );
2129
+ var TrayWrapper = forwardRef13(
2130
+ ({ children, state, ...props }, ref) => {
2131
+ let { modalProps, underlayProps } = useModalOverlay(
2132
+ {
2133
+ ...props,
2134
+ isDismissable: true
2135
+ },
2136
+ state,
2137
+ ref
2138
+ );
2139
+ return /* @__PURE__ */ jsx53(FocusScope2, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsx53(Underlay2, { ...underlayProps, variant: "modal", children: /* @__PURE__ */ jsxs22(
2140
+ "div",
2141
+ {
2142
+ ...modalProps,
2143
+ ref,
2144
+ className: "absolute bottom-0 w-full",
2145
+ "data-testid": "tray",
2146
+ children: [
2147
+ /* @__PURE__ */ jsx53(DismissButton2, { onDismiss: state.close }),
2148
+ children,
2149
+ /* @__PURE__ */ jsx53(DismissButton2, { onDismiss: state.close })
2150
+ ]
2151
+ }
2152
+ ) }) });
2153
+ }
2154
+ );
2155
+
2156
+ // src/DatePicker/DatePicker.tsx
2157
+ import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs23 } from "react/jsx-runtime";
2291
2158
  var DatePicker = ({
2292
2159
  disabled,
2293
2160
  required,
@@ -2311,8 +2178,8 @@ var DatePicker = ({
2311
2178
  shouldCloseOnSelect,
2312
2179
  ...props
2313
2180
  });
2314
- const ref = useRef13(null);
2315
- const stateProps = useStateProps8({
2181
+ const ref = useRef8(null);
2182
+ const stateProps = useStateProps4({
2316
2183
  focus: state.isOpen
2317
2184
  });
2318
2185
  const { groupProps, fieldProps, buttonProps, calendarProps } = useDatePicker(
@@ -2321,13 +2188,13 @@ var DatePicker = ({
2321
2188
  ref
2322
2189
  );
2323
2190
  const { isDisabled, errorMessage, description, label } = props;
2324
- const classNames2 = useClassNames27({
2191
+ const classNames2 = useClassNames31({
2325
2192
  component: "DatePicker",
2326
2193
  size,
2327
2194
  variant
2328
2195
  });
2329
- return /* @__PURE__ */ jsxs21(Fragment7, { children: [
2330
- /* @__PURE__ */ jsx51("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ jsx51(
2196
+ return /* @__PURE__ */ jsxs23(Fragment7, { children: [
2197
+ /* @__PURE__ */ jsx54("div", { className: "flex w-full min-w-[300px]", ...groupProps, children: /* @__PURE__ */ jsx54(
2331
2198
  DateField,
2332
2199
  {
2333
2200
  ...fieldProps,
@@ -2340,41 +2207,41 @@ var DatePicker = ({
2340
2207
  description: !state.isOpen && description,
2341
2208
  triggerRef: ref,
2342
2209
  width,
2343
- action: /* @__PURE__ */ jsx51("div", { className: classNames2.container, children: /* @__PURE__ */ jsx51(
2210
+ action: /* @__PURE__ */ jsx54("div", { className: classNames2.container, children: /* @__PURE__ */ jsx54(
2344
2211
  _Button,
2345
2212
  {
2346
- ...mergeProps8(buttonProps, stateProps),
2213
+ ...mergeProps5(buttonProps, stateProps),
2347
2214
  disabled: isDisabled,
2348
- children: /* @__PURE__ */ jsx51(
2215
+ children: /* @__PURE__ */ jsx54(
2349
2216
  "svg",
2350
2217
  {
2351
2218
  width: "24",
2352
2219
  height: "24",
2353
2220
  viewBox: "0 0 24 24",
2354
2221
  fill: "currentColor",
2355
- children: /* @__PURE__ */ jsx51("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
2222
+ children: /* @__PURE__ */ jsx54("path", { d: "M20.0906 19.2V6.6C20.0906 5.61 19.2806 4.8 18.2906 4.8H17.3906V3H15.5906V4.8H8.39062V3H6.59062V4.8H5.69063C4.69163 4.8 3.89962 5.61 3.89962 6.6L3.89062 19.2C3.89062 20.19 4.69163 21 5.69063 21H18.2906C19.2806 21 20.0906 20.19 20.0906 19.2ZM9.29062 11.1001H7.49061V12.9001H9.29062V11.1001ZM5.69062 8.40009H18.2906V6.60008H5.69062V8.40009ZM18.2906 10.2V19.2H5.69062V10.2H18.2906ZM14.6906 12.9001H16.4906V11.1001H14.6906V12.9001ZM12.8906 12.9001H11.0906V11.1001H12.8906V12.9001Z" })
2356
2223
  }
2357
2224
  )
2358
2225
  }
2359
2226
  ) })
2360
2227
  }
2361
2228
  ) }),
2362
- state.isOpen && /* @__PURE__ */ jsx51(Popover, { triggerRef: ref, state, children: /* @__PURE__ */ jsx51(Calendar, { disabled, ...calendarProps }) })
2229
+ state.isOpen && /* @__PURE__ */ jsx54(Popover2, { triggerRef: ref, state, children: /* @__PURE__ */ jsx54(_Calendar, { disabled, ...calendarProps }) })
2363
2230
  ] });
2364
2231
  };
2365
2232
 
2366
2233
  // src/Inset/Inset.tsx
2367
2234
  import {
2368
- cn as cn30,
2235
+ cn as cn33,
2369
2236
  paddingSpace as paddingSpace2,
2370
2237
  paddingSpaceX as paddingSpaceX2,
2371
2238
  paddingSpaceY as paddingSpaceY2
2372
2239
  } from "@marigold/system";
2373
- import { jsx as jsx52 } from "react/jsx-runtime";
2374
- var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
2240
+ import { jsx as jsx55 } from "react/jsx-runtime";
2241
+ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx55(
2375
2242
  "div",
2376
2243
  {
2377
- className: cn30(
2244
+ className: cn33(
2378
2245
  space && paddingSpace2[space],
2379
2246
  !space && spaceX && paddingSpaceX2[spaceX],
2380
2247
  !space && spaceY && paddingSpaceY2[spaceY]
@@ -2384,38 +2251,38 @@ var Inset = ({ space, spaceX, spaceY, children }) => /* @__PURE__ */ jsx52(
2384
2251
  );
2385
2252
 
2386
2253
  // src/Link/Link.tsx
2387
- import { forwardRef as forwardRef11 } from "react";
2254
+ import { forwardRef as forwardRef14 } from "react";
2388
2255
  import { Link } from "react-aria-components";
2389
- import { useClassNames as useClassNames28 } from "@marigold/system";
2390
- import { jsx as jsx53 } from "react/jsx-runtime";
2391
- var _Link = forwardRef11(
2256
+ import { useClassNames as useClassNames32 } from "@marigold/system";
2257
+ import { jsx as jsx56 } from "react/jsx-runtime";
2258
+ var _Link = forwardRef14(
2392
2259
  ({ variant, size, disabled, children, ...props }, ref) => {
2393
- const classNames2 = useClassNames28({
2260
+ const classNames2 = useClassNames32({
2394
2261
  component: "Link",
2395
2262
  variant,
2396
2263
  size
2397
2264
  });
2398
- return /* @__PURE__ */ jsx53(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
2265
+ return /* @__PURE__ */ jsx56(Link, { ...props, ref, className: classNames2, isDisabled: disabled, children });
2399
2266
  }
2400
2267
  );
2401
2268
 
2402
2269
  // src/List/List.tsx
2403
- import { useClassNames as useClassNames29 } from "@marigold/system";
2270
+ import { useClassNames as useClassNames33 } from "@marigold/system";
2404
2271
 
2405
2272
  // src/List/Context.ts
2406
- import { createContext as createContext3, useContext as useContext4 } from "react";
2273
+ import { createContext as createContext3, useContext as useContext8 } from "react";
2407
2274
  var ListContext = createContext3({});
2408
- var useListContext = () => useContext4(ListContext);
2275
+ var useListContext = () => useContext8(ListContext);
2409
2276
 
2410
2277
  // src/List/ListItem.tsx
2411
- import { jsx as jsx54 } from "react/jsx-runtime";
2278
+ import { jsx as jsx57 } from "react/jsx-runtime";
2412
2279
  var ListItem = ({ children, ...props }) => {
2413
2280
  const { classNames: classNames2 } = useListContext();
2414
- return /* @__PURE__ */ jsx54("li", { ...props, className: classNames2, children });
2281
+ return /* @__PURE__ */ jsx57("li", { ...props, className: classNames2, children });
2415
2282
  };
2416
2283
 
2417
2284
  // src/List/List.tsx
2418
- import { jsx as jsx55 } from "react/jsx-runtime";
2285
+ import { jsx as jsx58 } from "react/jsx-runtime";
2419
2286
  var List = ({
2420
2287
  as = "ul",
2421
2288
  children,
@@ -2424,208 +2291,78 @@ var List = ({
2424
2291
  ...props
2425
2292
  }) => {
2426
2293
  const Component = as;
2427
- const classNames2 = useClassNames29({ component: "List", variant, size });
2428
- return /* @__PURE__ */ jsx55(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx55(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
2294
+ const classNames2 = useClassNames33({ component: "List", variant, size });
2295
+ return /* @__PURE__ */ jsx58(Component, { ...props, className: classNames2[as], children: /* @__PURE__ */ jsx58(ListContext.Provider, { value: { classNames: classNames2.item }, children }) });
2429
2296
  };
2430
2297
  List.Item = ListItem;
2431
2298
 
2432
2299
  // src/Menu/Menu.tsx
2433
- import { useRef as useRef16 } from "react";
2434
- import { useMenu } from "@react-aria/menu";
2435
- import { useSyncRef } from "@react-aria/utils";
2436
- import { Item as Item4, Section } from "@react-stately/collections";
2437
- import { useTreeState as useTreeState2 } from "@react-stately/tree";
2438
- import { useClassNames as useClassNames31 } from "@marigold/system";
2439
-
2440
- // src/Menu/Context.ts
2441
- import {
2442
- createContext as createContext4,
2443
- useContext as useContext5
2444
- } from "react";
2445
- var MenuContext = createContext4({});
2446
- var useMenuContext = () => useContext5(MenuContext);
2300
+ import { Menu, MenuTrigger } from "react-aria-components";
2301
+ import { useClassNames as useClassNames36 } from "@marigold/system";
2447
2302
 
2448
2303
  // src/Menu/MenuItem.tsx
2449
- import { useRef as useRef14 } from "react";
2450
- import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
2451
- import { useMenuItem } from "@react-aria/menu";
2452
- import { mergeProps as mergeProps9 } from "@react-aria/utils";
2453
- import { useStateProps as useStateProps9 } from "@marigold/system";
2454
- import { jsx as jsx56 } from "react/jsx-runtime";
2455
- var MenuItem = ({
2456
- item,
2457
- state,
2458
- onAction,
2459
- className
2460
- }) => {
2461
- const ref = useRef14(null);
2462
- const { onClose } = useMenuContext();
2463
- const { menuItemProps } = useMenuItem(
2464
- {
2465
- key: item.key,
2466
- onAction,
2467
- onClose
2468
- },
2469
- state,
2470
- ref
2471
- );
2472
- const { isFocusVisible, focusProps } = useFocusRing5();
2473
- const stateProps = useStateProps9({
2474
- focus: isFocusVisible
2475
- });
2476
- const { onPointerUp, ...props } = menuItemProps;
2477
- return /* @__PURE__ */ jsx56(
2478
- "li",
2479
- {
2480
- ref,
2481
- className,
2482
- ...mergeProps9(
2483
- props,
2484
- { onPointerDown: onPointerUp },
2485
- stateProps,
2486
- focusProps
2487
- ),
2488
- children: item.props.children
2489
- }
2490
- );
2304
+ import { MenuItem } from "react-aria-components";
2305
+ import { useClassNames as useClassNames34 } from "@marigold/system";
2306
+ import { jsx as jsx59 } from "react/jsx-runtime";
2307
+ var _MenuItem = ({ children, ...props }) => {
2308
+ const classNames2 = useClassNames34({ component: "Menu" });
2309
+ return /* @__PURE__ */ jsx59(MenuItem, { ...props, className: classNames2.item, children });
2491
2310
  };
2492
2311
 
2493
2312
  // src/Menu/MenuSection.tsx
2494
- import { useMenuSection } from "@react-aria/menu";
2495
- import { useClassNames as useClassNames30 } from "@marigold/system";
2496
- import { Fragment as Fragment8, jsx as jsx57, jsxs as jsxs22 } from "react/jsx-runtime";
2497
- var MenuSection = ({ onAction, item, state }) => {
2498
- let { itemProps, headingProps, groupProps } = useMenuSection({
2499
- heading: item.rendered,
2500
- "aria-label": item["aria-label"]
2501
- });
2502
- const className = useClassNames30({ component: "Menu" });
2503
- return /* @__PURE__ */ jsxs22(Fragment8, { children: [
2504
- item.key !== state.collection.getFirstKey() && /* @__PURE__ */ jsx57("li", { children: /* @__PURE__ */ jsx57(_Divider, { variant: "section" }) }),
2505
- /* @__PURE__ */ jsxs22("li", { ...itemProps, children: [
2506
- item.rendered && /* @__PURE__ */ jsx57("span", { ...headingProps, className: className.section, children: item.rendered }),
2507
- /* @__PURE__ */ jsx57("ul", { ...groupProps, className: "pb-1", children: [...item.props.children].map((node) => /* @__PURE__ */ jsx57(
2508
- MenuItem,
2509
- {
2510
- item: node,
2511
- state,
2512
- onAction,
2513
- className: className.item
2514
- },
2515
- node.key
2516
- )) })
2517
- ] })
2313
+ import { Section as Section2 } from "react-aria-components";
2314
+ import { useClassNames as useClassNames35 } from "@marigold/system";
2315
+ import { jsx as jsx60, jsxs as jsxs24 } from "react/jsx-runtime";
2316
+ var _MenuSection = ({ children, title, ...props }) => {
2317
+ const className = useClassNames35({ component: "Menu" });
2318
+ return /* @__PURE__ */ jsxs24(Section2, { ...props, children: [
2319
+ /* @__PURE__ */ jsx60(_Header, { className: className.section, children: title }),
2320
+ children
2518
2321
  ] });
2519
2322
  };
2520
- var MenuSection_default = MenuSection;
2521
-
2522
- // src/Menu/MenuTrigger.tsx
2523
- import { Children as Children5, useRef as useRef15 } from "react";
2524
- import { PressResponder } from "@react-aria/interactions";
2525
- import { useMenuTrigger } from "@react-aria/menu";
2526
- import { useObjectRef as useObjectRef3 } from "@react-aria/utils";
2527
- import { useMenuTriggerState } from "@react-stately/menu";
2528
- import { useSmallScreen } from "@marigold/system";
2529
- import { jsx as jsx58, jsxs as jsxs23 } from "react/jsx-runtime";
2530
- var MenuTrigger = ({
2531
- disabled,
2323
+
2324
+ // src/Menu/Menu.tsx
2325
+ import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
2326
+ var _Menu = ({
2327
+ children,
2328
+ label,
2329
+ variant,
2330
+ size,
2532
2331
  open,
2533
- onOpenChange,
2534
- children
2332
+ ...props
2535
2333
  }) => {
2536
- const [menuTrigger, menu] = Children5.toArray(children);
2537
- const menuTriggerRef = useRef15(null);
2538
- const menuRef = useObjectRef3();
2539
- const state = useMenuTriggerState({
2540
- isOpen: open,
2541
- onOpenChange
2542
- });
2543
- const { menuTriggerProps, menuProps } = useMenuTrigger(
2544
- { trigger: "press", isDisabled: disabled },
2545
- state,
2546
- menuTriggerRef
2547
- );
2548
- const menuContext = {
2549
- ...menuProps,
2550
- ref: menuRef,
2551
- open: state.isOpen,
2552
- onClose: state.close,
2553
- autoFocus: state.focusStrategy
2554
- };
2555
- const isSmallScreen = useSmallScreen();
2556
- return /* @__PURE__ */ jsxs23(MenuContext.Provider, { value: menuContext, children: [
2557
- /* @__PURE__ */ jsx58(
2558
- PressResponder,
2559
- {
2560
- ...menuTriggerProps,
2561
- ref: menuTriggerRef,
2562
- isPressed: state.isOpen,
2563
- children: menuTrigger
2564
- }
2565
- ),
2566
- isSmallScreen ? /* @__PURE__ */ jsx58(Tray, { state, children: menu }) : /* @__PURE__ */ jsx58(Popover, { triggerRef: menuTriggerRef, scrollRef: menuRef, state, children: menu })
2334
+ const classNames2 = useClassNames36({ component: "Menu", variant, size });
2335
+ return /* @__PURE__ */ jsxs25(MenuTrigger, { ...props, children: [
2336
+ /* @__PURE__ */ jsx61(_Button, { variant: "menu", children: label }),
2337
+ /* @__PURE__ */ jsx61(_Popover, { open, children: /* @__PURE__ */ jsx61(Menu, { ...props, className: classNames2.container, children }) })
2567
2338
  ] });
2568
2339
  };
2569
-
2570
- // src/Menu/Menu.tsx
2571
- import { jsx as jsx59 } from "react/jsx-runtime";
2572
- var Menu = ({ variant, size, ...props }) => {
2573
- const { ref: scrollRef, ...menuContext } = useMenuContext();
2574
- const ownProps = { ...props, ...menuContext };
2575
- const ref = useRef16(null);
2576
- const state = useTreeState2({ ...ownProps, selectionMode: "none" });
2577
- const { menuProps } = useMenu(ownProps, state, ref);
2578
- useSyncRef({ ref: scrollRef }, ref);
2579
- const classNames2 = useClassNames31({ component: "Menu", variant, size });
2580
- return /* @__PURE__ */ jsx59("ul", { ref, className: classNames2.container, ...menuProps, children: [...state.collection].map((item) => {
2581
- if (item.type === "section") {
2582
- return /* @__PURE__ */ jsx59(
2583
- MenuSection_default,
2584
- {
2585
- item,
2586
- state,
2587
- onAction: props.onAction
2588
- },
2589
- item.key
2590
- );
2591
- }
2592
- return /* @__PURE__ */ jsx59(
2593
- MenuItem,
2594
- {
2595
- item,
2596
- state,
2597
- onAction: props.onAction,
2598
- className: classNames2.item
2599
- },
2600
- item.key
2601
- );
2602
- }) });
2603
- };
2604
- Menu.Trigger = MenuTrigger;
2605
- Menu.Item = Item4;
2606
- Menu.Section = Section;
2340
+ _Menu.Item = _MenuItem;
2341
+ _Menu.Section = _MenuSection;
2607
2342
 
2608
2343
  // src/Menu/ActionMenu.tsx
2609
- import { SVG as SVG5 } from "@marigold/system";
2610
- import { jsx as jsx60, jsxs as jsxs24 } from "react/jsx-runtime";
2611
- var ActionMenu = (props) => {
2612
- return /* @__PURE__ */ jsxs24(Menu.Trigger, { children: [
2613
- /* @__PURE__ */ jsx60(_Button, { variant: "menu", size: "small", children: /* @__PURE__ */ jsx60(SVG5, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx60("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
2614
- /* @__PURE__ */ jsx60(Menu, { ...props })
2344
+ import { Menu as Menu2, MenuTrigger as MenuTrigger2 } from "react-aria-components";
2345
+ import { SVG as SVG5, useClassNames as useClassNames37 } from "@marigold/system";
2346
+ import { jsx as jsx62, jsxs as jsxs26 } from "react/jsx-runtime";
2347
+ var ActionMenu = ({ variant, size, ...props }) => {
2348
+ const classNames2 = useClassNames37({ component: "Menu", variant, size });
2349
+ return /* @__PURE__ */ jsxs26(MenuTrigger2, { children: [
2350
+ /* @__PURE__ */ jsx62(_Button, { variant: "menu", size: "small", children: /* @__PURE__ */ jsx62(SVG5, { viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx62("path", { d: "M12.0117 7.47656C13.2557 7.47656 14.2734 6.45879 14.2734 5.21484C14.2734 3.9709 13.2557 2.95312 12.0117 2.95312C10.7678 2.95312 9.75 3.9709 9.75 5.21484C9.75 6.45879 10.7678 7.47656 12.0117 7.47656ZM12.0117 9.73828C10.7678 9.73828 9.75 10.7561 9.75 12C9.75 13.2439 10.7678 14.2617 12.0117 14.2617C13.2557 14.2617 14.2734 13.2439 14.2734 12C14.2734 10.7561 13.2557 9.73828 12.0117 9.73828ZM12.0117 16.5234C10.7678 16.5234 9.75 17.5412 9.75 18.7852C9.75 20.0291 10.7678 21.0469 12.0117 21.0469C13.2557 21.0469 14.2734 20.0291 14.2734 18.7852C14.2734 17.5412 13.2557 16.5234 12.0117 16.5234Z" }) }) }),
2351
+ /* @__PURE__ */ jsx62(_Popover, { children: /* @__PURE__ */ jsx62(Menu2, { ...props, className: classNames2.container, children: props.children }) })
2615
2352
  ] });
2616
2353
  };
2617
2354
 
2618
2355
  // src/Message/Message.tsx
2619
- import { cn as cn31, useClassNames as useClassNames32 } from "@marigold/system";
2620
- import { jsx as jsx61, jsxs as jsxs25 } from "react/jsx-runtime";
2356
+ import { cn as cn34, useClassNames as useClassNames38 } from "@marigold/system";
2357
+ import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
2621
2358
  var icons = {
2622
- success: () => /* @__PURE__ */ jsx61(
2359
+ success: () => /* @__PURE__ */ jsx63(
2623
2360
  "svg",
2624
2361
  {
2625
2362
  xmlns: "http://www.w3.org/2000/svg",
2626
2363
  viewBox: "0 0 24 24",
2627
2364
  fill: "currentColor",
2628
- children: /* @__PURE__ */ jsx61(
2365
+ children: /* @__PURE__ */ jsx63(
2629
2366
  "path",
2630
2367
  {
2631
2368
  fillRule: "evenodd",
@@ -2635,13 +2372,13 @@ var icons = {
2635
2372
  )
2636
2373
  }
2637
2374
  ),
2638
- info: () => /* @__PURE__ */ jsx61(
2375
+ info: () => /* @__PURE__ */ jsx63(
2639
2376
  "svg",
2640
2377
  {
2641
2378
  xmlns: "http://www.w3.org/2000/svg",
2642
2379
  viewBox: "0 0 24 24",
2643
2380
  fill: "currentColor",
2644
- children: /* @__PURE__ */ jsx61(
2381
+ children: /* @__PURE__ */ jsx63(
2645
2382
  "path",
2646
2383
  {
2647
2384
  fillRule: "evenodd",
@@ -2651,13 +2388,13 @@ var icons = {
2651
2388
  )
2652
2389
  }
2653
2390
  ),
2654
- warning: () => /* @__PURE__ */ jsx61(
2391
+ warning: () => /* @__PURE__ */ jsx63(
2655
2392
  "svg",
2656
2393
  {
2657
2394
  xmlns: "http://www.w3.org/2000/svg",
2658
2395
  viewBox: "0 0 24 24",
2659
2396
  fill: "currentColor",
2660
- children: /* @__PURE__ */ jsx61(
2397
+ children: /* @__PURE__ */ jsx63(
2661
2398
  "path",
2662
2399
  {
2663
2400
  fillRule: "evenodd",
@@ -2667,13 +2404,13 @@ var icons = {
2667
2404
  )
2668
2405
  }
2669
2406
  ),
2670
- error: () => /* @__PURE__ */ jsx61(
2407
+ error: () => /* @__PURE__ */ jsx63(
2671
2408
  "svg",
2672
2409
  {
2673
2410
  xmlns: "http://www.w3.org/2000/svg",
2674
2411
  viewBox: "0 0 24 24",
2675
2412
  fill: "currentColor",
2676
- children: /* @__PURE__ */ jsx61(
2413
+ children: /* @__PURE__ */ jsx63(
2677
2414
  "path",
2678
2415
  {
2679
2416
  fillRule: "evenodd",
@@ -2691,100 +2428,41 @@ var Message = ({
2691
2428
  children,
2692
2429
  ...props
2693
2430
  }) => {
2694
- const classNames2 = useClassNames32({ component: "Message", variant, size });
2431
+ const classNames2 = useClassNames38({ component: "Message", variant, size });
2695
2432
  const Icon3 = icons[variant];
2696
- return /* @__PURE__ */ jsxs25(
2433
+ return /* @__PURE__ */ jsxs27(
2697
2434
  "div",
2698
2435
  {
2699
- className: cn31(
2436
+ className: cn34(
2700
2437
  "grid auto-rows-min grid-cols-[min-content_auto] gap-1",
2701
- classNames2.container
2702
- ),
2703
- ...props,
2704
- children: [
2705
- /* @__PURE__ */ jsx61("div", { className: cn31("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx61(Icon3, {}) }),
2706
- /* @__PURE__ */ jsx61(
2707
- "div",
2708
- {
2709
- className: cn31("col-start-2 row-start-1 self-center", classNames2.title),
2710
- children: messageTitle
2711
- }
2712
- ),
2713
- /* @__PURE__ */ jsx61("div", { className: cn31("col-start-2", classNames2.content), children })
2714
- ]
2715
- }
2716
- );
2717
- };
2718
-
2719
- // src/NumberField/NumberField.tsx
2720
- import { forwardRef as forwardRef13 } from "react";
2721
- import { Group, NumberField } from "react-aria-components";
2722
- import { cn as cn34, useClassNames as useClassNames34 } from "@marigold/system";
2723
-
2724
- // src/Input/_Input.tsx
2725
- import { cloneElement as cloneElement4, forwardRef as forwardRef12 } from "react";
2726
- import { Input as Input2 } from "react-aria-components";
2727
- import { cn as cn32, useClassNames as useClassNames33 } from "@marigold/system";
2728
- import { jsx as jsx62, jsxs as jsxs26 } from "react/jsx-runtime";
2729
- var _Input = forwardRef12(
2730
- ({ type, icon, action, variant, size, className, ...props }, ref) => {
2731
- const classNames2 = useClassNames33({
2732
- component: "Input",
2733
- variant,
2734
- size
2735
- });
2736
- const inputIcon = icon ? cloneElement4(icon, {
2737
- className: cn32(
2738
- "pointer-events-none absolute",
2739
- classNames2.icon,
2740
- icon.props.className
2741
- ),
2742
- ...icon.props
2743
- }) : null;
2744
- const inputAction = action && !props.readOnly ? cloneElement4(action, {
2745
- className: cn32(
2746
- "absolute",
2747
- classNames2.action,
2748
- action.props.className
2438
+ classNames2.container
2749
2439
  ),
2750
- ...action.props
2751
- }) : null;
2752
- return /* @__PURE__ */ jsxs26(
2753
- "div",
2754
- {
2755
- className: "group/input relative flex items-center",
2756
- "data-icon": icon && "",
2757
- "data-action": action && "",
2758
- children: [
2759
- inputIcon,
2760
- /* @__PURE__ */ jsx62(
2761
- Input2,
2762
- {
2763
- ...props,
2764
- className: cn32(
2765
- "w-full flex-1",
2766
- "disabled:cursor-not-allowed",
2767
- "[&[type=file]]:border-none [&[type=file]]:p-0",
2768
- "[&[type=color]]:ml-0 [&[type=color]]:border-none [&[type=color]]:bg-transparent [&[type=color]]:p-0",
2769
- classNames2.input,
2770
- className
2771
- ),
2772
- ref,
2773
- type
2774
- }
2775
- ),
2776
- inputAction
2777
- ]
2778
- }
2779
- );
2780
- }
2781
- );
2440
+ ...props,
2441
+ children: [
2442
+ /* @__PURE__ */ jsx63("div", { className: cn34("col-span-1 h-5 w-5 self-center", classNames2.icon), children: /* @__PURE__ */ jsx63(Icon3, {}) }),
2443
+ /* @__PURE__ */ jsx63(
2444
+ "div",
2445
+ {
2446
+ className: cn34("col-start-2 row-start-1 self-center", classNames2.title),
2447
+ children: messageTitle
2448
+ }
2449
+ ),
2450
+ /* @__PURE__ */ jsx63("div", { className: cn34("col-start-2", classNames2.content), children })
2451
+ ]
2452
+ }
2453
+ );
2454
+ };
2455
+
2456
+ // src/NumberField/NumberField.tsx
2457
+ import { forwardRef as forwardRef15 } from "react";
2458
+ import { Group, NumberField } from "react-aria-components";
2459
+ import { cn as cn36, useClassNames as useClassNames39 } from "@marigold/system";
2782
2460
 
2783
2461
  // src/NumberField/StepButton.tsx
2784
- import { Button as Button2 } from "react-aria-components";
2785
- import { cn as cn33 } from "@marigold/system";
2786
- import { jsx as jsx63 } from "react/jsx-runtime";
2787
- var Plus = () => /* @__PURE__ */ jsx63("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx63(
2462
+ import { Button as Button3 } from "react-aria-components";
2463
+ import { cn as cn35 } from "@marigold/system";
2464
+ import { jsx as jsx64 } from "react/jsx-runtime";
2465
+ var Plus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx64(
2788
2466
  "path",
2789
2467
  {
2790
2468
  fillRule: "evenodd",
@@ -2792,7 +2470,7 @@ var Plus = () => /* @__PURE__ */ jsx63("svg", { width: 16, height: 16, viewBox:
2792
2470
  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"
2793
2471
  }
2794
2472
  ) });
2795
- var Minus = () => /* @__PURE__ */ jsx63("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx63(
2473
+ var Minus = () => /* @__PURE__ */ jsx64("svg", { width: 16, height: 16, viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ jsx64(
2796
2474
  "path",
2797
2475
  {
2798
2476
  fillRule: "evenodd",
@@ -2802,10 +2480,10 @@ var Minus = () => /* @__PURE__ */ jsx63("svg", { width: 16, height: 16, viewBox:
2802
2480
  ) });
2803
2481
  var _StepButton = ({ direction, className, ...props }) => {
2804
2482
  const Icon3 = direction === "up" ? Plus : Minus;
2805
- return /* @__PURE__ */ jsx63(
2806
- Button2,
2483
+ return /* @__PURE__ */ jsx64(
2484
+ Button3,
2807
2485
  {
2808
- className: cn33(
2486
+ className: cn35(
2809
2487
  [
2810
2488
  "flex items-center justify-center",
2811
2489
  "cursor-pointer data-[disabled]:cursor-not-allowed"
@@ -2813,14 +2491,14 @@ var _StepButton = ({ direction, className, ...props }) => {
2813
2491
  className
2814
2492
  ),
2815
2493
  ...props,
2816
- children: /* @__PURE__ */ jsx63(Icon3, {})
2494
+ children: /* @__PURE__ */ jsx64(Icon3, {})
2817
2495
  }
2818
2496
  );
2819
2497
  };
2820
2498
 
2821
2499
  // src/NumberField/NumberField.tsx
2822
- import { jsx as jsx64, jsxs as jsxs27 } from "react/jsx-runtime";
2823
- var _NumberField = forwardRef13(
2500
+ import { jsx as jsx65, jsxs as jsxs28 } from "react/jsx-runtime";
2501
+ var _NumberField = forwardRef15(
2824
2502
  ({
2825
2503
  variant,
2826
2504
  size,
@@ -2831,7 +2509,7 @@ var _NumberField = forwardRef13(
2831
2509
  hideStepper,
2832
2510
  ...rest
2833
2511
  }, ref) => {
2834
- const classNames2 = useClassNames34({
2512
+ const classNames2 = useClassNames39({
2835
2513
  component: "NumberField",
2836
2514
  size,
2837
2515
  variant
@@ -2844,8 +2522,8 @@ var _NumberField = forwardRef13(
2844
2522
  ...rest
2845
2523
  };
2846
2524
  const showStepper = !hideStepper;
2847
- return /* @__PURE__ */ jsx64(FieldBase2, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs27(Group, { className: cn34("flex items-stretch", classNames2.group), children: [
2848
- showStepper && /* @__PURE__ */ jsx64(
2525
+ return /* @__PURE__ */ jsx65(FieldBase, { as: NumberField, ...props, children: /* @__PURE__ */ jsxs28(Group, { className: cn36("flex items-stretch", classNames2.group), children: [
2526
+ showStepper && /* @__PURE__ */ jsx65(
2849
2527
  _StepButton,
2850
2528
  {
2851
2529
  className: classNames2.stepper,
@@ -2853,7 +2531,7 @@ var _NumberField = forwardRef13(
2853
2531
  slot: "decrement"
2854
2532
  }
2855
2533
  ),
2856
- /* @__PURE__ */ jsx64("div", { className: "flex-1", children: /* @__PURE__ */ jsx64(
2534
+ /* @__PURE__ */ jsx65("div", { className: "flex-1", children: /* @__PURE__ */ jsx65(
2857
2535
  _Input,
2858
2536
  {
2859
2537
  ref,
@@ -2862,7 +2540,7 @@ var _NumberField = forwardRef13(
2862
2540
  className: classNames2.input
2863
2541
  }
2864
2542
  ) }),
2865
- showStepper && /* @__PURE__ */ jsx64(
2543
+ showStepper && /* @__PURE__ */ jsx65(
2866
2544
  _StepButton,
2867
2545
  {
2868
2546
  className: classNames2.stepper,
@@ -2875,43 +2553,43 @@ var _NumberField = forwardRef13(
2875
2553
  );
2876
2554
 
2877
2555
  // src/Provider/index.ts
2878
- import { useTheme as useTheme5, ThemeProvider as ThemeProvider2 } from "@marigold/system";
2556
+ import { useTheme as useTheme6, ThemeProvider as ThemeProvider2 } from "@marigold/system";
2879
2557
 
2880
2558
  // src/Provider/MarigoldProvider.tsx
2881
2559
  import { OverlayProvider } from "@react-aria/overlays";
2882
2560
  import {
2883
2561
  ThemeProvider,
2884
2562
  defaultTheme,
2885
- useTheme as useTheme4
2563
+ useTheme as useTheme5
2886
2564
  } from "@marigold/system";
2887
- import { jsx as jsx65 } from "react/jsx-runtime";
2565
+ import { jsx as jsx66 } from "react/jsx-runtime";
2888
2566
  function MarigoldProvider({
2889
2567
  children,
2890
2568
  theme
2891
2569
  }) {
2892
- const outerTheme = useTheme4();
2570
+ const outerTheme = useTheme5();
2893
2571
  const isTopLevel = outerTheme === defaultTheme;
2894
- return /* @__PURE__ */ jsx65(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx65(OverlayProvider, { children }) : children });
2572
+ return /* @__PURE__ */ jsx66(ThemeProvider, { theme, children: isTopLevel ? /* @__PURE__ */ jsx66(OverlayProvider, { children }) : children });
2895
2573
  }
2896
2574
 
2897
2575
  // src/Radio/Radio.tsx
2898
2576
  import {
2899
- forwardRef as forwardRef14
2577
+ forwardRef as forwardRef16
2900
2578
  } from "react";
2901
2579
  import { Radio } from "react-aria-components";
2902
- import { cn as cn36, useClassNames as useClassNames36 } from "@marigold/system";
2580
+ import { cn as cn38, useClassNames as useClassNames41 } from "@marigold/system";
2903
2581
 
2904
2582
  // src/Radio/Context.ts
2905
- import { createContext as createContext5, useContext as useContext6 } from "react";
2906
- var RadioGroupContext = createContext5(
2583
+ import { createContext as createContext4, useContext as useContext9 } from "react";
2584
+ var RadioGroupContext = createContext4(
2907
2585
  null
2908
2586
  );
2909
- var useRadioGroupContext = () => useContext6(RadioGroupContext);
2587
+ var useRadioGroupContext = () => useContext9(RadioGroupContext);
2910
2588
 
2911
2589
  // src/Radio/RadioGroup.tsx
2912
2590
  import { RadioGroup } from "react-aria-components";
2913
- import { cn as cn35, useClassNames as useClassNames35 } from "@marigold/system";
2914
- import { jsx as jsx66 } from "react/jsx-runtime";
2591
+ import { cn as cn37, useClassNames as useClassNames40 } from "@marigold/system";
2592
+ import { jsx as jsx67 } from "react/jsx-runtime";
2915
2593
  var _RadioGroup = ({
2916
2594
  variant,
2917
2595
  size,
@@ -2927,7 +2605,7 @@ var _RadioGroup = ({
2927
2605
  width,
2928
2606
  ...rest
2929
2607
  }) => {
2930
- const classNames2 = useClassNames35({ component: "Radio", variant, size });
2608
+ const classNames2 = useClassNames40({ component: "Radio", variant, size });
2931
2609
  const props = {
2932
2610
  isDisabled: disabled,
2933
2611
  isReadOnly: readOnly,
@@ -2935,8 +2613,8 @@ var _RadioGroup = ({
2935
2613
  isInvalid: error,
2936
2614
  ...rest
2937
2615
  };
2938
- return /* @__PURE__ */ jsx66(
2939
- FieldBase2,
2616
+ return /* @__PURE__ */ jsx67(
2617
+ FieldBase,
2940
2618
  {
2941
2619
  as: RadioGroup,
2942
2620
  width,
@@ -2946,18 +2624,18 @@ var _RadioGroup = ({
2946
2624
  variant,
2947
2625
  size,
2948
2626
  ...props,
2949
- children: /* @__PURE__ */ jsx66(
2627
+ children: /* @__PURE__ */ jsx67(
2950
2628
  "div",
2951
2629
  {
2952
2630
  role: "presentation",
2953
2631
  "data-testid": "group",
2954
2632
  "data-orientation": orientation,
2955
- className: cn35(
2633
+ className: cn37(
2956
2634
  classNames2.group,
2957
2635
  "flex items-start",
2958
2636
  orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"
2959
2637
  ),
2960
- children: /* @__PURE__ */ jsx66(RadioGroupContext.Provider, { value: { width, variant, size }, children })
2638
+ children: /* @__PURE__ */ jsx67(RadioGroupContext.Provider, { value: { width, variant, size }, children })
2961
2639
  }
2962
2640
  )
2963
2641
  }
@@ -2965,33 +2643,33 @@ var _RadioGroup = ({
2965
2643
  };
2966
2644
 
2967
2645
  // src/Radio/Radio.tsx
2968
- import { Fragment as Fragment9, jsx as jsx67, jsxs as jsxs28 } from "react/jsx-runtime";
2969
- var Dot = () => /* @__PURE__ */ jsx67("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx67("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
2970
- var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx67(
2646
+ import { Fragment as Fragment8, jsx as jsx68, jsxs as jsxs29 } from "react/jsx-runtime";
2647
+ var Dot = () => /* @__PURE__ */ jsx68("svg", { viewBox: "0 0 6 6", children: /* @__PURE__ */ jsx68("circle", { fill: "currentColor", cx: "3", cy: "3", r: "3" }) });
2648
+ var Icon2 = ({ checked, className, ...props }) => /* @__PURE__ */ jsx68(
2971
2649
  "div",
2972
2650
  {
2973
- className: cn36(
2651
+ className: cn38(
2974
2652
  "bg-secondary-50 flex h-4 w-4 items-center justify-center rounded-[50%] border p-1",
2975
2653
  className
2976
2654
  ),
2977
2655
  "aria-hidden": "true",
2978
2656
  ...props,
2979
- children: checked ? /* @__PURE__ */ jsx67(Dot, {}) : null
2657
+ children: checked ? /* @__PURE__ */ jsx68(Dot, {}) : null
2980
2658
  }
2981
2659
  );
2982
- var _Radio = forwardRef14(
2660
+ var _Radio = forwardRef16(
2983
2661
  ({ value, disabled, width, children, ...props }, ref) => {
2984
2662
  const { variant, size, width: groupWidth } = useRadioGroupContext();
2985
- const classNames2 = useClassNames36({
2663
+ const classNames2 = useClassNames41({
2986
2664
  component: "Radio",
2987
2665
  variant: variant || props.variant,
2988
2666
  size: size || props.size
2989
2667
  });
2990
- return /* @__PURE__ */ jsx67(
2668
+ return /* @__PURE__ */ jsx68(
2991
2669
  Radio,
2992
2670
  {
2993
2671
  ref,
2994
- className: cn36(
2672
+ className: cn38(
2995
2673
  "group/radio",
2996
2674
  "relative flex items-center gap-[1ch]",
2997
2675
  width || groupWidth || "w-full",
@@ -3000,18 +2678,18 @@ var _Radio = forwardRef14(
3000
2678
  value,
3001
2679
  isDisabled: disabled,
3002
2680
  ...props,
3003
- children: ({ isSelected }) => /* @__PURE__ */ jsxs28(Fragment9, { children: [
3004
- /* @__PURE__ */ jsx67(
2681
+ children: ({ isSelected }) => /* @__PURE__ */ jsxs29(Fragment8, { children: [
2682
+ /* @__PURE__ */ jsx68(
3005
2683
  Icon2,
3006
2684
  {
3007
2685
  checked: isSelected,
3008
- className: cn36(
2686
+ className: cn38(
3009
2687
  disabled ? "cursor-not-allowed" : "cursor-pointer",
3010
2688
  classNames2.radio
3011
2689
  )
3012
2690
  }
3013
2691
  ),
3014
- /* @__PURE__ */ jsx67("div", { className: classNames2.label, children })
2692
+ /* @__PURE__ */ jsx68("div", { className: classNames2.label, children })
3015
2693
  ] })
3016
2694
  }
3017
2695
  );
@@ -3020,10 +2698,10 @@ var _Radio = forwardRef14(
3020
2698
  _Radio.Group = _RadioGroup;
3021
2699
 
3022
2700
  // src/SearchField/SearchField.tsx
3023
- import { forwardRef as forwardRef15 } from "react";
2701
+ import { forwardRef as forwardRef17 } from "react";
3024
2702
  import { SearchField } from "react-aria-components";
3025
- import { jsx as jsx68 } from "react/jsx-runtime";
3026
- var SearchIcon2 = (props) => /* @__PURE__ */ jsx68(
2703
+ import { jsx as jsx69 } from "react/jsx-runtime";
2704
+ var SearchIcon2 = (props) => /* @__PURE__ */ jsx69(
3027
2705
  "svg",
3028
2706
  {
3029
2707
  xmlns: "http://www.w3.org/2000/svg",
@@ -3032,10 +2710,10 @@ var SearchIcon2 = (props) => /* @__PURE__ */ jsx68(
3032
2710
  width: 24,
3033
2711
  height: 24,
3034
2712
  ...props,
3035
- children: /* @__PURE__ */ jsx68("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
2713
+ children: /* @__PURE__ */ jsx69("path", { d: "M16.1865 14.5142H15.3057L14.9936 14.2131C16.0862 12.9421 16.744 11.292 16.744 9.497C16.744 5.49443 13.4996 2.25 9.497 2.25C5.49443 2.25 2.25 5.49443 2.25 9.497C2.25 13.4996 5.49443 16.744 9.497 16.744C11.292 16.744 12.9421 16.0862 14.2131 14.9936L14.5142 15.3057V16.1865L20.0888 21.75L21.75 20.0888L16.1865 14.5142ZM9.49701 14.5142C6.72085 14.5142 4.47986 12.2732 4.47986 9.49701C4.47986 6.72085 6.72085 4.47986 9.49701 4.47986C12.2732 4.47986 14.5142 6.72085 14.5142 9.49701C14.5142 12.2732 12.2732 14.5142 9.49701 14.5142Z" })
3036
2714
  }
3037
2715
  );
3038
- var _SearchField = forwardRef15(
2716
+ var _SearchField = forwardRef17(
3039
2717
  ({ disabled, required, readOnly, error, action, ...rest }, ref) => {
3040
2718
  const props = {
3041
2719
  ...rest,
@@ -3044,159 +2722,64 @@ var _SearchField = forwardRef15(
3044
2722
  isReadOnly: readOnly,
3045
2723
  isInvalid: error
3046
2724
  };
3047
- return /* @__PURE__ */ jsx68(FieldBase2, { as: SearchField, ...props, children: /* @__PURE__ */ jsx68(_Input, { ref, icon: /* @__PURE__ */ jsx68(SearchIcon2, {}) }) });
2725
+ return /* @__PURE__ */ jsx69(FieldBase, { as: SearchField, ...props, children: /* @__PURE__ */ jsx69(_Input, { ref, icon: /* @__PURE__ */ jsx69(SearchIcon2, {}) }) });
3048
2726
  }
3049
2727
  );
3050
2728
 
3051
2729
  // src/Select/Select.tsx
2730
+ import { forwardRef as forwardRef18 } from "react";
3052
2731
  import {
3053
- forwardRef as forwardRef16,
3054
- useRef as useRef17
3055
- } from "react";
3056
- import { useButton as useButton3 } from "@react-aria/button";
3057
- import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
3058
- import { useLocalizedStringFormatter } from "@react-aria/i18n";
3059
- import { HiddenSelect, useSelect } from "@react-aria/select";
3060
- import { mergeProps as mergeProps10, useObjectRef as useObjectRef4 } from "@react-aria/utils";
3061
- import { Item as Item5, Section as Section2 } from "@react-stately/collections";
3062
- import { useSelectState } from "@react-stately/select";
3063
- import {
3064
- cn as cn37,
3065
- useClassNames as useClassNames37,
3066
- useSmallScreen as useSmallScreen2,
3067
- useStateProps as useStateProps10
3068
- } from "@marigold/system";
3069
-
3070
- // src/Select/intl.ts
3071
- var messages = {
3072
- "en-US": {
3073
- placeholder: "Select an option\u2026"
3074
- },
3075
- "de-DE": {
3076
- placeholder: "Option ausw\xE4hlen\u2026"
3077
- }
3078
- };
3079
-
3080
- // src/Select/Select.tsx
3081
- import { jsx as jsx69, jsxs as jsxs29 } from "react/jsx-runtime";
3082
- var Select = forwardRef16(
2732
+ Button as Button4,
2733
+ Select,
2734
+ SelectValue
2735
+ } from "react-aria-components";
2736
+ import { cn as cn39, useClassNames as useClassNames42 } from "@marigold/system";
2737
+ import { jsx as jsx70, jsxs as jsxs30 } from "react/jsx-runtime";
2738
+ var _Select = forwardRef18(
3083
2739
  ({
3084
- variant,
3085
- size,
3086
2740
  width,
3087
- open,
3088
2741
  disabled,
3089
2742
  required,
2743
+ items,
2744
+ variant,
2745
+ size,
3090
2746
  error,
2747
+ open,
3091
2748
  onChange,
3092
2749
  ...rest
3093
2750
  }, ref) => {
3094
- const formatMessage = useLocalizedStringFormatter(messages);
3095
2751
  const props = {
3096
- isOpen: open,
3097
2752
  isDisabled: disabled,
2753
+ isInvalid: error,
2754
+ isOpen: open,
3098
2755
  isRequired: required,
3099
- validationState: error ? "invalid" : "valid",
3100
- placeholder: rest.placeholder || formatMessage.format("placeholder"),
3101
2756
  onSelectionChange: onChange,
3102
2757
  ...rest
3103
2758
  };
3104
- const buttonRef = useObjectRef4(ref);
3105
- const listboxRef = useRef17(null);
3106
- const state = useSelectState(props);
3107
- const {
3108
- labelProps,
3109
- triggerProps,
3110
- valueProps,
3111
- menuProps,
3112
- descriptionProps,
3113
- errorMessageProps
3114
- } = useSelect(props, state, buttonRef);
3115
- const { buttonProps } = useButton3(
3116
- { isDisabled: disabled, ...triggerProps },
3117
- buttonRef
3118
- );
3119
- const { focusProps, isFocusVisible } = useFocusRing6();
3120
- const classNames2 = useClassNames37({ component: "Select", variant, size });
3121
- const isSmallScreen = useSmallScreen2();
3122
- const stateProps = useStateProps10({
3123
- disabled,
3124
- error,
3125
- focusVisible: isFocusVisible,
3126
- expanded: state.isOpen,
3127
- required
3128
- });
3129
- return /* @__PURE__ */ jsxs29(
3130
- FieldBase,
3131
- {
3132
- variant,
3133
- size,
3134
- width,
3135
- label: props.label,
3136
- labelProps: { elementType: "span", ...labelProps },
3137
- description: props.description,
3138
- descriptionProps,
3139
- error,
3140
- errorMessage: props.errorMessage,
3141
- errorMessageProps,
3142
- stateProps,
3143
- disabled,
3144
- children: [
3145
- /* @__PURE__ */ jsx69(
3146
- HiddenSelect,
3147
- {
3148
- state,
3149
- triggerRef: buttonRef,
3150
- label: props.label,
3151
- name: props.name,
3152
- isDisabled: disabled
3153
- }
3154
- ),
3155
- /* @__PURE__ */ jsxs29(
3156
- "button",
3157
- {
3158
- className: cn37(
3159
- "flex w-full items-center justify-between gap-1 overflow-hidden",
3160
- classNames2.select
3161
- ),
3162
- ref: buttonRef,
3163
- ...mergeProps10(buttonProps, focusProps),
3164
- ...stateProps,
3165
- children: [
3166
- /* @__PURE__ */ jsx69("div", { className: "overflow-hidden whitespace-nowrap", ...valueProps, children: state.selectedItem ? state.selectedItem.rendered : props.placeholder }),
3167
- /* @__PURE__ */ jsx69(ChevronDown, { className: "h-4 w-4" })
3168
- ]
3169
- }
2759
+ const classNames2 = useClassNames42({ component: "Select", variant, size });
2760
+ return /* @__PURE__ */ jsxs30(FieldBase, { isOpen: true, as: Select, ref, ...props, children: [
2761
+ /* @__PURE__ */ jsxs30(
2762
+ Button4,
2763
+ {
2764
+ className: cn39(
2765
+ "flex w-full items-center justify-between gap-1 overflow-hidden",
2766
+ classNames2.select
3170
2767
  ),
3171
- isSmallScreen ? /* @__PURE__ */ jsx69(Tray, { state, children: /* @__PURE__ */ jsx69(
3172
- ListBox,
3173
- {
3174
- ref: listboxRef,
3175
- state,
3176
- variant,
3177
- size,
3178
- ...menuProps
3179
- }
3180
- ) }) : /* @__PURE__ */ jsx69(Popover, { state, triggerRef: buttonRef, scrollRef: listboxRef, children: /* @__PURE__ */ jsx69(
3181
- ListBox,
3182
- {
3183
- ref: listboxRef,
3184
- state,
3185
- variant,
3186
- size,
3187
- ...menuProps
3188
- }
3189
- ) })
3190
- ]
3191
- }
3192
- );
2768
+ children: [
2769
+ /* @__PURE__ */ jsx70(SelectValue, {}),
2770
+ /* @__PURE__ */ jsx70(ChevronDown, { className: "h-4 w-4" })
2771
+ ]
2772
+ }
2773
+ ),
2774
+ /* @__PURE__ */ jsx70(_Popover, { children: /* @__PURE__ */ jsx70(_ListBox, { items, children: props.children }) })
2775
+ ] });
3193
2776
  }
3194
2777
  );
3195
- Select.Option = Item5;
3196
- Select.Section = Section2;
2778
+ _Select.Option = _ListBox.Item;
2779
+ _Select.Section = _ListBox.Section;
3197
2780
 
3198
2781
  // src/Slider/Slider.tsx
3199
- import { forwardRef as forwardRef17 } from "react";
2782
+ import { forwardRef as forwardRef19 } from "react";
3200
2783
  import {
3201
2784
  Slider,
3202
2785
  SliderOutput,
@@ -3204,12 +2787,12 @@ import {
3204
2787
  SliderTrack
3205
2788
  } from "react-aria-components";
3206
2789
  import {
3207
- cn as cn38,
2790
+ cn as cn40,
3208
2791
  width as twWidth3,
3209
- useClassNames as useClassNames38
2792
+ useClassNames as useClassNames43
3210
2793
  } from "@marigold/system";
3211
- import { jsx as jsx70, jsxs as jsxs30 } from "react/jsx-runtime";
3212
- var _Slider = forwardRef17(
2794
+ import { jsx as jsx71, jsxs as jsxs31 } from "react/jsx-runtime";
2795
+ var _Slider = forwardRef19(
3213
2796
  ({
3214
2797
  thumbLabels,
3215
2798
  variant,
@@ -3218,7 +2801,7 @@ var _Slider = forwardRef17(
3218
2801
  disabled,
3219
2802
  ...rest
3220
2803
  }, ref) => {
3221
- const classNames2 = useClassNames38({
2804
+ const classNames2 = useClassNames43({
3222
2805
  component: "Slider",
3223
2806
  variant,
3224
2807
  size
@@ -3227,10 +2810,10 @@ var _Slider = forwardRef17(
3227
2810
  isDisabled: disabled,
3228
2811
  ...rest
3229
2812
  };
3230
- return /* @__PURE__ */ jsxs30(
2813
+ return /* @__PURE__ */ jsxs31(
3231
2814
  Slider,
3232
2815
  {
3233
- className: cn38(
2816
+ className: cn40(
3234
2817
  "grid grid-cols-[auto_1fr] gap-y-1",
3235
2818
  classNames2.container,
3236
2819
  twWidth3[width]
@@ -3238,16 +2821,16 @@ var _Slider = forwardRef17(
3238
2821
  ref,
3239
2822
  ...props,
3240
2823
  children: [
3241
- /* @__PURE__ */ jsx70(_Label, { children: props.children }),
3242
- /* @__PURE__ */ jsx70(SliderOutput, { className: cn38("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
3243
- /* @__PURE__ */ jsx70(
2824
+ /* @__PURE__ */ jsx71(_Label, { children: props.children }),
2825
+ /* @__PURE__ */ jsx71(SliderOutput, { className: cn40("flex justify-end", classNames2.output), children: ({ state }) => state.values.map((_, i) => state.getThumbValueLabel(i)).join(" \u2013 ") }),
2826
+ /* @__PURE__ */ jsx71(
3244
2827
  SliderTrack,
3245
2828
  {
3246
- className: cn38("relative col-span-2 h-2 w-full", classNames2.track),
3247
- children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx70(
2829
+ className: cn40("relative col-span-2 h-2 w-full", classNames2.track),
2830
+ children: ({ state }) => state.values.map((_, i) => /* @__PURE__ */ jsx71(
3248
2831
  SliderThumb,
3249
2832
  {
3250
- className: cn38("top-1/2 cursor-pointer", classNames2.thumb),
2833
+ className: cn40("top-1/2 cursor-pointer", classNames2.thumb),
3251
2834
  index: i,
3252
2835
  "aria-label": thumbLabels == null ? void 0 : thumbLabels[i]
3253
2836
  },
@@ -3262,16 +2845,16 @@ var _Slider = forwardRef17(
3262
2845
  );
3263
2846
 
3264
2847
  // src/Split/Split.tsx
3265
- import { jsx as jsx71 } from "react/jsx-runtime";
3266
- var Split = (props) => /* @__PURE__ */ jsx71("div", { ...props, role: "separator", className: "grow" });
2848
+ import { jsx as jsx72 } from "react/jsx-runtime";
2849
+ var Split = (props) => /* @__PURE__ */ jsx72("div", { ...props, role: "separator", className: "grow" });
3267
2850
 
3268
2851
  // src/Stack/Stack.tsx
3269
2852
  import {
3270
2853
  alignment as alignment3,
3271
- cn as cn39,
2854
+ cn as cn41,
3272
2855
  gapSpace as gapSpace6
3273
2856
  } from "@marigold/system";
3274
- import { jsx as jsx72 } from "react/jsx-runtime";
2857
+ import { jsx as jsx73 } from "react/jsx-runtime";
3275
2858
  var Stack = ({
3276
2859
  children,
3277
2860
  space = 0,
@@ -3282,10 +2865,10 @@ var Stack = ({
3282
2865
  ...props
3283
2866
  }) => {
3284
2867
  var _a, _b, _c, _d;
3285
- return /* @__PURE__ */ jsx72(
2868
+ return /* @__PURE__ */ jsx73(
3286
2869
  "div",
3287
2870
  {
3288
- className: cn39(
2871
+ className: cn41(
3289
2872
  "flex flex-col",
3290
2873
  gapSpace6[space],
3291
2874
  alignX && ((_b = (_a = alignment3) == null ? void 0 : _a.vertical) == null ? void 0 : _b.alignmentX[alignX]),
@@ -3299,15 +2882,15 @@ var Stack = ({
3299
2882
  };
3300
2883
 
3301
2884
  // src/Switch/Switch.tsx
3302
- import { forwardRef as forwardRef18 } from "react";
2885
+ import { forwardRef as forwardRef20 } from "react";
3303
2886
  import { Switch } from "react-aria-components";
3304
2887
  import {
3305
- cn as cn40,
2888
+ cn as cn42,
3306
2889
  width as twWidth4,
3307
- useClassNames as useClassNames39
2890
+ useClassNames as useClassNames44
3308
2891
  } from "@marigold/system";
3309
- import { jsx as jsx73, jsxs as jsxs31 } from "react/jsx-runtime";
3310
- var _Switch = forwardRef18(
2892
+ import { jsx as jsx74, jsxs as jsxs32 } from "react/jsx-runtime";
2893
+ var _Switch = forwardRef20(
3311
2894
  ({
3312
2895
  variant,
3313
2896
  size,
@@ -3318,37 +2901,37 @@ var _Switch = forwardRef18(
3318
2901
  readOnly,
3319
2902
  ...rest
3320
2903
  }, ref) => {
3321
- const classNames2 = useClassNames39({ component: "Switch", size, variant });
2904
+ const classNames2 = useClassNames44({ component: "Switch", size, variant });
3322
2905
  const props = {
3323
2906
  isDisabled: disabled,
3324
2907
  isReadOnly: readOnly,
3325
2908
  isSelected: selected,
3326
2909
  ...rest
3327
2910
  };
3328
- return /* @__PURE__ */ jsxs31(
2911
+ return /* @__PURE__ */ jsxs32(
3329
2912
  Switch,
3330
2913
  {
3331
2914
  ...props,
3332
2915
  ref,
3333
- className: cn40(
2916
+ className: cn42(
3334
2917
  twWidth4[width],
3335
2918
  "group/switch",
3336
2919
  "flex items-center justify-between gap-[1ch]",
3337
2920
  classNames2.container
3338
2921
  ),
3339
2922
  children: [
3340
- /* @__PURE__ */ jsx73(_Label, { elementType: "span", children }),
3341
- /* @__PURE__ */ jsx73("div", { className: "relative", children: /* @__PURE__ */ jsx73(
2923
+ /* @__PURE__ */ jsx74(_Label, { elementType: "span", children }),
2924
+ /* @__PURE__ */ jsx74("div", { className: "relative", children: /* @__PURE__ */ jsx74(
3342
2925
  "div",
3343
2926
  {
3344
- className: cn40(
2927
+ className: cn42(
3345
2928
  "h-6 w-12 basis-12 rounded-3xl group-disabled/switch:cursor-not-allowed ",
3346
2929
  classNames2.track
3347
2930
  ),
3348
- children: /* @__PURE__ */ jsx73(
2931
+ children: /* @__PURE__ */ jsx74(
3349
2932
  "div",
3350
2933
  {
3351
- className: cn40(
2934
+ className: cn42(
3352
2935
  "h-[22px] w-[22px]",
3353
2936
  "cubic-bezier(.7,0,.3,1)",
3354
2937
  "absolute left-0 top-px",
@@ -3367,7 +2950,7 @@ var _Switch = forwardRef18(
3367
2950
  );
3368
2951
 
3369
2952
  // src/Table/Table.tsx
3370
- import { useRef as useRef24 } from "react";
2953
+ import { useRef as useRef15 } from "react";
3371
2954
  import { useTable } from "@react-aria/table";
3372
2955
  import {
3373
2956
  TableBody as Body2,
@@ -3377,30 +2960,30 @@ import {
3377
2960
  Row,
3378
2961
  useTableState
3379
2962
  } from "@react-stately/table";
3380
- import { cn as cn45, useClassNames as useClassNames41 } from "@marigold/system";
2963
+ import { cn as cn47, useClassNames as useClassNames46 } from "@marigold/system";
3381
2964
 
3382
2965
  // src/Table/Context.tsx
3383
- import { createContext as createContext6, useContext as useContext7 } from "react";
3384
- var TableContext = createContext6({});
3385
- var useTableContext = () => useContext7(TableContext);
2966
+ import { createContext as createContext5, useContext as useContext10 } from "react";
2967
+ var TableContext = createContext5({});
2968
+ var useTableContext = () => useContext10(TableContext);
3386
2969
 
3387
2970
  // src/Table/TableBody.tsx
3388
2971
  import { useTableRowGroup } from "@react-aria/table";
3389
- import { jsx as jsx74 } from "react/jsx-runtime";
2972
+ import { jsx as jsx75 } from "react/jsx-runtime";
3390
2973
  var TableBody = ({ children }) => {
3391
2974
  const { rowGroupProps } = useTableRowGroup();
3392
- return /* @__PURE__ */ jsx74("tbody", { ...rowGroupProps, children });
2975
+ return /* @__PURE__ */ jsx75("tbody", { ...rowGroupProps, children });
3393
2976
  };
3394
2977
 
3395
2978
  // src/Table/TableCell.tsx
3396
- import { useRef as useRef18 } from "react";
3397
- import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
2979
+ import { useRef as useRef9 } from "react";
2980
+ import { useFocusRing as useFocusRing4 } from "@react-aria/focus";
3398
2981
  import { useTableCell } from "@react-aria/table";
3399
- import { mergeProps as mergeProps11 } from "@react-aria/utils";
3400
- import { useStateProps as useStateProps11 } from "@marigold/system";
3401
- import { jsx as jsx75 } from "react/jsx-runtime";
2982
+ import { mergeProps as mergeProps6 } from "@react-aria/utils";
2983
+ import { useStateProps as useStateProps5 } from "@marigold/system";
2984
+ import { jsx as jsx76 } from "react/jsx-runtime";
3402
2985
  var TableCell = ({ cell }) => {
3403
- const ref = useRef18(null);
2986
+ const ref = useRef9(null);
3404
2987
  const { interactive, state, classNames: classNames2 } = useTableContext();
3405
2988
  const disabled = state.disabledKeys.has(cell.parentKey);
3406
2989
  const { gridCellProps } = useTableCell(
@@ -3419,14 +3002,14 @@ var TableCell = ({ cell }) => {
3419
3002
  onMouseDown: (e) => e.stopPropagation(),
3420
3003
  onPointerDown: (e) => e.stopPropagation()
3421
3004
  };
3422
- const { focusProps, isFocusVisible } = useFocusRing7();
3423
- const stateProps = useStateProps11({ disabled, focusVisible: isFocusVisible });
3424
- return /* @__PURE__ */ jsx75(
3005
+ const { focusProps, isFocusVisible } = useFocusRing4();
3006
+ const stateProps = useStateProps5({ disabled, focusVisible: isFocusVisible });
3007
+ return /* @__PURE__ */ jsx76(
3425
3008
  "td",
3426
3009
  {
3427
3010
  ref,
3428
3011
  className: classNames2 == null ? void 0 : classNames2.cell,
3429
- ...mergeProps11(cellProps, focusProps),
3012
+ ...mergeProps6(cellProps, focusProps),
3430
3013
  ...stateProps,
3431
3014
  children: cell.rendered
3432
3015
  }
@@ -3434,11 +3017,11 @@ var TableCell = ({ cell }) => {
3434
3017
  };
3435
3018
 
3436
3019
  // src/Table/TableCheckboxCell.tsx
3437
- import { useRef as useRef19 } from "react";
3438
- import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
3020
+ import { useRef as useRef10 } from "react";
3021
+ import { useFocusRing as useFocusRing5 } from "@react-aria/focus";
3439
3022
  import { useTableCell as useTableCell2, useTableSelectionCheckbox } from "@react-aria/table";
3440
- import { mergeProps as mergeProps12 } from "@react-aria/utils";
3441
- import { cn as cn41, useStateProps as useStateProps12 } from "@marigold/system";
3023
+ import { mergeProps as mergeProps7 } from "@react-aria/utils";
3024
+ import { cn as cn43, useStateProps as useStateProps6 } from "@marigold/system";
3442
3025
 
3443
3026
  // src/Table/utils.ts
3444
3027
  var mapCheckboxProps = ({
@@ -3461,9 +3044,9 @@ var mapCheckboxProps = ({
3461
3044
  };
3462
3045
 
3463
3046
  // src/Table/TableCheckboxCell.tsx
3464
- import { jsx as jsx76 } from "react/jsx-runtime";
3047
+ import { jsx as jsx77 } from "react/jsx-runtime";
3465
3048
  var TableCheckboxCell = ({ cell }) => {
3466
- const ref = useRef19(null);
3049
+ const ref = useRef10(null);
3467
3050
  const { state, classNames: classNames2 } = useTableContext();
3468
3051
  const disabled = state.disabledKeys.has(cell.parentKey);
3469
3052
  const { gridCellProps } = useTableCell2(
@@ -3476,36 +3059,36 @@ var TableCheckboxCell = ({ cell }) => {
3476
3059
  const { checkboxProps } = mapCheckboxProps(
3477
3060
  useTableSelectionCheckbox({ key: cell.parentKey }, state)
3478
3061
  );
3479
- const { focusProps, isFocusVisible } = useFocusRing8();
3480
- const stateProps = useStateProps12({ disabled, focusVisible: isFocusVisible });
3481
- return /* @__PURE__ */ jsx76(
3062
+ const { focusProps, isFocusVisible } = useFocusRing5();
3063
+ const stateProps = useStateProps6({ disabled, focusVisible: isFocusVisible });
3064
+ return /* @__PURE__ */ jsx77(
3482
3065
  "td",
3483
3066
  {
3484
3067
  ref,
3485
- className: cn41("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
3486
- ...mergeProps12(gridCellProps, focusProps),
3068
+ className: cn43("text-center align-middle leading-none", classNames2 == null ? void 0 : classNames2.cell),
3069
+ ...mergeProps7(gridCellProps, focusProps),
3487
3070
  ...stateProps,
3488
- children: /* @__PURE__ */ jsx76(_Checkbox, { ...checkboxProps })
3071
+ children: /* @__PURE__ */ jsx77(_Checkbox, { ...checkboxProps })
3489
3072
  }
3490
3073
  );
3491
3074
  };
3492
3075
 
3493
3076
  // src/Table/TableColumnHeader.tsx
3494
- import { useRef as useRef20 } from "react";
3495
- import { useFocusRing as useFocusRing9 } from "@react-aria/focus";
3496
- import { useHover as useHover4 } from "@react-aria/interactions";
3077
+ import { useRef as useRef11 } from "react";
3078
+ import { useFocusRing as useFocusRing6 } from "@react-aria/focus";
3079
+ import { useHover as useHover2 } from "@react-aria/interactions";
3497
3080
  import { useTableColumnHeader } from "@react-aria/table";
3498
- import { mergeProps as mergeProps13 } from "@react-aria/utils";
3081
+ import { mergeProps as mergeProps8 } from "@react-aria/utils";
3499
3082
  import { SortDown, SortUp } from "@marigold/icons";
3500
- import { cn as cn42, useStateProps as useStateProps13 } from "@marigold/system";
3083
+ import { cn as cn44, useStateProps as useStateProps7 } from "@marigold/system";
3501
3084
  import { width as twWidth5 } from "@marigold/system";
3502
- import { jsx as jsx77, jsxs as jsxs32 } from "react/jsx-runtime";
3085
+ import { jsx as jsx78, jsxs as jsxs33 } from "react/jsx-runtime";
3503
3086
  var TableColumnHeader = ({
3504
3087
  column,
3505
3088
  width = "auto"
3506
3089
  }) => {
3507
3090
  var _a, _b;
3508
- const ref = useRef20(null);
3091
+ const ref = useRef11(null);
3509
3092
  const { state, classNames: classNames2 } = useTableContext();
3510
3093
  const { columnHeaderProps } = useTableColumnHeader(
3511
3094
  {
@@ -3514,23 +3097,23 @@ var TableColumnHeader = ({
3514
3097
  state,
3515
3098
  ref
3516
3099
  );
3517
- const { hoverProps, isHovered } = useHover4({});
3518
- const { focusProps, isFocusVisible } = useFocusRing9();
3519
- const stateProps = useStateProps13({
3100
+ const { hoverProps, isHovered } = useHover2({});
3101
+ const { focusProps, isFocusVisible } = useFocusRing6();
3102
+ const stateProps = useStateProps7({
3520
3103
  hover: isHovered,
3521
3104
  focusVisible: isFocusVisible
3522
3105
  });
3523
- return /* @__PURE__ */ jsxs32(
3106
+ return /* @__PURE__ */ jsxs33(
3524
3107
  "th",
3525
3108
  {
3526
3109
  colSpan: column.colspan,
3527
3110
  ref,
3528
- className: cn42("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
3529
- ...mergeProps13(columnHeaderProps, hoverProps, focusProps),
3111
+ className: cn44("cursor-default", twWidth5[width], classNames2 == null ? void 0 : classNames2.header),
3112
+ ...mergeProps8(columnHeaderProps, hoverProps, focusProps),
3530
3113
  ...stateProps,
3531
3114
  children: [
3532
3115
  column.rendered,
3533
- column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx77(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx77(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx77(SortDown, { className: "inline-block" }))
3116
+ column.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx78(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx78(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx78(SortDown, { className: "inline-block" }))
3534
3117
  ]
3535
3118
  }
3536
3119
  );
@@ -3538,36 +3121,36 @@ var TableColumnHeader = ({
3538
3121
 
3539
3122
  // src/Table/TableHeader.tsx
3540
3123
  import { useTableRowGroup as useTableRowGroup2 } from "@react-aria/table";
3541
- import { jsx as jsx78 } from "react/jsx-runtime";
3124
+ import { jsx as jsx79 } from "react/jsx-runtime";
3542
3125
  var TableHeader = ({ children }) => {
3543
3126
  const { rowGroupProps } = useTableRowGroup2();
3544
- return /* @__PURE__ */ jsx78("thead", { ...rowGroupProps, children });
3127
+ return /* @__PURE__ */ jsx79("thead", { ...rowGroupProps, children });
3545
3128
  };
3546
3129
 
3547
3130
  // src/Table/TableHeaderRow.tsx
3548
- import { useRef as useRef21 } from "react";
3131
+ import { useRef as useRef12 } from "react";
3549
3132
  import { useTableHeaderRow } from "@react-aria/table";
3550
- import { jsx as jsx79 } from "react/jsx-runtime";
3133
+ import { jsx as jsx80 } from "react/jsx-runtime";
3551
3134
  var TableHeaderRow = ({ item, children }) => {
3552
3135
  const { state } = useTableContext();
3553
- const ref = useRef21(null);
3136
+ const ref = useRef12(null);
3554
3137
  const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
3555
- return /* @__PURE__ */ jsx79("tr", { ...rowProps, ref, children });
3138
+ return /* @__PURE__ */ jsx80("tr", { ...rowProps, ref, children });
3556
3139
  };
3557
3140
 
3558
3141
  // src/Table/TableRow.tsx
3559
- import { useRef as useRef22 } from "react";
3560
- import { useFocusRing as useFocusRing10 } from "@react-aria/focus";
3561
- import { useHover as useHover5 } from "@react-aria/interactions";
3142
+ import { useRef as useRef13 } from "react";
3143
+ import { useFocusRing as useFocusRing7 } from "@react-aria/focus";
3144
+ import { useHover as useHover3 } from "@react-aria/interactions";
3562
3145
  import { useTableRow } from "@react-aria/table";
3563
- import { mergeProps as mergeProps14 } from "@react-aria/utils";
3564
- import { cn as cn43, useClassNames as useClassNames40, useStateProps as useStateProps14 } from "@marigold/system";
3565
- import { jsx as jsx80 } from "react/jsx-runtime";
3146
+ import { mergeProps as mergeProps9 } from "@react-aria/utils";
3147
+ import { cn as cn45, useClassNames as useClassNames45, useStateProps as useStateProps8 } from "@marigold/system";
3148
+ import { jsx as jsx81 } from "react/jsx-runtime";
3566
3149
  var TableRow = ({ children, row }) => {
3567
- const ref = useRef22(null);
3150
+ const ref = useRef13(null);
3568
3151
  const { interactive, state, ...ctx } = useTableContext();
3569
3152
  const { variant, size } = row.props;
3570
- const classNames2 = useClassNames40({
3153
+ const classNames2 = useClassNames45({
3571
3154
  component: "Table",
3572
3155
  variant: variant || ctx.variant,
3573
3156
  size: size || ctx.size
@@ -3581,28 +3164,28 @@ var TableRow = ({ children, row }) => {
3581
3164
  );
3582
3165
  const disabled = state.disabledKeys.has(row.key);
3583
3166
  const selected = state.selectionManager.isSelected(row.key);
3584
- const { focusProps, isFocusVisible } = useFocusRing10({ within: true });
3585
- const { hoverProps, isHovered } = useHover5({
3167
+ const { focusProps, isFocusVisible } = useFocusRing7({ within: true });
3168
+ const { hoverProps, isHovered } = useHover3({
3586
3169
  isDisabled: disabled || !interactive
3587
3170
  });
3588
- const stateProps = useStateProps14({
3171
+ const stateProps = useStateProps8({
3589
3172
  disabled,
3590
3173
  selected,
3591
3174
  hover: isHovered,
3592
3175
  focusVisible: isFocusVisible,
3593
3176
  active: isPressed
3594
3177
  });
3595
- return /* @__PURE__ */ jsx80(
3178
+ return /* @__PURE__ */ jsx81(
3596
3179
  "tr",
3597
3180
  {
3598
3181
  ref,
3599
- className: cn43(
3182
+ className: cn45(
3600
3183
  [
3601
3184
  !interactive ? "cursor-text" : disabled ? "cursor-default" : "cursor-pointer"
3602
3185
  ],
3603
3186
  classNames2 == null ? void 0 : classNames2.row
3604
3187
  ),
3605
- ...mergeProps14(rowProps, focusProps, hoverProps),
3188
+ ...mergeProps9(rowProps, focusProps, hoverProps),
3606
3189
  ...stateProps,
3607
3190
  children
3608
3191
  }
@@ -3610,25 +3193,25 @@ var TableRow = ({ children, row }) => {
3610
3193
  };
3611
3194
 
3612
3195
  // src/Table/TableSelectAllCell.tsx
3613
- import { useRef as useRef23 } from "react";
3614
- import { useFocusRing as useFocusRing11 } from "@react-aria/focus";
3615
- import { useHover as useHover6 } from "@react-aria/interactions";
3196
+ import { useRef as useRef14 } from "react";
3197
+ import { useFocusRing as useFocusRing8 } from "@react-aria/focus";
3198
+ import { useHover as useHover4 } from "@react-aria/interactions";
3616
3199
  import {
3617
3200
  useTableColumnHeader as useTableColumnHeader2,
3618
3201
  useTableSelectAllCheckbox
3619
3202
  } from "@react-aria/table";
3620
- import { mergeProps as mergeProps15 } from "@react-aria/utils";
3203
+ import { mergeProps as mergeProps10 } from "@react-aria/utils";
3621
3204
  import {
3622
- cn as cn44,
3205
+ cn as cn46,
3623
3206
  width as twWidth6,
3624
- useStateProps as useStateProps15
3207
+ useStateProps as useStateProps9
3625
3208
  } from "@marigold/system";
3626
- import { jsx as jsx81 } from "react/jsx-runtime";
3209
+ import { jsx as jsx82 } from "react/jsx-runtime";
3627
3210
  var TableSelectAllCell = ({
3628
3211
  column,
3629
3212
  width = "auto"
3630
3213
  }) => {
3631
- const ref = useRef23(null);
3214
+ const ref = useRef14(null);
3632
3215
  const { state, classNames: classNames2 } = useTableContext();
3633
3216
  const { columnHeaderProps } = useTableColumnHeader2(
3634
3217
  {
@@ -3638,30 +3221,30 @@ var TableSelectAllCell = ({
3638
3221
  ref
3639
3222
  );
3640
3223
  const { checkboxProps } = mapCheckboxProps(useTableSelectAllCheckbox(state));
3641
- const { hoverProps, isHovered } = useHover6({});
3642
- const { focusProps, isFocusVisible } = useFocusRing11();
3643
- const stateProps = useStateProps15({
3224
+ const { hoverProps, isHovered } = useHover4({});
3225
+ const { focusProps, isFocusVisible } = useFocusRing8();
3226
+ const stateProps = useStateProps9({
3644
3227
  hover: isHovered,
3645
3228
  focusVisible: isFocusVisible
3646
3229
  });
3647
- return /* @__PURE__ */ jsx81(
3230
+ return /* @__PURE__ */ jsx82(
3648
3231
  "th",
3649
3232
  {
3650
3233
  ref,
3651
- className: cn44(
3234
+ className: cn46(
3652
3235
  twWidth6[width],
3653
3236
  ["text-center align-middle leading-none"],
3654
3237
  classNames2 == null ? void 0 : classNames2.header
3655
3238
  ),
3656
- ...mergeProps15(columnHeaderProps, hoverProps, focusProps),
3239
+ ...mergeProps10(columnHeaderProps, hoverProps, focusProps),
3657
3240
  ...stateProps,
3658
- children: /* @__PURE__ */ jsx81(_Checkbox, { ...checkboxProps })
3241
+ children: /* @__PURE__ */ jsx82(_Checkbox, { ...checkboxProps })
3659
3242
  }
3660
3243
  );
3661
3244
  };
3662
3245
 
3663
3246
  // src/Table/Table.tsx
3664
- import { jsx as jsx82, jsxs as jsxs33 } from "react/jsx-runtime";
3247
+ import { jsx as jsx83, jsxs as jsxs34 } from "react/jsx-runtime";
3665
3248
  var Table = ({
3666
3249
  variant,
3667
3250
  size,
@@ -3670,7 +3253,7 @@ var Table = ({
3670
3253
  ...props
3671
3254
  }) => {
3672
3255
  const interactive = selectionMode !== "none";
3673
- const tableRef = useRef24(null);
3256
+ const tableRef = useRef15(null);
3674
3257
  const state = useTableState({
3675
3258
  ...props,
3676
3259
  selectionMode,
@@ -3678,21 +3261,21 @@ var Table = ({
3678
3261
  props.selectionBehavior !== "replace"
3679
3262
  });
3680
3263
  const { gridProps } = useTable(props, state, tableRef);
3681
- const classNames2 = useClassNames41({
3264
+ const classNames2 = useClassNames46({
3682
3265
  component: "Table",
3683
3266
  variant,
3684
3267
  size
3685
3268
  });
3686
3269
  const { collection } = state;
3687
- return /* @__PURE__ */ jsx82(
3270
+ return /* @__PURE__ */ jsx83(
3688
3271
  TableContext.Provider,
3689
3272
  {
3690
3273
  value: { state, interactive, classNames: classNames2, variant, size },
3691
- children: /* @__PURE__ */ jsxs33(
3274
+ children: /* @__PURE__ */ jsxs34(
3692
3275
  "table",
3693
3276
  {
3694
3277
  ref: tableRef,
3695
- className: cn45(
3278
+ className: cn47(
3696
3279
  "group/table",
3697
3280
  "border-collapse overflow-auto whitespace-nowrap",
3698
3281
  stretch ? "table w-full" : "block",
@@ -3700,17 +3283,17 @@ var Table = ({
3700
3283
  ),
3701
3284
  ...gridProps,
3702
3285
  children: [
3703
- /* @__PURE__ */ jsx82(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx82(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
3286
+ /* @__PURE__ */ jsx83(TableHeader, { children: collection.headerRows.map((headerRow) => /* @__PURE__ */ jsx83(TableHeaderRow, { item: headerRow, children: [...collection.getChildren(headerRow.key)].map(
3704
3287
  (column) => {
3705
3288
  var _a, _b, _c;
3706
- return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx82(
3289
+ return ((_a = column.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx83(
3707
3290
  TableSelectAllCell,
3708
3291
  {
3709
3292
  width: (_b = column.props) == null ? void 0 : _b.width,
3710
3293
  column
3711
3294
  },
3712
3295
  column.key
3713
- ) : /* @__PURE__ */ jsx82(
3296
+ ) : /* @__PURE__ */ jsx83(
3714
3297
  TableColumnHeader,
3715
3298
  {
3716
3299
  width: (_c = column.props) == null ? void 0 : _c.width,
@@ -3720,12 +3303,12 @@ var Table = ({
3720
3303
  );
3721
3304
  }
3722
3305
  ) }, headerRow.key)) }),
3723
- /* @__PURE__ */ jsxs33(TableBody, { children: [
3306
+ /* @__PURE__ */ jsxs34(TableBody, { children: [
3724
3307
  ...collection.rows.map(
3725
- (row) => row.type === "item" && /* @__PURE__ */ jsx82(TableRow, { row, children: [...collection.getChildren(row.key)].map(
3308
+ (row) => row.type === "item" && /* @__PURE__ */ jsx83(TableRow, { row, children: [...collection.getChildren(row.key)].map(
3726
3309
  (cell) => {
3727
3310
  var _a;
3728
- return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx82(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx82(TableCell, { cell }, cell.key);
3311
+ return ((_a = cell.props) == null ? void 0 : _a.isSelectionCell) ? /* @__PURE__ */ jsx83(TableCheckboxCell, { cell }, cell.key) : /* @__PURE__ */ jsx83(TableCell, { cell }, cell.key);
3729
3312
  }
3730
3313
  ) }, row.key)
3731
3314
  )
@@ -3744,7 +3327,7 @@ Table.Row = Row;
3744
3327
 
3745
3328
  // src/Text/Text.tsx
3746
3329
  import {
3747
- cn as cn46,
3330
+ cn as cn48,
3748
3331
  createVar as createVar9,
3749
3332
  cursorStyle,
3750
3333
  fontWeight,
@@ -3752,10 +3335,10 @@ import {
3752
3335
  textAlign as textAlign2,
3753
3336
  textSize,
3754
3337
  textStyle,
3755
- useClassNames as useClassNames42,
3756
- useTheme as useTheme6
3338
+ useClassNames as useClassNames47,
3339
+ useTheme as useTheme7
3757
3340
  } from "@marigold/system";
3758
- import { jsx as jsx83 } from "react/jsx-runtime";
3341
+ import { jsx as jsx84 } from "react/jsx-runtime";
3759
3342
  var Text2 = ({
3760
3343
  variant,
3761
3344
  size,
@@ -3768,17 +3351,17 @@ var Text2 = ({
3768
3351
  children,
3769
3352
  ...props
3770
3353
  }) => {
3771
- const theme = useTheme6();
3772
- const classNames2 = useClassNames42({
3354
+ const theme = useTheme7();
3355
+ const classNames2 = useClassNames47({
3773
3356
  component: "Text",
3774
3357
  variant,
3775
3358
  size
3776
3359
  });
3777
- return /* @__PURE__ */ jsx83(
3360
+ return /* @__PURE__ */ jsx84(
3778
3361
  "p",
3779
3362
  {
3780
3363
  ...props,
3781
- className: cn46(
3364
+ className: cn48(
3782
3365
  classNames2,
3783
3366
  "text-[--color] outline-[--outline]",
3784
3367
  fontStyle && textStyle[fontStyle],
@@ -3801,11 +3384,11 @@ var Text2 = ({
3801
3384
  };
3802
3385
 
3803
3386
  // src/TextArea/TextArea.tsx
3804
- import { forwardRef as forwardRef19 } from "react";
3387
+ import { forwardRef as forwardRef21 } from "react";
3805
3388
  import { TextArea, TextField } from "react-aria-components";
3806
- import { useClassNames as useClassNames43 } from "@marigold/system";
3807
- import { jsx as jsx84 } from "react/jsx-runtime";
3808
- var _TextArea = forwardRef19(
3389
+ import { useClassNames as useClassNames48 } from "@marigold/system";
3390
+ import { jsx as jsx85 } from "react/jsx-runtime";
3391
+ var _TextArea = forwardRef21(
3809
3392
  ({
3810
3393
  variant,
3811
3394
  size,
@@ -3816,7 +3399,7 @@ var _TextArea = forwardRef19(
3816
3399
  rows,
3817
3400
  ...rest
3818
3401
  }, ref) => {
3819
- const classNames2 = useClassNames43({ component: "TextArea", variant, size });
3402
+ const classNames2 = useClassNames48({ component: "TextArea", variant, size });
3820
3403
  const props = {
3821
3404
  isDisabled: disabled,
3822
3405
  isReadOnly: readOnly,
@@ -3824,15 +3407,15 @@ var _TextArea = forwardRef19(
3824
3407
  isRequired: required,
3825
3408
  ...rest
3826
3409
  };
3827
- return /* @__PURE__ */ jsx84(FieldBase2, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx84(TextArea, { className: classNames2, ref, rows }) });
3410
+ return /* @__PURE__ */ jsx85(FieldBase, { as: TextField, ...props, variant, size, children: /* @__PURE__ */ jsx85(TextArea, { className: classNames2, ref, rows }) });
3828
3411
  }
3829
3412
  );
3830
3413
 
3831
3414
  // src/TextField/TextField.tsx
3832
- import { forwardRef as forwardRef20 } from "react";
3415
+ import { forwardRef as forwardRef22 } from "react";
3833
3416
  import { TextField as TextField2 } from "react-aria-components";
3834
- import { jsx as jsx85 } from "react/jsx-runtime";
3835
- var _TextField = forwardRef20(
3417
+ import { jsx as jsx86 } from "react/jsx-runtime";
3418
+ var _TextField = forwardRef22(
3836
3419
  ({
3837
3420
  variant,
3838
3421
  size,
@@ -3849,13 +3432,13 @@ var _TextField = forwardRef20(
3849
3432
  isRequired: required,
3850
3433
  ...rest
3851
3434
  };
3852
- return /* @__PURE__ */ jsx85(FieldBase2, { as: TextField2, ...props, children: /* @__PURE__ */ jsx85(_Input, { ref }) });
3435
+ return /* @__PURE__ */ jsx86(FieldBase, { as: TextField2, ...props, children: /* @__PURE__ */ jsx86(_Input, { ref }) });
3853
3436
  }
3854
3437
  );
3855
3438
 
3856
3439
  // src/Tiles/Tiles.tsx
3857
- import { cn as cn47, createVar as createVar10, gapSpace as gapSpace7 } from "@marigold/system";
3858
- import { jsx as jsx86 } from "react/jsx-runtime";
3440
+ import { cn as cn49, createVar as createVar10, gapSpace as gapSpace7 } from "@marigold/system";
3441
+ import { jsx as jsx87 } from "react/jsx-runtime";
3859
3442
  var Tiles = ({
3860
3443
  space = 0,
3861
3444
  stretch = false,
@@ -3868,11 +3451,11 @@ var Tiles = ({
3868
3451
  if (stretch) {
3869
3452
  column = `minmax(${column}, 1fr)`;
3870
3453
  }
3871
- return /* @__PURE__ */ jsx86(
3454
+ return /* @__PURE__ */ jsx87(
3872
3455
  "div",
3873
3456
  {
3874
3457
  ...props,
3875
- className: cn47(
3458
+ className: cn49(
3876
3459
  "grid",
3877
3460
  gapSpace7[space],
3878
3461
  "grid-cols-[repeat(auto-fit,var(--column))]",
@@ -3886,11 +3469,11 @@ var Tiles = ({
3886
3469
 
3887
3470
  // src/Tooltip/Tooltip.tsx
3888
3471
  import { OverlayArrow, Tooltip } from "react-aria-components";
3889
- import { cn as cn48, useClassNames as useClassNames44 } from "@marigold/system";
3472
+ import { cn as cn50, useClassNames as useClassNames49 } from "@marigold/system";
3890
3473
 
3891
3474
  // src/Tooltip/TooltipTrigger.tsx
3892
3475
  import { TooltipTrigger } from "react-aria-components";
3893
- import { jsx as jsx87 } from "react/jsx-runtime";
3476
+ import { jsx as jsx88 } from "react/jsx-runtime";
3894
3477
  var _TooltipTrigger = ({
3895
3478
  delay = 1e3,
3896
3479
  children,
@@ -3904,153 +3487,72 @@ var _TooltipTrigger = ({
3904
3487
  isOpen: open,
3905
3488
  delay
3906
3489
  };
3907
- return /* @__PURE__ */ jsx87(TooltipTrigger, { ...props, children });
3490
+ return /* @__PURE__ */ jsx88(TooltipTrigger, { ...props, children });
3908
3491
  };
3909
3492
 
3910
3493
  // src/Tooltip/Tooltip.tsx
3911
- import { jsx as jsx88, jsxs as jsxs34 } from "react/jsx-runtime";
3494
+ import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
3912
3495
  var _Tooltip = ({ children, variant, size, open, ...rest }) => {
3913
3496
  const props = {
3914
3497
  ...rest,
3915
3498
  isOpen: open
3916
3499
  };
3917
- const classNames2 = useClassNames44({ component: "Tooltip", variant, size });
3918
- return /* @__PURE__ */ jsxs34(Tooltip, { ...props, className: cn48("group/tooltip", classNames2.container), children: [
3919
- /* @__PURE__ */ jsx88(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx88("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx88("path", { d: "M0 0 L4 4 L8 0" }) }) }),
3500
+ const classNames2 = useClassNames49({ component: "Tooltip", variant, size });
3501
+ return /* @__PURE__ */ jsxs35(Tooltip, { ...props, className: cn50("group/tooltip", classNames2.container), children: [
3502
+ /* @__PURE__ */ jsx89(OverlayArrow, { className: classNames2.arrow, children: /* @__PURE__ */ jsx89("svg", { width: 8, height: 8, viewBox: "0 0 8 8", children: /* @__PURE__ */ jsx89("path", { d: "M0 0 L4 4 L8 0" }) }) }),
3920
3503
  children
3921
3504
  ] });
3922
3505
  };
3923
3506
  _Tooltip.Trigger = _TooltipTrigger;
3924
3507
 
3925
- // src/TagGroup/index.ts
3926
- import { Item as Item6 } from "@react-stately/collections";
3927
-
3928
- // src/TagGroup/TagGroup.tsx
3929
- import { useRef as useRef26 } from "react";
3930
- import { useTagGroup } from "@react-aria/tag";
3931
- import { useListState } from "@react-stately/list";
3932
- import { useStateProps as useStateProps16 } from "@marigold/system";
3933
-
3934
3508
  // src/TagGroup/Tag.tsx
3935
- import React3, { useRef as useRef25 } from "react";
3936
- import { useButton as useButton4 } from "@react-aria/button";
3937
- import { useFocusRing as useFocusRing12 } from "@react-aria/focus";
3938
- import { useTag } from "@react-aria/tag";
3939
- import { mergeProps as mergeProps16 } from "@react-aria/utils";
3940
- import { cn as cn49, useClassNames as useClassNames45 } from "@marigold/system";
3941
- import { jsx as jsx89, jsxs as jsxs35 } from "react/jsx-runtime";
3942
- var CloseButton2 = ({ className, ...props }) => {
3943
- const ref = useRef25(null);
3944
- const { buttonProps } = useButton4({ ...props }, ref);
3945
- return /* @__PURE__ */ jsx89("button", { className, ...buttonProps, children: /* @__PURE__ */ jsx89("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx89("path", { 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" }) }) });
3946
- };
3947
- var Tag = ({ variant, size, item, state, ...rest }) => {
3948
- const props = {
3949
- item,
3950
- ...rest
3951
- };
3952
- let ref = React3.useRef(null);
3953
- let { focusProps } = useFocusRing12({ within: true });
3954
- const { rowProps, gridCellProps, allowsRemoving, removeButtonProps } = useTag(
3955
- {
3956
- ...props,
3957
- item
3958
- },
3959
- state,
3960
- ref
3961
- );
3962
- const classNames2 = useClassNames45({ component: "Tag", variant, size });
3963
- return /* @__PURE__ */ jsx89(
3964
- "span",
3965
- {
3966
- ref,
3967
- ...mergeProps16(rowProps, focusProps),
3968
- className: classNames2.tag,
3969
- children: /* @__PURE__ */ jsxs35("div", { ...gridCellProps, className: classNames2.gridCell, children: [
3970
- /* @__PURE__ */ jsx89("span", { children: item.rendered }),
3971
- allowsRemoving && /* @__PURE__ */ jsx89(
3972
- CloseButton2,
3973
- {
3974
- ...removeButtonProps,
3975
- className: cn49("flex items-center", classNames2.closeButton)
3976
- }
3977
- )
3978
- ] })
3979
- }
3980
- );
3981
- };
3509
+ import { Button as Button5, Tag } from "react-aria-components";
3510
+ import { cn as cn51, useClassNames as useClassNames51 } from "@marigold/system";
3982
3511
 
3983
3512
  // src/TagGroup/TagGroup.tsx
3513
+ import { TagGroup, TagList } from "react-aria-components";
3514
+ import { useClassNames as useClassNames50 } from "@marigold/system";
3984
3515
  import { jsx as jsx90 } from "react/jsx-runtime";
3985
- import { createElement } from "react";
3986
- var TagGroup = ({
3516
+ var _TagGroup = ({
3987
3517
  width,
3988
- required,
3989
- error,
3990
- allowsRemoving,
3518
+ items,
3519
+ children,
3520
+ variant,
3521
+ size,
3991
3522
  ...rest
3992
3523
  }) => {
3993
- const props = {
3994
- isRequired: required,
3995
- validationState: error ? "invalid" : "valid",
3996
- ...rest
3997
- };
3998
- const inputRef = useRef26(null);
3999
- const state = useListState(props);
4000
- const { gridProps, labelProps, descriptionProps, errorMessageProps } = useTagGroup(props, state, inputRef);
4001
- const stateProps = useStateProps16({
4002
- error,
4003
- required
4004
- });
4005
- return /* @__PURE__ */ jsx90(
4006
- FieldBase,
4007
- {
4008
- width,
4009
- label: props.label,
4010
- labelProps,
4011
- description: props.description,
4012
- descriptionProps,
4013
- error,
4014
- errorMessage: props.errorMessage,
4015
- errorMessageProps,
4016
- stateProps,
4017
- ...gridProps,
4018
- children: /* @__PURE__ */ jsx90(
4019
- "div",
4020
- {
4021
- role: "presentation",
4022
- ref: inputRef,
4023
- className: "flex flex-wrap items-start gap-1",
4024
- children: [...state.collection].map((item) => /* @__PURE__ */ createElement(
4025
- Tag,
4026
- {
4027
- ...item.props,
4028
- key: item.key,
4029
- item,
4030
- state,
4031
- allowsRemoving,
4032
- onRemove: props.onRemove
4033
- },
4034
- item.rendered
4035
- ))
4036
- }
4037
- )
4038
- }
4039
- );
3524
+ const classNames2 = useClassNames50({ component: "Tag", variant, size });
3525
+ return /* @__PURE__ */ jsx90(FieldBase, { as: TagGroup, ...rest, children: /* @__PURE__ */ jsx90(TagList, { items, className: classNames2.listItems, children }) });
4040
3526
  };
4041
3527
 
4042
- // src/TagGroup/index.ts
4043
- var Tag2 = Item6;
4044
- Tag2.Group = TagGroup;
3528
+ // src/TagGroup/Tag.tsx
3529
+ import { Fragment as Fragment9, jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
3530
+ var CloseButton2 = ({ className }) => {
3531
+ return /* @__PURE__ */ jsx91(Button5, { slot: "remove", className, children: /* @__PURE__ */ jsx91("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: 20, height: 20, children: /* @__PURE__ */ jsx91("path", { 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" }) }) });
3532
+ };
3533
+ var _Tag = ({ variant, size, children, ...props }) => {
3534
+ let textValue = typeof children === "string" ? children : void 0;
3535
+ const classNames2 = useClassNames51({ component: "Tag", variant, size });
3536
+ return /* @__PURE__ */ jsx91(Tag, { textValue, ...props, className: classNames2.tag, children: ({ allowsRemoving }) => /* @__PURE__ */ jsxs36(Fragment9, { children: [
3537
+ children,
3538
+ allowsRemoving && /* @__PURE__ */ jsx91(
3539
+ CloseButton2,
3540
+ {
3541
+ className: cn51("flex items-center", classNames2.closeButton)
3542
+ }
3543
+ )
3544
+ ] }) });
3545
+ };
3546
+ _Tag.Group = _TagGroup;
4045
3547
 
4046
3548
  // src/VisuallyHidden/VisuallyHidden.tsx
4047
3549
  import { VisuallyHidden } from "@react-aria/visually-hidden";
4048
3550
 
4049
3551
  // src/XLoader/XLoader.tsx
4050
- import { forwardRef as forwardRef21 } from "react";
3552
+ import { forwardRef as forwardRef23 } from "react";
4051
3553
  import { SVG as SVG6 } from "@marigold/system";
4052
- import { jsx as jsx91, jsxs as jsxs36 } from "react/jsx-runtime";
4053
- var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
3554
+ import { jsx as jsx92, jsxs as jsxs37 } from "react/jsx-runtime";
3555
+ var XLoader = forwardRef23((props, ref) => /* @__PURE__ */ jsxs37(
4054
3556
  SVG6,
4055
3557
  {
4056
3558
  id: "XLoader",
@@ -4060,13 +3562,13 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4060
3562
  ...props,
4061
3563
  ...ref,
4062
3564
  children: [
4063
- /* @__PURE__ */ jsx91("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
4064
- /* @__PURE__ */ jsx91(
3565
+ /* @__PURE__ */ jsx92("path", { id: "XMLID_1_", d: "M35.3 27h26.5l54 74.1H88.7z" }),
3566
+ /* @__PURE__ */ jsx92(
4065
3567
  "path",
4066
3568
  {
4067
3569
  id: "XMLID_5_",
4068
3570
  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",
4069
- children: /* @__PURE__ */ jsx91(
3571
+ children: /* @__PURE__ */ jsx92(
4070
3572
  "animate",
4071
3573
  {
4072
3574
  attributeName: "opacity",
@@ -4079,12 +3581,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4079
3581
  )
4080
3582
  }
4081
3583
  ),
4082
- /* @__PURE__ */ jsx91(
3584
+ /* @__PURE__ */ jsx92(
4083
3585
  "path",
4084
3586
  {
4085
3587
  id: "XMLID_18_",
4086
3588
  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",
4087
- children: /* @__PURE__ */ jsx91(
3589
+ children: /* @__PURE__ */ jsx92(
4088
3590
  "animate",
4089
3591
  {
4090
3592
  attributeName: "opacity",
@@ -4097,12 +3599,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4097
3599
  )
4098
3600
  }
4099
3601
  ),
4100
- /* @__PURE__ */ jsx91(
3602
+ /* @__PURE__ */ jsx92(
4101
3603
  "path",
4102
3604
  {
4103
3605
  id: "XMLID_19_",
4104
3606
  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",
4105
- children: /* @__PURE__ */ jsx91(
3607
+ children: /* @__PURE__ */ jsx92(
4106
3608
  "animate",
4107
3609
  {
4108
3610
  attributeName: "opacity",
@@ -4115,12 +3617,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4115
3617
  )
4116
3618
  }
4117
3619
  ),
4118
- /* @__PURE__ */ jsx91(
3620
+ /* @__PURE__ */ jsx92(
4119
3621
  "path",
4120
3622
  {
4121
3623
  id: "XMLID_20_",
4122
3624
  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",
4123
- children: /* @__PURE__ */ jsx91(
3625
+ children: /* @__PURE__ */ jsx92(
4124
3626
  "animate",
4125
3627
  {
4126
3628
  attributeName: "opacity",
@@ -4133,12 +3635,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4133
3635
  )
4134
3636
  }
4135
3637
  ),
4136
- /* @__PURE__ */ jsx91(
3638
+ /* @__PURE__ */ jsx92(
4137
3639
  "path",
4138
3640
  {
4139
3641
  id: "XMLID_21_",
4140
3642
  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",
4141
- children: /* @__PURE__ */ jsx91(
3643
+ children: /* @__PURE__ */ jsx92(
4142
3644
  "animate",
4143
3645
  {
4144
3646
  attributeName: "opacity",
@@ -4151,12 +3653,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4151
3653
  )
4152
3654
  }
4153
3655
  ),
4154
- /* @__PURE__ */ jsx91(
3656
+ /* @__PURE__ */ jsx92(
4155
3657
  "path",
4156
3658
  {
4157
3659
  id: "XMLID_22_",
4158
3660
  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",
4159
- children: /* @__PURE__ */ jsx91(
3661
+ children: /* @__PURE__ */ jsx92(
4160
3662
  "animate",
4161
3663
  {
4162
3664
  attributeName: "opacity",
@@ -4169,12 +3671,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4169
3671
  )
4170
3672
  }
4171
3673
  ),
4172
- /* @__PURE__ */ jsx91(
3674
+ /* @__PURE__ */ jsx92(
4173
3675
  "path",
4174
3676
  {
4175
3677
  id: "XMLID_23_",
4176
3678
  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",
4177
- children: /* @__PURE__ */ jsx91(
3679
+ children: /* @__PURE__ */ jsx92(
4178
3680
  "animate",
4179
3681
  {
4180
3682
  attributeName: "opacity",
@@ -4187,12 +3689,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4187
3689
  )
4188
3690
  }
4189
3691
  ),
4190
- /* @__PURE__ */ jsx91(
3692
+ /* @__PURE__ */ jsx92(
4191
3693
  "path",
4192
3694
  {
4193
3695
  id: "XMLID_24_",
4194
3696
  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",
4195
- children: /* @__PURE__ */ jsx91(
3697
+ children: /* @__PURE__ */ jsx92(
4196
3698
  "animate",
4197
3699
  {
4198
3700
  attributeName: "opacity",
@@ -4205,12 +3707,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4205
3707
  )
4206
3708
  }
4207
3709
  ),
4208
- /* @__PURE__ */ jsx91(
3710
+ /* @__PURE__ */ jsx92(
4209
3711
  "path",
4210
3712
  {
4211
3713
  id: "XMLID_25_",
4212
3714
  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",
4213
- children: /* @__PURE__ */ jsx91(
3715
+ children: /* @__PURE__ */ jsx92(
4214
3716
  "animate",
4215
3717
  {
4216
3718
  attributeName: "opacity",
@@ -4223,12 +3725,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4223
3725
  )
4224
3726
  }
4225
3727
  ),
4226
- /* @__PURE__ */ jsx91(
3728
+ /* @__PURE__ */ jsx92(
4227
3729
  "path",
4228
3730
  {
4229
3731
  id: "XMLID_26_",
4230
3732
  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",
4231
- children: /* @__PURE__ */ jsx91(
3733
+ children: /* @__PURE__ */ jsx92(
4232
3734
  "animate",
4233
3735
  {
4234
3736
  attributeName: "opacity",
@@ -4241,12 +3743,12 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4241
3743
  )
4242
3744
  }
4243
3745
  ),
4244
- /* @__PURE__ */ jsx91(
3746
+ /* @__PURE__ */ jsx92(
4245
3747
  "path",
4246
3748
  {
4247
3749
  id: "XMLID_27_",
4248
3750
  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",
4249
- children: /* @__PURE__ */ jsx91(
3751
+ children: /* @__PURE__ */ jsx92(
4250
3752
  "animate",
4251
3753
  {
4252
3754
  attributeName: "opacity",
@@ -4265,24 +3767,24 @@ var XLoader = forwardRef21((props, ref) => /* @__PURE__ */ jsxs36(
4265
3767
 
4266
3768
  // src/Tabs/Tabs.tsx
4267
3769
  import { Tabs } from "react-aria-components";
4268
- import { useClassNames as useClassNames46 } from "@marigold/system";
3770
+ import { useClassNames as useClassNames52 } from "@marigold/system";
4269
3771
 
4270
3772
  // src/Tabs/Context.ts
4271
- import { createContext as createContext7, useContext as useContext8 } from "react";
4272
- var TabContext = createContext7({});
4273
- var useTabContext = () => useContext8(TabContext);
3773
+ import { createContext as createContext6, useContext as useContext11 } from "react";
3774
+ var TabContext = createContext6({});
3775
+ var useTabContext = () => useContext11(TabContext);
4274
3776
 
4275
3777
  // src/Tabs/Tab.tsx
4276
3778
  import { Tab } from "react-aria-components";
4277
- import { cn as cn50 } from "@marigold/system";
4278
- import { jsx as jsx92 } from "react/jsx-runtime";
3779
+ import { cn as cn52 } from "@marigold/system";
3780
+ import { jsx as jsx93 } from "react/jsx-runtime";
4279
3781
  var _Tab = (props) => {
4280
3782
  const { classNames: classNames2 } = useTabContext();
4281
- return /* @__PURE__ */ jsx92(
3783
+ return /* @__PURE__ */ jsx93(
4282
3784
  Tab,
4283
3785
  {
4284
3786
  ...props,
4285
- className: cn50(
3787
+ className: cn52(
4286
3788
  "flex cursor-pointer justify-center aria-disabled:cursor-not-allowed",
4287
3789
  classNames2.tab
4288
3790
  ),
@@ -4293,15 +3795,15 @@ var _Tab = (props) => {
4293
3795
 
4294
3796
  // src/Tabs/TabList.tsx
4295
3797
  import { TabList } from "react-aria-components";
4296
- import { cn as cn51, gapSpace as gapSpace8 } from "@marigold/system";
4297
- import { jsx as jsx93 } from "react/jsx-runtime";
3798
+ import { cn as cn53, gapSpace as gapSpace8 } from "@marigold/system";
3799
+ import { jsx as jsx94 } from "react/jsx-runtime";
4298
3800
  var _TabList = ({ space = 2, ...props }) => {
4299
3801
  const { classNames: classNames2 } = useTabContext();
4300
- return /* @__PURE__ */ jsx93(
3802
+ return /* @__PURE__ */ jsx94(
4301
3803
  TabList,
4302
3804
  {
4303
3805
  ...props,
4304
- className: cn51("flex", gapSpace8[space], classNames2.tabsList),
3806
+ className: cn53("flex", gapSpace8[space], classNames2.tabsList),
4305
3807
  children: props.children
4306
3808
  }
4307
3809
  );
@@ -4309,25 +3811,25 @@ var _TabList = ({ space = 2, ...props }) => {
4309
3811
 
4310
3812
  // src/Tabs/TabPanel.tsx
4311
3813
  import { TabPanel } from "react-aria-components";
4312
- import { jsx as jsx94 } from "react/jsx-runtime";
3814
+ import { jsx as jsx95 } from "react/jsx-runtime";
4313
3815
  var _TabPanel = (props) => {
4314
3816
  const { classNames: classNames2 } = useTabContext();
4315
- return /* @__PURE__ */ jsx94(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
3817
+ return /* @__PURE__ */ jsx95(TabPanel, { ...props, className: classNames2.tabpanel, children: props.children });
4316
3818
  };
4317
3819
 
4318
3820
  // src/Tabs/Tabs.tsx
4319
- import { jsx as jsx95 } from "react/jsx-runtime";
3821
+ import { jsx as jsx96 } from "react/jsx-runtime";
4320
3822
  var _Tabs = ({ disabled, variant, size = "medium", ...rest }) => {
4321
3823
  const props = {
4322
3824
  isDisabled: disabled,
4323
3825
  ...rest
4324
3826
  };
4325
- const classNames2 = useClassNames46({
3827
+ const classNames2 = useClassNames52({
4326
3828
  component: "Tabs",
4327
3829
  size,
4328
3830
  variant
4329
3831
  });
4330
- return /* @__PURE__ */ jsx95(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx95(Tabs, { ...props, className: classNames2.container, children: props.children }) });
3832
+ return /* @__PURE__ */ jsx96(TabContext.Provider, { value: { classNames: classNames2 }, children: /* @__PURE__ */ jsx96(Tabs, { ...props, className: classNames2.container, children: props.children }) });
4331
3833
  };
4332
3834
  _Tabs.List = _TabList;
4333
3835
  _Tabs.TabPanel = _TabPanel;
@@ -4338,26 +3840,25 @@ export {
4338
3840
  ActionMenu,
4339
3841
  Aside,
4340
3842
  Aspect,
4341
- Autocomplete,
3843
+ _Autocomplete as Autocomplete,
4342
3844
  Badge,
4343
3845
  Body,
4344
3846
  Breakout,
4345
3847
  _Button as Button,
4346
- Calendar,
4347
- CalendarCell,
4348
- CalendarGrid,
3848
+ _Calendar as Calendar,
4349
3849
  Card,
4350
3850
  Center,
4351
3851
  _Checkbox as Checkbox,
4352
3852
  _CheckboxGroup as CheckboxGroup,
3853
+ CloseButton2 as CloseButton,
4353
3854
  Columns,
4354
- ComboBox,
3855
+ _ComboBox as ComboBox,
4355
3856
  Container,
4356
3857
  DateField,
4357
3858
  DatePicker,
4358
3859
  _Dialog as Dialog,
4359
3860
  _Divider as Divider,
4360
- FieldBase,
3861
+ FieldBase2 as FieldBase,
4361
3862
  FieldGroup,
4362
3863
  FieldGroupContext,
4363
3864
  Footer,
@@ -4365,29 +3866,29 @@ export {
4365
3866
  _Headline as Headline,
4366
3867
  Image,
4367
3868
  Inline,
4368
- Input,
3869
+ _Input as Input,
4369
3870
  Inset,
4370
3871
  _Label as Label,
4371
3872
  _Link as Link,
4372
3873
  List,
4373
3874
  MarigoldProvider,
4374
- Menu,
3875
+ _Menu as Menu,
4375
3876
  Message,
4376
3877
  _Modal as Modal,
4377
3878
  _NumberField as NumberField,
4378
3879
  Overlay,
4379
- Popover,
3880
+ Popover2 as Popover,
4380
3881
  _Radio as Radio,
4381
3882
  _RadioGroup as RadioGroup,
4382
3883
  _SearchField as SearchField,
4383
- Select,
3884
+ _Select as Select,
4384
3885
  _Slider as Slider,
4385
3886
  Split,
4386
3887
  Stack,
4387
3888
  _Switch as Switch,
4388
3889
  Table,
4389
3890
  _Tabs as Tabs,
4390
- Tag2 as Tag,
3891
+ _Tag as Tag,
4391
3892
  Text2 as Text,
4392
3893
  _TextArea as TextArea,
4393
3894
  _TextField as TextField,
@@ -4399,8 +3900,9 @@ export {
4399
3900
  Underlay,
4400
3901
  VisuallyHidden,
4401
3902
  XLoader,
3903
+ _Calendar,
4402
3904
  useAsyncList,
4403
3905
  useFieldGroupContext,
4404
3906
  useListData,
4405
- useTheme5 as useTheme
3907
+ useTheme6 as useTheme
4406
3908
  };