@marigold/components 10.0.0 → 10.1.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.d.mts +84 -28
- package/dist/index.d.ts +84 -28
- package/dist/index.js +1616 -1143
- package/dist/index.mjs +1230 -758
- package/package.json +25 -25
package/dist/index.d.mts
CHANGED
|
@@ -6,10 +6,10 @@ import * as react from 'react';
|
|
|
6
6
|
import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
|
|
7
7
|
import { AriaAccordionProps } from '@react-aria/accordion';
|
|
8
8
|
import { TreeState } from '@react-stately/tree';
|
|
9
|
-
import { GapSpaceProp, AspectProp, WidthProp, alignment, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, GridColsAlignProp, PlaceItemsProp, TextAlignProp, HeightProp, ObjectFitProp, ObjectPositionProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp
|
|
9
|
+
import { GapSpaceProp, AspectProp, WidthProp, alignment, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, GridColsAlignProp, PlaceItemsProp, TextAlignProp, HeightProp, ObjectFitProp, ObjectPositionProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp } from '@marigold/system';
|
|
10
10
|
export { ThemeProvider, useTheme } from '@marigold/system';
|
|
11
11
|
import { AriaRegionProps, NonZeroPercentage, DistributiveOmit, HtmlProps, AriaLabelingProps } from '@marigold/types';
|
|
12
|
-
import RAC, { ValidationResult, Key, DateValue, TagListProps } from 'react-aria-components';
|
|
12
|
+
import RAC, { ValidationResult, Key, DateValue, TagListProps, ProgressBarProps } from 'react-aria-components';
|
|
13
13
|
export { Form, FormProps, RouterProvider } from 'react-aria-components';
|
|
14
14
|
export { I18nProvider } from '@react-aria/i18n';
|
|
15
15
|
import { AriaTableProps } from '@react-aria/table';
|
|
@@ -66,11 +66,11 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
66
66
|
*/
|
|
67
67
|
side?: 'left' | 'right';
|
|
68
68
|
/**
|
|
69
|
-
* The
|
|
69
|
+
* The width of the side content.
|
|
70
70
|
*/
|
|
71
71
|
sideWidth?: string;
|
|
72
72
|
/**
|
|
73
|
-
* At
|
|
73
|
+
* At what percentage of the content's width should the other content wrap beneath it
|
|
74
74
|
* @default 50%
|
|
75
75
|
*/
|
|
76
76
|
wrap?: NonZeroPercentage;
|
|
@@ -118,7 +118,7 @@ interface FieldBaseProps<T extends ElementType> extends WidthProp, Pick<HelpText
|
|
|
118
118
|
isInvalid?: boolean;
|
|
119
119
|
isRequired?: boolean;
|
|
120
120
|
}
|
|
121
|
-
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => ReactNode;
|
|
121
|
+
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => React.ReactNode;
|
|
122
122
|
|
|
123
123
|
interface FieldGroupContextProps {
|
|
124
124
|
labelWidth?: string;
|
|
@@ -324,7 +324,7 @@ interface BodyProps extends Omit<HtmlProps<'section'>, 'className'> {
|
|
|
324
324
|
}
|
|
325
325
|
declare const Body: ({ children, variant, size, ...props }: BodyProps) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
type RemovedProps$l = 'isDisabled';
|
|
327
|
+
type RemovedProps$l = 'isDisabled' | 'isPending';
|
|
328
328
|
interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
329
329
|
variant?: string;
|
|
330
330
|
size?: string;
|
|
@@ -346,6 +346,11 @@ interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
|
346
346
|
* @default false
|
|
347
347
|
*/
|
|
348
348
|
disabled?: RAC.ButtonProps['isDisabled'];
|
|
349
|
+
/**
|
|
350
|
+
* Whether the button is in a loading state.
|
|
351
|
+
* This disables press and hover events while retaining focusability, and announces the loading state to screen readers.
|
|
352
|
+
*/
|
|
353
|
+
loading?: RAC.ButtonProps['isPending'];
|
|
349
354
|
}
|
|
350
355
|
declare const _Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
351
356
|
|
|
@@ -625,7 +630,7 @@ declare const Footer: ({ children, variant, size, ...props }: FooterProps) => re
|
|
|
625
630
|
|
|
626
631
|
interface GridAreaProps {
|
|
627
632
|
/**
|
|
628
|
-
* Name of the grid area slot
|
|
633
|
+
* Name of the grid area slot.
|
|
629
634
|
*/
|
|
630
635
|
name: string;
|
|
631
636
|
/**
|
|
@@ -712,6 +717,9 @@ type RemovedProps$h = 'className' | 'isRequired' | 'isDisabled' | 'isInvalid' |
|
|
|
712
717
|
interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProps$h>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
713
718
|
variant?: string;
|
|
714
719
|
size?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
|
+
*/
|
|
715
723
|
action?: ReactElement;
|
|
716
724
|
/**
|
|
717
725
|
* If `true`, the date field is required.
|
|
@@ -741,7 +749,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
741
749
|
}
|
|
742
750
|
declare const _DateField: react.ForwardRefExoticComponent<DateFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
743
751
|
|
|
744
|
-
type RemovedProps$g = 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
752
|
+
type RemovedProps$g = 'visibleDuration' | 'pageBehavior' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
745
753
|
interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$g> {
|
|
746
754
|
/**
|
|
747
755
|
* Disables the Calendar.
|
|
@@ -755,9 +763,16 @@ interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$
|
|
|
755
763
|
readOnly?: boolean;
|
|
756
764
|
variant?: string;
|
|
757
765
|
size?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Width of the calendar.
|
|
768
|
+
*/
|
|
758
769
|
width?: WidthProp['width'];
|
|
770
|
+
/**
|
|
771
|
+
* Callback that is called for each date of the calendar. If it returns true, then the date is unavailable.
|
|
772
|
+
*/
|
|
773
|
+
dateUnavailable?: RAC.CalendarProps<DateValue>['isDateUnavailable'];
|
|
759
774
|
}
|
|
760
|
-
declare const _Calendar: ({ disabled, readOnly, size, variant, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
775
|
+
declare const _Calendar: ({ disabled, readOnly, size, variant, dateUnavailable, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
761
776
|
|
|
762
777
|
type RemovedProps$f = 'isDisabled' | 'isDateUnavailable' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'style' | 'className' | 'isOpen';
|
|
763
778
|
interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedProps$f>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
@@ -960,9 +975,17 @@ interface SectionMessageProps {
|
|
|
960
975
|
* Adds a close button, makes the section message dismissable.
|
|
961
976
|
*/
|
|
962
977
|
closeButton?: boolean;
|
|
978
|
+
/**
|
|
979
|
+
* Handler that is called when you need to control the dismissable message to close.
|
|
980
|
+
*/
|
|
981
|
+
onCloseChange?: (close: boolean) => void;
|
|
982
|
+
/**
|
|
983
|
+
* If the message should be closed/dismissed (controlled).
|
|
984
|
+
*/
|
|
985
|
+
close?: boolean;
|
|
963
986
|
}
|
|
964
987
|
declare const SectionMessage: {
|
|
965
|
-
({ variant, size, children, closeButton, ...props }: SectionMessageProps): react_jsx_runtime.JSX.Element | null;
|
|
988
|
+
({ variant, size, children, closeButton, close, onCloseChange, ...props }: SectionMessageProps): react_jsx_runtime.JSX.Element | null;
|
|
966
989
|
Title: ({ children }: SectionMessageTitleProps) => react_jsx_runtime.JSX.Element;
|
|
967
990
|
Content: ({ children, }: SectionMessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
968
991
|
};
|
|
@@ -1040,6 +1063,34 @@ interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismis
|
|
|
1040
1063
|
}
|
|
1041
1064
|
declare const Underlay: ({ size, variant, open, dismissable, keyboardDismissable, ...rest }: UnderlayProps) => react_jsx_runtime.JSX.Element;
|
|
1042
1065
|
|
|
1066
|
+
interface PaginationProps {
|
|
1067
|
+
/**
|
|
1068
|
+
* The initial page. (uncontrolled)
|
|
1069
|
+
*/
|
|
1070
|
+
defaultPage?: number;
|
|
1071
|
+
/**
|
|
1072
|
+
* The current page. (controlled)
|
|
1073
|
+
*/
|
|
1074
|
+
page?: number;
|
|
1075
|
+
/**
|
|
1076
|
+
* The number of total items.
|
|
1077
|
+
*/
|
|
1078
|
+
totalItems: number;
|
|
1079
|
+
/**
|
|
1080
|
+
* The number of items per page.
|
|
1081
|
+
*/
|
|
1082
|
+
pageSize: number;
|
|
1083
|
+
/**
|
|
1084
|
+
* Handler that is called when the pagination active page changes.
|
|
1085
|
+
*/
|
|
1086
|
+
onChange?: (page: number) => void;
|
|
1087
|
+
/**
|
|
1088
|
+
* Labels for the pagination controls.
|
|
1089
|
+
*/
|
|
1090
|
+
controlLabels?: [string, string];
|
|
1091
|
+
}
|
|
1092
|
+
declare const _Pagination: ({ defaultPage, page, totalItems, pageSize, onChange, controlLabels, }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
1093
|
+
|
|
1043
1094
|
interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
|
|
1044
1095
|
}
|
|
1045
1096
|
declare function MarigoldProvider<T extends Theme>({ children, className, theme, }: MarigoldProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -1135,10 +1186,6 @@ interface RadioComponent extends ForwardRefExoticComponent<RadioProps & RefAttri
|
|
|
1135
1186
|
|
|
1136
1187
|
type RemovedProps$6 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
|
|
1137
1188
|
interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
1138
|
-
/**
|
|
1139
|
-
* Icon element to display in the search field.
|
|
1140
|
-
*/
|
|
1141
|
-
icon?: ReactElement;
|
|
1142
1189
|
/**
|
|
1143
1190
|
* Action element to display in the search field.
|
|
1144
1191
|
*/
|
|
@@ -1294,9 +1341,9 @@ interface ScrollableProps extends WidthProp, AriaRegionProps {
|
|
|
1294
1341
|
}
|
|
1295
1342
|
declare const Scrollable: ({ children, width, height, ...props }: ScrollableProps) => react_jsx_runtime.JSX.Element;
|
|
1296
1343
|
|
|
1297
|
-
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'> {
|
|
1344
|
+
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'orientation'>, Pick<FieldBaseProps<'label'>, 'description'> {
|
|
1298
1345
|
/**
|
|
1299
|
-
* Labels for the thumbs in the slider.
|
|
1346
|
+
* Labels for the thumbs in the slider. Also used for the name when submitting the form.
|
|
1300
1347
|
*/
|
|
1301
1348
|
thumbLabels?: string[];
|
|
1302
1349
|
/**
|
|
@@ -1311,6 +1358,11 @@ interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'
|
|
|
1311
1358
|
* @default false
|
|
1312
1359
|
*/
|
|
1313
1360
|
disabled?: boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* @deprecated Will be removed in the next major version. Use `label` prop instead.
|
|
1363
|
+
*/
|
|
1364
|
+
children?: ReactNode;
|
|
1365
|
+
label?: string;
|
|
1314
1366
|
}
|
|
1315
1367
|
declare const _Slider: react__default.ForwardRefExoticComponent<SliderProps<number | number[]> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1316
1368
|
|
|
@@ -1553,14 +1605,14 @@ interface TilesProps extends GapSpaceProp, AriaRegionProps {
|
|
|
1553
1605
|
* Set minimum width for all items inside.
|
|
1554
1606
|
* @default '250px'
|
|
1555
1607
|
*/
|
|
1556
|
-
tilesWidth
|
|
1608
|
+
tilesWidth?: string;
|
|
1557
1609
|
/**
|
|
1558
1610
|
* Tiles will stretch to available width and will distribute their width equally. Note that this can make them wider than the specified tiles width, but not smaller than the given "tilesWidth". Basically, this is full responsive mode.
|
|
1559
1611
|
* @default false
|
|
1560
1612
|
*/
|
|
1561
1613
|
stretch?: boolean;
|
|
1562
1614
|
/**
|
|
1563
|
-
* If true, all items will have the
|
|
1615
|
+
* If true, all items will have the height of the biggest item.
|
|
1564
1616
|
* @default false
|
|
1565
1617
|
*/
|
|
1566
1618
|
equalHeight?: boolean;
|
|
@@ -1630,19 +1682,23 @@ declare const _Tag: {
|
|
|
1630
1682
|
Group: ({ width, items, children, renderEmptyState, variant, size, ...rest }: TagGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1631
1683
|
};
|
|
1632
1684
|
|
|
1633
|
-
interface
|
|
1685
|
+
interface LoaderProps extends Pick<ProgressBarProps, 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'> {
|
|
1686
|
+
/**
|
|
1687
|
+
* Children of the component that will make up the label.
|
|
1688
|
+
*/
|
|
1689
|
+
children?: ReactNode;
|
|
1690
|
+
size?: string;
|
|
1691
|
+
variant?: string;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
interface XLoaderProps extends LoaderProps {
|
|
1634
1695
|
/**
|
|
1635
|
-
* Show the loader in `fullsize` and
|
|
1696
|
+
* Show the loader in `fullsize` to overlay and block interaction with the site or `ìnline` to show loading for a certain area.
|
|
1636
1697
|
* @default undefined
|
|
1637
1698
|
*/
|
|
1638
|
-
mode?:
|
|
1699
|
+
mode?: 'fullsize' | 'inline';
|
|
1639
1700
|
}
|
|
1640
|
-
declare const
|
|
1641
|
-
readonly FullSize: "fullsize";
|
|
1642
|
-
readonly Inline: "inline";
|
|
1643
|
-
};
|
|
1644
|
-
type LoadingModeKeys = (typeof LoadingModes)[keyof typeof LoadingModes];
|
|
1645
|
-
declare const XLoader: react.ForwardRefExoticComponent<XLoaderProps & react.RefAttributes<SVGElement>>;
|
|
1701
|
+
declare const XLoader: ({ mode, variant, ...props }: XLoaderProps) => react_jsx_runtime.JSX.Element;
|
|
1646
1702
|
|
|
1647
1703
|
interface TabProps extends Omit<RAC.TabProps, 'className' | 'style'> {
|
|
1648
1704
|
}
|
|
@@ -1669,4 +1725,4 @@ declare const _Tabs: {
|
|
|
1669
1725
|
Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1670
1726
|
};
|
|
1671
1727
|
|
|
1672
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, type GridAreaProps as AreaProps, Aside, type AsideProps, Aspect, type AspectProps, _Autocomplete as Autocomplete, type AutocompleteProps, Badge, type BadgeProps, Body, type BodyProps, Breakout, type BreakoutProps, _Button as Button, type ButtonProps, _Calendar as Calendar, type CalendarProps, Card, type CardProps, Center, type CenterProps, _Checkbox as Checkbox, type CheckboxComponent, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, type ColumnProps, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, _DateField as DateField, type DateFieldProps, _DatePicker as DatePicker, type DatePickerProps, _Dialog as Dialog, type DialogProps, _Divider as Divider, type DividerProps, FieldBase, type FieldBaseProps, FieldGroup, FieldGroupContext, type FieldGroupContextProps, type FieldGroupProps, Footer, type FooterProps, Grid, type GridProps, _Header as Header, type HeaderProps, _Headline as Headline, type HeadlineProps, Image, type ImageProps, Inline, type InlineProps, _Input as Input, type InputProps, Inset, type InsetProps, _Label as Label, type LabelProps, _Link as Link, type LinkProps, List, type ListProps, MarigoldProvider, type MarigoldProviderProps, _Menu as Menu, type MenuProps, _Modal as Modal, type ModalProps, type MultiSelectItemProps, type MultiSelectProps, Multiselect, _NumberField as NumberField, type NumberFieldProps, OverlayContainerProvider, _Popover as Popover, type PopoverProps, _Radio as Radio, type RadioComponent, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, type RemovedProps$j as RemovedProps, type RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, SectionMessage, type SectionMessageProps, _Select as Select, type SelectComponent, _SelectList as SelectList, type SelectListProps, type SelectProps, _Slider as Slider, type SliderProps, Split, type SplitProps, Stack, type StackProps, _Switch as Switch, type SwitchProps, Table, type TableProps, _Tabs as Tabs, type TabsProps, _Tag as Tag, type TagProps, type TemplateValue, _Text as Text, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps, type TextProps, Tiles, type TilesProps, _Tooltip as Tooltip, type TooltipProps, Underlay, type UnderlayProps, XLoader, type XLoaderProps, _Calendar, useFieldGroupContext, usePortalContainer };
|
|
1728
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, type GridAreaProps as AreaProps, Aside, type AsideProps, Aspect, type AspectProps, _Autocomplete as Autocomplete, type AutocompleteProps, Badge, type BadgeProps, Body, type BodyProps, Breakout, type BreakoutProps, _Button as Button, type ButtonProps, _Calendar as Calendar, type CalendarProps, Card, type CardProps, Center, type CenterProps, _Checkbox as Checkbox, type CheckboxComponent, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, type ColumnProps, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, _DateField as DateField, type DateFieldProps, _DatePicker as DatePicker, type DatePickerProps, _Dialog as Dialog, type DialogProps, _Divider as Divider, type DividerProps, FieldBase, type FieldBaseProps, FieldGroup, FieldGroupContext, type FieldGroupContextProps, type FieldGroupProps, Footer, type FooterProps, Grid, type GridProps, _Header as Header, type HeaderProps, _Headline as Headline, type HeadlineProps, Image, type ImageProps, Inline, type InlineProps, _Input as Input, type InputProps, Inset, type InsetProps, _Label as Label, type LabelProps, _Link as Link, type LinkProps, List, type ListProps, MarigoldProvider, type MarigoldProviderProps, _Menu as Menu, type MenuProps, _Modal as Modal, type ModalProps, type MultiSelectItemProps, type MultiSelectProps, Multiselect, _NumberField as NumberField, type NumberFieldProps, OverlayContainerProvider, _Pagination as Pagination, type PaginationProps, _Popover as Popover, type PopoverProps, _Radio as Radio, type RadioComponent, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, type RemovedProps$j as RemovedProps, type RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, SectionMessage, type SectionMessageProps, _Select as Select, type SelectComponent, _SelectList as SelectList, type SelectListProps, type SelectProps, _Slider as Slider, type SliderProps, Split, type SplitProps, Stack, type StackProps, _Switch as Switch, type SwitchProps, Table, type TableProps, _Tabs as Tabs, type TabsProps, _Tag as Tag, type TagProps, type TemplateValue, _Text as Text, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps, type TextProps, Tiles, type TilesProps, _Tooltip as Tooltip, type TooltipProps, Underlay, type UnderlayProps, XLoader, type XLoaderProps, _Calendar, useFieldGroupContext, usePortalContainer };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import * as react from 'react';
|
|
|
6
6
|
import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
|
|
7
7
|
import { AriaAccordionProps } from '@react-aria/accordion';
|
|
8
8
|
import { TreeState } from '@react-stately/tree';
|
|
9
|
-
import { GapSpaceProp, AspectProp, WidthProp, alignment, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, GridColsAlignProp, PlaceItemsProp, TextAlignProp, HeightProp, ObjectFitProp, ObjectPositionProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp
|
|
9
|
+
import { GapSpaceProp, AspectProp, WidthProp, alignment, PaddingSpaceProp, PaddingRightProp, PaddingLeftProp, PaddingBottomProp, PaddingTopProp, PaddingSpacePropX, PaddingSpacePropY, GridColsAlignProp, PlaceItemsProp, TextAlignProp, HeightProp, ObjectFitProp, ObjectPositionProp, Theme, ThemeProviderProps, FontSizeProp, FontWeightProp, FontStyleProp, CursorProp } from '@marigold/system';
|
|
10
10
|
export { ThemeProvider, useTheme } from '@marigold/system';
|
|
11
11
|
import { AriaRegionProps, NonZeroPercentage, DistributiveOmit, HtmlProps, AriaLabelingProps } from '@marigold/types';
|
|
12
|
-
import RAC, { ValidationResult, Key, DateValue, TagListProps } from 'react-aria-components';
|
|
12
|
+
import RAC, { ValidationResult, Key, DateValue, TagListProps, ProgressBarProps } from 'react-aria-components';
|
|
13
13
|
export { Form, FormProps, RouterProvider } from 'react-aria-components';
|
|
14
14
|
export { I18nProvider } from '@react-aria/i18n';
|
|
15
15
|
import { AriaTableProps } from '@react-aria/table';
|
|
@@ -66,11 +66,11 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
66
66
|
*/
|
|
67
67
|
side?: 'left' | 'right';
|
|
68
68
|
/**
|
|
69
|
-
* The
|
|
69
|
+
* The width of the side content.
|
|
70
70
|
*/
|
|
71
71
|
sideWidth?: string;
|
|
72
72
|
/**
|
|
73
|
-
* At
|
|
73
|
+
* At what percentage of the content's width should the other content wrap beneath it
|
|
74
74
|
* @default 50%
|
|
75
75
|
*/
|
|
76
76
|
wrap?: NonZeroPercentage;
|
|
@@ -118,7 +118,7 @@ interface FieldBaseProps<T extends ElementType> extends WidthProp, Pick<HelpText
|
|
|
118
118
|
isInvalid?: boolean;
|
|
119
119
|
isRequired?: boolean;
|
|
120
120
|
}
|
|
121
|
-
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => ReactNode;
|
|
121
|
+
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => React.ReactNode;
|
|
122
122
|
|
|
123
123
|
interface FieldGroupContextProps {
|
|
124
124
|
labelWidth?: string;
|
|
@@ -324,7 +324,7 @@ interface BodyProps extends Omit<HtmlProps<'section'>, 'className'> {
|
|
|
324
324
|
}
|
|
325
325
|
declare const Body: ({ children, variant, size, ...props }: BodyProps) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
type RemovedProps$l = 'isDisabled';
|
|
327
|
+
type RemovedProps$l = 'isDisabled' | 'isPending';
|
|
328
328
|
interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
329
329
|
variant?: string;
|
|
330
330
|
size?: string;
|
|
@@ -346,6 +346,11 @@ interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
|
346
346
|
* @default false
|
|
347
347
|
*/
|
|
348
348
|
disabled?: RAC.ButtonProps['isDisabled'];
|
|
349
|
+
/**
|
|
350
|
+
* Whether the button is in a loading state.
|
|
351
|
+
* This disables press and hover events while retaining focusability, and announces the loading state to screen readers.
|
|
352
|
+
*/
|
|
353
|
+
loading?: RAC.ButtonProps['isPending'];
|
|
349
354
|
}
|
|
350
355
|
declare const _Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
351
356
|
|
|
@@ -625,7 +630,7 @@ declare const Footer: ({ children, variant, size, ...props }: FooterProps) => re
|
|
|
625
630
|
|
|
626
631
|
interface GridAreaProps {
|
|
627
632
|
/**
|
|
628
|
-
* Name of the grid area slot
|
|
633
|
+
* Name of the grid area slot.
|
|
629
634
|
*/
|
|
630
635
|
name: string;
|
|
631
636
|
/**
|
|
@@ -712,6 +717,9 @@ type RemovedProps$h = 'className' | 'isRequired' | 'isDisabled' | 'isInvalid' |
|
|
|
712
717
|
interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProps$h>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
713
718
|
variant?: string;
|
|
714
719
|
size?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
|
+
*/
|
|
715
723
|
action?: ReactElement;
|
|
716
724
|
/**
|
|
717
725
|
* If `true`, the date field is required.
|
|
@@ -741,7 +749,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
741
749
|
}
|
|
742
750
|
declare const _DateField: react.ForwardRefExoticComponent<DateFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
743
751
|
|
|
744
|
-
type RemovedProps$g = 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
752
|
+
type RemovedProps$g = 'visibleDuration' | 'pageBehavior' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
745
753
|
interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$g> {
|
|
746
754
|
/**
|
|
747
755
|
* Disables the Calendar.
|
|
@@ -755,9 +763,16 @@ interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$
|
|
|
755
763
|
readOnly?: boolean;
|
|
756
764
|
variant?: string;
|
|
757
765
|
size?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Width of the calendar.
|
|
768
|
+
*/
|
|
758
769
|
width?: WidthProp['width'];
|
|
770
|
+
/**
|
|
771
|
+
* Callback that is called for each date of the calendar. If it returns true, then the date is unavailable.
|
|
772
|
+
*/
|
|
773
|
+
dateUnavailable?: RAC.CalendarProps<DateValue>['isDateUnavailable'];
|
|
759
774
|
}
|
|
760
|
-
declare const _Calendar: ({ disabled, readOnly, size, variant, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
775
|
+
declare const _Calendar: ({ disabled, readOnly, size, variant, dateUnavailable, ...rest }: CalendarProps) => react_jsx_runtime.JSX.Element;
|
|
761
776
|
|
|
762
777
|
type RemovedProps$f = 'isDisabled' | 'isDateUnavailable' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'style' | 'className' | 'isOpen';
|
|
763
778
|
interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedProps$f>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
@@ -960,9 +975,17 @@ interface SectionMessageProps {
|
|
|
960
975
|
* Adds a close button, makes the section message dismissable.
|
|
961
976
|
*/
|
|
962
977
|
closeButton?: boolean;
|
|
978
|
+
/**
|
|
979
|
+
* Handler that is called when you need to control the dismissable message to close.
|
|
980
|
+
*/
|
|
981
|
+
onCloseChange?: (close: boolean) => void;
|
|
982
|
+
/**
|
|
983
|
+
* If the message should be closed/dismissed (controlled).
|
|
984
|
+
*/
|
|
985
|
+
close?: boolean;
|
|
963
986
|
}
|
|
964
987
|
declare const SectionMessage: {
|
|
965
|
-
({ variant, size, children, closeButton, ...props }: SectionMessageProps): react_jsx_runtime.JSX.Element | null;
|
|
988
|
+
({ variant, size, children, closeButton, close, onCloseChange, ...props }: SectionMessageProps): react_jsx_runtime.JSX.Element | null;
|
|
966
989
|
Title: ({ children }: SectionMessageTitleProps) => react_jsx_runtime.JSX.Element;
|
|
967
990
|
Content: ({ children, }: SectionMessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
968
991
|
};
|
|
@@ -1040,6 +1063,34 @@ interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismis
|
|
|
1040
1063
|
}
|
|
1041
1064
|
declare const Underlay: ({ size, variant, open, dismissable, keyboardDismissable, ...rest }: UnderlayProps) => react_jsx_runtime.JSX.Element;
|
|
1042
1065
|
|
|
1066
|
+
interface PaginationProps {
|
|
1067
|
+
/**
|
|
1068
|
+
* The initial page. (uncontrolled)
|
|
1069
|
+
*/
|
|
1070
|
+
defaultPage?: number;
|
|
1071
|
+
/**
|
|
1072
|
+
* The current page. (controlled)
|
|
1073
|
+
*/
|
|
1074
|
+
page?: number;
|
|
1075
|
+
/**
|
|
1076
|
+
* The number of total items.
|
|
1077
|
+
*/
|
|
1078
|
+
totalItems: number;
|
|
1079
|
+
/**
|
|
1080
|
+
* The number of items per page.
|
|
1081
|
+
*/
|
|
1082
|
+
pageSize: number;
|
|
1083
|
+
/**
|
|
1084
|
+
* Handler that is called when the pagination active page changes.
|
|
1085
|
+
*/
|
|
1086
|
+
onChange?: (page: number) => void;
|
|
1087
|
+
/**
|
|
1088
|
+
* Labels for the pagination controls.
|
|
1089
|
+
*/
|
|
1090
|
+
controlLabels?: [string, string];
|
|
1091
|
+
}
|
|
1092
|
+
declare const _Pagination: ({ defaultPage, page, totalItems, pageSize, onChange, controlLabels, }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
1093
|
+
|
|
1043
1094
|
interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
|
|
1044
1095
|
}
|
|
1045
1096
|
declare function MarigoldProvider<T extends Theme>({ children, className, theme, }: MarigoldProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -1135,10 +1186,6 @@ interface RadioComponent extends ForwardRefExoticComponent<RadioProps & RefAttri
|
|
|
1135
1186
|
|
|
1136
1187
|
type RemovedProps$6 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
|
|
1137
1188
|
interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
1138
|
-
/**
|
|
1139
|
-
* Icon element to display in the search field.
|
|
1140
|
-
*/
|
|
1141
|
-
icon?: ReactElement;
|
|
1142
1189
|
/**
|
|
1143
1190
|
* Action element to display in the search field.
|
|
1144
1191
|
*/
|
|
@@ -1294,9 +1341,9 @@ interface ScrollableProps extends WidthProp, AriaRegionProps {
|
|
|
1294
1341
|
}
|
|
1295
1342
|
declare const Scrollable: ({ children, width, height, ...props }: ScrollableProps) => react_jsx_runtime.JSX.Element;
|
|
1296
1343
|
|
|
1297
|
-
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'> {
|
|
1344
|
+
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'orientation'>, Pick<FieldBaseProps<'label'>, 'description'> {
|
|
1298
1345
|
/**
|
|
1299
|
-
* Labels for the thumbs in the slider.
|
|
1346
|
+
* Labels for the thumbs in the slider. Also used for the name when submitting the form.
|
|
1300
1347
|
*/
|
|
1301
1348
|
thumbLabels?: string[];
|
|
1302
1349
|
/**
|
|
@@ -1311,6 +1358,11 @@ interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'
|
|
|
1311
1358
|
* @default false
|
|
1312
1359
|
*/
|
|
1313
1360
|
disabled?: boolean;
|
|
1361
|
+
/**
|
|
1362
|
+
* @deprecated Will be removed in the next major version. Use `label` prop instead.
|
|
1363
|
+
*/
|
|
1364
|
+
children?: ReactNode;
|
|
1365
|
+
label?: string;
|
|
1314
1366
|
}
|
|
1315
1367
|
declare const _Slider: react__default.ForwardRefExoticComponent<SliderProps<number | number[]> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1316
1368
|
|
|
@@ -1553,14 +1605,14 @@ interface TilesProps extends GapSpaceProp, AriaRegionProps {
|
|
|
1553
1605
|
* Set minimum width for all items inside.
|
|
1554
1606
|
* @default '250px'
|
|
1555
1607
|
*/
|
|
1556
|
-
tilesWidth
|
|
1608
|
+
tilesWidth?: string;
|
|
1557
1609
|
/**
|
|
1558
1610
|
* Tiles will stretch to available width and will distribute their width equally. Note that this can make them wider than the specified tiles width, but not smaller than the given "tilesWidth". Basically, this is full responsive mode.
|
|
1559
1611
|
* @default false
|
|
1560
1612
|
*/
|
|
1561
1613
|
stretch?: boolean;
|
|
1562
1614
|
/**
|
|
1563
|
-
* If true, all items will have the
|
|
1615
|
+
* If true, all items will have the height of the biggest item.
|
|
1564
1616
|
* @default false
|
|
1565
1617
|
*/
|
|
1566
1618
|
equalHeight?: boolean;
|
|
@@ -1630,19 +1682,23 @@ declare const _Tag: {
|
|
|
1630
1682
|
Group: ({ width, items, children, renderEmptyState, variant, size, ...rest }: TagGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1631
1683
|
};
|
|
1632
1684
|
|
|
1633
|
-
interface
|
|
1685
|
+
interface LoaderProps extends Pick<ProgressBarProps, 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'> {
|
|
1686
|
+
/**
|
|
1687
|
+
* Children of the component that will make up the label.
|
|
1688
|
+
*/
|
|
1689
|
+
children?: ReactNode;
|
|
1690
|
+
size?: string;
|
|
1691
|
+
variant?: string;
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
interface XLoaderProps extends LoaderProps {
|
|
1634
1695
|
/**
|
|
1635
|
-
* Show the loader in `fullsize` and
|
|
1696
|
+
* Show the loader in `fullsize` to overlay and block interaction with the site or `ìnline` to show loading for a certain area.
|
|
1636
1697
|
* @default undefined
|
|
1637
1698
|
*/
|
|
1638
|
-
mode?:
|
|
1699
|
+
mode?: 'fullsize' | 'inline';
|
|
1639
1700
|
}
|
|
1640
|
-
declare const
|
|
1641
|
-
readonly FullSize: "fullsize";
|
|
1642
|
-
readonly Inline: "inline";
|
|
1643
|
-
};
|
|
1644
|
-
type LoadingModeKeys = (typeof LoadingModes)[keyof typeof LoadingModes];
|
|
1645
|
-
declare const XLoader: react.ForwardRefExoticComponent<XLoaderProps & react.RefAttributes<SVGElement>>;
|
|
1701
|
+
declare const XLoader: ({ mode, variant, ...props }: XLoaderProps) => react_jsx_runtime.JSX.Element;
|
|
1646
1702
|
|
|
1647
1703
|
interface TabProps extends Omit<RAC.TabProps, 'className' | 'style'> {
|
|
1648
1704
|
}
|
|
@@ -1669,4 +1725,4 @@ declare const _Tabs: {
|
|
|
1669
1725
|
Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1670
1726
|
};
|
|
1671
1727
|
|
|
1672
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, type GridAreaProps as AreaProps, Aside, type AsideProps, Aspect, type AspectProps, _Autocomplete as Autocomplete, type AutocompleteProps, Badge, type BadgeProps, Body, type BodyProps, Breakout, type BreakoutProps, _Button as Button, type ButtonProps, _Calendar as Calendar, type CalendarProps, Card, type CardProps, Center, type CenterProps, _Checkbox as Checkbox, type CheckboxComponent, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, type ColumnProps, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, _DateField as DateField, type DateFieldProps, _DatePicker as DatePicker, type DatePickerProps, _Dialog as Dialog, type DialogProps, _Divider as Divider, type DividerProps, FieldBase, type FieldBaseProps, FieldGroup, FieldGroupContext, type FieldGroupContextProps, type FieldGroupProps, Footer, type FooterProps, Grid, type GridProps, _Header as Header, type HeaderProps, _Headline as Headline, type HeadlineProps, Image, type ImageProps, Inline, type InlineProps, _Input as Input, type InputProps, Inset, type InsetProps, _Label as Label, type LabelProps, _Link as Link, type LinkProps, List, type ListProps, MarigoldProvider, type MarigoldProviderProps, _Menu as Menu, type MenuProps, _Modal as Modal, type ModalProps, type MultiSelectItemProps, type MultiSelectProps, Multiselect, _NumberField as NumberField, type NumberFieldProps, OverlayContainerProvider, _Popover as Popover, type PopoverProps, _Radio as Radio, type RadioComponent, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, type RemovedProps$j as RemovedProps, type RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, SectionMessage, type SectionMessageProps, _Select as Select, type SelectComponent, _SelectList as SelectList, type SelectListProps, type SelectProps, _Slider as Slider, type SliderProps, Split, type SplitProps, Stack, type StackProps, _Switch as Switch, type SwitchProps, Table, type TableProps, _Tabs as Tabs, type TabsProps, _Tag as Tag, type TagProps, type TemplateValue, _Text as Text, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps, type TextProps, Tiles, type TilesProps, _Tooltip as Tooltip, type TooltipProps, Underlay, type UnderlayProps, XLoader, type XLoaderProps, _Calendar, useFieldGroupContext, usePortalContainer };
|
|
1728
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, type GridAreaProps as AreaProps, Aside, type AsideProps, Aspect, type AspectProps, _Autocomplete as Autocomplete, type AutocompleteProps, Badge, type BadgeProps, Body, type BodyProps, Breakout, type BreakoutProps, _Button as Button, type ButtonProps, _Calendar as Calendar, type CalendarProps, Card, type CardProps, Center, type CenterProps, _Checkbox as Checkbox, type CheckboxComponent, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, type ColumnProps, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, _DateField as DateField, type DateFieldProps, _DatePicker as DatePicker, type DatePickerProps, _Dialog as Dialog, type DialogProps, _Divider as Divider, type DividerProps, FieldBase, type FieldBaseProps, FieldGroup, FieldGroupContext, type FieldGroupContextProps, type FieldGroupProps, Footer, type FooterProps, Grid, type GridProps, _Header as Header, type HeaderProps, _Headline as Headline, type HeadlineProps, Image, type ImageProps, Inline, type InlineProps, _Input as Input, type InputProps, Inset, type InsetProps, _Label as Label, type LabelProps, _Link as Link, type LinkProps, List, type ListProps, MarigoldProvider, type MarigoldProviderProps, _Menu as Menu, type MenuProps, _Modal as Modal, type ModalProps, type MultiSelectItemProps, type MultiSelectProps, Multiselect, _NumberField as NumberField, type NumberFieldProps, OverlayContainerProvider, _Pagination as Pagination, type PaginationProps, _Popover as Popover, type PopoverProps, _Radio as Radio, type RadioComponent, _RadioGroup as RadioGroup, type RadioGroupProps, type RadioProps, type RemovedProps$j as RemovedProps, type RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, SectionMessage, type SectionMessageProps, _Select as Select, type SelectComponent, _SelectList as SelectList, type SelectListProps, type SelectProps, _Slider as Slider, type SliderProps, Split, type SplitProps, Stack, type StackProps, _Switch as Switch, type SwitchProps, Table, type TableProps, _Tabs as Tabs, type TabsProps, _Tag as Tag, type TagProps, type TemplateValue, _Text as Text, _TextArea as TextArea, type TextAreaProps, _TextField as TextField, type TextFieldProps, type TextProps, Tiles, type TilesProps, _Tooltip as Tooltip, type TooltipProps, Underlay, type UnderlayProps, XLoader, type XLoaderProps, _Calendar, useFieldGroupContext, usePortalContainer };
|