@repobit/dex-system-design 0.11.0 → 0.14.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 +35 -0
- package/package.json +2 -2
- package/src/assets/icons/Identity_protection.png +0 -0
- package/src/assets/icons/device_protection.png +0 -0
- package/src/assets/icons/financial_insurance.png +0 -0
- package/src/assets/icons/privacy_protection.png +0 -0
- package/src/assets/icons/user_guide.png +0 -0
- package/src/components/Button/Button.js +19 -16
- package/src/components/Button/button.css.js +18 -16
- package/src/components/Button/icons.js +8 -8
- package/src/components/FAQ/faq.css.js +48 -49
- package/src/components/FAQ/faq.js +0 -86
- package/src/components/Input/Input.js +68 -6
- package/src/components/Input/custom-form.stories.js +88 -0
- package/src/components/Input/input-clipboard.css.js +168 -0
- package/src/components/Input/input-clipboard.js +137 -0
- package/src/components/Input/input.css.js +122 -42
- package/src/components/accordion/accordion-bg.css.js +117 -0
- package/src/components/accordion/accordion-bg.js +80 -0
- package/src/components/accordion/accordion-no-bg.css.js +114 -0
- package/src/components/accordion/accordion-no-bg.js +80 -0
- package/src/components/accordion/accordion.css.js +88 -0
- package/src/components/accordion/accordion.js +81 -0
- package/src/components/anchor/anchor-nav.css.js +15 -15
- package/src/components/anchor/anchor-nav.js +0 -1
- package/src/components/anchor/anchor.stories.js +10 -13
- package/src/components/badge/badge.css.js +6 -6
- package/src/components/badge/badge.js +1 -2
- package/src/components/badge/badge.stories.js +6 -6
- package/src/components/carousel/carousel.css.js +60 -60
- package/src/components/carousel/carousel.js +26 -30
- package/src/components/carousel/carousel.stories.js +55 -55
- package/src/components/checkbox/checkbox.css.js +14 -14
- package/src/components/divider/divider-horizontal.js +19 -14
- package/src/components/divider/divider-vertical.js +23 -14
- package/src/components/divider/divider.css.js +19 -0
- package/src/components/dropdown/dropdown.css.js +138 -0
- package/src/components/dropdown/dropdown.js +111 -0
- package/src/components/footer/footer-links-group.css.js +42 -0
- package/src/components/footer/footer-links-group.js +25 -0
- package/src/components/footer/footer-lp.css.js +625 -0
- package/src/components/footer/footer-lp.js +368 -0
- package/src/components/footer/footer-lp.stories.js +69 -0
- package/src/components/footer/footer-nav-menu.css.js +24 -0
- package/src/components/footer/footer-nav-menu.js +36 -0
- package/src/components/footer/footer.css.js +625 -0
- package/src/components/footer/footer.js +465 -0
- package/src/components/footer/footer.stories.js +60 -0
- package/src/components/footer/localeMap.js +1 -0
- package/src/components/grid/grid.css.js +38 -0
- package/src/components/grid/grid.js +55 -0
- package/src/components/header/header.css.js +81 -52
- package/src/components/header/header.js +19 -19
- package/src/components/highlight/highlight.css.js +32 -22
- package/src/components/highlight/highlight.js +15 -4
- package/src/components/highlight/highlight.stories.js +4 -4
- package/src/components/light-carousel/light-carousel-simple.css.js +183 -0
- package/src/components/light-carousel/light-carousel-simple.js +73 -0
- package/src/components/light-carousel/light-carousel.css.js +50 -31
- package/src/components/light-carousel/light-carousel.js +14 -57
- package/src/components/light-carousel/light-carousel.stories.js +51 -10
- package/src/components/link/link.css.js +41 -0
- package/src/components/link/link.js +54 -0
- package/src/components/modal/modal.css.js +75 -0
- package/src/components/modal/modal.js +41 -0
- package/src/components/modal/modal.stories.js +40 -0
- package/src/components/paragraph/paragraph.css.js +1 -3
- package/src/components/pricing-cards/new-pricing-card.js +30 -0
- package/src/components/pricing-cards/new-pricing.css.js +58 -0
- package/src/components/pricing-cards/pricing-card-actions.css.js +16 -0
- package/src/components/pricing-cards/pricing-card-actions.js +20 -0
- package/src/components/pricing-cards/pricing-card-container.css.js +41 -0
- package/src/components/pricing-cards/pricing-card-container.js +31 -0
- package/src/components/pricing-cards/pricing-card-header.css.js +70 -0
- package/src/components/pricing-cards/pricing-card-header.js +46 -0
- package/src/components/pricing-cards/pricing-card-pricing.css.js +63 -0
- package/src/components/pricing-cards/pricing-card-pricing.js +101 -0
- package/src/components/pricing-cards/pricing-card-show-more.css.js +22 -0
- package/src/components/pricing-cards/pricing-card-show-more.js +33 -0
- package/src/components/pricing-cards/pricing-card.css.js +91 -89
- package/src/components/pricing-cards/pricing-card.js +13 -16
- package/src/components/pricing-cards/pricing-feature-item.css.js +18 -0
- package/src/components/pricing-cards/pricing-feature-item.js +14 -0
- package/src/components/radio/radio.css.js +18 -18
- package/src/components/radio/radio.js +1 -0
- package/src/components/tabs/tabs.css.js +21 -11
- package/src/components/tabs/tabs.js +24 -18
- package/src/components/termsOfUse/terms.css.js +6 -6
- package/src/components/termsOfUse/terms.js +0 -1
- package/src/stories/demo.stories.js +270 -0
- package/src/tokens/layout.css +1 -0
- package/src/tokens/tokens.css +412 -0
- package/src/components/highlight/highlight-s.css.js +0 -88
- package/src/components/highlight/highlight-s.js +0 -35
- package/src/components/highlight/highlight-s.stories.js +0 -22
- package/src/tokens/fonts.css +0 -166
- package/src/tokens/tokens.js +0 -281
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
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.14.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.12.0...@repobit/dex-system-design@0.14.0) (2025-09-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **DEX-999:** added footer components in storybook ([848ae39](https://github.com/bitdefender/dex-core/commit/848ae392aff5f59ab800b6bf54de45adbaffc70a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **DEX-1000:** update Storybook for custom-form ([1b0d539](https://github.com/bitdefender/dex-core/commit/1b0d5393230d89a7f4afc59efc11f1ed0d1d80a5))
|
|
17
|
+
* **DEX-999:** added missing files ([566952b](https://github.com/bitdefender/dex-core/commit/566952b98df5d95307cdb9df8296f685c545fd9e))
|
|
18
|
+
* **DEX-999:** modified files for PR review ([f6e4cec](https://github.com/bitdefender/dex-core/commit/f6e4cec3b1f6043c988b35f5a86a9d22c3509225))
|
|
19
|
+
* **DEX-999:** wrong import for input-clipboard ([893c5d1](https://github.com/bitdefender/dex-core/commit/893c5d1210cd41a70be1d3a7b742a1dbe2f66045))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [0.12.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.11.0...@repobit/dex-system-design@0.12.0) (2025-09-03)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* **DEX-999:** custom forms and modal storybook file ([7d113e0](https://github.com/bitdefender/dex-core/commit/7d113e0f07c19535a49825cbaf2dcdf95d6e1fd1))
|
|
29
|
+
* **DEX-999:** input with clipboard ([7ee096a](https://github.com/bitdefender/dex-core/commit/7ee096a6eb2e831cbfd0374510bb7b56e7167bfa))
|
|
30
|
+
* **DEX-999:** move photos to public folder and update footer component ([84db2fa](https://github.com/bitdefender/dex-core/commit/84db2faefd33bfd1a37a228124380cbef73acdaa))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
* **DEX-999:** feedback din PR review ([b44f4c0](https://github.com/bitdefender/dex-core/commit/b44f4c0704ffb579bf9309ef2957d14b50e74eab))
|
|
36
|
+
* **DEX-999:** modified package json and package-lock ([9dc9a3c](https://github.com/bitdefender/dex-core/commit/9dc9a3c1e031e9d69f8b7256cce8afca5153a41c))
|
|
37
|
+
* **DEX-999:** review updates ([a4fee53](https://github.com/bitdefender/dex-core/commit/a4fee533d667d711002cc763e8ea1f696fd6f898))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
## [0.11.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.10.0...@repobit/dex-system-design@0.11.0) (2025-07-23)
|
|
7
42
|
|
|
8
43
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@repobit/dex-system-design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.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",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"volta": {
|
|
69
69
|
"node": "22.14.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "1dd57a06a83a777456387a6467947febe44a7935"
|
|
72
72
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -101,6 +101,7 @@ class Button extends LitElement {
|
|
|
101
101
|
`;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
+
|
|
104
105
|
class ButtonLink extends LitElement {
|
|
105
106
|
static properties = {
|
|
106
107
|
label : { type: String },
|
|
@@ -114,13 +115,14 @@ class ButtonLink extends LitElement {
|
|
|
114
115
|
fontWeight : { type: String, attribute: "font-weight" }
|
|
115
116
|
};
|
|
116
117
|
|
|
117
|
-
/** @private -> for private properties we are using "_text" */
|
|
118
|
-
|
|
119
118
|
constructor() {
|
|
120
119
|
super();
|
|
121
120
|
this.label = "Buy now";
|
|
122
121
|
this.href = "";
|
|
123
122
|
this.size = "md";
|
|
123
|
+
this.kind = "primary";
|
|
124
|
+
this.fullWidth = false;
|
|
125
|
+
this.strong = false;
|
|
124
126
|
this.fontSize = "";
|
|
125
127
|
this.fontWeight = "";
|
|
126
128
|
}
|
|
@@ -154,6 +156,7 @@ class ButtonLink extends LitElement {
|
|
|
154
156
|
return "";
|
|
155
157
|
}
|
|
156
158
|
}
|
|
159
|
+
|
|
157
160
|
get fullWidthClass() {
|
|
158
161
|
return this.fullWidth ? "max--width" : "";
|
|
159
162
|
}
|
|
@@ -164,19 +167,17 @@ class ButtonLink extends LitElement {
|
|
|
164
167
|
|
|
165
168
|
render() {
|
|
166
169
|
return html`
|
|
167
|
-
<a
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
>
|
|
178
|
-
<slot></slot>
|
|
179
|
-
</button>
|
|
170
|
+
<a
|
|
171
|
+
href="${this.href}"
|
|
172
|
+
class="button ${this.kindClass} ${this.sizeClass} ${this.fullWidthClass} ${this.strongClass}"
|
|
173
|
+
aria-label="${this.label}"
|
|
174
|
+
@click=${this._handleClick}
|
|
175
|
+
style="
|
|
176
|
+
${this.fontSize ? `font-size: ${this.fontSize};` : ""}
|
|
177
|
+
${this.fontWeight ? `font-weight: ${this.fontWeight};` : ""}
|
|
178
|
+
"
|
|
179
|
+
>
|
|
180
|
+
<slot>${this.label}</slot>
|
|
180
181
|
</a>
|
|
181
182
|
`;
|
|
182
183
|
}
|
|
@@ -184,7 +185,10 @@ class ButtonLink extends LitElement {
|
|
|
184
185
|
_handleClick() {
|
|
185
186
|
this.dispatchEvent(new Event("custom-click"));
|
|
186
187
|
}
|
|
188
|
+
|
|
187
189
|
}
|
|
190
|
+
|
|
191
|
+
|
|
188
192
|
class ContactButton extends LitElement {
|
|
189
193
|
static properties = {
|
|
190
194
|
label: { type: String },
|
|
@@ -217,7 +221,6 @@ class ContactButton extends LitElement {
|
|
|
217
221
|
}
|
|
218
222
|
|
|
219
223
|
_handleClick() {
|
|
220
|
-
console.log("Contact button clicked!");
|
|
221
224
|
this.dispatchEvent(new Event("custom-click"));
|
|
222
225
|
}
|
|
223
226
|
}
|
|
@@ -35,8 +35,8 @@ export default css`
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
button:focus-visible {
|
|
38
|
-
outline: var(--
|
|
39
|
-
outline-offset: var(--
|
|
38
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
39
|
+
outline-offset: var(--spacing-2);
|
|
40
40
|
}
|
|
41
41
|
.href-button:focus,
|
|
42
42
|
.href-button:focus-visible {
|
|
@@ -44,10 +44,12 @@ export default css`
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.href-button:focus-visible button {
|
|
47
|
-
outline: var(--
|
|
48
|
-
outline-offset: var(--
|
|
47
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
48
|
+
outline-offset: var(--spacing-2);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
a.button {
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
}
|
|
51
53
|
.href-button {
|
|
52
54
|
text-decoration: none;
|
|
53
55
|
display: inline-flex;
|
|
@@ -134,31 +136,31 @@ export default css`
|
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
.button--small {
|
|
137
|
-
padding: var(--
|
|
138
|
-
font-size: var(--
|
|
139
|
+
padding: var(--spacing-8) var(--spacing-16);
|
|
140
|
+
font-size: var(--spacing-14);
|
|
139
141
|
font-weight: 400;
|
|
140
|
-
font-family: var(--
|
|
142
|
+
font-family: var(--typography-fontFamily-sans);
|
|
141
143
|
border-radius: 6px;
|
|
142
144
|
min-height: 34px;
|
|
143
145
|
min-width: 115px;
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
.button--medium {
|
|
147
|
-
padding: var(--
|
|
148
|
-
font-size: var(--
|
|
149
|
+
padding: var(--spacing-12) var(--spacing-20);
|
|
150
|
+
font-size: var(--spacing-16);
|
|
149
151
|
font-weight: 400;
|
|
150
|
-
font-family: var(--
|
|
151
|
-
border-radius:
|
|
152
|
+
font-family: var(--typography-fontFamily-sans);
|
|
153
|
+
border-radius: var(--radius-lg);
|
|
152
154
|
min-height: 45px;
|
|
153
155
|
min-width: 150px;
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
.button--large {
|
|
157
|
-
padding: var(--
|
|
158
|
-
font-size: var(--
|
|
159
|
+
padding: var(--spacing-16) var(--spacing-24);
|
|
160
|
+
font-size: var(--spacing-18);
|
|
159
161
|
font-weight: 400;
|
|
160
|
-
font-family: var(--
|
|
161
|
-
border-radius:
|
|
162
|
+
font-family: var(--typography-fontFamily-sans);
|
|
163
|
+
border-radius: var(--radius-lg);
|
|
162
164
|
min-height: 55px;
|
|
163
165
|
min-width: 150px;
|
|
164
166
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { LitElement,
|
|
1
|
+
import { LitElement, css, html } from "lit";
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class ArrowIconComponent extends LitElement {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
static styles = css`
|
|
7
7
|
.arrow-icon {
|
|
8
8
|
height: 10px;
|
|
9
9
|
font-weight: 600;
|
|
10
10
|
}
|
|
11
11
|
`;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
14
14
|
<svg class="arrow-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 404.39">
|
|
15
15
|
<path
|
|
16
16
|
fill-rule="nonzero"
|
|
@@ -18,7 +18,7 @@ class ArrowIconComponent extends LitElement {
|
|
|
18
18
|
/>
|
|
19
19
|
</svg>
|
|
20
20
|
`;
|
|
21
|
-
}
|
|
22
21
|
}
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
customElements.define('arrow-icon', ArrowIconComponent);
|
|
@@ -8,111 +8,110 @@ export default css`
|
|
|
8
8
|
--badge-background: var(--color-blue-500);
|
|
9
9
|
--text-color-white: var(--color-neutral-0);
|
|
10
10
|
--bd-accesibility-focus: var(--color-blue-500);
|
|
11
|
-
|
|
12
11
|
display: block;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
.bd-
|
|
16
|
-
margin-bottom: var(--
|
|
17
|
-
border-radius: var(--
|
|
14
|
+
.bd-accordion-bg-item {
|
|
15
|
+
margin-bottom: var(--spacing-16);
|
|
16
|
+
border-radius: var(--spacing-8);
|
|
18
17
|
background-color: var(--color-blue-50);
|
|
19
18
|
overflow: hidden;
|
|
20
19
|
transition: box-shadow 0.3s ease;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
.bd-
|
|
24
|
-
.bd-question-text {
|
|
22
|
+
.bd-accordion-bg-item:hover {
|
|
23
|
+
.bd-accordion-bg-question-text {
|
|
25
24
|
text-decoration-line: underline;
|
|
26
|
-
text-decoration-style: solid;
|
|
27
25
|
}
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
.bd-question {
|
|
28
|
+
.bd-accordion-bg-question {
|
|
31
29
|
cursor: pointer;
|
|
32
30
|
display: flex;
|
|
33
31
|
justify-content: flex-start;
|
|
34
32
|
align-items: center;
|
|
35
|
-
gap: var(--
|
|
36
|
-
padding:
|
|
33
|
+
gap: var(--spacing-10);
|
|
34
|
+
padding: var(--spacing-16);
|
|
37
35
|
font-weight: bold;
|
|
38
36
|
background-color: var(--color-blue-50);
|
|
39
37
|
color: #333;
|
|
40
38
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
.bd-
|
|
44
|
-
margin-bottom:
|
|
45
|
-
margin-top: 50px;
|
|
41
|
+
.bd-accordion-bg-header {
|
|
42
|
+
margin-bottom: var(--spacing-32);
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
.bd-question:hover {
|
|
45
|
+
.bd-accordion-bg-question:hover {
|
|
49
46
|
color: #0073e6;
|
|
50
47
|
}
|
|
51
48
|
|
|
52
|
-
.bd-
|
|
53
|
-
outline: var(--
|
|
54
|
-
outline-offset: var(--
|
|
49
|
+
.bd-accordion-bg-item:focus-visible {
|
|
50
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
51
|
+
outline-offset: var(--spacing-2);
|
|
55
52
|
border-radius: var(--space-2xs);
|
|
56
53
|
}
|
|
57
54
|
|
|
58
|
-
.bd-
|
|
59
|
-
.bd-question-text {
|
|
55
|
+
.bd-accordion-bg-item:focus {
|
|
56
|
+
.bd-accordion-bg-question-text {
|
|
60
57
|
font-weight: 600;
|
|
61
58
|
text-decoration-line: underline;
|
|
62
|
-
text-decoration-style: solid;
|
|
63
59
|
color: var(--color-blue-600);
|
|
64
|
-
text-decoration-thickness: var(--
|
|
60
|
+
text-decoration-thickness: var(--spacing-2);
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
.bd-question-text {
|
|
69
|
-
font-family: var(--
|
|
70
|
-
font-weight: var(--
|
|
64
|
+
.bd-accordion-bg-question-text {
|
|
65
|
+
font-family: var(--typography-fontFamily-sans);
|
|
66
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
.bd-
|
|
74
|
-
font-family: var(--
|
|
75
|
-
font-weight: var(--
|
|
69
|
+
.bd-accordion-bg-title {
|
|
70
|
+
font-family: var(--typography-fontFamily-sans);
|
|
71
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
72
|
+
margin-left: auto;
|
|
73
|
+
margin-right: auto;
|
|
74
|
+
text-align: center;
|
|
76
75
|
}
|
|
77
76
|
|
|
78
|
-
.bd-icon {
|
|
77
|
+
.bd-accordion-bg-icon {
|
|
79
78
|
transition: transform 0.3s ease;
|
|
80
|
-
width: var(--
|
|
81
|
-
height: var(--
|
|
79
|
+
width: var(--spacing-14);
|
|
80
|
+
height: var(--spacing-14);
|
|
82
81
|
color: var(--color-blue-500);
|
|
83
82
|
text-align: center;
|
|
84
83
|
position: relative;
|
|
85
84
|
bottom: 1px;
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
87
|
+
.bd-accordion-bg-answer {
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
max-height: 0;
|
|
90
|
+
opacity: 0;
|
|
91
|
+
padding: 0 15px;
|
|
92
|
+
background-color: var(--color-blue-50);
|
|
93
|
+
font-family: var(--typography-fontFamily-sans);
|
|
94
|
+
font-weight: var(--font-weight-sans-medium);
|
|
95
|
+
}
|
|
97
96
|
|
|
98
|
-
.bd-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
97
|
+
.bd-accordion-bg-item.open .bd-accordion-bg-answer {
|
|
98
|
+
max-height: 1000px;
|
|
99
|
+
opacity: 1;
|
|
100
|
+
padding: var(--spacing-0) var(--spacing-40);
|
|
101
|
+
}
|
|
103
102
|
|
|
104
|
-
.bd-answer > div {
|
|
103
|
+
.bd-accordion-bg-answer > div {
|
|
105
104
|
overflow: hidden;
|
|
106
105
|
}
|
|
107
106
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
.bd-faq-container {
|
|
107
|
+
.bd-accordion-bg-container {
|
|
111
108
|
width: 90%;
|
|
112
109
|
margin: auto;
|
|
110
|
+
padding-top: var(--spacing-64);
|
|
111
|
+
padding-bottom: var(--spacing-64);
|
|
113
112
|
}
|
|
114
113
|
|
|
115
|
-
.bd-link-noline {
|
|
114
|
+
.bd-accordion-bg-link-noline {
|
|
116
115
|
text-decoration: none;
|
|
117
116
|
}
|
|
118
117
|
`;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { LitElement, html } from "lit";
|
|
2
|
-
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
-
|
|
4
|
-
import faqCSS from "../FAQ/faq.css.js";
|
|
5
|
-
|
|
6
|
-
class FaqSection extends LitElement {
|
|
7
|
-
static properties = {
|
|
8
|
-
faqs: { type: Array }
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
render() {
|
|
16
|
-
return html`
|
|
17
|
-
<div class="bd-faq-container">
|
|
18
|
-
<div class="bd-header-section-faq">
|
|
19
|
-
<h1 class="bd-section-title">${this.title}</h1>
|
|
20
|
-
</div>
|
|
21
|
-
<slot></slot>
|
|
22
|
-
</div>
|
|
23
|
-
`;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
class FaqSectionItem extends LitElement {
|
|
28
|
-
static properties = {
|
|
29
|
-
title: { type: String },
|
|
30
|
-
open : { type: Boolean, reflect: true }
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.title = "";
|
|
36
|
-
this.open = false;
|
|
37
|
-
this.id = `faq-${Math.random().toString(36)
|
|
38
|
-
.substr(2, 9)}`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
toggleItem() {
|
|
42
|
-
this.open = !this.open;
|
|
43
|
-
this.requestUpdate();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
handleKeyDown(event) {
|
|
47
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
this.toggleItem();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
render() {
|
|
54
|
-
return html`
|
|
55
|
-
<div
|
|
56
|
-
class="bd-faq-item ${this.open ? "open" : ""}"
|
|
57
|
-
role="button"
|
|
58
|
-
aria-expanded="${this.open}"
|
|
59
|
-
aria-controls="${this.id}"
|
|
60
|
-
tabindex="0"
|
|
61
|
-
@click=${this.toggleItem}
|
|
62
|
-
@keydown=${this.handleKeyDown}
|
|
63
|
-
>
|
|
64
|
-
<div class="bd-question">
|
|
65
|
-
<span class="bd-icon">${this.open ? "−" : "+"}</span>
|
|
66
|
-
<span class="bd-question-text">${this.title}</span>
|
|
67
|
-
</div>
|
|
68
|
-
|
|
69
|
-
<div
|
|
70
|
-
id="${this.id}"
|
|
71
|
-
class="bd-answer"
|
|
72
|
-
role="region"
|
|
73
|
-
aria-labelledby="${this.id}"
|
|
74
|
-
>
|
|
75
|
-
<slot></slot>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
`;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
FaqSection.styles = [tokens, faqCSS];
|
|
83
|
-
FaqSectionItem.styles = [tokens, faqCSS];
|
|
84
|
-
|
|
85
|
-
customElements.define("bd-faq-section-item", FaqSectionItem);
|
|
86
|
-
customElements.define("bd-faq-section", FaqSection);
|
|
@@ -1,28 +1,90 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
2
|
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
-
import inputCSS from "
|
|
3
|
+
import inputCSS from "./input.css.js";
|
|
4
4
|
|
|
5
5
|
class CustomInput extends LitElement {
|
|
6
6
|
static properties = {
|
|
7
|
-
label: { type: String },
|
|
8
|
-
type
|
|
7
|
+
label : { type: String },
|
|
8
|
+
type : { type: String },
|
|
9
|
+
kind : { type: String }, // sm, md, lg
|
|
10
|
+
placeholder: { type: String },
|
|
11
|
+
required : { type: Boolean },
|
|
12
|
+
focused : { type: Boolean },
|
|
13
|
+
tooltip : { type: String },
|
|
14
|
+
invalid : { type: Boolean },
|
|
15
|
+
validated : { type: Boolean, reflect: true },
|
|
16
|
+
disabled : { type: Boolean, reflect: true }
|
|
9
17
|
};
|
|
10
18
|
|
|
11
19
|
constructor() {
|
|
12
20
|
super();
|
|
13
21
|
this.label = "Default Label";
|
|
14
22
|
this.type = "text";
|
|
23
|
+
this.kind = "md";
|
|
24
|
+
this.placeholder = "Enter something...";
|
|
25
|
+
this.required = false;
|
|
26
|
+
this.focused = false;
|
|
27
|
+
this.tooltip = "";
|
|
28
|
+
this.invalid = false;
|
|
29
|
+
this.validated = false;
|
|
30
|
+
this.disabled = false;
|
|
15
31
|
}
|
|
16
32
|
|
|
17
33
|
|
|
18
34
|
render() {
|
|
35
|
+
const inputClass = {
|
|
36
|
+
sm: "input-sm",
|
|
37
|
+
md: "input-md",
|
|
38
|
+
lg: "input-lg"
|
|
39
|
+
}[this.kind];
|
|
40
|
+
|
|
41
|
+
const labelClass = {
|
|
42
|
+
sm: "label-sm",
|
|
43
|
+
md: "label-md",
|
|
44
|
+
lg: "label-lg"
|
|
45
|
+
}[this.kind];
|
|
46
|
+
|
|
47
|
+
const inputStateClass = this.disabled
|
|
48
|
+
? "form-input--disabled"
|
|
49
|
+
: this.invalid
|
|
50
|
+
? "form-input--error"
|
|
51
|
+
: this.validated
|
|
52
|
+
? "form-input--success"
|
|
53
|
+
: "";
|
|
54
|
+
|
|
55
|
+
const helpTextClass = this.invalid
|
|
56
|
+
? "form-help-text--error"
|
|
57
|
+
: this.validated
|
|
58
|
+
? "form-help-text--success"
|
|
59
|
+
: "form-help-text--default";
|
|
60
|
+
|
|
19
61
|
return html`
|
|
20
62
|
<div class="input-container">
|
|
21
|
-
<label for="custom-input"
|
|
22
|
-
|
|
63
|
+
<label for="custom-input" class="form-label ${labelClass}">
|
|
64
|
+
${this.label}
|
|
65
|
+
${this.required
|
|
66
|
+
? html`<span class="form-label__required">*</span>`
|
|
67
|
+
: ""}
|
|
68
|
+
</label>
|
|
69
|
+
<input
|
|
70
|
+
id="custom-input"
|
|
71
|
+
class="form-input-bd ${inputClass} ${this.focused
|
|
72
|
+
? "focused"
|
|
73
|
+
: ""} ${inputStateClass}"
|
|
74
|
+
type="${this.type}"
|
|
75
|
+
placeholder="${this.placeholder}"
|
|
76
|
+
?required="${this.required}"
|
|
77
|
+
?disabled="${this.disabled}"
|
|
78
|
+
/>
|
|
79
|
+
${this.tooltip
|
|
80
|
+
? html`<div class="form-help-text ${helpTextClass}">
|
|
81
|
+
${this.tooltip}
|
|
82
|
+
</div>`
|
|
83
|
+
: ""}
|
|
23
84
|
</div>
|
|
24
85
|
`;
|
|
25
86
|
}
|
|
26
87
|
}
|
|
27
88
|
CustomInput.styles = [tokens, inputCSS];
|
|
28
|
-
|
|
89
|
+
|
|
90
|
+
customElements.define("bd-custom-input", CustomInput);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
import '../dropdown/dropdown.js';
|
|
4
|
+
import './input-clipboard.js';
|
|
5
|
+
import './Input.js';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Form Inputs and Dropdown'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// ---------- INPUT ----------
|
|
13
|
+
export const Inputs = () => html`
|
|
14
|
+
<div style="display: grid; gap: 1rem; max-width: 400px;">
|
|
15
|
+
<bd-custom-input
|
|
16
|
+
label="Nume complet"
|
|
17
|
+
placeholder="Introdu numele tău"
|
|
18
|
+
kind="sm"
|
|
19
|
+
required
|
|
20
|
+
tooltip="Choose a unique username">
|
|
21
|
+
</bd-custom-input>
|
|
22
|
+
|
|
23
|
+
<bd-custom-input
|
|
24
|
+
label="Adresă de email"
|
|
25
|
+
type="email"
|
|
26
|
+
placeholder="you@example.com"
|
|
27
|
+
kind="md"
|
|
28
|
+
focused
|
|
29
|
+
tooltip="Click to see focus state">
|
|
30
|
+
</bd-custom-input>
|
|
31
|
+
|
|
32
|
+
<bd-custom-input
|
|
33
|
+
label="Email"
|
|
34
|
+
type="email"
|
|
35
|
+
kind="sm"
|
|
36
|
+
placeholder="Enter your email"
|
|
37
|
+
required
|
|
38
|
+
invalid
|
|
39
|
+
tooltip="Please enter a valid email address">
|
|
40
|
+
</bd-custom-input>
|
|
41
|
+
|
|
42
|
+
<bd-custom-input
|
|
43
|
+
label="Email"
|
|
44
|
+
kind="sm"
|
|
45
|
+
placeholder="Enter email"
|
|
46
|
+
tooltip="Looks good!"
|
|
47
|
+
validated>
|
|
48
|
+
</bd-custom-input>
|
|
49
|
+
|
|
50
|
+
<bd-custom-input
|
|
51
|
+
label="Disabled Input"
|
|
52
|
+
placeholder="Can't type here"
|
|
53
|
+
tooltip="This field is disabled"
|
|
54
|
+
kind="sm"
|
|
55
|
+
disabled>
|
|
56
|
+
</bd-custom-input>
|
|
57
|
+
</div>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
// ---------- DROPDOWN ----------
|
|
61
|
+
export const Dropdowns = () => html`
|
|
62
|
+
<div style="display: grid; gap: 1rem; max-width: 400px;">
|
|
63
|
+
<bd-custom-dropdown
|
|
64
|
+
label="Select size"
|
|
65
|
+
kind="md"
|
|
66
|
+
options='["Small", "Medium", "Large"]'
|
|
67
|
+
tooltip="Choose an option">
|
|
68
|
+
</bd-custom-dropdown>
|
|
69
|
+
|
|
70
|
+
<bd-custom-dropdown
|
|
71
|
+
label="Select country"
|
|
72
|
+
kind="sm"
|
|
73
|
+
options='["Romania", "Germany", "Canada", "Japan", "Brazil"]'
|
|
74
|
+
tooltip="Choose an option">
|
|
75
|
+
</bd-custom-dropdown>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
// ---------- INPUT CLIPBOARD ----------
|
|
80
|
+
export const InputClipboard = () => html`
|
|
81
|
+
<div style="display: grid; gap: 1rem; max-width: 400px;">
|
|
82
|
+
<bd-custom-input-clipboard
|
|
83
|
+
label="Token"
|
|
84
|
+
kind="sm"
|
|
85
|
+
placeholder="Paste token here">
|
|
86
|
+
</bd-custom-input-clipboard>
|
|
87
|
+
</div>
|
|
88
|
+
`;
|