@marigold/components 4.2.0 → 4.2.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.ts +21 -8
- package/dist/index.js +380 -353
- package/dist/index.mjs +326 -303
- package/package.json +43 -43
package/dist/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ interface CheckboxThemeExtension extends ThemeExtensionsWithParts<'Checkbox', [
|
|
|
78
78
|
* `react-aria` has a slightly different API for the above events.
|
|
79
79
|
* Thus, we adjust our regular props to match them.
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
type CustomCheckboxProps = 'value' | 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp';
|
|
82
82
|
interface CheckboxProps extends ThemeComponentProps, Omit<ComponentProps<'input'>, 'size' | 'type' | 'defaultValue' | CustomCheckboxProps>, Pick<AriaCheckboxProps, CustomCheckboxProps> {
|
|
83
83
|
children?: ReactNode;
|
|
84
84
|
indeterminate?: boolean;
|
|
@@ -152,8 +152,9 @@ interface LabelProps extends ComponentProps<'label'> {
|
|
|
152
152
|
variant?: string;
|
|
153
153
|
size?: string;
|
|
154
154
|
required?: boolean;
|
|
155
|
+
labelWidth?: string;
|
|
155
156
|
}
|
|
156
|
-
declare const Label: ({ as, required, children, variant, size, ...props }: LabelProps) => JSX.Element;
|
|
157
|
+
declare const Label: ({ as, required, children, variant, size, labelWidth, ...props }: LabelProps) => JSX.Element;
|
|
157
158
|
|
|
158
159
|
interface FieldBaseProps {
|
|
159
160
|
children?: ReactNode;
|
|
@@ -173,6 +174,18 @@ interface FieldBaseProps {
|
|
|
173
174
|
}
|
|
174
175
|
interface FieldThemeExtension extends ThemeExtension<'Field'> {
|
|
175
176
|
}
|
|
177
|
+
declare const FieldBase: ({ children, variant, size, width, disabled, required, label, labelProps, description, descriptionProps, error, errorMessage, errorMessageProps, stateProps, ...props }: FieldBaseProps) => JSX.Element;
|
|
178
|
+
|
|
179
|
+
interface FieldGroupContextProps {
|
|
180
|
+
labelWidth?: string;
|
|
181
|
+
}
|
|
182
|
+
declare const FieldGroupContext: React.Context<FieldGroupContextProps>;
|
|
183
|
+
declare const useFieldGroupContext: () => FieldGroupContextProps;
|
|
184
|
+
interface FieldGroupProps {
|
|
185
|
+
labelWidth?: string;
|
|
186
|
+
children: ReactNode;
|
|
187
|
+
}
|
|
188
|
+
declare const FieldGroup: ({ labelWidth, children }: FieldGroupProps) => JSX.Element;
|
|
176
189
|
|
|
177
190
|
interface FooterThemeExtension extends ThemeExtension<'Footer'> {
|
|
178
191
|
}
|
|
@@ -300,7 +313,7 @@ interface NumberFieldThemeExtension extends ThemeExtensionsWithParts<'NumberFiel
|
|
|
300
313
|
* `react-aria` has a slightly different API for some DOM props.
|
|
301
314
|
* Thus, we adjust our regular props to match them.
|
|
302
315
|
*/
|
|
303
|
-
|
|
316
|
+
type CustomProps = 'size' | 'width' | 'type' | 'value' | 'defaultValue' | 'step' | 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp' | 'min' | 'max';
|
|
304
317
|
interface NumberFieldProps extends Omit<ComponentProps<'input'>, CustomProps>, Omit<AriaNumberFieldProps, 'isDisabled' | 'isRequired' | 'isReadOnly'>, Pick<FieldBaseProps, 'label' | 'description' | 'error' | 'errorMessage'> {
|
|
305
318
|
variant?: string;
|
|
306
319
|
size?: string;
|
|
@@ -361,7 +374,7 @@ declare const RadioGroup: ({ children, orientation, width, required, disabled, r
|
|
|
361
374
|
|
|
362
375
|
interface RadioThemeExtension extends ThemeExtensionsWithParts<'Radio', ['container', 'label', 'radio']> {
|
|
363
376
|
}
|
|
364
|
-
|
|
377
|
+
type CustomRadioProps = 'size' | 'width' | 'type' | 'defaultChecked' | 'value' | 'onFocus' | 'onBlur' | 'onKeyUp' | 'onKeyDown';
|
|
365
378
|
interface RadioProps extends ThemeComponentProps, Omit<ComponentProps<'input'>, CustomRadioProps>, AriaRadioProps {
|
|
366
379
|
width?: string;
|
|
367
380
|
disabled?: boolean;
|
|
@@ -433,7 +446,7 @@ interface SwitchThemeExtension extends ThemeExtensionsWithParts<'Switch', [
|
|
|
433
446
|
'thumb'
|
|
434
447
|
]> {
|
|
435
448
|
}
|
|
436
|
-
|
|
449
|
+
type CustomSwitchProps = 'size' | 'value' | 'onBlur' | 'onChange' | 'onFocus' | 'onKeyDown' | 'onKeyUp';
|
|
437
450
|
interface SwitchProps extends Omit<AriaSwitchProps, 'isSelected'>, Omit<ComponentProps<'input'>, CustomSwitchProps> {
|
|
438
451
|
checked?: boolean;
|
|
439
452
|
variant?: string;
|
|
@@ -491,7 +504,7 @@ interface TextAreaThemeExtension extends ThemeExtension<'TextArea'> {
|
|
|
491
504
|
* `react-aria` has a slightly different API for the above events.
|
|
492
505
|
* Thus, we adjust our regular props to match them.
|
|
493
506
|
*/
|
|
494
|
-
|
|
507
|
+
type CustomTextAreaEvents = 'onChange' | 'onFocus' | 'onBlur' | 'onCopy' | 'onSelect' | 'onPaste' | 'onCut' | 'onCompositionStart' | 'onCompositionUpdate' | 'onCompositionEnd' | 'onBeforeInput' | 'onInput' | 'onKeyDown' | 'onKeyUp';
|
|
495
508
|
interface TextAreaProps extends Omit<ComponentProps<'textarea'>, 'value' | 'defaultValue' | 'size' | CustomTextAreaEvents>, Pick<AriaTextFieldProps, CustomTextAreaEvents>, Pick<FieldBaseProps, 'label' | 'description' | 'error' | 'errorMessage'> {
|
|
496
509
|
variant?: string;
|
|
497
510
|
size?: string;
|
|
@@ -635,7 +648,7 @@ declare const Stack: ({ children, space, alignX, alignY, stretch, ...props }: St
|
|
|
635
648
|
* `react-aria` has a slightly different API for the above events.
|
|
636
649
|
* Thus, we adjust our regular props to match them.
|
|
637
650
|
*/
|
|
638
|
-
|
|
651
|
+
type CustomTextFieldEvents = 'onChange' | 'onFocus' | 'onBlur' | 'onKeyDown' | 'onKeyUp';
|
|
639
652
|
interface TextFieldProps extends Omit<ComponentProps<'input'>, 'value' | 'defaultValue' | 'size' | 'width' | CustomTextFieldEvents>,
|
|
640
653
|
/**
|
|
641
654
|
* `react-aria` has a slightly different API for `onChange`, `onFocus`
|
|
@@ -661,4 +674,4 @@ declare const Tiles: ({ space, stretch, equalHeight, tilesWidth, children, ...pr
|
|
|
661
674
|
|
|
662
675
|
declare const XLoader: React.ForwardRefExoticComponent<SVGProps & React.RefAttributes<SVGElement>>;
|
|
663
676
|
|
|
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 };
|
|
677
|
+
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, FieldBase, FieldBaseProps, FieldGroup, FieldGroupContext, FieldGroupContextProps, FieldGroupProps, FieldThemeExtension, 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, useFieldGroupContext };
|