@shohojdhara/atomix 0.3.12 → 0.3.14

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 (155) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +2 -0
  3. package/dist/atomix.css +101 -88
  4. package/dist/atomix.css.map +1 -1
  5. package/dist/atomix.min.css +5 -15258
  6. package/dist/atomix.min.css.map +1 -1
  7. package/dist/charts.d.ts +1 -1
  8. package/dist/charts.js +17 -19
  9. package/dist/charts.js.map +1 -1
  10. package/dist/core.d.ts +41 -11
  11. package/dist/core.js +55 -41
  12. package/dist/core.js.map +1 -1
  13. package/dist/forms.d.ts +28 -11
  14. package/dist/forms.js +25 -24
  15. package/dist/forms.js.map +1 -1
  16. package/dist/heavy.d.ts +1 -1
  17. package/dist/heavy.js +32 -25
  18. package/dist/heavy.js.map +1 -1
  19. package/dist/index.d.ts +122 -46
  20. package/dist/index.esm.js +865 -200
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/index.js +870 -204
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.min.js +1 -1
  25. package/dist/index.min.js.map +1 -1
  26. package/dist/theme.d.ts +27 -2
  27. package/dist/theme.js +721 -108
  28. package/dist/theme.js.map +1 -1
  29. package/package.json +1 -1
  30. package/scripts/atomix-cli.js +610 -1111
  31. package/scripts/cli/component-generator.js +610 -0
  32. package/scripts/cli/documentation-sync.js +542 -0
  33. package/scripts/cli/interactive-init.js +84 -288
  34. package/scripts/cli/mappings.js +211 -0
  35. package/scripts/cli/migration-tools.js +95 -288
  36. package/scripts/cli/template-manager.js +107 -0
  37. package/scripts/cli/templates/README.md +123 -0
  38. package/scripts/cli/templates/composable-templates.js +149 -0
  39. package/scripts/cli/templates/config-templates.js +126 -0
  40. package/scripts/cli/templates/index.js +95 -0
  41. package/scripts/cli/templates/project-templates.js +214 -0
  42. package/scripts/cli/templates/react-templates.js +261 -0
  43. package/scripts/cli/templates/scss-templates.js +156 -0
  44. package/scripts/cli/templates/storybook-templates.js +236 -0
  45. package/scripts/cli/templates/testing-templates.js +45 -0
  46. package/scripts/cli/templates/token-templates.js +447 -0
  47. package/scripts/cli/templates/types-templates.js +133 -0
  48. package/scripts/cli/templates-original-backup.js +1655 -0
  49. package/scripts/cli/templates.js +35 -0
  50. package/scripts/cli/templates_backup.js +684 -0
  51. package/scripts/cli/theme-bridge.js +20 -14
  52. package/scripts/cli/token-manager.js +150 -77
  53. package/scripts/cli/utils.js +37 -25
  54. package/src/components/Accordion/Accordion.stories.tsx +5 -5
  55. package/src/components/Accordion/Accordion.test.tsx +57 -0
  56. package/src/components/Accordion/Accordion.tsx +4 -0
  57. package/src/components/AtomixGlass/AtomixGlassContainer.tsx +41 -44
  58. package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -1
  59. package/src/components/AtomixGlass/stories/Examples.stories.tsx +37 -37
  60. package/src/components/AtomixGlass/stories/Modes.stories.tsx +1 -2
  61. package/src/components/AtomixGlass/stories/Playground.stories.tsx +50 -51
  62. package/src/components/Avatar/Avatar.stories.tsx +26 -26
  63. package/src/components/Badge/Badge.stories.tsx +31 -31
  64. package/src/components/Badge/Badge.test.tsx +51 -0
  65. package/src/components/Badge/Badge.tsx +20 -1
  66. package/src/components/Block/Block.stories.tsx +5 -5
  67. package/src/components/Breadcrumb/Breadcrumb.stories.tsx +1 -1
  68. package/src/components/Breadcrumb/Breadcrumb.tsx +2 -2
  69. package/src/components/Button/Button.stories.tsx +13 -13
  70. package/src/components/Button/Button.tsx +4 -4
  71. package/src/components/Button/ButtonGroup.stories.tsx +2 -2
  72. package/src/components/Button/README.md +5 -0
  73. package/src/components/Callout/Callout.stories.tsx +11 -11
  74. package/src/components/Callout/Callout.test.tsx +10 -10
  75. package/src/components/Callout/Callout.tsx +7 -7
  76. package/src/components/Callout/README.md +9 -8
  77. package/src/components/Card/Card.tsx +2 -2
  78. package/src/components/Chart/Chart.stories.tsx +6 -6
  79. package/src/components/Chart/Chart.tsx +1 -1
  80. package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +1 -1
  81. package/src/components/DataTable/DataTable.tsx +14 -12
  82. package/src/components/DatePicker/DatePicker.stories.tsx +6 -6
  83. package/src/components/Dropdown/Dropdown.stories.tsx +4 -4
  84. package/src/components/Form/Checkbox.stories.tsx +3 -3
  85. package/src/components/Form/Checkbox.tsx +4 -2
  86. package/src/components/Form/Form.stories.tsx +3 -3
  87. package/src/components/Form/FormGroup.stories.tsx +1 -1
  88. package/src/components/Form/Input.stories.tsx +28 -16
  89. package/src/components/Form/Input.test.tsx +59 -0
  90. package/src/components/Form/Input.tsx +97 -95
  91. package/src/components/Form/Radio.stories.tsx +94 -94
  92. package/src/components/Form/Radio.tsx +2 -2
  93. package/src/components/Form/Select.stories.tsx +4 -4
  94. package/src/components/Form/Select.tsx +2 -2
  95. package/src/components/Form/Textarea.stories.tsx +22 -7
  96. package/src/components/Form/Textarea.test.tsx +45 -0
  97. package/src/components/Form/Textarea.tsx +88 -86
  98. package/src/components/List/List.stories.tsx +2 -2
  99. package/src/components/Modal/Modal.stories.tsx +4 -4
  100. package/src/components/Navigation/Navbar/Navbar.stories.tsx +5 -5
  101. package/src/components/Navigation/Navbar/Navbar.tsx +1 -1
  102. package/src/components/Navigation/README.md +1 -1
  103. package/src/components/Pagination/Pagination.stories.tsx +5 -2
  104. package/src/components/Pagination/Pagination.tsx +1 -1
  105. package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -10
  106. package/src/components/Popover/Popover.stories.tsx +1 -1
  107. package/src/components/ProductReview/ProductReview.tsx +1 -1
  108. package/src/components/Progress/Progress.tsx +46 -46
  109. package/src/components/Rating/Rating.stories.tsx +4 -4
  110. package/src/components/Rating/Rating.tsx +8 -8
  111. package/src/components/Slider/Slider.stories.tsx +63 -63
  112. package/src/components/Spinner/Spinner.stories.tsx +2 -2
  113. package/src/components/Spinner/Spinner.test.tsx +35 -0
  114. package/src/components/Spinner/Spinner.tsx +9 -2
  115. package/src/components/Testimonial/Testimonial.stories.tsx +1 -1
  116. package/src/components/Toggle/Toggle.stories.tsx +32 -9
  117. package/src/components/Toggle/Toggle.test.tsx +91 -0
  118. package/src/components/Toggle/Toggle.tsx +44 -27
  119. package/src/components/Tooltip/Tooltip.tsx +1 -1
  120. package/src/layouts/Grid/Grid.stories.tsx +49 -49
  121. package/src/layouts/MasonryGrid/MasonryGrid.stories.tsx +2 -2
  122. package/src/lib/composables/useAccordion.ts +12 -3
  123. package/src/lib/composables/useBreadcrumb.ts +2 -2
  124. package/src/lib/composables/useCallout.ts +7 -7
  125. package/src/lib/composables/useNavbar.ts +1 -1
  126. package/src/lib/constants/components.ts +1 -1
  127. package/src/lib/storybook/InteractiveDemo.tsx +113 -0
  128. package/src/lib/storybook/PreviewContainer.tsx +36 -0
  129. package/src/lib/storybook/VariantsGrid.tsx +21 -0
  130. package/src/lib/storybook/index.ts +3 -0
  131. package/src/lib/theme/core/createThemeObject.ts +9 -5
  132. package/src/lib/theme/devtools/CLI.ts +155 -0
  133. package/src/lib/theme/devtools/DesignTokensCustomizer.stories.tsx +213 -0
  134. package/src/lib/theme/devtools/DesignTokensCustomizer.tsx +566 -0
  135. package/src/lib/theme/devtools/LiveEditor.tsx +2 -1
  136. package/src/lib/theme/devtools/index.ts +3 -0
  137. package/src/lib/theme/errors/errors.ts +8 -0
  138. package/src/lib/theme/runtime/ThemeProvider.tsx +117 -57
  139. package/src/lib/theme/runtime/__tests__/ThemeProvider.integration.test.tsx +305 -0
  140. package/src/lib/theme/runtime/__tests__/ThemeProvider.test.tsx +588 -0
  141. package/src/lib/theme/utils/__tests__/themeValidation.test.ts +264 -0
  142. package/src/lib/theme/utils/index.ts +1 -0
  143. package/src/lib/theme/utils/themeValidation.ts +501 -0
  144. package/src/lib/theme-tools.ts +32 -3
  145. package/src/lib/types/components.ts +81 -26
  146. package/src/lib/utils/themeNaming.ts +1 -1
  147. package/src/styles/06-components/_components.atomix-glass.scss +14 -15
  148. package/src/styles/06-components/_components.callout.scss +29 -33
  149. package/src/styles/06-components/_index.scss +1 -1
  150. package/src/styles/99-utilities/_utilities.display.scss +14 -3
  151. package/src/styles/99-utilities/_utilities.flex.scss +10 -10
  152. package/src/styles/99-utilities/_utilities.text.scss +28 -8
  153. package/scripts/cli/__tests__/cli-commands.test.js +0 -204
  154. package/scripts/cli/__tests__/utils.test.js +0 -201
  155. package/scripts/cli/__tests__/vitest.config.js +0 -26
@@ -72,6 +72,10 @@ const meta = {
72
72
  control: 'boolean',
73
73
  description: 'Input takes full width',
74
74
  },
75
+ defaultValue: {
76
+ control: 'text',
77
+ description: 'Initial value for uncontrolled input',
78
+ },
75
79
  },
76
80
  } satisfies Meta<typeof Input>;
77
81
 
@@ -88,12 +92,22 @@ export const Basic: Story = {
88
92
  },
89
93
  };
90
94
 
95
+ /**
96
+ * Input using defaultValue for uncontrolled component pattern.
97
+ */
98
+ export const Uncontrolled: Story = {
99
+ args: {
100
+ defaultValue: 'Initial value',
101
+ placeholder: 'Type something...',
102
+ },
103
+ };
104
+
91
105
  /**
92
106
  * Showcase of all input sizes (small, medium, large).
93
107
  */
94
108
  export const Sizes: Story = {
95
109
  render: () => (
96
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
110
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
97
111
  <Input size="sm" placeholder="Small input" />
98
112
  <Input size="md" placeholder="Medium input (default)" />
99
113
  <Input size="lg" placeholder="Large input" />
@@ -106,7 +120,7 @@ export const Sizes: Story = {
106
120
  */
107
121
  export const Types: Story = {
108
122
  render: () => (
109
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
123
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
110
124
  <Input type="text" placeholder="Text input" />
111
125
  <Input type="email" placeholder="Email input" />
112
126
  <Input type="password" placeholder="Password input" />
@@ -123,7 +137,7 @@ export const Types: Story = {
123
137
  */
124
138
  export const Variants: Story = {
125
139
  render: () => (
126
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
140
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
127
141
  <Input variant="primary" placeholder="Primary input" />
128
142
  <Input variant="success" placeholder="Success input" />
129
143
  <Input variant="error" placeholder="Error input" />
@@ -138,7 +152,7 @@ export const Variants: Story = {
138
152
  */
139
153
  export const States: Story = {
140
154
  render: () => (
141
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
155
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
142
156
  <Input placeholder="Default input" />
143
157
  <Input placeholder="Disabled input" disabled />
144
158
  <Input placeholder="Valid input" valid />
@@ -152,7 +166,7 @@ export const States: Story = {
152
166
  */
153
167
  export const WithIcons: Story = {
154
168
  render: () => (
155
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
169
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
156
170
  <Input
157
171
  placeholder="Search..."
158
172
  prefixIcon={<MagnifyingGlass size={18} />}
@@ -183,7 +197,7 @@ export const Clearable: Story = {
183
197
  render: () => {
184
198
  const [value, setValue] = React.useState('');
185
199
  return (
186
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
200
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
187
201
  <Input
188
202
  placeholder="Type to see clear button"
189
203
  value={value}
@@ -209,7 +223,7 @@ export const WithCounter: Story = {
209
223
  render: () => {
210
224
  const [value, setValue] = React.useState('');
211
225
  return (
212
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
226
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
213
227
  <Input
214
228
  placeholder="Type here (max 50 characters)"
215
229
  value={value}
@@ -236,7 +250,7 @@ export const PasswordToggle: Story = {
236
250
  render: () => {
237
251
  const [password, setPassword] = React.useState('');
238
252
  return (
239
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
253
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
240
254
  <Input
241
255
  type="password"
242
256
  placeholder="Enter password"
@@ -268,7 +282,7 @@ export const WithMessages: Story = {
268
282
  const isInvalidEmail = email.length > 0 && !isValidEmail;
269
283
 
270
284
  return (
271
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
285
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
272
286
  <Input
273
287
  type="email"
274
288
  placeholder="Email address"
@@ -299,7 +313,7 @@ export const WithMessages: Story = {
299
313
  */
300
314
  export const FullWidth: Story = {
301
315
  render: () => (
302
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '100%', maxWidth: '500px' }}>
316
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '100%', maxWidth: '500px' }}>
303
317
  <Input placeholder="Full width input" fullWidth />
304
318
  <Input
305
319
  placeholder="Full width with icon"
@@ -327,7 +341,7 @@ export const Comprehensive: Story = {
327
341
  const [bio, setBio] = React.useState('');
328
342
 
329
343
  return (
330
- <div className="u-d-flex u-flex-column u-gap-4" style={{ width: '400px' }}>
344
+ <div className="u-flex u-flex-column u-gap-4" style={{ width: '400px' }}>
331
345
  <div>
332
346
  <label style={{ display: 'block', marginBottom: '0.5rem', color: 'white' }}>
333
347
  Search
@@ -423,7 +437,7 @@ export const GlassVariants: Story = {
423
437
  <h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>
424
438
  Glass Input Variants
425
439
  </h3>
426
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
440
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
427
441
  <Input placeholder="Small Glass" size="sm" glass />
428
442
  <Input placeholder="Medium Glass" size="md" glass />
429
443
  <Input placeholder="Large Glass" size="lg" glass />
@@ -465,8 +479,6 @@ export const GlassShowcase: Story = {
465
479
  backgroundPosition: 'center',
466
480
  padding: '2rem',
467
481
  borderRadius: '12px',
468
- backgroundSize: 'cover',
469
- backgroundPosition: 'center',
470
482
  minHeight: '200px',
471
483
  display: 'flex',
472
484
  alignItems: 'center',
@@ -476,7 +488,7 @@ export const GlassShowcase: Story = {
476
488
  <h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>
477
489
  Glass Input on Background
478
490
  </h3>
479
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
491
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
480
492
  <Input placeholder="Enter your name" glass />
481
493
  <Input type="email" placeholder="Enter your email" glass />
482
494
  <Input type="password" placeholder="Enter password" glass />
@@ -498,7 +510,7 @@ export const GlassShowcase: Story = {
498
510
  }}
499
511
  >
500
512
  <h3 style={{ color: 'white', marginBottom: '1rem', fontSize: '1.2rem' }}>Glass Modes</h3>
501
- <div className="u-d-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
513
+ <div className="u-flex u-flex-column u-gap-3" style={{ width: '300px' }}>
502
514
  <Input placeholder="Standard Mode" glass={{ mode: 'standard' }} />
503
515
  <Input placeholder="Polar Mode" glass={{ mode: 'polar' }} />
504
516
  <Input placeholder="Prominent Mode" glass={{ mode: 'prominent' }} />
@@ -0,0 +1,59 @@
1
+ import { render, screen, fireEvent } from '@testing-library/react';
2
+ import { describe, it, expect, vi } from 'vitest';
3
+ import { Input } from './Input';
4
+
5
+ // Mock AtomixGlass component
6
+ vi.mock('../AtomixGlass/AtomixGlass', () => ({
7
+ AtomixGlass: ({ children, ...props }: any) => (
8
+ <div data-testid="atomix-glass" data-glass-props={JSON.stringify(props)}>
9
+ {children}
10
+ </div>
11
+ ),
12
+ }));
13
+
14
+ describe('Input Component', () => {
15
+ it('renders correctly', () => {
16
+ render(<Input placeholder="Test Input" />);
17
+ expect(screen.getByPlaceholderText('Test Input')).toBeInTheDocument();
18
+ });
19
+
20
+ it('handles controlled value', () => {
21
+ render(<Input value="Controlled Value" onChange={() => { }} />);
22
+ const input = screen.getByDisplayValue('Controlled Value');
23
+ expect(input).toBeInTheDocument();
24
+ expect(input).toHaveValue('Controlled Value');
25
+ });
26
+
27
+ it('handles uncontrolled defaultValue', () => {
28
+ render(<Input defaultValue="Default Value" />);
29
+ const input = screen.getByDisplayValue('Default Value');
30
+ expect(input).toBeInTheDocument();
31
+ expect(input).toHaveValue('Default Value');
32
+ });
33
+
34
+ it('calls onChange when typing', () => {
35
+ const handleChange = vi.fn();
36
+ render(<Input onChange={handleChange} />);
37
+ const input = screen.getByRole('textbox');
38
+ fireEvent.change(input, { target: { value: 'New Value' } });
39
+ expect(handleChange).toHaveBeenCalledTimes(1);
40
+ });
41
+
42
+ it('applies accessibility attributes', () => {
43
+ render(
44
+ <Input
45
+ aria-label="Accessible Label"
46
+ aria-describedby="description-id"
47
+ invalid
48
+ />
49
+ );
50
+ const input = screen.getByLabelText('Accessible Label');
51
+ expect(input).toHaveAttribute('aria-describedby', 'description-id');
52
+ expect(input).toHaveAttribute('aria-invalid', 'true');
53
+ });
54
+
55
+ it('renders as glass when enabled', () => {
56
+ render(<Input glass placeholder="Glass Input" />);
57
+ expect(screen.getByTestId('atomix-glass')).toBeInTheDocument();
58
+ });
59
+ });
@@ -8,108 +8,110 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
8
8
  */
9
9
  export const Input = memo(
10
10
  forwardRef<HTMLInputElement, InputProps>(
11
- (
12
- {
13
- type = 'text',
14
- value,
15
- onChange,
16
- onBlur,
17
- onFocus,
18
- placeholder,
19
- className = '',
20
- style,
21
- disabled = false,
22
- required = false,
23
- readOnly = false,
24
- id,
25
- name,
26
- autoComplete,
27
- autoFocus = false,
28
- size = 'md',
29
- variant,
30
- invalid = false,
31
- valid = false,
32
- maxLength,
33
- minLength,
34
- pattern,
35
- min,
36
- max,
37
- step,
38
- ariaLabel,
39
- ariaDescribedBy,
40
- glass,
41
- },
42
- ref
43
- ) => {
44
- const { generateInputClass } = useInput({
45
- size,
46
- variant,
47
- disabled,
48
- invalid,
49
- valid,
50
- });
11
+ (
12
+ {
13
+ type = 'text',
14
+ value,
15
+ defaultValue,
16
+ onChange,
17
+ onBlur,
18
+ onFocus,
19
+ placeholder,
20
+ className = '',
21
+ style,
22
+ disabled = false,
23
+ required = false,
24
+ readOnly = false,
25
+ id,
26
+ name,
27
+ autoComplete,
28
+ autoFocus = false,
29
+ size = 'md',
30
+ variant,
31
+ invalid = false,
32
+ valid = false,
33
+ maxLength,
34
+ minLength,
35
+ pattern,
36
+ min,
37
+ max,
38
+ step,
39
+ 'aria-label': ariaLabel,
40
+ 'aria-describedby': ariaDescribedBy,
41
+ glass,
42
+ },
43
+ ref
44
+ ) => {
45
+ const { generateInputClass } = useInput({
46
+ size,
47
+ variant,
48
+ disabled,
49
+ invalid,
50
+ valid,
51
+ });
51
52
 
52
- const inputClass = generateInputClass({
53
- className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
54
- size,
55
- variant,
56
- disabled,
57
- invalid,
58
- valid,
59
- type,
60
- });
53
+ const inputClass = generateInputClass({
54
+ className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
55
+ size,
56
+ variant,
57
+ disabled,
58
+ invalid,
59
+ valid,
60
+ type,
61
+ });
61
62
 
62
- // Custom styles for glass effect
63
- const glassStyles = glass ? {} : {};
63
+ // Custom styles for glass effect
64
+ const glassStyles = glass ? {} : {};
64
65
 
65
- const inputElement = (
66
- <input
67
- ref={ref}
68
- type={type}
69
- className={inputClass}
70
- value={value}
71
- onChange={onChange}
72
- onBlur={onBlur}
73
- onFocus={onFocus}
74
- placeholder={placeholder}
75
- disabled={disabled}
76
- required={required}
77
- readOnly={readOnly}
78
- id={id}
79
- name={name}
80
- autoComplete={autoComplete}
81
- autoFocus={autoFocus}
82
- maxLength={maxLength}
83
- minLength={minLength}
84
- pattern={pattern}
85
- min={min}
86
- max={max}
87
- step={step}
88
- aria-label={ariaLabel}
89
- aria-describedby={ariaDescribedBy}
90
- aria-invalid={invalid}
91
- style={glass ? { ...glassStyles, ...style } : style}
92
- />
93
- );
66
+ const inputElement = (
67
+ <input
68
+ ref={ref}
69
+ type={type}
70
+ className={inputClass}
71
+ value={value}
72
+ defaultValue={defaultValue}
73
+ onChange={onChange}
74
+ onBlur={onBlur}
75
+ onFocus={onFocus}
76
+ placeholder={placeholder}
77
+ disabled={disabled}
78
+ required={required}
79
+ readOnly={readOnly}
80
+ id={id}
81
+ name={name}
82
+ autoComplete={autoComplete}
83
+ autoFocus={autoFocus}
84
+ maxLength={maxLength}
85
+ minLength={minLength}
86
+ pattern={pattern}
87
+ min={min}
88
+ max={max}
89
+ step={step}
90
+ aria-label={ariaLabel}
91
+ aria-describedby={ariaDescribedBy}
92
+ aria-invalid={invalid}
93
+ style={glass ? { ...glassStyles, ...style } : style}
94
+ />
95
+ );
94
96
 
95
- if (glass) {
96
- // Default glass settings for inputs
97
- const defaultGlassProps = {
98
- displacementScale: 60,
99
- blurAmount: 1,
100
- saturation: 180,
101
- aberrationIntensity: 0.2,
102
- cornerRadius: 12,
103
- mode: 'shader' as const,
104
- };
97
+ if (glass) {
98
+ // Default glass settings for inputs
99
+ const defaultGlassProps = {
100
+ displacementScale: 60,
101
+ blurAmount: 1,
102
+ saturation: 180,
103
+ aberrationIntensity: 0.2,
104
+ cornerRadius: 12,
105
+ mode: 'shader' as const,
106
+ };
105
107
 
106
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
108
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
107
109
 
108
- return <AtomixGlass {...glassProps}>{inputElement}</AtomixGlass>;
109
- }
110
+ return <AtomixGlass {...glassProps}>{inputElement}</AtomixGlass>;
111
+ }
110
112
 
111
- return inputElement;
112
- }
113
+ return inputElement;
114
+ }
113
115
  )
114
116
  );
115
117