@repobit/dex-system-design 0.4.0 → 0.6.0
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 +18 -0
- package/package.json +4 -3
- package/src/assets/images/bd-header-img.jpg +0 -0
- package/src/assets/images/bd-header-us.jpg +0 -0
- package/src/components/Button/Button.js +115 -3
- package/src/components/Button/button.css.js +48 -10
- package/src/components/Button/button.stories.js +83 -7
- package/src/components/FAQ/faq.css.js +27 -16
- package/src/components/FAQ/faq.js +23 -114
- package/src/components/FAQ/faq.stories.js +41 -20
- package/src/components/Input/Input.js +2 -2
- package/src/components/Input/input.css.js +1 -1
- package/src/components/anchor/anchor-nav.css.js +92 -0
- package/src/components/anchor/anchor-nav.js +121 -0
- package/src/components/anchor/anchor.stories.js +134 -0
- package/src/components/badge/badge.css.js +27 -0
- package/src/components/badge/badge.js +30 -0
- package/src/components/badge/badge.stories.js +36 -0
- package/src/components/carousel/carousel.css.js +36 -19
- package/src/components/carousel/carousel.js +149 -99
- package/src/components/carousel/carousel.stories.js +202 -46
- package/src/components/checkbox/checkbox.css.js +132 -0
- package/src/components/checkbox/checkbox.js +130 -0
- package/src/components/checkbox/checkbox.stories.js +63 -0
- package/src/components/divider/divider-horizontal.js +29 -0
- package/src/components/divider/divider-vertical.js +32 -0
- package/src/components/divider/divider.css.js +0 -0
- package/src/components/divider/divider.stories.js +77 -0
- package/src/components/header/header.css.js +248 -0
- package/src/components/header/header.js +87 -0
- package/src/components/header/header.stories.js +57 -0
- package/src/components/highlight/highlight-s.css.js +88 -0
- package/src/components/highlight/highlight-s.js +35 -0
- package/src/components/highlight/highlight-s.stories.js +22 -0
- package/src/components/highlight/highlight.css.js +119 -0
- package/src/components/highlight/highlight.js +60 -0
- package/src/components/highlight/highlight.stories.js +53 -0
- package/src/components/light-carousel/light-carousel.css.js +18 -10
- package/src/components/light-carousel/light-carousel.js +29 -16
- package/src/components/light-carousel/light-carousel.stories.js +9 -7
- package/src/components/paragraph/paragraph.css.js +1 -1
- package/src/components/pricing-cards/pricing-card.css.js +138 -3
- package/src/components/pricing-cards/pricing-card.js +63 -82
- package/src/components/pricing-cards/pricing-card.stories.js +1 -0
- package/src/components/radio/radio.css.js +168 -0
- package/src/components/radio/radio.js +222 -0
- package/src/components/radio/radio.stories.js +103 -0
- package/src/components/tabs/tabs.css.js +26 -8
- package/src/components/tabs/tabs.js +19 -12
- package/src/components/termsOfUse/terms.css.js +7 -1
- package/src/tokens/fonts.stories.js +73 -0
- package/src/tokens/spacing.stories.js +56 -0
- package/src/tokens/tokens-grid.stories.js +83 -0
- package/src/tokens/tokens.css +116 -1
- package/src/tokens/tokens.stories.js +67 -0
- package/src/tokens/typography.stories.js +69 -0
- /package/src/assets/{icons → images}/tabs-img1.png +0 -0
- /package/src/assets/{icons → images}/tabs-img2.png +0 -0
- /package/src/assets/{icons → images}/tabs-img3.png +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
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.6.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.5.0...@repobit/dex-system-design@0.6.0) (2025-06-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **DEX-23636:** replace old repo with new repo ([6145843](https://github.com/bitdefender/dex-core/commit/614584397988a7542f195055330518e904715707))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.5.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.4.0...@repobit/dex-system-design@0.5.0) (2025-06-24)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **DEX-23636:** refactor button styles to use design tokens for consistency ([411c6bb](https://github.com/bitdefender/dex-core/commit/411c6bbc8d3fa63eb16d7059711929e8cca09f07))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
## [0.4.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.3.0...@repobit/dex-system-design@0.4.0) (2025-06-24)
|
|
7
25
|
|
|
8
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
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",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"LICENSE"
|
|
17
17
|
],
|
|
18
18
|
"exports": {
|
|
19
|
-
"./button": "./src/components/Button/Button.js"
|
|
19
|
+
"./button": "./src/components/Button/Button.js",
|
|
20
|
+
"./header": "./src/components/header/header.js"
|
|
20
21
|
},
|
|
21
22
|
"publishConfig": {
|
|
22
23
|
"access": "public"
|
|
@@ -53,5 +54,5 @@
|
|
|
53
54
|
"volta": {
|
|
54
55
|
"node": "22.14.0"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "70accd8e5e61d8344dd833fe6d5f343f973e2ce8"
|
|
57
58
|
}
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LitElement, html
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
2
|
import "./icons.js";
|
|
3
3
|
import buttonsCSS from "./button.css.js";
|
|
4
4
|
|
|
@@ -11,6 +11,106 @@ class Button extends LitElement {
|
|
|
11
11
|
kind: { type: String },
|
|
12
12
|
fullWidth: { type: Boolean },
|
|
13
13
|
strong: { type: Boolean },
|
|
14
|
+
fontSize: { type: String, attribute: "font-size" },
|
|
15
|
+
fontWeight: { type: String, attribute: "font-weight" },
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.label = "Buy now";
|
|
21
|
+
this.href = "";
|
|
22
|
+
this.size = "md";
|
|
23
|
+
this.fontSize = "";
|
|
24
|
+
this.fontWeight = "";
|
|
25
|
+
this.isActive = false;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
_handleKeyDown(event) {
|
|
29
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
30
|
+
this.isActive = true;
|
|
31
|
+
this.requestUpdate();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
_handleKeyUp(event) {
|
|
36
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
37
|
+
this.isActive = false;
|
|
38
|
+
this.requestUpdate();
|
|
39
|
+
this._handleClick();
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
_handleClick() {
|
|
44
|
+
this.dispatchEvent(new Event("custom-click"));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
get sizeClass() {
|
|
48
|
+
switch (this.size) {
|
|
49
|
+
case "lg":
|
|
50
|
+
return "button--large";
|
|
51
|
+
case "md":
|
|
52
|
+
return "button--medium";
|
|
53
|
+
case "sm":
|
|
54
|
+
return "button--small";
|
|
55
|
+
default:
|
|
56
|
+
return "";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get kindClass() {
|
|
61
|
+
switch (this.kind) {
|
|
62
|
+
case "primary-outline":
|
|
63
|
+
return "button--primary--outline";
|
|
64
|
+
case "outline":
|
|
65
|
+
return "button--outline";
|
|
66
|
+
case "secondary":
|
|
67
|
+
return "button--secondary";
|
|
68
|
+
case "primary":
|
|
69
|
+
return "button--primary";
|
|
70
|
+
case "danger":
|
|
71
|
+
return "button--danger";
|
|
72
|
+
default:
|
|
73
|
+
return "";
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
get fullWidthClass() {
|
|
78
|
+
return this.fullWidth ? "max--width" : "";
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
get strongClass() {
|
|
82
|
+
return this.strong ? "button--bold" : "";
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
render() {
|
|
86
|
+
return html`
|
|
87
|
+
<button
|
|
88
|
+
@click=${this._handleClick}
|
|
89
|
+
@keydown=${this._handleKeyDown}
|
|
90
|
+
@keyup=${this._handleKeyUp}
|
|
91
|
+
class="button ${this.kindClass} ${this.sizeClass} ${this.fullWidthClass} ${this.strongClass} ${this.isActive ? 'active' : ''}"
|
|
92
|
+
aria-label="${this.label}"
|
|
93
|
+
style="
|
|
94
|
+
${this.fontSize ? `font-size: ${this.fontSize};` : ""}
|
|
95
|
+
${this.fontWeight ? `font-weight: ${this.fontWeight};` : ""}
|
|
96
|
+
"
|
|
97
|
+
>
|
|
98
|
+
<slot></slot>
|
|
99
|
+
</button>
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
class ButtonLink extends LitElement {
|
|
104
|
+
static properties = {
|
|
105
|
+
label: { type: String },
|
|
106
|
+
href: { type: String },
|
|
107
|
+
size: { type: String },
|
|
108
|
+
customClass: { type: String },
|
|
109
|
+
kind: { type: String },
|
|
110
|
+
fullWidth: { type: Boolean },
|
|
111
|
+
strong: { type: Boolean },
|
|
112
|
+
fontSize: { type: String, attribute: "font-size" },
|
|
113
|
+
fontWeight: { type: String, attribute: "font-weight" },
|
|
14
114
|
};
|
|
15
115
|
|
|
16
116
|
/** @private -> for private properties we are using "_text" */
|
|
@@ -20,6 +120,8 @@ class Button extends LitElement {
|
|
|
20
120
|
this.label = "Buy now";
|
|
21
121
|
this.href = "";
|
|
22
122
|
this.size = "md";
|
|
123
|
+
this.fontSize = "";
|
|
124
|
+
this.fontWeight = "";
|
|
23
125
|
}
|
|
24
126
|
|
|
25
127
|
get sizeClass() {
|
|
@@ -67,6 +169,10 @@ class Button extends LitElement {
|
|
|
67
169
|
class="button ${this.kindClass} ${this.sizeClass} ${this
|
|
68
170
|
.fullWidthClass} ${this.strongClass}"
|
|
69
171
|
aria-label="${this.label}"
|
|
172
|
+
style="
|
|
173
|
+
${this.fontSize ? `font-size: ${this.fontSize};` : ""}
|
|
174
|
+
${this.fontWeight ? `font-weight: ${this.fontWeight};` : ""}
|
|
175
|
+
"
|
|
70
176
|
>
|
|
71
177
|
<slot></slot>
|
|
72
178
|
</button>
|
|
@@ -75,11 +181,9 @@ class Button extends LitElement {
|
|
|
75
181
|
}
|
|
76
182
|
|
|
77
183
|
_handleClick() {
|
|
78
|
-
console.log("Button clicked!");
|
|
79
184
|
this.dispatchEvent(new Event("custom-click"));
|
|
80
185
|
}
|
|
81
186
|
}
|
|
82
|
-
|
|
83
187
|
class ContactButton extends LitElement {
|
|
84
188
|
static properties = {
|
|
85
189
|
label: { type: String },
|
|
@@ -99,6 +203,10 @@ class ContactButton extends LitElement {
|
|
|
99
203
|
class="bd-contact-btn"
|
|
100
204
|
@click=${this._handleClick}
|
|
101
205
|
aria-label="${this.label}"
|
|
206
|
+
style="
|
|
207
|
+
${this.fontSize ? `font-size: ${this.fontSize};` : ""}
|
|
208
|
+
${this.fontWeight ? `font-weight: ${this.fontWeight};` : ""}
|
|
209
|
+
"
|
|
102
210
|
>
|
|
103
211
|
${this.label}
|
|
104
212
|
<arrow-icon></arrow-icon>
|
|
@@ -114,7 +222,11 @@ class ContactButton extends LitElement {
|
|
|
114
222
|
}
|
|
115
223
|
|
|
116
224
|
Button.styles = [buttonsCSS];
|
|
225
|
+
ButtonLink.styles = [buttonsCSS];
|
|
226
|
+
|
|
117
227
|
ContactButton.styles = [buttonsCSS];
|
|
118
228
|
|
|
119
229
|
customElements.define("bd-button", Button);
|
|
230
|
+
customElements.define("bd-button-link", ButtonLink);
|
|
231
|
+
|
|
120
232
|
customElements.define("bd-contact-button", ContactButton);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from
|
|
1
|
+
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
:host {
|
|
@@ -25,10 +25,34 @@ export default css`
|
|
|
25
25
|
--button-background-primary-outline-hover: var(--color-blue-50);
|
|
26
26
|
--border-button-background-primary-outline-hover: var(--color-blue-500);
|
|
27
27
|
--button-background-primary-outline-focus: var(--color-blue-500);
|
|
28
|
+
--bd-accesibility-focus: var(--color-blue-500);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
button:focus,
|
|
32
|
+
button:focus-visible {
|
|
33
|
+
outline: none;
|
|
34
|
+
box-shadow: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
button:focus-visible {
|
|
38
|
+
outline: var(--size-2) solid var(--bd-accesibility-focus);
|
|
39
|
+
outline-offset: var(--size-2);
|
|
40
|
+
}
|
|
41
|
+
.href-button:focus,
|
|
42
|
+
.href-button:focus-visible {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.href-button:focus-visible button {
|
|
47
|
+
outline: var(--size-2) solid var(--bd-accesibility-focus);
|
|
48
|
+
outline-offset: var(--size-2);
|
|
28
49
|
}
|
|
29
50
|
|
|
30
51
|
.href-button {
|
|
31
52
|
text-decoration: none;
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
vertical-align: middle;
|
|
55
|
+
width: 100%;
|
|
32
56
|
}
|
|
33
57
|
.button {
|
|
34
58
|
color: white;
|
|
@@ -37,6 +61,9 @@ export default css`
|
|
|
37
61
|
transition: background-color 0.3s ease, transform 0.2s ease,
|
|
38
62
|
box-shadow 0.2s ease;
|
|
39
63
|
gap: 10px;
|
|
64
|
+
vertical-align: middle;
|
|
65
|
+
line-height: 1;
|
|
66
|
+
box-sizing: border-box;
|
|
40
67
|
}
|
|
41
68
|
|
|
42
69
|
.button--primary {
|
|
@@ -48,7 +75,7 @@ export default css`
|
|
|
48
75
|
background-color: var(--button-background-primary-hover);
|
|
49
76
|
}
|
|
50
77
|
|
|
51
|
-
.button--primary:
|
|
78
|
+
.button--primary:active {
|
|
52
79
|
background-color: var(--button-background-primary-focus);
|
|
53
80
|
}
|
|
54
81
|
|
|
@@ -61,7 +88,7 @@ export default css`
|
|
|
61
88
|
background-color: var(--button-background-secondary-hover);
|
|
62
89
|
}
|
|
63
90
|
|
|
64
|
-
.button--secondary:
|
|
91
|
+
.button--secondary:active {
|
|
65
92
|
background-color: var(--button-background-secondary-focus);
|
|
66
93
|
}
|
|
67
94
|
|
|
@@ -73,11 +100,12 @@ export default css`
|
|
|
73
100
|
.button--danger:hover {
|
|
74
101
|
background-color: var(--button-background-danger-hover);
|
|
75
102
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
103
|
+
|
|
104
|
+
.button--danger.active,
|
|
105
|
+
.button--danger:active {
|
|
106
|
+
background-color: var(--button-background-danger-focus);
|
|
107
|
+
}
|
|
108
|
+
|
|
81
109
|
.button--outline {
|
|
82
110
|
background-color: transparent;
|
|
83
111
|
border: 2px solid var(--border-button-background-outline);
|
|
@@ -87,7 +115,7 @@ export default css`
|
|
|
87
115
|
background-color: var(--button-background-outline-hover);
|
|
88
116
|
border: 2px solid var(--border-button-background-outline-hover);
|
|
89
117
|
}
|
|
90
|
-
.button--outline:
|
|
118
|
+
.button--outline:active {
|
|
91
119
|
background-color: var(--button-background-outline-focus);
|
|
92
120
|
color: white;
|
|
93
121
|
}
|
|
@@ -100,7 +128,7 @@ export default css`
|
|
|
100
128
|
background-color: var(--button-background-primary-outline-hover);
|
|
101
129
|
border: 2px solid var(--border-button-background-primary-outline-hover);
|
|
102
130
|
}
|
|
103
|
-
.button--primary--outline:
|
|
131
|
+
.button--primary--outline:active {
|
|
104
132
|
background-color: var(--button-background-primary-outline-focus);
|
|
105
133
|
color: white;
|
|
106
134
|
}
|
|
@@ -111,6 +139,8 @@ export default css`
|
|
|
111
139
|
font-weight: 400;
|
|
112
140
|
font-family: var(--font-family-sans);
|
|
113
141
|
border-radius: 6px;
|
|
142
|
+
min-height: 34px;
|
|
143
|
+
min-width: 115px;
|
|
114
144
|
}
|
|
115
145
|
|
|
116
146
|
.button--medium {
|
|
@@ -119,6 +149,8 @@ export default css`
|
|
|
119
149
|
font-weight: 400;
|
|
120
150
|
font-family: var(--font-family-sans);
|
|
121
151
|
border-radius: 8px;
|
|
152
|
+
min-height: 45px;
|
|
153
|
+
min-width: 150px;
|
|
122
154
|
}
|
|
123
155
|
|
|
124
156
|
.button--large {
|
|
@@ -127,11 +159,17 @@ export default css`
|
|
|
127
159
|
font-weight: 400;
|
|
128
160
|
font-family: var(--font-family-sans);
|
|
129
161
|
border-radius: 8px;
|
|
162
|
+
min-height: 55px;
|
|
163
|
+
min-width: 150px;
|
|
130
164
|
}
|
|
131
165
|
.button--bold {
|
|
132
166
|
font-weight: 600;
|
|
133
167
|
}
|
|
134
168
|
.max--width {
|
|
135
169
|
width: 100%;
|
|
170
|
+
display: block;
|
|
171
|
+
}
|
|
172
|
+
.button.max--width {
|
|
173
|
+
width: 100%;
|
|
136
174
|
}
|
|
137
175
|
`;
|
|
@@ -2,7 +2,7 @@ import "./Button.js";
|
|
|
2
2
|
import { html } from "lit";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: "
|
|
5
|
+
title: "Atoms/Button",
|
|
6
6
|
component: "bd-button",
|
|
7
7
|
tags: ["autodocs"],
|
|
8
8
|
argTypes: {
|
|
@@ -23,14 +23,16 @@ export default {
|
|
|
23
23
|
|
|
24
24
|
const Template = (args) => {
|
|
25
25
|
const { label, href, size, kind, fullWidth, strong } = args;
|
|
26
|
-
return `
|
|
26
|
+
return html`
|
|
27
27
|
<bd-button
|
|
28
28
|
label="${label}"
|
|
29
29
|
href="${href}"
|
|
30
30
|
size="${size}"
|
|
31
|
-
kind="${kind}"
|
|
32
|
-
${fullWidth
|
|
33
|
-
${strong
|
|
31
|
+
kind="${kind}"
|
|
32
|
+
?fullWidth="${fullWidth}"
|
|
33
|
+
?strong="${strong}"
|
|
34
|
+
>
|
|
35
|
+
${label}
|
|
34
36
|
</bd-button>
|
|
35
37
|
`;
|
|
36
38
|
};
|
|
@@ -45,8 +47,48 @@ Primary.args = {
|
|
|
45
47
|
strong: false,
|
|
46
48
|
};
|
|
47
49
|
|
|
48
|
-
export const
|
|
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 = {
|
|
50
92
|
label: "Get Started",
|
|
51
93
|
href: "#",
|
|
52
94
|
size: "lg",
|
|
@@ -54,3 +96,37 @@ FullWidthPrimary.args = {
|
|
|
54
96
|
fullWidth: true,
|
|
55
97
|
strong: true,
|
|
56
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,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
1
|
+
import { css } from "../lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
:host {
|
|
@@ -7,6 +7,7 @@ export default css`
|
|
|
7
7
|
--border-card-green: var(--color-green-700);
|
|
8
8
|
--badge-background: var(--color-blue-500);
|
|
9
9
|
--text-color-white: var(--color-neutral-0);
|
|
10
|
+
--bd-accesibility-focus: var(--color-blue-500);
|
|
10
11
|
|
|
11
12
|
display: block;
|
|
12
13
|
}
|
|
@@ -34,7 +35,7 @@ export default css`
|
|
|
34
35
|
gap: var(--size-10);
|
|
35
36
|
padding: 15px;
|
|
36
37
|
font-weight: bold;
|
|
37
|
-
background-color:
|
|
38
|
+
background-color: var(--color-blue-50);
|
|
38
39
|
color: #333;
|
|
39
40
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
40
41
|
}
|
|
@@ -48,6 +49,12 @@ export default css`
|
|
|
48
49
|
color: #0073e6;
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
.bd-faq-item:focus-visible {
|
|
53
|
+
outline: var(--size-2) solid var(--bd-accesibility-focus);
|
|
54
|
+
outline-offset: var(--size-2);
|
|
55
|
+
border-radius: var(--space-2xs);
|
|
56
|
+
}
|
|
57
|
+
|
|
51
58
|
.bd-faq-item:focus {
|
|
52
59
|
.bd-question-text {
|
|
53
60
|
font-weight: 600;
|
|
@@ -74,27 +81,31 @@ export default css`
|
|
|
74
81
|
height: var(--size-14);
|
|
75
82
|
color: var(--color-blue-500);
|
|
76
83
|
text-align: center;
|
|
84
|
+
position: relative;
|
|
85
|
+
bottom: 1px;
|
|
77
86
|
}
|
|
78
87
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
.bd-answer {
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
max-height: 0;
|
|
91
|
+
opacity: 0;
|
|
92
|
+
padding: 0 15px;
|
|
93
|
+
background-color: var(--color-blue-50);
|
|
94
|
+
font-family: var(--font-family-sans);
|
|
95
|
+
font-weight: var(--font-weight-sans-medium);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.bd-faq-item.open .bd-answer {
|
|
99
|
+
max-height: 1000px; /* pune un maxim generos, dar realist */
|
|
100
|
+
opacity: 1;
|
|
101
|
+
padding: var(--size-0) var(--size-40);
|
|
102
|
+
}
|
|
89
103
|
|
|
90
104
|
.bd-answer > div {
|
|
91
105
|
overflow: hidden;
|
|
92
106
|
}
|
|
93
107
|
|
|
94
|
-
|
|
95
|
-
grid-template-rows: 1fr;
|
|
96
|
-
padding: var(--size-0) var(--size-40);
|
|
97
|
-
}
|
|
108
|
+
|
|
98
109
|
|
|
99
110
|
.bd-faq-container {
|
|
100
111
|
width: 90%;
|