@marigold/components 15.0.2 → 15.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.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Orientation, RefObject, AriaLabelingProps as AriaLabelingProps$1 } from '@react-types/shared';
2
2
  export { Selection } from '@react-types/shared';
3
3
  export { useAsyncList, useListData } from '@react-stately/data';
4
- import { GapSpaceProp, AspectProp, WidthProp, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, PlaceItemsProp, MaxWidthProp, HeightProp, alignment, TextAlignProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp } from '@marigold/system';
4
+ import { GapSpaceProp, AspectProp, WidthProp, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, PlaceItemsProp, MaxWidthProp, HeightProp, alignment, TextAlignProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp, TextWrapProp } from '@marigold/system';
5
5
  export { DateFormat, NumericFormat, ThemeProvider, useTheme } from '@marigold/system';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import RAC, { ValidationResult, Key, DialogProps as DialogProps$1, DateValue, SlotProps, UNSTABLE_ToastQueue, TagListProps, ProgressBarProps, TimeValue, BreadcrumbsProps as BreadcrumbsProps$1 } from 'react-aria-components';
@@ -454,6 +454,10 @@ interface CheckboxProps extends Omit<RAC.CheckboxProps, RemovedProps$s> {
454
454
  *
455
455
  */
456
456
  label?: ReactNode;
457
+ /**
458
+ * A helpful text.
459
+ */
460
+ description?: ReactNode;
457
461
  }
458
462
  interface CheckboxComponent extends ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLLabelElement>> {
459
463
  /**
@@ -1799,7 +1803,7 @@ interface Table {
1799
1803
  }
1800
1804
 
1801
1805
  type RemovedProps$a = 'elementType' | keyof JSX.IntrinsicElements['div'] | keyof JSX.IntrinsicElements['span'] | keyof JSX.IntrinsicElements['p'];
1802
- interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$a>, TextAlignProp, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp {
1806
+ interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$a>, TextAlignProp, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp, TextWrapProp {
1803
1807
  /**
1804
1808
  * The children of the component
1805
1809
  */
@@ -1821,7 +1825,7 @@ interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$
1821
1825
  variant?: 'default' | 'muted' | (string & {});
1822
1826
  size?: 'default' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | (string & {});
1823
1827
  }
1824
- declare const _Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, children, as, ...props }: TextProps) => react_jsx_runtime.JSX.Element;
1828
+ declare const _Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, wrap, children, as, ...props }: TextProps) => react_jsx_runtime.JSX.Element;
1825
1829
 
1826
1830
  type RemovedProps$9 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
1827
1831
  interface TextAreaProps extends Omit<RAC.TextFieldProps, RemovedProps$9>, Pick<RAC.TextAreaProps, 'rows'>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Orientation, RefObject, AriaLabelingProps as AriaLabelingProps$1 } from '@react-types/shared';
2
2
  export { Selection } from '@react-types/shared';
3
3
  export { useAsyncList, useListData } from '@react-stately/data';
4
- import { GapSpaceProp, AspectProp, WidthProp, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, PlaceItemsProp, MaxWidthProp, HeightProp, alignment, TextAlignProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp } from '@marigold/system';
4
+ import { GapSpaceProp, AspectProp, WidthProp, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, PlaceItemsProp, MaxWidthProp, HeightProp, alignment, TextAlignProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp, TextWrapProp } from '@marigold/system';
5
5
  export { DateFormat, NumericFormat, ThemeProvider, useTheme } from '@marigold/system';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
7
  import RAC, { ValidationResult, Key, DialogProps as DialogProps$1, DateValue, SlotProps, UNSTABLE_ToastQueue, TagListProps, ProgressBarProps, TimeValue, BreadcrumbsProps as BreadcrumbsProps$1 } from 'react-aria-components';
@@ -454,6 +454,10 @@ interface CheckboxProps extends Omit<RAC.CheckboxProps, RemovedProps$s> {
454
454
  *
455
455
  */
456
456
  label?: ReactNode;
457
+ /**
458
+ * A helpful text.
459
+ */
460
+ description?: ReactNode;
457
461
  }
458
462
  interface CheckboxComponent extends ForwardRefExoticComponent<CheckboxProps & RefAttributes<HTMLLabelElement>> {
459
463
  /**
@@ -1799,7 +1803,7 @@ interface Table {
1799
1803
  }
1800
1804
 
1801
1805
  type RemovedProps$a = 'elementType' | keyof JSX.IntrinsicElements['div'] | keyof JSX.IntrinsicElements['span'] | keyof JSX.IntrinsicElements['p'];
1802
- interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$a>, TextAlignProp, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp {
1806
+ interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$a>, TextAlignProp, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp, TextWrapProp {
1803
1807
  /**
1804
1808
  * The children of the component
1805
1809
  */
@@ -1821,7 +1825,7 @@ interface TextProps extends AriaLabelingProps, Omit<RAC.TextProps, RemovedProps$
1821
1825
  variant?: 'default' | 'muted' | (string & {});
1822
1826
  size?: 'default' | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl' | (string & {});
1823
1827
  }
1824
- declare const _Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, children, as, ...props }: TextProps) => react_jsx_runtime.JSX.Element;
1828
+ declare const _Text: ({ variant, size, color, align, cursor, weight, fontSize, fontStyle, wrap, children, as, ...props }: TextProps) => react_jsx_runtime.JSX.Element;
1825
1829
 
1826
1830
  type RemovedProps$9 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
1827
1831
  interface TextAreaProps extends Omit<RAC.TextFieldProps, RemovedProps$9>, Pick<RAC.TextAreaProps, 'rows'>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
package/dist/index.js CHANGED
@@ -1923,6 +1923,7 @@ var Card = ({
1923
1923
  // src/Checkbox/Checkbox.tsx
1924
1924
  var import_react24 = require("react");
1925
1925
  var import_react_aria_components23 = require("react-aria-components");
1926
+ var import_utils = require("@react-aria/utils");
1926
1927
  var import_system32 = require("@marigold/system");
1927
1928
 
1928
1929
  // src/Checkbox/CheckboxGroup.tsx
@@ -2119,6 +2120,29 @@ var _CheckboxGroup = ({
2119
2120
 
2120
2121
  // src/Checkbox/Checkbox.tsx
2121
2122
  var import_jsx_runtime37 = require("react/jsx-runtime");
2123
+ var Field = ({
2124
+ description,
2125
+ children
2126
+ }) => {
2127
+ const className = (0, import_system32.useClassNames)({
2128
+ component: "Field"
2129
+ });
2130
+ const descriptionId = (0, import_utils.useId)();
2131
+ if (!description) return children;
2132
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
2133
+ import_react_aria_components23.Provider,
2134
+ {
2135
+ values: [
2136
+ [import_react_aria_components23.CheckboxContext, { "aria-describedby": descriptionId }],
2137
+ [import_react_aria_components23.TextContext, { id: descriptionId }]
2138
+ ],
2139
+ children: [
2140
+ children,
2141
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(HelpText, { description })
2142
+ ]
2143
+ }
2144
+ ) });
2145
+ };
2122
2146
  var CheckMark2 = () => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { width: "12px", height: "10px", viewBox: "0 0 12 10", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2123
2147
  "path",
2124
2148
  {
@@ -2164,6 +2188,7 @@ var _Checkbox = (0, import_react24.forwardRef)(
2164
2188
  variant,
2165
2189
  size: size2,
2166
2190
  label,
2191
+ description,
2167
2192
  ...rest
2168
2193
  }, ref) => {
2169
2194
  const props = {
@@ -2182,12 +2207,12 @@ var _Checkbox = (0, import_react24.forwardRef)(
2182
2207
  variant: variant || (group == null ? void 0 : group.variant),
2183
2208
  size: size2 || (group == null ? void 0 : group.size)
2184
2209
  });
2185
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2210
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Field, { description, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2186
2211
  import_react_aria_components23.Checkbox,
2187
2212
  {
2188
2213
  ref,
2189
2214
  className: (0, import_system32.cn)(
2190
- "group/checkbox flex items-center gap-[0.5rem]",
2215
+ "group/checkbox flex items-center",
2191
2216
  "cursor-pointer data-disabled:cursor-not-allowed",
2192
2217
  classNames3.container
2193
2218
  ),
@@ -2204,7 +2229,7 @@ var _Checkbox = (0, import_react24.forwardRef)(
2204
2229
  label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: classNames3.label, children: label })
2205
2230
  ] })
2206
2231
  }
2207
- );
2232
+ ) });
2208
2233
  }
2209
2234
  );
2210
2235
  _Checkbox.Group = _CheckboxGroup;
@@ -2498,7 +2523,7 @@ var import_react_stately = require("react-stately");
2498
2523
  var import_focus = require("@react-aria/focus");
2499
2524
  var import_overlays2 = require("@react-aria/overlays");
2500
2525
  var import_ssr = require("@react-aria/ssr");
2501
- var import_utils = require("@react-aria/utils");
2526
+ var import_utils2 = require("@react-aria/utils");
2502
2527
 
2503
2528
  // src/utils/useRenderProps.tsx
2504
2529
  var import_react29 = require("react");
@@ -2573,7 +2598,7 @@ var import_jsx_runtime45 = require("react/jsx-runtime");
2573
2598
  var NonModalInner = ({ state, isExiting, ...props }) => {
2574
2599
  const { nonModalProps } = useNonModal(props, state);
2575
2600
  const ref = props.nonModalRef;
2576
- const isEntering = (0, import_utils.useEnterAnimation)(ref) || props.isEntering || false;
2601
+ const isEntering = (0, import_utils2.useEnterAnimation)(ref) || props.isEntering || false;
2577
2602
  const renderProps = useRenderProps({
2578
2603
  ...props,
2579
2604
  defaultClassName: "react-aria-NonModalOverlay",
@@ -2583,7 +2608,7 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
2583
2608
  state
2584
2609
  }
2585
2610
  });
2586
- const viewport = (0, import_utils.useViewportSize)();
2611
+ const viewport = (0, import_utils2.useViewportSize)();
2587
2612
  const style = {
2588
2613
  ...renderProps.style,
2589
2614
  "--visual-viewport-height": viewport.height + "px"
@@ -2591,7 +2616,7 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
2591
2616
  const overlay = /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
2592
2617
  "div",
2593
2618
  {
2594
- ...(0, import_utils.mergeProps)((0, import_utils.filterDOMProps)(props), nonModalProps),
2619
+ ...(0, import_utils2.mergeProps)((0, import_utils2.filterDOMProps)(props), nonModalProps),
2595
2620
  ...renderProps,
2596
2621
  tabIndex: -1,
2597
2622
  "aria-label": props["aria-label"],
@@ -2615,11 +2640,11 @@ var NonModal = (0, import_react30.forwardRef)(
2615
2640
  isOpen: open,
2616
2641
  ...rest
2617
2642
  };
2618
- ref = (0, import_utils.useObjectRef)(ref);
2643
+ ref = (0, import_utils2.useObjectRef)(ref);
2619
2644
  const contextState = (0, import_react30.useContext)(import_react_aria_components28.OverlayTriggerStateContext);
2620
2645
  const localState = (0, import_react_stately.useOverlayTriggerState)(props);
2621
2646
  const state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
2622
- const isExiting = (0, import_utils.useExitAnimation)(ref, state.isOpen) || props.isExiting || false;
2647
+ const isExiting = (0, import_utils2.useExitAnimation)(ref, state.isOpen) || props.isExiting || false;
2623
2648
  const isSSR = (0, import_ssr.useIsSSR)();
2624
2649
  if (state && !state.isOpen && !isExiting || isSSR) {
2625
2650
  return null;
@@ -9323,7 +9348,7 @@ var StateManagedSelect$1 = StateManagedSelect;
9323
9348
 
9324
9349
  // src/Multiselect/Multiselect.tsx
9325
9350
  var import_label = require("@react-aria/label");
9326
- var import_utils6 = require("@react-aria/utils");
9351
+ var import_utils7 = require("@react-aria/utils");
9327
9352
  var import_system72 = require("@marigold/system");
9328
9353
  var import_jsx_runtime86 = require("react/jsx-runtime");
9329
9354
  var propsToBeRemoved = [
@@ -9481,7 +9506,7 @@ var Multiselect = ({
9481
9506
  inputId: fieldProps.id,
9482
9507
  "aria-invalid": error,
9483
9508
  isClearable: false,
9484
- instanceId: (0, import_utils6.useId)(),
9509
+ instanceId: (0, import_utils7.useId)(),
9485
9510
  isSearchable: !readOnly,
9486
9511
  isMulti: true,
9487
9512
  closeMenuOnSelect: false,
@@ -10387,24 +10412,25 @@ var TableBody = ({
10387
10412
  const { rowGroupProps } = (0, import_table.useTableRowGroup)();
10388
10413
  const { state, classNames: classNames3 } = useTableContext();
10389
10414
  if (state.collection.size === 0 && emptyState) {
10390
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tbody", { className, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
10415
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tbody", { className, "data-rac": true, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", "data-rac": true, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
10391
10416
  "td",
10392
10417
  {
10393
10418
  className: classNames3 == null ? void 0 : classNames3.cell,
10394
10419
  colSpan: state.collection.columnCount,
10395
10420
  role: "rowheader",
10421
+ "data-rac": true,
10396
10422
  children: emptyState()
10397
10423
  }
10398
10424
  ) }) });
10399
10425
  }
10400
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tbody", { ...rowGroupProps, className, children });
10426
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("tbody", { ...rowGroupProps, className, "data-rac": true, children });
10401
10427
  };
10402
10428
 
10403
10429
  // src/Table/TableCell.tsx
10404
10430
  var import_react71 = require("react");
10405
10431
  var import_focus3 = require("@react-aria/focus");
10406
10432
  var import_table2 = require("@react-aria/table");
10407
- var import_utils7 = require("@react-aria/utils");
10433
+ var import_utils8 = require("@react-aria/utils");
10408
10434
  var import_system90 = require("@marigold/system");
10409
10435
  var import_jsx_runtime108 = require("react/jsx-runtime");
10410
10436
  var TableCell = ({
@@ -10438,10 +10464,11 @@ var TableCell = ({
10438
10464
  {
10439
10465
  ref,
10440
10466
  className: classNames3 == null ? void 0 : classNames3.cell,
10441
- ...(0, import_utils7.mergeProps)(cellProps, focusProps),
10467
+ ...(0, import_utils8.mergeProps)(cellProps, focusProps),
10442
10468
  ...stateProps,
10443
10469
  align,
10444
10470
  valign: alignY,
10471
+ "data-rac": true,
10445
10472
  children: cell.rendered
10446
10473
  }
10447
10474
  );
@@ -10451,7 +10478,7 @@ var TableCell = ({
10451
10478
  var import_react72 = require("react");
10452
10479
  var import_focus4 = require("@react-aria/focus");
10453
10480
  var import_table3 = require("@react-aria/table");
10454
- var import_utils8 = require("@react-aria/utils");
10481
+ var import_utils9 = require("@react-aria/utils");
10455
10482
  var import_system91 = require("@marigold/system");
10456
10483
 
10457
10484
  // src/Table/utils.ts
@@ -10500,9 +10527,10 @@ var TableCheckboxCell = ({
10500
10527
  {
10501
10528
  ref,
10502
10529
  className: (0, import_system91.cn)("leading-none", classNames3 == null ? void 0 : classNames3.cell),
10503
- ...(0, import_utils8.mergeProps)(gridCellProps, focusProps),
10530
+ ...(0, import_utils9.mergeProps)(gridCellProps, focusProps),
10504
10531
  ...stateProps,
10505
10532
  valign: alignY,
10533
+ "data-rac": true,
10506
10534
  children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(_Checkbox, { ...checkboxProps })
10507
10535
  }
10508
10536
  );
@@ -10513,7 +10541,7 @@ var import_react73 = require("react");
10513
10541
  var import_focus5 = require("@react-aria/focus");
10514
10542
  var import_interactions2 = require("@react-aria/interactions");
10515
10543
  var import_table4 = require("@react-aria/table");
10516
- var import_utils10 = require("@react-aria/utils");
10544
+ var import_utils11 = require("@react-aria/utils");
10517
10545
  var import_system92 = require("@marigold/system");
10518
10546
  var import_jsx_runtime110 = require("react/jsx-runtime");
10519
10547
  var TableColumnHeader = ({
@@ -10543,9 +10571,10 @@ var TableColumnHeader = ({
10543
10571
  colSpan: column2.colspan,
10544
10572
  ref,
10545
10573
  className: (0, import_system92.cn)("cursor-default", import_system92.width[width], classNames3 == null ? void 0 : classNames3.header),
10546
- ...(0, import_utils10.mergeProps)(columnHeaderProps, hoverProps, focusProps),
10574
+ ...(0, import_utils11.mergeProps)(columnHeaderProps, hoverProps, focusProps),
10547
10575
  ...stateProps,
10548
10576
  align,
10577
+ "data-rac": true,
10549
10578
  children: [
10550
10579
  column2.rendered,
10551
10580
  column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SortUp, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SortDown, { className: "inline-block" }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(SortDown, { className: "inline-block" }) }))
@@ -10570,6 +10599,7 @@ var TableHeader = ({ stickyHeader, children }) => {
10570
10599
  // for rui sticky is applied to thead
10571
10600
  stickyHeader ? "sticky [&_th]:sticky [&_th]:top-0" : ""
10572
10601
  ),
10602
+ "data-rac": true,
10573
10603
  children
10574
10604
  }
10575
10605
  );
@@ -10587,7 +10617,7 @@ var TableHeaderRow = ({
10587
10617
  const { state } = useTableContext();
10588
10618
  const ref = (0, import_react74.useRef)(null);
10589
10619
  const { rowProps } = (0, import_table6.useTableHeaderRow)({ node: item }, state, ref);
10590
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("tr", { ...rowProps, className, ref, children });
10620
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("tr", { ...rowProps, className, ref, "data-rac": true, children });
10591
10621
  };
10592
10622
 
10593
10623
  // src/Table/TableRow.tsx
@@ -10595,7 +10625,7 @@ var import_react75 = require("react");
10595
10625
  var import_focus6 = require("@react-aria/focus");
10596
10626
  var import_interactions3 = require("@react-aria/interactions");
10597
10627
  var import_table7 = require("@react-aria/table");
10598
- var import_utils11 = require("@react-aria/utils");
10628
+ var import_utils12 = require("@react-aria/utils");
10599
10629
  var import_system94 = require("@marigold/system");
10600
10630
  var import_jsx_runtime113 = require("react/jsx-runtime");
10601
10631
  var TableRow = ({ children, row }) => {
@@ -10637,8 +10667,9 @@ var TableRow = ({ children, row }) => {
10637
10667
  ],
10638
10668
  classNames3 == null ? void 0 : classNames3.row
10639
10669
  ),
10640
- ...(0, import_utils11.mergeProps)(rowProps, focusProps, hoverProps),
10670
+ ...(0, import_utils12.mergeProps)(rowProps, focusProps, hoverProps),
10641
10671
  ...stateProps,
10672
+ "data-rac": true,
10642
10673
  children
10643
10674
  }
10644
10675
  );
@@ -10649,7 +10680,7 @@ var import_react76 = require("react");
10649
10680
  var import_focus7 = require("@react-aria/focus");
10650
10681
  var import_interactions4 = require("@react-aria/interactions");
10651
10682
  var import_table8 = require("@react-aria/table");
10652
- var import_utils12 = require("@react-aria/utils");
10683
+ var import_utils13 = require("@react-aria/utils");
10653
10684
  var import_system95 = require("@marigold/system");
10654
10685
  var import_jsx_runtime114 = require("react/jsx-runtime");
10655
10686
  var TableSelectAllCell = ({
@@ -10678,9 +10709,10 @@ var TableSelectAllCell = ({
10678
10709
  {
10679
10710
  ref,
10680
10711
  className: (0, import_system95.cn)(import_system95.width[width], ["leading-none"], classNames3 == null ? void 0 : classNames3.header),
10681
- ...(0, import_utils12.mergeProps)(columnHeaderProps, hoverProps, focusProps),
10712
+ ...(0, import_utils13.mergeProps)(columnHeaderProps, hoverProps, focusProps),
10682
10713
  ...stateProps,
10683
10714
  align,
10715
+ "data-rac": true,
10684
10716
  children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(_Checkbox, { ...checkboxProps })
10685
10717
  }
10686
10718
  );
@@ -10725,6 +10757,7 @@ var Table = ({
10725
10757
  "table",
10726
10758
  {
10727
10759
  ref: tableRef,
10760
+ "data-rac": true,
10728
10761
  className: (0, import_system96.cn)(
10729
10762
  "group/table border-collapse",
10730
10763
  /**
@@ -10816,6 +10849,7 @@ var _Text = ({
10816
10849
  weight,
10817
10850
  fontSize,
10818
10851
  fontStyle,
10852
+ wrap,
10819
10853
  children,
10820
10854
  as = "div",
10821
10855
  ...props
@@ -10840,7 +10874,8 @@ var _Text = ({
10840
10874
  align && import_system97.textAlign[align],
10841
10875
  cursor2 && import_system97.cursorStyle[cursor2],
10842
10876
  weight && import_system97.fontWeight[weight],
10843
- fontSize && import_system97.textSize[fontSize]
10877
+ fontSize && import_system97.textSize[fontSize],
10878
+ wrap && import_system97.textWrap[wrap]
10844
10879
  ),
10845
10880
  style: { color: color && (0, import_system97.ensureCssVar)(color, "color") },
10846
10881
  children
@@ -11232,7 +11267,7 @@ var import_visually_hidden = require("@react-aria/visually-hidden");
11232
11267
 
11233
11268
  // src/XLoader/XLoader.tsx
11234
11269
  var import_react_aria_components78 = require("react-aria-components");
11235
- var import_utils14 = require("@react-aria/utils");
11270
+ var import_utils15 = require("@react-aria/utils");
11236
11271
  var import_system106 = require("@marigold/system");
11237
11272
 
11238
11273
  // src/XLoader/BaseLoader.tsx
@@ -11476,7 +11511,7 @@ var BaseLoader = ({
11476
11511
  // src/XLoader/XLoader.tsx
11477
11512
  var import_jsx_runtime129 = require("react/jsx-runtime");
11478
11513
  var LoaderFullScreen = (props) => {
11479
- const id = (0, import_utils14.useId)();
11514
+ const id = (0, import_utils15.useId)();
11480
11515
  return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_react_aria_components78.Modal, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_react_aria_components78.Dialog, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(BaseLoader, { id, ...props }) }) }) });
11481
11516
  };
11482
11517
  var LoaderSection = (props) => {
package/dist/index.mjs CHANGED
@@ -1844,7 +1844,13 @@ var Card = ({
1844
1844
 
1845
1845
  // src/Checkbox/Checkbox.tsx
1846
1846
  import { forwardRef as forwardRef14 } from "react";
1847
- import { Checkbox } from "react-aria-components";
1847
+ import {
1848
+ Checkbox,
1849
+ CheckboxContext,
1850
+ Provider,
1851
+ TextContext
1852
+ } from "react-aria-components";
1853
+ import { useId } from "@react-aria/utils";
1848
1854
  import { cn as cn21, useClassNames as useClassNames20 } from "@marigold/system";
1849
1855
 
1850
1856
  // src/Checkbox/CheckboxGroup.tsx
@@ -2044,6 +2050,29 @@ var _CheckboxGroup = ({
2044
2050
 
2045
2051
  // src/Checkbox/Checkbox.tsx
2046
2052
  import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
2053
+ var Field = ({
2054
+ description,
2055
+ children
2056
+ }) => {
2057
+ const className = useClassNames20({
2058
+ component: "Field"
2059
+ });
2060
+ const descriptionId = useId();
2061
+ if (!description) return children;
2062
+ return /* @__PURE__ */ jsx37("div", { className, children: /* @__PURE__ */ jsxs16(
2063
+ Provider,
2064
+ {
2065
+ values: [
2066
+ [CheckboxContext, { "aria-describedby": descriptionId }],
2067
+ [TextContext, { id: descriptionId }]
2068
+ ],
2069
+ children: [
2070
+ children,
2071
+ /* @__PURE__ */ jsx37(HelpText, { description })
2072
+ ]
2073
+ }
2074
+ ) });
2075
+ };
2047
2076
  var CheckMark2 = () => /* @__PURE__ */ jsx37("svg", { width: "12px", height: "10px", viewBox: "0 0 12 10", children: /* @__PURE__ */ jsx37(
2048
2077
  "path",
2049
2078
  {
@@ -2089,6 +2118,7 @@ var _Checkbox = forwardRef14(
2089
2118
  variant,
2090
2119
  size: size2,
2091
2120
  label,
2121
+ description,
2092
2122
  ...rest
2093
2123
  }, ref) => {
2094
2124
  const props = {
@@ -2107,12 +2137,12 @@ var _Checkbox = forwardRef14(
2107
2137
  variant: variant || (group == null ? void 0 : group.variant),
2108
2138
  size: size2 || (group == null ? void 0 : group.size)
2109
2139
  });
2110
- return /* @__PURE__ */ jsx37(
2140
+ return /* @__PURE__ */ jsx37(Field, { description, children: /* @__PURE__ */ jsx37(
2111
2141
  Checkbox,
2112
2142
  {
2113
2143
  ref,
2114
2144
  className: cn21(
2115
- "group/checkbox flex items-center gap-[0.5rem]",
2145
+ "group/checkbox flex items-center",
2116
2146
  "cursor-pointer data-disabled:cursor-not-allowed",
2117
2147
  classNames3.container
2118
2148
  ),
@@ -2129,7 +2159,7 @@ var _Checkbox = forwardRef14(
2129
2159
  label && /* @__PURE__ */ jsx37("div", { className: classNames3.label, children: label })
2130
2160
  ] })
2131
2161
  }
2132
- );
2162
+ ) });
2133
2163
  }
2134
2164
  );
2135
2165
  _Checkbox.Group = _CheckboxGroup;
@@ -2430,7 +2460,7 @@ var _Modal = forwardRef17(
2430
2460
  import { forwardRef as forwardRef18, useContext as useContext8 } from "react";
2431
2461
  import {
2432
2462
  OverlayTriggerStateContext,
2433
- Provider
2463
+ Provider as Provider2
2434
2464
  } from "react-aria-components";
2435
2465
  import {
2436
2466
  useOverlayTriggerState
@@ -2554,7 +2584,7 @@ var NonModalInner = ({ state, isExiting, ...props }) => {
2554
2584
  ]
2555
2585
  }
2556
2586
  );
2557
- return /* @__PURE__ */ jsx45(Overlay, { isExiting, disableFocusManagement: true, children: /* @__PURE__ */ jsx45(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx45(Provider, { values: [[OverlayTriggerStateContext, state]], children: overlay }) }) });
2587
+ return /* @__PURE__ */ jsx45(Overlay, { isExiting, disableFocusManagement: true, children: /* @__PURE__ */ jsx45(FocusScope, { restoreFocus: true, children: /* @__PURE__ */ jsx45(Provider2, { values: [[OverlayTriggerStateContext, state]], children: overlay }) }) });
2558
2588
  };
2559
2589
  var NonModal = forwardRef18(
2560
2590
  ({ open, ...rest }, ref) => {
@@ -3850,7 +3880,7 @@ import {
3850
3880
  ButtonContext,
3851
3881
  FieldErrorContext as FieldErrorContext2,
3852
3882
  InputContext,
3853
- Provider as Provider2,
3883
+ Provider as Provider3,
3854
3884
  Input as _Input2
3855
3885
  } from "react-aria-components";
3856
3886
 
@@ -9298,7 +9328,7 @@ var StateManagedSelect$1 = StateManagedSelect;
9298
9328
 
9299
9329
  // src/Multiselect/Multiselect.tsx
9300
9330
  import { useField } from "@react-aria/label";
9301
- import { useId } from "@react-aria/utils";
9331
+ import { useId as useId2 } from "@react-aria/utils";
9302
9332
  import { cn as cn48, useClassNames as useClassNames48 } from "@marigold/system";
9303
9333
  import { jsx as jsx88, jsxs as jsxs32 } from "react/jsx-runtime";
9304
9334
  var propsToBeRemoved = [
@@ -9393,7 +9423,7 @@ var Multiselect = ({
9393
9423
  errorMessage
9394
9424
  });
9395
9425
  return /* @__PURE__ */ jsx88(
9396
- Provider2,
9426
+ Provider3,
9397
9427
  {
9398
9428
  values: [
9399
9429
  [
@@ -9456,7 +9486,7 @@ var Multiselect = ({
9456
9486
  inputId: fieldProps.id,
9457
9487
  "aria-invalid": error,
9458
9488
  isClearable: false,
9459
- instanceId: useId(),
9489
+ instanceId: useId2(),
9460
9490
  isSearchable: !readOnly,
9461
9491
  isMulti: true,
9462
9492
  closeMenuOnSelect: false,
@@ -10388,17 +10418,18 @@ var TableBody = ({
10388
10418
  const { rowGroupProps } = useTableRowGroup();
10389
10419
  const { state, classNames: classNames3 } = useTableContext();
10390
10420
  if (state.collection.size === 0 && emptyState) {
10391
- return /* @__PURE__ */ jsx108("tbody", { className, children: /* @__PURE__ */ jsx108("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", children: /* @__PURE__ */ jsx108(
10421
+ return /* @__PURE__ */ jsx108("tbody", { className, "data-rac": true, children: /* @__PURE__ */ jsx108("tr", { className: classNames3 == null ? void 0 : classNames3.row, role: "row", "data-rac": true, children: /* @__PURE__ */ jsx108(
10392
10422
  "td",
10393
10423
  {
10394
10424
  className: classNames3 == null ? void 0 : classNames3.cell,
10395
10425
  colSpan: state.collection.columnCount,
10396
10426
  role: "rowheader",
10427
+ "data-rac": true,
10397
10428
  children: emptyState()
10398
10429
  }
10399
10430
  ) }) });
10400
10431
  }
10401
- return /* @__PURE__ */ jsx108("tbody", { ...rowGroupProps, className, children });
10432
+ return /* @__PURE__ */ jsx108("tbody", { ...rowGroupProps, className, "data-rac": true, children });
10402
10433
  };
10403
10434
 
10404
10435
  // src/Table/TableCell.tsx
@@ -10443,6 +10474,7 @@ var TableCell = ({
10443
10474
  ...stateProps,
10444
10475
  align,
10445
10476
  valign: alignY,
10477
+ "data-rac": true,
10446
10478
  children: cell.rendered
10447
10479
  }
10448
10480
  );
@@ -10504,6 +10536,7 @@ var TableCheckboxCell = ({
10504
10536
  ...mergeProps3(gridCellProps, focusProps),
10505
10537
  ...stateProps,
10506
10538
  valign: alignY,
10539
+ "data-rac": true,
10507
10540
  children: /* @__PURE__ */ jsx110(_Checkbox, { ...checkboxProps })
10508
10541
  }
10509
10542
  );
@@ -10547,6 +10580,7 @@ var TableColumnHeader = ({
10547
10580
  ...mergeProps4(columnHeaderProps, hoverProps, focusProps),
10548
10581
  ...stateProps,
10549
10582
  align,
10583
+ "data-rac": true,
10550
10584
  children: [
10551
10585
  column2.rendered,
10552
10586
  column2.props.allowsSorting && (((_a = state.sortDescriptor) == null ? void 0 : _a.column) === column2.key ? ((_b = state.sortDescriptor) == null ? void 0 : _b.direction) === "ascending" ? /* @__PURE__ */ jsx111(SortUp, { className: "inline-block" }) : /* @__PURE__ */ jsx111(SortDown, { className: "inline-block" }) : /* @__PURE__ */ jsx111("span", { className: "hidden", children: /* @__PURE__ */ jsx111(SortDown, { className: "inline-block" }) }))
@@ -10571,6 +10605,7 @@ var TableHeader = ({ stickyHeader, children }) => {
10571
10605
  // for rui sticky is applied to thead
10572
10606
  stickyHeader ? "sticky [&_th]:sticky [&_th]:top-0" : ""
10573
10607
  ),
10608
+ "data-rac": true,
10574
10609
  children
10575
10610
  }
10576
10611
  );
@@ -10588,7 +10623,7 @@ var TableHeaderRow = ({
10588
10623
  const { state } = useTableContext();
10589
10624
  const ref = useRef12(null);
10590
10625
  const { rowProps } = useTableHeaderRow({ node: item }, state, ref);
10591
- return /* @__PURE__ */ jsx113("tr", { ...rowProps, className, ref, children });
10626
+ return /* @__PURE__ */ jsx113("tr", { ...rowProps, className, ref, "data-rac": true, children });
10592
10627
  };
10593
10628
 
10594
10629
  // src/Table/TableRow.tsx
@@ -10640,6 +10675,7 @@ var TableRow = ({ children, row }) => {
10640
10675
  ),
10641
10676
  ...mergeProps5(rowProps, focusProps, hoverProps),
10642
10677
  ...stateProps,
10678
+ "data-rac": true,
10643
10679
  children
10644
10680
  }
10645
10681
  );
@@ -10689,6 +10725,7 @@ var TableSelectAllCell = ({
10689
10725
  ...mergeProps6(columnHeaderProps, hoverProps, focusProps),
10690
10726
  ...stateProps,
10691
10727
  align,
10728
+ "data-rac": true,
10692
10729
  children: /* @__PURE__ */ jsx115(_Checkbox, { ...checkboxProps })
10693
10730
  }
10694
10731
  );
@@ -10733,6 +10770,7 @@ var Table = ({
10733
10770
  "table",
10734
10771
  {
10735
10772
  ref: tableRef,
10773
+ "data-rac": true,
10736
10774
  className: cn66(
10737
10775
  "group/table border-collapse",
10738
10776
  /**
@@ -10821,6 +10859,7 @@ import {
10821
10859
  textAlign as textAlign2,
10822
10860
  textSize,
10823
10861
  textStyle,
10862
+ textWrap,
10824
10863
  useClassNames as useClassNames62
10825
10864
  } from "@marigold/system";
10826
10865
  import { jsx as jsx117 } from "react/jsx-runtime";
@@ -10833,6 +10872,7 @@ var _Text = ({
10833
10872
  weight,
10834
10873
  fontSize,
10835
10874
  fontStyle,
10875
+ wrap,
10836
10876
  children,
10837
10877
  as = "div",
10838
10878
  ...props
@@ -10857,7 +10897,8 @@ var _Text = ({
10857
10897
  align && textAlign2[align],
10858
10898
  cursor2 && cursorStyle[cursor2],
10859
10899
  weight && fontWeight[weight],
10860
- fontSize && textSize[fontSize]
10900
+ fontSize && textSize[fontSize],
10901
+ wrap && textWrap[wrap]
10861
10902
  ),
10862
10903
  style: { color: color && ensureCssVar2(color, "color") },
10863
10904
  children
@@ -11252,7 +11293,7 @@ import { VisuallyHidden } from "@react-aria/visually-hidden";
11252
11293
 
11253
11294
  // src/XLoader/XLoader.tsx
11254
11295
  import { Dialog as Dialog5, Modal as Modal3 } from "react-aria-components";
11255
- import { useId as useId2 } from "@react-aria/utils";
11296
+ import { useId as useId3 } from "@react-aria/utils";
11256
11297
  import { useClassNames as useClassNames70 } from "@marigold/system";
11257
11298
 
11258
11299
  // src/XLoader/BaseLoader.tsx
@@ -11496,7 +11537,7 @@ var BaseLoader = ({
11496
11537
  // src/XLoader/XLoader.tsx
11497
11538
  import { jsx as jsx130 } from "react/jsx-runtime";
11498
11539
  var LoaderFullScreen = (props) => {
11499
- const id = useId2();
11540
+ const id = useId3();
11500
11541
  return /* @__PURE__ */ jsx130(Underlay, { defaultOpen: true, keyboardDismissable: true, variant: "modal", children: /* @__PURE__ */ jsx130(Modal3, { className: "grid h-(--visual-viewport-height) cursor-progress place-items-center", children: /* @__PURE__ */ jsx130(Dialog5, { className: "outline-0", "aria-labelledby": id, children: /* @__PURE__ */ jsx130(BaseLoader, { id, ...props }) }) }) });
11501
11542
  };
11502
11543
  var LoaderSection = (props) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/components",
3
- "version": "15.0.2",
3
+ "version": "15.1.0",
4
4
  "description": "Components for the Marigold Design System",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -55,7 +55,7 @@
55
55
  "@react-types/table": "^3.13.3",
56
56
  "react-aria-components": "^1.12.1",
57
57
  "react-stately": "^3.41.0",
58
- "@marigold/system": "15.0.2",
58
+ "@marigold/system": "15.1.0",
59
59
  "@marigold/types": "1.3.2"
60
60
  },
61
61
  "peerDependencies": {
@@ -67,8 +67,8 @@
67
67
  "react": "19.1.1",
68
68
  "react-dom": "19.1.1",
69
69
  "tsup": "8.5.0",
70
- "@marigold/icons": "1.3.20",
71
- "@marigold/tsconfig": "0.4.1"
70
+ "@marigold/tsconfig": "0.4.1",
71
+ "@marigold/icons": "1.3.21"
72
72
  },
73
73
  "scripts": {
74
74
  "build": "tsup src/index.ts",