@marigold/system 7.8.2 → 8.0.1

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 CHANGED
@@ -1,29 +1,50 @@
1
- import * as React from 'react';
2
- import React__default, { ReactNode } from 'react';
1
+ import React$1, { ReactNode } from 'react';
3
2
  import { HtmlProps, KebabCase } from '@marigold/types';
4
3
  import { DateFormatterOptions } from '@react-aria/i18n';
5
4
  import { StringToBoolean, ClassProp } from 'class-variance-authority/dist/types';
6
5
  export { VariantProps } from 'class-variance-authority';
7
6
 
8
7
  interface SVGProps extends Omit<HtmlProps<'svg'>, 'fill' | 'style'> {
8
+ /**
9
+ * The size of an svg.
10
+ */
9
11
  size?: number | string | number[] | string[];
12
+ /**
13
+ * To add a className on svg and icons.
14
+ */
10
15
  className?: string;
11
16
  }
12
- declare const SVG: React__default.ForwardRefExoticComponent<SVGProps & React__default.RefAttributes<SVGSVGElement>>;
17
+ declare const SVG: React$1.ForwardRefExoticComponent<SVGProps & React$1.RefAttributes<SVGSVGElement>>;
13
18
 
14
19
  interface DateFormatProps extends DateFormatterOptions {
20
+ /**
21
+ * Value to be formatted.
22
+ */
15
23
  value: Date;
24
+ /**
25
+ * Specifies that the digits should take the full width.
26
+ * @default true
27
+ */
16
28
  tabular?: boolean;
17
29
  }
18
- declare const DateFormat: ({ value, tabular, ...props }: DateFormatProps) => React__default.JSX.Element;
30
+ declare const DateFormat: ({ value, tabular, ...props }: DateFormatProps) => React$1.JSX.Element;
19
31
 
20
- interface NumericFormatProps extends Omit<Intl.NumberFormatOptions, 'style'> {
32
+ interface NumericFormatProps extends Intl.NumberFormatOptions {
33
+ /**
34
+ * Value to be formatted.
35
+ */
21
36
  value: number | bigint;
37
+ /**
38
+ * The numberingSystem accessor property of Intl.Locale instances returns the numeral system for this locale.
39
+ */
22
40
  numberingSystem?: string;
41
+ /**
42
+ * Specifies that the digits should take the full width.
43
+ * @default true
44
+ */
23
45
  tabular?: boolean;
24
- styleFormat?: string;
25
46
  }
26
- declare const NumericFormat: ({ value, styleFormat, tabular, ...props }: NumericFormatProps) => React__default.JSX.Element;
47
+ declare const NumericFormat: ({ value, tabular, ...props }: NumericFormatProps) => React$1.JSX.Element;
27
48
 
28
49
  type ConfigSchema = Record<string, Record<string, ClassValue>>;
29
50
  type ConfigVariants<T extends ConfigSchema> = {
@@ -120,7 +141,7 @@ type Theme = {
120
141
  Slider?: Record<'container' | 'track' | 'thumb' | 'output', ComponentStyleFunction<string, string>>;
121
142
  Select?: Record<'select' | 'icon', ComponentStyleFunction<string, string>>;
122
143
  NumberField?: Record<'group' | 'stepper' | 'input', ComponentStyleFunction<string, string>>;
123
- Message?: Record<'container' | 'icon' | 'title' | 'content', ComponentStyleFunction<string, string>>;
144
+ SectionMessage?: Record<'container' | 'icon' | 'title' | 'content', ComponentStyleFunction<string, string>>;
124
145
  Table?: Record<'table' | 'header' | 'row' | 'cell', ComponentStyleFunction<string, string>>;
125
146
  Tag?: Record<'tag' | 'listItems' | 'closeButton', ComponentStyleFunction<string, string>>;
126
147
  Text?: ComponentStyleFunction<string, string>;
@@ -147,7 +168,7 @@ interface UseClassNamesProps<C extends ComponentNames> {
147
168
  type ComponentClassNames<C extends ComponentNames> = ThemeComponent<C> extends (...args: any) => any ? string : {
148
169
  [slot in keyof ThemeComponent<C>]: string;
149
170
  };
150
- declare const useClassNames: <C extends "Accordion" | "Badge" | "Body" | "Button" | "Card" | "DateField" | "Dialog" | "Divider" | "Field" | "Footer" | "Header" | "Headline" | "Popover" | "HelpText" | "Image" | "Checkbox" | "Switch" | "Input" | "Label" | "List" | "Link" | "ListBox" | "Menu" | "Radio" | "Slider" | "Select" | "NumberField" | "Message" | "Table" | "Tag" | "Text" | "TextArea" | "Tooltip" | "Tabs" | "Underlay" | "Calendar" | "DatePicker" | "ComboBox">({ component, className, variant, size, }: UseClassNamesProps<C>) => ComponentClassNames<C>;
171
+ declare const useClassNames: <C extends ComponentNames>({ component, className, variant, size, }: UseClassNamesProps<C>) => ComponentClassNames<C>;
151
172
 
152
173
  /**
153
174
  * Hook that can be used to return values based on the current screen size,
@@ -173,11 +194,20 @@ declare const useStateProps: (states: UseStateProps) => StateAttrProps;
173
194
 
174
195
  declare const useTheme: () => Theme;
175
196
  interface ThemeProviderProps<T extends Theme> {
197
+ /**
198
+ * The theme that should be used within the provider context.
199
+ */
176
200
  theme: T;
201
+ /**
202
+ * The children of the component.
203
+ */
177
204
  children: ReactNode;
205
+ /**
206
+ * Additional class names to apply to the root element of the provider.
207
+ */
178
208
  className?: string;
179
209
  }
180
- declare function ThemeProvider<T extends Theme>({ theme, children, className, }: ThemeProviderProps<T>): React__default.JSX.Element;
210
+ declare function ThemeProvider<T extends Theme>({ theme, children, className, }: ThemeProviderProps<T>): React$1.JSX.Element;
181
211
 
182
212
  declare const useSmallScreen: () => boolean;
183
213
 
@@ -186,53 +216,53 @@ type StylesProps = {
186
216
  };
187
217
  declare const extendTheme: (newStyles: StylesProps, theme: Theme) => {
188
218
  components: {
189
- Accordion?: Record<"button" | "item", ComponentStyleFunction<string, string, {}>> | undefined;
190
- Badge?: ComponentStyleFunction<string, string, {}> | undefined;
191
- Body?: ComponentStyleFunction<string, string, {}> | undefined;
192
- Button?: ComponentStyleFunction<string, string, {}> | undefined;
193
- Card?: ComponentStyleFunction<string, string, {}> | undefined;
194
- DateField?: Record<"segment" | "field" | "action", ComponentStyleFunction<string, string, {}>> | undefined;
195
- Dialog?: Record<"closeButton" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
196
- Divider?: ComponentStyleFunction<string, string, {}> | undefined;
197
- Field?: ComponentStyleFunction<string, string, {}> | undefined;
198
- Footer?: ComponentStyleFunction<string, string, {}> | undefined;
199
- Header?: ComponentStyleFunction<string, string, {}> | undefined;
200
- Headline?: ComponentStyleFunction<string, string, {}> | undefined;
201
- Popover?: ComponentStyleFunction<string, string, {}> | undefined;
202
- HelpText?: Record<"container" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
203
- Image?: ComponentStyleFunction<string, string, {}> | undefined;
204
- Checkbox?: Record<"label" | "container" | "checkbox" | "group", ComponentStyleFunction<string, string, {}>> | undefined;
205
- Switch?: Record<"track" | "container" | "thumb", ComponentStyleFunction<string, string, {}>> | undefined;
206
- Input?: Record<"input" | "action" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
207
- Label?: Record<"container" | "indicator", ComponentStyleFunction<string, string, {}>> | undefined;
208
- List?: Record<"ol" | "ul" | "item", ComponentStyleFunction<string, string, {}>> | undefined;
209
- Link?: ComponentStyleFunction<string, string, {}> | undefined;
210
- ListBox?: Record<"option" | "section" | "container" | "list" | "sectionTitle", ComponentStyleFunction<string, string, {}>> | undefined;
211
- Menu?: Record<"section" | "item" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
212
- Radio?: Record<"label" | "container" | "group" | "radio", ComponentStyleFunction<string, string, {}>> | undefined;
213
- Slider?: Record<"output" | "track" | "container" | "thumb", ComponentStyleFunction<string, string, {}>> | undefined;
214
- Select?: Record<"select" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
215
- NumberField?: Record<"input" | "group" | "stepper", ComponentStyleFunction<string, string, {}>> | undefined;
216
- Message?: Record<"title" | "container" | "icon" | "content", ComponentStyleFunction<string, string, {}>> | undefined;
217
- Table?: Record<"header" | "table" | "row" | "cell", ComponentStyleFunction<string, string, {}>> | undefined;
218
- Tag?: Record<"closeButton" | "tag" | "listItems", ComponentStyleFunction<string, string, {}>> | undefined;
219
- Text?: ComponentStyleFunction<string, string, {}> | undefined;
220
- TextArea?: ComponentStyleFunction<string, string, {}> | undefined;
221
- Tooltip?: Record<"container" | "arrow", ComponentStyleFunction<string, string, {}>> | undefined;
222
- Tabs?: Record<"container" | "tabsList" | "tabpanel" | "tab", ComponentStyleFunction<string, string, {}>> | undefined;
223
- Underlay?: ComponentStyleFunction<string, string, {}> | undefined;
224
- Calendar?: Record<"calendar" | "calendarCell" | "calendarControllers" | "calendarHeader" | "calendarGrid", ComponentStyleFunction<string, string, {}>> | undefined;
225
- DatePicker?: Record<"button" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
226
- ComboBox?: ComponentStyleFunction<string, string, {}> | undefined;
219
+ Accordion?: Record<"button" | "item", ComponentStyleFunction<string, string>>;
220
+ Badge?: ComponentStyleFunction<string, string>;
221
+ Body?: ComponentStyleFunction<string, string>;
222
+ Button?: ComponentStyleFunction<string, string>;
223
+ Card?: ComponentStyleFunction<string, string>;
224
+ DateField?: Record<"segment" | "field" | "action", ComponentStyleFunction<string, string>>;
225
+ Dialog?: Record<"closeButton" | "container", ComponentStyleFunction<string, string>>;
226
+ Divider?: ComponentStyleFunction<string, string>;
227
+ Field?: ComponentStyleFunction<string, string>;
228
+ Footer?: ComponentStyleFunction<string, string>;
229
+ Header?: ComponentStyleFunction<string, string>;
230
+ Headline?: ComponentStyleFunction<string, string>;
231
+ Popover?: ComponentStyleFunction<string, string>;
232
+ HelpText?: Record<"container" | "icon", ComponentStyleFunction<string, string>>;
233
+ Image?: ComponentStyleFunction<string, string>;
234
+ Checkbox?: Record<"container" | "label" | "checkbox" | "group", ComponentStyleFunction<string, string>>;
235
+ Switch?: Record<"container" | "track" | "thumb", ComponentStyleFunction<string, string>>;
236
+ Input?: Record<"input" | "icon" | "action", ComponentStyleFunction<string, string>>;
237
+ Label?: Record<"container" | "indicator", ComponentStyleFunction<string, string>>;
238
+ List?: Record<"ol" | "ul" | "item", ComponentStyleFunction<string, string>>;
239
+ Link?: ComponentStyleFunction<string, string>;
240
+ ListBox?: Record<"container" | "list" | "option" | "section" | "sectionTitle", ComponentStyleFunction<string, string>>;
241
+ Menu?: Record<"container" | "section" | "item", ComponentStyleFunction<string, string>>;
242
+ Radio?: Record<"container" | "label" | "radio" | "group", ComponentStyleFunction<string, string>>;
243
+ Slider?: Record<"container" | "track" | "thumb" | "output", ComponentStyleFunction<string, string>>;
244
+ Select?: Record<"select" | "icon", ComponentStyleFunction<string, string>>;
245
+ NumberField?: Record<"group" | "stepper" | "input", ComponentStyleFunction<string, string>>;
246
+ SectionMessage?: Record<"container" | "icon" | "title" | "content", ComponentStyleFunction<string, string>>;
247
+ Table?: Record<"table" | "header" | "row" | "cell", ComponentStyleFunction<string, string>>;
248
+ Tag?: Record<"tag" | "listItems" | "closeButton", ComponentStyleFunction<string, string>>;
249
+ Text?: ComponentStyleFunction<string, string>;
250
+ TextArea?: ComponentStyleFunction<string, string>;
251
+ Tooltip?: Record<"container" | "arrow", ComponentStyleFunction<string, string>>;
252
+ Tabs?: Record<"container" | "tabsList" | "tabpanel" | "tab", ComponentStyleFunction<string, string>>;
253
+ Underlay?: ComponentStyleFunction<string, string>;
254
+ Calendar?: Record<"calendar" | "calendarCell" | "calendarControllers" | "calendarHeader" | "calendarGrid", ComponentStyleFunction<string, string>>;
255
+ DatePicker?: Record<"container" | "button", ComponentStyleFunction<string, string>>;
256
+ ComboBox?: ComponentStyleFunction<string, string>;
227
257
  };
228
258
  name: string;
229
259
  screens?: {
230
260
  [key: string]: string;
231
- } | undefined;
232
- colors?: NestedStringObject | undefined;
233
- shadow?: NestedStringObject | undefined;
234
- height?: NestedStringObject | undefined;
235
- root?: ComponentStyleFunction<never, never, {}> | undefined;
261
+ };
262
+ colors?: NestedStringObject;
263
+ shadow?: NestedStringObject;
264
+ height?: NestedStringObject;
265
+ root?: ComponentStyleFunction;
236
266
  };
237
267
 
238
268
  declare const defaultTheme: {
@@ -829,63 +859,123 @@ type AlignmentProp = {
829
859
  };
830
860
  };
831
861
  type CursorProp = {
862
+ /**
863
+ * Set the cursor for the element.
864
+ */
832
865
  cursor?: keyof typeof cursorStyle;
833
866
  };
834
867
  type FontStyleProp = {
868
+ /**
869
+ * Set the font style for the text element.
870
+ */
835
871
  fontStyle?: keyof typeof textStyle;
836
872
  };
837
873
  type FontWeightProp = {
874
+ /**
875
+ * Set the font weight for the text element.
876
+ */
838
877
  weight?: keyof typeof fontWeight;
839
878
  };
840
879
  type FontSizeProp = {
880
+ /**
881
+ * Set the font size for the text element.
882
+ */
841
883
  fontSize?: keyof typeof textSize;
842
884
  };
843
885
  type GridColsAlignProp = {
886
+ /**
887
+ * Set the alignment of grid columns.
888
+ */
844
889
  align?: keyof typeof gridColsAlign;
845
890
  };
846
891
  type GridColumn = {
892
+ /**
893
+ * Set the alignment of a grid column.
894
+ */
847
895
  align?: keyof typeof gridColumn;
848
896
  };
849
897
  type GapSpaceProp = {
898
+ /**
899
+ * The space between the children.
900
+ */
850
901
  space?: keyof typeof gapSpace;
851
902
  };
852
903
  type ObjectFitProp = {
904
+ /**
905
+ * Set the object-fit property for the element.
906
+ */
853
907
  fit?: keyof typeof objectFit;
854
908
  };
855
909
  type ObjectPositionProp = {
910
+ /**
911
+ * Set the object-position property for the element.
912
+ */
856
913
  position?: keyof typeof objectPosition;
857
914
  };
858
915
  type PaddingSpaceProp = {
916
+ /**
917
+ * Set the padding space for the element.
918
+ */
859
919
  space?: keyof typeof paddingSpace;
860
920
  };
861
921
  type PaddingSpacePropX = {
922
+ /**
923
+ * Set the horizontal padding space for the element.
924
+ */
862
925
  spaceX?: keyof typeof paddingSpaceX;
863
926
  };
864
927
  type PaddingSpacePropY = {
928
+ /**
929
+ * Set the vertical padding space for the element.
930
+ */
865
931
  spaceY?: keyof typeof paddingSpaceY;
866
932
  };
867
933
  type PaddingRightProp = {
934
+ /**
935
+ * Set the right padding for the element.
936
+ */
868
937
  pr?: keyof typeof paddingRight;
869
938
  };
870
939
  type PaddingLeftProp = {
940
+ /**
941
+ * Set the left padding for the element.
942
+ */
871
943
  pl?: keyof typeof paddingLeft;
872
944
  };
873
945
  type PaddingTopProp = {
946
+ /**
947
+ * Set the top padding for the element.
948
+ */
874
949
  pt?: keyof typeof paddingTop;
875
950
  };
876
951
  type PaddingBottomProp = {
952
+ /**
953
+ * Set the bottom padding for the element.
954
+ */
877
955
  pb?: keyof typeof paddingBottom;
878
956
  };
879
957
  type PlaceItemsProp = {
958
+ /**
959
+ * Set the alignment of place-items property for the element.
960
+ */
880
961
  align?: keyof typeof placeItems;
881
962
  };
882
963
  type TextAlignProp = {
964
+ /**
965
+ * Set the text alignment for the element.
966
+ */
883
967
  align?: keyof typeof textAlign;
884
968
  };
885
969
  type WidthProp = {
970
+ /**
971
+ * Set the width of the element.
972
+ */
886
973
  width?: keyof typeof width;
887
974
  };
888
975
  type HeightProp = {
976
+ /**
977
+ * Set the height of the element.
978
+ */
889
979
  height?: keyof typeof height;
890
980
  };
891
981
 
package/dist/index.d.ts CHANGED
@@ -1,29 +1,50 @@
1
- import * as React from 'react';
2
- import React__default, { ReactNode } from 'react';
1
+ import React$1, { ReactNode } from 'react';
3
2
  import { HtmlProps, KebabCase } from '@marigold/types';
4
3
  import { DateFormatterOptions } from '@react-aria/i18n';
5
4
  import { StringToBoolean, ClassProp } from 'class-variance-authority/dist/types';
6
5
  export { VariantProps } from 'class-variance-authority';
7
6
 
8
7
  interface SVGProps extends Omit<HtmlProps<'svg'>, 'fill' | 'style'> {
8
+ /**
9
+ * The size of an svg.
10
+ */
9
11
  size?: number | string | number[] | string[];
12
+ /**
13
+ * To add a className on svg and icons.
14
+ */
10
15
  className?: string;
11
16
  }
12
- declare const SVG: React__default.ForwardRefExoticComponent<SVGProps & React__default.RefAttributes<SVGSVGElement>>;
17
+ declare const SVG: React$1.ForwardRefExoticComponent<SVGProps & React$1.RefAttributes<SVGSVGElement>>;
13
18
 
14
19
  interface DateFormatProps extends DateFormatterOptions {
20
+ /**
21
+ * Value to be formatted.
22
+ */
15
23
  value: Date;
24
+ /**
25
+ * Specifies that the digits should take the full width.
26
+ * @default true
27
+ */
16
28
  tabular?: boolean;
17
29
  }
18
- declare const DateFormat: ({ value, tabular, ...props }: DateFormatProps) => React__default.JSX.Element;
30
+ declare const DateFormat: ({ value, tabular, ...props }: DateFormatProps) => React$1.JSX.Element;
19
31
 
20
- interface NumericFormatProps extends Omit<Intl.NumberFormatOptions, 'style'> {
32
+ interface NumericFormatProps extends Intl.NumberFormatOptions {
33
+ /**
34
+ * Value to be formatted.
35
+ */
21
36
  value: number | bigint;
37
+ /**
38
+ * The numberingSystem accessor property of Intl.Locale instances returns the numeral system for this locale.
39
+ */
22
40
  numberingSystem?: string;
41
+ /**
42
+ * Specifies that the digits should take the full width.
43
+ * @default true
44
+ */
23
45
  tabular?: boolean;
24
- styleFormat?: string;
25
46
  }
26
- declare const NumericFormat: ({ value, styleFormat, tabular, ...props }: NumericFormatProps) => React__default.JSX.Element;
47
+ declare const NumericFormat: ({ value, tabular, ...props }: NumericFormatProps) => React$1.JSX.Element;
27
48
 
28
49
  type ConfigSchema = Record<string, Record<string, ClassValue>>;
29
50
  type ConfigVariants<T extends ConfigSchema> = {
@@ -120,7 +141,7 @@ type Theme = {
120
141
  Slider?: Record<'container' | 'track' | 'thumb' | 'output', ComponentStyleFunction<string, string>>;
121
142
  Select?: Record<'select' | 'icon', ComponentStyleFunction<string, string>>;
122
143
  NumberField?: Record<'group' | 'stepper' | 'input', ComponentStyleFunction<string, string>>;
123
- Message?: Record<'container' | 'icon' | 'title' | 'content', ComponentStyleFunction<string, string>>;
144
+ SectionMessage?: Record<'container' | 'icon' | 'title' | 'content', ComponentStyleFunction<string, string>>;
124
145
  Table?: Record<'table' | 'header' | 'row' | 'cell', ComponentStyleFunction<string, string>>;
125
146
  Tag?: Record<'tag' | 'listItems' | 'closeButton', ComponentStyleFunction<string, string>>;
126
147
  Text?: ComponentStyleFunction<string, string>;
@@ -147,7 +168,7 @@ interface UseClassNamesProps<C extends ComponentNames> {
147
168
  type ComponentClassNames<C extends ComponentNames> = ThemeComponent<C> extends (...args: any) => any ? string : {
148
169
  [slot in keyof ThemeComponent<C>]: string;
149
170
  };
150
- declare const useClassNames: <C extends "Accordion" | "Badge" | "Body" | "Button" | "Card" | "DateField" | "Dialog" | "Divider" | "Field" | "Footer" | "Header" | "Headline" | "Popover" | "HelpText" | "Image" | "Checkbox" | "Switch" | "Input" | "Label" | "List" | "Link" | "ListBox" | "Menu" | "Radio" | "Slider" | "Select" | "NumberField" | "Message" | "Table" | "Tag" | "Text" | "TextArea" | "Tooltip" | "Tabs" | "Underlay" | "Calendar" | "DatePicker" | "ComboBox">({ component, className, variant, size, }: UseClassNamesProps<C>) => ComponentClassNames<C>;
171
+ declare const useClassNames: <C extends ComponentNames>({ component, className, variant, size, }: UseClassNamesProps<C>) => ComponentClassNames<C>;
151
172
 
152
173
  /**
153
174
  * Hook that can be used to return values based on the current screen size,
@@ -173,11 +194,20 @@ declare const useStateProps: (states: UseStateProps) => StateAttrProps;
173
194
 
174
195
  declare const useTheme: () => Theme;
175
196
  interface ThemeProviderProps<T extends Theme> {
197
+ /**
198
+ * The theme that should be used within the provider context.
199
+ */
176
200
  theme: T;
201
+ /**
202
+ * The children of the component.
203
+ */
177
204
  children: ReactNode;
205
+ /**
206
+ * Additional class names to apply to the root element of the provider.
207
+ */
178
208
  className?: string;
179
209
  }
180
- declare function ThemeProvider<T extends Theme>({ theme, children, className, }: ThemeProviderProps<T>): React__default.JSX.Element;
210
+ declare function ThemeProvider<T extends Theme>({ theme, children, className, }: ThemeProviderProps<T>): React$1.JSX.Element;
181
211
 
182
212
  declare const useSmallScreen: () => boolean;
183
213
 
@@ -186,53 +216,53 @@ type StylesProps = {
186
216
  };
187
217
  declare const extendTheme: (newStyles: StylesProps, theme: Theme) => {
188
218
  components: {
189
- Accordion?: Record<"button" | "item", ComponentStyleFunction<string, string, {}>> | undefined;
190
- Badge?: ComponentStyleFunction<string, string, {}> | undefined;
191
- Body?: ComponentStyleFunction<string, string, {}> | undefined;
192
- Button?: ComponentStyleFunction<string, string, {}> | undefined;
193
- Card?: ComponentStyleFunction<string, string, {}> | undefined;
194
- DateField?: Record<"segment" | "field" | "action", ComponentStyleFunction<string, string, {}>> | undefined;
195
- Dialog?: Record<"closeButton" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
196
- Divider?: ComponentStyleFunction<string, string, {}> | undefined;
197
- Field?: ComponentStyleFunction<string, string, {}> | undefined;
198
- Footer?: ComponentStyleFunction<string, string, {}> | undefined;
199
- Header?: ComponentStyleFunction<string, string, {}> | undefined;
200
- Headline?: ComponentStyleFunction<string, string, {}> | undefined;
201
- Popover?: ComponentStyleFunction<string, string, {}> | undefined;
202
- HelpText?: Record<"container" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
203
- Image?: ComponentStyleFunction<string, string, {}> | undefined;
204
- Checkbox?: Record<"label" | "container" | "checkbox" | "group", ComponentStyleFunction<string, string, {}>> | undefined;
205
- Switch?: Record<"track" | "container" | "thumb", ComponentStyleFunction<string, string, {}>> | undefined;
206
- Input?: Record<"input" | "action" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
207
- Label?: Record<"container" | "indicator", ComponentStyleFunction<string, string, {}>> | undefined;
208
- List?: Record<"ol" | "ul" | "item", ComponentStyleFunction<string, string, {}>> | undefined;
209
- Link?: ComponentStyleFunction<string, string, {}> | undefined;
210
- ListBox?: Record<"option" | "section" | "container" | "list" | "sectionTitle", ComponentStyleFunction<string, string, {}>> | undefined;
211
- Menu?: Record<"section" | "item" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
212
- Radio?: Record<"label" | "container" | "group" | "radio", ComponentStyleFunction<string, string, {}>> | undefined;
213
- Slider?: Record<"output" | "track" | "container" | "thumb", ComponentStyleFunction<string, string, {}>> | undefined;
214
- Select?: Record<"select" | "icon", ComponentStyleFunction<string, string, {}>> | undefined;
215
- NumberField?: Record<"input" | "group" | "stepper", ComponentStyleFunction<string, string, {}>> | undefined;
216
- Message?: Record<"title" | "container" | "icon" | "content", ComponentStyleFunction<string, string, {}>> | undefined;
217
- Table?: Record<"header" | "table" | "row" | "cell", ComponentStyleFunction<string, string, {}>> | undefined;
218
- Tag?: Record<"closeButton" | "tag" | "listItems", ComponentStyleFunction<string, string, {}>> | undefined;
219
- Text?: ComponentStyleFunction<string, string, {}> | undefined;
220
- TextArea?: ComponentStyleFunction<string, string, {}> | undefined;
221
- Tooltip?: Record<"container" | "arrow", ComponentStyleFunction<string, string, {}>> | undefined;
222
- Tabs?: Record<"container" | "tabsList" | "tabpanel" | "tab", ComponentStyleFunction<string, string, {}>> | undefined;
223
- Underlay?: ComponentStyleFunction<string, string, {}> | undefined;
224
- Calendar?: Record<"calendar" | "calendarCell" | "calendarControllers" | "calendarHeader" | "calendarGrid", ComponentStyleFunction<string, string, {}>> | undefined;
225
- DatePicker?: Record<"button" | "container", ComponentStyleFunction<string, string, {}>> | undefined;
226
- ComboBox?: ComponentStyleFunction<string, string, {}> | undefined;
219
+ Accordion?: Record<"button" | "item", ComponentStyleFunction<string, string>>;
220
+ Badge?: ComponentStyleFunction<string, string>;
221
+ Body?: ComponentStyleFunction<string, string>;
222
+ Button?: ComponentStyleFunction<string, string>;
223
+ Card?: ComponentStyleFunction<string, string>;
224
+ DateField?: Record<"segment" | "field" | "action", ComponentStyleFunction<string, string>>;
225
+ Dialog?: Record<"closeButton" | "container", ComponentStyleFunction<string, string>>;
226
+ Divider?: ComponentStyleFunction<string, string>;
227
+ Field?: ComponentStyleFunction<string, string>;
228
+ Footer?: ComponentStyleFunction<string, string>;
229
+ Header?: ComponentStyleFunction<string, string>;
230
+ Headline?: ComponentStyleFunction<string, string>;
231
+ Popover?: ComponentStyleFunction<string, string>;
232
+ HelpText?: Record<"container" | "icon", ComponentStyleFunction<string, string>>;
233
+ Image?: ComponentStyleFunction<string, string>;
234
+ Checkbox?: Record<"container" | "label" | "checkbox" | "group", ComponentStyleFunction<string, string>>;
235
+ Switch?: Record<"container" | "track" | "thumb", ComponentStyleFunction<string, string>>;
236
+ Input?: Record<"input" | "icon" | "action", ComponentStyleFunction<string, string>>;
237
+ Label?: Record<"container" | "indicator", ComponentStyleFunction<string, string>>;
238
+ List?: Record<"ol" | "ul" | "item", ComponentStyleFunction<string, string>>;
239
+ Link?: ComponentStyleFunction<string, string>;
240
+ ListBox?: Record<"container" | "list" | "option" | "section" | "sectionTitle", ComponentStyleFunction<string, string>>;
241
+ Menu?: Record<"container" | "section" | "item", ComponentStyleFunction<string, string>>;
242
+ Radio?: Record<"container" | "label" | "radio" | "group", ComponentStyleFunction<string, string>>;
243
+ Slider?: Record<"container" | "track" | "thumb" | "output", ComponentStyleFunction<string, string>>;
244
+ Select?: Record<"select" | "icon", ComponentStyleFunction<string, string>>;
245
+ NumberField?: Record<"group" | "stepper" | "input", ComponentStyleFunction<string, string>>;
246
+ SectionMessage?: Record<"container" | "icon" | "title" | "content", ComponentStyleFunction<string, string>>;
247
+ Table?: Record<"table" | "header" | "row" | "cell", ComponentStyleFunction<string, string>>;
248
+ Tag?: Record<"tag" | "listItems" | "closeButton", ComponentStyleFunction<string, string>>;
249
+ Text?: ComponentStyleFunction<string, string>;
250
+ TextArea?: ComponentStyleFunction<string, string>;
251
+ Tooltip?: Record<"container" | "arrow", ComponentStyleFunction<string, string>>;
252
+ Tabs?: Record<"container" | "tabsList" | "tabpanel" | "tab", ComponentStyleFunction<string, string>>;
253
+ Underlay?: ComponentStyleFunction<string, string>;
254
+ Calendar?: Record<"calendar" | "calendarCell" | "calendarControllers" | "calendarHeader" | "calendarGrid", ComponentStyleFunction<string, string>>;
255
+ DatePicker?: Record<"container" | "button", ComponentStyleFunction<string, string>>;
256
+ ComboBox?: ComponentStyleFunction<string, string>;
227
257
  };
228
258
  name: string;
229
259
  screens?: {
230
260
  [key: string]: string;
231
- } | undefined;
232
- colors?: NestedStringObject | undefined;
233
- shadow?: NestedStringObject | undefined;
234
- height?: NestedStringObject | undefined;
235
- root?: ComponentStyleFunction<never, never, {}> | undefined;
261
+ };
262
+ colors?: NestedStringObject;
263
+ shadow?: NestedStringObject;
264
+ height?: NestedStringObject;
265
+ root?: ComponentStyleFunction;
236
266
  };
237
267
 
238
268
  declare const defaultTheme: {
@@ -829,63 +859,123 @@ type AlignmentProp = {
829
859
  };
830
860
  };
831
861
  type CursorProp = {
862
+ /**
863
+ * Set the cursor for the element.
864
+ */
832
865
  cursor?: keyof typeof cursorStyle;
833
866
  };
834
867
  type FontStyleProp = {
868
+ /**
869
+ * Set the font style for the text element.
870
+ */
835
871
  fontStyle?: keyof typeof textStyle;
836
872
  };
837
873
  type FontWeightProp = {
874
+ /**
875
+ * Set the font weight for the text element.
876
+ */
838
877
  weight?: keyof typeof fontWeight;
839
878
  };
840
879
  type FontSizeProp = {
880
+ /**
881
+ * Set the font size for the text element.
882
+ */
841
883
  fontSize?: keyof typeof textSize;
842
884
  };
843
885
  type GridColsAlignProp = {
886
+ /**
887
+ * Set the alignment of grid columns.
888
+ */
844
889
  align?: keyof typeof gridColsAlign;
845
890
  };
846
891
  type GridColumn = {
892
+ /**
893
+ * Set the alignment of a grid column.
894
+ */
847
895
  align?: keyof typeof gridColumn;
848
896
  };
849
897
  type GapSpaceProp = {
898
+ /**
899
+ * The space between the children.
900
+ */
850
901
  space?: keyof typeof gapSpace;
851
902
  };
852
903
  type ObjectFitProp = {
904
+ /**
905
+ * Set the object-fit property for the element.
906
+ */
853
907
  fit?: keyof typeof objectFit;
854
908
  };
855
909
  type ObjectPositionProp = {
910
+ /**
911
+ * Set the object-position property for the element.
912
+ */
856
913
  position?: keyof typeof objectPosition;
857
914
  };
858
915
  type PaddingSpaceProp = {
916
+ /**
917
+ * Set the padding space for the element.
918
+ */
859
919
  space?: keyof typeof paddingSpace;
860
920
  };
861
921
  type PaddingSpacePropX = {
922
+ /**
923
+ * Set the horizontal padding space for the element.
924
+ */
862
925
  spaceX?: keyof typeof paddingSpaceX;
863
926
  };
864
927
  type PaddingSpacePropY = {
928
+ /**
929
+ * Set the vertical padding space for the element.
930
+ */
865
931
  spaceY?: keyof typeof paddingSpaceY;
866
932
  };
867
933
  type PaddingRightProp = {
934
+ /**
935
+ * Set the right padding for the element.
936
+ */
868
937
  pr?: keyof typeof paddingRight;
869
938
  };
870
939
  type PaddingLeftProp = {
940
+ /**
941
+ * Set the left padding for the element.
942
+ */
871
943
  pl?: keyof typeof paddingLeft;
872
944
  };
873
945
  type PaddingTopProp = {
946
+ /**
947
+ * Set the top padding for the element.
948
+ */
874
949
  pt?: keyof typeof paddingTop;
875
950
  };
876
951
  type PaddingBottomProp = {
952
+ /**
953
+ * Set the bottom padding for the element.
954
+ */
877
955
  pb?: keyof typeof paddingBottom;
878
956
  };
879
957
  type PlaceItemsProp = {
958
+ /**
959
+ * Set the alignment of place-items property for the element.
960
+ */
880
961
  align?: keyof typeof placeItems;
881
962
  };
882
963
  type TextAlignProp = {
964
+ /**
965
+ * Set the text alignment for the element.
966
+ */
883
967
  align?: keyof typeof textAlign;
884
968
  };
885
969
  type WidthProp = {
970
+ /**
971
+ * Set the width of the element.
972
+ */
886
973
  width?: keyof typeof width;
887
974
  };
888
975
  type HeightProp = {
976
+ /**
977
+ * Set the height of the element.
978
+ */
889
979
  height?: keyof typeof height;
890
980
  };
891
981
 
package/dist/index.js CHANGED
@@ -95,8 +95,7 @@ var get = (obj, path, fallback) => {
95
95
  const key = path.split(".");
96
96
  let result = obj;
97
97
  for (let i = 0, length = key.length; i < length; i++) {
98
- if (!result)
99
- break;
98
+ if (!result) break;
100
99
  result = result[key[i]];
101
100
  }
102
101
  return result === void 0 ? fallback : result;
@@ -193,8 +192,7 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
193
192
  }
194
193
  const [index, setIndex] = (0, import_react2.useState)(defaultIndex);
195
194
  (0, import_react2.useEffect)(() => {
196
- if (typeof window == "undefined")
197
- return;
195
+ if (typeof window == "undefined") return;
198
196
  const getIndex = () => Object.values(screens).filter(
199
197
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
200
198
  ).length;
@@ -246,8 +244,7 @@ var useSmallScreen = () => {
246
244
  }, []);
247
245
  (0, import_react4.useEffect)(() => {
248
246
  handleResize();
249
- if (typeof window == "undefined")
250
- return;
247
+ if (typeof window == "undefined") return;
251
248
  window.addEventListener("resize", handleResize);
252
249
  return () => window.removeEventListener("resize", handleResize);
253
250
  }, [handleResize]);
@@ -260,8 +257,7 @@ var extendTheme = (newStyles, theme) => {
260
257
  Object.keys(newStyles).forEach((component) => {
261
258
  const componentStyles = newStyles[component];
262
259
  const mergedComponentStyles = mergedStyles[component];
263
- if (!mergedComponentStyles)
264
- return mergedStyles;
260
+ if (!mergedComponentStyles) return mergedStyles;
265
261
  if (typeof newStyles[component] !== "function") {
266
262
  const mergeSlotStyles = Object.keys(componentStyles).reduce(
267
263
  (acc, slot) => {
@@ -271,7 +267,7 @@ var extendTheme = (newStyles, theme) => {
271
267
  var _a, _b;
272
268
  acc2[variantItem] = {
273
269
  ...(_a = newSlot == null ? void 0 : newSlot.variants) == null ? void 0 : _a[variantItem],
274
- ...(_b = mergedSlot == null ? void 0 : mergedSlot.variants) == null ? void 0 : _b.variantItem
270
+ ...(_b = mergedSlot == null ? void 0 : mergedSlot.variants) == null ? void 0 : _b[variantItem]
275
271
  };
276
272
  return acc2;
277
273
  }, {});
@@ -350,15 +346,13 @@ var import_react7 = __toESM(require("react"));
350
346
  var import_i18n2 = require("@react-aria/i18n");
351
347
  var NumericFormat = ({
352
348
  value,
353
- styleFormat,
354
349
  tabular = true,
355
350
  ...props
356
351
  }) => {
357
352
  const numberFormatter = (0, import_i18n2.useNumberFormatter)({
358
- style: styleFormat,
359
353
  ...props
360
354
  });
361
- return /* @__PURE__ */ import_react7.default.createElement("span", { className: tabular ? "tabular-nums" : "" }, numberFormatter.format(value));
355
+ return /* @__PURE__ */ import_react7.default.createElement("span", { className: tabular ? "tabular-nums" : void 0 }, numberFormatter.format(value));
362
356
  };
363
357
 
364
358
  // src/style-props.tsx
package/dist/index.mjs CHANGED
@@ -21,8 +21,7 @@ var get = (obj, path, fallback) => {
21
21
  const key = path.split(".");
22
22
  let result = obj;
23
23
  for (let i = 0, length = key.length; i < length; i++) {
24
- if (!result)
25
- break;
24
+ if (!result) break;
26
25
  result = result[key[i]];
27
26
  }
28
27
  return result === void 0 ? fallback : result;
@@ -119,8 +118,7 @@ var useResponsiveValue = (values, defaultIndex = 0) => {
119
118
  }
120
119
  const [index, setIndex] = useState(defaultIndex);
121
120
  useEffect(() => {
122
- if (typeof window == "undefined")
123
- return;
121
+ if (typeof window == "undefined") return;
124
122
  const getIndex = () => Object.values(screens).filter(
125
123
  (breakpoint) => window.matchMedia(`screen and (min-width: ${breakpoint})`).matches
126
124
  ).length;
@@ -172,8 +170,7 @@ var useSmallScreen = () => {
172
170
  }, []);
173
171
  useEffect2(() => {
174
172
  handleResize();
175
- if (typeof window == "undefined")
176
- return;
173
+ if (typeof window == "undefined") return;
177
174
  window.addEventListener("resize", handleResize);
178
175
  return () => window.removeEventListener("resize", handleResize);
179
176
  }, [handleResize]);
@@ -186,8 +183,7 @@ var extendTheme = (newStyles, theme) => {
186
183
  Object.keys(newStyles).forEach((component) => {
187
184
  const componentStyles = newStyles[component];
188
185
  const mergedComponentStyles = mergedStyles[component];
189
- if (!mergedComponentStyles)
190
- return mergedStyles;
186
+ if (!mergedComponentStyles) return mergedStyles;
191
187
  if (typeof newStyles[component] !== "function") {
192
188
  const mergeSlotStyles = Object.keys(componentStyles).reduce(
193
189
  (acc, slot) => {
@@ -197,7 +193,7 @@ var extendTheme = (newStyles, theme) => {
197
193
  var _a, _b;
198
194
  acc2[variantItem] = {
199
195
  ...(_a = newSlot == null ? void 0 : newSlot.variants) == null ? void 0 : _a[variantItem],
200
- ...(_b = mergedSlot == null ? void 0 : mergedSlot.variants) == null ? void 0 : _b.variantItem
196
+ ...(_b = mergedSlot == null ? void 0 : mergedSlot.variants) == null ? void 0 : _b[variantItem]
201
197
  };
202
198
  return acc2;
203
199
  }, {});
@@ -276,15 +272,13 @@ import React4 from "react";
276
272
  import { useNumberFormatter } from "@react-aria/i18n";
277
273
  var NumericFormat = ({
278
274
  value,
279
- styleFormat,
280
275
  tabular = true,
281
276
  ...props
282
277
  }) => {
283
278
  const numberFormatter = useNumberFormatter({
284
- style: styleFormat,
285
279
  ...props
286
280
  });
287
- return /* @__PURE__ */ React4.createElement("span", { className: tabular ? "tabular-nums" : "" }, numberFormatter.format(value));
281
+ return /* @__PURE__ */ React4.createElement("span", { className: tabular ? "tabular-nums" : void 0 }, numberFormatter.format(value));
288
282
  };
289
283
 
290
284
  // src/style-props.tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marigold/system",
3
- "version": "7.8.2",
3
+ "version": "8.0.1",
4
4
  "description": "Marigold System Library",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -27,20 +27,20 @@
27
27
  "@react-aria/i18n": "3.11.1",
28
28
  "class-variance-authority": "0.7.0",
29
29
  "deepmerge": "4.2.2",
30
- "react-fast-compare": "3.2.0",
31
- "tailwind-merge": "2.2.1",
32
- "@marigold/types": "1.1.0"
30
+ "react-fast-compare": "3.2.2",
31
+ "tailwind-merge": "2.3.0",
32
+ "@marigold/types": "1.1.1"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "18.x",
36
36
  "react-dom": "18.x"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/core": "7.24.6",
40
- "postcss": "8.4.35",
39
+ "@babel/core": "7.24.7",
40
+ "postcss": "8.4.38",
41
41
  "react": "18.3.1",
42
- "tailwindcss": "3.4.1",
43
- "tsup": "8.0.2",
42
+ "tailwindcss": "3.4.4",
43
+ "tsup": "8.1.0",
44
44
  "@marigold/tsconfig": "0.4.0"
45
45
  },
46
46
  "scripts": {