@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
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/* AUTO-GENERATED — CLEANED — DO NOT EDIT */
|
|
2
|
+
:root {
|
|
3
|
+
/* ------------------ BORDER RADII ------------------ */
|
|
4
|
+
--rel-borders-radius-border-radius-0: 0px;
|
|
5
|
+
--rel-borders-radius-border-radius-100: 2px;
|
|
6
|
+
--rel-borders-radius-border-radius-200: 8px;
|
|
7
|
+
--rel-borders-radius-border-radius-300: 16px;
|
|
8
|
+
--rel-borders-radius-border-radius-400: 24px;
|
|
9
|
+
--rel-borders-radius-border-radius-500: 1000px;
|
|
10
|
+
|
|
11
|
+
/* ------------------ BORDER WIDTHS ------------------ */
|
|
12
|
+
--rel-borders-width-stroke-050: 0.5px;
|
|
13
|
+
--rel-borders-width-stroke-100: 1px;
|
|
14
|
+
--rel-borders-width-stroke-150: 1.5px;
|
|
15
|
+
--rel-borders-width-stroke-200: 2px;
|
|
16
|
+
--rel-borders-width-stroke-300: 3px;
|
|
17
|
+
--rel-borders-width-stroke-400: 4px;
|
|
18
|
+
|
|
19
|
+
/* ------------------ COLORS ------------------ */
|
|
20
|
+
--rel-colors-green-primary: #00F49C;
|
|
21
|
+
--rel-colors-green-secondary: #06D98C;
|
|
22
|
+
--rel-colors-green-tertiary: #00A86B;
|
|
23
|
+
--rel-colors-green-success: #00A86B;
|
|
24
|
+
--rel-colors-green-credited: #4CAA47;
|
|
25
|
+
--rel-colors-green-bg-light: #E8F5E8;
|
|
26
|
+
|
|
27
|
+
--rel-colors-black: #000000;
|
|
28
|
+
|
|
29
|
+
--rel-colors-gray-primary: #333333;
|
|
30
|
+
--rel-colors-gray-heading: #2B2B2B;
|
|
31
|
+
--rel-colors-gray-placeholder: #A9A9A9;
|
|
32
|
+
--rel-colors-gray-dark-placeholder: #373737;
|
|
33
|
+
--rel-colors-gray-toast-bg: #404040;
|
|
34
|
+
--rel-colors-gray-light: #FAFAFA;
|
|
35
|
+
--rel-colors-gray-warm: #F5F5F4;
|
|
36
|
+
--rel-colors-gray-border: #DDDDDD;
|
|
37
|
+
--rel-colors-gray-disabled-text: #9E9E9E;
|
|
38
|
+
--rel-colors-gray-divider: #BDBDBD;
|
|
39
|
+
--rel-colors-gray-tab-border: #C4C4C4;
|
|
40
|
+
--rel-colors-gray-surface: #F5F5F5;
|
|
41
|
+
--rel-colors-gray-screen-bg: #EEEEEE;
|
|
42
|
+
|
|
43
|
+
--rel-colors-red-primary: #CC0000;
|
|
44
|
+
--rel-colors-red-secondary: #D50000;
|
|
45
|
+
--rel-colors-red-tertiary: #9C1E33;
|
|
46
|
+
--rel-colors-red-bg-alert: #FFE8EB;
|
|
47
|
+
--rel-colors-red-light: #FFDEDE;
|
|
48
|
+
|
|
49
|
+
--rel-colors-white: #FFFFFF;
|
|
50
|
+
|
|
51
|
+
--rel-colors-blue-primary: #0091EA;
|
|
52
|
+
--rel-colors-blue-secondary: #4A90E2;
|
|
53
|
+
--rel-colors-blue-tertiary: #0059F4;
|
|
54
|
+
--rel-colors-blue-light: #80D8FF;
|
|
55
|
+
--rel-colors-blue-bg: #E1F2FF;
|
|
56
|
+
|
|
57
|
+
--rel-colors-orange-warning: #FF6D00;
|
|
58
|
+
--rel-colors-orange-expired: #F2915C;
|
|
59
|
+
--rel-colors-orange-bg-light: #FFE9D9;
|
|
60
|
+
--rel-colors-orange-bg-counter: #FFF3E0;
|
|
61
|
+
|
|
62
|
+
--rel-colors-yellow-pending: #FFBF43;
|
|
63
|
+
|
|
64
|
+
--rel-colors-gold: #D6BA00;
|
|
65
|
+
--rel-colors-gold-light: #F6EFD7;
|
|
66
|
+
--rel-colors-gold-secondary: #F5F0D3;
|
|
67
|
+
|
|
68
|
+
--rel-colors-platinum: #8392C9;
|
|
69
|
+
--rel-colors-platinum-secondary: #E4E6F2;
|
|
70
|
+
|
|
71
|
+
--rel-colors-silver: #BABABA;
|
|
72
|
+
--rel-colors-silver-secondary: #F0F0F0;
|
|
73
|
+
|
|
74
|
+
--rel-colors-bronze: #7D5300;
|
|
75
|
+
--rel-colors-bronze-secondary: #E2DAC7;
|
|
76
|
+
|
|
77
|
+
/* ------------------ SEMANTIC TEXT ------------------ */
|
|
78
|
+
--rel-text-primary: var(--rel-colors-gray-primary);
|
|
79
|
+
--rel-text-heading: var(--rel-colors-gray-heading);
|
|
80
|
+
|
|
81
|
+
--rel-text-error: var(--rel-colors-red-primary);
|
|
82
|
+
--rel-text-error-small: var(--rel-colors-red-secondary);
|
|
83
|
+
--rel-text-error-medium: var(--rel-colors-red-tertiary);
|
|
84
|
+
--rel-text-error-large: var(--rel-colors-red-tertiary);
|
|
85
|
+
|
|
86
|
+
--rel-text-warning: var(--rel-colors-orange-warning);
|
|
87
|
+
--rel-text-warning-small: var(--rel-colors-orange-expired);
|
|
88
|
+
--rel-text-warning-medium: var(--rel-colors-yellow-pending);
|
|
89
|
+
--rel-text-warning-large: var(--rel-colors-orange-warning);
|
|
90
|
+
|
|
91
|
+
--rel-text-success: var(--rel-colors-green-success);
|
|
92
|
+
--rel-text-success-small: var(--rel-colors-green-secondary);
|
|
93
|
+
--rel-text-success-medium: var(--rel-colors-green-tertiary);
|
|
94
|
+
--rel-text-success-large: var(--rel-colors-green-success);
|
|
95
|
+
|
|
96
|
+
--rel-text-info: var(--rel-colors-blue-primary);
|
|
97
|
+
--rel-text-info-secondary: var(--rel-colors-blue-secondary);
|
|
98
|
+
--rel-text-info-hover: var(--rel-colors-blue-tertiary);
|
|
99
|
+
|
|
100
|
+
--rel-text-placeholder: var(--rel-colors-gray-placeholder);
|
|
101
|
+
--rel-text-dark-placeholder: var(--rel-colors-gray-dark-placeholder);
|
|
102
|
+
|
|
103
|
+
--rel-text-disabled: var(--rel-colors-gray-disabled-text);
|
|
104
|
+
--rel-text-credited: var(--rel-colors-green-credited);
|
|
105
|
+
|
|
106
|
+
/* ------------------ SEMANTIC ICONS ------------------ */
|
|
107
|
+
--rel-icon-info: var(--rel-colors-blue-primary);
|
|
108
|
+
--rel-icon-error: var(--rel-colors-red-primary);
|
|
109
|
+
--rel-icon-warning: var(--rel-colors-orange-warning);
|
|
110
|
+
--rel-icon-success: var(--rel-colors-green-success);
|
|
111
|
+
|
|
112
|
+
/* ------------------ SEMANTIC BORDERS ------------------ */
|
|
113
|
+
--rel-border-default: var(--rel-colors-gray-border);
|
|
114
|
+
--rel-border-error: var(--rel-colors-red-primary);
|
|
115
|
+
--rel-border-warning: var(--rel-colors-orange-warning);
|
|
116
|
+
--rel-border-success: var(--rel-colors-green-primary);
|
|
117
|
+
--rel-border-info: var(--rel-colors-blue-primary);
|
|
118
|
+
--rel-border-divider: var(--rel-colors-gray-divider);
|
|
119
|
+
--rel-border-tab: var(--rel-colors-gray-tab-border);
|
|
120
|
+
|
|
121
|
+
/* ------------------ SEMANTIC BACKGROUNDS ------------------ */
|
|
122
|
+
--rel-background-error: var(--rel-colors-red-bg-alert);
|
|
123
|
+
--rel-background-error-light: var(--rel-colors-red-light);
|
|
124
|
+
--rel-background-warning: var(--rel-colors-orange-bg-light);
|
|
125
|
+
--rel-background-warning-counter: var(--rel-colors-orange-bg-counter);
|
|
126
|
+
--rel-background-success: var(--rel-colors-green-bg-light);
|
|
127
|
+
--rel-background-info: var(--rel-colors-blue-bg);
|
|
128
|
+
--rel-background-info-accent: var(--rel-colors-blue-light);
|
|
129
|
+
|
|
130
|
+
/* ------------------ SEMANTIC SURFACES ------------------ */
|
|
131
|
+
--rel-surface-secondary: var(--rel-colors-gray-light);
|
|
132
|
+
--rel-surface-screen: var(--rel-colors-gray-screen-bg);
|
|
133
|
+
--rel-surface-surface: var(--rel-colors-gray-surface);
|
|
134
|
+
--rel-surface-warm: var(--rel-colors-gray-warm);
|
|
135
|
+
--rel-surface-toast: var(--rel-colors-gray-toast-bg);
|
|
136
|
+
|
|
137
|
+
/* ------------------ SHADOWS ------------------ */
|
|
138
|
+
--rel-shadows-shadow-100: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 1px 3px rgba(0, 0, 0, 0.15);
|
|
139
|
+
--rel-shadows-shadow-200: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 2px 6px rgba(0, 0, 0, 0.15);
|
|
140
|
+
--rel-shadows-shadow-300: 0px 1px 2px rgba(0, 0, 0, 0.3), 0px 4px 8px rgba(0, 0, 0, 0.15);
|
|
141
|
+
--rel-shadows-shadow-400: 0px 2px 3px rgba(0, 0, 0, 0.3), 0px 6px 10px rgba(0, 0, 0, 0.15);
|
|
142
|
+
--rel-shadows-shadow-500: 0px 4px 4px rgba(0, 0, 0, 0.3), 0px 8px 12px rgba(0, 0, 0, 0.15);
|
|
143
|
+
|
|
144
|
+
/* ------------------ SPACING ------------------ */
|
|
145
|
+
--rel-spacing-space-3xs: 2px;
|
|
146
|
+
--rel-spacing-space-2xs: 4px;
|
|
147
|
+
--rel-spacing-space-xs: 8px;
|
|
148
|
+
--rel-spacing-space-sm: 12px;
|
|
149
|
+
--rel-spacing-space-md: 16px;
|
|
150
|
+
--rel-spacing-space-lg: 20px;
|
|
151
|
+
--rel-spacing-space-xl: 24px;
|
|
152
|
+
--rel-spacing-space-2xl: 32px;
|
|
153
|
+
--rel-spacing-space-3xl: 48px;
|
|
154
|
+
|
|
155
|
+
/* ------------------ TYPOGRAPHY ------------------ */
|
|
156
|
+
--rel-fontFamilies-primary: Poppins, sans-serif;
|
|
157
|
+
|
|
158
|
+
--rel-fontWeights-regular: 400;
|
|
159
|
+
--rel-fontWeights-medium: 500;
|
|
160
|
+
--rel-fontWeights-semibold: 600;
|
|
161
|
+
--rel-fontWeights-bold: 700;
|
|
162
|
+
|
|
163
|
+
--rel-fontSizes-3xl: 36px;
|
|
164
|
+
--rel-fontSizes-2xl: 28px;
|
|
165
|
+
--rel-fontSizes-xl: 24px;
|
|
166
|
+
--rel-fontSizes-lg: 20px;
|
|
167
|
+
--rel-fontSizes-md: 14px;
|
|
168
|
+
--rel-fontSizes-sm: 12px;
|
|
169
|
+
--rel-fontSizes-xs: 10px;
|
|
170
|
+
|
|
171
|
+
--rel-lineHeights-3xl: 48px;
|
|
172
|
+
--rel-lineHeights-2xl: 42px;
|
|
173
|
+
--rel-lineHeights-xl: 36px;
|
|
174
|
+
--rel-lineHeights-lg: 28px;
|
|
175
|
+
--rel-lineHeights-md: 20px;
|
|
176
|
+
--rel-lineHeights-sm: 18px;
|
|
177
|
+
--rel-lineHeights-xs: 16px;
|
|
178
|
+
--rel-lineHeights-2xs: 12px;
|
|
179
|
+
|
|
180
|
+
--rel-letterSpacing-normal: 0px;
|
|
181
|
+
--rel-letterSpacing-dense: -0.2px;
|
|
182
|
+
--rel-letterSpacing-denser: -0.3px;
|
|
183
|
+
--rel-letterSpacing-densest: -0.54px;
|
|
184
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reliability-design/web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"require": "./dist/index.js",
|
|
15
15
|
"types": "./dist/index.d.ts"
|
|
16
16
|
},
|
|
17
|
-
"./
|
|
17
|
+
"./vars.css": "./dist/styles/vars.css"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -1,313 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
-
import { html } from 'lit';
|
|
3
|
-
import './rel-accordion';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The Accordion component allows users to toggle the visibility of content sections.
|
|
7
|
-
* Built with Lit web components for framework-agnostic usage.
|
|
8
|
-
*
|
|
9
|
-
* ## Features
|
|
10
|
-
* - **Expandable Sections**: Click to expand/collapse content
|
|
11
|
-
* - **Smooth Animation**: Fade-in effect when expanding
|
|
12
|
-
* - **Chevron Indicator**: Rotating chevron shows state
|
|
13
|
-
* - **Customizable Title**: Set accordion header text
|
|
14
|
-
* - **Slotted Content**: Any content can be placed inside
|
|
15
|
-
* - **Open State**: Can be initialized as open or closed
|
|
16
|
-
*/
|
|
17
|
-
const meta: Meta = {
|
|
18
|
-
title: 'Components/Accordion',
|
|
19
|
-
tags: ['autodocs'],
|
|
20
|
-
component: 'rel-accordion',
|
|
21
|
-
argTypes: {
|
|
22
|
-
title: {
|
|
23
|
-
control: 'text',
|
|
24
|
-
description: 'Accordion header title',
|
|
25
|
-
table: {
|
|
26
|
-
defaultValue: { summary: 'Accordion' },
|
|
27
|
-
type: { summary: 'string' },
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
open: {
|
|
31
|
-
control: 'boolean',
|
|
32
|
-
description: 'Initial open state',
|
|
33
|
-
table: {
|
|
34
|
-
defaultValue: { summary: false },
|
|
35
|
-
type: { summary: 'boolean' },
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
render: (args) => html`
|
|
40
|
-
<rel-accordion
|
|
41
|
-
title="${args.title || 'Accordion'}"
|
|
42
|
-
?open="${args.open}"
|
|
43
|
-
>
|
|
44
|
-
${args.content || 'Accordion content goes here. This section can contain any type of content including text, images, or other components.'}
|
|
45
|
-
</rel-accordion>
|
|
46
|
-
`,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default meta;
|
|
50
|
-
type Story = StoryObj;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Default accordion - closed by default
|
|
54
|
-
*/
|
|
55
|
-
export const Default: Story = {
|
|
56
|
-
args: {
|
|
57
|
-
title: 'What is Reliability Design System?',
|
|
58
|
-
content: 'Reliability is a modern design system built with web components. It provides a comprehensive set of UI components that work across all JavaScript frameworks.',
|
|
59
|
-
open: false,
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Open accordion - initially expanded
|
|
65
|
-
*/
|
|
66
|
-
export const Open: Story = {
|
|
67
|
-
args: {
|
|
68
|
-
title: 'Frequently Asked Questions',
|
|
69
|
-
content: 'This accordion starts in an open state, showing its content immediately. Users can click to collapse it.',
|
|
70
|
-
open: true,
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Simple text content
|
|
76
|
-
*/
|
|
77
|
-
export const SimpleText: Story = {
|
|
78
|
-
args: {
|
|
79
|
-
title: 'Shipping Information',
|
|
80
|
-
content: 'We offer free shipping on all orders over $50. Standard delivery takes 3-5 business days.',
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Long content - accordion with extensive text
|
|
86
|
-
*/
|
|
87
|
-
export const LongContent: Story = {
|
|
88
|
-
args: {
|
|
89
|
-
title: 'Privacy Policy',
|
|
90
|
-
content: `We take your privacy seriously. This privacy policy explains how we collect, use, and protect your personal information.
|
|
91
|
-
|
|
92
|
-
Data Collection: We collect information you provide directly to us, such as when you create an account, make a purchase, or contact customer support.
|
|
93
|
-
|
|
94
|
-
Data Usage: We use your information to process transactions, improve our services, and communicate with you about your account.
|
|
95
|
-
|
|
96
|
-
Data Protection: We implement industry-standard security measures to protect your personal information from unauthorized access or disclosure.`,
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Multiple accordions - FAQ section
|
|
102
|
-
*/
|
|
103
|
-
export const FAQSection: Story = {
|
|
104
|
-
render: () => html`
|
|
105
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
106
|
-
<h2 style="color: #00F49C; margin: 0 0 16px 0;">Frequently Asked Questions</h2>
|
|
107
|
-
|
|
108
|
-
<rel-accordion title="What payment methods do you accept?">
|
|
109
|
-
We accept all major credit cards (Visa, MasterCard, American Express), PayPal, and Apple Pay.
|
|
110
|
-
</rel-accordion>
|
|
111
|
-
|
|
112
|
-
<rel-accordion title="How long does shipping take?">
|
|
113
|
-
Standard shipping takes 3-5 business days. Express shipping is available for 1-2 day delivery.
|
|
114
|
-
</rel-accordion>
|
|
115
|
-
|
|
116
|
-
<rel-accordion title="What is your return policy?">
|
|
117
|
-
We offer a 30-day money-back guarantee. Items must be returned in original condition with all tags attached.
|
|
118
|
-
</rel-accordion>
|
|
119
|
-
|
|
120
|
-
<rel-accordion title="Do you ship internationally?">
|
|
121
|
-
Yes, we ship to over 100 countries worldwide. Shipping costs and delivery times vary by location.
|
|
122
|
-
</rel-accordion>
|
|
123
|
-
</div>
|
|
124
|
-
`,
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Product details - accordion for product information
|
|
129
|
-
*/
|
|
130
|
-
export const ProductDetails: Story = {
|
|
131
|
-
render: () => html`
|
|
132
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
133
|
-
<h2 style="color: #00F49C; margin: 0 0 16px 0;">Product Information</h2>
|
|
134
|
-
|
|
135
|
-
<rel-accordion title="Description" open>
|
|
136
|
-
Premium wireless headphones with active noise cancellation, 30-hour battery life, and exceptional sound quality. Perfect for music lovers and frequent travelers.
|
|
137
|
-
</rel-accordion>
|
|
138
|
-
|
|
139
|
-
<rel-accordion title="Specifications">
|
|
140
|
-
<ul style="margin: 0; padding-left: 20px;">
|
|
141
|
-
<li>Driver Size: 40mm</li>
|
|
142
|
-
<li>Frequency Response: 20Hz - 20kHz</li>
|
|
143
|
-
<li>Impedance: 32 Ω</li>
|
|
144
|
-
<li>Battery Life: 30 hours</li>
|
|
145
|
-
<li>Charging Time: 2 hours</li>
|
|
146
|
-
<li>Weight: 250g</li>
|
|
147
|
-
</ul>
|
|
148
|
-
</rel-accordion>
|
|
149
|
-
|
|
150
|
-
<rel-accordion title="What's in the Box">
|
|
151
|
-
<ul style="margin: 0; padding-left: 20px;">
|
|
152
|
-
<li>Wireless Headphones</li>
|
|
153
|
-
<li>USB-C Charging Cable</li>
|
|
154
|
-
<li>3.5mm Audio Cable</li>
|
|
155
|
-
<li>Carrying Case</li>
|
|
156
|
-
<li>User Manual</li>
|
|
157
|
-
</ul>
|
|
158
|
-
</rel-accordion>
|
|
159
|
-
</div>
|
|
160
|
-
`,
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Documentation sections
|
|
165
|
-
*/
|
|
166
|
-
export const DocumentationSections: Story = {
|
|
167
|
-
render: () => html`
|
|
168
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
169
|
-
<h2 style="color: #00F49C; margin: 0 0 16px 0;">Component Documentation</h2>
|
|
170
|
-
|
|
171
|
-
<rel-accordion title="Installation" open>
|
|
172
|
-
Install the component via npm:
|
|
173
|
-
<pre style="background: #1A1A1A; padding: 12px; border-radius: 8px; margin-top: 12px;">
|
|
174
|
-
npm install @reliability/components
|
|
175
|
-
</pre>
|
|
176
|
-
</rel-accordion>
|
|
177
|
-
|
|
178
|
-
<rel-accordion title="Usage">
|
|
179
|
-
Import and use the accordion component in your application:
|
|
180
|
-
<pre style="background: #1A1A1A; padding: 12px; border-radius: 8px; margin-top: 12px;">
|
|
181
|
-
import '@reliability/components/accordion';
|
|
182
|
-
|
|
183
|
-
<rel-accordion title="My Title">
|
|
184
|
-
Content here
|
|
185
|
-
</rel-accordion>
|
|
186
|
-
</pre>
|
|
187
|
-
</rel-accordion>
|
|
188
|
-
|
|
189
|
-
<rel-accordion title="Properties">
|
|
190
|
-
<ul style="margin: 0; padding-left: 20px;">
|
|
191
|
-
<li><strong>title</strong>: string - Accordion header text</li>
|
|
192
|
-
<li><strong>open</strong>: boolean - Initial open/closed state</li>
|
|
193
|
-
</ul>
|
|
194
|
-
</rel-accordion>
|
|
195
|
-
</div>
|
|
196
|
-
`,
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Settings panels
|
|
201
|
-
*/
|
|
202
|
-
export const SettingsPanels: Story = {
|
|
203
|
-
render: () => html`
|
|
204
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
205
|
-
<h2 style="color: #00F49C; margin: 0 0 16px 0;">Account Settings</h2>
|
|
206
|
-
|
|
207
|
-
<rel-accordion title="Profile Settings">
|
|
208
|
-
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
209
|
-
<div>
|
|
210
|
-
<label style="display: block; margin-bottom: 4px; color: #fff; font-size: 14px;">Display Name</label>
|
|
211
|
-
<input type="text" value="John Doe" style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #2A2A2A; background: #1A1A1A; color: #fff;">
|
|
212
|
-
</div>
|
|
213
|
-
<div>
|
|
214
|
-
<label style="display: block; margin-bottom: 4px; color: #fff; font-size: 14px;">Email</label>
|
|
215
|
-
<input type="email" value="john@example.com" style="width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #2A2A2A; background: #1A1A1A; color: #fff;">
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</rel-accordion>
|
|
219
|
-
|
|
220
|
-
<rel-accordion title="Privacy Settings">
|
|
221
|
-
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
222
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
223
|
-
<input type="checkbox" checked>
|
|
224
|
-
Make profile public
|
|
225
|
-
</label>
|
|
226
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
227
|
-
<input type="checkbox" checked>
|
|
228
|
-
Allow email notifications
|
|
229
|
-
</label>
|
|
230
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
231
|
-
<input type="checkbox">
|
|
232
|
-
Share analytics data
|
|
233
|
-
</label>
|
|
234
|
-
</div>
|
|
235
|
-
</rel-accordion>
|
|
236
|
-
|
|
237
|
-
<rel-accordion title="Notification Preferences">
|
|
238
|
-
<div style="display: flex; flex-direction: column; gap: 12px;">
|
|
239
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
240
|
-
<input type="checkbox" checked>
|
|
241
|
-
Email notifications
|
|
242
|
-
</label>
|
|
243
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
244
|
-
<input type="checkbox" checked>
|
|
245
|
-
Push notifications
|
|
246
|
-
</label>
|
|
247
|
-
<label style="display: flex; align-items: center; gap: 8px; color: #fff;">
|
|
248
|
-
<input type="checkbox">
|
|
249
|
-
SMS notifications
|
|
250
|
-
</label>
|
|
251
|
-
</div>
|
|
252
|
-
</rel-accordion>
|
|
253
|
-
</div>
|
|
254
|
-
`,
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Rich content - accordion with various content types
|
|
259
|
-
*/
|
|
260
|
-
export const RichContent: Story = {
|
|
261
|
-
render: () => html`
|
|
262
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
263
|
-
<rel-accordion title="Image Gallery" open>
|
|
264
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px;">
|
|
265
|
-
<div style="aspect-ratio: 1; background: #2A2A2A; border-radius: 8px;"></div>
|
|
266
|
-
<div style="aspect-ratio: 1; background: #2A2A2A; border-radius: 8px;"></div>
|
|
267
|
-
<div style="aspect-ratio: 1; background: #2A2A2A; border-radius: 8px;"></div>
|
|
268
|
-
</div>
|
|
269
|
-
</rel-accordion>
|
|
270
|
-
|
|
271
|
-
<rel-accordion title="Video Tutorial">
|
|
272
|
-
<div style="aspect-ratio: 16/9; background: #2A2A2A; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #999; margin-top: 12px;">
|
|
273
|
-
Video Player Placeholder
|
|
274
|
-
</div>
|
|
275
|
-
</rel-accordion>
|
|
276
|
-
|
|
277
|
-
<rel-accordion title="Code Example">
|
|
278
|
-
<pre style="background: #1A1A1A; padding: 16px; border-radius: 8px; margin-top: 12px; overflow-x: auto;">
|
|
279
|
-
function greet(name) {
|
|
280
|
-
return \`Hello, \${name}!\`;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
console.log(greet('World'));
|
|
284
|
-
</pre>
|
|
285
|
-
</rel-accordion>
|
|
286
|
-
</div>
|
|
287
|
-
`,
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* All states - various accordion configurations
|
|
292
|
-
*/
|
|
293
|
-
export const AllStates: Story = {
|
|
294
|
-
render: () => html`
|
|
295
|
-
<div style="display: flex; flex-direction: column; gap: 12px; padding: 24px; background: #000; max-width: 800px;">
|
|
296
|
-
<rel-accordion title="Closed Accordion (Default)">
|
|
297
|
-
This accordion is closed by default. Click to expand.
|
|
298
|
-
</rel-accordion>
|
|
299
|
-
|
|
300
|
-
<rel-accordion title="Open Accordion" open>
|
|
301
|
-
This accordion is open by default. Click to collapse.
|
|
302
|
-
</rel-accordion>
|
|
303
|
-
|
|
304
|
-
<rel-accordion title="Short Content">
|
|
305
|
-
Brief content.
|
|
306
|
-
</rel-accordion>
|
|
307
|
-
|
|
308
|
-
<rel-accordion title="Long Title: This is an Example of a Very Long Accordion Title That Might Wrap">
|
|
309
|
-
Content for accordion with long title.
|
|
310
|
-
</rel-accordion>
|
|
311
|
-
</div>
|
|
312
|
-
`,
|
|
313
|
-
};
|