@repobit/dex-system-design 0.19.2 → 0.21.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 +32 -0
- package/package.json +2 -3
- package/src/components/Button/button.stories.js +51 -51
- package/src/components/accordion/accordion-bg.css.js +168 -102
- package/src/components/accordion/accordion-bg.js +13 -5
- package/src/components/accordion/accordion-bg.stories.js +281 -0
- package/src/components/accordion/accordion-light.stories.js +241 -0
- package/src/components/anchor/anchor.stories.js +24 -22
- package/src/components/back/back.css.js +56 -0
- package/src/components/back/back.js +39 -0
- package/src/components/back/back.stories.js +184 -0
- package/src/components/badge/badge.css.js +44 -6
- package/src/components/badge/badge.js +40 -2
- package/src/components/badge/badge.stories.js +3 -10
- package/src/components/breadcrumb/breadcrumb.css.js +98 -0
- package/src/components/breadcrumb/breadcrumb.js +136 -0
- package/src/components/breadcrumb/breadcrumb.stories.js +109 -0
- package/src/components/cards/card.css.js +245 -0
- package/src/components/cards/card.js +80 -0
- package/src/components/cards/card.stories.js +512 -0
- package/src/components/carousel/carousel.css.js +51 -36
- package/src/components/carousel/carousel.js +0 -1
- package/src/components/carousel/carousel.stories.js +21 -17
- package/src/components/display/display.css.js +68 -0
- package/src/components/display/display.js +26 -0
- package/src/components/display/display.stories.js +339 -0
- package/src/components/divider/divider-horizontal.js +1 -1
- package/src/components/footer/footer-links-group.css.js +1 -1
- package/src/components/footer/footer-links-group.js +3 -3
- package/src/components/footer/footer-lp.stories.js +26 -61
- package/src/components/footer/footer-nav-menu.css.js +9 -10
- package/src/components/footer/footer.css.js +95 -8
- package/src/components/footer/footer.js +31 -65
- package/src/components/footer/footer.stories.js +165 -48
- package/src/components/header/header.js +11 -11
- package/src/components/header/header.stories.js +36 -4
- package/src/components/heading/heading.css.js +79 -0
- package/src/components/heading/heading.js +79 -0
- package/src/components/heading/heading.stories.js +260 -0
- package/src/components/highlight/highlight.stories.js +1 -1
- package/src/components/image/image.css.js +101 -0
- package/src/components/image/image.js +57 -0
- package/src/components/image/image.stories.js +245 -0
- package/src/components/light-carousel/light-carousel-simple.js +3 -2
- package/src/components/light-carousel/light-carousel.js +3 -7
- package/src/components/light-carousel/light-carousel.stories.js +15 -16
- package/src/components/link/link.css.js +107 -18
- package/src/components/link/link.js +16 -12
- package/src/components/link/link.stories.js +177 -0
- package/src/components/list/list-item/list-item.css.js +106 -0
- package/src/components/list/list-item/list-item.js +43 -0
- package/src/components/list/list-item/list-item.stories.js +79 -0
- package/src/components/list/list.css.js +175 -0
- package/src/components/list/list.js +44 -0
- package/src/components/modal/modal.js +6 -5
- package/src/components/paragraph/paragraph.css.js +41 -11
- package/src/components/paragraph/paragraph.js +7 -45
- package/src/components/paragraph/paragraph.stories.js +235 -0
- package/src/components/picture/picture.css.js +0 -0
- package/src/components/picture/picture.js +46 -0
- package/src/components/picture/picture.stories.js +275 -0
- package/src/components/pricing-cards/pricing-card-actions.js +1 -1
- package/src/components/pricing-cards/pricing-card-header.js +9 -7
- package/src/components/pricing-cards/pricing-card-pricing.js +11 -12
- package/src/components/pricing-cards/pricing-card.css.js +28 -3
- package/src/components/pricing-cards/pricing-card.js +38 -50
- package/src/components/tabs/tabs.js +44 -47
- package/src/components/termsOfUse/terms.js +77 -161
- package/src/components/termsOfUse/terms.stories.js +4 -3
- package/src/stories/Header.js +6 -6
- package/src/tokens/layout.css +3 -3
- package/src/tokens/tokens.css +0 -23
- package/src/tokens/tokens.stories.js +9 -8
- package/src/components/accordion/accordion-no-bg.css.js +0 -114
- package/src/components/accordion/accordion-no-bg.js +0 -80
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.21.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.20.0...@repobit/dex-system-design@0.21.0) (2025-11-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **DEX-1004:** add bd-h, bd-p, bd-ul, bd-li components and update stories ([3aada6e](https://github.com/bitdefender/dex-core/commit/3aada6e25f74869d0915cb18dfcf512e11a76be1))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## [0.20.0](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.19.2...@repobit/dex-system-design@0.20.0) (2025-10-08)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* **DEX-1001:** new version for tokens.css - previous was outdated ([97acf3a](https://github.com/bitdefender/dex-core/commit/97acf3a5002fdad340eaf73e7b79049073eb908e))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **DEX-1003:** footer adjustments on tablets and new card components created ([f8d5cf5](https://github.com/bitdefender/dex-core/commit/f8d5cf5af9dbcf81dbd7bf6e307ce9af202e2aa9))
|
|
26
|
+
* **DEX-1003:** modified light carousel storybook due to images issue ([69224b1](https://github.com/bitdefender/dex-core/commit/69224b1c6eab9562e31b215ddc06039093e90b6b))
|
|
27
|
+
* **DEX-1003:** modified svg icons into inline svg ([12eb99b](https://github.com/bitdefender/dex-core/commit/12eb99b6652e214798876c24fa186da2db675a8c))
|
|
28
|
+
* **DEX-1003:** remove accordion-no-bg and merge with accordion-bg, add SVG inline icons ([cfbc2da](https://github.com/bitdefender/dex-core/commit/cfbc2da3a6879244d1e9d2db0c1da113e32e1ad3))
|
|
29
|
+
* **DEX-1003:** remove accordion-no-bg, merge with accordion-bg, add inline SVG icons ([2f35df4](https://github.com/bitdefender/dex-core/commit/2f35df4389cb3a42bb5c739653b3b513c876a031))
|
|
30
|
+
* **DEX-1003:** remove forgotten line from index.html ([57f203a](https://github.com/bitdefender/dex-core/commit/57f203a4cdbf2e8942663e08124d2950cd8149ea))
|
|
31
|
+
* **DEX-1003:** svg icons modified into svg in line + card components ([fc536e2](https://github.com/bitdefender/dex-core/commit/fc536e2e62d24cd2354d3e5d420e4e17856cbf9a))
|
|
32
|
+
* **DEX-1003:** token name updated to fix gap problems between quick links columns ([40a1375](https://github.com/bitdefender/dex-core/commit/40a1375172bec391a7144eb3e6045e65e064712d))
|
|
33
|
+
* **DEX-1003:** update footer stories ([b55074d](https://github.com/bitdefender/dex-core/commit/b55074d801bf4ca99c39b33360783013d1257198))
|
|
34
|
+
* **DEX-999:** new version for tokens (previous was outdated) ([d4d73fc](https://github.com/bitdefender/dex-core/commit/d4d73fcdafeff82c61a742711b11bd9c98d9636c))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
6
38
|
## [0.19.2](https://github.com/bitdefender/dex-core/compare/@repobit/dex-system-design@0.19.1...@repobit/dex-system-design@0.19.2) (2025-10-06)
|
|
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.21.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",
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
],
|
|
18
18
|
"exports": {
|
|
19
19
|
"./accordion-bg": "./src/components/accordion/accordion-bg.js",
|
|
20
|
-
"./accordion-no-bg": "./src/components/accordion/accordion-no-bg.js",
|
|
21
20
|
"./accordion": "./src/components/accordion/accordion.js",
|
|
22
21
|
"./anchor": "./src/components/anchor/anchor-nav.js",
|
|
23
22
|
"./badge": "./src/components/badge/badge.js",
|
|
@@ -79,5 +78,5 @@
|
|
|
79
78
|
"volta": {
|
|
80
79
|
"node": "22.14.0"
|
|
81
80
|
},
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "a1e5bfebddd95d02a095d4992fd7c5cf60423865"
|
|
83
82
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import "./Button.js";
|
|
2
1
|
import { html } from "lit";
|
|
2
|
+
import "./Button.js";
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: "Atoms/Button",
|
|
5
|
+
title : "Atoms/Button",
|
|
6
6
|
component: "bd-button",
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
argTypes: {
|
|
7
|
+
tags : ["autodocs"],
|
|
8
|
+
argTypes : {
|
|
9
9
|
label: { control: "text" },
|
|
10
|
-
href: { control: "text" },
|
|
11
|
-
size: {
|
|
10
|
+
href : { control: "text" },
|
|
11
|
+
size : {
|
|
12
12
|
control: { type: "select" },
|
|
13
|
-
options: ["sm", "md", "lg"]
|
|
13
|
+
options: ["sm", "md", "lg"]
|
|
14
14
|
},
|
|
15
15
|
kind: {
|
|
16
16
|
control: { type: "select" },
|
|
17
|
-
options: ["primary", "secondary", "outline", "primary-outline", "danger"]
|
|
17
|
+
options: ["primary", "secondary", "outline", "primary-outline", "danger"]
|
|
18
18
|
},
|
|
19
19
|
fullWidth: { control: "boolean" },
|
|
20
|
-
strong: { control: "boolean" }
|
|
21
|
-
}
|
|
20
|
+
strong : { control: "boolean" }
|
|
21
|
+
}
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const Template = (args) => {
|
|
@@ -39,72 +39,72 @@ const Template = (args) => {
|
|
|
39
39
|
|
|
40
40
|
export const Primary = Template.bind({});
|
|
41
41
|
Primary.args = {
|
|
42
|
-
label: "Buy Now",
|
|
43
|
-
href: "#",
|
|
44
|
-
size: "md",
|
|
45
|
-
kind: "primary",
|
|
42
|
+
label : "Buy Now",
|
|
43
|
+
href : "#",
|
|
44
|
+
size : "md",
|
|
45
|
+
kind : "primary",
|
|
46
46
|
fullWidth: false,
|
|
47
|
-
strong: false
|
|
47
|
+
strong : false
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
export const Secondary = Template.bind({});
|
|
51
51
|
Secondary.args = {
|
|
52
|
-
label: "Learn More",
|
|
53
|
-
href: "#",
|
|
54
|
-
size: "md",
|
|
55
|
-
kind: "secondary",
|
|
52
|
+
label : "Learn More",
|
|
53
|
+
href : "#",
|
|
54
|
+
size : "md",
|
|
55
|
+
kind : "secondary",
|
|
56
56
|
fullWidth: false,
|
|
57
|
-
strong: false
|
|
57
|
+
strong : false
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
export const Outline = Template.bind({});
|
|
61
61
|
Outline.args = {
|
|
62
|
-
label: "See Details",
|
|
63
|
-
href: "#",
|
|
64
|
-
size: "md",
|
|
65
|
-
kind: "outline",
|
|
62
|
+
label : "See Details",
|
|
63
|
+
href : "#",
|
|
64
|
+
size : "md",
|
|
65
|
+
kind : "outline",
|
|
66
66
|
fullWidth: false,
|
|
67
|
-
strong: false
|
|
67
|
+
strong : false
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export const PrimaryOutline = Template.bind({});
|
|
71
71
|
PrimaryOutline.args = {
|
|
72
|
-
label: "Subscribe",
|
|
73
|
-
href: "#",
|
|
74
|
-
size: "md",
|
|
75
|
-
kind: "primary-outline",
|
|
72
|
+
label : "Subscribe",
|
|
73
|
+
href : "#",
|
|
74
|
+
size : "md",
|
|
75
|
+
kind : "primary-outline",
|
|
76
76
|
fullWidth: false,
|
|
77
|
-
strong: false
|
|
77
|
+
strong : false
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const Danger = Template.bind({});
|
|
81
81
|
Danger.args = {
|
|
82
|
-
label: "Delete",
|
|
83
|
-
href: "#",
|
|
84
|
-
size: "md",
|
|
85
|
-
kind: "danger",
|
|
82
|
+
label : "Delete",
|
|
83
|
+
href : "#",
|
|
84
|
+
size : "md",
|
|
85
|
+
kind : "danger",
|
|
86
86
|
fullWidth: false,
|
|
87
|
-
strong: true
|
|
87
|
+
strong : true
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
export const LargeFullWidthStrong = Template.bind({});
|
|
91
91
|
LargeFullWidthStrong.args = {
|
|
92
|
-
label: "Get Started",
|
|
93
|
-
href: "#",
|
|
94
|
-
size: "lg",
|
|
95
|
-
kind: "primary",
|
|
92
|
+
label : "Get Started",
|
|
93
|
+
href : "#",
|
|
94
|
+
size : "lg",
|
|
95
|
+
kind : "primary",
|
|
96
96
|
fullWidth: true,
|
|
97
|
-
strong: true
|
|
97
|
+
strong : true
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
export const SmallButton = Template.bind({});
|
|
101
101
|
SmallButton.args = {
|
|
102
|
-
label: "Small Btn",
|
|
103
|
-
href: "#",
|
|
104
|
-
size: "sm",
|
|
105
|
-
kind: "secondary",
|
|
102
|
+
label : "Small Btn",
|
|
103
|
+
href : "#",
|
|
104
|
+
size : "sm",
|
|
105
|
+
kind : "secondary",
|
|
106
106
|
fullWidth: false,
|
|
107
|
-
strong: false
|
|
107
|
+
strong : false
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
// Story pentru bd-button-link
|
|
@@ -121,12 +121,12 @@ export const ButtonLinkExample = (args) => html`
|
|
|
121
121
|
</bd-button-link>
|
|
122
122
|
`;
|
|
123
123
|
ButtonLinkExample.args = {
|
|
124
|
-
label: "Go to Link",
|
|
125
|
-
href: "https://example.com",
|
|
126
|
-
size: "md",
|
|
127
|
-
kind: "primary",
|
|
124
|
+
label : "Go to Link",
|
|
125
|
+
href : "https://example.com",
|
|
126
|
+
size : "md",
|
|
127
|
+
kind : "primary",
|
|
128
128
|
fullWidth: false,
|
|
129
|
-
strong: false
|
|
129
|
+
strong : false
|
|
130
130
|
};
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
|
|
@@ -2,126 +2,192 @@ import { css } from "lit";
|
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
4
|
@layer bd-components {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
.bd-accordion-bg-item {
|
|
16
|
-
margin-bottom: var(--spacing-16);
|
|
17
|
-
border-radius: var(--spacing-8);
|
|
18
|
-
background-color: var(--color-blue-50);
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
transition: box-shadow 0.3s ease;
|
|
21
|
-
}
|
|
5
|
+
:host {
|
|
6
|
+
--background-card-grey: var(--color-neutral-25);
|
|
7
|
+
--border-card-grey: var(--color-neutral-50);
|
|
8
|
+
--border-card-green: var(--color-green-700);
|
|
9
|
+
--badge-background: var(--color-blue-500);
|
|
10
|
+
--text-color-white: var(--color-neutral-0);
|
|
11
|
+
--bd-accesibility-focus: var(--color-blue-500);
|
|
12
|
+
display: block;
|
|
13
|
+
}
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
.bd-accordion-bg-item {
|
|
16
|
+
margin-bottom: var(--spacing-16);
|
|
17
|
+
border-radius: var(--spacing-8);
|
|
18
|
+
background-color: var(--color-blue-50);
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
transition: box-shadow 0.3s ease;
|
|
21
|
+
}
|
|
28
22
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
justify-content: flex-start;
|
|
33
|
-
align-items: center;
|
|
34
|
-
gap: var(--spacing-10);
|
|
35
|
-
padding: var(--spacing-16);
|
|
36
|
-
font-weight: bold;
|
|
37
|
-
background-color: var(--color-blue-50);
|
|
38
|
-
color: #333;
|
|
39
|
-
transition: background-color 0.3s ease, color 0.3s ease;
|
|
23
|
+
.bd-accordion-bg-item:hover {
|
|
24
|
+
.bd-accordion-bg-question-text {
|
|
25
|
+
text-decoration-line: underline;
|
|
40
26
|
}
|
|
27
|
+
}
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
.bd-accordion-bg-question {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: var(--spacing-10);
|
|
35
|
+
padding: var(--spacing-16);
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
background-color: var(--color-blue-50);
|
|
38
|
+
color: #333;
|
|
39
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
|
40
|
+
}
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
.bd-accordion-bg-header {
|
|
43
|
+
margin-bottom: var(--spacing-32);
|
|
44
|
+
}
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
border-radius: var(--space-2xs);
|
|
54
|
-
}
|
|
46
|
+
.bd-accordion-bg-question:hover {
|
|
47
|
+
color: #0073e6;
|
|
48
|
+
}
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
text-decoration-thickness: var(--spacing-2);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
50
|
+
.bd-accordion-bg-item:focus-visible {
|
|
51
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
52
|
+
outline-offset: var(--spacing-2);
|
|
53
|
+
border-radius: var(--space-2xs);
|
|
54
|
+
}
|
|
64
55
|
|
|
56
|
+
.bd-accordion-bg-item:focus {
|
|
65
57
|
.bd-accordion-bg-question-text {
|
|
66
|
-
font-
|
|
67
|
-
|
|
58
|
+
font-weight: 600;
|
|
59
|
+
text-decoration-line: underline;
|
|
60
|
+
color: var(--color-blue-600);
|
|
61
|
+
text-decoration-thickness: var(--spacing-2);
|
|
68
62
|
}
|
|
63
|
+
}
|
|
69
64
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
margin-right: auto;
|
|
75
|
-
text-align: center;
|
|
76
|
-
}
|
|
65
|
+
.bd-accordion-bg-question-text {
|
|
66
|
+
font-family: var(--typography-fontFamily-sans);
|
|
67
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
68
|
+
}
|
|
77
69
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
bottom: 1px;
|
|
86
|
-
}
|
|
70
|
+
.bd-accordion-bg-title {
|
|
71
|
+
font-family: var(--typography-fontFamily-sans);
|
|
72
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
73
|
+
margin-left: auto;
|
|
74
|
+
margin-right: auto;
|
|
75
|
+
text-align: center;
|
|
76
|
+
}
|
|
87
77
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
78
|
+
.bd-accordion-bg-icon {
|
|
79
|
+
transition: transform 0.3s ease;
|
|
80
|
+
width: var(--spacing-14);
|
|
81
|
+
height: var(--spacing-14);
|
|
82
|
+
color: var(--color-blue-500);
|
|
83
|
+
text-align: center;
|
|
84
|
+
position: relative;
|
|
85
|
+
bottom: 1px;
|
|
86
|
+
}
|
|
97
87
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
.bd-accordion-bg-icon {
|
|
89
|
+
transition: transform 0.3s ease;
|
|
90
|
+
width: var(--spacing-14);
|
|
91
|
+
height: var(--spacing-14);
|
|
92
|
+
color: var(--color-blue-500);
|
|
93
|
+
text-align: center;
|
|
94
|
+
position: relative;
|
|
95
|
+
}
|
|
103
96
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
.bd-accordion-bg-item:not(.open) .bd-accordion-bg-icon {
|
|
98
|
+
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><rect x="6" width="2" height="14" fill="%23006DFF"/><rect x="14" y="6" width="2" height="14" transform="rotate(90 14 6)" fill="%23006DFF"/></svg>');
|
|
99
|
+
}
|
|
107
100
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
padding-top: var(--spacing-64);
|
|
112
|
-
padding-bottom: var(--spacing-64);
|
|
113
|
-
}
|
|
101
|
+
.bd-accordion-bg-item.open .bd-accordion-bg-icon {
|
|
102
|
+
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14"><rect x="14" y="6" width="2" height="14" transform="rotate(90 14 6)" fill="%23006DFF"/></svg>');
|
|
103
|
+
}
|
|
114
104
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
105
|
+
.bd-accordion-bg-answer {
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
max-height: 0;
|
|
108
|
+
opacity: 0;
|
|
109
|
+
padding: 0 var(--spacing-16);
|
|
110
|
+
background-color: var(--color-blue-50);
|
|
111
|
+
font-family: var(--typography-fontFamily-sans);
|
|
112
|
+
font-weight: var(--font-weight-sans-medium);
|
|
113
|
+
transition: none;
|
|
114
|
+
padding-left: calc(var(--spacing-14) + var(--spacing-10) + var(--spacing-16));
|
|
118
115
|
|
|
119
|
-
|
|
120
|
-
background-color: blue;
|
|
121
|
-
}
|
|
116
|
+
}
|
|
122
117
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
118
|
+
.bd-accordion-bg-item.open .bd-accordion-bg-answer {
|
|
119
|
+
max-height: 5000px;
|
|
120
|
+
opacity: 1;
|
|
121
|
+
padding: var(--spacing-16) var(--spacing-16);
|
|
122
|
+
padding-left: calc(var(--spacing-14) + var(--spacing-10) + var(--spacing-16));
|
|
123
|
+
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.bd-accordion-bg-answer > div {
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.bd-accordion-bg-container {
|
|
131
|
+
width: 90%;
|
|
132
|
+
margin: auto;
|
|
133
|
+
padding-top: var(--spacing-64);
|
|
134
|
+
padding-bottom: var(--spacing-64);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.bd-accordion-bg-link-noline {
|
|
138
|
+
text-decoration: none;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.test-accordion {
|
|
142
|
+
background-color: blue;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.test-accordion p {
|
|
146
|
+
font-size: 20px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.bd-accordion-bg-container.no-bg {
|
|
150
|
+
background: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.bd-accordion-bg-item.no-bg {
|
|
154
|
+
background-color: transparent;
|
|
155
|
+
border: none;
|
|
126
156
|
}
|
|
157
|
+
|
|
158
|
+
.bd-accordion-bg-item.no-bg .bd-accordion-bg-question {
|
|
159
|
+
background-color: transparent;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.bd-accordion-bg-item.no-bg .bd-accordion-bg-answer {
|
|
163
|
+
background-color: transparent;
|
|
164
|
+
padding: 0 var(--spacing-40);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* REGULĂ NOUĂ PENTRU NO-BG DESCHIS */
|
|
168
|
+
.bd-accordion-bg-item.no-bg.open .bd-accordion-bg-answer {
|
|
169
|
+
padding: var(--spacing-16) var(--spacing-40);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.bd-accordion-bg-item.no-bg:hover {
|
|
173
|
+
background-color: transparent;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.bd-accordion-bg-item.no-bg:hover .bd-accordion-bg-question-text {
|
|
177
|
+
text-decoration-line: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.bd-accordion-bg-item:hover .bd-accordion-bg-question-text {
|
|
181
|
+
text-decoration-line: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bd-accordion-bg-item:focus .bd-accordion-bg-question-text {
|
|
185
|
+
text-decoration-line: none;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.bd-accordion-bg-item.no-bg:focus .bd-accordion-bg-question-text {
|
|
189
|
+
text-decoration-line: none;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
127
193
|
`;
|
|
@@ -4,14 +4,20 @@ import accordionCSS from "./accordion-bg.css";
|
|
|
4
4
|
|
|
5
5
|
class BdAccordionBg extends LitElement {
|
|
6
6
|
static properties = {
|
|
7
|
-
title: { type: String }
|
|
7
|
+
title: { type: String },
|
|
8
|
+
noBg : { type: Boolean, attribute: 'no-bg' }
|
|
8
9
|
};
|
|
9
10
|
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.noBg = false;
|
|
14
|
+
}
|
|
15
|
+
|
|
10
16
|
static styles = [tokens, accordionCSS];
|
|
11
17
|
|
|
12
18
|
render() {
|
|
13
19
|
return html`
|
|
14
|
-
<div class="bd-accordion-bg-container">
|
|
20
|
+
<div class="bd-accordion-bg-container ${this.noBg ? 'no-bg' : ''}">
|
|
15
21
|
<div class="bd-accordion-bg-header">
|
|
16
22
|
<h1 class="bd-accordion-bg-title">${this.title}</h1>
|
|
17
23
|
</div>
|
|
@@ -24,13 +30,15 @@ class BdAccordionBg extends LitElement {
|
|
|
24
30
|
class BdAccordionBgItem extends LitElement {
|
|
25
31
|
static properties = {
|
|
26
32
|
title: { type: String },
|
|
27
|
-
open : { type: Boolean, reflect: true }
|
|
33
|
+
open : { type: Boolean, reflect: true },
|
|
34
|
+
noBg : { type: Boolean, attribute: 'no-bg' }
|
|
28
35
|
};
|
|
29
36
|
|
|
30
37
|
constructor() {
|
|
31
38
|
super();
|
|
32
39
|
this.title = "";
|
|
33
40
|
this.open = false;
|
|
41
|
+
this.noBg = false;
|
|
34
42
|
this.id = `accordion-${Math.random().toString(36)
|
|
35
43
|
.substr(2, 9)}`;
|
|
36
44
|
}
|
|
@@ -59,7 +67,7 @@ class BdAccordionBgItem extends LitElement {
|
|
|
59
67
|
render() {
|
|
60
68
|
return html`
|
|
61
69
|
<div
|
|
62
|
-
class="bd-accordion-bg-item ${this.open ? "open" : ""}"
|
|
70
|
+
class="bd-accordion-bg-item ${this.open ? "open" : ""} ${this.noBg ? 'no-bg' : ''}"
|
|
63
71
|
role="button"
|
|
64
72
|
aria-expanded="${this.open}"
|
|
65
73
|
aria-controls="${this.id}"
|
|
@@ -68,7 +76,7 @@ class BdAccordionBgItem extends LitElement {
|
|
|
68
76
|
@keydown=${this.handleKeyDown}
|
|
69
77
|
>
|
|
70
78
|
<div class="bd-accordion-bg-question">
|
|
71
|
-
<
|
|
79
|
+
<div class="bd-accordion-bg-icon"></div>
|
|
72
80
|
<span class="bd-accordion-bg-question-text">${this.title}</span>
|
|
73
81
|
</div>
|
|
74
82
|
<div
|