@repobit/dex-system-design 0.22.12 → 0.23.1
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/CHANGELOG.md +32 -0
- package/package.json +3 -2
- package/src/components/Button/button.stories.js +292 -120
- package/src/components/accordion/accordion-bg.css.js +7 -2
- package/src/components/accordion/accordion-bg.stories.js +268 -449
- package/src/components/accordion/accordion.stories.js +259 -265
- package/src/components/anchor/anchor.stories.js +160 -159
- package/src/components/awards/awards-icon.js +44 -0
- package/src/components/awards/awards.css.js +328 -0
- package/src/components/awards/awards.js +224 -0
- package/src/components/awards/awards.stories.js +447 -0
- package/src/components/back/back.stories.js +100 -375
- package/src/components/badge/badge.stories.js +241 -129
- package/src/components/breadcrumb/breadcrumb.stories.js +218 -219
- package/src/components/cards/card.stories.js +174 -622
- package/src/components/carousel/carousel.stories.js +196 -225
- package/src/components/checkbox/checkbox.stories.js +136 -51
- package/src/components/compare/compare.css.js +237 -0
- package/src/components/compare/compare.js +253 -0
- package/src/components/compare/compare.stories.js +372 -0
- package/src/components/display/display.stories.js +91 -297
- package/src/components/divider/divider.stories.js +160 -342
- package/src/components/footer/footer.stories.js +177 -402
- package/src/components/header/header.stories.js +130 -338
- package/src/components/heading/heading.js +8 -5
- package/src/components/heading/heading.stories.js +162 -471
- package/src/components/highlight/highlight.stories.js +153 -38
- package/src/components/image/image.stories.js +135 -563
- package/src/components/input/custom-form.stories.js +761 -224
- package/src/components/link/link.js +29 -12
- package/src/components/link/link.stories.js +130 -468
- package/src/components/modal/modal.stories.js +174 -28
- package/src/components/paragraph/paragraph.css.js +10 -1
- package/src/components/paragraph/paragraph.stories.js +85 -410
- package/src/components/picture/picture.stories.js +147 -561
- package/src/components/radio/radio.stories.js +230 -81
- package/src/components/tabs/tabs.stories.js +126 -10
- package/src/components/termsOfUse/terms.stories.js +223 -8
- package/src/tokens/tokens.js +1 -0
|
@@ -1,15 +1,230 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
|
|
3
2
|
import './terms.js';
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
|
-
title
|
|
7
|
-
component: 'bd-terms-section',
|
|
8
|
-
tags
|
|
5
|
+
title : 'Components/TermsSection',
|
|
6
|
+
component : 'bd-terms-section',
|
|
7
|
+
tags : ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: `
|
|
12
|
+
**TermsSection** is a Lit component that renders a Terms of Use section with a configurable FAQ/terms list.
|
|
13
|
+
|
|
14
|
+
### Usage
|
|
15
|
+
\`\`\`html
|
|
16
|
+
<!-- Default terms (auto-renewal, cancellation, etc.) -->
|
|
17
|
+
<bd-terms-section></bd-terms-section>
|
|
18
|
+
|
|
19
|
+
<!-- Custom FAQ content -->
|
|
20
|
+
<bd-terms-section .faqs="${'[{ question: "...", items: ["..."] }]'}"></bd-terms-section>
|
|
21
|
+
\`\`\`
|
|
22
|
+
|
|
23
|
+
### FAQ Item Structure
|
|
24
|
+
Each item in the \`faqs\` array has:
|
|
25
|
+
- \`question\` (string) — rendered as a bold paragraph heading
|
|
26
|
+
- \`items\` (array) — list items rendered as \`<bd-list>\` with \`<bd-li>\` bullets. Items can be plain strings or Lit \`html\` template literals (for links).
|
|
27
|
+
|
|
28
|
+
### Default FAQs
|
|
29
|
+
1. Auto renewal terms
|
|
30
|
+
2. What the Bitdefender Auto Renewal Plan means for you
|
|
31
|
+
3. Affirmative consent
|
|
32
|
+
4. How to cancel + email address cancelation support
|
|
33
|
+
|
|
34
|
+
### Notes
|
|
35
|
+
- Cancel/refund items use \`html\` template literals with \`<a>\` tags for clickable email links
|
|
36
|
+
- Additional static legal paragraphs (Subscription Agreement, YouTube ToS) are always rendered below the FAQ list
|
|
37
|
+
`
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
argTypes: {
|
|
42
|
+
faqs: {
|
|
43
|
+
control : 'object',
|
|
44
|
+
description: 'Array of FAQ objects with `question` (string) and `items` (string[] or html[]) properties',
|
|
45
|
+
table : {
|
|
46
|
+
type : { summary: 'Array<{ question: string, items: (string | TemplateResult)[] }>' },
|
|
47
|
+
defaultValue: { summary: 'Default auto-renewal terms' },
|
|
48
|
+
category : 'Content'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const defaultFaqs = [
|
|
55
|
+
{
|
|
56
|
+
question: 'Auto renewal terms',
|
|
57
|
+
items : [
|
|
58
|
+
'Your subscription automatically begins at the purchase date;',
|
|
59
|
+
'By subscribing, you are purchasing a recurring subscription which will automatically renew;',
|
|
60
|
+
'The Bitdefender Auto Renewal Plan is designed to save you time, effort, and minimize your vulnerability risk.'
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
question: 'What the Bitdefender Auto Renewal Plan means for you',
|
|
65
|
+
items : [
|
|
66
|
+
'Continuous protection so that you never have to worry about your subscription running out;',
|
|
67
|
+
'Free upgrades whenever a new version of Bitdefender comes out;',
|
|
68
|
+
'Peace of mind that your devices are always protected;',
|
|
69
|
+
'24/7 security all-subscription long without interruption.'
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
question: 'Affirmative consent',
|
|
74
|
+
items : [
|
|
75
|
+
'Your subscription automatically begins at the purchase date;',
|
|
76
|
+
'By subscribing, you are purchasing a recurring subscription which will automatically renew.'
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
question: 'How to cancel + email address cancelation support',
|
|
81
|
+
items : [
|
|
82
|
+
'You can cancel your subscription from Bitdefender Central or by contacting Customer Support.',
|
|
83
|
+
'You can request a refund by contacting refunds@bitdefender.com within 30 days of your initial purchase.'
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
];
|
|
87
|
+
|
|
88
|
+
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
89
|
+
|
|
90
|
+
export const Default = {
|
|
91
|
+
name : 'Default (All Terms)',
|
|
92
|
+
render : () => html`<bd-terms-section></bd-terms-section>`,
|
|
93
|
+
parameters: {
|
|
94
|
+
docs: {
|
|
95
|
+
description: {
|
|
96
|
+
story: 'Default terms section with all four FAQ items and static legal paragraphs at the bottom.'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export const SingleFaq = {
|
|
103
|
+
name : 'Single FAQ Item',
|
|
104
|
+
render: () => html`
|
|
105
|
+
<bd-terms-section .faqs="${[defaultFaqs[0]]}"></bd-terms-section>
|
|
106
|
+
`,
|
|
107
|
+
parameters: {
|
|
108
|
+
docs: {
|
|
109
|
+
description: {
|
|
110
|
+
story: 'Only the first FAQ item (Auto renewal terms) rendered.'
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
9
114
|
};
|
|
10
115
|
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
116
|
+
export const TwoFaqs = {
|
|
117
|
+
name : 'Two FAQ Items',
|
|
118
|
+
render: () => html`
|
|
119
|
+
<bd-terms-section .faqs="${defaultFaqs.slice(0, 2)}"></bd-terms-section>
|
|
120
|
+
`,
|
|
121
|
+
parameters: {
|
|
122
|
+
docs: {
|
|
123
|
+
description: {
|
|
124
|
+
story: 'First two FAQ items: auto renewal terms and what the plan means.'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const CancellationOnly = {
|
|
131
|
+
name : 'Cancellation Section Only',
|
|
132
|
+
render: () => html`
|
|
133
|
+
<bd-terms-section .faqs="${[defaultFaqs[3]]}"></bd-terms-section>
|
|
134
|
+
`,
|
|
135
|
+
parameters: {
|
|
136
|
+
docs: {
|
|
137
|
+
description: {
|
|
138
|
+
story: 'Only the cancellation and refund FAQ item — the one that contains email links as html template literals.'
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export const CustomFaqs = {
|
|
145
|
+
name : 'Custom FAQ Content',
|
|
146
|
+
render: () => html`
|
|
147
|
+
<bd-terms-section .faqs="${[
|
|
148
|
+
{
|
|
149
|
+
question: 'Money-back guarantee',
|
|
150
|
+
items : [
|
|
151
|
+
'Bitdefender offers a 30-day money-back guarantee on all new purchases;',
|
|
152
|
+
'Refund requests must be submitted within 30 days of the purchase date;',
|
|
153
|
+
'Renewals are eligible for a refund within 30 days of the renewal billing date.'
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
question: 'Supported platforms',
|
|
158
|
+
items : [
|
|
159
|
+
'Windows 10 / 11 (32-bit and 64-bit);',
|
|
160
|
+
'macOS 12 Monterey or later;',
|
|
161
|
+
'Android 8.0 or later;',
|
|
162
|
+
'iOS 14.0 or later.'
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
]}"></bd-terms-section>
|
|
166
|
+
`,
|
|
167
|
+
parameters: {
|
|
168
|
+
docs: {
|
|
169
|
+
description: {
|
|
170
|
+
story: 'Custom `faqs` array with money-back guarantee and platform support content.'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const EmptyFaqs = {
|
|
177
|
+
name : 'Empty FAQs (edge case)',
|
|
178
|
+
render : () => html`<bd-terms-section .faqs="${[]}"></bd-terms-section>`,
|
|
179
|
+
parameters: {
|
|
180
|
+
docs: {
|
|
181
|
+
description: {
|
|
182
|
+
story: 'Edge case: empty `faqs` array. Only the static legal paragraphs at the bottom are rendered.'
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export const SingleItemPerFaq = {
|
|
189
|
+
name : 'Single Item Per FAQ',
|
|
190
|
+
render: () => html`
|
|
191
|
+
<bd-terms-section .faqs="${[
|
|
192
|
+
{ question: 'Auto-renewal', items: ['Your subscription renews automatically each year.'] },
|
|
193
|
+
{ question: 'Cancellation', items: ['Cancel anytime from Bitdefender Central.'] },
|
|
194
|
+
{ question: 'Refunds', items: ['30-day money-back guarantee on all purchases.'] }
|
|
195
|
+
]}"></bd-terms-section>
|
|
196
|
+
`,
|
|
197
|
+
parameters: {
|
|
198
|
+
docs: {
|
|
199
|
+
description: {
|
|
200
|
+
story: 'Three FAQ items each with only one bullet point.'
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export const MobileView = {
|
|
207
|
+
name : 'Mobile View (375px)',
|
|
208
|
+
render : () => html`<bd-terms-section></bd-terms-section>`,
|
|
209
|
+
parameters: {
|
|
210
|
+
viewport: { defaultViewport: 'mobile1' },
|
|
211
|
+
docs : {
|
|
212
|
+
description: {
|
|
213
|
+
story: 'Terms section at 375px mobile viewport. Tests text wrap, list indentation, and link layout on small screens.'
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
};
|
|
14
218
|
|
|
15
|
-
export const
|
|
219
|
+
export const Playground = {
|
|
220
|
+
name : '🛝 Playground',
|
|
221
|
+
args : { faqs: defaultFaqs },
|
|
222
|
+
render : (args) => html`<bd-terms-section .faqs="${args.faqs}"></bd-terms-section>`,
|
|
223
|
+
parameters: {
|
|
224
|
+
docs: {
|
|
225
|
+
description: {
|
|
226
|
+
story: 'Interactive playground. Edit the `faqs` array in Controls to customize questions and items.'
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
package/src/tokens/tokens.js
CHANGED
|
@@ -278,6 +278,7 @@ export const tokens = css`
|
|
|
278
278
|
--typography-label-small-fontFamily: var(--typography-fontFamily-sans);
|
|
279
279
|
|
|
280
280
|
--typography-label-extra-small-fontSize: var(--typography-fontSize-xxs);
|
|
281
|
+
--typography-label-xsmall-fontSize: var(--typography-fontSize-xs);
|
|
281
282
|
|
|
282
283
|
--typography-label-large-fontSize: var(--typography-fontSize-base);
|
|
283
284
|
--typography-label-large-fontWeight: var(--typography-fontWeight-medium);
|