@repobit/dex-system-design 0.2.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 +11 -0
- package/README.md +15 -0
- package/package.json +57 -0
- package/src/assets/fonts/IBMPlexMono-Bold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Italic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Light.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-LightItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Medium.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-Regular.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-SemiBold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexMono-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Bold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-BoldItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Italic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Light.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-LightItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Medium.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-MediumItalic.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-Regular.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-SemiBold.woff2 +0 -0
- package/src/assets/fonts/IBMPlexSans-SemiBoldItalic.woff2 +0 -0
- package/src/assets/fonts/bd-ibm-plex-mono.zip +0 -0
- package/src/assets/fonts/bd-ibm-plex-sans.zip +0 -0
- package/src/assets/icons/badge-icon-individual.png +0 -0
- package/src/assets/icons/bd-icon-family-white.png +0 -0
- package/src/assets/icons/bd-icon-family.png +0 -0
- package/src/assets/icons/bd-icon-user.png +0 -0
- package/src/assets/icons/left_clicked.png +0 -0
- package/src/assets/icons/left_disabled.png +0 -0
- package/src/assets/icons/left_hover.png +0 -0
- package/src/assets/icons/left_normal.png +0 -0
- package/src/assets/icons/light-carousel-img1.png +0 -0
- package/src/assets/icons/light-carousel-img2.png +0 -0
- package/src/assets/icons/light-carousel-img3.png +0 -0
- package/src/assets/icons/more_hover.png +0 -0
- package/src/assets/icons/more_normal.png +0 -0
- package/src/assets/icons/more_pressed.png +0 -0
- package/src/assets/icons/pic1.png +0 -0
- package/src/assets/icons/pic2.png +0 -0
- package/src/assets/icons/pic3.png +0 -0
- package/src/assets/icons/right_clicked.png +0 -0
- package/src/assets/icons/right_disabled.png +0 -0
- package/src/assets/icons/right_hover.png +0 -0
- package/src/assets/icons/right_normal.png +0 -0
- package/src/assets/icons/tabs-img1.png +0 -0
- package/src/assets/icons/tabs-img2.png +0 -0
- package/src/assets/icons/tabs-img3.png +0 -0
- package/src/assets/icons/verified_arrow.png +0 -0
- package/src/components/Button/Button.js +120 -0
- package/src/components/Button/button.css.js +137 -0
- package/src/components/Button/button.stories.js +56 -0
- package/src/components/Button/icons.css +5 -0
- package/src/components/Button/icons.js +24 -0
- package/src/components/Button/index.js +0 -0
- package/src/components/FAQ/faq.css.js +107 -0
- package/src/components/FAQ/faq.js +176 -0
- package/src/components/FAQ/faq.stories.js +45 -0
- package/src/components/Input/Input.js +27 -0
- package/src/components/Input/index.js +0 -0
- package/src/components/Input/input.css.js +68 -0
- package/src/components/carousel/carousel.css.js +304 -0
- package/src/components/carousel/carousel.js +226 -0
- package/src/components/carousel/carousel.stories.js +73 -0
- package/src/components/light-carousel/light-carousel.css.js +149 -0
- package/src/components/light-carousel/light-carousel.js +108 -0
- package/src/components/light-carousel/light-carousel.stories.js +43 -0
- package/src/components/paragraph/paragraph.css.js +16 -0
- package/src/components/paragraph/paragraph.js +59 -0
- package/src/components/pricing-cards/pricing-card.css.js +409 -0
- package/src/components/pricing-cards/pricing-card.js +764 -0
- package/src/components/pricing-cards/pricing-card.stories.js +12 -0
- package/src/components/tabs/tabs.css.js +239 -0
- package/src/components/tabs/tabs.js +183 -0
- package/src/components/tabs/tabs.stories.js +18 -0
- package/src/components/termsOfUse/terms.css.js +38 -0
- package/src/components/termsOfUse/terms.js +226 -0
- package/src/components/termsOfUse/terms.stories.js +14 -0
- package/src/index.js +0 -0
- package/src/stories/Button.js +20 -0
- package/src/stories/Button.stories.js +46 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.js +45 -0
- package/src/stories/Header.stories.js +24 -0
- package/src/stories/Page.js +62 -0
- package/src/stories/Page.stories.js +20 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
- package/src/tokens/colors.js +121 -0
- package/src/tokens/layout.css +46 -0
- package/src/tokens/tokens.css +297 -0
- package/src/tokens/typography.css.js +207 -0
- package/src/tokens/typography.js +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## 0.2.0 (2025-06-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **DEX-23636:** add initial commit for design system package ([504de7e](https://github.com/bitdefender/dex-core/commit/504de7ee97af52ea8b7a0c14d91a58e5060b0df5))
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# `@repobit/dex-design-system`
|
|
2
|
+
|
|
3
|
+
# Target Integration SDK Documentation
|
|
4
|
+
|
|
5
|
+
Dex design system shenanigans
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
The Target Integration SDK is designed to simplify the integration process with Adobe Target and the Adobe Data Layer. It provides a centralized solution for managing visitor identity operations, sending events, appending visitor IDs to URLs, retrieving mbox offers, and fetching Customer Data Platform (CDP) data. The SDK encapsulates these operations within a single abstract class, ensuring that targeting functionalities are cleanly organized and maintainable in your application.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Key Features
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@repobit/dex-system-design",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Client for pricing API",
|
|
5
|
+
"author": "Iordache Matei Cezar <miordache@bitdefender.com>",
|
|
6
|
+
"homepage": "https://github.com/bitdefender/dex-core#readme",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"directories": {
|
|
10
|
+
"src": "src"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"src",
|
|
14
|
+
"README.md",
|
|
15
|
+
"CHANGELOG.md",
|
|
16
|
+
"LICENSE"
|
|
17
|
+
],
|
|
18
|
+
"exports": {
|
|
19
|
+
"./button": "./src/components/Button/Button.js"
|
|
20
|
+
},
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/bitdefender/dex-core.git"
|
|
27
|
+
},
|
|
28
|
+
"scripts": {
|
|
29
|
+
"build": "",
|
|
30
|
+
"start": "vite",
|
|
31
|
+
"dev": "vite",
|
|
32
|
+
"storybook": "storybook dev -p 6006",
|
|
33
|
+
"build-storybook": "storybook build"
|
|
34
|
+
},
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/bitdefender/dex-core/issues"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"lit": "^3.2.1",
|
|
40
|
+
"lit-query": "^0.0.1"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@chromatic-com/storybook": "^3.2.5",
|
|
44
|
+
"@storybook/addon-essentials": "^8.6.4",
|
|
45
|
+
"@storybook/blocks": "^8.6.4",
|
|
46
|
+
"@storybook/experimental-addon-test": "^8.6.4",
|
|
47
|
+
"@storybook/test": "^8.6.4",
|
|
48
|
+
"@storybook/web-components": "^8.6.4",
|
|
49
|
+
"@storybook/web-components-vite": "^8.6.4",
|
|
50
|
+
"storybook": "^8.6.4",
|
|
51
|
+
"vite": "^5.4.11"
|
|
52
|
+
},
|
|
53
|
+
"volta": {
|
|
54
|
+
"node": "22.14.0"
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "be350153db8faacf8c12aec58fdbc87cb7439d01"
|
|
57
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import "./icons.js";
|
|
3
|
+
import buttonsCSS from "../button/button.css.js";
|
|
4
|
+
|
|
5
|
+
class Button extends LitElement {
|
|
6
|
+
static properties = {
|
|
7
|
+
label: { type: String },
|
|
8
|
+
href: { type: String },
|
|
9
|
+
size: { type: String },
|
|
10
|
+
customClass: { type: String },
|
|
11
|
+
kind: { type: String },
|
|
12
|
+
fullWidth: { type: Boolean },
|
|
13
|
+
strong: { type: Boolean },
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @private -> for private properties we are using "_text" */
|
|
17
|
+
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.label = "Buy now";
|
|
21
|
+
this.href = "";
|
|
22
|
+
this.size = "md";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get sizeClass() {
|
|
26
|
+
switch (this.size) {
|
|
27
|
+
case "lg":
|
|
28
|
+
return "button--large";
|
|
29
|
+
case "md":
|
|
30
|
+
return "button--medium";
|
|
31
|
+
case "sm":
|
|
32
|
+
return "button--small";
|
|
33
|
+
default:
|
|
34
|
+
return "";
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
get kindClass() {
|
|
39
|
+
switch (this.kind) {
|
|
40
|
+
case "primary-outline":
|
|
41
|
+
return "button--primary--outline";
|
|
42
|
+
case "outline":
|
|
43
|
+
return "button--outline";
|
|
44
|
+
case "secondary":
|
|
45
|
+
return "button--secondary";
|
|
46
|
+
case "primary":
|
|
47
|
+
return "button--primary";
|
|
48
|
+
case "danger":
|
|
49
|
+
return "button--danger";
|
|
50
|
+
default:
|
|
51
|
+
return "";
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
get fullWidthClass() {
|
|
55
|
+
return this.fullWidth ? "max--width" : "";
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
get strongClass() {
|
|
59
|
+
return this.strong ? "button--bold" : "";
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
render() {
|
|
63
|
+
return html`
|
|
64
|
+
<a class="href-button" href="${this.href}" aria-label="${this.label}">
|
|
65
|
+
<button
|
|
66
|
+
@click=${this._handleClick}
|
|
67
|
+
class="button ${this.kindClass} ${this.sizeClass} ${this
|
|
68
|
+
.fullWidthClass} ${this.strongClass}"
|
|
69
|
+
aria-label="${this.label}"
|
|
70
|
+
>
|
|
71
|
+
<slot></slot>
|
|
72
|
+
</button>
|
|
73
|
+
</a>
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
_handleClick() {
|
|
78
|
+
console.log("Button clicked!");
|
|
79
|
+
this.dispatchEvent(new Event("custom-click"));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
class ContactButton extends LitElement {
|
|
84
|
+
static properties = {
|
|
85
|
+
label: { type: String },
|
|
86
|
+
href: { type: String },
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
constructor() {
|
|
90
|
+
super();
|
|
91
|
+
this.label = "Contact us";
|
|
92
|
+
this.href = "https://www.google.com";
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
render() {
|
|
96
|
+
return html`
|
|
97
|
+
<a class="href-button" href="${this.href}" aria-label="${this.label}">
|
|
98
|
+
<button
|
|
99
|
+
class="bd-contact-btn"
|
|
100
|
+
@click=${this._handleClick}
|
|
101
|
+
aria-label="${this.label}"
|
|
102
|
+
>
|
|
103
|
+
${this.label}
|
|
104
|
+
<arrow-icon></arrow-icon>
|
|
105
|
+
</button>
|
|
106
|
+
</a>
|
|
107
|
+
`;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
_handleClick() {
|
|
111
|
+
console.log("Contact button clicked!");
|
|
112
|
+
this.dispatchEvent(new Event("custom-click"));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
Button.styles = [buttonsCSS];
|
|
117
|
+
ContactButton.styles = [buttonsCSS];
|
|
118
|
+
|
|
119
|
+
customElements.define("bd-button", Button);
|
|
120
|
+
customElements.define("bd-contact-button", ContactButton);
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
export default css`
|
|
4
|
+
:host {
|
|
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);
|
|
8
|
+
|
|
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);
|
|
12
|
+
|
|
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);
|
|
16
|
+
|
|
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);
|
|
22
|
+
|
|
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
|
+
}
|
|
29
|
+
|
|
30
|
+
.href-button {
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
}
|
|
33
|
+
.button {
|
|
34
|
+
color: white;
|
|
35
|
+
border: none;
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
transition: background-color 0.3s ease, transform 0.2s ease,
|
|
38
|
+
box-shadow 0.2s ease;
|
|
39
|
+
gap: 10px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.button--primary {
|
|
43
|
+
background-color: var(--button-background-primary);
|
|
44
|
+
color: white;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.button--primary:hover {
|
|
48
|
+
background-color: var(--button-background-primary-hover);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.button--primary:focus {
|
|
52
|
+
background-color: var(--button-background-primary-focus);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button--secondary {
|
|
56
|
+
background-color: var(--button-background-secondary);
|
|
57
|
+
color: white;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.button--secondary:hover {
|
|
61
|
+
background-color: var(--button-background-secondary-hover);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.button--secondary:focus {
|
|
65
|
+
background-color: var(--button-background-secondary-focus);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.button--danger {
|
|
69
|
+
background-color: var(--button-background-danger);
|
|
70
|
+
color: white;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.button--danger:hover {
|
|
74
|
+
background-color: var(--button-background-danger-hover);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.button--danger:focus {
|
|
78
|
+
background-color: var(--button-background-danger-focus);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.button--outline {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
border: 2px solid var(--border-button-background-outline);
|
|
84
|
+
color: var(--color-button-background-outline);
|
|
85
|
+
}
|
|
86
|
+
.button--outline:hover {
|
|
87
|
+
background-color: var(--button-background-outline-hover);
|
|
88
|
+
border: 2px solid var(--border-button-background-outline-hover);
|
|
89
|
+
}
|
|
90
|
+
.button--outline:focus {
|
|
91
|
+
background-color: var(--button-background-outline-focus);
|
|
92
|
+
color: white;
|
|
93
|
+
}
|
|
94
|
+
.button--primary--outline {
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
border: 2px solid var(--border-button-background-primary-outline);
|
|
97
|
+
color: var(--color-button-background-primary-outline);
|
|
98
|
+
}
|
|
99
|
+
.button--primary--outline:hover {
|
|
100
|
+
background-color: var(--button-background-primary-outline-hover);
|
|
101
|
+
border: 2px solid var(--border-button-background-primary-outline-hover);
|
|
102
|
+
}
|
|
103
|
+
.button--primary--outline:focus {
|
|
104
|
+
background-color: var(--button-background-primary-outline-focus);
|
|
105
|
+
color: white;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.button--small {
|
|
109
|
+
padding: var(--size-8) var(--size-16);
|
|
110
|
+
font-size: var(--size-14);
|
|
111
|
+
font-weight: 400;
|
|
112
|
+
font-family: var(--font-family-sans);
|
|
113
|
+
border-radius: 6px;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.button--medium {
|
|
117
|
+
padding: var(--size-12) var(--size-20);
|
|
118
|
+
font-size: var(--size-16);
|
|
119
|
+
font-weight: 400;
|
|
120
|
+
font-family: var(--font-family-sans);
|
|
121
|
+
border-radius: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.button--large {
|
|
125
|
+
padding: var(--size-16) var(--size-24);
|
|
126
|
+
font-size: var(--size-18);
|
|
127
|
+
font-weight: 400;
|
|
128
|
+
font-family: var(--font-family-sans);
|
|
129
|
+
border-radius: 8px;
|
|
130
|
+
}
|
|
131
|
+
.button--bold {
|
|
132
|
+
font-weight: 600;
|
|
133
|
+
}
|
|
134
|
+
.max--width {
|
|
135
|
+
width: 100%;
|
|
136
|
+
}
|
|
137
|
+
`;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import "./Button.js";
|
|
2
|
+
import { html } from "lit";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Button",
|
|
6
|
+
component: "bd-button",
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
argTypes: {
|
|
9
|
+
label: { control: "text" },
|
|
10
|
+
href: { control: "text" },
|
|
11
|
+
size: {
|
|
12
|
+
control: { type: "select" },
|
|
13
|
+
options: ["sm", "md", "lg"],
|
|
14
|
+
},
|
|
15
|
+
kind: {
|
|
16
|
+
control: { type: "select" },
|
|
17
|
+
options: ["primary", "secondary", "outline", "primary-outline", "danger"],
|
|
18
|
+
},
|
|
19
|
+
fullWidth: { control: "boolean" },
|
|
20
|
+
strong: { control: "boolean" },
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const Template = (args) => {
|
|
25
|
+
const { label, href, size, kind, fullWidth, strong } = args;
|
|
26
|
+
return `
|
|
27
|
+
<bd-button
|
|
28
|
+
label="${label}"
|
|
29
|
+
href="${href}"
|
|
30
|
+
size="${size}"
|
|
31
|
+
kind="${kind}"
|
|
32
|
+
${fullWidth ? "fullWidth" : ""}
|
|
33
|
+
${strong ? "strong" : ""}>Buy Now
|
|
34
|
+
</bd-button>
|
|
35
|
+
`;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const Primary = Template.bind({});
|
|
39
|
+
Primary.args = {
|
|
40
|
+
label: "Buy Now",
|
|
41
|
+
href: "#",
|
|
42
|
+
size: "md",
|
|
43
|
+
kind: "primary",
|
|
44
|
+
fullWidth: false,
|
|
45
|
+
strong: false,
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const FullWidthPrimary = Template.bind({});
|
|
49
|
+
FullWidthPrimary.args = {
|
|
50
|
+
label: "Get Started",
|
|
51
|
+
href: "#",
|
|
52
|
+
size: "lg",
|
|
53
|
+
kind: "primary",
|
|
54
|
+
fullWidth: true,
|
|
55
|
+
strong: true,
|
|
56
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ArrowIconComponent extends LitElement {
|
|
5
|
+
|
|
6
|
+
static styles = css`
|
|
7
|
+
.arrow-icon {
|
|
8
|
+
height: 10px;
|
|
9
|
+
font-weight: 600;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
render() {
|
|
13
|
+
return html`
|
|
14
|
+
<svg class="arrow-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 404.39">
|
|
15
|
+
<path
|
|
16
|
+
fill-rule="nonzero"
|
|
17
|
+
d="M438.95 219.45 0 219.99v-34.98l443.3-.55L269.8 25.79 293.39 0 512 199.92 288.88 404.39l-23.59-25.8z"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
`;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
customElements.define('arrow-icon', ArrowIconComponent);
|
|
File without changes
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { css } from "../../../node_modules/lit-element/lit-element";
|
|
2
|
+
|
|
3
|
+
export default css`
|
|
4
|
+
:host {
|
|
5
|
+
--background-card-grey: var(--color-neutral-25);
|
|
6
|
+
--border-card-grey: var(--color-neutral-50);
|
|
7
|
+
--border-card-green: var(--color-green-700);
|
|
8
|
+
--badge-background: var(--color-blue-500);
|
|
9
|
+
--text-color-white: var(--color-neutral-0);
|
|
10
|
+
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bd-faq-item {
|
|
15
|
+
margin-bottom: var(--size-10);
|
|
16
|
+
border-radius: var(--size-8);
|
|
17
|
+
background-color: var(--color-blue-50);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
transition: box-shadow 0.3s ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bd-faq-item:hover {
|
|
23
|
+
.bd-question-text {
|
|
24
|
+
text-decoration-line: underline;
|
|
25
|
+
text-decoration-style: solid;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.bd-question {
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
display: flex;
|
|
32
|
+
justify-content: flex-start;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: var(--size-10);
|
|
35
|
+
padding: 15px;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
background-color: #f2f6fc;
|
|
38
|
+
color: #333;
|
|
39
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.bd-header-section-faq {
|
|
43
|
+
margin-bottom: 50px;
|
|
44
|
+
margin-top: 50px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.bd-question:hover {
|
|
48
|
+
color: #0073e6;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bd-faq-item:focus {
|
|
52
|
+
.bd-question-text {
|
|
53
|
+
font-weight: 600;
|
|
54
|
+
text-decoration-line: underline;
|
|
55
|
+
text-decoration-style: solid;
|
|
56
|
+
color: var(--color-blue-600);
|
|
57
|
+
text-decoration-thickness: var(--size-2);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.bd-question-text {
|
|
62
|
+
font-family: var(--font-family-sans);
|
|
63
|
+
font-weight: var(--font-weight-sans-semibold);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bd-section-title {
|
|
67
|
+
font-family: var(--font-family-sans);
|
|
68
|
+
font-weight: var(--font-weight-sans-semibold);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.bd-icon {
|
|
72
|
+
transition: transform 0.3s ease;
|
|
73
|
+
width: var(--size-14);
|
|
74
|
+
height: var(--size-14);
|
|
75
|
+
color: var(--color-blue-500);
|
|
76
|
+
text-align: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
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
|
+
}
|
|
89
|
+
|
|
90
|
+
.bd-answer > div {
|
|
91
|
+
overflow: hidden;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.bd-faq-item.open .bd-answer {
|
|
95
|
+
grid-template-rows: 1fr;
|
|
96
|
+
padding: var(--size-0) var(--size-40);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.bd-faq-container {
|
|
100
|
+
width: 90%;
|
|
101
|
+
margin: auto;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.bd-link-noline {
|
|
105
|
+
text-decoration: none;
|
|
106
|
+
}
|
|
107
|
+
`;
|