@repobit/dex-system-design 0.23.8 → 0.23.10
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 +14 -0
- package/package.json +2 -2
- package/src/components/accordion/accordion-bg.css.js +119 -100
- package/src/components/accordion/accordion-bg.js +53 -41
- package/src/components/accordion/accordion-bg.stories.js +140 -269
- package/src/components/accordion/accordion-indicators.js +2 -0
- package/src/components/accordion/accordion.css.js +202 -31
- package/src/components/accordion/accordion.js +73 -31
- package/src/components/accordion/accordion.stories.js +182 -278
- package/src/components/awards/awards-icon.js +44 -32
- package/src/components/awards/awards-light.js +234 -0
- package/src/components/awards/awards-light.stories.js +436 -0
- package/src/components/awards/awards.css.js +219 -216
- package/src/components/awards/awards.js +156 -132
- package/src/components/awards/awards.stories.js +229 -243
- package/src/components/carousel/carousel.stories.js +13 -13
- package/src/components/dropdown/dropdown.stories.js +221 -0
- package/src/components/pricing-cards/new-pricing-card.stories.js +4 -0
- package/src/components/pricing-cards/pricing-card-pricing.js +3 -1
- package/src/tokens/tokens.css +8 -0
- package/src/tokens/tokens.js +9 -0
|
@@ -16,7 +16,7 @@ export default {
|
|
|
16
16
|
### Usage
|
|
17
17
|
\`\`\`html
|
|
18
18
|
<bd-carousel-section title="Security Features">
|
|
19
|
-
<bd-carousel-item title="VPN" icon="/assets/
|
|
19
|
+
<bd-carousel-item title="VPN" icon="/assets/analysis.svg" modalText="Our VPN protects your connection.">
|
|
20
20
|
<p>Unlimited VPN included</p>
|
|
21
21
|
</bd-carousel-item>
|
|
22
22
|
</bd-carousel-section>
|
|
@@ -61,12 +61,12 @@ export default {
|
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
const sampleItems = [
|
|
64
|
-
{ title: 'VPN Protection', icon: '/assets/
|
|
65
|
-
{ title: 'Antivirus', icon: '/assets/
|
|
66
|
-
{ title: 'Password Manager', icon: '/assets/
|
|
67
|
-
{ title: 'Parental Controls', icon: '/assets/
|
|
68
|
-
{ title: 'Anti-Phishing', icon: '/assets/
|
|
69
|
-
{ title: 'Webcam Protection', icon: '/assets/
|
|
64
|
+
{ title: 'VPN Protection', icon: '/assets/analysis.svg', modalText: 'Our VPN encrypts your internet traffic and hides your IP address.', content: 'Unlimited encrypted VPN traffic' },
|
|
65
|
+
{ title: 'Antivirus', icon: '/assets/analysis.svg', modalText: 'Real-time antivirus protection against all known and emerging threats.', content: 'Award-winning threat detection' },
|
|
66
|
+
{ title: 'Password Manager', icon: '/assets/analysis.svg', modalText: 'Store and autofill all your passwords securely across all devices.', content: 'Secure password vault' },
|
|
67
|
+
{ title: 'Parental Controls', icon: '/assets/analysis.svg', modalText: 'Monitor and control your children\'s online activity and screen time.', content: 'Advanced content filtering' },
|
|
68
|
+
{ title: 'Anti-Phishing', icon: '/assets/analysis.svg', modalText: 'Detects and blocks phishing websites before they can steal your data.', content: 'Real-time phishing protection' },
|
|
69
|
+
{ title: 'Webcam Protection', icon: '/assets/analysis.svg', modalText: 'Prevents unauthorized apps from accessing your webcam.', content: 'Webcam & mic access control' }
|
|
70
70
|
];
|
|
71
71
|
|
|
72
72
|
const renderItem = (item) => html`
|
|
@@ -135,18 +135,18 @@ export const RichSlottedContent = {
|
|
|
135
135
|
name : 'Rich Slotted Content',
|
|
136
136
|
render: () => html`
|
|
137
137
|
<bd-carousel-section title="Features">
|
|
138
|
-
<bd-carousel-item title="VPN" icon="/assets/
|
|
138
|
+
<bd-carousel-item title="VPN" icon="/assets/analysis.svg" modalText="Full VPN details here.">
|
|
139
139
|
<ul>
|
|
140
140
|
<li>Unlimited bandwidth</li>
|
|
141
141
|
<li>200+ server locations</li>
|
|
142
142
|
<li>No-log policy</li>
|
|
143
143
|
</ul>
|
|
144
144
|
</bd-carousel-item>
|
|
145
|
-
<bd-carousel-item title="Antivirus" icon="/assets/
|
|
145
|
+
<bd-carousel-item title="Antivirus" icon="/assets/analysis.svg" modalText="Antivirus details here.">
|
|
146
146
|
<p>Real-time protection</p>
|
|
147
147
|
<a href="#">Learn more</a>
|
|
148
148
|
</bd-carousel-item>
|
|
149
|
-
<bd-carousel-item title="Parental Controls" icon="/assets/
|
|
149
|
+
<bd-carousel-item title="Parental Controls" icon="/assets/analysis.svg" modalText="Parental control details.">
|
|
150
150
|
<p>Safe browsing for kids</p>
|
|
151
151
|
<p>Screen time management</p>
|
|
152
152
|
</bd-carousel-item>
|
|
@@ -184,7 +184,7 @@ export const Playground = {
|
|
|
184
184
|
args: {
|
|
185
185
|
title : 'Security Features',
|
|
186
186
|
itemTitle: 'VPN Protection',
|
|
187
|
-
itemIcon : '/assets/
|
|
187
|
+
itemIcon : '/assets/analysis.svg',
|
|
188
188
|
modalText: 'Our VPN encrypts your connection and protects your privacy.'
|
|
189
189
|
},
|
|
190
190
|
render: (args) => html`
|
|
@@ -192,10 +192,10 @@ export const Playground = {
|
|
|
192
192
|
<bd-carousel-item title="${args.itemTitle}" icon="${args.itemIcon}" modalText="${args.modalText}">
|
|
193
193
|
<p>Slotted content for this item.</p>
|
|
194
194
|
</bd-carousel-item>
|
|
195
|
-
<bd-carousel-item title="Antivirus" icon="/assets/
|
|
195
|
+
<bd-carousel-item title="Antivirus" icon="/assets/analysis.svg" modalText="Real-time antivirus protection.">
|
|
196
196
|
<p>Award-winning threat detection</p>
|
|
197
197
|
</bd-carousel-item>
|
|
198
|
-
<bd-carousel-item title="Parental Controls" icon="/assets/
|
|
198
|
+
<bd-carousel-item title="Parental Controls" icon="/assets/analysis.svg" modalText="Monitor your children's activity.">
|
|
199
199
|
<p>Advanced content filtering</p>
|
|
200
200
|
</bd-carousel-item>
|
|
201
201
|
</bd-carousel-section>
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import './dropdown.js';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title : 'Components/Dropdown',
|
|
6
|
+
tags : ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
**CustomDropdown** is a Lit form select component with label, validation states, tooltip, and size variants.
|
|
12
|
+
|
|
13
|
+
### Usage
|
|
14
|
+
\`\`\`html
|
|
15
|
+
<bd-custom-dropdown
|
|
16
|
+
label="Select country"
|
|
17
|
+
.options="${['Romania', 'Germany', 'France']}"
|
|
18
|
+
kind="md"
|
|
19
|
+
required
|
|
20
|
+
></bd-custom-dropdown>
|
|
21
|
+
\`\`\`
|
|
22
|
+
|
|
23
|
+
### States
|
|
24
|
+
| State | Prop | CSS Class |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Default | — | — |
|
|
27
|
+
| Invalid | \`invalid\` | \`form-input--error\` |
|
|
28
|
+
| Valid | \`validated\` | \`form-input--success\` |
|
|
29
|
+
| Disabled | \`disabled\` | \`form-input--disabled\` |
|
|
30
|
+
|
|
31
|
+
### Size Variants
|
|
32
|
+
| Kind | Input Class | Label Class |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| \`sm\` | \`input-sm\` | \`label-sm\` |
|
|
35
|
+
| \`md\` | \`input-md\` | \`label-md\` |
|
|
36
|
+
| \`lg\` | \`input-lg\` | \`label-lg\` |
|
|
37
|
+
|
|
38
|
+
### Notes
|
|
39
|
+
- Options can be passed as an Array or a JSON string
|
|
40
|
+
- First option is auto-selected by default
|
|
41
|
+
- Tooltip/help text is only rendered when \`tooltip\` prop is non-empty
|
|
42
|
+
`
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
label: {
|
|
48
|
+
control : 'text',
|
|
49
|
+
description: 'Label text shown above the select',
|
|
50
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'Select an option' }, category: 'Content' }
|
|
51
|
+
},
|
|
52
|
+
options: {
|
|
53
|
+
control : 'object',
|
|
54
|
+
description: 'Array of option strings. Can also be passed as a JSON string.',
|
|
55
|
+
table : { type: { summary: 'string[]' }, defaultValue: { summary: '[]' }, category: 'Content' }
|
|
56
|
+
},
|
|
57
|
+
kind: {
|
|
58
|
+
control : { type: 'select' },
|
|
59
|
+
options : ['sm', 'md', 'lg'],
|
|
60
|
+
description: 'Size variant controlling input and label CSS classes',
|
|
61
|
+
table : { type: { summary: "'sm'|'md'|'lg'" }, defaultValue: { summary: 'md' }, category: 'Appearance' }
|
|
62
|
+
},
|
|
63
|
+
required: {
|
|
64
|
+
control : 'boolean',
|
|
65
|
+
description: 'Adds a required asterisk to the label and `required` attribute to the select',
|
|
66
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'Validation' }
|
|
67
|
+
},
|
|
68
|
+
invalid: {
|
|
69
|
+
control : 'boolean',
|
|
70
|
+
description: 'Applies error styling and `form-help-text--error` to the tooltip',
|
|
71
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'Validation' }
|
|
72
|
+
},
|
|
73
|
+
validated: {
|
|
74
|
+
control : 'boolean',
|
|
75
|
+
description: 'Applies success styling and `form-help-text--success` to the tooltip',
|
|
76
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'Validation' }
|
|
77
|
+
},
|
|
78
|
+
disabled: {
|
|
79
|
+
control : 'boolean',
|
|
80
|
+
description: 'Disables the select element',
|
|
81
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'State' }
|
|
82
|
+
},
|
|
83
|
+
tooltip: {
|
|
84
|
+
control : 'text',
|
|
85
|
+
description: 'Help text shown below the select. Empty string hides it.',
|
|
86
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Content' }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const defaultOptions = ['Select a plan', 'Antivirus Plus', 'Total Security', 'Premium Security'];
|
|
92
|
+
|
|
93
|
+
const render = (args) => html`
|
|
94
|
+
<bd-custom-dropdown
|
|
95
|
+
label="${args.label}"
|
|
96
|
+
.options="${args.options}"
|
|
97
|
+
kind="${args.kind}"
|
|
98
|
+
tooltip="${args.tooltip}"
|
|
99
|
+
?required="${args.required}"
|
|
100
|
+
?invalid="${args.invalid}"
|
|
101
|
+
?validated="${args.validated}"
|
|
102
|
+
?disabled="${args.disabled}"
|
|
103
|
+
></bd-custom-dropdown>
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
const defaultArgs = {
|
|
107
|
+
label : 'Select a plan', options : defaultOptions,
|
|
108
|
+
kind : 'md', tooltip : '', required : false,
|
|
109
|
+
invalid : false, validated: false, disabled : false
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// ─── Stories ───────────────────────────────────────────────────────────────
|
|
113
|
+
|
|
114
|
+
export const Default = {
|
|
115
|
+
name : 'Default',
|
|
116
|
+
render: () => html`
|
|
117
|
+
<bd-custom-dropdown label="Select a plan" .options="${defaultOptions}" kind="md"></bd-custom-dropdown>
|
|
118
|
+
`,
|
|
119
|
+
parameters: { docs: { description: { story: 'Default dropdown with no validation state and no tooltip.' } } }
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export const AllSizes = {
|
|
123
|
+
name : 'All Sizes',
|
|
124
|
+
render: () => html`
|
|
125
|
+
<div style="display:flex; flex-direction:column; gap:20px; max-width:400px;">
|
|
126
|
+
<bd-custom-dropdown label="Small" .options="${defaultOptions}" kind="sm"></bd-custom-dropdown>
|
|
127
|
+
<bd-custom-dropdown label="Medium" .options="${defaultOptions}" kind="md"></bd-custom-dropdown>
|
|
128
|
+
<bd-custom-dropdown label="Large" .options="${defaultOptions}" kind="lg"></bd-custom-dropdown>
|
|
129
|
+
</div>
|
|
130
|
+
`,
|
|
131
|
+
parameters: { docs: { description: { story: 'All three size variants stacked for comparison.' } } }
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
export const Required = {
|
|
135
|
+
name : 'Required',
|
|
136
|
+
render: () => html`
|
|
137
|
+
<bd-custom-dropdown label="Select a plan" .options="${defaultOptions}" kind="md" required></bd-custom-dropdown>
|
|
138
|
+
`,
|
|
139
|
+
parameters: { docs: { description: { story: 'Required field — shows a `*` after the label.' } } }
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const WithTooltip = {
|
|
143
|
+
name : 'With Tooltip / Help Text',
|
|
144
|
+
render: () => html`
|
|
145
|
+
<bd-custom-dropdown
|
|
146
|
+
label="Select a plan"
|
|
147
|
+
.options="${defaultOptions}"
|
|
148
|
+
kind="md"
|
|
149
|
+
tooltip="Choose the plan that best fits your needs."
|
|
150
|
+
></bd-custom-dropdown>
|
|
151
|
+
`,
|
|
152
|
+
parameters: { docs: { description: { story: 'Help text rendered below the select via the `tooltip` prop.' } } }
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export const Invalid = {
|
|
156
|
+
name : 'Invalid State',
|
|
157
|
+
render: () => html`
|
|
158
|
+
<bd-custom-dropdown
|
|
159
|
+
label="Select a plan"
|
|
160
|
+
.options="${defaultOptions}"
|
|
161
|
+
kind="md"
|
|
162
|
+
invalid
|
|
163
|
+
tooltip="Please select a valid option."
|
|
164
|
+
></bd-custom-dropdown>
|
|
165
|
+
`,
|
|
166
|
+
parameters: { docs: { description: { story: 'Error state — applies `form-input--error` and `form-help-text--error` classes.' } } }
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export const Validated = {
|
|
170
|
+
name : 'Validated State',
|
|
171
|
+
render: () => html`
|
|
172
|
+
<bd-custom-dropdown
|
|
173
|
+
label="Select a plan"
|
|
174
|
+
.options="${defaultOptions}"
|
|
175
|
+
kind="md"
|
|
176
|
+
validated
|
|
177
|
+
tooltip="Great choice!"
|
|
178
|
+
></bd-custom-dropdown>
|
|
179
|
+
`,
|
|
180
|
+
parameters: { docs: { description: { story: 'Success state — applies `form-input--success` and `form-help-text--success` classes.' } } }
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export const Disabled = {
|
|
184
|
+
name : 'Disabled',
|
|
185
|
+
render: () => html`
|
|
186
|
+
<bd-custom-dropdown label="Select a plan" .options="${defaultOptions}" kind="md" disabled></bd-custom-dropdown>
|
|
187
|
+
`,
|
|
188
|
+
parameters: { docs: { description: { story: 'Disabled select — applies `form-input--disabled` class.' } } }
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export const AllStates = {
|
|
192
|
+
name : 'All Validation States',
|
|
193
|
+
render: () => html`
|
|
194
|
+
<div style="display:flex; flex-direction:column; gap:20px; max-width:400px;">
|
|
195
|
+
<bd-custom-dropdown label="Default" .options="${defaultOptions}" kind="md" tooltip="Default help text."></bd-custom-dropdown>
|
|
196
|
+
<bd-custom-dropdown label="Invalid" .options="${defaultOptions}" kind="md" invalid tooltip="This field has an error."></bd-custom-dropdown>
|
|
197
|
+
<bd-custom-dropdown label="Validated" .options="${defaultOptions}" kind="md" validated tooltip="Looks good!"></bd-custom-dropdown>
|
|
198
|
+
<bd-custom-dropdown label="Disabled" .options="${defaultOptions}" kind="md" disabled></bd-custom-dropdown>
|
|
199
|
+
</div>
|
|
200
|
+
`,
|
|
201
|
+
parameters: { docs: { description: { story: 'All four states stacked: default, invalid, validated, disabled.' } } }
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
export const ManyOptions = {
|
|
205
|
+
name : 'Many Options',
|
|
206
|
+
render: () => html`
|
|
207
|
+
<bd-custom-dropdown
|
|
208
|
+
label="Select your country"
|
|
209
|
+
.options="${['Select country', 'Romania', 'Germany', 'France', 'Spain', 'Italy', 'Netherlands', 'Belgium', 'Poland', 'Sweden']}"
|
|
210
|
+
kind="md"
|
|
211
|
+
></bd-custom-dropdown>
|
|
212
|
+
`,
|
|
213
|
+
parameters: { docs: { description: { story: 'Dropdown with 10 options. Tests scroll behavior of the native select.' } } }
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
export const Playground = {
|
|
217
|
+
name : '🛝 Playground',
|
|
218
|
+
args : { ...defaultArgs },
|
|
219
|
+
render,
|
|
220
|
+
parameters: { docs: { description: { story: 'Fully interactive playground. Adjust all props via Controls.' } } }
|
|
221
|
+
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
+
import "../heading/heading.js";
|
|
3
|
+
import "../image/image.js";
|
|
4
|
+
import "../link/link.js";
|
|
5
|
+
import "../paragraph/paragraph.js";
|
|
2
6
|
import './new-pricing-card.js';
|
|
3
7
|
import './pricing-card-actions.js';
|
|
4
8
|
import './pricing-card-container.js';
|
|
@@ -78,7 +78,9 @@ class PricingCardPricing extends LitElement {
|
|
|
78
78
|
|
|
79
79
|
<bd-p kind="small" class="terms">
|
|
80
80
|
First year price. Plus applicable sales tax. See
|
|
81
|
-
|
|
81
|
+
<bd-link href="#" target="_blank" font-size="14px" color="var(--color-neutral-900)" underline>
|
|
82
|
+
terms of use
|
|
83
|
+
</bd-link>
|
|
82
84
|
</bd-p>
|
|
83
85
|
</div>
|
|
84
86
|
|
package/src/tokens/tokens.css
CHANGED
|
@@ -28,6 +28,14 @@
|
|
|
28
28
|
--typography-fontWeight-medium: 500;
|
|
29
29
|
--typography-fontWeight-semibold: 600;
|
|
30
30
|
--typography-fontWeight-bold: 700;
|
|
31
|
+
/* Awards section — Orbit Frame 14 (node 1882:9342) */
|
|
32
|
+
--layout-awards-section-background: var(--color-blue-50);
|
|
33
|
+
--layout-awards-banner-max-width: 37.5rem; /* legacy narrow cap; prefer cluster */
|
|
34
|
+
--layout-awards-cluster-max-width: 49.5625rem; /* 793px — trust banner column */
|
|
35
|
+
--layout-awards-intro-max-width: 39.4375rem; /* 631px — headline stack */
|
|
36
|
+
/* Legacy: narrow lower block from Orbit; prefer --layout-ensemble-content-max for compare-aligned grids */
|
|
37
|
+
--layout-awards-content-max-width: 53.0625rem; /* 849px */
|
|
38
|
+
--layout-ensemble-inline-padding: var(--spacing-24);
|
|
31
39
|
|
|
32
40
|
--typography-lineHeight-none: 1;
|
|
33
41
|
--typography-lineHeight-tight: 1.25;
|
package/src/tokens/tokens.js
CHANGED
|
@@ -1038,5 +1038,14 @@ export const tokens = css`
|
|
|
1038
1038
|
|
|
1039
1039
|
--font-style-sans-normal: normal;
|
|
1040
1040
|
--font-style-sans-italic: italic;
|
|
1041
|
+
/* Awards section — Orbit Frame 14 (node 1882:9342) */
|
|
1042
|
+
--layout-awards-section-background: var(--color-blue-50);
|
|
1043
|
+
--layout-awards-banner-max-width: 37.5rem; /* legacy narrow cap; prefer cluster */
|
|
1044
|
+
--layout-awards-cluster-max-width: 49.5625rem; /* 793px — trust banner column */
|
|
1045
|
+
--layout-awards-intro-max-width: 39.4375rem; /* 631px — headline stack */
|
|
1046
|
+
/* Legacy: narrow lower block from Orbit; prefer --layout-ensemble-content-max for compare-aligned grids */
|
|
1047
|
+
--layout-awards-content-max-width: 53.0625rem; /* 849px */
|
|
1048
|
+
--layout-ensemble-inline-padding: var(--spacing-24);
|
|
1049
|
+
|
|
1041
1050
|
}
|
|
1042
1051
|
`;
|