@marigold/components 15.4.3 → 16.0.1

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.js CHANGED
@@ -144,8 +144,11 @@ const AccordionItem = ({ children, disabled, expanded,...props }) => {
144
144
  const AccordionPanel = ({ children }) => {
145
145
  const { classNames: classNames$2 } = useAccordionContext();
146
146
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DisclosurePanel, {
147
- className: classNames$2.content,
148
- children
147
+ className: classNames$2.panel,
148
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
149
+ className: classNames$2.content,
150
+ children
151
+ })
149
152
  });
150
153
  };
151
154
 
@@ -288,19 +291,15 @@ const HelpText = ({ variant, size: size$1, description, errorMessage,...props })
288
291
  //#endregion
289
292
  //#region src/Label/Label.tsx
290
293
  const _Label = ({ size: size$1, variant, children,...props }) => {
291
- const classNames$2 = (0, __marigold_system.useClassNames)({
294
+ const className = (0, __marigold_system.useClassNames)({
292
295
  component: "Label",
293
296
  size: size$1,
294
297
  variant
295
298
  });
296
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.Label, {
299
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Label, {
297
300
  ...props,
298
- className: (0, __marigold_system.cn)(classNames$2.container, "inline-flex"),
299
- children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
300
- "aria-hidden": "true",
301
- className: (0, __marigold_system.cn)("hidden", classNames$2.indicator),
302
- children: "*"
303
- })]
301
+ className: (0, __marigold_system.cn)(className, "inline-flex"),
302
+ children
304
303
  });
305
304
  };
306
305
 
@@ -339,40 +338,47 @@ const _FieldBase = (props, ref) => {
339
338
  const FieldBase = fixedForwardRef(_FieldBase);
340
339
 
341
340
  //#endregion
342
- //#region src/ProgressCycle/ProgressCycle.tsx
343
- const ProgressCycle = ({ size: size$1 = "16",...props }) => {
341
+ //#region src/ProgressCircle/ProgressCircle.tsx
342
+ const ProgressCircleSvg = ({ size: size$1 = "16", variant }) => {
343
+ const classNames$2 = (0, __marigold_system.useClassNames)({
344
+ component: "ProgressCircle",
345
+ variant,
346
+ size: size$1
347
+ });
344
348
  let strokeWidth = 3;
345
349
  if (size$1 <= "24") strokeWidth = 2;
346
350
  else if (size$1 >= "32") strokeWidth = 4;
347
351
  const radius = `calc(50% - ${strokeWidth / 2}px)`;
348
- const classNames$2 = (0, __marigold_system.useClassNames)({ component: "ProgressCycle" });
352
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__marigold_system.SVG, {
353
+ className: (0, __marigold_system.cn)("animate-rotate-spinner origin-center fill-none", classNames$2.loader),
354
+ size: size$1,
355
+ "aria-hidden": "true",
356
+ role: "img",
357
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
358
+ cx: "50%",
359
+ cy: "50%",
360
+ r: radius,
361
+ strokeWidth,
362
+ className: "stroke-transparent"
363
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
364
+ cx: "50%",
365
+ cy: "50%",
366
+ r: radius,
367
+ strokeWidth,
368
+ pathLength: "100",
369
+ strokeDasharray: "100 200",
370
+ strokeDashoffset: "0",
371
+ strokeLinecap: "round",
372
+ className: (0, __marigold_system.cn)("animate-progress-cycle origin-center -rotate-90", classNames$2.container)
373
+ })]
374
+ });
375
+ };
376
+ const ProgressCircle = ({ size: size$1 = "16",...props }) => {
349
377
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.ProgressBar, {
350
378
  ...props,
351
379
  "aria-label": "loading",
352
380
  isIndeterminate: true,
353
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(__marigold_system.SVG, {
354
- className: "animate-rotate-spinner origin-center fill-none",
355
- size: size$1,
356
- "aria-hidden": "true",
357
- role: "img",
358
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
359
- cx: "50%",
360
- cy: "50%",
361
- r: radius,
362
- strokeWidth,
363
- className: "stroke-transparent"
364
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
365
- cx: "50%",
366
- cy: "50%",
367
- r: radius,
368
- strokeWidth,
369
- pathLength: "100",
370
- strokeDasharray: "100 200",
371
- strokeDashoffset: "0",
372
- strokeLinecap: "round",
373
- className: (0, __marigold_system.cn)("animate-progress-cycle origin-center -rotate-90", classNames$2)
374
- })]
375
- })
381
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCircleSvg, { size: size$1 })
376
382
  });
377
383
  };
378
384
 
@@ -461,7 +467,7 @@ const SearchInput = (0, react.forwardRef)(({ className, loading, onClear,...prop
461
467
  className: (0, __marigold_system.cn)("[&::-webkit-search-cancel-button]:hidden", className?.input),
462
468
  ref,
463
469
  icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Search, { size: "16" }),
464
- action: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCycle, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
470
+ action: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCircle, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
465
471
  className: className?.action,
466
472
  onPress: () => onClear?.(),
467
473
  "aria-label": stringFormatter.format("Clear search"),
@@ -613,7 +619,12 @@ const intlMessages = {
613
619
  showMore: "Mehr anzeigen",
614
620
  showMoreCount: "{count} weitere anzeigen",
615
621
  showLess: "Weniger anzeigen",
616
- showLessCount: "{count} weniger anzeigen"
622
+ showLessCount: "{count} weniger anzeigen",
623
+ dropZoneLabel: "Dateien hierher ziehen",
624
+ uploadLabel: "Hochladen",
625
+ moreInfo: "Mehr Informationen",
626
+ help: "Hilfe",
627
+ hiddenBreadcrumbs: "Diese Breadcrumbs sind ausgeblendet"
617
628
  },
618
629
  "en-US": {
619
630
  cancel: "Cancel",
@@ -623,14 +634,19 @@ const intlMessages = {
623
634
  showMore: "Show more",
624
635
  showMoreCount: "Show {count} more",
625
636
  showLess: "Show less",
626
- showLessCount: "Show {count} less"
637
+ showLessCount: "Show {count} less",
638
+ dropZoneLabel: "Drop files here",
639
+ uploadLabel: "Upload",
640
+ moreInfo: "More information",
641
+ help: "Help",
642
+ hiddenBreadcrumbs: "These breadcrumbs are hidden"
627
643
  }
628
644
  };
629
645
 
630
646
  //#endregion
631
647
  //#region src/Autocomplete/Autocomplete.tsx
632
648
  const AutocompleteInput = ({ loading, onSubmit, onClear, ref }) => {
633
- const state = react.default.useContext(react_aria_components.ComboBoxStateContext);
649
+ const state = (0, react.useContext)(react_aria_components.ComboBoxStateContext);
634
650
  const classNames$2 = (0, __marigold_system.useClassNames)({ component: "ComboBox" });
635
651
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchInput, {
636
652
  ref,
@@ -712,19 +728,32 @@ const ChevronRight = ({ size: size$1 = 24, className,...props }) => /* @__PURE__
712
728
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m9 18 6-6-6-6" })
713
729
  });
714
730
 
731
+ //#endregion
732
+ //#region src/IconButton/IconButton.tsx
733
+ const IconButton = ({ className, children, variant, size: size$1,...props }) => {
734
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
735
+ className: (0, __marigold_system.cn)("shrink-0 cursor-pointer outline-0", (0, __marigold_system.useClassNames)({
736
+ component: "IconButton",
737
+ variant,
738
+ size: size$1
739
+ }), className),
740
+ ...props,
741
+ children
742
+ });
743
+ };
744
+
715
745
  //#endregion
716
746
  //#region src/Breadcrumbs/BreadcrumbEllipsis.tsx
717
747
  const BreadcrumbEllipsis = ({ hiddenItems = [], disabled = false }) => {
748
+ const stringFormatter = (0, __react_aria_i18n.useLocalizedStringFormatter)(intlMessages, "marigold");
718
749
  const { container, item: menuItem } = (0, __marigold_system.useClassNames)({ component: "Menu" });
719
- const { item: breadcrumbsItem, link } = (0, __marigold_system.useClassNames)({ component: "Breadcrumbs" });
720
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.MenuTrigger, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
721
- type: "button",
722
- className: `${breadcrumbsItem} ${link}`,
750
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.MenuTrigger, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
751
+ "aria-label": stringFormatter.format("hiddenBreadcrumbs"),
723
752
  children: "..."
724
753
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Popover, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Menu, {
725
754
  className: container,
726
755
  children: hiddenItems.map((item, index$1) => {
727
- if (!react.default.isValidElement(item)) return null;
756
+ if (!(0, react.isValidElement)(item)) return null;
728
757
  const { href, children: itemChildren } = item.props;
729
758
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.MenuItem, {
730
759
  className: menuItem,
@@ -748,7 +777,7 @@ const _Breadcrumbs = (0, react.forwardRef)(({ children, variant, size: size$1, d
748
777
  variant,
749
778
  size: size$1
750
779
  });
751
- const items = react.default.Children.toArray(children);
780
+ const items = react.Children.toArray(children);
752
781
  const total = items.length;
753
782
  const shouldCollapse = typeof maxVisibleItems === "number" && maxVisibleItems >= 2 && total > maxVisibleItems;
754
783
  const ellipsis = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BreadcrumbsItem, {
@@ -766,7 +795,7 @@ const _Breadcrumbs = (0, react.forwardRef)(({ children, variant, size: size$1, d
766
795
  isDisabled: disabled,
767
796
  className: container,
768
797
  children: displayedItems.map((item, index$1) => {
769
- if (!react.default.isValidElement(item)) return null;
798
+ if (!(0, react.isValidElement)(item)) return null;
770
799
  const isLast = index$1 === displayedItems.length - 1;
771
800
  const { href, children: itemChildren,...ariaProps } = item.props;
772
801
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.Breadcrumb, {
@@ -779,7 +808,7 @@ const _Breadcrumbs = (0, react.forwardRef)(({ children, variant, size: size$1, d
779
808
  children: itemChildren
780
809
  }), !isLast && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronRight, {
781
810
  "aria-hidden": "true",
782
- size: 14,
811
+ size: 16,
783
812
  "data-testid": "breadcrumb-chevronright"
784
813
  })]
785
814
  }, `${href}-${index$1}`);
@@ -790,12 +819,11 @@ _Breadcrumbs.Item = BreadcrumbsItem;
790
819
 
791
820
  //#endregion
792
821
  //#region src/Breakout/Breakout.tsx
793
- const Breakout = ({ children }) => {
794
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
795
- className: "![grid-column:1/-1]",
796
- children
797
- });
798
- };
822
+ const Breakout = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
823
+ "data-breakout": true,
824
+ className: "col-span-full!",
825
+ children
826
+ });
799
827
 
800
828
  //#endregion
801
829
  //#region src/Button/Button.tsx
@@ -813,7 +841,7 @@ const _Button = (0, react.forwardRef)(({ children, variant, size: size$1, disabl
813
841
  isDisabled: disabled,
814
842
  children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
815
843
  className: "absolute",
816
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCycle, {})
844
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCircle, {})
817
845
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
818
846
  className: "invisible flex gap-[inherit]",
819
847
  children
@@ -923,20 +951,6 @@ const CalendarListBox = ({ type, isDisabled, setSelectedDropdown }) => {
923
951
  });
924
952
  };
925
953
 
926
- //#endregion
927
- //#region src/IconButton/IconButton.tsx
928
- const IconButton = ({ className, children, variant, size: size$1,...props }) => {
929
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
930
- className: (0, __marigold_system.cn)("shrink-0 cursor-pointer outline-0", (0, __marigold_system.useClassNames)({
931
- component: "IconButton",
932
- variant,
933
- size: size$1
934
- }), className),
935
- ...props,
936
- children
937
- });
938
- };
939
-
940
954
  //#endregion
941
955
  //#region src/icons/ChevronLeft.tsx
942
956
  const ChevronLeft = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
@@ -1274,7 +1288,6 @@ const _CheckboxGroup = ({ children, variant, size: size$1, required, disabled, r
1274
1288
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1275
1289
  role: "presentation",
1276
1290
  "data-orientation": orientation,
1277
- "data-group": "checkbox",
1278
1291
  className: (0, __marigold_system.cn)(classNames$2.group, "group/checkboxgroup flex items-start", orientation === "vertical" ? "flex-col gap-[0.5ch]" : "flex-row gap-[1.5ch]"),
1279
1292
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(CheckboxGroupContext.Provider, {
1280
1293
  value: {
@@ -1428,7 +1441,7 @@ const _ComboBox = (0, react.forwardRef)(({ variant, size: size$1, required, disa
1428
1441
  ...props,
1429
1442
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Input, { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
1430
1443
  className: classNames$2,
1431
- children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCycle, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronsVertical, { size: "16" })
1444
+ children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCircle, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronsVertical, { size: "16" })
1432
1445
  }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Popover, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_ListBox, {
1433
1446
  renderEmptyState: () => emptyState ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Center, { children: stringFormatter.format("noResultsFound") }),
1434
1447
  children
@@ -1451,9 +1464,9 @@ const containerHeadlineLength = {
1451
1464
  long: "35ch"
1452
1465
  };
1453
1466
  const gridColsAlign = {
1454
- left: "grid-cols-[minmax(0,max-content)_1fr_1fr]",
1455
- center: "grid-cols-[1fr_minmax(0,max-content)_1fr]",
1456
- right: " grid-cols-[1fr_1fr_minmax(0,max-content)]"
1467
+ left: "has-[[data-breakout]]:grid-cols-[minmax(0,max-content)_1fr_1fr]",
1468
+ center: "has-[[data-breakout]]:grid-cols-[1fr_minmax(0,max-content)_1fr]",
1469
+ right: "has-[[data-breakout]]:grid-cols-[1fr_1fr_minmax(0,max-content)]"
1457
1470
  };
1458
1471
  const gridColumn = {
1459
1472
  left: "*:col-[1]",
@@ -1556,13 +1569,14 @@ const DialogTrigger$2 = ({ open,...rest }) => /* @__PURE__ */ (0, react_jsx_runt
1556
1569
  isOpen: open,
1557
1570
  ...rest
1558
1571
  });
1559
- const _ContextualHelp = (0, react.forwardRef)(({ children, variant = "help", size: size$1, width, placement = "bottom start", offset: offset$1 = 0, defaultOpen, open, onOpenChange }, ref) => {
1572
+ const _ContextualHelp = (0, react.forwardRef)(({ children, variant = "help", size: size$1, width, placement = "bottom start", offset: offset$1 = 0, defaultOpen, open, onOpenChange, ariaLabel }, ref) => {
1560
1573
  const Icon$2 = icons$2[variant];
1561
1574
  const classNames$2 = (0, __marigold_system.useClassNames)({
1562
1575
  component: "ContextualHelp",
1563
1576
  variant,
1564
1577
  size: size$1
1565
1578
  });
1579
+ const stringFormatter = (0, __react_aria_i18n.useLocalizedStringFormatter)(intlMessages);
1566
1580
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(DialogTrigger$2, {
1567
1581
  defaultOpen,
1568
1582
  open,
@@ -1570,7 +1584,7 @@ const _ContextualHelp = (0, react.forwardRef)(({ children, variant = "help", siz
1570
1584
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Button, {
1571
1585
  ref,
1572
1586
  className: classNames$2.trigger,
1573
- "aria-label": variant === "info" ? "Information" : "Hilfe",
1587
+ "aria-label": ariaLabel ?? (variant === "info" ? stringFormatter.format("moreInfo") : stringFormatter.format("help")),
1574
1588
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon$2, { size: 20 })
1575
1589
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Popover, {
1576
1590
  placement,
@@ -1604,14 +1618,90 @@ const _DateSegment = ({ segment,...props }) => {
1604
1618
 
1605
1619
  //#endregion
1606
1620
  //#region src/DateField/DateInput.tsx
1607
- const _DateInput = ({ variant, size: size$1, action,...props }) => {
1621
+ const extractCalendarDate = (format, order, dateString) => {
1622
+ const isMatch = dateString.trim().match(format);
1623
+ if (!isMatch) return;
1624
+ const date = order.reduce((accumulatedValue, currentVal, currentIndex) => {
1625
+ return {
1626
+ ...accumulatedValue,
1627
+ [currentVal]: parseInt(isMatch[currentIndex + 1], 10)
1628
+ };
1629
+ }, {});
1630
+ if (isValidDate(date.year, date.month, date.day)) return new __internationalized_date.CalendarDate(date.year, date.month, date.day);
1631
+ };
1632
+ const parseDateFromString = (dateString) => {
1633
+ for (const format of [
1634
+ {
1635
+ regex: /^(\d{4})-(\d{1,2})-(\d{1,2})$/,
1636
+ order: [
1637
+ "year",
1638
+ "month",
1639
+ "day"
1640
+ ]
1641
+ },
1642
+ {
1643
+ regex: /^(\d{1,2})[./](\d{1,2})[./](\d{4})$/,
1644
+ order: [
1645
+ "day",
1646
+ "month",
1647
+ "year"
1648
+ ]
1649
+ },
1650
+ {
1651
+ regex: /^(\d{1,2})[/-](\d{1,2})[/-](\d{4})$/,
1652
+ order: [
1653
+ "month",
1654
+ "day",
1655
+ "year"
1656
+ ]
1657
+ }
1658
+ ]) {
1659
+ const result = extractCalendarDate(format.regex, format.order, dateString);
1660
+ if (result) return result;
1661
+ }
1662
+ };
1663
+ const isValidDate = (year, month, day) => {
1664
+ if (year < 1 || year > 9999) return false;
1665
+ if (month < 1 || month > 12) return false;
1666
+ if (day < 1 || day > 31) return false;
1667
+ const daysInMonth = [
1668
+ 31,
1669
+ 28,
1670
+ 31,
1671
+ 30,
1672
+ 31,
1673
+ 30,
1674
+ 31,
1675
+ 31,
1676
+ 30,
1677
+ 31,
1678
+ 30,
1679
+ 31
1680
+ ];
1681
+ const isLeapYear = year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
1682
+ if (month === 2 && isLeapYear) return day <= 29;
1683
+ return day <= daysInMonth[month - 1];
1684
+ };
1685
+ const _DateInput = ({ variant, size: size$1, action, onPaste,...props }) => {
1608
1686
  const classNames$2 = (0, __marigold_system.useClassNames)({
1609
1687
  component: "DateField",
1610
1688
  variant,
1611
1689
  size: size$1
1612
1690
  });
1691
+ const handlePaste = async (event) => {
1692
+ try {
1693
+ const parsedDate = parseDateFromString(event.clipboardData.getData("text"));
1694
+ if (parsedDate) {
1695
+ event.preventDefault();
1696
+ onPaste(parsedDate);
1697
+ }
1698
+ } catch (error) {
1699
+ console.warn("Failed to parse pasted date:", error);
1700
+ }
1701
+ };
1613
1702
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.Group, {
1614
1703
  className: classNames$2.field,
1704
+ onPaste: handlePaste,
1615
1705
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DateInput, {
1616
1706
  className: "flex flex-1 items-center",
1617
1707
  ...props,
@@ -1625,7 +1715,7 @@ const _DateInput = ({ variant, size: size$1, action,...props }) => {
1625
1715
 
1626
1716
  //#endregion
1627
1717
  //#region src/DateField/DateField.tsx
1628
- const _DateField = (0, react.forwardRef)(({ variant, size: size$1, action, disabled, required, error, readOnly,...rest }, ref) => {
1718
+ const _DateField = (0, react.forwardRef)(({ variant, size: size$1, action, disabled, required, error, readOnly, onChange,...rest }, ref) => {
1629
1719
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FieldBase, {
1630
1720
  as: react_aria_components.DateField,
1631
1721
  variant,
@@ -1636,9 +1726,23 @@ const _DateField = (0, react.forwardRef)(({ variant, size: size$1, action, disab
1636
1726
  isInvalid: error,
1637
1727
  isRequired: required,
1638
1728
  ...rest,
1639
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_DateInput, { action })
1729
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateInputWithPasteWrapper, {
1730
+ onChange,
1731
+ action
1732
+ })
1640
1733
  });
1641
1734
  });
1735
+ const DateInputWithPasteWrapper = ({ onChange,...props }) => {
1736
+ const ctx = (0, react.useContext)(react_aria_components.DateFieldStateContext);
1737
+ const onPaste = (date) => {
1738
+ if (onChange) onChange(date);
1739
+ ctx?.setValue(date);
1740
+ };
1741
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_DateInput, {
1742
+ onPaste,
1743
+ ...props
1744
+ });
1745
+ };
1642
1746
 
1643
1747
  //#endregion
1644
1748
  //#region src/icons/Calendar.tsx
@@ -1670,7 +1774,7 @@ const Calendar = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */
1670
1774
 
1671
1775
  //#endregion
1672
1776
  //#region src/DatePicker/DatePicker.tsx
1673
- const _DatePicker = react.default.forwardRef(({ dateUnavailable, disabled, required, readOnly, error, variant, size: size$1, open, granularity = "day",...rest }, ref) => {
1777
+ const _DatePicker = (0, react.forwardRef)(({ dateUnavailable, disabled, required, readOnly, error, variant, size: size$1, open, granularity = "day", onChange,...rest }, ref) => {
1674
1778
  const props = {
1675
1779
  isDateUnavailable: dateUnavailable,
1676
1780
  isDisabled: disabled,
@@ -1679,6 +1783,7 @@ const _DatePicker = react.default.forwardRef(({ dateUnavailable, disabled, requi
1679
1783
  isInvalid: error,
1680
1784
  isOpen: open,
1681
1785
  granularity,
1786
+ onChange,
1682
1787
  ...rest
1683
1788
  };
1684
1789
  const classNames$2 = (0, __marigold_system.useClassNames)({
@@ -1692,15 +1797,29 @@ const _DatePicker = react.default.forwardRef(({ dateUnavailable, disabled, requi
1692
1797
  size: size$1,
1693
1798
  ...props,
1694
1799
  ref,
1695
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_DateInput, { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
1696
- className: classNames$2,
1697
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Calendar, {
1698
- size: "16",
1699
- "data-testid": "action"
1800
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DatePickerWithPasteWrapper, {
1801
+ onChange,
1802
+ action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconButton, {
1803
+ className: classNames$2,
1804
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Calendar, {
1805
+ size: "16",
1806
+ "data-testid": "action"
1807
+ })
1700
1808
  })
1701
- }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Popover, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Calendar, { disabled }) }) })]
1809
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Popover, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Dialog, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_Calendar, { disabled }) }) })]
1702
1810
  });
1703
1811
  });
1812
+ const DatePickerWithPasteWrapper = ({ onChange,...props }) => {
1813
+ const ctx = (0, react.useContext)(react_aria_components.DatePickerStateContext);
1814
+ const onPaste = (date) => {
1815
+ if (onChange) onChange(date);
1816
+ ctx?.setValue(date);
1817
+ };
1818
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_DateInput, {
1819
+ onPaste,
1820
+ ...props
1821
+ });
1822
+ };
1704
1823
 
1705
1824
  //#endregion
1706
1825
  //#region src/Overlay/Modal.tsx
@@ -2181,6 +2300,147 @@ Drawer.Title = DrawerTitle;
2181
2300
  Drawer.Content = DrawerContent;
2182
2301
  Drawer.Actions = DrawerActions;
2183
2302
 
2303
+ //#endregion
2304
+ //#region src/FileField/FileFieldItem.tsx
2305
+ const FileFieldItem = ({ children, onRemove }) => {
2306
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2307
+ className: "bg-background border-input flex items-center justify-between gap-2 rounded-lg border p-2 pe-3",
2308
+ children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CloseButton, {
2309
+ "aria-label": "Remove file",
2310
+ onPress: onRemove
2311
+ })]
2312
+ });
2313
+ };
2314
+
2315
+ //#endregion
2316
+ //#region src/icons/Upload.tsx
2317
+ const Upload = ({ size: size$1 = 24, className,...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
2318
+ xmlns: "http://www.w3.org/2000/svg",
2319
+ width: size$1,
2320
+ height: size$1,
2321
+ viewBox: "0 0 24 24",
2322
+ fill: "none",
2323
+ stroke: "currentColor",
2324
+ strokeWidth: 2,
2325
+ strokeLinecap: "round",
2326
+ strokeLinejoin: "round",
2327
+ className: (0, __marigold_system.cn)("shrink-0", className),
2328
+ ...props,
2329
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12 13v8M4 14.899A7 7 0 1115.71 8h1.79a4.5 4.5 0 012.5 8.242" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M8 17l4-4 4 4" })]
2330
+ });
2331
+
2332
+ //#endregion
2333
+ //#region src/FileField/FileTrigger.tsx
2334
+ const _FileTrigger = ({ label, disabled,...rest }) => {
2335
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.FileTrigger, {
2336
+ ...rest,
2337
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_Button, {
2338
+ disabled,
2339
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Upload, {}), label]
2340
+ })
2341
+ });
2342
+ };
2343
+
2344
+ //#endregion
2345
+ //#region src/FileField/fileUtils.ts
2346
+ const filterAcceptedFiles = (files, acceptedFileTypes) => {
2347
+ if (!acceptedFileTypes || acceptedFileTypes.length === 0) return files;
2348
+ if (acceptedFileTypes.some((token$1) => tokenAllowsAll(token$1.trim().toLowerCase()))) return files;
2349
+ return files.filter((file) => acceptedFileTypes.some((token$1) => matchesAcceptedToken(file, token$1)));
2350
+ };
2351
+ const isFileDropItem = (item) => item && typeof item === "object" && item.kind === "file" && typeof item.getFile === "function";
2352
+ const tokenAllowsAll = (token$1) => token$1 === "*" || token$1 === "*/*";
2353
+ const toLower = (s) => s.toLowerCase();
2354
+ const matchesAcceptedToken = (file, token$1) => {
2355
+ const t$1 = toLower(token$1.trim());
2356
+ if (!t$1) return false;
2357
+ if (tokenAllowsAll(t$1)) return true;
2358
+ const fileType = toLower(file.type || "");
2359
+ const fileName = toLower(file.name || "");
2360
+ if (!t$1.includes("/") && !t$1.startsWith(".")) {
2361
+ const ext = `.${t$1}`;
2362
+ return fileName.endsWith(ext);
2363
+ }
2364
+ if (t$1.startsWith(".")) return fileName.endsWith(t$1);
2365
+ if (t$1.endsWith("/*")) {
2366
+ const prefix$1 = t$1.slice(0, t$1.length - 1);
2367
+ return fileType.startsWith(prefix$1);
2368
+ }
2369
+ return fileType === t$1;
2370
+ };
2371
+ const normalizeAndLimitFiles = (files, { accept, multiple }) => {
2372
+ const accepted = filterAcceptedFiles(files, accept);
2373
+ return multiple ? accepted : accepted.slice(0, 1);
2374
+ };
2375
+
2376
+ //#endregion
2377
+ //#region src/FileField/FileField.tsx
2378
+ const FileField = ({ disabled = false, accept = ["*"], multiple = false, width, label,...props }) => {
2379
+ const [files, setFiles] = (0, react.useState)(null);
2380
+ const stringFormatter = (0, __react_aria_i18n.useLocalizedStringFormatter)(intlMessages);
2381
+ const dropZoneLabel = stringFormatter.format("dropZoneLabel");
2382
+ const buttonLabel = stringFormatter.format("uploadLabel");
2383
+ const handleSelect = (files$1) => {
2384
+ setFiles(normalizeAndLimitFiles(files$1 ? Array.from(files$1) : [], {
2385
+ accept,
2386
+ multiple
2387
+ }));
2388
+ };
2389
+ const handleDrop = async (e$1) => {
2390
+ try {
2391
+ const filePromises = e$1.items.filter(isFileDropItem).map((item) => item.getFile());
2392
+ setFiles(normalizeAndLimitFiles((await Promise.all(filePromises)).filter(Boolean), {
2393
+ accept,
2394
+ multiple
2395
+ }));
2396
+ } catch {}
2397
+ };
2398
+ const fileTriggerProps = {
2399
+ acceptedFileTypes: accept,
2400
+ allowsMultiple: multiple,
2401
+ onSelect: handleSelect
2402
+ };
2403
+ const classNames$2 = (0, __marigold_system.useClassNames)({ component: "FileField" });
2404
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(FieldBase, {
2405
+ as: "div",
2406
+ width,
2407
+ label,
2408
+ className: classNames$2.container,
2409
+ ...props,
2410
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.DropZone, {
2411
+ onDrop: handleDrop,
2412
+ isDisabled: disabled,
2413
+ className: classNames$2.dropZone,
2414
+ "data-testid": "dropzone",
2415
+ ...props,
2416
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2417
+ className: classNames$2.dropZoneContent,
2418
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2419
+ className: classNames$2.dropZoneLabel,
2420
+ children: dropZoneLabel
2421
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_FileTrigger, {
2422
+ ...fileTriggerProps,
2423
+ label: buttonLabel,
2424
+ disabled
2425
+ })]
2426
+ })
2427
+ }), files?.map((file, index$1) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FileField.Item, {
2428
+ onRemove: () => setFiles((prev$1) => (prev$1 ?? []).filter((_, i$1) => i$1 !== index$1)),
2429
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
2430
+ className: classNames$2.item,
2431
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
2432
+ className: classNames$2.itemLabel,
2433
+ children: file.name
2434
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
2435
+ className: classNames$2.itemDescription,
2436
+ children: [(file.size / 1024 / 1024).toFixed(2), " MB"]
2437
+ })]
2438
+ })
2439
+ }, index$1))]
2440
+ });
2441
+ };
2442
+ FileField.Item = FileFieldItem;
2443
+
2184
2444
  //#endregion
2185
2445
  //#region src/Form/Form.tsx
2186
2446
  const _Form = ({ unstyled, maxWidth = "full",...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Form, {
@@ -4265,9 +4525,9 @@ var jsx = function jsx$1(type, props) {
4265
4525
  for (var i$1 = 2; i$1 < argsLength; i$1++) createElementArgArray[i$1] = args[i$1];
4266
4526
  return react.createElement.apply(null, createElementArgArray);
4267
4527
  };
4268
- (function(_jsx$152) {
4528
+ (function(_jsx$156) {
4269
4529
  var JSX;
4270
- (function(_JSX) {})(JSX || (JSX = _jsx$152.JSX || (_jsx$152.JSX = {})));
4530
+ (function(_JSX) {})(JSX || (JSX = _jsx$156.JSX || (_jsx$156.JSX = {})));
4271
4531
  })(jsx || (jsx = {}));
4272
4532
  function css$2() {
4273
4533
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
@@ -8362,7 +8622,8 @@ const _NumberField = (0, react.forwardRef)(({ variant, size: size$1, disabled, r
8362
8622
  }),
8363
8623
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
8364
8624
  ref,
8365
- className: (0, __marigold_system.cn)("h-full flex-1 outline-none", classNames$2.input)
8625
+ className: (0, __marigold_system.cn)("h-full flex-1 outline-none", classNames$2.input),
8626
+ onFocus: (e$1) => e$1.currentTarget.select()
8366
8627
  }),
8367
8628
  showStepper && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_StepButton, {
8368
8629
  className: classNames$2.stepper,
@@ -8832,7 +9093,7 @@ const SelectBase = (0, react.forwardRef)(function Select$2({ disabled, required,
8832
9093
  ...props,
8833
9094
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(IconButton, {
8834
9095
  className: (0, __marigold_system.cn)("flex w-full items-center justify-between gap-1 overflow-hidden", classNames$2.select),
8835
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SelectValue, { className: "truncate text-nowrap [&>[slot=description]]:hidden" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronsVertical, {
9096
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.SelectValue, { className: "truncate text-nowrap [&_[slot=description]]:hidden" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChevronsVertical, {
8836
9097
  size: "16",
8837
9098
  className: classNames$2.icon
8838
9099
  })]
@@ -9719,11 +9980,157 @@ const _Tooltip = ({ children, variant, size: size$1, open,...rest }) => {
9719
9980
  _Tooltip.Trigger = _TooltipTrigger;
9720
9981
 
9721
9982
  //#endregion
9722
- //#region src/XLoader/BaseLoader.tsx
9723
- const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel,...props }) => {
9983
+ //#region src/Loader/BaseLoader.tsx
9984
+ const XLoaderSvg = ({ className }) => {
9985
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
9986
+ xmlns: "http://www.w3.org/2000/svg",
9987
+ viewBox: "0 0 150 150",
9988
+ fill: "currentColor",
9989
+ className,
9990
+ children: [
9991
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9992
+ id: "XMLID_1_",
9993
+ d: "M35.3 27h26.5l54 74.1H88.7z"
9994
+ }),
9995
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9996
+ id: "XMLID_5_",
9997
+ 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",
9998
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9999
+ attributeName: "opacity",
10000
+ attributeType: "XML",
10001
+ values: "1; .01; 1; 1; 1;",
10002
+ begin: "1.0s",
10003
+ dur: "2.5s",
10004
+ repeatCount: "indefinite"
10005
+ })
10006
+ }),
10007
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10008
+ id: "XMLID_18_",
10009
+ 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",
10010
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10011
+ attributeName: "opacity",
10012
+ attributeType: "XML",
10013
+ values: "1; .01; 1; 1; 1;",
10014
+ begin: "0.9s",
10015
+ dur: "2.5s",
10016
+ repeatCount: "indefinite"
10017
+ })
10018
+ }),
10019
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10020
+ id: "XMLID_19_",
10021
+ 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",
10022
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10023
+ attributeName: "opacity",
10024
+ attributeType: "XML",
10025
+ values: "1; .01; 1; 1; 1;",
10026
+ begin: "0.8s",
10027
+ dur: "2.5s",
10028
+ repeatCount: "indefinite"
10029
+ })
10030
+ }),
10031
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10032
+ id: "XMLID_20_",
10033
+ 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",
10034
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10035
+ attributeName: "opacity",
10036
+ attributeType: "XML",
10037
+ values: "1; .01; 1; 1; 1;",
10038
+ begin: "0.7s",
10039
+ dur: "2.5s",
10040
+ repeatCount: "indefinite"
10041
+ })
10042
+ }),
10043
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10044
+ id: "XMLID_21_",
10045
+ 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",
10046
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10047
+ attributeName: "opacity",
10048
+ attributeType: "XML",
10049
+ values: "1; .01; 1; 1; 1;",
10050
+ begin: "0.6s",
10051
+ dur: "2.5s",
10052
+ repeatCount: "indefinite"
10053
+ })
10054
+ }),
10055
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10056
+ id: "XMLID_22_",
10057
+ 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",
10058
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10059
+ attributeName: "opacity",
10060
+ attributeType: "XML",
10061
+ values: "1; .01; 1; 1; 1;",
10062
+ begin: "0.5s",
10063
+ dur: "2.5s",
10064
+ repeatCount: "indefinite"
10065
+ })
10066
+ }),
10067
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10068
+ id: "XMLID_23_",
10069
+ 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",
10070
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10071
+ attributeName: "opacity",
10072
+ attributeType: "XML",
10073
+ values: "1; .01; 1; 1; 1;",
10074
+ begin: "0.4s",
10075
+ dur: "2.5s",
10076
+ repeatCount: "indefinite"
10077
+ })
10078
+ }),
10079
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10080
+ id: "XMLID_24_",
10081
+ 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",
10082
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10083
+ attributeName: "opacity",
10084
+ attributeType: "XML",
10085
+ values: "1; .01; 1; 1; 1;",
10086
+ begin: "0.3s",
10087
+ dur: "2.5s",
10088
+ repeatCount: "indefinite"
10089
+ })
10090
+ }),
10091
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10092
+ id: "XMLID_25_",
10093
+ 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",
10094
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10095
+ attributeName: "opacity",
10096
+ attributeType: "XML",
10097
+ values: "1; .01; 1; 1; 1;",
10098
+ begin: "0.2s",
10099
+ dur: "2.5s",
10100
+ repeatCount: "indefinite"
10101
+ })
10102
+ }),
10103
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10104
+ id: "XMLID_26_",
10105
+ 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",
10106
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10107
+ attributeName: "opacity",
10108
+ attributeType: "XML",
10109
+ values: "1; .01; 1; 1; 1;",
10110
+ begin: "0.1s",
10111
+ dur: "2.5s",
10112
+ repeatCount: "indefinite"
10113
+ })
10114
+ }),
10115
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
10116
+ id: "XMLID_27_",
10117
+ 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",
10118
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
10119
+ attributeName: "opacity",
10120
+ attributeType: "XML",
10121
+ values: "1; .01; 1; 1; 1;",
10122
+ begin: "0.0s",
10123
+ dur: "2.5s",
10124
+ repeatCount: "indefinite"
10125
+ })
10126
+ })
10127
+ ]
10128
+ });
10129
+ };
10130
+ const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel, loaderType = "circle",...props }) => {
9724
10131
  const stringFormatter = (0, __react_aria_i18n.useLocalizedStringFormatter)(intlMessages, "marigold");
9725
10132
  const className = (0, __marigold_system.useClassNames)({
9726
- component: "XLoader",
10133
+ component: "Loader",
9727
10134
  variant,
9728
10135
  size: size$1
9729
10136
  });
@@ -9732,149 +10139,9 @@ const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel,.
9732
10139
  isIndeterminate: true,
9733
10140
  "aria-label": ariaLabel || children ? ariaLabel : stringFormatter.format("loadingMessage"),
9734
10141
  ...props,
9735
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
9736
- xmlns: "http://www.w3.org/2000/svg",
9737
- viewBox: "0 0 150 150",
9738
- fill: "currentColor",
9739
- className: className.loader,
9740
- children: [
9741
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9742
- id: "XMLID_1_",
9743
- d: "M35.3 27h26.5l54 74.1H88.7z"
9744
- }),
9745
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9746
- id: "XMLID_5_",
9747
- 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",
9748
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9749
- attributeName: "opacity",
9750
- attributeType: "XML",
9751
- values: "1; .01; 1; 1; 1;",
9752
- begin: "1.0s",
9753
- dur: "2.5s",
9754
- repeatCount: "indefinite"
9755
- })
9756
- }),
9757
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9758
- id: "XMLID_18_",
9759
- 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",
9760
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9761
- attributeName: "opacity",
9762
- attributeType: "XML",
9763
- values: "1; .01; 1; 1; 1;",
9764
- begin: "0.9s",
9765
- dur: "2.5s",
9766
- repeatCount: "indefinite"
9767
- })
9768
- }),
9769
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9770
- id: "XMLID_19_",
9771
- 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",
9772
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9773
- attributeName: "opacity",
9774
- attributeType: "XML",
9775
- values: "1; .01; 1; 1; 1;",
9776
- begin: "0.8s",
9777
- dur: "2.5s",
9778
- repeatCount: "indefinite"
9779
- })
9780
- }),
9781
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9782
- id: "XMLID_20_",
9783
- 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",
9784
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9785
- attributeName: "opacity",
9786
- attributeType: "XML",
9787
- values: "1; .01; 1; 1; 1;",
9788
- begin: "0.7s",
9789
- dur: "2.5s",
9790
- repeatCount: "indefinite"
9791
- })
9792
- }),
9793
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9794
- id: "XMLID_21_",
9795
- 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",
9796
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9797
- attributeName: "opacity",
9798
- attributeType: "XML",
9799
- values: "1; .01; 1; 1; 1;",
9800
- begin: "0.6s",
9801
- dur: "2.5s",
9802
- repeatCount: "indefinite"
9803
- })
9804
- }),
9805
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9806
- id: "XMLID_22_",
9807
- 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",
9808
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9809
- attributeName: "opacity",
9810
- attributeType: "XML",
9811
- values: "1; .01; 1; 1; 1;",
9812
- begin: "0.5s",
9813
- dur: "2.5s",
9814
- repeatCount: "indefinite"
9815
- })
9816
- }),
9817
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9818
- id: "XMLID_23_",
9819
- 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",
9820
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9821
- attributeName: "opacity",
9822
- attributeType: "XML",
9823
- values: "1; .01; 1; 1; 1;",
9824
- begin: "0.4s",
9825
- dur: "2.5s",
9826
- repeatCount: "indefinite"
9827
- })
9828
- }),
9829
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9830
- id: "XMLID_24_",
9831
- 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",
9832
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9833
- attributeName: "opacity",
9834
- attributeType: "XML",
9835
- values: "1; .01; 1; 1; 1;",
9836
- begin: "0.3s",
9837
- dur: "2.5s",
9838
- repeatCount: "indefinite"
9839
- })
9840
- }),
9841
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9842
- id: "XMLID_25_",
9843
- 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",
9844
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9845
- attributeName: "opacity",
9846
- attributeType: "XML",
9847
- values: "1; .01; 1; 1; 1;",
9848
- begin: "0.2s",
9849
- dur: "2.5s",
9850
- repeatCount: "indefinite"
9851
- })
9852
- }),
9853
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9854
- id: "XMLID_26_",
9855
- 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",
9856
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9857
- attributeName: "opacity",
9858
- attributeType: "XML",
9859
- values: "1; .01; 1; 1; 1;",
9860
- begin: "0.1s",
9861
- dur: "2.5s",
9862
- repeatCount: "indefinite"
9863
- })
9864
- }),
9865
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
9866
- id: "XMLID_27_",
9867
- 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",
9868
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("animate", {
9869
- attributeName: "opacity",
9870
- attributeType: "XML",
9871
- values: "1; .01; 1; 1; 1;",
9872
- begin: "0.0s",
9873
- dur: "2.5s",
9874
- repeatCount: "indefinite"
9875
- })
9876
- })
9877
- ]
10142
+ children: [loaderType === "xloader" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(XLoaderSvg, { className: className.loader }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressCircleSvg, {
10143
+ variant,
10144
+ size: size$1
9878
10145
  }), children ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Label, {
9879
10146
  className: className.label,
9880
10147
  children
@@ -9883,7 +10150,7 @@ const BaseLoader = ({ variant, size: size$1, children, "aria-label": ariaLabel,.
9883
10150
  };
9884
10151
 
9885
10152
  //#endregion
9886
- //#region src/XLoader/XLoader.tsx
10153
+ //#region src/Loader/Loader.tsx
9887
10154
  const LoaderFullScreen = (props) => {
9888
10155
  const id = (0, __react_aria_utils.useId)();
9889
10156
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Underlay, {
@@ -9913,7 +10180,7 @@ const LoaderSection = (props) => {
9913
10180
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseLoader, { ...props })
9914
10181
  });
9915
10182
  };
9916
- const XLoader = ({ mode, variant,...props }) => mode === "fullscreen" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoaderFullScreen, {
10183
+ const Loader = ({ mode, variant,...props }) => mode === "fullscreen" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoaderFullScreen, {
9917
10184
  variant: variant ?? "inverted",
9918
10185
  ...props
9919
10186
  }) : mode === "section" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LoaderSection, {
@@ -9977,6 +10244,7 @@ exports.Dialog = _Dialog;
9977
10244
  exports.Divider = _Divider;
9978
10245
  exports.Drawer = Drawer;
9979
10246
  exports.FieldBase = FieldBase;
10247
+ exports.FileField = FileField;
9980
10248
  exports.Form = _Form;
9981
10249
  exports.Grid = Grid;
9982
10250
  exports.Headline = _Headline;
@@ -9997,6 +10265,7 @@ exports.LinkButton = _LinkButton;
9997
10265
  exports.List = List;
9998
10266
  exports.ListBox = _ListBox;
9999
10267
  exports.ListBoxItem = _ListBoxItem;
10268
+ exports.Loader = Loader;
10000
10269
  exports.MarigoldProvider = MarigoldProvider;
10001
10270
  exports.Menu = _Menu;
10002
10271
  exports.Modal = _Modal;
@@ -10012,7 +10281,8 @@ Object.defineProperty(exports, 'NumericFormat', {
10012
10281
  exports.OverlayContainerProvider = OverlayContainerProvider;
10013
10282
  exports.Pagination = _Pagination;
10014
10283
  exports.Popover = _Popover;
10015
- exports.ProgressCycle = ProgressCycle;
10284
+ exports.ProgressCircle = ProgressCircle;
10285
+ exports.ProgressCircleSvg = ProgressCircleSvg;
10016
10286
  exports.Radio = _Radio;
10017
10287
  exports.RadioGroup = _RadioGroup;
10018
10288
  Object.defineProperty(exports, 'RouterProvider', {
@@ -10057,7 +10327,6 @@ Object.defineProperty(exports, 'VisuallyHidden', {
10057
10327
  return __react_aria_visually_hidden.VisuallyHidden;
10058
10328
  }
10059
10329
  });
10060
- exports.XLoader = XLoader;
10061
10330
  exports.parseFormData = parseFormData;
10062
10331
  Object.defineProperty(exports, 'useAsyncList', {
10063
10332
  enumerable: true,