@aurora-ds/components 0.19.2 → 0.20.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/README.md +196 -52
- package/dist/cjs/components/actions/button/Button.props.d.ts +9 -9
- package/dist/cjs/components/actions/icon-button/IconButton.props.d.ts +9 -10
- package/dist/cjs/components/data-display/chip/Chip.props.d.ts +5 -5
- package/dist/cjs/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
- package/dist/cjs/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/cjs/components/foundation/icon/Icon.props.d.ts +6 -6
- package/dist/cjs/components/foundation/icon/Icon.styles.d.ts +1 -1
- package/dist/cjs/components/foundation/text/Text.props.d.ts +5 -5
- package/dist/cjs/components/layout/card/Card.props.d.ts +13 -13
- package/dist/cjs/components/layout/grid/Grid.props.d.ts +7 -7
- package/dist/cjs/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
- package/dist/cjs/components/layout/separator/Separator.props.d.ts +3 -3
- package/dist/cjs/components/layout/stack/Stack.props.d.ts +5 -5
- package/dist/cjs/components/overlay/accordion/Accordion.props.d.ts +3 -3
- package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +235 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/interfaces/button.types.d.ts +2 -2
- package/dist/cjs/interfaces/index.d.ts +1 -0
- package/dist/cjs/interfaces/theme.contracts.d.ts +235 -0
- package/dist/cjs/theme/defaultTheme.d.ts +29 -0
- package/dist/cjs/theme/theme.module.d.ts +32 -0
- package/dist/cjs/theme/theme.types.d.ts +17 -0
- package/dist/cjs/theme/types/themeBreakpoints.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeColor.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeFontSize.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeFontWeight.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeLineHeight.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeOpacity.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeRadius.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeShadows.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeSpacing.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeTransition.types.d.ts +5 -0
- package/dist/cjs/theme/types/themeZIndex.types.d.ts +5 -0
- package/dist/cjs/theme/values/themeBreakpoints.d.ts +5 -0
- package/dist/cjs/theme/values/themeColors.d.ts +6 -0
- package/dist/cjs/theme/values/themeFontSize.d.ts +5 -0
- package/dist/cjs/theme/values/themeFontWeight.d.ts +5 -0
- package/dist/cjs/theme/values/themeLineHeight.d.ts +5 -0
- package/dist/cjs/theme/values/themeOpacity.d.ts +5 -0
- package/dist/cjs/theme/values/themeRadius.d.ts +5 -0
- package/dist/cjs/theme/values/themeShadows.d.ts +5 -0
- package/dist/cjs/theme/values/themeSpacing.d.ts +5 -0
- package/dist/cjs/theme/values/themeTransition.d.ts +5 -0
- package/dist/cjs/theme/values/themeZIndex.d.ts +5 -0
- package/dist/cjs/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
- package/dist/cjs/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
- package/dist/cjs/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
- package/dist/cjs/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
- package/dist/esm/components/actions/button/Button.props.d.ts +9 -9
- package/dist/esm/components/actions/icon-button/IconButton.props.d.ts +9 -10
- package/dist/esm/components/data-display/chip/Chip.props.d.ts +5 -5
- package/dist/esm/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
- package/dist/esm/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
- package/dist/esm/components/foundation/icon/Icon.props.d.ts +6 -6
- package/dist/esm/components/foundation/icon/Icon.styles.d.ts +1 -1
- package/dist/esm/components/foundation/text/Text.props.d.ts +5 -5
- package/dist/esm/components/layout/card/Card.props.d.ts +13 -13
- package/dist/esm/components/layout/grid/Grid.props.d.ts +7 -7
- package/dist/esm/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
- package/dist/esm/components/layout/separator/Separator.props.d.ts +3 -3
- package/dist/esm/components/layout/stack/Stack.props.d.ts +5 -5
- package/dist/esm/components/overlay/accordion/Accordion.props.d.ts +3 -3
- package/dist/esm/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +235 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/interfaces/button.types.d.ts +2 -2
- package/dist/esm/interfaces/index.d.ts +1 -0
- package/dist/esm/interfaces/theme.contracts.d.ts +235 -0
- package/dist/esm/theme/defaultTheme.d.ts +29 -0
- package/dist/esm/theme/theme.module.d.ts +32 -0
- package/dist/esm/theme/theme.types.d.ts +17 -0
- package/dist/esm/theme/types/themeBreakpoints.types.d.ts +5 -0
- package/dist/esm/theme/types/themeColor.types.d.ts +5 -0
- package/dist/esm/theme/types/themeFontSize.types.d.ts +5 -0
- package/dist/esm/theme/types/themeFontWeight.types.d.ts +5 -0
- package/dist/esm/theme/types/themeLineHeight.types.d.ts +5 -0
- package/dist/esm/theme/types/themeOpacity.types.d.ts +5 -0
- package/dist/esm/theme/types/themeRadius.types.d.ts +5 -0
- package/dist/esm/theme/types/themeShadows.types.d.ts +5 -0
- package/dist/esm/theme/types/themeSpacing.types.d.ts +5 -0
- package/dist/esm/theme/types/themeTransition.types.d.ts +5 -0
- package/dist/esm/theme/types/themeZIndex.types.d.ts +5 -0
- package/dist/esm/theme/values/themeBreakpoints.d.ts +5 -0
- package/dist/esm/theme/values/themeColors.d.ts +6 -0
- package/dist/esm/theme/values/themeFontSize.d.ts +5 -0
- package/dist/esm/theme/values/themeFontWeight.d.ts +5 -0
- package/dist/esm/theme/values/themeLineHeight.d.ts +5 -0
- package/dist/esm/theme/values/themeOpacity.d.ts +5 -0
- package/dist/esm/theme/values/themeRadius.d.ts +5 -0
- package/dist/esm/theme/values/themeShadows.d.ts +5 -0
- package/dist/esm/theme/values/themeSpacing.d.ts +5 -0
- package/dist/esm/theme/values/themeTransition.d.ts +5 -0
- package/dist/esm/theme/values/themeZIndex.d.ts +5 -0
- package/dist/esm/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
- package/dist/esm/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
- package/dist/esm/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
- package/dist/esm/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
- package/dist/index.d.ts +420 -108
- package/package.json +4 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
export type ButtonVariants = 'contained' | 'outlined' | 'text' | 'destructive' | 'link';
|
|
3
3
|
export type IconButtonVariants = Exclude<ButtonVariants, 'link'>;
|
|
4
4
|
export type IconButtonSizes = 'small' | 'medium' | 'large';
|
|
@@ -32,5 +32,5 @@ export type ButtonVariantStyle = {
|
|
|
32
32
|
textDecoration?: string;
|
|
33
33
|
textUnderlineOffset?: string;
|
|
34
34
|
};
|
|
35
|
-
textColor: keyof
|
|
35
|
+
textColor: keyof ThemeContract['colors'];
|
|
36
36
|
};
|
|
@@ -4,3 +4,4 @@ export * from '@interfaces/text.types';
|
|
|
4
4
|
export * from '@interfaces/chip.types';
|
|
5
5
|
export * from '@interfaces/avatar.types';
|
|
6
6
|
export * from '@interfaces/select.types';
|
|
7
|
+
export type { ThemeContract, ThemeColorContract, ThemeSpacingContract, ThemeRadiusContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeShadowsContract, ThemeTransitionContract, ThemeBreakpointsContract, ThemeZIndexContract, } from '@interfaces/theme.contracts';
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme Contracts for aurora-ds-components
|
|
3
|
+
*
|
|
4
|
+
* These interfaces define the MINIMUM required theme structure.
|
|
5
|
+
* All projects using this library MUST provide these tokens.
|
|
6
|
+
*
|
|
7
|
+
* You can extend these contracts with your own custom tokens:
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import type { ThemeColorContract } from 'aurora-ds-components'
|
|
12
|
+
*
|
|
13
|
+
* // Extend with custom tokens
|
|
14
|
+
* export interface ThemeColorTypes extends ThemeColorContract {
|
|
15
|
+
* // Required tokens already included via extends
|
|
16
|
+
*
|
|
17
|
+
* // Add your custom tokens
|
|
18
|
+
* highlight: string
|
|
19
|
+
* accent: string
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Minimum color tokens required by aurora-ds-components
|
|
25
|
+
* Projects can extend this interface with additional tokens
|
|
26
|
+
*/
|
|
27
|
+
export interface ThemeColorContract {
|
|
28
|
+
background: string;
|
|
29
|
+
surface: string;
|
|
30
|
+
surfaceHover: string;
|
|
31
|
+
surfaceActive: string;
|
|
32
|
+
text: string;
|
|
33
|
+
textSecondary: string;
|
|
34
|
+
textTertiary: string;
|
|
35
|
+
primary: string;
|
|
36
|
+
primaryHover: string;
|
|
37
|
+
primaryActive: string;
|
|
38
|
+
primarySubtle: string;
|
|
39
|
+
primaryDisabled: string;
|
|
40
|
+
onPrimary: string;
|
|
41
|
+
secondary: string;
|
|
42
|
+
secondaryHover: string;
|
|
43
|
+
secondaryActive: string;
|
|
44
|
+
secondarySubtle: string;
|
|
45
|
+
secondaryDisabled: string;
|
|
46
|
+
onSecondary: string;
|
|
47
|
+
border: string;
|
|
48
|
+
disabledText: string;
|
|
49
|
+
disabled: string;
|
|
50
|
+
success: string;
|
|
51
|
+
successSubtle: string;
|
|
52
|
+
warning: string;
|
|
53
|
+
warningSubtle: string;
|
|
54
|
+
error: string;
|
|
55
|
+
errorHover: string;
|
|
56
|
+
errorSubtle: string;
|
|
57
|
+
onError: string;
|
|
58
|
+
info: string;
|
|
59
|
+
infoSubtle: string;
|
|
60
|
+
highlight: string;
|
|
61
|
+
highlightSubtle: string;
|
|
62
|
+
accent: string;
|
|
63
|
+
accentSubtle: string;
|
|
64
|
+
link: string;
|
|
65
|
+
linkHover: string;
|
|
66
|
+
linkActive: string;
|
|
67
|
+
linkDisabled: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Minimum spacing tokens required by aurora-ds-components
|
|
71
|
+
*/
|
|
72
|
+
export interface ThemeSpacingContract {
|
|
73
|
+
none: string;
|
|
74
|
+
'2xs': string;
|
|
75
|
+
xs: string;
|
|
76
|
+
sm: string;
|
|
77
|
+
md: string;
|
|
78
|
+
lg: string;
|
|
79
|
+
xl: string;
|
|
80
|
+
'2xl': string;
|
|
81
|
+
'3xl': string;
|
|
82
|
+
'4xl': string;
|
|
83
|
+
'5xl': string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Minimum border radius tokens required by aurora-ds-components
|
|
87
|
+
*/
|
|
88
|
+
export interface ThemeRadiusContract {
|
|
89
|
+
none: string;
|
|
90
|
+
xs: string;
|
|
91
|
+
sm: string;
|
|
92
|
+
md: string;
|
|
93
|
+
lg: string;
|
|
94
|
+
xl: string;
|
|
95
|
+
'2xl': string;
|
|
96
|
+
full: string;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Minimum font size tokens required by aurora-ds-components
|
|
100
|
+
*/
|
|
101
|
+
export interface ThemeFontSizeContract {
|
|
102
|
+
'2xs': string;
|
|
103
|
+
xs: string;
|
|
104
|
+
sm: string;
|
|
105
|
+
md: string;
|
|
106
|
+
lg: string;
|
|
107
|
+
xl: string;
|
|
108
|
+
'2xl': string;
|
|
109
|
+
'3xl': string;
|
|
110
|
+
'4xl': string;
|
|
111
|
+
'5xl': string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Minimum font weight tokens required by aurora-ds-components
|
|
115
|
+
*/
|
|
116
|
+
export interface ThemeFontWeightContract {
|
|
117
|
+
light: number;
|
|
118
|
+
regular: number;
|
|
119
|
+
medium: number;
|
|
120
|
+
semibold: number;
|
|
121
|
+
bold: number;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Minimum line height tokens required by aurora-ds-components
|
|
125
|
+
*/
|
|
126
|
+
export interface ThemeLineHeightContract {
|
|
127
|
+
none: number;
|
|
128
|
+
tight: number;
|
|
129
|
+
normal: number;
|
|
130
|
+
relaxed: number;
|
|
131
|
+
loose: number;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Minimum opacity tokens required by aurora-ds-components
|
|
135
|
+
*/
|
|
136
|
+
export interface ThemeOpacityContract {
|
|
137
|
+
none: number;
|
|
138
|
+
lowest: number;
|
|
139
|
+
low: number;
|
|
140
|
+
medium: number;
|
|
141
|
+
high: number;
|
|
142
|
+
higher: number;
|
|
143
|
+
full: number;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Minimum shadow tokens required by aurora-ds-components
|
|
147
|
+
*/
|
|
148
|
+
export interface ThemeShadowsContract {
|
|
149
|
+
none: string;
|
|
150
|
+
xs: string;
|
|
151
|
+
sm: string;
|
|
152
|
+
md: string;
|
|
153
|
+
lg: string;
|
|
154
|
+
xl: string;
|
|
155
|
+
'2xl': string;
|
|
156
|
+
inner: string;
|
|
157
|
+
focus: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Minimum transition tokens required by aurora-ds-components
|
|
161
|
+
*/
|
|
162
|
+
export interface ThemeTransitionContract {
|
|
163
|
+
fast: string;
|
|
164
|
+
normal: string;
|
|
165
|
+
slow: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Minimum breakpoint tokens required by aurora-ds-components
|
|
169
|
+
*/
|
|
170
|
+
export interface ThemeBreakpointsContract {
|
|
171
|
+
xs: string;
|
|
172
|
+
sm: string;
|
|
173
|
+
md: string;
|
|
174
|
+
lg: string;
|
|
175
|
+
xl: string;
|
|
176
|
+
'2xl': string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Minimum z-index tokens required by aurora-ds-components
|
|
180
|
+
*/
|
|
181
|
+
export interface ThemeZIndexContract {
|
|
182
|
+
behind: number;
|
|
183
|
+
base: number;
|
|
184
|
+
dropdown: number;
|
|
185
|
+
sticky: number;
|
|
186
|
+
overlay: number;
|
|
187
|
+
modal: number;
|
|
188
|
+
popover: number;
|
|
189
|
+
tooltip: number;
|
|
190
|
+
toast: number;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Complete theme contract required by aurora-ds-components
|
|
194
|
+
*
|
|
195
|
+
* Your theme MUST provide at minimum these tokens.
|
|
196
|
+
* You can add custom tokens by extending the sub-contracts.
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* ```typescript
|
|
200
|
+
* import type {
|
|
201
|
+
* ThemeColorContract,
|
|
202
|
+
* ThemeSpacingContract
|
|
203
|
+
* } from 'aurora-ds-components'
|
|
204
|
+
*
|
|
205
|
+
* // Extend contracts with custom tokens
|
|
206
|
+
* interface MyColors extends ThemeColorContract {
|
|
207
|
+
* highlight: string
|
|
208
|
+
* accent: string
|
|
209
|
+
* }
|
|
210
|
+
*
|
|
211
|
+
* interface MySpacing extends ThemeSpacingContract {
|
|
212
|
+
* '6xl': string
|
|
213
|
+
* }
|
|
214
|
+
*
|
|
215
|
+
* // Define your theme type
|
|
216
|
+
* interface MyTheme {
|
|
217
|
+
* colors: MyColors
|
|
218
|
+
* spacing: MySpacing
|
|
219
|
+
* // ... other required properties
|
|
220
|
+
* }
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
export interface ThemeContract {
|
|
224
|
+
colors: ThemeColorContract;
|
|
225
|
+
spacing: ThemeSpacingContract;
|
|
226
|
+
radius: ThemeRadiusContract;
|
|
227
|
+
shadows: ThemeShadowsContract;
|
|
228
|
+
fontSize: ThemeFontSizeContract;
|
|
229
|
+
fontWeight: ThemeFontWeightContract;
|
|
230
|
+
lineHeight: ThemeLineHeightContract;
|
|
231
|
+
zIndex: ThemeZIndexContract;
|
|
232
|
+
transition: ThemeTransitionContract;
|
|
233
|
+
opacity: ThemeOpacityContract;
|
|
234
|
+
breakpoints: ThemeBreakpointsContract;
|
|
235
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import '@theme/theme.module';
|
|
2
|
+
import type { Theme } from '@theme/theme.types';
|
|
3
|
+
/**
|
|
4
|
+
* Default theme for aurora-ds-components
|
|
5
|
+
*
|
|
6
|
+
* This theme is used by default if no custom theme is provided.
|
|
7
|
+
* You can override it by passing your own theme to ThemeProvider:
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* import { ThemeProvider } from '@aurora-ds/theme'
|
|
12
|
+
* import { defaultTheme } from '@aurora-ds/components'
|
|
13
|
+
*
|
|
14
|
+
* // Use default theme
|
|
15
|
+
* <ThemeProvider theme={defaultTheme}>
|
|
16
|
+
* <App />
|
|
17
|
+
* </ThemeProvider>
|
|
18
|
+
*
|
|
19
|
+
* // Or extend/override it
|
|
20
|
+
* const myTheme = {
|
|
21
|
+
* ...defaultTheme,
|
|
22
|
+
* colors: {
|
|
23
|
+
* ...defaultTheme.colors,
|
|
24
|
+
* primary: '#FF0000', // Override primary color
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const defaultTheme: Theme;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Theme } from '@theme/theme.types';
|
|
2
|
+
/**
|
|
3
|
+
* Default module augmentation for @aurora-ds/components
|
|
4
|
+
*
|
|
5
|
+
* This provides the base theme structure for the library.
|
|
6
|
+
* Projects can override this to add custom tokens:
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // In your project: src/theme/theme.module.ts
|
|
11
|
+
* import type { Theme } from '@aurora-ds/components'
|
|
12
|
+
*
|
|
13
|
+
* // Extend the base Theme with your custom tokens
|
|
14
|
+
* interface MyTheme extends Theme {
|
|
15
|
+
* colors: Theme['colors'] & {
|
|
16
|
+
* link: string
|
|
17
|
+
* linkHover: string
|
|
18
|
+
* }
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* declare module '@aurora-ds/theme' {
|
|
22
|
+
* interface ThemeRegistry {
|
|
23
|
+
* theme: MyTheme // Override with your extended theme
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare module '@aurora-ds/theme' {
|
|
29
|
+
interface ThemeRegistry {
|
|
30
|
+
theme: Theme;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ThemeBreakpointsContract, ThemeColorContract, ThemeFontSizeContract, ThemeFontWeightContract, ThemeLineHeightContract, ThemeOpacityContract, ThemeRadiusContract, ThemeShadowsContract, ThemeSpacingContract, ThemeTransitionContract, ThemeZIndexContract } from '@interfaces/theme.contracts';
|
|
2
|
+
/**
|
|
3
|
+
* Default theme type for aurora-ds-components
|
|
4
|
+
*/
|
|
5
|
+
export type Theme = {
|
|
6
|
+
colors: ThemeColorContract;
|
|
7
|
+
spacing: ThemeSpacingContract;
|
|
8
|
+
radius: ThemeRadiusContract;
|
|
9
|
+
shadows: ThemeShadowsContract;
|
|
10
|
+
fontSize: ThemeFontSizeContract;
|
|
11
|
+
fontWeight: ThemeFontWeightContract;
|
|
12
|
+
lineHeight: ThemeLineHeightContract;
|
|
13
|
+
zIndex: ThemeZIndexContract;
|
|
14
|
+
transition: ThemeTransitionContract;
|
|
15
|
+
opacity: ThemeOpacityContract;
|
|
16
|
+
breakpoints: ThemeBreakpointsContract;
|
|
17
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { IconButtonSizes } from '@interfaces/button.types.ts';
|
|
3
3
|
type ButtonSizeConfig = {
|
|
4
4
|
height: number;
|
|
5
5
|
padding: {
|
|
6
|
-
vertical: keyof
|
|
7
|
-
horizontal: keyof
|
|
6
|
+
vertical: keyof ThemeContract['spacing'];
|
|
7
|
+
horizontal: keyof ThemeContract['spacing'];
|
|
8
8
|
};
|
|
9
|
-
fontSize: keyof
|
|
9
|
+
fontSize: keyof ThemeContract['fontSize'];
|
|
10
10
|
};
|
|
11
11
|
export declare const getButtonSizeStyles: () => Record<IconButtonSizes, ButtonSizeConfig>;
|
|
12
12
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { IconButtonSizes } from '@interfaces/button.types.ts';
|
|
3
3
|
type IconButtonSizeConfig = {
|
|
4
4
|
size: number;
|
|
5
|
-
padding: keyof
|
|
6
|
-
iconSize: keyof
|
|
5
|
+
padding: keyof ThemeContract['spacing'];
|
|
6
|
+
iconSize: keyof ThemeContract['fontSize'];
|
|
7
7
|
};
|
|
8
8
|
export declare const getIconButtonSizeStyles: () => Record<IconButtonSizes, IconButtonSizeConfig>;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { AvatarSize } from '@interfaces/avatar.types.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Get avatar sizes configuration based on the theme
|
|
@@ -6,6 +6,6 @@ import { AvatarSize } from '@interfaces/avatar.types.ts';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const getAvatarSizes: (theme: Theme) => Record<AvatarSize, {
|
|
8
8
|
size: number;
|
|
9
|
-
fontSize: keyof
|
|
9
|
+
fontSize: keyof ThemeContract["fontSize"];
|
|
10
10
|
overlap: string;
|
|
11
11
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { ChipStyleParams } from '@components/data-display/chip/Chip.props.ts';
|
|
3
|
-
export declare const getChipColorStyles: (theme:
|
|
3
|
+
export declare const getChipColorStyles: (theme: ThemeContract, color: ChipStyleParams["color"], variant: ChipStyleParams["variant"], disabled: ChipStyleParams["disabled"]) => {
|
|
4
4
|
backgroundColor: string;
|
|
5
5
|
color: string;
|
|
6
6
|
borderColor: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { ChipStyleParams } from '@components/data-display/chip/Chip.props.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Get chip size styles based on the theme, size and icon-only state
|
|
@@ -6,7 +6,7 @@ import { ChipStyleParams } from '@components/data-display/chip/Chip.props.ts';
|
|
|
6
6
|
* @param size - Chip size
|
|
7
7
|
* @param isIconOnly - Whether the chip has only an icon (no label)
|
|
8
8
|
*/
|
|
9
|
-
export declare const getChipSizeStyles: (theme:
|
|
9
|
+
export declare const getChipSizeStyles: (theme: ThemeContract, size: ChipStyleParams["size"], isIconOnly: ChipStyleParams["isIconOnly"]) => {
|
|
10
10
|
padding: string;
|
|
11
11
|
fontSize: string;
|
|
12
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { TextVariants, TextVariantStyle } from '@interfaces/text.types.ts';
|
|
3
3
|
/**
|
|
4
4
|
* Get text variant styles based on the theme
|
|
5
5
|
* @param theme
|
|
6
6
|
*/
|
|
7
|
-
export declare const getTextVariantStyles: (theme:
|
|
7
|
+
export declare const getTextVariantStyles: (theme: ThemeContract) => Record<TextVariants, TextVariantStyle>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeContract } from '@/interfaces';
|
|
2
2
|
import { AlertVariant } from '@interfaces/alert.types';
|
|
3
3
|
export interface AlertVariantColors {
|
|
4
4
|
background: string;
|
|
@@ -11,4 +11,4 @@ export interface AlertVariantColors {
|
|
|
11
11
|
* @param variant - Alert variant
|
|
12
12
|
* @returns Colors for the variant
|
|
13
13
|
*/
|
|
14
|
-
export declare const getAlertVariantColors: (theme:
|
|
14
|
+
export declare const getAlertVariantColors: (theme: ThemeContract, variant: AlertVariant) => AlertVariantColors;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Theme } from '@aurora-ds/theme';
|
|
2
1
|
import { ReactNode, MouseEvent } from 'react';
|
|
2
|
+
import { ThemeContract } from '@/interfaces';
|
|
3
3
|
import { ButtonVariants, IconButtonSizes } from '@interfaces/button.types.ts';
|
|
4
4
|
export type ButtonProps = {
|
|
5
5
|
/** Button text label */
|
|
@@ -19,13 +19,13 @@ export type ButtonProps = {
|
|
|
19
19
|
/** Disabled state */
|
|
20
20
|
disabled?: boolean;
|
|
21
21
|
/** Custom text color (overrides variant color) */
|
|
22
|
-
textColor?: keyof
|
|
22
|
+
textColor?: keyof ThemeContract['colors'];
|
|
23
23
|
/** Custom backgroundColor (overrides variant backgroundColor) */
|
|
24
|
-
backgroundColor?: keyof
|
|
24
|
+
backgroundColor?: keyof ThemeContract['colors'];
|
|
25
25
|
/** Custom hover backgroundColor (overrides variant hover backgroundColor) */
|
|
26
|
-
hoverBackgroundColor?: keyof
|
|
26
|
+
hoverBackgroundColor?: keyof ThemeContract['colors'];
|
|
27
27
|
/** Custom active backgroundColor (overrides variant active backgroundColor) */
|
|
28
|
-
activeBackgroundColor?: keyof
|
|
28
|
+
activeBackgroundColor?: keyof ThemeContract['colors'];
|
|
29
29
|
/** Size of the button */
|
|
30
30
|
size?: IconButtonSizes;
|
|
31
31
|
/** Accessibility label for screen readers */
|
|
@@ -42,9 +42,9 @@ export type ButtonProps = {
|
|
|
42
42
|
export type ButtonStyleParams = {
|
|
43
43
|
variant?: ButtonVariants;
|
|
44
44
|
active?: boolean;
|
|
45
|
-
textColor?: keyof
|
|
46
|
-
backgroundColor?: keyof
|
|
47
|
-
hoverBackgroundColor?: keyof
|
|
48
|
-
activeBackgroundColor?: keyof
|
|
45
|
+
textColor?: keyof ThemeContract['colors'];
|
|
46
|
+
backgroundColor?: keyof ThemeContract['colors'];
|
|
47
|
+
hoverBackgroundColor?: keyof ThemeContract['colors'];
|
|
48
|
+
activeBackgroundColor?: keyof ThemeContract['colors'];
|
|
49
49
|
size?: IconButtonSizes;
|
|
50
50
|
};
|