@reliability-design/web 1.0.2 → 1.0.3
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/dist/components/rel-accordion/rel-accordion.ts +27 -22
- package/dist/components/rel-alert/rel-alert.ts +98 -66
- package/dist/components/rel-avatar/rel-avatar.ts +8 -15
- package/dist/components/rel-badge/rel-badge.ts +23 -16
- package/dist/components/rel-breadcrumb/rel-breadcrumb.ts +12 -12
- package/dist/components/rel-button/rel-button.ts +39 -59
- package/dist/components/rel-card/rel-card.ts +11 -10
- package/dist/components/rel-cardmedia/rel-cardmedia.ts +11 -17
- package/dist/components/rel-checkbox/rel-checkbox.ts +18 -35
- package/dist/components/rel-chip/rel-chip.ts +37 -128
- package/dist/components/rel-container/rel-container.ts +1 -6
- package/dist/components/rel-divider/rel-divider.ts +37 -37
- package/dist/components/rel-layout/rel-layout.ts +12 -14
- package/dist/components/rel-progress/rel-progress.ts +26 -15
- package/dist/components/rel-radio/rel-radio.ts +32 -72
- package/dist/components/rel-snackbar/rel-snackbar.ts +6 -0
- package/dist/components/rel-stepper/rel-stepper.ts +23 -2
- package/dist/components/rel-switch/rel-switch.ts +7 -5
- package/dist/components/rel-tab/rel-tab.ts +10 -8
- package/dist/components/rel-textfield/rel-textfield.ts +2 -2
- package/dist/index.d.mts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +367 -475
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +383 -489
- package/dist/index.mjs.map +1 -1
- package/dist/vars-6ZIUPIU4.css +184 -0
- package/package.json +2 -2
- package/dist/components/rel-accordion/rel-accordion.stories.ts +0 -313
- package/dist/components/rel-alert/rel-alert.stories.ts +0 -412
- package/dist/components/rel-avatar/rel-avatar.stories.ts +0 -327
- package/dist/components/rel-badge/rel-badge.stories.ts +0 -350
- package/dist/components/rel-breadcrumb/rel-breadcrumb.stories.ts +0 -306
- package/dist/components/rel-button/rel-button.stories.ts +0 -356
- package/dist/components/rel-card/rel-card.stories.ts +0 -299
- package/dist/components/rel-cardmedia/rel-cardmedia.stories.ts +0 -368
- package/dist/components/rel-checkbox/rel-checkbox.stories.ts +0 -414
- package/dist/components/rel-chip/rel-chip.stories.ts +0 -552
- package/dist/components/rel-container/rel-container.stories.ts +0 -239
- package/dist/components/rel-divider/rel-divider.stories.ts +0 -229
- package/dist/components/rel-layout/rel-layout.stories.ts +0 -713
- package/dist/components/rel-menu/rel-menu.stories.ts +0 -910
- package/dist/components/rel-progress/rel-progress.stories.ts +0 -817
- package/dist/components/rel-radio/rel-radio.stories.ts +0 -1048
- package/dist/components/rel-segmented-button/rel-segmented-button.stories.ts +0 -1079
- package/dist/components/rel-select/rel-select.stories.ts +0 -1201
- package/dist/components/rel-slider/rel-slider.stories.ts +0 -730
- package/dist/components/rel-snackbar/rel-snackbar.stories.ts +0 -808
- package/dist/components/rel-stepper/rel-stepper.stories.ts +0 -752
- package/dist/components/rel-switch/rel-switch.stories.ts +0 -441
- package/dist/components/rel-tab/rel-tab.stories.ts +0 -492
- package/dist/components/rel-textfield/rel-textfield.stories.ts +0 -710
- package/dist/components/rel-toast/rel-toast.stories.ts +0 -394
- package/dist/components/rel-tooltip/rel-tooltip.stories.ts +0 -364
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import './rel-breadcrumb';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The Breadcrumbs component displays hierarchical navigation showing the user's location.
|
|
7
|
-
* Built with Lit web components for framework-agnostic usage.
|
|
8
|
-
*
|
|
9
|
-
* ## Features
|
|
10
|
-
* - **Hierarchical Navigation**: Shows path from root to current page
|
|
11
|
-
* - **Clickable Links**: All items except current page are clickable
|
|
12
|
-
* - **Chevron Separators**: Visual arrow separators between items
|
|
13
|
-
* - **Current Page Indicator**: Bold styling for current location
|
|
14
|
-
* - **Accessible**: Uses semantic nav and aria-label for screen readers
|
|
15
|
-
* - **Flexible**: Supports any number of navigation levels
|
|
16
|
-
*/
|
|
17
|
-
const meta: Meta = {
|
|
18
|
-
title: 'Components/Breadcrumbs',
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
component: 'rel-breadcrumbs',
|
|
21
|
-
argTypes: {
|
|
22
|
-
items: {
|
|
23
|
-
control: 'object',
|
|
24
|
-
description: 'Array of breadcrumb items with label and optional url',
|
|
25
|
-
table: {
|
|
26
|
-
type: { summary: 'BreadcrumbItem[]' },
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
render: (args) => html`
|
|
31
|
-
<rel-breadcrumbs .items="${args.items}"></rel-breadcrumbs>
|
|
32
|
-
`,
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default meta;
|
|
36
|
-
type Story = StoryObj;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Simple breadcrumb - two levels
|
|
40
|
-
*/
|
|
41
|
-
export const Simple: Story = {
|
|
42
|
-
args: {
|
|
43
|
-
items: [
|
|
44
|
-
{ label: 'Home', url: '#' },
|
|
45
|
-
{ label: 'Products' },
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Three levels - typical navigation depth
|
|
52
|
-
*/
|
|
53
|
-
export const ThreeLevels: Story = {
|
|
54
|
-
args: {
|
|
55
|
-
items: [
|
|
56
|
-
{ label: 'Home', url: '#' },
|
|
57
|
-
{ label: 'Products', url: '#products' },
|
|
58
|
-
{ label: 'Electronics' },
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Deep navigation - four levels
|
|
65
|
-
*/
|
|
66
|
-
export const DeepNavigation: Story = {
|
|
67
|
-
args: {
|
|
68
|
-
items: [
|
|
69
|
-
{ label: 'Home', url: '#' },
|
|
70
|
-
{ label: 'Products', url: '#products' },
|
|
71
|
-
{ label: 'Electronics', url: '#electronics' },
|
|
72
|
-
{ label: 'Laptops' },
|
|
73
|
-
],
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Very deep - five levels
|
|
79
|
-
*/
|
|
80
|
-
export const VeryDeep: Story = {
|
|
81
|
-
args: {
|
|
82
|
-
items: [
|
|
83
|
-
{ label: 'Home', url: '#' },
|
|
84
|
-
{ label: 'Products', url: '#products' },
|
|
85
|
-
{ label: 'Electronics', url: '#electronics' },
|
|
86
|
-
{ label: 'Laptops', url: '#laptops' },
|
|
87
|
-
{ label: 'Gaming Laptops' },
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* E-commerce example - product category navigation
|
|
94
|
-
*/
|
|
95
|
-
export const EcommerceExample: Story = {
|
|
96
|
-
args: {
|
|
97
|
-
items: [
|
|
98
|
-
{ label: 'Home', url: '#' },
|
|
99
|
-
{ label: 'Shop', url: '#shop' },
|
|
100
|
-
{ label: 'Electronics', url: '#electronics' },
|
|
101
|
-
{ label: 'Computers', url: '#computers' },
|
|
102
|
-
{ label: 'MacBook Pro 16"' },
|
|
103
|
-
],
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Documentation example - docs site navigation
|
|
109
|
-
*/
|
|
110
|
-
export const DocumentationExample: Story = {
|
|
111
|
-
args: {
|
|
112
|
-
items: [
|
|
113
|
-
{ label: 'Docs', url: '#docs' },
|
|
114
|
-
{ label: 'Components', url: '#components' },
|
|
115
|
-
{ label: 'Navigation', url: '#navigation' },
|
|
116
|
-
{ label: 'Breadcrumbs' },
|
|
117
|
-
],
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Dashboard example - app navigation
|
|
123
|
-
*/
|
|
124
|
-
export const DashboardExample: Story = {
|
|
125
|
-
args: {
|
|
126
|
-
items: [
|
|
127
|
-
{ label: 'Dashboard', url: '#dashboard' },
|
|
128
|
-
{ label: 'Users', url: '#users' },
|
|
129
|
-
{ label: 'User Details' },
|
|
130
|
-
],
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Settings example - nested settings
|
|
136
|
-
*/
|
|
137
|
-
export const SettingsExample: Story = {
|
|
138
|
-
args: {
|
|
139
|
-
items: [
|
|
140
|
-
{ label: 'Settings', url: '#settings' },
|
|
141
|
-
{ label: 'Account', url: '#account' },
|
|
142
|
-
{ label: 'Privacy', url: '#privacy' },
|
|
143
|
-
{ label: 'Data & Permissions' },
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* File system example - file browser navigation
|
|
150
|
-
*/
|
|
151
|
-
export const FileSystemExample: Story = {
|
|
152
|
-
args: {
|
|
153
|
-
items: [
|
|
154
|
-
{ label: 'Root', url: '#' },
|
|
155
|
-
{ label: 'Documents', url: '#documents' },
|
|
156
|
-
{ label: 'Work', url: '#work' },
|
|
157
|
-
{ label: 'Projects', url: '#projects' },
|
|
158
|
-
{ label: '2024', url: '#2024' },
|
|
159
|
-
{ label: 'Q4 Report.pdf' },
|
|
160
|
-
],
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Various depths - different navigation levels
|
|
166
|
-
*/
|
|
167
|
-
export const VariousDepths: Story = {
|
|
168
|
-
render: () => html`
|
|
169
|
-
<div style="display: flex; flex-direction: column; gap: 24px; padding: 24px; background: #000;">
|
|
170
|
-
<div>
|
|
171
|
-
<p style="color: #00F49C; margin: 0 0 12px 0; font-weight: 600;">Two Levels</p>
|
|
172
|
-
<rel-breadcrumbs .items="${[
|
|
173
|
-
{ label: 'Home', url: '#' },
|
|
174
|
-
{ label: 'Products' },
|
|
175
|
-
]}"></rel-breadcrumbs>
|
|
176
|
-
</div>
|
|
177
|
-
|
|
178
|
-
<div>
|
|
179
|
-
<p style="color: #00F49C; margin: 0 0 12px 0; font-weight: 600;">Three Levels</p>
|
|
180
|
-
<rel-breadcrumbs .items="${[
|
|
181
|
-
{ label: 'Home', url: '#' },
|
|
182
|
-
{ label: 'Products', url: '#products' },
|
|
183
|
-
{ label: 'Electronics' },
|
|
184
|
-
]}"></rel-breadcrumbs>
|
|
185
|
-
</div>
|
|
186
|
-
|
|
187
|
-
<div>
|
|
188
|
-
<p style="color: #00F49C; margin: 0 0 12px 0; font-weight: 600;">Four Levels</p>
|
|
189
|
-
<rel-breadcrumbs .items="${[
|
|
190
|
-
{ label: 'Home', url: '#' },
|
|
191
|
-
{ label: 'Products', url: '#products' },
|
|
192
|
-
{ label: 'Electronics', url: '#electronics' },
|
|
193
|
-
{ label: 'Laptops' },
|
|
194
|
-
]}"></rel-breadcrumbs>
|
|
195
|
-
</div>
|
|
196
|
-
|
|
197
|
-
<div>
|
|
198
|
-
<p style="color: #00F49C; margin: 0 0 12px 0; font-weight: 600;">Five Levels</p>
|
|
199
|
-
<rel-breadcrumbs .items="${[
|
|
200
|
-
{ label: 'Home', url: '#' },
|
|
201
|
-
{ label: 'Products', url: '#products' },
|
|
202
|
-
{ label: 'Electronics', url: '#electronics' },
|
|
203
|
-
{ label: 'Laptops', url: '#laptops' },
|
|
204
|
-
{ label: 'Gaming' },
|
|
205
|
-
]}"></rel-breadcrumbs>
|
|
206
|
-
</div>
|
|
207
|
-
</div>
|
|
208
|
-
`,
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Real-world use cases
|
|
213
|
-
*/
|
|
214
|
-
export const RealWorldUseCases: Story = {
|
|
215
|
-
render: () => html`
|
|
216
|
-
<div style="display: flex; flex-direction: column; gap: 32px; padding: 24px; background: #000;">
|
|
217
|
-
<!-- E-commerce Product Page -->
|
|
218
|
-
<div>
|
|
219
|
-
<p style="color: #00F49C; margin: 0 0 8px 0; font-weight: 600; font-size: 16px;">E-commerce Product Page</p>
|
|
220
|
-
<p style="color: #999; margin: 0 0 12px 0; font-size: 12px;">User browsing a specific product</p>
|
|
221
|
-
<rel-breadcrumbs .items="${[
|
|
222
|
-
{ label: 'Home', url: '#' },
|
|
223
|
-
{ label: 'Men', url: '#men' },
|
|
224
|
-
{ label: 'Clothing', url: '#clothing' },
|
|
225
|
-
{ label: 'T-Shirts', url: '#t-shirts' },
|
|
226
|
-
{ label: 'Classic Fit Cotton Tee' },
|
|
227
|
-
]}"></rel-breadcrumbs>
|
|
228
|
-
</div>
|
|
229
|
-
|
|
230
|
-
<!-- Blog Article -->
|
|
231
|
-
<div>
|
|
232
|
-
<p style="color: #00F49C; margin: 0 0 8px 0; font-weight: 600; font-size: 16px;">Blog Article</p>
|
|
233
|
-
<p style="color: #999; margin: 0 0 12px 0; font-size: 12px;">User reading a blog post</p>
|
|
234
|
-
<rel-breadcrumbs .items="${[
|
|
235
|
-
{ label: 'Blog', url: '#blog' },
|
|
236
|
-
{ label: 'Technology', url: '#technology' },
|
|
237
|
-
{ label: 'Web Development', url: '#web-dev' },
|
|
238
|
-
{ label: 'Getting Started with Web Components' },
|
|
239
|
-
]}"></rel-breadcrumbs>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
<!-- Admin Panel -->
|
|
243
|
-
<div>
|
|
244
|
-
<p style="color: #00F49C; margin: 0 0 8px 0; font-weight: 600; font-size: 16px;">Admin Panel</p>
|
|
245
|
-
<p style="color: #999; margin: 0 0 12px 0; font-size: 12px;">Admin managing user permissions</p>
|
|
246
|
-
<rel-breadcrumbs .items="${[
|
|
247
|
-
{ label: 'Admin', url: '#admin' },
|
|
248
|
-
{ label: 'Users', url: '#users' },
|
|
249
|
-
{ label: 'John Doe', url: '#user-123' },
|
|
250
|
-
{ label: 'Permissions' },
|
|
251
|
-
]}"></rel-breadcrumbs>
|
|
252
|
-
</div>
|
|
253
|
-
|
|
254
|
-
<!-- Help Center -->
|
|
255
|
-
<div>
|
|
256
|
-
<p style="color: #00F49C; margin: 0 0 8px 0; font-weight: 600; font-size: 16px;">Help Center</p>
|
|
257
|
-
<p style="color: #999; margin: 0 0 12px 0; font-size: 12px;">User searching for help</p>
|
|
258
|
-
<rel-breadcrumbs .items="${[
|
|
259
|
-
{ label: 'Help Center', url: '#help' },
|
|
260
|
-
{ label: 'Account & Billing', url: '#billing' },
|
|
261
|
-
{ label: 'Subscriptions', url: '#subscriptions' },
|
|
262
|
-
{ label: 'How to Cancel Your Subscription' },
|
|
263
|
-
]}"></rel-breadcrumbs>
|
|
264
|
-
</div>
|
|
265
|
-
</div>
|
|
266
|
-
`,
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Long labels - breadcrumbs with lengthy text
|
|
271
|
-
*/
|
|
272
|
-
export const LongLabels: Story = {
|
|
273
|
-
args: {
|
|
274
|
-
items: [
|
|
275
|
-
{ label: 'Home', url: '#' },
|
|
276
|
-
{ label: 'Product Categories', url: '#categories' },
|
|
277
|
-
{ label: 'Consumer Electronics and Gadgets', url: '#electronics' },
|
|
278
|
-
{ label: 'High-Performance Gaming Laptops and Workstations' },
|
|
279
|
-
],
|
|
280
|
-
},
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Single item - minimal breadcrumb
|
|
285
|
-
*/
|
|
286
|
-
export const SingleItem: Story = {
|
|
287
|
-
args: {
|
|
288
|
-
items: [
|
|
289
|
-
{ label: 'Current Page' },
|
|
290
|
-
],
|
|
291
|
-
},
|
|
292
|
-
};
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Without URLs - non-clickable breadcrumbs
|
|
296
|
-
*/
|
|
297
|
-
export const WithoutURLs: Story = {
|
|
298
|
-
args: {
|
|
299
|
-
items: [
|
|
300
|
-
{ label: 'Step 1' },
|
|
301
|
-
{ label: 'Step 2' },
|
|
302
|
-
{ label: 'Step 3' },
|
|
303
|
-
{ label: 'Step 4' },
|
|
304
|
-
],
|
|
305
|
-
},
|
|
306
|
-
};
|
|
@@ -1,356 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import './rel-button';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The Button component is a versatile interactive element that supports multiple variants,
|
|
7
|
-
* tones, sizes, and border styles. Built with Lit web components for framework-agnostic usage.
|
|
8
|
-
*
|
|
9
|
-
* ## Features
|
|
10
|
-
* - **6 Variants**: default, primary, secondary, text, link, icon
|
|
11
|
-
* - **3 Tones**: default, critical, success
|
|
12
|
-
* - **3 Sizes**: small (32px), medium (40px), large (48px)
|
|
13
|
-
* - **3 Border Styles**: corner-radius (pill), small-corner-radius, no-corner-radius
|
|
14
|
-
* - **Disabled State**: Full accessibility support
|
|
15
|
-
* - **Keyboard Navigation**: Focus ring and keyboard interactions
|
|
16
|
-
*/
|
|
17
|
-
const meta: Meta = {
|
|
18
|
-
title: 'Components/Button',
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
component: 'rel-button',
|
|
21
|
-
argTypes: {
|
|
22
|
-
variant: {
|
|
23
|
-
control: { type: 'select' },
|
|
24
|
-
options: ['default', 'primary', 'secondary', 'text', 'link', 'icon'],
|
|
25
|
-
description: 'Visual style variant',
|
|
26
|
-
table: {
|
|
27
|
-
defaultValue: { summary: 'default' },
|
|
28
|
-
type: { summary: 'string' },
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
tone: {
|
|
32
|
-
control: { type: 'select' },
|
|
33
|
-
options: ['default', 'critical', 'success'],
|
|
34
|
-
description: 'Semantic tone for user feedback',
|
|
35
|
-
table: {
|
|
36
|
-
defaultValue: { summary: 'default' },
|
|
37
|
-
type: { summary: 'string' },
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
control: { type: 'select' },
|
|
42
|
-
options: ['small', 'medium', 'large'],
|
|
43
|
-
description: 'Button size',
|
|
44
|
-
table: {
|
|
45
|
-
defaultValue: { summary: 'medium' },
|
|
46
|
-
type: { summary: 'string' },
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
border: {
|
|
50
|
-
control: { type: 'select' },
|
|
51
|
-
options: ['corner-radius', 'small-corner-radius', 'no-corner-radius'],
|
|
52
|
-
description: 'Border radius style',
|
|
53
|
-
table: {
|
|
54
|
-
defaultValue: { summary: 'corner-radius' },
|
|
55
|
-
type: { summary: 'string' },
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
disabled: {
|
|
59
|
-
control: 'boolean',
|
|
60
|
-
description: 'Disabled state',
|
|
61
|
-
table: {
|
|
62
|
-
defaultValue: { summary: false },
|
|
63
|
-
type: { summary: 'boolean' },
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
render: (args) => html`
|
|
68
|
-
<rel-button
|
|
69
|
-
variant="${args.variant || 'default'}"
|
|
70
|
-
tone="${args.tone || 'default'}"
|
|
71
|
-
size="${args.size || 'medium'}"
|
|
72
|
-
border="${args.border || 'corner-radius'}"
|
|
73
|
-
?disabled="${args.disabled}"
|
|
74
|
-
>
|
|
75
|
-
${args.label || 'Button'}
|
|
76
|
-
</rel-button>
|
|
77
|
-
`,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export default meta;
|
|
81
|
-
type Story = StoryObj;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Default button with gray background - standard action button
|
|
85
|
-
*/
|
|
86
|
-
export const Default: Story = {
|
|
87
|
-
args: {
|
|
88
|
-
variant: 'default',
|
|
89
|
-
tone: 'default',
|
|
90
|
-
size: 'medium',
|
|
91
|
-
label: 'Default Button',
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Primary button with neon green background - main call-to-action
|
|
97
|
-
*/
|
|
98
|
-
export const Primary: Story = {
|
|
99
|
-
args: {
|
|
100
|
-
variant: 'primary',
|
|
101
|
-
tone: 'default',
|
|
102
|
-
size: 'medium',
|
|
103
|
-
label: 'Primary Button',
|
|
104
|
-
},
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Secondary button with white background and border - alternative action
|
|
109
|
-
*/
|
|
110
|
-
export const Secondary: Story = {
|
|
111
|
-
args: {
|
|
112
|
-
variant: 'secondary',
|
|
113
|
-
size: 'medium',
|
|
114
|
-
label: 'Secondary Button',
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Text button with transparent background - subtle action
|
|
120
|
-
*/
|
|
121
|
-
export const Text: Story = {
|
|
122
|
-
args: {
|
|
123
|
-
variant: 'text',
|
|
124
|
-
size: 'medium',
|
|
125
|
-
label: 'Text Button',
|
|
126
|
-
},
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Link button with underlined text - navigation action
|
|
131
|
-
*/
|
|
132
|
-
export const Link: Story = {
|
|
133
|
-
args: {
|
|
134
|
-
variant: 'link',
|
|
135
|
-
size: 'medium',
|
|
136
|
-
label: 'Link Button',
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Icon button with circular shape - icon-only action
|
|
142
|
-
*/
|
|
143
|
-
export const Icon: Story = {
|
|
144
|
-
args: {
|
|
145
|
-
variant: 'icon',
|
|
146
|
-
label: '✓',
|
|
147
|
-
},
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Critical tone - used for destructive or warning actions
|
|
152
|
-
*/
|
|
153
|
-
export const Critical: Story = {
|
|
154
|
-
args: {
|
|
155
|
-
variant: 'primary',
|
|
156
|
-
tone: 'critical',
|
|
157
|
-
size: 'medium',
|
|
158
|
-
label: 'Delete Account',
|
|
159
|
-
},
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Success tone - used for positive confirmation actions
|
|
164
|
-
*/
|
|
165
|
-
export const Success: Story = {
|
|
166
|
-
args: {
|
|
167
|
-
variant: 'primary',
|
|
168
|
-
tone: 'success',
|
|
169
|
-
size: 'medium',
|
|
170
|
-
label: 'Confirm Payment',
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Small size - compact button for tight layouts
|
|
176
|
-
*/
|
|
177
|
-
export const Small: Story = {
|
|
178
|
-
args: {
|
|
179
|
-
variant: 'primary',
|
|
180
|
-
size: 'small',
|
|
181
|
-
label: 'Small Button',
|
|
182
|
-
},
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Large size - prominent button for important actions
|
|
187
|
-
*/
|
|
188
|
-
export const Large: Story = {
|
|
189
|
-
args: {
|
|
190
|
-
variant: 'primary',
|
|
191
|
-
size: 'large',
|
|
192
|
-
label: 'Large Button',
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Disabled state - non-interactive button
|
|
198
|
-
*/
|
|
199
|
-
export const Disabled: Story = {
|
|
200
|
-
args: {
|
|
201
|
-
variant: 'primary',
|
|
202
|
-
size: 'medium',
|
|
203
|
-
label: 'Disabled Button',
|
|
204
|
-
disabled: true,
|
|
205
|
-
},
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Small corner radius - subtle rounded corners
|
|
210
|
-
*/
|
|
211
|
-
export const SmallRadius: Story = {
|
|
212
|
-
args: {
|
|
213
|
-
variant: 'primary',
|
|
214
|
-
size: 'medium',
|
|
215
|
-
border: 'small-corner-radius',
|
|
216
|
-
label: 'Small Radius',
|
|
217
|
-
},
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* No corner radius - sharp rectangular edges
|
|
222
|
-
*/
|
|
223
|
-
export const NoRadius: Story = {
|
|
224
|
-
args: {
|
|
225
|
-
variant: 'primary',
|
|
226
|
-
size: 'medium',
|
|
227
|
-
border: 'no-corner-radius',
|
|
228
|
-
label: 'No Radius',
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* All variants showcase - displays all button variants together
|
|
234
|
-
*/
|
|
235
|
-
export const AllVariants: Story = {
|
|
236
|
-
render: () => html`
|
|
237
|
-
<div style="display: flex; flex-direction: column; gap: 24px; padding: 24px; background: #000;">
|
|
238
|
-
<div style="display: flex; gap: 16px; flex-wrap: wrap; align-items: center;">
|
|
239
|
-
<rel-button variant="default">Default</rel-button>
|
|
240
|
-
<rel-button variant="primary">Primary</rel-button>
|
|
241
|
-
<rel-button variant="secondary">Secondary</rel-button>
|
|
242
|
-
<rel-button variant="text">Text</rel-button>
|
|
243
|
-
<rel-button variant="link">Link</rel-button>
|
|
244
|
-
<rel-button variant="icon">✓</rel-button>
|
|
245
|
-
</div>
|
|
246
|
-
</div>
|
|
247
|
-
`,
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* All sizes showcase - displays all button sizes together
|
|
252
|
-
*/
|
|
253
|
-
export const AllSizes: Story = {
|
|
254
|
-
render: () => html`
|
|
255
|
-
<div style="display: flex; gap: 16px; align-items: center; padding: 24px; background: #000;">
|
|
256
|
-
<rel-button variant="primary" size="small">Small (32px)</rel-button>
|
|
257
|
-
<rel-button variant="primary" size="medium">Medium (40px)</rel-button>
|
|
258
|
-
<rel-button variant="primary" size="large">Large (48px)</rel-button>
|
|
259
|
-
</div>
|
|
260
|
-
`,
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* All tones showcase - displays all semantic tones
|
|
265
|
-
*/
|
|
266
|
-
export const AllTones: Story = {
|
|
267
|
-
render: () => html`
|
|
268
|
-
<div style="display: flex; gap: 16px; padding: 24px; background: #000;">
|
|
269
|
-
<rel-button variant="primary" tone="default">Default</rel-button>
|
|
270
|
-
<rel-button variant="primary" tone="critical">Critical</rel-button>
|
|
271
|
-
<rel-button variant="primary" tone="success">Success</rel-button>
|
|
272
|
-
</div>
|
|
273
|
-
`,
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Border radius showcase - displays all border radius options
|
|
278
|
-
*/
|
|
279
|
-
export const AllBorderStyles: Story = {
|
|
280
|
-
render: () => html`
|
|
281
|
-
<div style="display: flex; gap: 16px; padding: 24px; background: #000;">
|
|
282
|
-
<rel-button variant="primary" border="corner-radius">Pill Shape</rel-button>
|
|
283
|
-
<rel-button variant="primary" border="small-corner-radius">Small Radius</rel-button>
|
|
284
|
-
<rel-button variant="primary" border="no-corner-radius">No Radius</rel-button>
|
|
285
|
-
</div>
|
|
286
|
-
`,
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* Disabled states across variants
|
|
291
|
-
*/
|
|
292
|
-
export const DisabledStates: Story = {
|
|
293
|
-
render: () => html`
|
|
294
|
-
<div style="display: flex; gap: 16px; padding: 24px; background: #000;">
|
|
295
|
-
<rel-button variant="default" disabled>Default</rel-button>
|
|
296
|
-
<rel-button variant="primary" disabled>Primary</rel-button>
|
|
297
|
-
<rel-button variant="secondary" disabled>Secondary</rel-button>
|
|
298
|
-
<rel-button variant="text" disabled>Text</rel-button>
|
|
299
|
-
</div>
|
|
300
|
-
`,
|
|
301
|
-
};
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Text button with critical tone - destructive text action
|
|
305
|
-
*/
|
|
306
|
-
export const TextCritical: Story = {
|
|
307
|
-
args: {
|
|
308
|
-
variant: 'text',
|
|
309
|
-
tone: 'critical',
|
|
310
|
-
label: 'Delete',
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Text button with success tone - positive text action
|
|
316
|
-
*/
|
|
317
|
-
export const TextSuccess: Story = {
|
|
318
|
-
args: {
|
|
319
|
-
variant: 'text',
|
|
320
|
-
tone: 'success',
|
|
321
|
-
label: 'Approve',
|
|
322
|
-
},
|
|
323
|
-
};
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Link button with critical tone - destructive link action
|
|
327
|
-
*/
|
|
328
|
-
export const LinkCritical: Story = {
|
|
329
|
-
args: {
|
|
330
|
-
variant: 'link',
|
|
331
|
-
tone: 'critical',
|
|
332
|
-
label: 'Remove Account',
|
|
333
|
-
},
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
/**
|
|
337
|
-
* Icon button with critical tone - destructive icon action
|
|
338
|
-
*/
|
|
339
|
-
export const IconCritical: Story = {
|
|
340
|
-
args: {
|
|
341
|
-
variant: 'icon',
|
|
342
|
-
tone: 'critical',
|
|
343
|
-
label: '✕',
|
|
344
|
-
},
|
|
345
|
-
};
|
|
346
|
-
|
|
347
|
-
/**
|
|
348
|
-
* Icon button with success tone - positive icon action
|
|
349
|
-
*/
|
|
350
|
-
export const IconSuccess: Story = {
|
|
351
|
-
args: {
|
|
352
|
-
variant: 'icon',
|
|
353
|
-
tone: 'success',
|
|
354
|
-
label: '✓',
|
|
355
|
-
},
|
|
356
|
-
};
|