@marigold/components 4.1.4 → 4.2.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.ts +41 -32
- package/dist/index.js +799 -691
- package/dist/index.mjs +700 -588
- package/package.json +9 -6
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ export { Box, BoxOwnProps, BoxProps, StyleProps, ThemeProvider, useTheme } from
|
|
|
4
4
|
import React, { ReactNode, HTMLAttributes, LabelHTMLAttributes, Key, ForwardRefExoticComponent, RefAttributes, ReactElement } from 'react';
|
|
5
5
|
import { ComponentProps, PolymorphicPropsWithRef, PolymorphicComponentWithRef, NonZeroPercentage } from '@marigold/types';
|
|
6
6
|
import * as _react_types_shared from '@react-types/shared';
|
|
7
|
-
import { PressEvents, CollectionElement } from '@react-types/shared';
|
|
7
|
+
import { PressEvents, CollectionElement, StyleProps } from '@react-types/shared';
|
|
8
8
|
import { AriaCheckboxProps, AriaCheckboxGroupProps } from '@react-types/checkbox';
|
|
9
|
-
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
10
9
|
import { AriaDialogProps } from '@react-types/dialog';
|
|
11
10
|
import { SeparatorProps } from '@react-aria/separator';
|
|
12
11
|
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
@@ -16,12 +15,14 @@ import { AriaSelectProps } from '@react-types/select';
|
|
|
16
15
|
import { AriaSliderProps } from '@react-types/slider';
|
|
17
16
|
import { AriaSwitchProps } from '@react-types/switch';
|
|
18
17
|
import { AriaTableProps } from '@react-aria/table';
|
|
19
|
-
import { TableStateProps, TableBody, Cell, Column, TableHeader
|
|
18
|
+
import { TableStateProps, RowProps as RowProps$1, TableBody, Cell, Column, TableHeader } from '@react-stately/table';
|
|
20
19
|
import { AriaTextFieldProps } from '@react-types/textfield';
|
|
21
20
|
import { PositionProps } from '@react-types/overlays';
|
|
22
21
|
import { TooltipTriggerProps as TooltipTriggerProps$1 } from '@react-types/tooltip';
|
|
23
22
|
import { aspect, size } from '@marigold/tokens';
|
|
24
|
-
import {
|
|
23
|
+
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
24
|
+
import { OverlayProps as OverlayProps$1, AriaPopoverProps, AriaModalOverlayProps } from '@react-aria/overlays';
|
|
25
|
+
import { OverlayTriggerState } from '@react-stately/overlays';
|
|
25
26
|
export { SSRProvider } from '@react-aria/ssr';
|
|
26
27
|
export { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
27
28
|
|
|
@@ -87,8 +88,6 @@ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.Re
|
|
|
87
88
|
|
|
88
89
|
interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
89
90
|
error?: boolean;
|
|
90
|
-
variant?: string;
|
|
91
|
-
size?: string;
|
|
92
91
|
}
|
|
93
92
|
/**
|
|
94
93
|
* Needs to be falsy so we can check if a checkbox is used as standalone
|
|
@@ -96,8 +95,6 @@ interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
|
96
95
|
*/
|
|
97
96
|
declare const CheckboxGroupContext: React.Context<CheckboxGroupContextProps>;
|
|
98
97
|
declare const useCheckboxGroupContext: () => CheckboxGroupContextProps;
|
|
99
|
-
interface CheckboxGroupThemeExtension extends ThemeExtensionsWithParts<'CheckboxGroup', ['container', 'group']> {
|
|
100
|
-
}
|
|
101
98
|
interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, AriaCheckboxGroupProps {
|
|
102
99
|
children: ReactNode;
|
|
103
100
|
variant?: string;
|
|
@@ -111,7 +108,7 @@ interface CheckboxGroupProps extends Omit<ComponentProps<'div'>, 'onChange'>, Ar
|
|
|
111
108
|
defaultValue?: string[];
|
|
112
109
|
onChange?: (value: string[]) => void;
|
|
113
110
|
}
|
|
114
|
-
declare const CheckboxGroup: ({ children,
|
|
111
|
+
declare const CheckboxGroup: ({ children, required, disabled, readOnly, error, ...rest }: CheckboxGroupProps) => JSX.Element;
|
|
115
112
|
|
|
116
113
|
interface DialogTriggerProps {
|
|
117
114
|
children: [trigger: ReactNode, menu: ReactNode];
|
|
@@ -312,25 +309,37 @@ interface NumberFieldProps extends Omit<ComponentProps<'input'>, CustomProps>, O
|
|
|
312
309
|
}
|
|
313
310
|
declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
314
311
|
|
|
315
|
-
interface
|
|
316
|
-
children: ReactNode;
|
|
317
|
-
open?: boolean;
|
|
318
|
-
container?: HTMLElement;
|
|
319
|
-
}
|
|
320
|
-
declare const Overlay: ({ children, open, container, ...props }: OverlayProps) => JSX.Element | null;
|
|
321
|
-
|
|
322
|
-
interface PopoverProps extends Omit<AriaOverlayProps, 'isOpen' | 'isDismissable' | 'isKeyboardDismissDisabled'> {
|
|
312
|
+
interface ModalProps extends HTMLAttributes<HTMLElement> {
|
|
323
313
|
children?: ReactNode;
|
|
324
314
|
open?: boolean;
|
|
315
|
+
onClose?: () => void;
|
|
325
316
|
dismissable?: boolean;
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Adjust size of the popover. This is used to make the popover
|
|
329
|
-
* at least the same width as its anchor element.
|
|
330
|
-
*/
|
|
331
|
-
minWidth?: number | string;
|
|
317
|
+
keyboardDismissable?: boolean;
|
|
332
318
|
}
|
|
333
|
-
declare const
|
|
319
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
320
|
+
|
|
321
|
+
interface OverlayProps {
|
|
322
|
+
open: boolean;
|
|
323
|
+
children: OverlayProps$1['children'];
|
|
324
|
+
container?: OverlayProps$1['portalContainer'];
|
|
325
|
+
}
|
|
326
|
+
declare const Overlay: ({ children, container, open }: OverlayProps) => JSX.Element | null;
|
|
327
|
+
|
|
328
|
+
interface PopoverProps extends Pick<AriaPopoverProps, 'triggerRef' | 'scrollRef' | 'isNonModal'> {
|
|
329
|
+
keyboardDismissDisabled?: AriaPopoverProps['isKeyboardDismissDisabled'];
|
|
330
|
+
state: OverlayTriggerState;
|
|
331
|
+
children: ReactNode;
|
|
332
|
+
}
|
|
333
|
+
declare const Popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
|
|
334
|
+
|
|
335
|
+
interface TrayProps extends AriaModalOverlayProps, StyleProps, OverlayProps$1 {
|
|
336
|
+
children: ReactNode;
|
|
337
|
+
state: OverlayTriggerState;
|
|
338
|
+
}
|
|
339
|
+
interface TrayWrapperProps extends TrayProps {
|
|
340
|
+
}
|
|
341
|
+
declare const Tray: React.ForwardRefExoticComponent<TrayProps & React.RefAttributes<HTMLDivElement>>;
|
|
342
|
+
declare const TrayWrapper: React.ForwardRefExoticComponent<TrayWrapperProps & React.RefAttributes<HTMLDivElement>>;
|
|
334
343
|
|
|
335
344
|
interface UnderlayThemeExtension extends ThemeExtension<'Underlay'> {
|
|
336
345
|
}
|
|
@@ -340,19 +349,15 @@ interface UnderlayProps extends HTMLAttributes<HTMLElement> {
|
|
|
340
349
|
}
|
|
341
350
|
declare const Underlay: ({ size, variant, ...props }: UnderlayProps) => JSX.Element;
|
|
342
351
|
|
|
343
|
-
interface RadioGroupThemeExtension extends ThemeExtensionsWithParts<'RadioGroup', ['container', 'group']> {
|
|
344
|
-
}
|
|
345
352
|
interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'isDisabled' | 'isRquired' | 'isReadOnly ' | 'validationState'> {
|
|
346
353
|
children: ReactNode[];
|
|
347
|
-
variant?: string;
|
|
348
|
-
size?: string;
|
|
349
354
|
width?: string;
|
|
350
355
|
required?: boolean;
|
|
351
356
|
disabled?: boolean;
|
|
352
357
|
readOnly?: boolean;
|
|
353
358
|
error?: boolean;
|
|
354
359
|
}
|
|
355
|
-
declare const RadioGroup: ({ children, orientation,
|
|
360
|
+
declare const RadioGroup: ({ children, orientation, width, required, disabled, readOnly, error, ...rest }: RadioGroupProps) => JSX.Element;
|
|
356
361
|
|
|
357
362
|
interface RadioThemeExtension extends ThemeExtensionsWithParts<'Radio', ['container', 'label', 'radio']> {
|
|
358
363
|
}
|
|
@@ -449,6 +454,10 @@ interface TableProps extends Pick<AriaTableProps<object>, 'focusMode' | 'onRowAc
|
|
|
449
454
|
size?: string;
|
|
450
455
|
stretch?: boolean;
|
|
451
456
|
}
|
|
457
|
+
interface RowProps extends RowProps$1 {
|
|
458
|
+
variant?: string;
|
|
459
|
+
size?: string;
|
|
460
|
+
}
|
|
452
461
|
declare const Table: Table;
|
|
453
462
|
/**
|
|
454
463
|
* Necessary since TypeScript can not infer the
|
|
@@ -460,7 +469,7 @@ interface Table {
|
|
|
460
469
|
Cell: typeof Cell;
|
|
461
470
|
Column: typeof Column;
|
|
462
471
|
Header: typeof TableHeader;
|
|
463
|
-
Row:
|
|
472
|
+
Row: (props: RowProps) => JSX.Element;
|
|
464
473
|
}
|
|
465
474
|
|
|
466
475
|
interface TextThemeExtension extends ThemeExtension<'Text'> {
|
|
@@ -510,7 +519,7 @@ declare const Tooltip: {
|
|
|
510
519
|
Trigger: ({ disabled, open, delay, placement, children, ...rest }: TooltipTriggerProps) => JSX.Element;
|
|
511
520
|
};
|
|
512
521
|
|
|
513
|
-
interface ComponentStyles extends BadgeThemeExtension, ButtonThemeExtension, CardThemeExtension, CheckboxThemeExtension,
|
|
522
|
+
interface ComponentStyles extends BadgeThemeExtension, ButtonThemeExtension, CardThemeExtension, CheckboxThemeExtension, BodyThemeExtension, DialogThemeExtension, DividerThemeExtension, FieldThemeExtension, FooterThemeExtension, HeaderThemeExtension, HeadlineThemeExtension, HelpTextThemeExtension, ImageThemeExtension, InputThemeExtension, LabelThemeExtension, LinkThemeExtension, ListThemeExtension, ListBoxThemeExtension, MenuThemeExtension, MessageThemeExtension, NumberFieldThemeExtension, RadioThemeExtension, SelectThemeExtension, SliderThemeExtension, SwitchThemeExtension, TableThemeExtension, TextThemeExtension, TextAreaThemeExtension, TooltipThemeExtension, UnderlayThemeExtension {
|
|
514
523
|
}
|
|
515
524
|
interface Theme extends Theme$1 {
|
|
516
525
|
components: ComponentStyles;
|
|
@@ -652,4 +661,4 @@ declare const Tiles: ({ space, stretch, equalHeight, tilesWidth, children, ...pr
|
|
|
652
661
|
|
|
653
662
|
declare const XLoader: React.ForwardRefExoticComponent<SVGProps & React.RefAttributes<SVGElement>>;
|
|
654
663
|
|
|
655
|
-
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Body, BodyProps, BodyThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps,
|
|
664
|
+
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Body, BodyProps, BodyThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxProps, CheckboxThemeExtension, Columns, ColumnsProps, Container, ContainerProps, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreaEvents, CustomTextFieldEvents, CustomizedTheme, Dialog, DialogChildProps, DialogProps, DialogThemeExtension, Divider, DividerProps, DividerThemeExtension, Footer, FooterProps, FooterThemeExtension, Header, HeaderProps, HeaderThemeExtension, Headline, HeadlineProps, HeadlineThemeExtension, Image, ImageProps, ImageThemeExtension, Inline, InlineProps, Input, InputOwnProps, InputProps, InputThemeExtension, Label, LabelProps, LabelThemeExtension, Link, LinkOwnProps, LinkProps, LinkThemeExtension, List, ListProps, ListThemeExtension, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, MenuThemeExtension, Message, MessageProps, MessageThemeExtension, Modal, ModalProps, NumberField, NumberFieldProps, NumberFieldThemeExtension, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioComponent, RadioGroupProps, RadioProps, RadioThemeExtension, RowProps, Select, SelectComponent, SelectProps, SelectThemeExtension, Slider, SliderProps, SliderThemeExtension, Split, SplitProps, Stack, StackProps, Switch, SwitchProps, SwitchThemeExtension, Table, TableProps, TableThemeExtension, Text, TextArea, TextAreaProps, TextAreaThemeExtension, TextField, TextFieldProps, TextProps, TextThemeExtension, Theme, Tiles, TilesProps, Tooltip, TooltipProps, TooltipThemeExtension, Tray, TrayWrapper, Underlay, UnderlayProps, UnderlayThemeExtension, XLoader, extendTheme, useCheckboxGroupContext };
|