gantri-components 2.98.1 → 2.100.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/components/button/button.types.d.ts +1 -1
- package/dist/components/dropdown/dropdown.types.d.ts +5 -3
- package/dist/components/search-field/search-field.types.d.ts +2 -0
- package/dist/components/text-field/text-field.constants.d.ts +0 -1
- package/dist/components/text-field/text-field.types.d.ts +8 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/styles/hooks/index.d.ts +1 -0
- package/dist/styles/hooks/use-theme-defaults.d.ts +2 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/theme.d.ts +39 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-theme-defaults';
|
package/dist/styles/index.d.ts
CHANGED
package/dist/styles/theme.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
3
|
import { ResolutionAwareProp } from '../types/resolution-aware-prop.type';
|
|
4
|
-
import { ButtonVariant } from '../components/button/button.types';
|
|
4
|
+
import { ButtonSize, ButtonVariant } from '../components/button/button.types';
|
|
5
5
|
import { BoxDimension } from '../components/box/box.types';
|
|
6
|
+
import { LabelPosition, TextFieldSize, TextFieldVariant } from '../components/text-field';
|
|
7
|
+
import { TextVariant } from '../components/typography';
|
|
6
8
|
export type PaletteColor = 'blue_100' | 'blue_200' | 'blue_300' | 'blue_400' | 'blue_500' | 'blue_800' | 'blue_900' | 'gold_100' | 'gold_200' | 'gold_300' | 'gold_400' | 'gold_500' | 'green_100' | 'green_200' | 'green_300' | 'green_400' | 'green_500' | 'green_800' | 'green_900' | 'monochrome_050' | 'monochrome_100' | 'monochrome_200' | 'monochrome_300' | 'monochrome_400' | 'monochrome_500' | 'monochrome_600' | 'monochrome_700' | 'monochrome_800' | 'monochrome_900' | 'monochrome_black' | 'monochrome_white' | 'pink_300' | 'pink_400' | 'pink_500' | 'red_100' | 'red_200' | 'red_300' | 'red_400' | 'red_500' | 'red_800' | 'red_900' | 'translucent_black_t1' | 'translucent_black_t2' | 'translucent_cream' | 'translucent_white' | 'yellow_100' | 'yellow_200' | 'yellow_300' | 'yellow_400' | 'yellow_500' | 'yellow_800' | 'yellow_900' | string;
|
|
7
9
|
export declare const palette: Record<PaletteColor, string>;
|
|
8
10
|
declare module 'styled-components' {
|
|
@@ -114,6 +116,39 @@ declare module 'styled-components' {
|
|
|
114
116
|
warning: PaletteColor;
|
|
115
117
|
};
|
|
116
118
|
};
|
|
119
|
+
defaults: {
|
|
120
|
+
button: {
|
|
121
|
+
size: ResolutionAwareProp<ButtonSize>;
|
|
122
|
+
variant: ButtonVariant;
|
|
123
|
+
};
|
|
124
|
+
dropdown: {
|
|
125
|
+
labelPosition: LabelPosition;
|
|
126
|
+
labelVariant: ResolutionAwareProp<TextVariant>;
|
|
127
|
+
size: ResolutionAwareProp<TextFieldSize>;
|
|
128
|
+
variant: TextFieldVariant;
|
|
129
|
+
};
|
|
130
|
+
searchField: {
|
|
131
|
+
labelPosition: LabelPosition;
|
|
132
|
+
labelVariant: ResolutionAwareProp<TextVariant>;
|
|
133
|
+
size: ResolutionAwareProp<TextFieldSize>;
|
|
134
|
+
variant: TextFieldVariant;
|
|
135
|
+
};
|
|
136
|
+
textArea: {
|
|
137
|
+
labelPosition: LabelPosition;
|
|
138
|
+
labelVariant: ResolutionAwareProp<TextVariant>;
|
|
139
|
+
size: ResolutionAwareProp<TextFieldSize>;
|
|
140
|
+
variant: TextFieldVariant;
|
|
141
|
+
};
|
|
142
|
+
textField: {
|
|
143
|
+
labelPosition: LabelPosition;
|
|
144
|
+
labelVariant: ResolutionAwareProp<TextVariant>;
|
|
145
|
+
size: ResolutionAwareProp<TextFieldSize>;
|
|
146
|
+
variant: TextFieldVariant;
|
|
147
|
+
};
|
|
148
|
+
typography: {
|
|
149
|
+
variant: ResolutionAwareProp<TextVariant>;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
117
152
|
dimensions: {
|
|
118
153
|
gridGutter: ResolutionAwareProp<string>;
|
|
119
154
|
headerHeight: Property.Height;
|
|
@@ -187,6 +222,7 @@ declare module 'styled-components' {
|
|
|
187
222
|
}
|
|
188
223
|
}
|
|
189
224
|
export declare const spacing: DefaultTheme['dimensions']['spacing'];
|
|
225
|
+
declare const defaults: DefaultTheme['defaults'];
|
|
190
226
|
export declare const allProductColorCodes: readonly ["blossompink", "canyon", "carbon", "coral", "fog", "forest", "glossysnowwhite", "meadow", "midnight", "olive", "peach", "persimmon", "sage", "sand", "sedona", "sky", "snow", "sproutgreen", "stone", "sunrise"];
|
|
191
227
|
export type ProductColorCode = typeof allProductColorCodes[number];
|
|
192
228
|
/** Color codes that are no longer available for as product options. */
|
|
@@ -256,6 +292,8 @@ export declare const getButtonsColors: (variant: ButtonVariant, theme?: DefaultT
|
|
|
256
292
|
borderHover?: undefined;
|
|
257
293
|
};
|
|
258
294
|
export declare const createTheme: (config: {
|
|
295
|
+
defaults?: Partial<DefaultTheme['defaults']>;
|
|
259
296
|
theme: 'light' | 'dark';
|
|
260
297
|
typography?: Partial<Omit<DefaultTheme['fonts'], 'useCssVariablesForFontFamily'>>;
|
|
261
298
|
}) => DefaultTheme;
|
|
299
|
+
export {};
|