digital-rabbit-cl 1.2.8 → 1.3.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.
Files changed (72) hide show
  1. package/README.md +1 -1
  2. package/dist/components/Button/Button.d.ts +6 -14
  3. package/dist/components/Button/Button.d.ts.map +1 -1
  4. package/dist/components/Button/useButtonStyles.d.ts +2 -2
  5. package/dist/components/Button/useButtonStyles.d.ts.map +1 -1
  6. package/dist/components/Checkbox/Checkbox.d.ts +8 -3
  7. package/dist/components/Checkbox/Checkbox.d.ts.map +1 -1
  8. package/dist/components/Checkbox/useCheckboxStyles.d.ts +1 -1
  9. package/dist/components/Checkbox/useCheckboxStyles.d.ts.map +1 -1
  10. package/dist/components/FeatureCard/FeatureCard.d.ts +3 -2
  11. package/dist/components/FeatureCard/FeatureCard.d.ts.map +1 -1
  12. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts +2 -3
  13. package/dist/components/FeatureGridSection/FeatureGridSection.d.ts.map +1 -1
  14. package/dist/components/Footer/Footer.d.ts +4 -8
  15. package/dist/components/Footer/Footer.d.ts.map +1 -1
  16. package/dist/components/Footer/useFooterStyles.d.ts +10 -10
  17. package/dist/components/Footer/useFooterStyles.d.ts.map +1 -1
  18. package/dist/components/Form/Form.d.ts +3 -1
  19. package/dist/components/Form/Form.d.ts.map +1 -1
  20. package/dist/components/Form/FormField.d.ts +1 -1
  21. package/dist/components/Form/FormField.d.ts.map +1 -1
  22. package/dist/components/FormError/FormError.d.ts +1 -1
  23. package/dist/components/FormError/FormError.d.ts.map +1 -1
  24. package/dist/components/FormGroup/FormGroup.d.ts +6 -9
  25. package/dist/components/FormGroup/FormGroup.d.ts.map +1 -1
  26. package/dist/components/FormLabel/FormLabel.d.ts +3 -3
  27. package/dist/components/FormLabel/FormLabel.d.ts.map +1 -1
  28. package/dist/components/Hamburger/Hamburger.d.ts +4 -5
  29. package/dist/components/Hamburger/Hamburger.d.ts.map +1 -1
  30. package/dist/components/Hamburger/useHamburgerStyles.d.ts +1 -1
  31. package/dist/components/Hamburger/useHamburgerStyles.d.ts.map +1 -1
  32. package/dist/components/Header/Header.d.ts +4 -8
  33. package/dist/components/Header/Header.d.ts.map +1 -1
  34. package/dist/components/Header/useHeaderStyles.d.ts +3 -3
  35. package/dist/components/Header/useHeaderStyles.d.ts.map +1 -1
  36. package/dist/components/Hero/Hero.d.ts +1 -1
  37. package/dist/components/Hero/Hero.d.ts.map +1 -1
  38. package/dist/components/Input/Input.d.ts +3 -3
  39. package/dist/components/Input/Input.d.ts.map +1 -1
  40. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +7 -3
  41. package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
  42. package/dist/components/PageLayout/PageLayout.d.ts +3 -2
  43. package/dist/components/PageLayout/PageLayout.d.ts.map +1 -1
  44. package/dist/components/Radio/Radio.d.ts +8 -3
  45. package/dist/components/Radio/Radio.d.ts.map +1 -1
  46. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts +8 -7
  47. package/dist/components/ResponsiveNav/ResponsiveNav.d.ts.map +1 -1
  48. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts +4 -4
  49. package/dist/components/ResponsiveSection/ResponsiveSection.d.ts.map +1 -1
  50. package/dist/components/Select/Select.d.ts +3 -3
  51. package/dist/components/Select/Select.d.ts.map +1 -1
  52. package/dist/components/Stack/Stack.d.ts +2 -2
  53. package/dist/components/Stack/Stack.d.ts.map +1 -1
  54. package/dist/components/Textarea/Textarea.d.ts +3 -3
  55. package/dist/components/Textarea/Textarea.d.ts.map +1 -1
  56. package/dist/digital-rabbit-cl.es.js +1177 -1066
  57. package/dist/digital-rabbit-cl.umd.js +4 -4
  58. package/dist/index.d.ts +4 -2
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/test-utils.d.ts +2 -1
  61. package/dist/test-utils.d.ts.map +1 -1
  62. package/dist/theme/ThemeContext.d.ts +2 -7
  63. package/dist/theme/ThemeContext.d.ts.map +1 -1
  64. package/dist/theme/index.d.ts +2 -2
  65. package/dist/theme/index.d.ts.map +1 -1
  66. package/dist/types/utils.d.ts +7 -0
  67. package/dist/types/utils.d.ts.map +1 -0
  68. package/dist/utils.d.ts +23 -0
  69. package/dist/utils.d.ts.map +1 -0
  70. package/package.json +1 -1
  71. package/dist/utils/componentProps.d.ts +0 -247
  72. package/dist/utils/componentProps.d.ts.map +0 -1
@@ -1,247 +0,0 @@
1
- import { default as React } from 'react';
2
- import { ThemeColors, ThemeFonts, ThemeBorder, ThemeBreakpoints, ThemeLayout } from '../theme/ThemeContext';
3
- /**
4
- * Typography props derived from theme.fonts
5
- * All properties are optional to allow selective overrides
6
- */
7
- export type TypographyProps = Partial<ThemeFonts>;
8
- /**
9
- * Color props derived from theme.colors
10
- * Includes common aliases for better DX
11
- */
12
- export interface ColorProps extends Partial<ThemeColors> {
13
- /**
14
- * Text/foreground color - alias for easier usage
15
- * Falls back to theme.fonts.color or theme.colors.primary
16
- */
17
- color?: string;
18
- /**
19
- * Background color
20
- */
21
- background?: string;
22
- }
23
- /**
24
- * Border props derived from theme.border
25
- * All properties are optional to allow selective overrides
26
- */
27
- export interface BorderProps extends Partial<ThemeBorder> {
28
- /**
29
- * Border color - typically uses theme.colors.primary
30
- * @example '#ccc', 'currentColor', 'transparent'
31
- */
32
- borderColor?: string;
33
- }
34
- /**
35
- * Breakpoint props derived from theme.breakpoints
36
- * All properties are optional to allow selective overrides
37
- */
38
- export type BreakpointProps = Partial<ThemeBreakpoints>;
39
- /**
40
- * Layout and spacing props derived from theme.layout
41
- * Includes both layout properties and spacing properties
42
- * All properties are optional to allow selective overrides
43
- */
44
- export interface LayoutProps extends Partial<ThemeLayout> {
45
- /**
46
- * Layout direction for flex/grid containers
47
- * @example 'row', 'column'
48
- */
49
- direction?: 'row' | 'column';
50
- /**
51
- * Minimum width
52
- * @example '320px', '100%'
53
- */
54
- minWidth?: string;
55
- /**
56
- * Width
57
- * @example '100%', '50vw', 'auto'
58
- */
59
- width?: string;
60
- /**
61
- * Height
62
- * @example '100%', '50vh', 'auto'
63
- */
64
- height?: string;
65
- /**
66
- * Margin (all sides or individual)
67
- * @example '1rem', '10px 20px', '1rem auto'
68
- */
69
- margin?: string;
70
- /**
71
- * Gap between flex/grid children
72
- * @example '1rem', '10px', '0.5rem'
73
- */
74
- gap?: string;
75
- }
76
- /**
77
- * State props for interactive components
78
- * These manage component state and are not part of theme
79
- */
80
- export interface StateProps {
81
- /**
82
- * Disabled state
83
- */
84
- disabled?: boolean;
85
- /**
86
- * Error state
87
- */
88
- error?: boolean;
89
- /**
90
- * Loading state
91
- */
92
- loading?: boolean;
93
- /**
94
- * Active/selected state
95
- */
96
- active?: boolean;
97
- /**
98
- * Read-only state
99
- */
100
- readonly?: boolean;
101
- }
102
- /**
103
- * Hover state props for interactive elements
104
- * These define hover behavior
105
- */
106
- export interface HoverProps {
107
- /**
108
- * Color on hover
109
- */
110
- hoverColor?: string;
111
- /**
112
- * Background color on hover
113
- */
114
- hoverBackground?: string;
115
- /**
116
- * Border color on hover
117
- */
118
- hoverBorderColor?: string;
119
- /**
120
- * Opacity on hover
121
- * @example 0.8, 1
122
- */
123
- hoverOpacity?: number;
124
- }
125
- /**
126
- * Base props that should be available on all components
127
- */
128
- export interface BaseComponentProps {
129
- /**
130
- * Custom CSS class name
131
- */
132
- className?: string;
133
- /**
134
- * Inline styles (use sparingly, prefer className)
135
- */
136
- style?: React.CSSProperties;
137
- /**
138
- * Child elements
139
- */
140
- children?: React.ReactNode;
141
- }
142
- /**
143
- * Common props for form elements (Input, Textarea, Select)
144
- * Contains HTML attributes shared across form elements
145
- */
146
- export interface FormElementProps {
147
- /**
148
- * Element id attribute - used for label associations
149
- */
150
- id?: string;
151
- /**
152
- * Element name attribute - used for form submissions
153
- */
154
- name?: string;
155
- }
156
- /**
157
- * Common props for text-based form inputs (Input, Textarea, Select)
158
- * Contains value and placeholder-related props
159
- */
160
- export interface TextInputProps {
161
- /**
162
- * Placeholder text displayed when empty
163
- */
164
- placeholder?: string;
165
- /**
166
- * Placeholder opacity - defaults to 0.3
167
- * For Select, this affects the placeholder option opacity
168
- */
169
- placeholderOpacity?: number;
170
- /**
171
- * Current value of the form element
172
- */
173
- value?: string;
174
- }
175
- /**
176
- * Composite interface for layout components (Footer, Hero, ResponsiveSection)
177
- * Combines color, layout, and breakpoint props
178
- */
179
- export interface LayoutComponentStyleProps extends ColorProps, LayoutProps, BreakpointProps {
180
- /**
181
- * Vertical rhythm multiplier - uses theme.fonts.rhythm as base
182
- */
183
- verticalRhythm?: number;
184
- /**
185
- * Font size for layout text
186
- */
187
- fontSize?: string;
188
- }
189
- /**
190
- * Utility type for extracting HTML attributes for specific elements
191
- * Use this pattern instead of spreading props on root elements
192
- *
193
- * @example
194
- * interface MyComponentProps {
195
- * divProps?: ElementSpecificProps<HTMLDivElement>;
196
- * buttonProps?: ElementSpecificProps<HTMLButtonElement>;
197
- * }
198
- */
199
- export type ElementSpecificProps<T extends HTMLElement> = React.HTMLAttributes<T> & {
200
- [key: string]: any;
201
- };
202
- /**
203
- * Helper type to make React HTML attribute types more permissive for data-* and aria-* attributes
204
- */
205
- type PermissiveHTMLAttributes<T> = T & {
206
- [key: string]: any;
207
- };
208
- /**
209
- * Button attributes that accept data-* and aria-* attributes
210
- */
211
- export type ButtonAttributes = PermissiveHTMLAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;
212
- /**
213
- * Input attributes that accept data-* and aria-* attributes
214
- */
215
- export type InputAttributes = PermissiveHTMLAttributes<React.InputHTMLAttributes<HTMLInputElement>>;
216
- /**
217
- * Select attributes that accept data-* and aria-* attributes
218
- */
219
- export type SelectAttributes = PermissiveHTMLAttributes<React.SelectHTMLAttributes<HTMLSelectElement>>;
220
- /**
221
- * Textarea attributes that accept data-* and aria-* attributes
222
- */
223
- export type TextareaAttributes = PermissiveHTMLAttributes<React.TextareaHTMLAttributes<HTMLTextAreaElement>>;
224
- /**
225
- * Label attributes that accept data-* and aria-* attributes
226
- */
227
- export type LabelAttributes = PermissiveHTMLAttributes<React.LabelHTMLAttributes<HTMLLabelElement>>;
228
- /**
229
- * Generic HTML attributes that accept data-* and aria-* attributes
230
- */
231
- export type HTMLElementAttributes<T extends HTMLElement = HTMLElement> = PermissiveHTMLAttributes<React.HTMLAttributes<T>>;
232
- /**
233
- * Standard size variants used across components
234
- */
235
- export type SizeVariant = 'small' | 'default' | 'large';
236
- /**
237
- * Standard color variants that map to theme colors
238
- */
239
- export type ColorVariant = 'primary' | 'secondary' | 'accent' | 'error' | 'success' | 'warning';
240
- /**
241
- * Helper type to make nested properties optional (for theme overrides)
242
- */
243
- export type DeepPartial<T> = {
244
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
245
- };
246
- export {};
247
- //# sourceMappingURL=componentProps.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"componentProps.d.ts","sourceRoot":"","sources":["../../src/utils/componentProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;GAIG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,WAAW,EACZ,MAAM,uBAAuB,CAAC;AAE/B;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAElD;;;GAGG;AACH,MAAM,WAAW,UAAW,SAAQ,OAAO,CAAC,WAAW,CAAC;IACtD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,WAAW,CAAC;IACvD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,W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