@shohojdhara/atomix 0.3.5 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -199
- package/atomix.config.ts +241 -0
- package/dist/atomix.css +260 -179
- package/dist/atomix.css.map +1 -1
- package/dist/atomix.min.css +250 -179
- package/dist/atomix.min.css.map +1 -1
- package/dist/charts.js +61 -66
- package/dist/charts.js.map +1 -1
- package/dist/core.js +47 -31
- package/dist/core.js.map +1 -1
- package/dist/forms.js +47 -31
- package/dist/forms.js.map +1 -1
- package/dist/heavy.js +47 -31
- package/dist/heavy.js.map +1 -1
- package/dist/index.d.ts +1841 -1633
- package/dist/index.esm.js +4975 -4113
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5151 -4290
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/theme.d.ts +1572 -1442
- package/dist/theme.js +4816 -4080
- package/dist/theme.js.map +1 -1
- package/package.json +6 -20
- package/src/components/Accordion/Accordion.stories.tsx +50 -17
- package/src/components/AtomixGlass/AtomixGlass.tsx +65 -31
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +11 -4
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +1 -32
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +2 -2
- package/src/components/AtomixGlass/stories/shared-components.tsx +0 -31
- package/src/components/Avatar/Avatar.stories.tsx +7 -0
- package/src/components/Badge/Badge.stories.tsx +91 -13
- package/src/components/Block/Block.stories.tsx +7 -23
- package/src/components/Breadcrumb/Breadcrumb.stories.tsx +7 -0
- package/src/components/Button/Button.stories.tsx +141 -22
- package/src/components/Button/ButtonGroup.stories.tsx +315 -0
- package/src/components/Button/ButtonGroup.tsx +67 -0
- package/src/components/Button/index.ts +2 -0
- package/src/components/Callout/Callout.stories.tsx +8 -6
- package/src/components/Card/Card.stories.tsx +82 -28
- package/src/components/Chart/AnimatedChart.tsx +0 -1
- package/src/components/Chart/AreaChart.tsx +0 -1
- package/src/components/Chart/BarChart.tsx +0 -1
- package/src/components/Chart/BubbleChart.tsx +0 -1
- package/src/components/Chart/CandlestickChart.tsx +0 -1
- package/src/components/Chart/Chart.stories.tsx +5 -7
- package/src/components/Chart/Chart.tsx +0 -16
- package/src/components/Chart/ChartRenderer.tsx +1 -1
- package/src/components/Chart/DonutChart.tsx +0 -1
- package/src/components/Chart/FunnelChart.tsx +0 -1
- package/src/components/Chart/GaugeChart.tsx +0 -1
- package/src/components/Chart/HeatmapChart.tsx +0 -1
- package/src/components/Chart/LineChart.tsx +0 -1
- package/src/components/Chart/MultiAxisChart.tsx +0 -1
- package/src/components/Chart/PieChart.tsx +0 -1
- package/src/components/Chart/RadarChart.tsx +0 -1
- package/src/components/Chart/ScatterChart.tsx +0 -1
- package/src/components/Chart/WaterfallChart.tsx +0 -1
- package/src/components/ColorModeToggle/ColorModeToggle.stories.tsx +7 -0
- package/src/components/DataTable/DataTable.stories.tsx +23 -16
- package/src/components/DatePicker/DatePicker.stories.tsx +27 -19
- package/src/components/Dropdown/Dropdown.stories.tsx +11 -19
- package/src/components/EdgePanel/EdgePanel.stories.tsx +1 -0
- package/src/components/Footer/Footer.stories.tsx +8 -6
- package/src/components/Footer/FooterLink.tsx +9 -2
- package/src/components/Form/Checkbox.stories.tsx +7 -0
- package/src/components/Form/Form.stories.tsx +7 -0
- package/src/components/Form/FormGroup.stories.tsx +9 -1
- package/src/components/Form/Input.stories.tsx +69 -16
- package/src/components/Form/Radio.stories.tsx +9 -1
- package/src/components/Form/Select.stories.tsx +9 -1
- package/src/components/Form/Textarea.stories.tsx +10 -2
- package/src/components/Hero/Hero.stories.tsx +7 -0
- package/src/components/List/List.stories.tsx +7 -0
- package/src/components/Messages/Messages.stories.tsx +8 -7
- package/src/components/Modal/Modal.stories.tsx +17 -6
- package/src/components/Navigation/Menu/Menu.stories.tsx +7 -0
- package/src/components/Navigation/Nav/Nav.stories.tsx +7 -0
- package/src/components/Navigation/Navbar/Navbar.stories.tsx +1 -0
- package/src/components/Navigation/SideMenu/SideMenu.stories.tsx +1 -1
- package/src/components/Pagination/Pagination.stories.tsx +188 -111
- package/src/components/Pagination/Pagination.tsx +83 -3
- package/src/components/PhotoViewer/PhotoViewer.stories.tsx +10 -5
- package/src/components/Popover/Popover.stories.tsx +191 -115
- package/src/components/ProductReview/ProductReview.stories.tsx +80 -58
- package/src/components/Progress/Progress.stories.tsx +79 -49
- package/src/components/Rating/Rating.stories.tsx +109 -84
- package/src/components/River/River.stories.tsx +194 -114
- package/src/components/SectionIntro/SectionIntro.stories.tsx +19 -9
- package/src/components/Slider/Slider.stories.tsx +7 -0
- package/src/components/Spinner/Spinner.stories.tsx +15 -11
- package/src/components/Steps/Steps.stories.tsx +132 -98
- package/src/components/Tabs/Tabs.stories.tsx +163 -112
- package/src/components/Testimonial/Testimonial.stories.tsx +114 -68
- package/src/components/Todo/Todo.stories.tsx +38 -12
- package/src/components/Toggle/Toggle.stories.tsx +61 -28
- package/src/components/Tooltip/Tooltip.stories.tsx +318 -200
- package/src/components/Upload/Upload.stories.tsx +122 -84
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +7 -24
- package/src/components/index.ts +1 -0
- package/src/lib/composables/useAtomixGlass.ts +2 -3
- package/src/lib/composables/useNavbar.ts +0 -10
- package/src/lib/config/loader.ts +2 -1
- package/src/lib/constants/components.ts +10 -0
- package/src/lib/hooks/useComponentCustomization.ts +1 -1
- package/src/lib/theme/README.md +174 -0
- package/src/lib/theme/adapters/index.ts +31 -0
- package/src/lib/theme/adapters/themeAdapter.ts +287 -0
- package/src/lib/theme/config/__tests__/configLoader.test.ts +207 -0
- package/src/lib/theme/config/configLoader.ts +254 -0
- package/src/lib/theme/config/loader.ts +37 -48
- package/src/lib/theme/config/types.ts +2 -2
- package/src/lib/theme/config/validator.ts +15 -91
- package/src/lib/theme/{constants.ts → constants/constants.ts} +0 -18
- package/src/lib/theme/constants/index.ts +8 -0
- package/src/lib/theme/core/ThemeRegistry.ts +19 -6
- package/src/lib/theme/core/__tests__/createTheme.test.ts +132 -0
- package/src/lib/theme/core/composeTheme.ts +155 -0
- package/src/lib/theme/core/createTheme.ts +94 -0
- package/src/lib/theme/{createTheme.ts → core/createThemeObject.ts} +10 -6
- package/src/lib/theme/core/index.ts +5 -19
- package/src/lib/theme/devtools/Comparator.tsx +346 -22
- package/src/lib/theme/devtools/IMPROVEMENTS.md +139 -38
- package/src/lib/theme/devtools/Inspector.tsx +335 -51
- package/src/lib/theme/devtools/LiveEditor.tsx +478 -107
- package/src/lib/theme/devtools/Preview.tsx +471 -221
- package/src/lib/theme/{core → devtools}/ThemeValidator.ts +1 -1
- package/src/lib/theme/devtools/index.ts +14 -4
- package/src/lib/theme/devtools/useHistory.ts +130 -0
- package/src/lib/theme/errors/index.ts +12 -0
- package/src/lib/theme/generators/cssFile.ts +79 -0
- package/src/lib/theme/generators/generateCSS.ts +89 -0
- package/src/lib/theme/{generateCSSVariables.ts → generators/generateCSSVariables.ts} +3 -13
- package/src/lib/theme/generators/index.ts +19 -0
- package/src/lib/theme/i18n/rtl.ts +5 -6
- package/src/lib/theme/index.ts +120 -15
- package/src/lib/theme/runtime/ThemeApplicator.ts +52 -111
- package/src/lib/theme/{ThemeContext.tsx → runtime/ThemeContext.tsx} +1 -1
- package/src/lib/theme/runtime/ThemeErrorBoundary.tsx +1 -1
- package/src/lib/theme/runtime/ThemeProvider.tsx +456 -179
- package/src/lib/theme/runtime/index.ts +1 -2
- package/src/lib/theme/runtime/useTheme.ts +1 -2
- package/src/lib/theme/test/testTheme.ts +385 -0
- package/src/lib/theme/tokens/index.ts +12 -0
- package/src/lib/theme/tokens/tokens.ts +721 -0
- package/src/lib/theme/types.ts +6 -42
- package/src/lib/theme/{utils.ts → utils/domUtils.ts} +2 -2
- package/src/lib/theme/utils/index.ts +11 -0
- package/src/lib/theme/utils/injectCSS.ts +90 -0
- package/src/lib/theme/utils/themeHelpers.ts +78 -0
- package/src/lib/theme/{themeUtils.ts → utils/themeUtils.ts} +1 -1
- package/src/lib/theme-tools.ts +7 -8
- package/src/lib/types/components.ts +40 -130
- package/src/lib/utils/componentUtils.ts +1 -1
- package/src/styles/01-settings/_settings.design-tokens.scss +4 -1
- package/src/styles/02-tools/_tools.button.scss +66 -79
- package/src/styles/06-components/_components.atomix-glass.scss +13 -3
- package/src/styles/06-components/_components.pagination.scss +88 -0
- package/scripts/sync-theme-config.js +0 -309
- package/src/lib/theme/composeTheme.ts +0 -370
- package/src/lib/theme/core/ThemeCache.ts +0 -283
- package/src/lib/theme/core/ThemeEngine.test.ts +0 -146
- package/src/lib/theme/core/ThemeEngine.ts +0 -665
- package/src/lib/theme/createThemeFromConfig.ts +0 -132
- package/src/lib/theme/devtools/CLI.ts +0 -364
- package/src/lib/theme/runtime/ThemeManager.test.ts +0 -192
- package/src/lib/theme/runtime/ThemeManager.ts +0 -446
- package/src/styles/03-generic/_generated-root.css +0 -26
- package/src/themes/README.md +0 -442
- package/src/themes/themes.config.js +0 -68
- /package/src/lib/theme/{cssVariableMapper.ts → adapters/cssVariableMapper.ts} +0 -0
- /package/src/lib/theme/{errors.ts → errors/errors.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
3
|
import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
|
|
3
4
|
import { BADGE, SIZES, THEME_COLORS } from '../../lib/constants/components';
|
|
@@ -11,17 +12,26 @@ const meta = {
|
|
|
11
12
|
component: Badge,
|
|
12
13
|
parameters: {
|
|
13
14
|
layout: 'centered',
|
|
15
|
+
docs: {
|
|
16
|
+
description: {
|
|
17
|
+
component:
|
|
18
|
+
'The Badge component displays small pieces of information, status indicators, or labels. It supports multiple variants, sizes, and can include icons. Badges are ideal for highlighting important information or showing status.',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
14
21
|
},
|
|
22
|
+
tags: ['autodocs'],
|
|
15
23
|
argTypes: {
|
|
16
24
|
variant: {
|
|
17
25
|
control: { type: 'select' },
|
|
18
26
|
options: THEME_COLORS,
|
|
19
27
|
description: 'The visual style of the badge',
|
|
28
|
+
defaultValue: 'primary',
|
|
20
29
|
},
|
|
21
30
|
size: {
|
|
22
31
|
control: { type: 'select' },
|
|
23
32
|
options: SIZES,
|
|
24
33
|
description: 'The size of the badge',
|
|
34
|
+
defaultValue: 'md',
|
|
25
35
|
},
|
|
26
36
|
disabled: {
|
|
27
37
|
control: 'boolean',
|
|
@@ -60,7 +70,9 @@ const Icon = () => (
|
|
|
60
70
|
</svg>
|
|
61
71
|
);
|
|
62
72
|
|
|
63
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Primary badge variant - the main badge style.
|
|
75
|
+
*/
|
|
64
76
|
export const Primary: Story = {
|
|
65
77
|
args: {
|
|
66
78
|
label: 'Primary',
|
|
@@ -69,6 +81,9 @@ export const Primary: Story = {
|
|
|
69
81
|
},
|
|
70
82
|
};
|
|
71
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Secondary badge variant - used for secondary information.
|
|
86
|
+
*/
|
|
72
87
|
export const Secondary: Story = {
|
|
73
88
|
args: {
|
|
74
89
|
label: 'Secondary',
|
|
@@ -77,6 +92,9 @@ export const Secondary: Story = {
|
|
|
77
92
|
},
|
|
78
93
|
};
|
|
79
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Success badge variant - indicates successful or positive status.
|
|
97
|
+
*/
|
|
80
98
|
export const Success: Story = {
|
|
81
99
|
args: {
|
|
82
100
|
label: 'Success',
|
|
@@ -85,6 +103,9 @@ export const Success: Story = {
|
|
|
85
103
|
},
|
|
86
104
|
};
|
|
87
105
|
|
|
106
|
+
/**
|
|
107
|
+
* Info badge variant - used for informational status.
|
|
108
|
+
*/
|
|
88
109
|
export const Info: Story = {
|
|
89
110
|
args: {
|
|
90
111
|
label: 'Info',
|
|
@@ -93,6 +114,9 @@ export const Info: Story = {
|
|
|
93
114
|
},
|
|
94
115
|
};
|
|
95
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Warning badge variant - indicates caution or warning status.
|
|
119
|
+
*/
|
|
96
120
|
export const Warning: Story = {
|
|
97
121
|
args: {
|
|
98
122
|
label: 'Warning',
|
|
@@ -101,7 +125,10 @@ export const Warning: Story = {
|
|
|
101
125
|
},
|
|
102
126
|
};
|
|
103
127
|
|
|
104
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Error badge variant - indicates error or critical status.
|
|
130
|
+
*/
|
|
131
|
+
export const Error: Story = {
|
|
105
132
|
args: {
|
|
106
133
|
label: 'Error',
|
|
107
134
|
variant: 'error',
|
|
@@ -109,6 +136,9 @@ export const error: Story = {
|
|
|
109
136
|
},
|
|
110
137
|
};
|
|
111
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Light badge variant - light color scheme.
|
|
141
|
+
*/
|
|
112
142
|
export const Light: Story = {
|
|
113
143
|
args: {
|
|
114
144
|
label: 'Light',
|
|
@@ -117,6 +147,9 @@ export const Light: Story = {
|
|
|
117
147
|
},
|
|
118
148
|
};
|
|
119
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Dark badge variant - dark color scheme.
|
|
152
|
+
*/
|
|
120
153
|
export const Dark: Story = {
|
|
121
154
|
args: {
|
|
122
155
|
label: 'Dark',
|
|
@@ -125,7 +158,9 @@ export const Dark: Story = {
|
|
|
125
158
|
},
|
|
126
159
|
};
|
|
127
160
|
|
|
128
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Small size badge variant.
|
|
163
|
+
*/
|
|
129
164
|
export const Small: Story = {
|
|
130
165
|
args: {
|
|
131
166
|
label: 'Small',
|
|
@@ -134,6 +169,9 @@ export const Small: Story = {
|
|
|
134
169
|
},
|
|
135
170
|
};
|
|
136
171
|
|
|
172
|
+
/**
|
|
173
|
+
* Medium size badge variant (default).
|
|
174
|
+
*/
|
|
137
175
|
export const Medium: Story = {
|
|
138
176
|
args: {
|
|
139
177
|
label: 'Medium',
|
|
@@ -142,6 +180,9 @@ export const Medium: Story = {
|
|
|
142
180
|
},
|
|
143
181
|
};
|
|
144
182
|
|
|
183
|
+
/**
|
|
184
|
+
* Large size badge variant.
|
|
185
|
+
*/
|
|
145
186
|
export const Large: Story = {
|
|
146
187
|
args: {
|
|
147
188
|
label: 'Large',
|
|
@@ -150,7 +191,9 @@ export const Large: Story = {
|
|
|
150
191
|
},
|
|
151
192
|
};
|
|
152
193
|
|
|
153
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Disabled badge state - non-interactive badge.
|
|
196
|
+
*/
|
|
154
197
|
export const Disabled: Story = {
|
|
155
198
|
args: {
|
|
156
199
|
label: 'Disabled',
|
|
@@ -160,7 +203,9 @@ export const Disabled: Story = {
|
|
|
160
203
|
},
|
|
161
204
|
};
|
|
162
205
|
|
|
163
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Badge with icon - displays an icon alongside the label.
|
|
208
|
+
*/
|
|
164
209
|
export const WithIcon: Story = {
|
|
165
210
|
args: {
|
|
166
211
|
label: 'With Icon',
|
|
@@ -170,12 +215,21 @@ export const WithIcon: Story = {
|
|
|
170
215
|
},
|
|
171
216
|
};
|
|
172
217
|
|
|
173
|
-
|
|
218
|
+
/**
|
|
219
|
+
* Showcase of all badge color variants in a single view.
|
|
220
|
+
*/
|
|
174
221
|
export const AllVariants: Story = {
|
|
175
222
|
args: {
|
|
176
223
|
label: 'Badge',
|
|
177
224
|
variant: 'primary',
|
|
178
225
|
},
|
|
226
|
+
parameters: {
|
|
227
|
+
docs: {
|
|
228
|
+
description: {
|
|
229
|
+
story: 'Displays all available badge color variants for easy comparison and selection.',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
},
|
|
179
233
|
render: () => (
|
|
180
234
|
<div className="u-d-flex u-flex-wrap u-gap-2">
|
|
181
235
|
{THEME_COLORS.map(color => (
|
|
@@ -185,12 +239,21 @@ export const AllVariants: Story = {
|
|
|
185
239
|
),
|
|
186
240
|
};
|
|
187
241
|
|
|
188
|
-
|
|
242
|
+
/**
|
|
243
|
+
* Showcase of all badge sizes (small, medium, large) in a single view.
|
|
244
|
+
*/
|
|
189
245
|
export const AllSizes: Story = {
|
|
190
246
|
args: {
|
|
191
247
|
label: 'Badge',
|
|
192
248
|
variant: 'primary',
|
|
193
249
|
},
|
|
250
|
+
parameters: {
|
|
251
|
+
docs: {
|
|
252
|
+
description: {
|
|
253
|
+
story: 'Compares all available badge sizes to help choose the appropriate size for your use case.',
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
},
|
|
194
257
|
render: () => (
|
|
195
258
|
<div className="u-d-flex u-align-items-center u-gap-2">
|
|
196
259
|
<Badge label="Small" variant="primary" size="sm" />
|
|
@@ -200,7 +263,9 @@ export const AllSizes: Story = {
|
|
|
200
263
|
),
|
|
201
264
|
};
|
|
202
265
|
|
|
203
|
-
|
|
266
|
+
/**
|
|
267
|
+
* Badge examples with different content types (numeric, status, with icons).
|
|
268
|
+
*/
|
|
204
269
|
export const WithDifferentContent: Story = {
|
|
205
270
|
args: {
|
|
206
271
|
label: 'Badge with different content',
|
|
@@ -241,11 +306,20 @@ export const WithDifferentContent: Story = {
|
|
|
241
306
|
),
|
|
242
307
|
};
|
|
243
308
|
|
|
244
|
-
|
|
309
|
+
/**
|
|
310
|
+
* Real-world usage examples showing badges in navigation, cards, and lists.
|
|
311
|
+
*/
|
|
245
312
|
export const UsageExamples: Story = {
|
|
246
313
|
args: {
|
|
247
314
|
label: 'Usage examples',
|
|
248
315
|
},
|
|
316
|
+
parameters: {
|
|
317
|
+
docs: {
|
|
318
|
+
description: {
|
|
319
|
+
story: 'Practical examples demonstrating how badges can be used in real-world scenarios such as navigation menus, product cards, and task lists.',
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
249
323
|
render: () => (
|
|
250
324
|
<div className="u-d-flex u-flex-column u-gap-6 u-max-width-80">
|
|
251
325
|
<div>
|
|
@@ -308,7 +382,9 @@ export const UsageExamples: Story = {
|
|
|
308
382
|
),
|
|
309
383
|
};
|
|
310
384
|
|
|
311
|
-
|
|
385
|
+
/**
|
|
386
|
+
* Theme-aware badges demonstrating how they adapt to different theme modes.
|
|
387
|
+
*/
|
|
312
388
|
export const ThemeAwareBadges: Story = {
|
|
313
389
|
args: {
|
|
314
390
|
label: 'Badge',
|
|
@@ -359,7 +435,7 @@ export const ThemeAwareBadges: Story = {
|
|
|
359
435
|
</div>
|
|
360
436
|
<div className="u-d-flex u-align-items-center u-gap-2">
|
|
361
437
|
<span className="u-d-inline-block" style={{ width: '120px' }}>
|
|
362
|
-
|
|
438
|
+
Error:
|
|
363
439
|
</span>
|
|
364
440
|
<Badge label="Failed" variant="error" />
|
|
365
441
|
</div>
|
|
@@ -375,7 +451,9 @@ export const ThemeAwareBadges: Story = {
|
|
|
375
451
|
),
|
|
376
452
|
};
|
|
377
453
|
|
|
378
|
-
|
|
454
|
+
/**
|
|
455
|
+
* Badge with glass morphism effect - primary variant.
|
|
456
|
+
*/
|
|
379
457
|
export const GlassPrimary: Story = {
|
|
380
458
|
args: {
|
|
381
459
|
label: 'Glass Primary',
|
|
@@ -540,7 +618,7 @@ export const GlassCustomSettings: Story = {
|
|
|
540
618
|
aberrationIntensity: 1,
|
|
541
619
|
cornerRadius: 16,
|
|
542
620
|
mode: 'polar',
|
|
543
|
-
},
|
|
621
|
+
} as any,
|
|
544
622
|
},
|
|
545
623
|
decorators: [
|
|
546
624
|
Story => (
|
|
@@ -5,43 +5,27 @@ import { Button } from '../Button/Button';
|
|
|
5
5
|
import { Card } from '../Card/Card';
|
|
6
6
|
import { Block } from './Block';
|
|
7
7
|
|
|
8
|
-
const meta
|
|
8
|
+
const meta = {
|
|
9
9
|
title: 'Components/Block',
|
|
10
10
|
component: Block,
|
|
11
11
|
parameters: {
|
|
12
12
|
layout: 'fullscreen',
|
|
13
13
|
docs: {
|
|
14
14
|
description: {
|
|
15
|
-
component:
|
|
16
|
-
The Block component is a flexible layout container designed for creating consistent section layouts.
|
|
17
|
-
It provides standardized spacing, background variants, and container behavior for organizing content
|
|
18
|
-
into distinct sections or blocks.
|
|
19
|
-
|
|
20
|
-
## Key Features
|
|
21
|
-
- **Flexible spacing**: Multiple spacing sizes (xs, sm, md, lg, xl, none)
|
|
22
|
-
- **Background variants**: Transparent, subtle, muted, primary, secondary, accent
|
|
23
|
-
- **Container integration**: Built-in Container support for responsive layouts
|
|
24
|
-
- **Semantic HTML**: Configurable as section, div, article, aside, or main
|
|
25
|
-
- **Full-width support**: Option for edge-to-edge content
|
|
26
|
-
|
|
27
|
-
## Usage Guidelines
|
|
28
|
-
Use Block components to:
|
|
29
|
-
- Create consistent section spacing across pages
|
|
30
|
-
- Group related content with appropriate backgrounds
|
|
31
|
-
- Build hero sections, content areas, and feature blocks
|
|
32
|
-
- Maintain visual hierarchy and rhythm in layouts
|
|
33
|
-
`,
|
|
15
|
+
component:
|
|
16
|
+
'The Block component is a flexible layout container designed for creating consistent section layouts. It provides standardized spacing, background variants, and container behavior for organizing content into distinct sections or blocks. Blocks are ideal for hero sections, content areas, feature blocks, and maintaining visual hierarchy.',
|
|
34
17
|
},
|
|
35
18
|
},
|
|
36
19
|
},
|
|
20
|
+
tags: ['autodocs'],
|
|
37
21
|
argTypes: {
|
|
38
22
|
as: {
|
|
39
|
-
control: 'select',
|
|
23
|
+
control: { type: 'select' },
|
|
40
24
|
options: ['section', 'div', 'article', 'aside', 'main'],
|
|
41
25
|
description: 'The HTML element to render as',
|
|
42
26
|
},
|
|
43
27
|
spacing: {
|
|
44
|
-
control: 'select',
|
|
28
|
+
control: { type: 'select' },
|
|
45
29
|
options: ['xs', 'sm', 'md', 'lg', 'xl', 'none'],
|
|
46
30
|
description: 'Vertical padding size',
|
|
47
31
|
},
|
|
@@ -54,7 +38,7 @@ Use Block components to:
|
|
|
54
38
|
description: 'Content to render within the block',
|
|
55
39
|
},
|
|
56
40
|
},
|
|
57
|
-
}
|
|
41
|
+
} satisfies Meta<typeof Block>;
|
|
58
42
|
|
|
59
43
|
export default meta;
|
|
60
44
|
type Story = StoryObj<typeof meta>;
|
|
@@ -7,7 +7,14 @@ const meta = {
|
|
|
7
7
|
component: Breadcrumb,
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: 'centered',
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component:
|
|
13
|
+
'The Breadcrumb component provides navigation context by showing the current page location within a site hierarchy. It helps users understand where they are and provides quick navigation to parent pages. Breadcrumbs support custom dividers, icons, and are fully accessible.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
10
16
|
},
|
|
17
|
+
tags: ['autodocs'],
|
|
11
18
|
argTypes: {
|
|
12
19
|
items: { control: 'object' },
|
|
13
20
|
divider: { control: 'text' },
|