@marigold/components 1.1.1 → 1.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 +32 -28
- package/dist/index.js +776 -886
- package/dist/index.mjs +803 -912
- package/package.json +51 -51
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeExtension, ThemeComponentProps, ThemeExtensionsWithParts, BoxOwnProps, StateAttrProps, CSSObject, Theme as Theme$1, ResponsiveStyleValue, ThemeProviderProps, GlobalProps } from '@marigold/system';
|
|
2
2
|
export { Box, BoxOwnProps, BoxProps, StyleProps, ThemeProvider, useTheme } from '@marigold/system';
|
|
3
|
-
import React, { ReactNode, HTMLAttributes, Key, LabelHTMLAttributes, ReactElement, ReactChild } from 'react';
|
|
3
|
+
import React, { ReactNode, HTMLAttributes, Key, LabelHTMLAttributes, ForwardRefExoticComponent, RefAttributes, ReactElement, ReactChild } from 'react';
|
|
4
4
|
import { ComponentProps, PolymorphicPropsWithRef, PolymorphicComponentWithRef, PolymorphicProps, PolymorphicComponent, NonZeroPercentage } from '@marigold/types';
|
|
5
5
|
import * as _react_types_shared from '@react-types/shared';
|
|
6
6
|
import { PressEvents, CollectionElement } from '@react-types/shared';
|
|
@@ -10,6 +10,7 @@ import { AriaDialogProps } from '@react-types/dialog';
|
|
|
10
10
|
import { SeparatorProps } from '@react-aria/separator';
|
|
11
11
|
import { AriaNumberFieldProps } from '@react-types/numberfield';
|
|
12
12
|
import { AriaRadioGroupProps, AriaRadioProps } from '@react-types/radio';
|
|
13
|
+
import { Item, Section } from '@react-stately/collections';
|
|
13
14
|
import { AriaSelectProps } from '@react-types/select';
|
|
14
15
|
import { AriaSliderProps } from '@react-types/slider';
|
|
15
16
|
import { AriaSwitchProps } from '@react-types/switch';
|
|
@@ -23,16 +24,6 @@ import { OverlayProps as OverlayProps$1 } from '@react-aria/overlays';
|
|
|
23
24
|
export { SSRProvider } from '@react-aria/ssr';
|
|
24
25
|
export { VisuallyHidden } from '@react-aria/visually-hidden';
|
|
25
26
|
|
|
26
|
-
interface RootThemeExtension<Value> {
|
|
27
|
-
root?: {
|
|
28
|
-
body?: Value;
|
|
29
|
-
html?: Value;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
interface MarigoldProviderProps<T extends Theme$1> extends ThemeProviderProps<T> {
|
|
33
|
-
}
|
|
34
|
-
declare function MarigoldProvider<T extends Theme$1>({ theme, children, }: MarigoldProviderProps<T>): JSX.Element;
|
|
35
|
-
|
|
36
27
|
interface BadgeThemeExtension extends ThemeExtension<'Badge'> {
|
|
37
28
|
}
|
|
38
29
|
interface BadgeProps extends ComponentProps<'div'> {
|
|
@@ -76,7 +67,7 @@ interface CheckboxProps extends ThemeComponentProps, Omit<ComponentProps<'input'
|
|
|
76
67
|
indeterminate?: boolean;
|
|
77
68
|
error?: boolean;
|
|
78
69
|
}
|
|
79
|
-
declare const Checkbox:
|
|
70
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
80
71
|
|
|
81
72
|
interface CheckboxGroupContextProps extends CheckboxGroupState {
|
|
82
73
|
error?: boolean;
|
|
@@ -328,6 +319,7 @@ interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'isDisabled' | 'isRq
|
|
|
328
319
|
readOnly?: boolean;
|
|
329
320
|
error?: boolean;
|
|
330
321
|
}
|
|
322
|
+
declare const RadioGroup: ({ children, orientation, size, variant, width, required, disabled, readOnly, error, ...rest }: RadioGroupProps) => JSX.Element;
|
|
331
323
|
|
|
332
324
|
interface RadioThemeExtension extends ThemeExtensionsWithParts<'Radio', ['container', 'label', 'radio']> {
|
|
333
325
|
}
|
|
@@ -336,10 +328,14 @@ interface RadioProps extends ThemeComponentProps, Omit<ComponentProps<'input'>,
|
|
|
336
328
|
width?: string;
|
|
337
329
|
disabled?: boolean;
|
|
338
330
|
}
|
|
339
|
-
declare const Radio:
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
331
|
+
declare const Radio: RadioComponent;
|
|
332
|
+
/**
|
|
333
|
+
* We need this so that TypeScripts allows us to add
|
|
334
|
+
* additional properties to the component (function).
|
|
335
|
+
*/
|
|
336
|
+
interface RadioComponent extends ForwardRefExoticComponent<RadioProps & RefAttributes<HTMLInputElement>> {
|
|
337
|
+
Group: typeof RadioGroup;
|
|
338
|
+
}
|
|
343
339
|
|
|
344
340
|
interface SelectThemeExtension extends ThemeExtensionsWithParts<'Select', ['container', 'button', 'icon']> {
|
|
345
341
|
}
|
|
@@ -352,11 +348,15 @@ interface SelectProps extends Omit<AriaSelectProps<object>, 'autoComplete' | 'is
|
|
|
352
348
|
required?: boolean;
|
|
353
349
|
error?: boolean;
|
|
354
350
|
}
|
|
355
|
-
declare const Select:
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
351
|
+
declare const Select: SelectComponent;
|
|
352
|
+
/**
|
|
353
|
+
* We need this so that TypeScripts allows us to add
|
|
354
|
+
* additional properties to the component (function).
|
|
355
|
+
*/
|
|
356
|
+
interface SelectComponent extends ForwardRefExoticComponent<SelectProps & RefAttributes<HTMLButtonElement>> {
|
|
357
|
+
Option: typeof Item;
|
|
358
|
+
Section: typeof Section;
|
|
359
|
+
}
|
|
360
360
|
|
|
361
361
|
/**
|
|
362
362
|
* Thanks to react-aria: https://react-spectrum.adobe.com/react-aria/useSlider.html
|
|
@@ -386,7 +386,7 @@ Pick<AriaSliderProps, 'maxValue' | 'step' | 'value' | 'defaultValue' | 'onChange
|
|
|
386
386
|
* A label + the output value and the slider functionality itself.
|
|
387
387
|
* The slider itself consists of a track line and a thumb.
|
|
388
388
|
*/
|
|
389
|
-
declare const Slider:
|
|
389
|
+
declare const Slider: React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>;
|
|
390
390
|
|
|
391
391
|
interface SwitchThemeExtension extends ThemeExtensionsWithParts<'Switch', [
|
|
392
392
|
'container',
|
|
@@ -402,7 +402,7 @@ interface SwitchProps extends Omit<AriaSwitchProps, 'isSelected'>, Omit<Componen
|
|
|
402
402
|
size?: string;
|
|
403
403
|
width?: string;
|
|
404
404
|
}
|
|
405
|
-
declare const Switch:
|
|
405
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLInputElement>>;
|
|
406
406
|
|
|
407
407
|
interface TableThemeExtension extends ThemeExtensionsWithParts<'Table', [
|
|
408
408
|
'table',
|
|
@@ -456,7 +456,7 @@ interface TextAreaProps extends Omit<ComponentProps<'textarea'>, 'value' | 'defa
|
|
|
456
456
|
value?: string;
|
|
457
457
|
defaultValue?: string;
|
|
458
458
|
}
|
|
459
|
-
declare const TextArea:
|
|
459
|
+
declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
460
460
|
|
|
461
461
|
interface TooltipTriggerProps extends Omit<TooltipTriggerProps$1, 'isDisabled' | 'isOpen'>, Omit<PositionProps, 'isOpen'> {
|
|
462
462
|
children: [trigger: ReactElement, menu: ReactElement];
|
|
@@ -478,7 +478,7 @@ declare const Tooltip: {
|
|
|
478
478
|
|
|
479
479
|
interface ComponentStyles extends BadgeThemeExtension, ButtonThemeExtension, CardThemeExtension, CheckboxThemeExtension, CheckboxGroupThemeExtension, ContentThemeExtension, DialogThemeExtension, DividerThemeExtension, FooterThemeExtension, HeaderThemeExtension, HeadlineThemeExtension, HelpTextThemeExtension, ImageThemeExtension, InputThemeExtension, LabelThemeExtension, LinkThemeExtension, ListBoxThemeExtension, MenuThemeExtension, MessageThemeExtension, NumberFieldThemeExtension, RadioThemeExtension, RadioGroupThemeExtension, SelectThemeExtension, SliderThemeExtension, SwitchThemeExtension, TableThemeExtension, TextThemeExtension, TextAreaThemeExtension, TooltipThemeExtension, UnderlayThemeExtension {
|
|
480
480
|
}
|
|
481
|
-
interface Theme extends Theme$1
|
|
481
|
+
interface Theme extends Theme$1 {
|
|
482
482
|
components: ComponentStyles;
|
|
483
483
|
}
|
|
484
484
|
|
|
@@ -553,6 +553,10 @@ interface InlineProps {
|
|
|
553
553
|
}
|
|
554
554
|
declare const Inline: ({ space, alignX, alignY, children, ...props }: InlineProps) => JSX.Element;
|
|
555
555
|
|
|
556
|
+
interface MarigoldProviderProps<T extends Theme$1> extends ThemeProviderProps<T>, GlobalProps {
|
|
557
|
+
}
|
|
558
|
+
declare function MarigoldProvider<T extends Theme$1>({ children, theme, selector, normalizeDocument, }: MarigoldProviderProps<T>): JSX.Element;
|
|
559
|
+
|
|
556
560
|
interface SplitProps extends ComponentProps<'div'> {
|
|
557
561
|
}
|
|
558
562
|
declare const Split: (props: SplitProps) => JSX.Element;
|
|
@@ -589,7 +593,7 @@ Pick<AriaTextFieldProps, 'onChange' | 'onFocus' | 'onBlur'>, Pick<FieldBaseProps
|
|
|
589
593
|
value?: string;
|
|
590
594
|
defaultValue?: string;
|
|
591
595
|
}
|
|
592
|
-
declare const TextField:
|
|
596
|
+
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
593
597
|
|
|
594
598
|
interface TilesProps {
|
|
595
599
|
children: ReactNode;
|
|
@@ -598,4 +602,4 @@ interface TilesProps {
|
|
|
598
602
|
}
|
|
599
603
|
declare const Tiles: React.ForwardRefExoticComponent<TilesProps & React.RefAttributes<HTMLDivElement>>;
|
|
600
604
|
|
|
601
|
-
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupThemeExtension, CheckboxProps, CheckboxThemeExtension, Columns, ColumnsProps, Container, ContainerProps, Content, ContentProps, ContentThemeExtension, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreEvents, 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, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, MenuThemeExtension, Message, MessageProps, MessageThemeExtension, NumberField, NumberFieldProps, NumberFieldThemeExtension, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioGroupProps, RadioGroupThemeExtension, RadioProps, RadioThemeExtension,
|
|
605
|
+
export { Aside, AsideProps, Aspect, AspectProps, Badge, BadgeProps, BadgeThemeExtension, Breakout, BreakoutProps, Button, ButtonOwnProps, ButtonProps, ButtonThemeExtension, Card, CardProps, CardThemeExtension, Center, CenterProps, Checkbox, CheckboxGroup, CheckboxGroupContext, CheckboxGroupContextProps, CheckboxGroupThemeExtension, CheckboxProps, CheckboxThemeExtension, Columns, ColumnsProps, Container, ContainerProps, Content, ContentProps, ContentThemeExtension, CustomCheckboxProps, CustomRadioProps, CustomSwitchProps, CustomTextAreEvents, 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, MarigoldProvider, MarigoldProviderProps, Menu, MenuProps, MenuThemeExtension, Message, MessageProps, MessageThemeExtension, NumberField, NumberFieldProps, NumberFieldThemeExtension, Overlay, OverlayProps, Popover, PopoverProps, Radio, RadioComponent, RadioGroupProps, RadioGroupThemeExtension, RadioProps, RadioThemeExtension, 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, Underlay, UnderlayProps, UnderlayThemeExtension, useCheckboxGroupContext };
|