@marigold/components 10.0.0 → 10.1.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 +19 -6
- package/dist/index.d.ts +19 -6
- package/dist/index.js +1012 -901
- package/dist/index.mjs +576 -465
- package/package.json +25 -25
package/dist/index.d.mts
CHANGED
|
@@ -66,11 +66,11 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
66
66
|
*/
|
|
67
67
|
side?: 'left' | 'right';
|
|
68
68
|
/**
|
|
69
|
-
* The
|
|
69
|
+
* The width of the side content.
|
|
70
70
|
*/
|
|
71
71
|
sideWidth?: string;
|
|
72
72
|
/**
|
|
73
|
-
* At
|
|
73
|
+
* At what percentage of the content's width should the other content wrap beneath it
|
|
74
74
|
* @default 50%
|
|
75
75
|
*/
|
|
76
76
|
wrap?: NonZeroPercentage;
|
|
@@ -118,7 +118,7 @@ interface FieldBaseProps<T extends ElementType> extends WidthProp, Pick<HelpText
|
|
|
118
118
|
isInvalid?: boolean;
|
|
119
119
|
isRequired?: boolean;
|
|
120
120
|
}
|
|
121
|
-
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => ReactNode;
|
|
121
|
+
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => React.ReactNode;
|
|
122
122
|
|
|
123
123
|
interface FieldGroupContextProps {
|
|
124
124
|
labelWidth?: string;
|
|
@@ -324,7 +324,7 @@ interface BodyProps extends Omit<HtmlProps<'section'>, 'className'> {
|
|
|
324
324
|
}
|
|
325
325
|
declare const Body: ({ children, variant, size, ...props }: BodyProps) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
type RemovedProps$l = 'isDisabled';
|
|
327
|
+
type RemovedProps$l = 'isDisabled' | 'isPending';
|
|
328
328
|
interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
329
329
|
variant?: string;
|
|
330
330
|
size?: string;
|
|
@@ -346,6 +346,11 @@ interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
|
346
346
|
* @default false
|
|
347
347
|
*/
|
|
348
348
|
disabled?: RAC.ButtonProps['isDisabled'];
|
|
349
|
+
/**
|
|
350
|
+
* Whether the button is in a loading state.
|
|
351
|
+
* This disables press and hover events while retaining focusability, and announces the loading state to screen readers.
|
|
352
|
+
*/
|
|
353
|
+
loading?: RAC.ButtonProps['isPending'];
|
|
349
354
|
}
|
|
350
355
|
declare const _Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
351
356
|
|
|
@@ -712,6 +717,9 @@ type RemovedProps$h = 'className' | 'isRequired' | 'isDisabled' | 'isInvalid' |
|
|
|
712
717
|
interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProps$h>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
713
718
|
variant?: string;
|
|
714
719
|
size?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
|
+
*/
|
|
715
723
|
action?: ReactElement;
|
|
716
724
|
/**
|
|
717
725
|
* If `true`, the date field is required.
|
|
@@ -1294,9 +1302,9 @@ interface ScrollableProps extends WidthProp, AriaRegionProps {
|
|
|
1294
1302
|
}
|
|
1295
1303
|
declare const Scrollable: ({ children, width, height, ...props }: ScrollableProps) => react_jsx_runtime.JSX.Element;
|
|
1296
1304
|
|
|
1297
|
-
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'> {
|
|
1305
|
+
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'orientation'>, Pick<FieldBaseProps<'label'>, 'description'> {
|
|
1298
1306
|
/**
|
|
1299
|
-
* Labels for the thumbs in the slider.
|
|
1307
|
+
* Labels for the thumbs in the slider. Also used for the name when submitting the form.
|
|
1300
1308
|
*/
|
|
1301
1309
|
thumbLabels?: string[];
|
|
1302
1310
|
/**
|
|
@@ -1311,6 +1319,11 @@ interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'
|
|
|
1311
1319
|
* @default false
|
|
1312
1320
|
*/
|
|
1313
1321
|
disabled?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* @deprecated Will be removed in the next major version. Use `label` prop instead.
|
|
1324
|
+
*/
|
|
1325
|
+
children?: ReactNode;
|
|
1326
|
+
label?: string;
|
|
1314
1327
|
}
|
|
1315
1328
|
declare const _Slider: react__default.ForwardRefExoticComponent<SliderProps<number | number[]> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1316
1329
|
|
package/dist/index.d.ts
CHANGED
|
@@ -66,11 +66,11 @@ interface AsideProps extends GapSpaceProp, AriaRegionProps {
|
|
|
66
66
|
*/
|
|
67
67
|
side?: 'left' | 'right';
|
|
68
68
|
/**
|
|
69
|
-
* The
|
|
69
|
+
* The width of the side content.
|
|
70
70
|
*/
|
|
71
71
|
sideWidth?: string;
|
|
72
72
|
/**
|
|
73
|
-
* At
|
|
73
|
+
* At what percentage of the content's width should the other content wrap beneath it
|
|
74
74
|
* @default 50%
|
|
75
75
|
*/
|
|
76
76
|
wrap?: NonZeroPercentage;
|
|
@@ -118,7 +118,7 @@ interface FieldBaseProps<T extends ElementType> extends WidthProp, Pick<HelpText
|
|
|
118
118
|
isInvalid?: boolean;
|
|
119
119
|
isRequired?: boolean;
|
|
120
120
|
}
|
|
121
|
-
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => ReactNode;
|
|
121
|
+
declare const FieldBase: <T extends ElementType>(props: FieldBaseProps<T> & DistributiveOmit<ComponentPropsWithRef<T>, "as"> & react.RefAttributes<any>) => React.ReactNode;
|
|
122
122
|
|
|
123
123
|
interface FieldGroupContextProps {
|
|
124
124
|
labelWidth?: string;
|
|
@@ -324,7 +324,7 @@ interface BodyProps extends Omit<HtmlProps<'section'>, 'className'> {
|
|
|
324
324
|
}
|
|
325
325
|
declare const Body: ({ children, variant, size, ...props }: BodyProps) => react_jsx_runtime.JSX.Element;
|
|
326
326
|
|
|
327
|
-
type RemovedProps$l = 'isDisabled';
|
|
327
|
+
type RemovedProps$l = 'isDisabled' | 'isPending';
|
|
328
328
|
interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
329
329
|
variant?: string;
|
|
330
330
|
size?: string;
|
|
@@ -346,6 +346,11 @@ interface ButtonProps extends Omit<RAC.ButtonProps, RemovedProps$l> {
|
|
|
346
346
|
* @default false
|
|
347
347
|
*/
|
|
348
348
|
disabled?: RAC.ButtonProps['isDisabled'];
|
|
349
|
+
/**
|
|
350
|
+
* Whether the button is in a loading state.
|
|
351
|
+
* This disables press and hover events while retaining focusability, and announces the loading state to screen readers.
|
|
352
|
+
*/
|
|
353
|
+
loading?: RAC.ButtonProps['isPending'];
|
|
349
354
|
}
|
|
350
355
|
declare const _Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
351
356
|
|
|
@@ -712,6 +717,9 @@ type RemovedProps$h = 'className' | 'isRequired' | 'isDisabled' | 'isInvalid' |
|
|
|
712
717
|
interface DateFieldProps extends Omit<RAC.DateFieldProps<DateValue>, RemovedProps$h>, Pick<FieldBaseProps<'label'>, 'label' | 'description' | 'errorMessage'> {
|
|
713
718
|
variant?: string;
|
|
714
719
|
size?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Optional element (e.g., button or icon) rendered inside the DateField.
|
|
722
|
+
*/
|
|
715
723
|
action?: ReactElement;
|
|
716
724
|
/**
|
|
717
725
|
* If `true`, the date field is required.
|
|
@@ -1294,9 +1302,9 @@ interface ScrollableProps extends WidthProp, AriaRegionProps {
|
|
|
1294
1302
|
}
|
|
1295
1303
|
declare const Scrollable: ({ children, width, height, ...props }: ScrollableProps) => react_jsx_runtime.JSX.Element;
|
|
1296
1304
|
|
|
1297
|
-
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'> {
|
|
1305
|
+
interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'orientation'>, Pick<FieldBaseProps<'label'>, 'description'> {
|
|
1298
1306
|
/**
|
|
1299
|
-
* Labels for the thumbs in the slider.
|
|
1307
|
+
* Labels for the thumbs in the slider. Also used for the name when submitting the form.
|
|
1300
1308
|
*/
|
|
1301
1309
|
thumbLabels?: string[];
|
|
1302
1310
|
/**
|
|
@@ -1311,6 +1319,11 @@ interface SliderProps<T> extends Omit<RAC.SliderProps<T>, 'isDisabled' | 'label'
|
|
|
1311
1319
|
* @default false
|
|
1312
1320
|
*/
|
|
1313
1321
|
disabled?: boolean;
|
|
1322
|
+
/**
|
|
1323
|
+
* @deprecated Will be removed in the next major version. Use `label` prop instead.
|
|
1324
|
+
*/
|
|
1325
|
+
children?: ReactNode;
|
|
1326
|
+
label?: string;
|
|
1314
1327
|
}
|
|
1315
1328
|
declare const _Slider: react__default.ForwardRefExoticComponent<SliderProps<number | number[]> & react__default.RefAttributes<HTMLDivElement>>;
|
|
1316
1329
|
|