@marigold/components 10.1.0 → 10.1.2
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 +74 -29
- package/dist/index.d.ts +74 -29
- package/dist/index.js +855 -493
- package/dist/index.mjs +792 -431
- package/package.json +27 -27
package/dist/index.d.mts
CHANGED
|
@@ -3,13 +3,13 @@ export { Selection } from '@react-types/shared';
|
|
|
3
3
|
export { useAsyncList, useListData } from '@react-stately/data';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
|
-
import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
|
|
6
|
+
import react__default, { JSX, 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';
|
|
@@ -34,7 +34,7 @@ declare const Accordion: {
|
|
|
34
34
|
interface AccordionOwnItemProps<T> extends ItemProps<T> {
|
|
35
35
|
variant?: string;
|
|
36
36
|
size?: string;
|
|
37
|
-
title: string | ReactElement
|
|
37
|
+
title: string | ReactElement<any>;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
interface AccordionItemProps {
|
|
@@ -59,7 +59,7 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
59
59
|
/**
|
|
60
60
|
* The children of the component.
|
|
61
61
|
*/
|
|
62
|
-
children: [ReactElement
|
|
62
|
+
children: [ReactElement<any>, ReactElement<any>];
|
|
63
63
|
/**
|
|
64
64
|
* The side of the aside content.
|
|
65
65
|
* @default left
|
|
@@ -630,7 +630,7 @@ declare const Footer: ({ children, variant, size, ...props }: FooterProps) => re
|
|
|
630
630
|
|
|
631
631
|
interface GridAreaProps {
|
|
632
632
|
/**
|
|
633
|
-
* Name of the grid area slot
|
|
633
|
+
* Name of the grid area slot.
|
|
634
634
|
*/
|
|
635
635
|
name: string;
|
|
636
636
|
/**
|
|
@@ -705,8 +705,8 @@ declare const Inline: ({ space, alignX, alignY, children, ...props }: InlineProp
|
|
|
705
705
|
|
|
706
706
|
type RemovedProps$i = 'className' | 'style' | 'size';
|
|
707
707
|
interface InputProps extends Omit<RAC.InputProps, RemovedProps$i> {
|
|
708
|
-
icon?: ReactElement
|
|
709
|
-
action?: ReactElement
|
|
708
|
+
icon?: ReactElement<any>;
|
|
709
|
+
action?: ReactElement<any>;
|
|
710
710
|
variant?: string;
|
|
711
711
|
size?: string;
|
|
712
712
|
className?: string;
|
|
@@ -720,7 +720,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
720
720
|
/**
|
|
721
721
|
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
722
|
*/
|
|
723
|
-
action?: ReactElement
|
|
723
|
+
action?: ReactElement<any>;
|
|
724
724
|
/**
|
|
725
725
|
* If `true`, the date field is required.
|
|
726
726
|
* @default false
|
|
@@ -749,7 +749,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
749
749
|
}
|
|
750
750
|
declare const _DateField: react.ForwardRefExoticComponent<DateFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
751
751
|
|
|
752
|
-
type RemovedProps$g = 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
752
|
+
type RemovedProps$g = 'visibleDuration' | 'pageBehavior' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
753
753
|
interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$g> {
|
|
754
754
|
/**
|
|
755
755
|
* Disables the Calendar.
|
|
@@ -763,9 +763,16 @@ interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$
|
|
|
763
763
|
readOnly?: boolean;
|
|
764
764
|
variant?: string;
|
|
765
765
|
size?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Width of the calendar.
|
|
768
|
+
*/
|
|
766
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'];
|
|
767
774
|
}
|
|
768
|
-
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;
|
|
769
776
|
|
|
770
777
|
type RemovedProps$f = 'isDisabled' | 'isDateUnavailable' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'style' | 'className' | 'isOpen';
|
|
771
778
|
interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedProps$f>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
@@ -968,9 +975,17 @@ interface SectionMessageProps {
|
|
|
968
975
|
* Adds a close button, makes the section message dismissable.
|
|
969
976
|
*/
|
|
970
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;
|
|
971
986
|
}
|
|
972
987
|
declare const SectionMessage: {
|
|
973
|
-
({ 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;
|
|
974
989
|
Title: ({ children }: SectionMessageTitleProps) => react_jsx_runtime.JSX.Element;
|
|
975
990
|
Content: ({ children, }: SectionMessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
976
991
|
};
|
|
@@ -1048,6 +1063,34 @@ interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismis
|
|
|
1048
1063
|
}
|
|
1049
1064
|
declare const Underlay: ({ size, variant, open, dismissable, keyboardDismissable, ...rest }: UnderlayProps) => react_jsx_runtime.JSX.Element;
|
|
1050
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
|
+
|
|
1051
1094
|
interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
|
|
1052
1095
|
}
|
|
1053
1096
|
declare function MarigoldProvider<T extends Theme>({ children, className, theme, }: MarigoldProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -1143,14 +1186,10 @@ interface RadioComponent extends ForwardRefExoticComponent<RadioProps & RefAttri
|
|
|
1143
1186
|
|
|
1144
1187
|
type RemovedProps$6 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
|
|
1145
1188
|
interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
1146
|
-
/**
|
|
1147
|
-
* Icon element to display in the search field.
|
|
1148
|
-
*/
|
|
1149
|
-
icon?: ReactElement;
|
|
1150
1189
|
/**
|
|
1151
1190
|
* Action element to display in the search field.
|
|
1152
1191
|
*/
|
|
1153
|
-
action?: ReactElement
|
|
1192
|
+
action?: ReactElement<any>;
|
|
1154
1193
|
variant?: string;
|
|
1155
1194
|
size?: string;
|
|
1156
1195
|
/**
|
|
@@ -1272,6 +1311,7 @@ interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object>
|
|
|
1272
1311
|
declare const _Select: SelectComponent;
|
|
1273
1312
|
|
|
1274
1313
|
interface SelectListItemProps extends Omit<RAC.GridListItemProps<object>, 'className' | 'style'> {
|
|
1314
|
+
children?: ReactNode;
|
|
1275
1315
|
}
|
|
1276
1316
|
declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
1277
1317
|
|
|
@@ -1566,14 +1606,14 @@ interface TilesProps extends GapSpaceProp, AriaRegionProps {
|
|
|
1566
1606
|
* Set minimum width for all items inside.
|
|
1567
1607
|
* @default '250px'
|
|
1568
1608
|
*/
|
|
1569
|
-
tilesWidth
|
|
1609
|
+
tilesWidth?: string;
|
|
1570
1610
|
/**
|
|
1571
1611
|
* 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.
|
|
1572
1612
|
* @default false
|
|
1573
1613
|
*/
|
|
1574
1614
|
stretch?: boolean;
|
|
1575
1615
|
/**
|
|
1576
|
-
* If true, all items will have the
|
|
1616
|
+
* If true, all items will have the height of the biggest item.
|
|
1577
1617
|
* @default false
|
|
1578
1618
|
*/
|
|
1579
1619
|
equalHeight?: boolean;
|
|
@@ -1637,25 +1677,30 @@ declare const CloseButton: ({ className }: CloseButtonProps) => react_jsx_runtim
|
|
|
1637
1677
|
interface TagProps extends RAC.TagProps {
|
|
1638
1678
|
variant?: string;
|
|
1639
1679
|
size?: string;
|
|
1680
|
+
children?: ReactNode;
|
|
1640
1681
|
}
|
|
1641
1682
|
declare const _Tag: {
|
|
1642
1683
|
({ variant, size, children, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
1643
1684
|
Group: ({ width, items, children, renderEmptyState, variant, size, ...rest }: TagGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1644
1685
|
};
|
|
1645
1686
|
|
|
1646
|
-
interface
|
|
1687
|
+
interface LoaderProps extends Pick<ProgressBarProps, 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'> {
|
|
1647
1688
|
/**
|
|
1648
|
-
*
|
|
1689
|
+
* Children of the component that will make up the label.
|
|
1690
|
+
*/
|
|
1691
|
+
children?: ReactNode;
|
|
1692
|
+
size?: string;
|
|
1693
|
+
variant?: string;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
interface XLoaderProps extends LoaderProps {
|
|
1697
|
+
/**
|
|
1698
|
+
* Show the loader in `fullsize` to overlay and block interaction with the site or `ìnline` to show loading for a certain area.
|
|
1649
1699
|
* @default undefined
|
|
1650
1700
|
*/
|
|
1651
|
-
mode?:
|
|
1701
|
+
mode?: 'fullsize' | 'inline';
|
|
1652
1702
|
}
|
|
1653
|
-
declare const
|
|
1654
|
-
readonly FullSize: "fullsize";
|
|
1655
|
-
readonly Inline: "inline";
|
|
1656
|
-
};
|
|
1657
|
-
type LoadingModeKeys = (typeof LoadingModes)[keyof typeof LoadingModes];
|
|
1658
|
-
declare const XLoader: react.ForwardRefExoticComponent<XLoaderProps & react.RefAttributes<SVGElement>>;
|
|
1703
|
+
declare const XLoader: ({ mode, variant, ...props }: XLoaderProps) => react_jsx_runtime.JSX.Element;
|
|
1659
1704
|
|
|
1660
1705
|
interface TabProps extends Omit<RAC.TabProps, 'className' | 'style'> {
|
|
1661
1706
|
}
|
|
@@ -1682,4 +1727,4 @@ declare const _Tabs: {
|
|
|
1682
1727
|
Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1683
1728
|
};
|
|
1684
1729
|
|
|
1685
|
-
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 };
|
|
1730
|
+
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
|
@@ -3,13 +3,13 @@ export { Selection } from '@react-types/shared';
|
|
|
3
3
|
export { useAsyncList, useListData } from '@react-stately/data';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import * as react from 'react';
|
|
6
|
-
import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
|
|
6
|
+
import react__default, { JSX, 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';
|
|
@@ -34,7 +34,7 @@ declare const Accordion: {
|
|
|
34
34
|
interface AccordionOwnItemProps<T> extends ItemProps<T> {
|
|
35
35
|
variant?: string;
|
|
36
36
|
size?: string;
|
|
37
|
-
title: string | ReactElement
|
|
37
|
+
title: string | ReactElement<any>;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
interface AccordionItemProps {
|
|
@@ -59,7 +59,7 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
59
59
|
/**
|
|
60
60
|
* The children of the component.
|
|
61
61
|
*/
|
|
62
|
-
children: [ReactElement
|
|
62
|
+
children: [ReactElement<any>, ReactElement<any>];
|
|
63
63
|
/**
|
|
64
64
|
* The side of the aside content.
|
|
65
65
|
* @default left
|
|
@@ -630,7 +630,7 @@ declare const Footer: ({ children, variant, size, ...props }: FooterProps) => re
|
|
|
630
630
|
|
|
631
631
|
interface GridAreaProps {
|
|
632
632
|
/**
|
|
633
|
-
* Name of the grid area slot
|
|
633
|
+
* Name of the grid area slot.
|
|
634
634
|
*/
|
|
635
635
|
name: string;
|
|
636
636
|
/**
|
|
@@ -705,8 +705,8 @@ declare const Inline: ({ space, alignX, alignY, children, ...props }: InlineProp
|
|
|
705
705
|
|
|
706
706
|
type RemovedProps$i = 'className' | 'style' | 'size';
|
|
707
707
|
interface InputProps extends Omit<RAC.InputProps, RemovedProps$i> {
|
|
708
|
-
icon?: ReactElement
|
|
709
|
-
action?: ReactElement
|
|
708
|
+
icon?: ReactElement<any>;
|
|
709
|
+
action?: ReactElement<any>;
|
|
710
710
|
variant?: string;
|
|
711
711
|
size?: string;
|
|
712
712
|
className?: string;
|
|
@@ -720,7 +720,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
720
720
|
/**
|
|
721
721
|
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
722
|
*/
|
|
723
|
-
action?: ReactElement
|
|
723
|
+
action?: ReactElement<any>;
|
|
724
724
|
/**
|
|
725
725
|
* If `true`, the date field is required.
|
|
726
726
|
* @default false
|
|
@@ -749,7 +749,7 @@ interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProp
|
|
|
749
749
|
}
|
|
750
750
|
declare const _DateField: react.ForwardRefExoticComponent<DateFieldProps & react.RefAttributes<HTMLInputElement>>;
|
|
751
751
|
|
|
752
|
-
type RemovedProps$g = 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
752
|
+
type RemovedProps$g = 'visibleDuration' | 'pageBehavior' | 'isDateUnavailable' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'errorMessage' | 'className' | 'style';
|
|
753
753
|
interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$g> {
|
|
754
754
|
/**
|
|
755
755
|
* Disables the Calendar.
|
|
@@ -763,9 +763,16 @@ interface CalendarProps extends Omit<RAC.CalendarProps<DateValue>, RemovedProps$
|
|
|
763
763
|
readOnly?: boolean;
|
|
764
764
|
variant?: string;
|
|
765
765
|
size?: string;
|
|
766
|
+
/**
|
|
767
|
+
* Width of the calendar.
|
|
768
|
+
*/
|
|
766
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'];
|
|
767
774
|
}
|
|
768
|
-
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;
|
|
769
776
|
|
|
770
777
|
type RemovedProps$f = 'isDisabled' | 'isDateUnavailable' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'style' | 'className' | 'isOpen';
|
|
771
778
|
interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedProps$f>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
@@ -968,9 +975,17 @@ interface SectionMessageProps {
|
|
|
968
975
|
* Adds a close button, makes the section message dismissable.
|
|
969
976
|
*/
|
|
970
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;
|
|
971
986
|
}
|
|
972
987
|
declare const SectionMessage: {
|
|
973
|
-
({ 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;
|
|
974
989
|
Title: ({ children }: SectionMessageTitleProps) => react_jsx_runtime.JSX.Element;
|
|
975
990
|
Content: ({ children, }: SectionMessageContentProps) => react_jsx_runtime.JSX.Element;
|
|
976
991
|
};
|
|
@@ -1048,6 +1063,34 @@ interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismis
|
|
|
1048
1063
|
}
|
|
1049
1064
|
declare const Underlay: ({ size, variant, open, dismissable, keyboardDismissable, ...rest }: UnderlayProps) => react_jsx_runtime.JSX.Element;
|
|
1050
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
|
+
|
|
1051
1094
|
interface MarigoldProviderProps<T extends Theme> extends ThemeProviderProps<T> {
|
|
1052
1095
|
}
|
|
1053
1096
|
declare function MarigoldProvider<T extends Theme>({ children, className, theme, }: MarigoldProviderProps<T>): react_jsx_runtime.JSX.Element;
|
|
@@ -1143,14 +1186,10 @@ interface RadioComponent extends ForwardRefExoticComponent<RadioProps & RefAttri
|
|
|
1143
1186
|
|
|
1144
1187
|
type RemovedProps$6 = 'className' | 'style' | 'children' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'value' | 'defaultValue';
|
|
1145
1188
|
interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
1146
|
-
/**
|
|
1147
|
-
* Icon element to display in the search field.
|
|
1148
|
-
*/
|
|
1149
|
-
icon?: ReactElement;
|
|
1150
1189
|
/**
|
|
1151
1190
|
* Action element to display in the search field.
|
|
1152
1191
|
*/
|
|
1153
|
-
action?: ReactElement
|
|
1192
|
+
action?: ReactElement<any>;
|
|
1154
1193
|
variant?: string;
|
|
1155
1194
|
size?: string;
|
|
1156
1195
|
/**
|
|
@@ -1272,6 +1311,7 @@ interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object>
|
|
|
1272
1311
|
declare const _Select: SelectComponent;
|
|
1273
1312
|
|
|
1274
1313
|
interface SelectListItemProps extends Omit<RAC.GridListItemProps<object>, 'className' | 'style'> {
|
|
1314
|
+
children?: ReactNode;
|
|
1275
1315
|
}
|
|
1276
1316
|
declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemProps & react.RefAttributes<HTMLDivElement>>;
|
|
1277
1317
|
|
|
@@ -1566,14 +1606,14 @@ interface TilesProps extends GapSpaceProp, AriaRegionProps {
|
|
|
1566
1606
|
* Set minimum width for all items inside.
|
|
1567
1607
|
* @default '250px'
|
|
1568
1608
|
*/
|
|
1569
|
-
tilesWidth
|
|
1609
|
+
tilesWidth?: string;
|
|
1570
1610
|
/**
|
|
1571
1611
|
* 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.
|
|
1572
1612
|
* @default false
|
|
1573
1613
|
*/
|
|
1574
1614
|
stretch?: boolean;
|
|
1575
1615
|
/**
|
|
1576
|
-
* If true, all items will have the
|
|
1616
|
+
* If true, all items will have the height of the biggest item.
|
|
1577
1617
|
* @default false
|
|
1578
1618
|
*/
|
|
1579
1619
|
equalHeight?: boolean;
|
|
@@ -1637,25 +1677,30 @@ declare const CloseButton: ({ className }: CloseButtonProps) => react_jsx_runtim
|
|
|
1637
1677
|
interface TagProps extends RAC.TagProps {
|
|
1638
1678
|
variant?: string;
|
|
1639
1679
|
size?: string;
|
|
1680
|
+
children?: ReactNode;
|
|
1640
1681
|
}
|
|
1641
1682
|
declare const _Tag: {
|
|
1642
1683
|
({ variant, size, children, ...props }: TagProps): react_jsx_runtime.JSX.Element;
|
|
1643
1684
|
Group: ({ width, items, children, renderEmptyState, variant, size, ...rest }: TagGroupProps) => react_jsx_runtime.JSX.Element;
|
|
1644
1685
|
};
|
|
1645
1686
|
|
|
1646
|
-
interface
|
|
1687
|
+
interface LoaderProps extends Pick<ProgressBarProps, 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'> {
|
|
1647
1688
|
/**
|
|
1648
|
-
*
|
|
1689
|
+
* Children of the component that will make up the label.
|
|
1690
|
+
*/
|
|
1691
|
+
children?: ReactNode;
|
|
1692
|
+
size?: string;
|
|
1693
|
+
variant?: string;
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
interface XLoaderProps extends LoaderProps {
|
|
1697
|
+
/**
|
|
1698
|
+
* Show the loader in `fullsize` to overlay and block interaction with the site or `ìnline` to show loading for a certain area.
|
|
1649
1699
|
* @default undefined
|
|
1650
1700
|
*/
|
|
1651
|
-
mode?:
|
|
1701
|
+
mode?: 'fullsize' | 'inline';
|
|
1652
1702
|
}
|
|
1653
|
-
declare const
|
|
1654
|
-
readonly FullSize: "fullsize";
|
|
1655
|
-
readonly Inline: "inline";
|
|
1656
|
-
};
|
|
1657
|
-
type LoadingModeKeys = (typeof LoadingModes)[keyof typeof LoadingModes];
|
|
1658
|
-
declare const XLoader: react.ForwardRefExoticComponent<XLoaderProps & react.RefAttributes<SVGElement>>;
|
|
1703
|
+
declare const XLoader: ({ mode, variant, ...props }: XLoaderProps) => react_jsx_runtime.JSX.Element;
|
|
1659
1704
|
|
|
1660
1705
|
interface TabProps extends Omit<RAC.TabProps, 'className' | 'style'> {
|
|
1661
1706
|
}
|
|
@@ -1682,4 +1727,4 @@ declare const _Tabs: {
|
|
|
1682
1727
|
Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
|
|
1683
1728
|
};
|
|
1684
1729
|
|
|
1685
|
-
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 };
|
|
1730
|
+
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 };
|