@repobit/dex-system-design 0.5.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/package.json +4 -3
  3. package/src/assets/images/bd-header-img.jpg +0 -0
  4. package/src/assets/images/bd-header-us.jpg +0 -0
  5. package/src/components/Button/Button.js +115 -3
  6. package/src/components/Button/button.css.js +80 -43
  7. package/src/components/Button/button.stories.js +83 -7
  8. package/src/components/FAQ/faq.css.js +27 -16
  9. package/src/components/FAQ/faq.js +23 -114
  10. package/src/components/FAQ/faq.stories.js +41 -20
  11. package/src/components/Input/Input.js +2 -2
  12. package/src/components/Input/input.css.js +1 -1
  13. package/src/components/anchor/anchor-nav.css.js +92 -0
  14. package/src/components/anchor/anchor-nav.js +121 -0
  15. package/src/components/anchor/anchor.stories.js +134 -0
  16. package/src/components/badge/badge.css.js +27 -0
  17. package/src/components/badge/badge.js +30 -0
  18. package/src/components/badge/badge.stories.js +36 -0
  19. package/src/components/carousel/carousel.css.js +36 -19
  20. package/src/components/carousel/carousel.js +149 -99
  21. package/src/components/carousel/carousel.stories.js +202 -46
  22. package/src/components/checkbox/checkbox.css.js +132 -0
  23. package/src/components/checkbox/checkbox.js +130 -0
  24. package/src/components/checkbox/checkbox.stories.js +63 -0
  25. package/src/components/divider/divider-horizontal.js +29 -0
  26. package/src/components/divider/divider-vertical.js +32 -0
  27. package/src/components/divider/divider.css.js +0 -0
  28. package/src/components/divider/divider.stories.js +77 -0
  29. package/src/components/header/header.css.js +248 -0
  30. package/src/components/header/header.js +87 -0
  31. package/src/components/header/header.stories.js +57 -0
  32. package/src/components/highlight/highlight-s.css.js +88 -0
  33. package/src/components/highlight/highlight-s.js +35 -0
  34. package/src/components/highlight/highlight-s.stories.js +22 -0
  35. package/src/components/highlight/highlight.css.js +119 -0
  36. package/src/components/highlight/highlight.js +60 -0
  37. package/src/components/highlight/highlight.stories.js +53 -0
  38. package/src/components/light-carousel/light-carousel.css.js +18 -10
  39. package/src/components/light-carousel/light-carousel.js +29 -16
  40. package/src/components/light-carousel/light-carousel.stories.js +9 -7
  41. package/src/components/paragraph/paragraph.css.js +1 -1
  42. package/src/components/pricing-cards/pricing-card.css.js +138 -3
  43. package/src/components/pricing-cards/pricing-card.js +63 -82
  44. package/src/components/pricing-cards/pricing-card.stories.js +1 -0
  45. package/src/components/radio/radio.css.js +168 -0
  46. package/src/components/radio/radio.js +222 -0
  47. package/src/components/radio/radio.stories.js +103 -0
  48. package/src/components/tabs/tabs.css.js +26 -8
  49. package/src/components/tabs/tabs.js +19 -12
  50. package/src/components/termsOfUse/terms.css.js +7 -1
  51. package/src/tokens/fonts.stories.js +73 -0
  52. package/src/tokens/spacing.stories.js +56 -0
  53. package/src/tokens/tokens-grid.stories.js +83 -0
  54. package/src/tokens/tokens.css +116 -1
  55. package/src/tokens/tokens.stories.js +67 -0
  56. package/src/tokens/typography.stories.js +69 -0
  57. package/src/tokens/tokens.js +0 -206
  58. /package/src/assets/{icons → images}/tabs-img1.png +0 -0
  59. /package/src/assets/{icons → images}/tabs-img2.png +0 -0
  60. /package/src/assets/{icons → images}/tabs-img3.png +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,15 @@
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
+
6
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)
7
16
 
8
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repobit/dex-system-design",
3
- "version": "0.5.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": "87d473fc4b0d18e8b3526ffb88d0c2c8f88a1eda"
57
+ "gitHead": "70accd8e5e61d8344dd833fe6d5f343f973e2ce8"
57
58
  }
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from "lit";
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,35 +1,58 @@
1
- import { css, unsafeCSS } from 'lit';
2
- import { tokens } from '../../tokens/tokens.js';
1
+ import { css } from "lit";
3
2
 
4
3
  export default css`
5
4
  :host {
6
- --button-background-primary: ${unsafeCSS(tokens.colors.blue[500])};
7
- --button-background-primary-hover: ${unsafeCSS(tokens.colors.blue[600])};
8
- --button-background-primary-focus: ${unsafeCSS(tokens.colors.blue[700])};
5
+ --button-background-primary: var(--color-blue-500);
6
+ --button-background-primary-hover: var(--color-blue-600);
7
+ --button-background-primary-focus: var(--color-blue-700);
9
8
 
10
- --button-background-secondary: ${unsafeCSS(tokens.colors.neutral[950])};
11
- --button-background-secondary-hover: ${unsafeCSS(tokens.colors.neutral[900])};
12
- --button-background-secondary-focus: ${unsafeCSS(tokens.colors.neutral[800])};
9
+ --button-background-secondary: var(--color-neutral-950);
10
+ --button-background-secondary-hover: var(--color-neutral-900);
11
+ --button-background-secondary-focus: var(--color-neutral-800);
13
12
 
14
- --button-background-danger: ${unsafeCSS(tokens.colors.red[600])};
15
- --button-background-danger-hover: ${unsafeCSS(tokens.colors.red[700])};
16
- --button-background-danger-focus: ${unsafeCSS(tokens.colors.red[800])};
13
+ --button-background-danger: var(--color-red-600);
14
+ --button-background-danger-hover: var(--color-red-700);
15
+ --button-background-danger-focus: var(--color-red-800);
17
16
 
18
- --color-button-background-outline: ${unsafeCSS(tokens.colors.neutral[950])};
19
- --border-button-background-outline: ${unsafeCSS(tokens.colors.neutral[950])};
20
- --button-background-outline-hover: ${unsafeCSS(tokens.colors.neutral[50])};
21
- --border-button-background-outline-hover: ${unsafeCSS(tokens.colors.neutral[950])};
22
- --button-background-outline-focus: ${unsafeCSS(tokens.colors.neutral[800])};
17
+ --color-button-background-outline: var(--color-neutral-950);
18
+ --border-button-background-outline: var(--color-neutral-950);
19
+ --button-background-outline-hover: var(--color-neutral-50);
20
+ --border-button-background-outline-hover: var(--color-neutral-950);
21
+ --button-background-outline-focus: var(--color-neutral-800);
23
22
 
24
- --color-button-background-primary-outline: ${unsafeCSS(tokens.colors.blue[500])};
25
- --border-button-background-primary-outline: ${unsafeCSS(tokens.colors.blue[500])};
26
- --button-background-primary-outline-hover: ${unsafeCSS(tokens.colors.blue[50])};
27
- --border-button-background-primary-outline-hover: ${unsafeCSS(tokens.colors.blue[500])};
28
- --button-background-primary-outline-focus: ${unsafeCSS(tokens.colors.blue[500])};
23
+ --color-button-background-primary-outline: var(--color-blue-500);
24
+ --border-button-background-primary-outline: var(--color-blue-500);
25
+ --button-background-primary-outline-hover: var(--color-blue-50);
26
+ --border-button-background-primary-outline-hover: var(--color-blue-500);
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);
29
49
  }
30
50
 
31
51
  .href-button {
32
52
  text-decoration: none;
53
+ display: inline-flex;
54
+ vertical-align: middle;
55
+ width: 100%;
33
56
  }
34
57
  .button {
35
58
  color: white;
@@ -38,6 +61,9 @@ export default css`
38
61
  transition: background-color 0.3s ease, transform 0.2s ease,
39
62
  box-shadow 0.2s ease;
40
63
  gap: 10px;
64
+ vertical-align: middle;
65
+ line-height: 1;
66
+ box-sizing: border-box;
41
67
  }
42
68
 
43
69
  .button--primary {
@@ -49,7 +75,7 @@ export default css`
49
75
  background-color: var(--button-background-primary-hover);
50
76
  }
51
77
 
52
- .button--primary:focus {
78
+ .button--primary:active {
53
79
  background-color: var(--button-background-primary-focus);
54
80
  }
55
81
 
@@ -62,7 +88,7 @@ export default css`
62
88
  background-color: var(--button-background-secondary-hover);
63
89
  }
64
90
 
65
- .button--secondary:focus {
91
+ .button--secondary:active {
66
92
  background-color: var(--button-background-secondary-focus);
67
93
  }
68
94
 
@@ -74,11 +100,12 @@ export default css`
74
100
  .button--danger:hover {
75
101
  background-color: var(--button-background-danger-hover);
76
102
  }
77
-
78
- .button--danger:focus {
79
- background-color: var(--button-background-danger-focus);
80
- }
81
-
103
+
104
+ .button--danger.active,
105
+ .button--danger:active {
106
+ background-color: var(--button-background-danger-focus);
107
+ }
108
+
82
109
  .button--outline {
83
110
  background-color: transparent;
84
111
  border: 2px solid var(--border-button-background-outline);
@@ -88,7 +115,7 @@ export default css`
88
115
  background-color: var(--button-background-outline-hover);
89
116
  border: 2px solid var(--border-button-background-outline-hover);
90
117
  }
91
- .button--outline:focus {
118
+ .button--outline:active {
92
119
  background-color: var(--button-background-outline-focus);
93
120
  color: white;
94
121
  }
@@ -101,38 +128,48 @@ export default css`
101
128
  background-color: var(--button-background-primary-outline-hover);
102
129
  border: 2px solid var(--border-button-background-primary-outline-hover);
103
130
  }
104
- .button--primary--outline:focus {
131
+ .button--primary--outline:active {
105
132
  background-color: var(--button-background-primary-outline-focus);
106
133
  color: white;
107
134
  }
108
135
 
109
136
  .button--small {
110
- padding: ${unsafeCSS(tokens.spacing[8])} ${unsafeCSS(tokens.spacing[16])};
111
- font-size: ${unsafeCSS(tokens.fontSize.body.medium)};
112
- font-weight: ${unsafeCSS(tokens.fonts.sans.weights.regular)};
113
- font-family: ${unsafeCSS(tokens.fonts.sans.family)};
137
+ padding: var(--size-8) var(--size-16);
138
+ font-size: var(--size-14);
139
+ font-weight: 400;
140
+ font-family: var(--font-family-sans);
114
141
  border-radius: 6px;
142
+ min-height: 34px;
143
+ min-width: 115px;
115
144
  }
116
145
 
117
146
  .button--medium {
118
- padding: ${unsafeCSS(tokens.spacing[12])} ${unsafeCSS(tokens.spacing[20])};
119
- font-size: ${unsafeCSS(tokens.fontSize.body.large)};
120
- font-weight: ${unsafeCSS(tokens.fonts.sans.weights.regular)};
121
- font-family: ${unsafeCSS(tokens.fonts.sans.family)};
147
+ padding: var(--size-12) var(--size-20);
148
+ font-size: var(--size-16);
149
+ font-weight: 400;
150
+ font-family: var(--font-family-sans);
122
151
  border-radius: 8px;
152
+ min-height: 45px;
153
+ min-width: 150px;
123
154
  }
124
155
 
125
156
  .button--large {
126
- padding: ${unsafeCSS(tokens.spacing[16])} ${unsafeCSS(tokens.spacing[24])};
127
- font-size: ${unsafeCSS(tokens.fontSize.body.xlarge)};
128
- font-weight: ${unsafeCSS(tokens.fonts.sans.weights.regular)};
129
- font-family: ${unsafeCSS(tokens.fonts.sans.family)};
157
+ padding: var(--size-16) var(--size-24);
158
+ font-size: var(--size-18);
159
+ font-weight: 400;
160
+ font-family: var(--font-family-sans);
130
161
  border-radius: 8px;
162
+ min-height: 55px;
163
+ min-width: 150px;
131
164
  }
132
165
  .button--bold {
133
- font-weight: ${unsafeCSS(tokens.fonts.sans.weights.semibold)};
166
+ font-weight: 600;
134
167
  }
135
168
  .max--width {
136
169
  width: 100%;
170
+ display: block;
171
+ }
172
+ .button.max--width {
173
+ width: 100%;
137
174
  }
138
175
  `;
@@ -2,7 +2,7 @@ import "./Button.js";
2
2
  import { html } from "lit";
3
3
 
4
4
  export default {
5
- title: "Components/Button",
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 ? "fullWidth" : ""}
33
- ${strong ? "strong" : ""}>Buy Now
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 FullWidthPrimary = Template.bind({});
49
- FullWidthPrimary.args = {
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: #f2f6fc;
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
- .bd-answer {
80
- display: grid;
81
- grid-template-rows: 0fr;
82
- transition: grid-template-rows 0.4s ease, padding 0.4s ease;
83
- overflow: hidden;
84
- padding: var(--size-0) 15px;
85
- background-color: var(--color-blue-50);
86
- font-family: var(--font-family-sans);
87
- font-weight: var(--font-weight-sans-medium);
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
- .bd-faq-item.open .bd-answer {
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%;