@marigold/components 7.5.4 → 7.7.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
  export { useAsyncList, useListData } from '@react-stately/data';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as react from 'react';
4
- import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1 } from 'react';
4
+ import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
5
5
  import { AriaAccordionProps } from '@react-aria/accordion';
6
6
  import { ItemElement, SelectionMode, ItemProps, Node, Orientation } from '@react-types/shared';
7
7
  import { TreeState } from '@react-stately/tree';
@@ -408,9 +408,17 @@ interface MenuItemProps extends Omit<RAC.MenuItemProps, RemovedProps$b> {
408
408
  onAction?: (key: Key$1) => void;
409
409
  }
410
410
 
411
+ interface PopoverProps extends Omit<RAC.PopoverProps, 'isOpen' | 'isKeyboardDismissDisabled' | 'style' | 'className'> {
412
+ keyboardDismissDisabled?: boolean;
413
+ open?: boolean;
414
+ container?: Element;
415
+ }
416
+ declare const _Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<HTMLDivElement>>;
417
+
411
418
  type RemovedProps$a = 'isOpen' | 'className' | 'style' | 'children';
412
419
  interface MenuProps extends Omit<RAC.MenuTriggerProps, RemovedProps$a>, Omit<RAC.MenuProps<object>, RemovedProps$a> {
413
420
  open?: RAC.MenuTriggerProps['isOpen'];
421
+ placement?: PopoverProps['placement'];
414
422
  label?: ReactNode;
415
423
  variant?: string;
416
424
  size?: string;
@@ -419,7 +427,7 @@ interface MenuProps extends Omit<RAC.MenuTriggerProps, RemovedProps$a>, Omit<RAC
419
427
  disabled?: boolean;
420
428
  }
421
429
  declare const _Menu: {
422
- ({ children, label, variant, size, disabled, open, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
430
+ ({ children, label, variant, size, disabled, open, placement, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
423
431
  Item: ({ children, ...props }: MenuItemProps) => react_jsx_runtime.JSX.Element;
424
432
  Section: ({ children, title, ...props }: MenuSectionProps) => react_jsx_runtime.JSX.Element;
425
433
  };
@@ -479,13 +487,6 @@ interface ModalProps extends RAC.ModalOverlayProps {
479
487
  }
480
488
  declare const _Modal: react.ForwardRefExoticComponent<Omit<ModalProps, "className" | "isOpen" | "isDismissable" | "isKeyboardDismissDisabled"> & react.RefAttributes<HTMLDivElement>>;
481
489
 
482
- interface PopoverProps extends Omit<RAC.PopoverProps, 'isOpen' | 'isKeyboardDismissDisabled' | 'style' | 'className'> {
483
- keyboardDismissDisabled?: boolean;
484
- open?: boolean;
485
- container?: Element;
486
- }
487
- declare const _Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<HTMLDivElement>>;
488
-
489
490
  interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled' | 'className'> {
490
491
  variant?: string;
491
492
  size?: string;
@@ -554,8 +555,8 @@ interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, P
554
555
  }
555
556
  declare const _SearchField: react.ForwardRefExoticComponent<SearchFieldProps & react.RefAttributes<HTMLInputElement>>;
556
557
 
557
- type RemoveProps = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
558
- interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps> {
558
+ type RemoveProps$1 = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
559
+ interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps$1> {
559
560
  label?: string;
560
561
  description?: string;
561
562
  errorMessage?: string | ((validation: ValidationResult) => string);
@@ -576,6 +577,19 @@ interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object>
576
577
  }
577
578
  declare const _Select: SelectComponent;
578
579
 
580
+ interface SelectListItemProps extends Omit<RAC.GridListItemProps<object>, 'className' | 'style'> {
581
+ }
582
+ declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemProps & react.RefAttributes<HTMLDivElement>>;
583
+
584
+ type RemoveProps = 'style' | 'className' | 'onSelectionChange';
585
+ interface GridListProps extends Omit<RAC.GridListProps<object>, RemoveProps> {
586
+ onChange?: RAC.GridListProps<object>['onSelectionChange'] | Dispatch<SetStateAction<any>>;
587
+ }
588
+ interface SelectListComponent extends ForwardRefExoticComponent<GridListProps & RefAttributes<HTMLUListElement>> {
589
+ Item: typeof _SelectListItem;
590
+ }
591
+ declare const _SelectList: SelectListComponent;
592
+
579
593
  interface ScrollableProps extends WidthProp {
580
594
  children?: ReactNode;
581
595
  height?: string;
@@ -620,6 +634,7 @@ interface TableProps extends Pick<AriaTableProps<object>, 'focusMode' | 'onRowAc
620
634
  size?: string;
621
635
  stretch?: boolean;
622
636
  stickyHeader?: boolean;
637
+ disableKeyboardNavigation?: boolean;
623
638
  }
624
639
  interface RowProps extends RowProps$1<any> {
625
640
  variant?: string;
@@ -752,4 +767,4 @@ declare const _Tabs: {
752
767
  Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
753
768
  };
754
769
 
755
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, 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, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, type CustomCheckboxProps, _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, _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, Message, type MessageProps, _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 RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, _Select as Select, type SelectComponent, 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, 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, _Calendar, useFieldGroupContext, usePortalContainer };
770
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, 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, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, type CustomCheckboxProps, _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, type GridListProps, _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, Message, type MessageProps, _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 RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, _Select as Select, type SelectComponent, _SelectList as SelectList, 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, 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, _Calendar, useFieldGroupContext, usePortalContainer };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { useAsyncList, useListData } from '@react-stately/data';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as react from 'react';
4
- import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1 } from 'react';
4
+ import react__default, { ReactElement, ReactNode, ElementType, ComponentPropsWithRef, ForwardRefExoticComponent, RefAttributes, Key as Key$1, Dispatch, SetStateAction } from 'react';
5
5
  import { AriaAccordionProps } from '@react-aria/accordion';
6
6
  import { ItemElement, SelectionMode, ItemProps, Node, Orientation } from '@react-types/shared';
7
7
  import { TreeState } from '@react-stately/tree';
@@ -408,9 +408,17 @@ interface MenuItemProps extends Omit<RAC.MenuItemProps, RemovedProps$b> {
408
408
  onAction?: (key: Key$1) => void;
409
409
  }
410
410
 
411
+ interface PopoverProps extends Omit<RAC.PopoverProps, 'isOpen' | 'isKeyboardDismissDisabled' | 'style' | 'className'> {
412
+ keyboardDismissDisabled?: boolean;
413
+ open?: boolean;
414
+ container?: Element;
415
+ }
416
+ declare const _Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<HTMLDivElement>>;
417
+
411
418
  type RemovedProps$a = 'isOpen' | 'className' | 'style' | 'children';
412
419
  interface MenuProps extends Omit<RAC.MenuTriggerProps, RemovedProps$a>, Omit<RAC.MenuProps<object>, RemovedProps$a> {
413
420
  open?: RAC.MenuTriggerProps['isOpen'];
421
+ placement?: PopoverProps['placement'];
414
422
  label?: ReactNode;
415
423
  variant?: string;
416
424
  size?: string;
@@ -419,7 +427,7 @@ interface MenuProps extends Omit<RAC.MenuTriggerProps, RemovedProps$a>, Omit<RAC
419
427
  disabled?: boolean;
420
428
  }
421
429
  declare const _Menu: {
422
- ({ children, label, variant, size, disabled, open, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
430
+ ({ children, label, variant, size, disabled, open, placement, ...props }: MenuProps): react_jsx_runtime.JSX.Element;
423
431
  Item: ({ children, ...props }: MenuItemProps) => react_jsx_runtime.JSX.Element;
424
432
  Section: ({ children, title, ...props }: MenuSectionProps) => react_jsx_runtime.JSX.Element;
425
433
  };
@@ -479,13 +487,6 @@ interface ModalProps extends RAC.ModalOverlayProps {
479
487
  }
480
488
  declare const _Modal: react.ForwardRefExoticComponent<Omit<ModalProps, "className" | "isOpen" | "isDismissable" | "isKeyboardDismissDisabled"> & react.RefAttributes<HTMLDivElement>>;
481
489
 
482
- interface PopoverProps extends Omit<RAC.PopoverProps, 'isOpen' | 'isKeyboardDismissDisabled' | 'style' | 'className'> {
483
- keyboardDismissDisabled?: boolean;
484
- open?: boolean;
485
- container?: Element;
486
- }
487
- declare const _Popover: react.ForwardRefExoticComponent<PopoverProps & react.RefAttributes<HTMLDivElement>>;
488
-
489
490
  interface UnderlayProps extends Omit<RAC.ModalOverlayProps, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled' | 'className'> {
490
491
  variant?: string;
491
492
  size?: string;
@@ -554,8 +555,8 @@ interface SearchFieldProps extends Omit<RAC.SearchFieldProps, RemovedProps$6>, P
554
555
  }
555
556
  declare const _SearchField: react.ForwardRefExoticComponent<SearchFieldProps & react.RefAttributes<HTMLInputElement>>;
556
557
 
557
- type RemoveProps = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
558
- interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps> {
558
+ type RemoveProps$1 = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
559
+ interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps$1> {
559
560
  label?: string;
560
561
  description?: string;
561
562
  errorMessage?: string | ((validation: ValidationResult) => string);
@@ -576,6 +577,19 @@ interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object>
576
577
  }
577
578
  declare const _Select: SelectComponent;
578
579
 
580
+ interface SelectListItemProps extends Omit<RAC.GridListItemProps<object>, 'className' | 'style'> {
581
+ }
582
+ declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemProps & react.RefAttributes<HTMLDivElement>>;
583
+
584
+ type RemoveProps = 'style' | 'className' | 'onSelectionChange';
585
+ interface GridListProps extends Omit<RAC.GridListProps<object>, RemoveProps> {
586
+ onChange?: RAC.GridListProps<object>['onSelectionChange'] | Dispatch<SetStateAction<any>>;
587
+ }
588
+ interface SelectListComponent extends ForwardRefExoticComponent<GridListProps & RefAttributes<HTMLUListElement>> {
589
+ Item: typeof _SelectListItem;
590
+ }
591
+ declare const _SelectList: SelectListComponent;
592
+
579
593
  interface ScrollableProps extends WidthProp {
580
594
  children?: ReactNode;
581
595
  height?: string;
@@ -620,6 +634,7 @@ interface TableProps extends Pick<AriaTableProps<object>, 'focusMode' | 'onRowAc
620
634
  size?: string;
621
635
  stretch?: boolean;
622
636
  stickyHeader?: boolean;
637
+ disableKeyboardNavigation?: boolean;
623
638
  }
624
639
  interface RowProps extends RowProps$1<any> {
625
640
  variant?: string;
@@ -752,4 +767,4 @@ declare const _Tabs: {
752
767
  Item: (props: TabProps) => react_jsx_runtime.JSX.Element;
753
768
  };
754
769
 
755
- export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, 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, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, type CustomCheckboxProps, _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, _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, Message, type MessageProps, _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 RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, _Select as Select, type SelectComponent, 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, 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, _Calendar, useFieldGroupContext, usePortalContainer };
770
+ export { Accordion, AccordionItem, type AccordionItemProps, type AccordionOwnItemProps, type AccordionProps, ActionMenu, 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, _CheckboxGroup as CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CloseButton, Columns, type ColumnsProps, _ComboBox as ComboBox, type ComboBoxProps, Container, type ContainerProps, type CustomCheckboxProps, _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, type GridListProps, _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, Message, type MessageProps, _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 RowProps, Scrollable, type ScrollableProps, _SearchField as SearchField, type SearchFieldProps, _Select as Select, type SelectComponent, _SelectList as SelectList, 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, 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, _Calendar, useFieldGroupContext, usePortalContainer };