@aurora-ds/components 0.19.3 → 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.
Files changed (109) hide show
  1. package/README.md +196 -52
  2. package/dist/cjs/components/actions/button/Button.props.d.ts +9 -9
  3. package/dist/cjs/components/actions/icon-button/IconButton.props.d.ts +9 -10
  4. package/dist/cjs/components/data-display/chip/Chip.props.d.ts +5 -5
  5. package/dist/cjs/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
  6. package/dist/cjs/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
  7. package/dist/cjs/components/foundation/icon/Icon.props.d.ts +6 -6
  8. package/dist/cjs/components/foundation/icon/Icon.styles.d.ts +1 -1
  9. package/dist/cjs/components/foundation/text/Text.props.d.ts +5 -5
  10. package/dist/cjs/components/layout/card/Card.props.d.ts +13 -13
  11. package/dist/cjs/components/layout/grid/Grid.props.d.ts +7 -7
  12. package/dist/cjs/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
  13. package/dist/cjs/components/layout/separator/Separator.props.d.ts +3 -3
  14. package/dist/cjs/components/layout/stack/Stack.props.d.ts +5 -5
  15. package/dist/cjs/components/overlay/accordion/Accordion.props.d.ts +3 -3
  16. package/dist/cjs/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
  17. package/dist/cjs/index.d.ts +3 -0
  18. package/dist/cjs/index.js +234 -0
  19. package/dist/cjs/index.js.map +1 -1
  20. package/dist/cjs/interfaces/button.types.d.ts +2 -2
  21. package/dist/cjs/interfaces/index.d.ts +1 -0
  22. package/dist/cjs/interfaces/theme.contracts.d.ts +235 -0
  23. package/dist/cjs/theme/defaultTheme.d.ts +29 -0
  24. package/dist/cjs/theme/theme.module.d.ts +32 -0
  25. package/dist/cjs/theme/theme.types.d.ts +17 -0
  26. package/dist/cjs/theme/types/themeBreakpoints.types.d.ts +5 -0
  27. package/dist/cjs/theme/types/themeColor.types.d.ts +5 -0
  28. package/dist/cjs/theme/types/themeFontSize.types.d.ts +5 -0
  29. package/dist/cjs/theme/types/themeFontWeight.types.d.ts +5 -0
  30. package/dist/cjs/theme/types/themeLineHeight.types.d.ts +5 -0
  31. package/dist/cjs/theme/types/themeOpacity.types.d.ts +5 -0
  32. package/dist/cjs/theme/types/themeRadius.types.d.ts +5 -0
  33. package/dist/cjs/theme/types/themeShadows.types.d.ts +5 -0
  34. package/dist/cjs/theme/types/themeSpacing.types.d.ts +5 -0
  35. package/dist/cjs/theme/types/themeTransition.types.d.ts +5 -0
  36. package/dist/cjs/theme/types/themeZIndex.types.d.ts +5 -0
  37. package/dist/cjs/theme/values/themeBreakpoints.d.ts +5 -0
  38. package/dist/cjs/theme/values/themeColors.d.ts +6 -0
  39. package/dist/cjs/theme/values/themeFontSize.d.ts +5 -0
  40. package/dist/cjs/theme/values/themeFontWeight.d.ts +5 -0
  41. package/dist/cjs/theme/values/themeLineHeight.d.ts +5 -0
  42. package/dist/cjs/theme/values/themeOpacity.d.ts +5 -0
  43. package/dist/cjs/theme/values/themeRadius.d.ts +5 -0
  44. package/dist/cjs/theme/values/themeShadows.d.ts +5 -0
  45. package/dist/cjs/theme/values/themeSpacing.d.ts +5 -0
  46. package/dist/cjs/theme/values/themeTransition.d.ts +5 -0
  47. package/dist/cjs/theme/values/themeZIndex.d.ts +5 -0
  48. package/dist/cjs/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
  49. package/dist/cjs/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
  50. package/dist/cjs/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
  51. package/dist/cjs/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
  52. package/dist/cjs/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
  53. package/dist/cjs/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
  54. package/dist/cjs/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
  55. package/dist/esm/components/actions/button/Button.props.d.ts +9 -9
  56. package/dist/esm/components/actions/icon-button/IconButton.props.d.ts +9 -10
  57. package/dist/esm/components/data-display/chip/Chip.props.d.ts +5 -5
  58. package/dist/esm/components/data-display/skeleton/Skeleton.props.d.ts +2 -2
  59. package/dist/esm/components/data-display/skeleton/Skeleton.styles.d.ts +1 -1
  60. package/dist/esm/components/foundation/icon/Icon.props.d.ts +6 -6
  61. package/dist/esm/components/foundation/icon/Icon.styles.d.ts +1 -1
  62. package/dist/esm/components/foundation/text/Text.props.d.ts +5 -5
  63. package/dist/esm/components/layout/card/Card.props.d.ts +13 -13
  64. package/dist/esm/components/layout/grid/Grid.props.d.ts +7 -7
  65. package/dist/esm/components/layout/page-construction/page-section/PageSection.props.d.ts +7 -7
  66. package/dist/esm/components/layout/separator/Separator.props.d.ts +3 -3
  67. package/dist/esm/components/layout/stack/Stack.props.d.ts +5 -5
  68. package/dist/esm/components/overlay/accordion/Accordion.props.d.ts +3 -3
  69. package/dist/esm/components/overlay/menu/MenuItem/MenuItem.props.d.ts +3 -3
  70. package/dist/esm/index.d.ts +3 -0
  71. package/dist/esm/index.js +234 -1
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/esm/interfaces/button.types.d.ts +2 -2
  74. package/dist/esm/interfaces/index.d.ts +1 -0
  75. package/dist/esm/interfaces/theme.contracts.d.ts +235 -0
  76. package/dist/esm/theme/defaultTheme.d.ts +29 -0
  77. package/dist/esm/theme/theme.module.d.ts +32 -0
  78. package/dist/esm/theme/theme.types.d.ts +17 -0
  79. package/dist/esm/theme/types/themeBreakpoints.types.d.ts +5 -0
  80. package/dist/esm/theme/types/themeColor.types.d.ts +5 -0
  81. package/dist/esm/theme/types/themeFontSize.types.d.ts +5 -0
  82. package/dist/esm/theme/types/themeFontWeight.types.d.ts +5 -0
  83. package/dist/esm/theme/types/themeLineHeight.types.d.ts +5 -0
  84. package/dist/esm/theme/types/themeOpacity.types.d.ts +5 -0
  85. package/dist/esm/theme/types/themeRadius.types.d.ts +5 -0
  86. package/dist/esm/theme/types/themeShadows.types.d.ts +5 -0
  87. package/dist/esm/theme/types/themeSpacing.types.d.ts +5 -0
  88. package/dist/esm/theme/types/themeTransition.types.d.ts +5 -0
  89. package/dist/esm/theme/types/themeZIndex.types.d.ts +5 -0
  90. package/dist/esm/theme/values/themeBreakpoints.d.ts +5 -0
  91. package/dist/esm/theme/values/themeColors.d.ts +6 -0
  92. package/dist/esm/theme/values/themeFontSize.d.ts +5 -0
  93. package/dist/esm/theme/values/themeFontWeight.d.ts +5 -0
  94. package/dist/esm/theme/values/themeLineHeight.d.ts +5 -0
  95. package/dist/esm/theme/values/themeOpacity.d.ts +5 -0
  96. package/dist/esm/theme/values/themeRadius.d.ts +5 -0
  97. package/dist/esm/theme/values/themeShadows.d.ts +5 -0
  98. package/dist/esm/theme/values/themeSpacing.d.ts +5 -0
  99. package/dist/esm/theme/values/themeTransition.d.ts +5 -0
  100. package/dist/esm/theme/values/themeZIndex.d.ts +5 -0
  101. package/dist/esm/utils/ui/components/actions/button/getButtonSizeStyles.utils.d.ts +4 -4
  102. package/dist/esm/utils/ui/components/actions/icon-button/getIconButtonSizeStyles.utils.d.ts +3 -3
  103. package/dist/esm/utils/ui/components/data-display/avatar/getAvatarSizes.utils.d.ts +2 -2
  104. package/dist/esm/utils/ui/components/data-display/chip/getChipColorStyles.utils.d.ts +2 -2
  105. package/dist/esm/utils/ui/components/data-display/chip/getChipSizeStyles.utils.d.ts +2 -2
  106. package/dist/esm/utils/ui/components/foundation/text/getTextVariantStyles.utils.d.ts +2 -2
  107. package/dist/esm/utils/ui/components/overlay/alert/getAlertVariantColors.utils.d.ts +2 -2
  108. package/dist/index.d.ts +420 -108
  109. package/package.json +4 -5
package/README.md CHANGED
@@ -2,75 +2,219 @@
2
2
 
3
3
  > ⚠️ **Personal Project Notice**
4
4
  >
5
- > This library is designed for my personal projects and is not intended for public use. It is strongly discouraged to download or use this library as-is in your own projects. Feel free to use it as inspiration or reference, but no support or maintenance is guaranteed.
5
+ > This library is designed for my personal projects and is not intended for public use. Feel free to use it as inspiration or reference, but no support or maintenance is guaranteed.
6
6
 
7
- A React component library for the Aurora Design System, built with TypeScript and Storybook.
7
+ A React component library with **default theme included**. Ready to use in 3 lines of code.
8
+
9
+ **Key Features:**
10
+ - ✅ **Default theme included** - No configuration needed
11
+ - ✅ **TypeScript autocomplete** - Full IntelliSense support
12
+ - ✅ **Easy to customize** - Spread operator to override
13
+ - ✅ **Built with `@aurora-ds/theme` v3** - Powerful theming system
8
14
 
9
15
  ## Installation
10
16
 
11
17
  ```bash
12
- yarn add @aurora-ds/components
18
+ yarn add @aurora-ds/components @aurora-ds/theme react react-dom
13
19
  ```
14
20
 
15
- ### Peer Dependencies
21
+ ## Quick Start
16
22
 
17
- ```bash
18
- yarn add @aurora-ds/theme react react-dom
23
+ ```tsx
24
+ import { ThemeProvider } from '@aurora-ds/theme'
25
+ import { defaultTheme, Button } from '@aurora-ds/components'
26
+
27
+ function App() {
28
+ return (
29
+ <ThemeProvider theme={defaultTheme}>
30
+ <Button label="Click me" variant="contained" />
31
+ </ThemeProvider>
32
+ )
33
+ }
19
34
  ```
20
35
 
21
- ## Usage
36
+ That's it! 🎉
37
+
38
+ ## 🎨 Customization
39
+
40
+ ### Use Case 1: Change Token Values
41
+
42
+ You have two options to customize the theme:
22
43
 
23
- Wrap your application with the `ThemeProvider` from `@aurora-ds/theme`:
44
+ #### Option A: Using spread operator (simple)
24
45
 
25
46
  ```tsx
26
- import { ThemeProvider } from '@aurora-ds/theme';
27
- import { Button, Text, Card, Stack } from '@aurora-ds/components';
47
+ import { defaultTheme } from '@aurora-ds/components'
48
+ import { colors } from '@aurora-ds/theme'
28
49
 
29
- function App() {
30
- return (
31
- <ThemeProvider>
32
- <Card padding={'md'} gap={'sm'}>
33
- <Text variant={'h2'}>Welcome</Text>
34
- <Text variant={'p'}>This is a card with Aurora components.</Text>
35
- <Stack direction={'row'} gap={'sm'}>
36
- <Button variant={'contained'}>Primary</Button>
37
- <Button variant={'outlined'}>Secondary</Button>
38
- </Stack>
39
- </Card>
40
- </ThemeProvider>
41
- );
50
+ const myTheme = {
51
+ ...defaultTheme,
52
+ colors: {
53
+ ...defaultTheme.colors,
54
+ primary: colors.purple[600], // Change primary color
55
+ success: colors.teal[600], // Change success color
56
+ },
57
+ spacing: {
58
+ ...defaultTheme.spacing,
59
+ lg: '2rem', // Change large spacing
60
+ },
61
+ radius: {
62
+ ...defaultTheme.radius,
63
+ md: '1rem', // Change medium radius
64
+ }
42
65
  }
66
+
67
+ <ThemeProvider theme={myTheme}>
68
+ <App />
69
+ </ThemeProvider>
70
+ ```
71
+
72
+ #### Option B: Using `createTheme` (type-safe)
73
+
74
+ ```tsx
75
+ import { createTheme, colors } from '@aurora-ds/theme'
76
+ import { defaultTheme } from '@aurora-ds/components'
77
+
78
+ const myTheme = createTheme({
79
+ ...defaultTheme,
80
+ colors: {
81
+ ...defaultTheme.colors,
82
+ primary: colors.purple[600],
83
+ success: colors.teal[600],
84
+ }
85
+ })
86
+
87
+ <ThemeProvider theme={myTheme}>
88
+ <App />
89
+ </ThemeProvider>
43
90
  ```
44
91
 
45
- ## Available Components
46
-
47
- | Component | Description |
48
- |-----------|-------------|
49
- | **Accordion** | Collapsible container to show/hide content |
50
- | **Alert** | Notification component with variants (default, info, warning, error, success) and auto-dismiss |
51
- | **Avatar** | User avatar display component with image or initials |
52
- | **AvatarGroup** | Group of avatars with overlapping display |
53
- | **Breadcrumb** | Navigation component for hierarchical page structures |
54
- | **Button** | Button with variants (contained, outlined, text), icons, and states |
55
- | **Card** | Container with background, border radius, and shadow |
56
- | **Chip** | Compact element for tags, labels, or status indicators |
57
- | **DrawerItem** | Item in a drawer navigation |
58
- | **Form** | Form container component |
59
- | **Grid** | Grid layout component |
60
- | **Icon** | Icon wrapper component |
61
- | **IconButton** | Icon-only button component |
62
- | **Input** | Input field component with controlled value and change handler |
63
- | **Menu** | Dropdown menu component positioned absolutely |
64
- | **Page** | Page layout component |
65
- | **PageSection** | Section within a page |
66
- | **Pagination** | Pagination component for navigating between pages |
67
- | **Separator** | Visual separator component |
68
- | **Select** | Dropdown select component for single item selection |
69
- | **DatePicker** | Date picker component with calendar popup |
70
- | **Stack** | Flexbox container for horizontal/vertical layouts |
71
- | **Tabs** | Tab navigation component with multiple sections, used with `TabItem` |
72
- | **Text** | Typography component with semantic HTML tags (h1-h6, p, span, label) |
73
- | **TextArea** | Multi-line text input component |
92
+ Both approaches work! `createTheme` provides additional type validation.
93
+
94
+ ### Use Case 2: Add Custom Tokens
95
+
96
+ If you need tokens that don't exist in `defaultTheme` (for very specific use cases):
97
+
98
+ **Step 1: Create your theme types**
99
+ ```typescript
100
+ // src/theme/theme.types.ts
101
+ import type { Theme as BaseTheme } from '@aurora-ds/components'
102
+
103
+ export interface Theme extends BaseTheme {
104
+ colors: BaseTheme['colors'] & {
105
+ brand: string // New custom token
106
+ custom: string // New custom token
107
+ }
108
+ customSpacing: { // Entirely new category
109
+ hero: string
110
+ section: string
111
+ }
112
+ }
113
+ ```
114
+
115
+ **Step 2: Create module augmentation**
116
+ ```typescript
117
+ // src/theme/theme.module.ts
118
+ import type { Theme } from './theme.types'
119
+
120
+ declare module '@aurora-ds/theme' {
121
+ interface ThemeRegistry {
122
+ theme: Theme
123
+ }
124
+ }
125
+ ```
126
+
127
+ **Step 3: Create your theme with `createTheme`**
128
+ ```typescript
129
+ // src/theme/theme.ts
130
+ import './theme.module'
131
+ import { createTheme, colors } from '@aurora-ds/theme'
132
+ import { defaultTheme } from '@aurora-ds/components'
133
+
134
+ export const myTheme = createTheme({
135
+ ...defaultTheme,
136
+ colors: {
137
+ ...defaultTheme.colors,
138
+ brand: colors.purple[600], // Your custom token
139
+ custom: colors.pink[500], // Your custom token
140
+ },
141
+ customSpacing: { // Your custom category
142
+ hero: '10rem',
143
+ section: '5rem',
144
+ }
145
+ } as Theme)
146
+ ```
147
+
148
+ **Step 4: Use it**
149
+ ```typescript
150
+ // src/App.tsx
151
+ import { myTheme } from './theme/theme'
152
+
153
+ <ThemeProvider theme={myTheme}>
154
+ <App />
155
+ </ThemeProvider>
156
+ ```
157
+
158
+ Now you get autocomplete on your custom tokens! ✅
159
+
160
+ > **Note:** Most projects won't need this. The default theme already includes common tokens like `highlight`, `accent`, and `link`.
161
+
162
+ ### Use Case 3: Multiple Themes (Light/Dark)
163
+
164
+ Create multiple theme variants:
165
+
166
+ ```typescript
167
+ import { createTheme, colors } from '@aurora-ds/theme'
168
+ import { defaultTheme } from '@aurora-ds/components'
169
+
170
+ // Light theme (use default)
171
+ export const lightTheme = defaultTheme
172
+
173
+ // Dark theme with createTheme
174
+ export const darkTheme = createTheme({
175
+ ...defaultTheme,
176
+ colors: {
177
+ ...defaultTheme.colors,
178
+ background: colors.slate[950],
179
+ surface: colors.slate[900],
180
+ text: colors.slate[50],
181
+ primary: colors.indigo[400],
182
+ secondary: colors.slate[800],
183
+ border: colors.slate[800],
184
+ // ... other dark mode colors
185
+ }
186
+ })
187
+
188
+ // In your app
189
+ const [isDark, setIsDark] = useState(false)
190
+
191
+ <ThemeProvider theme={isDark ? darkTheme : lightTheme}>
192
+ <App />
193
+ </ThemeProvider>
194
+ ```
195
+
196
+ ## 📦 Available Tokens
197
+
198
+ The `defaultTheme` includes these token categories:
199
+
200
+ - **colors**: `primary`, `secondary`, `error`, `success`, `warning`, `info`, `highlight`, `accent`, `link`, `text`, `background`, etc.
201
+ - **spacing**: `none`, `2xs` (2px), `xs` (4px), `sm` (8px), `md` (16px), `lg` (24px), `xl` (32px), etc.
202
+ - **radius**: `none`, `xs` (2px), `sm` (4px), `md` (6px), `lg` (8px), `xl` (12px), `2xl` (16px), `full`
203
+ - **fontSize**: `2xs` (10px), `xs` (12px), `sm` (14px), `md` (16px), `lg` (20px), `xl` (24px), etc.
204
+ - **fontWeight**: `light` (300), `regular` (400), `medium` (500), `semibold` (600), `bold` (700)
205
+ - **shadows**, **transition**, **breakpoints**, **zIndex**, etc.
206
+
207
+ 💡 See all values in `src/theme/values/`
208
+
209
+ ## 🧩 Available Components
210
+
211
+ **Buttons:** Button, IconButton
212
+ **Layout:** Card, Stack, Grid, Page, PageSection, Separator
213
+ **Typography:** Text
214
+ **Forms:** Input, TextArea, Select, DatePicker, Form
215
+ **Data Display:** Chip, Avatar, AvatarGroup, Icon
216
+ **Navigation:** Breadcrumb, Tabs, DrawerItem, Menu, Pagination
217
+ **Feedback:** Alert, Accordion
74
218
 
75
219
  ## License
76
220
 
@@ -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 Theme['colors'];
22
+ textColor?: keyof ThemeContract['colors'];
23
23
  /** Custom backgroundColor (overrides variant backgroundColor) */
24
- backgroundColor?: keyof Theme['colors'];
24
+ backgroundColor?: keyof ThemeContract['colors'];
25
25
  /** Custom hover backgroundColor (overrides variant hover backgroundColor) */
26
- hoverBackgroundColor?: keyof Theme['colors'];
26
+ hoverBackgroundColor?: keyof ThemeContract['colors'];
27
27
  /** Custom active backgroundColor (overrides variant active backgroundColor) */
28
- activeBackgroundColor?: keyof Theme['colors'];
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 Theme['colors'];
46
- backgroundColor?: keyof Theme['colors'];
47
- hoverBackgroundColor?: keyof Theme['colors'];
48
- activeBackgroundColor?: keyof Theme['colors'];
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
  };
@@ -1,6 +1,5 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { MouseEvent, ReactNode } from 'react';
3
- import { IconButtonSizes, IconButtonVariants } from '@/interfaces';
2
+ import { IconButtonSizes, IconButtonVariants, ThemeContract } from '@/interfaces';
4
3
  export type IconButtonProps = {
5
4
  /** IconButton icon */
6
5
  icon?: ReactNode;
@@ -15,13 +14,13 @@ export type IconButtonProps = {
15
14
  /** Disabled state */
16
15
  disabled?: boolean;
17
16
  /** Custom text/icon color (overrides variant color) */
18
- textColor?: keyof Theme['colors'];
17
+ textColor?: keyof ThemeContract['colors'];
19
18
  /** Custom backgroundColor (overrides variant backgroundColor) */
20
- backgroundColor?: keyof Theme['colors'];
19
+ backgroundColor?: keyof ThemeContract['colors'];
21
20
  /** Custom hover backgroundColor (overrides variant hover backgroundColor) */
22
- hoverBackgroundColor?: keyof Theme['colors'];
21
+ hoverBackgroundColor?: keyof ThemeContract['colors'];
23
22
  /** Custom active backgroundColor (overrides variant active backgroundColor) */
24
- activeBackgroundColor?: keyof Theme['colors'];
23
+ activeBackgroundColor?: keyof ThemeContract['colors'];
25
24
  /** Size of the icon button */
26
25
  size?: IconButtonSizes;
27
26
  /** Accessibility label for screen readers */
@@ -39,8 +38,8 @@ export type IconButtonStyleParams = {
39
38
  variant?: IconButtonVariants;
40
39
  active?: boolean;
41
40
  size?: IconButtonSizes;
42
- textColor?: keyof Theme['colors'];
43
- backgroundColor?: keyof Theme['colors'];
44
- hoverBackgroundColor?: keyof Theme['colors'];
45
- activeBackgroundColor?: keyof Theme['colors'];
41
+ textColor?: keyof ThemeContract['colors'];
42
+ backgroundColor?: keyof ThemeContract['colors'];
43
+ hoverBackgroundColor?: keyof ThemeContract['colors'];
44
+ activeBackgroundColor?: keyof ThemeContract['colors'];
46
45
  };
@@ -1,5 +1,5 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { ReactNode } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  import { ChipColor, ChipSize, ChipVariant } from '@interfaces/chip.types';
4
4
  export type ChipProps = {
5
5
  /** Text label to display */
@@ -13,9 +13,9 @@ export type ChipProps = {
13
13
  /** Chip size */
14
14
  size?: ChipSize;
15
15
  /** Gap between icon and text (theme spacing key) */
16
- gap?: keyof Theme['spacing'];
16
+ gap?: keyof ThemeContract['spacing'];
17
17
  /** Border radius from theme */
18
- radius?: keyof Theme['radius'];
18
+ radius?: keyof ThemeContract['radius'];
19
19
  /** Disabled state */
20
20
  disabled?: boolean;
21
21
  /** Accessibility label for screen readers */
@@ -35,6 +35,6 @@ export type ChipStyleParams = {
35
35
  size: ChipSize;
36
36
  isIconOnly: boolean;
37
37
  disabled: boolean;
38
- gap?: keyof Theme['spacing'];
39
- radius?: keyof Theme['radius'];
38
+ gap?: keyof ThemeContract['spacing'];
39
+ radius?: keyof ThemeContract['radius'];
40
40
  };
@@ -1,7 +1,7 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { CSSProperties } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type SkeletonProps = {
4
4
  width: CSSProperties['width'];
5
5
  height: CSSProperties['height'];
6
- borderRadius?: keyof Theme['radius'];
6
+ borderRadius?: keyof ThemeContract['radius'];
7
7
  };
@@ -1,3 +1,3 @@
1
1
  export declare const SKELETON_STYLES: {
2
- root: (width?: import("csstype").Property.Width<string | number> | undefined, height?: import("csstype").Property.Height<string | number> | undefined, borderRadius?: keyof import("@aurora-ds/theme").BaseRadius | undefined) => string;
2
+ root: (width?: import("csstype").Property.Width<string | number> | undefined, height?: import("csstype").Property.Height<string | number> | undefined, borderRadius?: keyof import("@/interfaces").ThemeRadiusContract | undefined) => string;
3
3
  };
@@ -1,16 +1,16 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type IconProps = PropsWithChildren<{
4
4
  /** Icon size based on theme font sizes */
5
- size?: keyof Theme['fontSize'];
5
+ size?: keyof ThemeContract['fontSize'];
6
6
  /** Icon stroke/line color from theme */
7
- color?: keyof Theme['colors'];
7
+ color?: keyof ThemeContract['colors'];
8
8
  /** Background color from theme */
9
- backgroundColor?: keyof Theme['colors'];
9
+ backgroundColor?: keyof ThemeContract['colors'];
10
10
  /** Padding from theme spacing */
11
- padding?: keyof Theme['spacing'];
11
+ padding?: keyof ThemeContract['spacing'];
12
12
  /** Border radius from theme */
13
- borderRadius?: keyof Theme['radius'];
13
+ borderRadius?: keyof ThemeContract['radius'];
14
14
  /** Accessibility label for screen readers */
15
15
  ariaLabel?: string;
16
16
  /** ID of element that labels this icon */
@@ -1,3 +1,3 @@
1
1
  export declare const ICON_STYLES: {
2
- root: (size?: keyof import("@aurora-ds/theme").BaseFontSize | undefined, color?: keyof import("@aurora-ds/theme").BaseColors | undefined, backgroundColor?: keyof import("@aurora-ds/theme").BaseColors | undefined, padding?: keyof import("@aurora-ds/theme").BaseSpacing | undefined, borderRadius?: keyof import("@aurora-ds/theme").BaseRadius | undefined) => string;
2
+ root: (size?: keyof import("@/interfaces").ThemeFontSizeContract | undefined, color?: keyof import("@/interfaces").ThemeColorContract | undefined, backgroundColor?: keyof import("@/interfaces").ThemeColorContract | undefined, padding?: keyof import("@/interfaces").ThemeSpacingContract | undefined, borderRadius?: keyof import("@/interfaces").ThemeRadiusContract | undefined) => string;
3
3
  };
@@ -1,13 +1,13 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { PropsWithChildren } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  import { TextVariants } from '@interfaces/text.types.ts';
4
4
  export type TextProps = PropsWithChildren<{
5
5
  /** Text variant that determines the HTML tag and default styling */
6
6
  variant?: TextVariants;
7
7
  /** Text color from theme */
8
- color?: keyof Theme['colors'];
8
+ color?: keyof ThemeContract['colors'];
9
9
  /** Font size from theme (overrides variant fontSize if provided) */
10
- fontSize?: keyof Theme['fontSize'];
10
+ fontSize?: keyof ThemeContract['fontSize'];
11
11
  /** Font family override (CSS value) */
12
12
  fontFamily?: string;
13
13
  /** Maximum number of lines before truncation with ellipsis */
@@ -29,8 +29,8 @@ export type TextProps = PropsWithChildren<{
29
29
  }>;
30
30
  export type TextStyleParams = {
31
31
  variant?: TextVariants;
32
- color?: keyof Theme['colors'];
33
- fontSize?: keyof Theme['fontSize'];
32
+ color?: keyof ThemeContract['colors'];
33
+ fontSize?: keyof ThemeContract['fontSize'];
34
34
  fontFamily?: string;
35
35
  maxLines?: number;
36
36
  underline?: boolean;
@@ -1,30 +1,30 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type CardProps = {
4
4
  /** Card children elements */
5
5
  children: ReactNode;
6
6
  /** Flex direction of the card content */
7
7
  direction?: CSSProperties['flexDirection'];
8
8
  /** Padding inside the card (theme spacing key) */
9
- padding?: keyof Theme['spacing'];
9
+ padding?: keyof ThemeContract['spacing'];
10
10
  /** Width of the card */
11
11
  width?: CSSProperties['width'];
12
12
  /** Height of the card */
13
13
  height?: CSSProperties['height'];
14
14
  /** Gap between children (theme spacing key) */
15
- gap?: keyof Theme['spacing'];
15
+ gap?: keyof ThemeContract['spacing'];
16
16
  /** Border radius of the card */
17
- radius?: keyof Theme['radius'];
17
+ radius?: keyof ThemeContract['radius'];
18
18
  /** Shadow depth of the card */
19
- shadow?: keyof Theme['shadows'];
19
+ shadow?: keyof ThemeContract['shadows'];
20
20
  /** Alignment of items on the cross axis */
21
21
  align?: CSSProperties['alignItems'];
22
22
  /** Justification of items on the main axis */
23
23
  justify?: CSSProperties['justifyContent'];
24
24
  /** Background color of the card */
25
- backgroundColor?: keyof Theme['colors'];
25
+ backgroundColor?: keyof ThemeContract['colors'];
26
26
  /** Border color of the card */
27
- borderColor?: keyof Theme['colors'];
27
+ borderColor?: keyof ThemeContract['colors'];
28
28
  /** Accessibility label for screen readers */
29
29
  ariaLabel?: string;
30
30
  /** ID of element that labels this card */
@@ -38,14 +38,14 @@ export type CardProps = {
38
38
  };
39
39
  export type CardStyleParams = {
40
40
  direction: CSSProperties['flexDirection'];
41
- padding?: keyof Theme['spacing'];
41
+ padding?: keyof ThemeContract['spacing'];
42
42
  width?: CSSProperties['width'];
43
43
  height?: CSSProperties['height'];
44
- gap?: keyof Theme['spacing'];
45
- radius: keyof Theme['radius'];
46
- shadow: keyof Theme['shadows'];
44
+ gap?: keyof ThemeContract['spacing'];
45
+ radius: keyof ThemeContract['radius'];
46
+ shadow: keyof ThemeContract['shadows'];
47
47
  align?: CSSProperties['alignItems'];
48
48
  justify?: CSSProperties['justifyContent'];
49
- backgroundColor: keyof Theme['colors'];
50
- borderColor?: keyof Theme['colors'];
49
+ backgroundColor: keyof ThemeContract['colors'];
50
+ borderColor?: keyof ThemeContract['colors'];
51
51
  };
@@ -1,5 +1,5 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type GridProps = {
4
4
  /** Grid children elements */
5
5
  children: ReactNode;
@@ -8,9 +8,9 @@ export type GridProps = {
8
8
  /** Number of rows. */
9
9
  rows?: number;
10
10
  /** Gap between columns (theme spacing key) */
11
- columnGap?: keyof Theme['spacing'];
11
+ columnGap?: keyof ThemeContract['spacing'];
12
12
  /** Gap between rows (theme spacing key) */
13
- rowGap?: keyof Theme['spacing'];
13
+ rowGap?: keyof ThemeContract['spacing'];
14
14
  /** Width of the grid container */
15
15
  width?: CSSProperties['width'];
16
16
  /** Height of the grid container */
@@ -26,7 +26,7 @@ export type GridProps = {
26
26
  /** Justification of the entire grid within its container (main axis) */
27
27
  justifyContent?: CSSProperties['justifyContent'];
28
28
  /** Padding inside the grid */
29
- padding?: keyof Theme['spacing'];
29
+ padding?: keyof ThemeContract['spacing'];
30
30
  /** Minimum width for each grid child. Enables responsive auto-fill behavior. */
31
31
  minChildWidth?: CSSProperties['width'];
32
32
  /** Accessibility label for screen readers */
@@ -43,8 +43,8 @@ export type GridProps = {
43
43
  export type GridStyleParams = {
44
44
  columns?: number;
45
45
  rows?: number;
46
- columnGap?: keyof Theme['spacing'];
47
- rowGap?: keyof Theme['spacing'];
46
+ columnGap?: keyof ThemeContract['spacing'];
47
+ rowGap?: keyof ThemeContract['spacing'];
48
48
  width?: CSSProperties['width'];
49
49
  height?: CSSProperties['height'];
50
50
  minHeight?: CSSProperties['minHeight'];
@@ -52,6 +52,6 @@ export type GridStyleParams = {
52
52
  justifyItems?: CSSProperties['justifyItems'];
53
53
  alignContent?: CSSProperties['alignContent'];
54
54
  justifyContent?: CSSProperties['justifyContent'];
55
- padding?: keyof Theme['spacing'];
55
+ padding?: keyof ThemeContract['spacing'];
56
56
  minChildWidth?: CSSProperties['width'];
57
57
  };
@@ -1,12 +1,12 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { CSSProperties, PropsWithChildren } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type PageSectionProps = PropsWithChildren<{
4
4
  /** Gap between child elements */
5
- gap?: keyof Theme['spacing'];
5
+ gap?: keyof ThemeContract['spacing'];
6
6
  /** Horizontal padding around the section */
7
- paddingHorizontal?: keyof Theme['spacing'];
7
+ paddingHorizontal?: keyof ThemeContract['spacing'];
8
8
  /** Vertical padding around the section */
9
- paddingVertical?: keyof Theme['spacing'];
9
+ paddingVertical?: keyof ThemeContract['spacing'];
10
10
  /** Alignment of items within the section */
11
11
  alignItems?: CSSProperties['alignItems'];
12
12
  /** Maximum width of the section */
@@ -25,9 +25,9 @@ export type PageSectionProps = PropsWithChildren<{
25
25
  tabIndex?: number;
26
26
  }>;
27
27
  export type PageSectionStyleParams = {
28
- gap?: keyof Theme['spacing'];
29
- paddingHorizontal?: keyof Theme['spacing'];
30
- paddingVertical?: keyof Theme['spacing'];
28
+ gap?: keyof ThemeContract['spacing'];
29
+ paddingHorizontal?: keyof ThemeContract['spacing'];
30
+ paddingVertical?: keyof ThemeContract['spacing'];
31
31
  alignItems?: CSSProperties['alignItems'];
32
32
  maxWidth?: CSSProperties['maxWidth'];
33
33
  minHeight?: CSSProperties['minHeight'];
@@ -1,4 +1,4 @@
1
- import { Theme } from '@aurora-ds/theme';
1
+ import { ThemeContract } from '@/interfaces';
2
2
  export type SeparatorProps = {
3
3
  /** Direction of the separator */
4
4
  direction?: 'horizontal' | 'vertical';
@@ -7,11 +7,11 @@ export type SeparatorProps = {
7
7
  /** Custom height (overrides default) */
8
8
  height?: string | number;
9
9
  /** Custom color (overrides default) */
10
- color?: keyof Theme['colors'];
10
+ color?: keyof ThemeContract['colors'];
11
11
  };
12
12
  export type SeparatorStyleParams = {
13
13
  direction?: 'horizontal' | 'vertical';
14
- color?: keyof Theme['colors'];
14
+ color?: keyof ThemeContract['colors'];
15
15
  width?: string | number;
16
16
  height?: string | number;
17
17
  };
@@ -1,12 +1,12 @@
1
- import { Theme } from '@aurora-ds/theme';
2
1
  import { CSSProperties, ReactNode } from 'react';
2
+ import { ThemeContract } from '@/interfaces';
3
3
  export type StackProps = {
4
4
  /** Stack children elements */
5
5
  children: ReactNode;
6
6
  /** Flex direction of the stack */
7
7
  direction?: CSSProperties['flexDirection'];
8
8
  /** Gap between children (theme spacing or CSS value) */
9
- gap?: keyof Theme['spacing'];
9
+ gap?: keyof ThemeContract['spacing'];
10
10
  /** Width of the stack container */
11
11
  width?: CSSProperties['width'];
12
12
  /** Height of the stack container */
@@ -18,7 +18,7 @@ export type StackProps = {
18
18
  /** Whether items should wrap */
19
19
  wrap?: CSSProperties['flexWrap'];
20
20
  /** Padding inside the stack */
21
- padding?: keyof Theme['spacing'];
21
+ padding?: keyof ThemeContract['spacing'];
22
22
  /** Accessibility label for screen readers */
23
23
  ariaLabel?: string;
24
24
  /** ID of element that labels this stack */
@@ -32,11 +32,11 @@ export type StackProps = {
32
32
  };
33
33
  export type StackStyleParams = {
34
34
  direction: CSSProperties['flexDirection'];
35
- gap?: keyof Theme['spacing'];
35
+ gap?: keyof ThemeContract['spacing'];
36
36
  width?: CSSProperties['width'];
37
37
  height?: CSSProperties['height'];
38
38
  align?: CSSProperties['alignItems'];
39
39
  justify?: CSSProperties['justifyContent'];
40
40
  wrap?: CSSProperties['flexWrap'];
41
- padding?: keyof Theme['spacing'];
41
+ padding?: keyof ThemeContract['spacing'];
42
42
  };