@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
@@ -8,99 +8,101 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
8
8
  */
9
9
  export const Textarea = memo(
10
10
  forwardRef<HTMLTextAreaElement, TextareaProps>(
11
- (
12
- {
13
- value,
14
- onChange,
15
- onBlur,
16
- onFocus,
17
- placeholder,
18
- className = '',
19
- style,
20
- disabled = false,
21
- required = false,
22
- readOnly = false,
23
- id,
24
- name,
25
- rows = 4,
26
- cols,
27
- maxLength,
28
- minLength,
29
- size = 'md',
30
- variant,
31
- invalid = false,
32
- valid = false,
33
- autoFocus = false,
34
- ariaLabel,
35
- ariaDescribedBy,
36
- glass,
37
- },
38
- ref
39
- ) => {
40
- const { generateTextareaClass } = useTextarea({
41
- size,
42
- variant,
43
- disabled,
44
- invalid,
45
- valid,
46
- });
11
+ (
12
+ {
13
+ value,
14
+ defaultValue,
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
+ rows = 4,
27
+ cols,
28
+ maxLength,
29
+ minLength,
30
+ size = 'md',
31
+ variant,
32
+ invalid = false,
33
+ valid = false,
34
+ autoFocus = false,
35
+ 'aria-label': ariaLabel,
36
+ 'aria-describedby': ariaDescribedBy,
37
+ glass,
38
+ },
39
+ ref
40
+ ) => {
41
+ const { generateTextareaClass } = useTextarea({
42
+ size,
43
+ variant,
44
+ disabled,
45
+ invalid,
46
+ valid,
47
+ });
47
48
 
48
- const textareaClass = generateTextareaClass({
49
- className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
50
- size,
51
- variant,
52
- disabled,
53
- invalid,
54
- valid,
55
- });
49
+ const textareaClass = generateTextareaClass({
50
+ className: `${className} ${glass ? 'c-input--glass' : ''}`.trim(),
51
+ size,
52
+ variant,
53
+ disabled,
54
+ invalid,
55
+ valid,
56
+ });
56
57
 
57
- // Custom styles for glass effect
58
- const glassStyles = glass ? {} : {};
58
+ // Custom styles for glass effect
59
+ const glassStyles = glass ? {} : {};
59
60
 
60
- const textareaElement = (
61
- <textarea
62
- ref={ref}
63
- className={textareaClass}
64
- value={value}
65
- onChange={onChange}
66
- onBlur={onBlur}
67
- onFocus={onFocus}
68
- placeholder={placeholder}
69
- disabled={disabled}
70
- required={required}
71
- readOnly={readOnly}
72
- id={id}
73
- name={name}
74
- rows={rows}
75
- cols={cols}
76
- maxLength={maxLength}
77
- minLength={minLength}
78
- autoFocus={autoFocus}
79
- aria-label={ariaLabel}
80
- aria-describedby={ariaDescribedBy}
81
- aria-invalid={invalid}
82
- style={glass ? { ...glassStyles, ...style } : style}
83
- />
84
- );
61
+ const textareaElement = (
62
+ <textarea
63
+ ref={ref}
64
+ className={textareaClass}
65
+ value={value}
66
+ defaultValue={defaultValue}
67
+ onChange={onChange}
68
+ onBlur={onBlur}
69
+ onFocus={onFocus}
70
+ placeholder={placeholder}
71
+ disabled={disabled}
72
+ required={required}
73
+ readOnly={readOnly}
74
+ id={id}
75
+ name={name}
76
+ rows={rows}
77
+ cols={cols}
78
+ maxLength={maxLength}
79
+ minLength={minLength}
80
+ autoFocus={autoFocus}
81
+ aria-label={ariaLabel}
82
+ aria-describedby={ariaDescribedBy}
83
+ aria-invalid={invalid}
84
+ style={glass ? { ...glassStyles, ...style } : style}
85
+ />
86
+ );
85
87
 
86
- if (glass) {
87
- // Default glass settings for textareas
88
- const defaultGlassProps = {
89
- displacementScale: 60,
90
- blurAmount: 1,
91
- saturation: 180,
92
- aberrationIntensity: 1,
93
- cornerRadius: 8,
94
- mode: 'shader' as const,
95
- };
88
+ if (glass) {
89
+ // Default glass settings for textareas
90
+ const defaultGlassProps = {
91
+ displacementScale: 60,
92
+ blurAmount: 1,
93
+ saturation: 180,
94
+ aberrationIntensity: 1,
95
+ cornerRadius: 8,
96
+ mode: 'shader' as const,
97
+ };
96
98
 
97
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
99
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
98
100
 
99
- return <AtomixGlass {...glassProps}>{textareaElement}</AtomixGlass>;
100
- }
101
+ return <AtomixGlass {...glassProps}>{textareaElement}</AtomixGlass>;
102
+ }
101
103
 
102
- return textareaElement;
103
- }
104
+ return textareaElement;
105
+ }
104
106
  )
105
107
  );
106
108
 
@@ -71,7 +71,7 @@ export const Basic: Story = {
71
71
  export const VariantsShowcase: Story = {
72
72
  render: () => {
73
73
  return (
74
- <div className="u-d-flex u-flex-column u-gap-8">
74
+ <div className="u-flex u-flex-column u-gap-8">
75
75
  {['Default', 'Dash', 'Number', 'Text'].map((title, index) => {
76
76
  const variant = index === 0 ? 'default' : title.toLowerCase();
77
77
  return createListSection(`${title} List`, variant, variant);
@@ -91,7 +91,7 @@ export const ListGroupShowcase: Story = {
91
91
  ];
92
92
 
93
93
  return (
94
- <div className="u-d-flex u-flex-column u-gap-8">
94
+ <div className="u-flex u-flex-column u-gap-8">
95
95
  <div>
96
96
  <h3 style={titleStyle}>Mixed Variants ListGroup</h3>
97
97
  <ListGroup>
@@ -213,8 +213,8 @@ export const Sizes: Story = {
213
213
  const [isOpen, setIsOpen] = useState(false);
214
214
 
215
215
  return (
216
- <div className="u-d-flex u-flex-column u-gap-4">
217
- <div className="u-d-flex u-gap-4">
216
+ <div className="u-flex u-flex-column u-gap-4">
217
+ <div className="u-flex u-gap-4">
218
218
  <div
219
219
  className={`c-btn ${size === 'sm' ? 'c-btn--primary' : 'c-btn--secondary'}`}
220
220
  onClick={() => {
@@ -440,8 +440,8 @@ export const GlassModalSizes: Story = {
440
440
  const [isOpen, setIsOpen] = useState(false);
441
441
 
442
442
  return (
443
- <div className="u-d-flex u-flex-column u-gap-4">
444
- <div className="u-d-flex u-gap-4">
443
+ <div className="u-flex u-flex-column u-gap-4">
444
+ <div className="u-flex u-gap-4">
445
445
  <div
446
446
  className={`c-btn ${size === 'sm' ? 'c-btn--primary' : 'c-btn--secondary'}`}
447
447
  onClick={() => {
@@ -209,7 +209,7 @@ export const FixedBottom: Story = {
209
209
  // Navbar with different variants
210
210
  export const Variants: Story = {
211
211
  render: () => (
212
- <div className="u-d-flex u-flex-column u-gap-3">
212
+ <div className="u-flex u-flex-column u-gap-3">
213
213
  <Navbar brand={<LogoBrand />} variant="primary">
214
214
  <Nav alignment="end">
215
215
  <NavItem>Link 1</NavItem>
@@ -293,7 +293,7 @@ export const Variants: Story = {
293
293
  // Navbar with different nav alignments
294
294
  export const NavAlignments: Story = {
295
295
  render: () => (
296
- <div className="u-d-flex u-flex-column u-gap-3">
296
+ <div className="u-flex u-flex-column u-gap-3">
297
297
  <Navbar brand={<LogoBrand />}>
298
298
  <Nav alignment="start">
299
299
  <NavItem>Link 1</NavItem>
@@ -386,8 +386,8 @@ export const WithSearchField: Story = {
386
386
  <NavItem>Link 2</NavItem>
387
387
  <NavItem>Link 3</NavItem>
388
388
  </Nav>
389
- <div className="u-ms-auto u-d-flex u-align-items-center">
390
- <div className="c-search-form u-d-flex u-gap-2">
389
+ <div className="u-ms-auto u-flex u-items-center">
390
+ <div className="c-search-form u-flex u-gap-2">
391
391
  <input type="text" className="c-input c-input--sm" placeholder="Search..." />
392
392
  <button className="c-btn c-btn--primary c-btn--sm">
393
393
  <Icon name="MagnifyingGlass" size="sm" />
@@ -528,7 +528,7 @@ export const ResponsiveNavbar: Story = {
528
528
  // Mega Menu vs Dropdown Comparison
529
529
  export const MegaMenuVsDropdown: Story = {
530
530
  render: () => (
531
- <div className="u-d-flex u-flex-column u-gap-3">
531
+ <div className="u-flex u-flex-column u-gap-3">
532
532
  <div>
533
533
  <h4 className="u-mb-3">Regular Dropdown</h4>
534
534
  <Navbar brand={<LogoBrand />}>
@@ -35,7 +35,7 @@ export const Navbar = forwardRef<HTMLElement, NavbarProps>(
35
35
  backdrop = false,
36
36
  closeOnOutsideClick = true,
37
37
  closeOnEscape = true,
38
- ariaLabel = 'Main navigation',
38
+ 'aria-label': ariaLabel = 'Main navigation',
39
39
  id,
40
40
  glass,
41
41
  },
@@ -223,7 +223,7 @@ document.querySelector('.c-navbar').addEventListener('navbar:collapsed', (event)
223
223
  | `backdrop` | `boolean` | `false` | Show backdrop on mobile |
224
224
  | `closeOnOutsideClick` | `boolean` | `true` | Close on outside click |
225
225
  | `closeOnEscape` | `boolean` | `true` | Close on escape key |
226
- | `ariaLabel` | `string` | `'Main navigation'` | Accessible label |
226
+ | `aria-label` | `string` | `'Main navigation'` | Accessible label |
227
227
  | `className` | `string` | - | Additional CSS classes |
228
228
  | `disabled` | `boolean` | `false` | Disable the navbar |
229
229
 
@@ -58,7 +58,7 @@ const meta = {
58
58
  description: 'Size variant for pagination',
59
59
  defaultValue: 'md',
60
60
  },
61
- ariaLabel: {
61
+ 'aria-label': {
62
62
  control: 'text',
63
63
  description: 'Accessible label for the navigation element',
64
64
  },
@@ -71,6 +71,9 @@ const meta = {
71
71
  description: 'Enable glass morphism effect',
72
72
  },
73
73
  },
74
+ args: {
75
+ onPageChange: () => { },
76
+ },
74
77
  } satisfies Meta<typeof Pagination>;
75
78
 
76
79
  export default meta;
@@ -97,7 +100,7 @@ export const Default: Story = {
97
100
  showFirstLastButtons: true,
98
101
  showPrevNextButtons: true,
99
102
  size: 'md',
100
- ariaLabel: 'Pagination',
103
+ 'aria-label': 'Pagination',
101
104
  },
102
105
  parameters: {
103
106
  docs: {
@@ -62,7 +62,7 @@ export const Pagination: React.FC<PaginationProps> = memo(({
62
62
  size = PAGINATION_DEFAULTS.size,
63
63
  className = '',
64
64
  style,
65
- ariaLabel = 'Pagination',
65
+ 'aria-label': ariaLabel = 'Pagination',
66
66
  glass,
67
67
  }) => {
68
68
  const { paginationRange, goToPage, nextPage, prevPage, firstPage, lastPage } = usePagination({
@@ -110,7 +110,7 @@ const PhotoViewerDemo: React.FC<{ images: ImageType[]; startIndex?: number }> =
110
110
  <p className="u-mb-4 u-text-secondary">
111
111
  Click on any image to open the PhotoViewer with full functionality.
112
112
  </p>
113
- <div className="u-d-flex u-gap-4 u-mb-4">
113
+ <div className="u-flex u-gap-4 u-mb-4">
114
114
  <Badge variant="primary" label="Zoom & Pan" />
115
115
  <Badge variant="secondary" label="Keyboard Navigation" />
116
116
  <Badge variant="success" label="Touch Gestures" />
@@ -119,7 +119,7 @@ const PhotoViewerDemo: React.FC<{ images: ImageType[]; startIndex?: number }> =
119
119
  </div>
120
120
 
121
121
  <div
122
- className="u-d-grid"
122
+ className="u-grid"
123
123
  style={{ gridTemplateColumns: 'repeat(auto-fit, minmax(250px, 1fr))', gap: '1rem' }}
124
124
  >
125
125
  {images.map((image, index) => (
@@ -132,8 +132,8 @@ const PhotoViewerDemo: React.FC<{ images: ImageType[]; startIndex?: number }> =
132
132
  onClick={() => openViewer(index)}
133
133
  />
134
134
  <div className="u-position-absolute u-bottom-0 u-start-0 u-end-0 u-bg-dark u-bg-opacity-75 u-p-3">
135
- <h4 className="u-text-white u-fs-sm u-fw-medium u-mb-1">{image.title}</h4>
136
- <p className="u-text-white u-fs-xs u-opacity-75 u-mb-0">{image.author}</p>
135
+ <h4 className="u-text-white u-text-sm u-font-medium u-mb-1">{image.title}</h4>
136
+ <p className="u-text-white u-text-xs u-opacity-75 u-mb-0">{image.author}</p>
137
137
  </div>
138
138
  </div>
139
139
  ))}
@@ -249,7 +249,7 @@ export const ThumbnailPositions: Story = {
249
249
  Choose a thumbnail position and click "Open Viewer" to see the layout.
250
250
  </p>
251
251
 
252
- <div className="u-d-flex u-gap-3 u-mb-4">
252
+ <div className="u-flex u-gap-3 u-mb-4">
253
253
  {(['bottom', 'top', 'left', 'right', 'none'] as const).map(pos => (
254
254
  <Button
255
255
  key={pos}
@@ -306,8 +306,8 @@ export const FeatureControls: Story = {
306
306
  Toggle features on/off to see how they affect the PhotoViewer behavior.
307
307
  </p>
308
308
 
309
- <div className="u-d-flex u-gap-4 u-mb-4">
310
- <label className="u-d-flex u-align-items-center u-gap-2">
309
+ <div className="u-flex u-gap-4 u-mb-4">
310
+ <label className="u-flex u-items-center u-gap-2">
311
311
  <input
312
312
  type="checkbox"
313
313
  checked={features.keyboard}
@@ -315,7 +315,7 @@ export const FeatureControls: Story = {
315
315
  />
316
316
  <span>Keyboard Navigation</span>
317
317
  </label>
318
- <label className="u-d-flex u-align-items-center u-gap-2">
318
+ <label className="u-flex u-items-center u-gap-2">
319
319
  <input
320
320
  type="checkbox"
321
321
  checked={features.gestures}
@@ -323,7 +323,7 @@ export const FeatureControls: Story = {
323
323
  />
324
324
  <span>Touch Gestures</span>
325
325
  </label>
326
- <label className="u-d-flex u-align-items-center u-gap-2">
326
+ <label className="u-flex u-items-center u-gap-2">
327
327
  <input
328
328
  type="checkbox"
329
329
  checked={features.fullscreen}
@@ -386,7 +386,7 @@ export const MobileOptimized: Story = {
386
386
  <li>Responsive controls and thumbnails</li>
387
387
  <li>Full-screen info panel on mobile</li>
388
388
  </ul>
389
- <p className="u-text-tertiary u-fs-sm">
389
+ <p className="u-text-tertiary u-text-sm">
390
390
  Try this on a mobile device or use browser dev tools to simulate mobile viewport.
391
391
  </p>
392
392
  </div>
@@ -83,7 +83,7 @@ const InteractivePopover = (args: React.ComponentProps<typeof Popover>) => {
83
83
 
84
84
  const content = (
85
85
  <>
86
- <div className="u-d-flex u-align-items-center u-gap-7">
86
+ <div className="u-flex u-items-center u-gap-7">
87
87
  <span className="u-text-nowrap">Sort by</span>
88
88
  <div className="c-select">
89
89
  <select value={selectedOption} onChange={handleSelectChange}>
@@ -135,7 +135,7 @@ export const ProductReview: React.FC<ProductReviewProps> = ({
135
135
  allowHalf={allowHalf}
136
136
  maxValue={maxRating}
137
137
  size="lg"
138
- color={ratingColor}
138
+ variant={ratingColor}
139
139
  />
140
140
  <span className="c-rating__value">
141
141
  {rating > 0 ? rating.toFixed(1) : 'Select a rating'}
@@ -6,55 +6,55 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
6
6
 
7
7
  export const Progress = memo(
8
8
  forwardRef<HTMLDivElement, ProgressProps>(
9
- (
10
- {
11
- value,
12
- variant = 'primary',
13
- size = 'md',
14
- className = '',
15
- style,
16
- disabled = false,
17
- ariaLabel = PROGRESS.DEFAULTS.ARIA_LABEL,
18
- glass,
19
- },
20
- ref
21
- ) => {
22
- const { progressValue, progressStyle, progressClasses } = useProgress({
23
- value,
24
- variant,
25
- size,
26
- className,
27
- });
9
+ (
10
+ {
11
+ value,
12
+ variant = 'primary',
13
+ size = 'md',
14
+ className = '',
15
+ style,
16
+ disabled = false,
17
+ 'aria-label': ariaLabel = PROGRESS.DEFAULTS.ARIA_LABEL,
18
+ glass,
19
+ },
20
+ ref
21
+ ) => {
22
+ const { progressValue, progressStyle, progressClasses } = useProgress({
23
+ value,
24
+ variant,
25
+ size,
26
+ className,
27
+ });
28
28
 
29
- const progressContent = (
30
- <div
31
- ref={ref}
32
- className={progressClasses + (glass ? ' c-progress--glass' : '')}
33
- style={{ ...progressStyle, ...style }}
34
- role="progressbar"
35
- aria-valuemin={0}
36
- aria-valuemax={100}
37
- aria-valuenow={progressValue}
38
- aria-label={ariaLabel}
39
- aria-disabled={disabled}
40
- >
41
- <div className={PROGRESS.CLASSES.BAR}></div>
42
- </div>
43
- );
29
+ const progressContent = (
30
+ <div
31
+ ref={ref}
32
+ className={progressClasses + (glass ? ' c-progress--glass' : '')}
33
+ style={{ ...progressStyle, ...style }}
34
+ role="progressbar"
35
+ aria-valuemin={0}
36
+ aria-valuemax={100}
37
+ aria-valuenow={progressValue}
38
+ aria-label={ariaLabel}
39
+ aria-disabled={disabled}
40
+ >
41
+ <div className={PROGRESS.CLASSES.BAR}></div>
42
+ </div>
43
+ );
44
44
 
45
- if (glass) {
46
- const defaultGlassProps = {
47
- displacementScale: 30,
48
- blurAmount: 0.5,
49
- cornerRadius: 8,
50
- mode: 'shader' as const,
51
- };
52
- const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
53
- return <AtomixGlass {...glassProps}>{progressContent}</AtomixGlass>;
54
- }
45
+ if (glass) {
46
+ const defaultGlassProps = {
47
+ displacementScale: 30,
48
+ blurAmount: 0.5,
49
+ cornerRadius: 8,
50
+ mode: 'shader' as const,
51
+ };
52
+ const glassProps = glass === true ? defaultGlassProps : { ...defaultGlassProps, ...glass };
53
+ return <AtomixGlass {...glassProps}>{progressContent}</AtomixGlass>;
54
+ }
55
55
 
56
- return progressContent;
57
- }
56
+ return progressContent;
57
+ }
58
58
  )
59
59
  );
60
60
 
@@ -38,7 +38,7 @@ const meta = {
38
38
  options: SIZES,
39
39
  description: 'The size of the rating stars',
40
40
  },
41
- color: {
41
+ variant: {
42
42
  control: { type: 'select' },
43
43
  options: THEME_COLORS,
44
44
  description: 'The color variant of the rating',
@@ -104,14 +104,14 @@ export const Large: Story = {
104
104
  },
105
105
  };
106
106
 
107
- export const CustomColor: Story = {
107
+ export const CustomVariant: Story = {
108
108
  args: {
109
109
  value: 4,
110
110
  maxValue: 5,
111
111
  allowHalf: false,
112
112
  readOnly: true,
113
113
  size: 'md',
114
- color: 'warning',
114
+ variant: 'warning',
115
115
  },
116
116
  };
117
117
 
@@ -206,7 +206,7 @@ export const GlassCustom: Story = {
206
206
  allowHalf: true,
207
207
  readOnly: true,
208
208
  size: 'lg',
209
- color: 'warning',
209
+ variant: 'warning',
210
210
  glass: {
211
211
  displacementScale: 80,
212
212
  blurAmount: 2,
@@ -13,8 +13,8 @@ import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
13
13
  * <Rating value={3} onChange={handleRatingChange} />
14
14
  *
15
15
  * @example
16
- * // Read-only with custom color
17
- * <Rating value={4.5} readOnly color="warning" />
16
+ * // Read-only with custom variant
17
+ * <Rating value={4.5} readOnly variant="warning" />
18
18
  *
19
19
  * @example
20
20
  * // With half-star support
@@ -29,7 +29,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
29
29
  allowHalf = false,
30
30
  readOnly = false,
31
31
  size = 'md',
32
- color,
32
+ variant,
33
33
  onChange,
34
34
  className = '',
35
35
  style,
@@ -142,7 +142,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
142
142
  allowHalf,
143
143
  readOnly,
144
144
  size,
145
- color,
145
+ variant,
146
146
  onChange,
147
147
  ]);
148
148
 
@@ -156,16 +156,16 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
156
156
  allowHalf,
157
157
  readOnly,
158
158
  size,
159
- color,
159
+ variant,
160
160
  });
161
- }, [useVanillaJS, valueProp, defaultValue, maxValue, allowHalf, readOnly, size, color]);
161
+ }, [useVanillaJS, valueProp, defaultValue, maxValue, allowHalf, readOnly, size, variant]);
162
162
 
163
163
  // Determine CSS classes
164
164
  const ratingClasses = [
165
165
  'c-rating',
166
166
  size === 'sm' ? RATING.CLASSES.SMALL : '',
167
167
  size === 'lg' ? RATING.CLASSES.LARGE : '',
168
- color ? `c-rating--${color}` : '',
168
+ variant ? `c-rating--${variant}` : '',
169
169
  className,
170
170
  ]
171
171
  .filter(Boolean)
@@ -201,7 +201,7 @@ export const Rating = forwardRef<HTMLDivElement, RatingProps>(
201
201
  'c-rating__star',
202
202
  isFullStar ? RATING.CLASSES.FULL : '',
203
203
  isHalfStar ? RATING.CLASSES.HALF : '',
204
- color ? `c-rating__star--${color}` : '',
204
+ variant ? `c-rating__star--${variant}` : '',
205
205
  focusedIndex === i ? 'c-rating__star--focused' : '',
206
206
  ]
207
207
  .filter(Boolean)