@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
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,38 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.23.1](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.23.0...@repobit/dex-system-design@0.23.1) (2026-03-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @repobit/dex-system-design
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.23.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.22.13...@repobit/dex-system-design@0.23.0) (2026-03-17)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **DEX-24593:** exported compare component for sytem design ([548f708](https://github.com/bitdefender/dex-core/commit/548f7087b8cc7d04958e0e2661362e1b45ed1a88))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.22.13](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.22.12...@repobit/dex-system-design@0.22.13) (2026-03-16)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* **DEX-1013:** added new awards component ([4a6d2ae](https://github.com/bitdefender/dex-core/commit/4a6d2ae6b0a9bc1dd88cdea0862aa3d9bb7f56ce))
|
|
29
|
+
* **DEX-1013:** added SVG icons + compare component + updated storybook files for each ([28ce503](https://github.com/bitdefender/dex-core/commit/28ce50361cb9ddb4d697df7d8933abddfe854311))
|
|
30
|
+
* **DEX-1013:** fix for awards component / image issue + storybook file ([0b5d6c1](https://github.com/bitdefender/dex-core/commit/0b5d6c1e26ed99834eaee4eb44dbf4ca72a19e79))
|
|
31
|
+
* **DEX-1013:** fix for awards component: storybook and naming ([fdaf3e5](https://github.com/bitdefender/dex-core/commit/fdaf3e532ede76fde811bb50043d81617aa3d29b))
|
|
32
|
+
* **DEX-1013:** fix for storybook file for awards component ([3aba0b5](https://github.com/bitdefender/dex-core/commit/3aba0b584be956f5947a16ab75c9ed2bffeac6f2))
|
|
33
|
+
* **DEX-1013:** fix for structure of awards component ([a8ba87c](https://github.com/bitdefender/dex-core/commit/a8ba87c2ac021859ac33c9df21817904a92b4b09))
|
|
34
|
+
* **DEX-1013:** update accordion background CSS ([03ad986](https://github.com/bitdefender/dex-core/commit/03ad986e2a7c98c02825d75b1db17742733c3587))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.22.12](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.22.11...@repobit/dex-system-design@0.22.12) (2026-03-03)
|
|
7
39
|
|
|
8
40
|
**Note:** Version bump only for package @repobit/dex-system-design
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "Design system based on Web Components.",
|
|
5
5
|
"author": "Iordache Matei Cezar <miordache@bitdefender.com>",
|
|
6
6
|
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"./badge": "./src/components/badge/badge.js",
|
|
23
23
|
"./button": "./src/components/Button/Button.js",
|
|
24
24
|
"./carousel": "./src/components/carousel/carousel.js",
|
|
25
|
+
"./compare": "./src/components/compare/compare.js",
|
|
25
26
|
"./checkbox": "./src/components/checkbox/checkbox.js",
|
|
26
27
|
"./divider-horizontal": "./src/components/divider/divider-horizontal.js",
|
|
27
28
|
"./divider-vertical": "./src/components/divider/divider-vertical.js",
|
|
@@ -85,5 +86,5 @@
|
|
|
85
86
|
"volta": {
|
|
86
87
|
"node": "22.14.0"
|
|
87
88
|
},
|
|
88
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "11a25b099b43170b147a7c7d744b478877f172dc"
|
|
89
90
|
}
|
|
@@ -1,132 +1,304 @@
|
|
|
1
|
-
import { html } from
|
|
2
|
-
import
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import './Button.js';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
title : 'Components/Button',
|
|
6
|
+
tags : ['autodocs'],
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
Three button components are available:
|
|
12
|
+
|
|
13
|
+
- \`<bd-button>\` — a standard \`<button>\` element with click/keyboard events and active state
|
|
14
|
+
- \`<bd-button-link>\` — an \`<a>\` tag styled as a button, supports buy link data attributes
|
|
15
|
+
- \`<bd-contact-button>\` — a specialized contact CTA with an arrow icon
|
|
16
|
+
|
|
17
|
+
### Usage
|
|
18
|
+
\`\`\`html
|
|
19
|
+
<bd-button kind="primary" size="md">Click me</bd-button>
|
|
20
|
+
<bd-button-link kind="danger" size="lg" href="/buy">Buy now</bd-button-link>
|
|
21
|
+
<bd-contact-button label="Contact us" href="/contact"></bd-contact-button>
|
|
22
|
+
\`\`\`
|
|
23
|
+
|
|
24
|
+
### Kind Values
|
|
25
|
+
| Kind | Class |
|
|
26
|
+
|---|---|
|
|
27
|
+
| \`primary\` | \`button--primary\` |
|
|
28
|
+
| \`primary-outline\` | \`button--primary--outline\` |
|
|
29
|
+
| \`outline\` | \`button--outline\` |
|
|
30
|
+
| \`secondary\` | \`button--secondary\` |
|
|
31
|
+
| \`danger\` | \`button--danger\` |
|
|
32
|
+
|
|
33
|
+
### Size Values
|
|
34
|
+
| Size | Class |
|
|
35
|
+
|---|---|
|
|
36
|
+
| \`sm\` | \`button--small\` |
|
|
37
|
+
| \`md\` | \`button--medium\` |
|
|
38
|
+
| \`lg\` | \`button--large\` |
|
|
39
|
+
|
|
40
|
+
### Events
|
|
41
|
+
- \`custom-click\` — dispatched on click or Enter/Space keypress
|
|
42
|
+
`
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
argTypes: {
|
|
47
|
+
label: {
|
|
48
|
+
control : 'text',
|
|
49
|
+
description: 'Accessible aria-label for the button',
|
|
50
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'Buy now' }, category: 'Content' }
|
|
14
51
|
},
|
|
15
52
|
kind: {
|
|
16
|
-
control: { type:
|
|
17
|
-
options: [
|
|
53
|
+
control : { type: 'select' },
|
|
54
|
+
options : ['primary', 'primary-outline', 'outline', 'secondary', 'danger'],
|
|
55
|
+
description: 'Visual style variant of the button',
|
|
56
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: 'primary' }, category: 'Appearance' }
|
|
57
|
+
},
|
|
58
|
+
size: {
|
|
59
|
+
control : { type: 'select' },
|
|
60
|
+
options : ['sm', 'md', 'lg'],
|
|
61
|
+
description: 'Size of the button',
|
|
62
|
+
table : { type: { summary: "'sm' | 'md' | 'lg'" }, defaultValue: { summary: 'md' }, category: 'Appearance' }
|
|
63
|
+
},
|
|
64
|
+
fullWidth: {
|
|
65
|
+
control : 'boolean',
|
|
66
|
+
description: 'When true, button stretches to full container width',
|
|
67
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'Appearance' }
|
|
18
68
|
},
|
|
19
|
-
|
|
20
|
-
|
|
69
|
+
strong: {
|
|
70
|
+
control : 'boolean',
|
|
71
|
+
description: 'Applies bold font weight via `button--bold` class',
|
|
72
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'Appearance' }
|
|
73
|
+
},
|
|
74
|
+
fontSize: {
|
|
75
|
+
control : 'text',
|
|
76
|
+
description: 'Inline font-size override (e.g. "18px")',
|
|
77
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Typography' }
|
|
78
|
+
},
|
|
79
|
+
fontWeight: {
|
|
80
|
+
control : 'text',
|
|
81
|
+
description: 'Inline font-weight override (e.g. "600")',
|
|
82
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'Typography' }
|
|
83
|
+
},
|
|
84
|
+
href: {
|
|
85
|
+
control : 'text',
|
|
86
|
+
description: '(ButtonLink only) The anchor href URL',
|
|
87
|
+
table : { type: { summary: 'string' }, defaultValue: { summary: '' }, category: 'ButtonLink' }
|
|
88
|
+
},
|
|
89
|
+
buyLink: {
|
|
90
|
+
control : 'boolean',
|
|
91
|
+
description: '(ButtonLink only) Adds `data-store-render` and `data-store-buy-link` attributes',
|
|
92
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'false' }, category: 'ButtonLink' }
|
|
93
|
+
},
|
|
94
|
+
shadow: {
|
|
95
|
+
control : 'boolean',
|
|
96
|
+
description: '(ButtonLink only) Reflects `shadow` attribute',
|
|
97
|
+
table : { type: { summary: 'boolean' }, defaultValue: { summary: 'true' }, category: 'ButtonLink' }
|
|
98
|
+
}
|
|
21
99
|
}
|
|
22
100
|
};
|
|
23
101
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
102
|
+
const defaultArgs = {
|
|
103
|
+
label : 'Buy now', kind : 'primary', size : 'md',
|
|
104
|
+
fullWidth : false, strong : false, fontSize : '', fontWeight: ''
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// ─── bd-button Stories ─────────────────────────────────────────────────────
|
|
108
|
+
|
|
109
|
+
export const ButtonDefault = {
|
|
110
|
+
name : 'Button — Default',
|
|
111
|
+
render : () => html`<bd-button kind="primary" size="md">Buy now</bd-button>`,
|
|
112
|
+
parameters: { docs: { description: { story: 'Default primary medium button.' } } }
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const ButtonAllKinds = {
|
|
116
|
+
name : 'Button — All Kinds',
|
|
117
|
+
render: () => html`
|
|
118
|
+
<div style="display:flex; gap:12px; flex-wrap:wrap; align-items:center;">
|
|
119
|
+
<bd-button kind="primary" size="md">Primary</bd-button>
|
|
120
|
+
<bd-button kind="primary-outline" size="md">Primary Outline</bd-button>
|
|
121
|
+
<bd-button kind="outline" size="md">Outline</bd-button>
|
|
122
|
+
<bd-button kind="secondary" size="md">Secondary</bd-button>
|
|
123
|
+
<bd-button kind="danger" size="md">Danger</bd-button>
|
|
124
|
+
</div>
|
|
125
|
+
`,
|
|
126
|
+
parameters: { docs: { description: { story: 'All five `kind` variants side by side.' } } }
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export const ButtonAllSizes = {
|
|
130
|
+
name : 'Button — All Sizes',
|
|
131
|
+
render: () => html`
|
|
132
|
+
<div style="display:flex; gap:12px; align-items:center; flex-wrap:wrap;">
|
|
133
|
+
<bd-button kind="primary" size="sm">Small</bd-button>
|
|
134
|
+
<bd-button kind="primary" size="md">Medium</bd-button>
|
|
135
|
+
<bd-button kind="primary" size="lg">Large</bd-button>
|
|
136
|
+
</div>
|
|
137
|
+
`,
|
|
138
|
+
parameters: { docs: { description: { story: 'All three size variants.' } } }
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export const ButtonFullWidth = {
|
|
142
|
+
name : 'Button — Full Width',
|
|
143
|
+
render: () => html`
|
|
144
|
+
<div style="width:400px;">
|
|
145
|
+
<bd-button kind="primary" size="md" .fullWidth="${true}">Full Width Button</bd-button>
|
|
146
|
+
</div>
|
|
147
|
+
`,
|
|
148
|
+
parameters: { docs: { description: { story: '`fullWidth` set to true — applies `max--width` class.' } } }
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export const ButtonStrong = {
|
|
152
|
+
name : 'Button — Strong (Bold)',
|
|
153
|
+
render: () => html`
|
|
154
|
+
<div style="display:flex; gap:12px;">
|
|
155
|
+
<bd-button kind="primary" size="md">Normal</bd-button>
|
|
156
|
+
<bd-button kind="primary" size="md" .strong="${true}">Strong</bd-button>
|
|
157
|
+
</div>
|
|
158
|
+
`,
|
|
159
|
+
parameters: { docs: { description: { story: 'Comparison between normal and `strong` (bold) button.' } } }
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const ButtonCustomTypography = {
|
|
163
|
+
name : 'Button — Custom Font Size & Weight',
|
|
164
|
+
render: () => html`
|
|
165
|
+
<bd-button kind="danger" size="md" font-size="20px" font-weight="800">
|
|
166
|
+
Buy now
|
|
36
167
|
</bd-button>
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export const Primary = Template.bind({});
|
|
41
|
-
Primary.args = {
|
|
42
|
-
label : "Buy Now",
|
|
43
|
-
href : "#",
|
|
44
|
-
size : "md",
|
|
45
|
-
kind : "primary",
|
|
46
|
-
fullWidth: false,
|
|
47
|
-
strong : false
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export const Secondary = Template.bind({});
|
|
51
|
-
Secondary.args = {
|
|
52
|
-
label : "Learn More",
|
|
53
|
-
href : "#",
|
|
54
|
-
size : "md",
|
|
55
|
-
kind : "secondary",
|
|
56
|
-
fullWidth: false,
|
|
57
|
-
strong : false
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export const Outline = Template.bind({});
|
|
61
|
-
Outline.args = {
|
|
62
|
-
label : "See Details",
|
|
63
|
-
href : "#",
|
|
64
|
-
size : "md",
|
|
65
|
-
kind : "outline",
|
|
66
|
-
fullWidth: false,
|
|
67
|
-
strong : false
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const PrimaryOutline = Template.bind({});
|
|
71
|
-
PrimaryOutline.args = {
|
|
72
|
-
label : "Subscribe",
|
|
73
|
-
href : "#",
|
|
74
|
-
size : "md",
|
|
75
|
-
kind : "primary-outline",
|
|
76
|
-
fullWidth: false,
|
|
77
|
-
strong : false
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const Danger = Template.bind({});
|
|
81
|
-
Danger.args = {
|
|
82
|
-
label : "Delete",
|
|
83
|
-
href : "#",
|
|
84
|
-
size : "md",
|
|
85
|
-
kind : "danger",
|
|
86
|
-
fullWidth: false,
|
|
87
|
-
strong : true
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export const LargeFullWidthStrong = Template.bind({});
|
|
91
|
-
LargeFullWidthStrong.args = {
|
|
92
|
-
label : "Get Started",
|
|
93
|
-
href : "#",
|
|
94
|
-
size : "lg",
|
|
95
|
-
kind : "primary",
|
|
96
|
-
fullWidth: true,
|
|
97
|
-
strong : true
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export const SmallButton = Template.bind({});
|
|
101
|
-
SmallButton.args = {
|
|
102
|
-
label : "Small Btn",
|
|
103
|
-
href : "#",
|
|
104
|
-
size : "sm",
|
|
105
|
-
kind : "secondary",
|
|
106
|
-
fullWidth: false,
|
|
107
|
-
strong : false
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
// Story pentru bd-button-link
|
|
111
|
-
export const ButtonLinkExample = (args) => html`
|
|
112
|
-
<bd-button-link
|
|
113
|
-
label="${args.label}"
|
|
114
|
-
href="${args.href}"
|
|
115
|
-
size="${args.size}"
|
|
116
|
-
kind="${args.kind}"
|
|
117
|
-
?fullWidth="${args.fullWidth}"
|
|
118
|
-
?strong="${args.strong}"
|
|
119
|
-
>
|
|
120
|
-
${args.label}
|
|
121
|
-
</bd-button-link>
|
|
122
|
-
`;
|
|
123
|
-
ButtonLinkExample.args = {
|
|
124
|
-
label : "Go to Link",
|
|
125
|
-
href : "https://example.com",
|
|
126
|
-
size : "md",
|
|
127
|
-
kind : "primary",
|
|
128
|
-
fullWidth: false,
|
|
129
|
-
strong : false
|
|
168
|
+
`,
|
|
169
|
+
parameters: { docs: { description: { story: 'Custom `font-size` and `font-weight` applied via inline styles.' } } }
|
|
130
170
|
};
|
|
131
171
|
|
|
172
|
+
export const ButtonKeyboard = {
|
|
173
|
+
name : 'Button — Keyboard Accessible',
|
|
174
|
+
render: () => html`
|
|
175
|
+
<p style="font-size:14px; margin-bottom:8px;">Tab to focus, press Enter or Space to trigger.</p>
|
|
176
|
+
<bd-button kind="primary" size="md" label="Keyboard test">Press me</bd-button>
|
|
177
|
+
`,
|
|
178
|
+
parameters: { docs: { description: { story: 'Demonstrates keyboard activation. Enter/Space trigger `custom-click` and toggle the `active` class briefly.' } } }
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
// ─── bd-button-link Stories ────────────────────────────────────────────────
|
|
182
|
+
|
|
183
|
+
export const ButtonLinkDefault = {
|
|
184
|
+
name : 'ButtonLink — Default',
|
|
185
|
+
render: () => html`
|
|
186
|
+
<bd-button-link kind="primary" size="md" href="/buy">Buy now</bd-button-link>
|
|
187
|
+
`,
|
|
188
|
+
parameters: { docs: { description: { story: 'Default `bd-button-link` rendered as an `<a>` tag.' } } }
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export const ButtonLinkAllKinds = {
|
|
192
|
+
name : 'ButtonLink — All Kinds',
|
|
193
|
+
render: () => html`
|
|
194
|
+
<div style="display:flex; gap:12px; flex-wrap:wrap; align-items:center;">
|
|
195
|
+
<bd-button-link kind="primary" size="md" href="#">Primary</bd-button-link>
|
|
196
|
+
<bd-button-link kind="primary-outline" size="md" href="#">Primary Outline</bd-button-link>
|
|
197
|
+
<bd-button-link kind="outline" size="md" href="#">Outline</bd-button-link>
|
|
198
|
+
<bd-button-link kind="secondary" size="md" href="#">Secondary</bd-button-link>
|
|
199
|
+
<bd-button-link kind="danger" size="md" href="#">Danger</bd-button-link>
|
|
200
|
+
</div>
|
|
201
|
+
`,
|
|
202
|
+
parameters: { docs: { description: { story: 'All `kind` variants for `bd-button-link`.' } } }
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
export const ButtonLinkAllSizes = {
|
|
206
|
+
name : 'ButtonLink — All Sizes',
|
|
207
|
+
render: () => html`
|
|
208
|
+
<div style="display:flex; gap:12px; align-items:center; flex-wrap:wrap;">
|
|
209
|
+
<bd-button-link kind="danger" size="sm" href="#">Small</bd-button-link>
|
|
210
|
+
<bd-button-link kind="danger" size="md" href="#">Medium</bd-button-link>
|
|
211
|
+
<bd-button-link kind="danger" size="lg" href="#">Large</bd-button-link>
|
|
212
|
+
</div>
|
|
213
|
+
`,
|
|
214
|
+
parameters: { docs: { description: { story: 'All three sizes for `bd-button-link`.' } } }
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export const ButtonLinkBuyLink = {
|
|
218
|
+
name : 'ButtonLink — Buy Link Mode',
|
|
219
|
+
render: () => html`
|
|
220
|
+
<bd-button-link kind="danger" size="md" href="/buy" .buyLink="${true}">
|
|
221
|
+
Buy now
|
|
222
|
+
</bd-button-link>
|
|
223
|
+
`,
|
|
224
|
+
parameters: { docs: { description: { story: '`buyLink` set to true — adds `data-store-render` and `data-store-buy-link` boolean attributes for store integration.' } } }
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export const ButtonLinkFullWidth = {
|
|
228
|
+
name : 'ButtonLink — Full Width',
|
|
229
|
+
render: () => html`
|
|
230
|
+
<div style="width:400px;">
|
|
231
|
+
<bd-button-link kind="primary" size="md" href="#" .fullWidth="${true}">
|
|
232
|
+
Full Width Link Button
|
|
233
|
+
</bd-button-link>
|
|
234
|
+
</div>
|
|
235
|
+
`,
|
|
236
|
+
parameters: { docs: { description: { story: 'Full-width `bd-button-link`.' } } }
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
export const ButtonLinkCustomTypography = {
|
|
240
|
+
name : 'ButtonLink — Custom Typography',
|
|
241
|
+
render: () => html`
|
|
242
|
+
<bd-button-link kind="danger" size="md" href="#" font-size="18px" font-weight="600">
|
|
243
|
+
Buy now
|
|
244
|
+
</bd-button-link>
|
|
245
|
+
`,
|
|
246
|
+
parameters: { docs: { description: { story: 'Inline `font-size` and `font-weight` applied to the anchor element.' } } }
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
// ─── bd-contact-button Stories ─────────────────────────────────────────────
|
|
250
|
+
|
|
251
|
+
export const ContactButtonDefault = {
|
|
252
|
+
name : 'ContactButton — Default',
|
|
253
|
+
render: () => html`
|
|
254
|
+
<bd-contact-button label="Contact us" href="https://bitdefender.com/contact"></bd-contact-button>
|
|
255
|
+
`,
|
|
256
|
+
parameters: { docs: { description: { story: 'Default contact button with arrow icon.' } } }
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
export const ContactButtonCustomLabel = {
|
|
260
|
+
name : 'ContactButton — Custom Label',
|
|
261
|
+
render: () => html`
|
|
262
|
+
<bd-contact-button label="Get in touch" href="/support"></bd-contact-button>
|
|
263
|
+
`,
|
|
264
|
+
parameters: { docs: { description: { story: 'Custom label text on the contact button.' } } }
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
export const ContactButtonCustomHref = {
|
|
268
|
+
name : 'ContactButton — External Link',
|
|
269
|
+
render: () => html`
|
|
270
|
+
<bd-contact-button label="Visit our support page" href="https://support.bitdefender.com"></bd-contact-button>
|
|
271
|
+
`,
|
|
272
|
+
parameters: { docs: { description: { story: 'Contact button linking to an external support URL.' } } }
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
// ─── Combined Story ────────────────────────────────────────────────────────
|
|
276
|
+
|
|
277
|
+
export const AllButtonTypes = {
|
|
278
|
+
name : 'All Button Types',
|
|
279
|
+
render: () => html`
|
|
280
|
+
<div style="display:flex; gap:16px; flex-wrap:wrap; align-items:center;">
|
|
281
|
+
<bd-button kind="primary" size="md">bd-button</bd-button>
|
|
282
|
+
<bd-button-link kind="danger" size="md" href="#">bd-button-link</bd-button-link>
|
|
283
|
+
<bd-contact-button label="bd-contact-button" href="#"></bd-contact-button>
|
|
284
|
+
</div>
|
|
285
|
+
`,
|
|
286
|
+
parameters: { docs: { description: { story: 'All three button component types rendered side by side.' } } }
|
|
287
|
+
};
|
|
132
288
|
|
|
289
|
+
export const Playground = {
|
|
290
|
+
name : '🛝 Playground',
|
|
291
|
+
args : { ...defaultArgs },
|
|
292
|
+
render: (args) => html`
|
|
293
|
+
<bd-button
|
|
294
|
+
kind="${args.kind}"
|
|
295
|
+
size="${args.size}"
|
|
296
|
+
label="${args.label}"
|
|
297
|
+
?full-width="${args.fullWidth}"
|
|
298
|
+
?strong="${args.strong}"
|
|
299
|
+
font-size="${args.fontSize}"
|
|
300
|
+
font-weight="${args.fontWeight}"
|
|
301
|
+
>${args.label}</bd-button>
|
|
302
|
+
`,
|
|
303
|
+
parameters: { docs: { description: { story: 'Interactive playground for `bd-button`. Use Controls to adjust all props.' } } }
|
|
304
|
+
};
|
|
@@ -114,11 +114,16 @@ export default css`
|
|
|
114
114
|
padding-left: calc(var(--spacing-14) + var(--spacing-10) + var(--spacing-16));
|
|
115
115
|
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
.bd-accordion-bg-answer {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
.bd-accordion-bg-item.open .bd-accordion-bg-answer {
|
|
121
|
+
display: block;
|
|
122
|
+
}
|
|
118
123
|
.bd-accordion-bg-item.open .bd-accordion-bg-answer {
|
|
119
124
|
max-height: 5000px;
|
|
120
125
|
opacity: 1;
|
|
121
|
-
padding: var(--spacing-16)
|
|
126
|
+
padding-bottom: var(--spacing-16);
|
|
122
127
|
padding-left: calc(var(--spacing-14) + var(--spacing-10) + var(--spacing-16));
|
|
123
128
|
|
|
124
129
|
}
|