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