@marigold/components 8.0.0 → 8.0.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.mts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +420 -397
- package/dist/index.mjs +285 -262
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -122,6 +122,9 @@ interface FieldGroupContextProps {
|
|
|
122
122
|
declare const FieldGroupContext: react.Context<FieldGroupContextProps>;
|
|
123
123
|
declare const useFieldGroupContext: () => FieldGroupContextProps;
|
|
124
124
|
interface FieldGroupProps {
|
|
125
|
+
/**
|
|
126
|
+
* Sets the width of all Fields labels used inside the `FieldGroup`
|
|
127
|
+
*/
|
|
125
128
|
labelWidth?: string;
|
|
126
129
|
children: ReactNode;
|
|
127
130
|
}
|
|
@@ -684,7 +687,7 @@ interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedPr
|
|
|
684
687
|
*/
|
|
685
688
|
width?: WidthProp['width'];
|
|
686
689
|
}
|
|
687
|
-
declare const _DatePicker:
|
|
690
|
+
declare const _DatePicker: react__default.ForwardRefExoticComponent<DatePickerProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
688
691
|
|
|
689
692
|
type InsetProps = {
|
|
690
693
|
/**
|
|
@@ -1059,22 +1062,75 @@ declare const _SearchField: react.ForwardRefExoticComponent<SearchFieldProps & r
|
|
|
1059
1062
|
|
|
1060
1063
|
type RemoveProps$1 = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
|
|
1061
1064
|
interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps$1> {
|
|
1065
|
+
/**
|
|
1066
|
+
* Set a label for the select.
|
|
1067
|
+
*/
|
|
1062
1068
|
label?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Set a description for the select.
|
|
1071
|
+
*/
|
|
1063
1072
|
description?: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* Set a error message for the select.
|
|
1075
|
+
*/
|
|
1064
1076
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
1077
|
+
/**
|
|
1078
|
+
* Items of the select.
|
|
1079
|
+
*/
|
|
1065
1080
|
items?: Iterable<T>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Children of the select.
|
|
1083
|
+
*/
|
|
1066
1084
|
children: React.ReactNode | ((item: T) => React.ReactNode);
|
|
1085
|
+
/**
|
|
1086
|
+
* sets the variant of the select.
|
|
1087
|
+
*/
|
|
1067
1088
|
variant?: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* Sets the size of the select.
|
|
1091
|
+
*/
|
|
1068
1092
|
size?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Sets the width of the field. You can see allowed tokens here: https://tailwindcss.com/docs/width
|
|
1095
|
+
*/
|
|
1069
1096
|
width?: WidthProp['width'];
|
|
1097
|
+
/**
|
|
1098
|
+
* If the select should be required.
|
|
1099
|
+
*
|
|
1100
|
+
* @default false
|
|
1101
|
+
*/
|
|
1070
1102
|
required?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* If the select should be disabled.
|
|
1105
|
+
*
|
|
1106
|
+
* @default false
|
|
1107
|
+
*/
|
|
1071
1108
|
disabled?: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* If the select list should be open.
|
|
1111
|
+
*
|
|
1112
|
+
* @default false
|
|
1113
|
+
*/
|
|
1072
1114
|
open?: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* If the select should throw an error.
|
|
1117
|
+
*
|
|
1118
|
+
* @default false
|
|
1119
|
+
*/
|
|
1073
1120
|
error?: boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* Handler that is called when the selection changes.
|
|
1123
|
+
*/
|
|
1074
1124
|
onChange?: RAC.SelectProps<object>['onSelectionChange'];
|
|
1075
1125
|
}
|
|
1076
1126
|
interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object> & RefAttributes<HTMLDivElement>> {
|
|
1127
|
+
/**
|
|
1128
|
+
* Options of the Select.
|
|
1129
|
+
*/
|
|
1077
1130
|
Option: typeof _ListBox.Item;
|
|
1131
|
+
/**
|
|
1132
|
+
* Section of the Select.
|
|
1133
|
+
*/
|
|
1078
1134
|
Section: typeof _ListBox.Section;
|
|
1079
1135
|
}
|
|
1080
1136
|
declare const _Select: SelectComponent;
|
|
@@ -1085,9 +1141,15 @@ declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemPro
|
|
|
1085
1141
|
|
|
1086
1142
|
type RemoveProps = 'style' | 'className' | 'onSelectionChange';
|
|
1087
1143
|
interface SelectListProps extends Omit<RAC.GridListProps<object>, RemoveProps> {
|
|
1144
|
+
/**
|
|
1145
|
+
* Handler that is called when the selection change.
|
|
1146
|
+
*/
|
|
1088
1147
|
onChange?: RAC.GridListProps<object>['onSelectionChange'] | Dispatch<SetStateAction<any>>;
|
|
1089
1148
|
}
|
|
1090
1149
|
interface SelectListComponent extends ForwardRefExoticComponent<SelectListProps & RefAttributes<HTMLUListElement>> {
|
|
1150
|
+
/**
|
|
1151
|
+
* Items of the SelectList.
|
|
1152
|
+
*/
|
|
1091
1153
|
Item: typeof _SelectListItem;
|
|
1092
1154
|
}
|
|
1093
1155
|
declare const _SelectList: SelectListComponent;
|
package/dist/index.d.ts
CHANGED
|
@@ -122,6 +122,9 @@ interface FieldGroupContextProps {
|
|
|
122
122
|
declare const FieldGroupContext: react.Context<FieldGroupContextProps>;
|
|
123
123
|
declare const useFieldGroupContext: () => FieldGroupContextProps;
|
|
124
124
|
interface FieldGroupProps {
|
|
125
|
+
/**
|
|
126
|
+
* Sets the width of all Fields labels used inside the `FieldGroup`
|
|
127
|
+
*/
|
|
125
128
|
labelWidth?: string;
|
|
126
129
|
children: ReactNode;
|
|
127
130
|
}
|
|
@@ -684,7 +687,7 @@ interface DatePickerProps extends Omit<RAC.DatePickerProps<DateValue>, RemovedPr
|
|
|
684
687
|
*/
|
|
685
688
|
width?: WidthProp['width'];
|
|
686
689
|
}
|
|
687
|
-
declare const _DatePicker:
|
|
690
|
+
declare const _DatePicker: react__default.ForwardRefExoticComponent<DatePickerProps & react__default.RefAttributes<HTMLDivElement>>;
|
|
688
691
|
|
|
689
692
|
type InsetProps = {
|
|
690
693
|
/**
|
|
@@ -1059,22 +1062,75 @@ declare const _SearchField: react.ForwardRefExoticComponent<SearchFieldProps & r
|
|
|
1059
1062
|
|
|
1060
1063
|
type RemoveProps$1 = 'children' | 'isInvalid' | 'isDisabled' | 'isOpen' | 'isRequired' | 'style' | 'className' | 'onSelectionChange';
|
|
1061
1064
|
interface SelectProps<T extends object> extends Omit<RAC.SelectProps<T>, RemoveProps$1> {
|
|
1065
|
+
/**
|
|
1066
|
+
* Set a label for the select.
|
|
1067
|
+
*/
|
|
1062
1068
|
label?: string;
|
|
1069
|
+
/**
|
|
1070
|
+
* Set a description for the select.
|
|
1071
|
+
*/
|
|
1063
1072
|
description?: string;
|
|
1073
|
+
/**
|
|
1074
|
+
* Set a error message for the select.
|
|
1075
|
+
*/
|
|
1064
1076
|
errorMessage?: string | ((validation: ValidationResult) => string);
|
|
1077
|
+
/**
|
|
1078
|
+
* Items of the select.
|
|
1079
|
+
*/
|
|
1065
1080
|
items?: Iterable<T>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Children of the select.
|
|
1083
|
+
*/
|
|
1066
1084
|
children: React.ReactNode | ((item: T) => React.ReactNode);
|
|
1085
|
+
/**
|
|
1086
|
+
* sets the variant of the select.
|
|
1087
|
+
*/
|
|
1067
1088
|
variant?: string;
|
|
1089
|
+
/**
|
|
1090
|
+
* Sets the size of the select.
|
|
1091
|
+
*/
|
|
1068
1092
|
size?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Sets the width of the field. You can see allowed tokens here: https://tailwindcss.com/docs/width
|
|
1095
|
+
*/
|
|
1069
1096
|
width?: WidthProp['width'];
|
|
1097
|
+
/**
|
|
1098
|
+
* If the select should be required.
|
|
1099
|
+
*
|
|
1100
|
+
* @default false
|
|
1101
|
+
*/
|
|
1070
1102
|
required?: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* If the select should be disabled.
|
|
1105
|
+
*
|
|
1106
|
+
* @default false
|
|
1107
|
+
*/
|
|
1071
1108
|
disabled?: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* If the select list should be open.
|
|
1111
|
+
*
|
|
1112
|
+
* @default false
|
|
1113
|
+
*/
|
|
1072
1114
|
open?: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* If the select should throw an error.
|
|
1117
|
+
*
|
|
1118
|
+
* @default false
|
|
1119
|
+
*/
|
|
1073
1120
|
error?: boolean;
|
|
1121
|
+
/**
|
|
1122
|
+
* Handler that is called when the selection changes.
|
|
1123
|
+
*/
|
|
1074
1124
|
onChange?: RAC.SelectProps<object>['onSelectionChange'];
|
|
1075
1125
|
}
|
|
1076
1126
|
interface SelectComponent extends ForwardRefExoticComponent<SelectProps<object> & RefAttributes<HTMLDivElement>> {
|
|
1127
|
+
/**
|
|
1128
|
+
* Options of the Select.
|
|
1129
|
+
*/
|
|
1077
1130
|
Option: typeof _ListBox.Item;
|
|
1131
|
+
/**
|
|
1132
|
+
* Section of the Select.
|
|
1133
|
+
*/
|
|
1078
1134
|
Section: typeof _ListBox.Section;
|
|
1079
1135
|
}
|
|
1080
1136
|
declare const _Select: SelectComponent;
|
|
@@ -1085,9 +1141,15 @@ declare const _SelectListItem: react.ForwardRefExoticComponent<SelectListItemPro
|
|
|
1085
1141
|
|
|
1086
1142
|
type RemoveProps = 'style' | 'className' | 'onSelectionChange';
|
|
1087
1143
|
interface SelectListProps extends Omit<RAC.GridListProps<object>, RemoveProps> {
|
|
1144
|
+
/**
|
|
1145
|
+
* Handler that is called when the selection change.
|
|
1146
|
+
*/
|
|
1088
1147
|
onChange?: RAC.GridListProps<object>['onSelectionChange'] | Dispatch<SetStateAction<any>>;
|
|
1089
1148
|
}
|
|
1090
1149
|
interface SelectListComponent extends ForwardRefExoticComponent<SelectListProps & RefAttributes<HTMLUListElement>> {
|
|
1150
|
+
/**
|
|
1151
|
+
* Items of the SelectList.
|
|
1152
|
+
*/
|
|
1091
1153
|
Item: typeof _SelectListItem;
|
|
1092
1154
|
}
|
|
1093
1155
|
declare const _SelectList: SelectListComponent;
|