@repobit/dex-system-design 0.10.0 → 0.12.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 +34 -0
- package/package.json +2 -2
- package/src/assets/icons/Identity_protection.png +0 -0
- package/src/assets/icons/arrow_down.png +0 -0
- package/src/assets/icons/arrow_up.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 +271 -0
- package/src/tokens/colors.js +10 -10
- package/src/tokens/fonts.css +166 -0
- package/src/tokens/fonts.stories.js +5 -5
- package/src/tokens/layout.css +4 -3
- package/src/tokens/new-tokens.css +698 -0
- package/src/tokens/spacing.stories.js +1 -1
- package/src/tokens/tokens.css +1063 -0
- package/src/tokens/tokens.js +0 -133
- package/src/tokens/tokens.stories.js +3 -3
- package/src/tokens/typography.css.js +0 -4
- package/src/tokens/typography.stories.js +2 -2
- package/src/components/Input/index.js +0 -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
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
|
|
3
|
+
// Importăm componentele, ca să se înregistreze
|
|
4
|
+
import '../../components/dropdown/dropdown.js';
|
|
5
|
+
import '../../components/input/input-clipboard.js';
|
|
6
|
+
import '../../components/input/input.js';
|
|
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
|
+
`;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export default css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 90%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.input-container {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
label {
|
|
15
|
+
margin-bottom: 4px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: var(--color-neutral-900);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.form-label__required {
|
|
21
|
+
color: var(--color-red-500);
|
|
22
|
+
margin-left: var(--spacing-4);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.label-sm {
|
|
26
|
+
font-size: var(--typography-fontSize-xs);
|
|
27
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
28
|
+
line-height: var(--typography-lineHeight-normal);
|
|
29
|
+
letter-spacing: var(--typography-letterSpacing-wide);
|
|
30
|
+
margin-bottom: var(--spacing-4);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.label-md {
|
|
34
|
+
font-size: var(--typography-fontSize-sm);
|
|
35
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
36
|
+
line-height: var(--typography-lineHeight-normal);
|
|
37
|
+
margin-bottom: var(--spacing-4);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.label-lg {
|
|
41
|
+
font-size: var(--typography-fontSize-lg);
|
|
42
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
43
|
+
line-height: var(--typography-lineHeight-normal);
|
|
44
|
+
margin-bottom: var(--spacing-8);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.form-input-bd {
|
|
48
|
+
width: 100%;
|
|
49
|
+
border: var(--border-width-1, 1px) solid var(--color-neutral-300);
|
|
50
|
+
font-family: var(--typography-fontFamily-sans, sans-serif);
|
|
51
|
+
line-height: var(--typography-lineHeight-normal, 1.5);
|
|
52
|
+
transition: border-color 0.3s ease, background-color 0.3s ease,
|
|
53
|
+
box-shadow 0.3s ease;
|
|
54
|
+
background-color: var(--color-neutral-0);
|
|
55
|
+
color: var(--color-neutral-900);
|
|
56
|
+
outline: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
input:focus {
|
|
60
|
+
border-color: var(--color-blue-500);
|
|
61
|
+
box-shadow: var(--focus-outline-primary, 0 0 0 2px rgba(0, 109, 255, 0.3));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.input-sm {
|
|
65
|
+
padding: var(--spacing-8) var(--spacing-12);
|
|
66
|
+
font-size: var(--typography-fontSize-sm);
|
|
67
|
+
height: var(--dimension-34px);
|
|
68
|
+
border-radius: var(--form-input-medium-borderRadius);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.input-md {
|
|
72
|
+
padding: var(--spacing-12) var(--spacing-16);
|
|
73
|
+
font-size: var(--typography-fontSize-base);
|
|
74
|
+
height: var(--dimension-45px);
|
|
75
|
+
border-radius: var(--form-input-large-borderRadius);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.input-lg {
|
|
79
|
+
padding: var(--spacing-16) var(--spacing-20);
|
|
80
|
+
font-size: var(--typography-fontSize-lg);
|
|
81
|
+
height: var(--dimension-55px);
|
|
82
|
+
border-radius: var(--form-input-large-borderRadius);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
::placeholder {
|
|
86
|
+
color: var(--color-neutral-500);
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.form-label {
|
|
91
|
+
display: block;
|
|
92
|
+
font-family: var(--typography-fontFamily-sans);
|
|
93
|
+
color: var(--color-neutral-900);
|
|
94
|
+
letter-spacing: var(--typography-letterSpacing-normal);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.form-input-bd:focus,
|
|
98
|
+
.form-input-bd.focused {
|
|
99
|
+
border-color: var(--color-blue-500);
|
|
100
|
+
box-shadow: var(--focus-outline-primary, 0 0 0 2px rgba(0, 109, 255, 0.3));
|
|
101
|
+
background: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.form-help-text {
|
|
105
|
+
font-size: var(--typography-fontSize-xs);
|
|
106
|
+
font-weight: var(--typography-fontWeight-normal);
|
|
107
|
+
line-height: var(--typography-lineHeight-normal);
|
|
108
|
+
letter-spacing: var(--typography-letterSpacing-normal);
|
|
109
|
+
font-family: var(--typography-fontFamily-sans);
|
|
110
|
+
margin-top: var(--spacing-4);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.form-help-text--default {
|
|
114
|
+
color: var(--color-neutral-600);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.form-input--error {
|
|
118
|
+
background-color: var(--color-red-50);
|
|
119
|
+
border-color: var(--color-red-500);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.form-help-text--error {
|
|
123
|
+
color: var(--color-red-600);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.form-input--success {
|
|
127
|
+
background-color: var(--color-green-50);
|
|
128
|
+
border-color: var(--color-green-500);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.form-help-text--success {
|
|
132
|
+
color: var(--color-green-600);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.form-input--disabled {
|
|
136
|
+
background-color: var(--color-neutral-100);
|
|
137
|
+
border-color: var(--color-neutral-300);
|
|
138
|
+
color: var(--color-neutral-500);
|
|
139
|
+
cursor: not-allowed;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.input-with-button {
|
|
143
|
+
position: relative;
|
|
144
|
+
display: flex;
|
|
145
|
+
align-items: center;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
input.form-input-bd {
|
|
149
|
+
flex: 1;
|
|
150
|
+
padding-right: 2.5rem; /* space for button */
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.paste-button {
|
|
154
|
+
position: absolute;
|
|
155
|
+
right: 0.5rem;
|
|
156
|
+
background: transparent;
|
|
157
|
+
border: none;
|
|
158
|
+
cursor: pointer;
|
|
159
|
+
font-size: 1rem;
|
|
160
|
+
padding: 0;
|
|
161
|
+
color: var(--color-gray-700);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.paste-button:disabled {
|
|
165
|
+
cursor: not-allowed;
|
|
166
|
+
opacity: 0.5;
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import inputClipboardCSS from "../input/input-clipboard.css.js";
|
|
4
|
+
|
|
5
|
+
class CustomInputClipboard extends LitElement {
|
|
6
|
+
static properties = {
|
|
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 },
|
|
17
|
+
value : { type: String }
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.label = "Default Label";
|
|
23
|
+
this.type = "text";
|
|
24
|
+
this.kind = "md";
|
|
25
|
+
this.placeholder = "Paste something...";
|
|
26
|
+
this.required = false;
|
|
27
|
+
this.focused = false;
|
|
28
|
+
this.tooltip = "";
|
|
29
|
+
this.invalid = false;
|
|
30
|
+
this.validated = false;
|
|
31
|
+
this.disabled = false;
|
|
32
|
+
this.value = "";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async pasteFromClipboard() {
|
|
36
|
+
try {
|
|
37
|
+
const text = await navigator.clipboard.readText();
|
|
38
|
+
this.value = text;
|
|
39
|
+
this.dispatchEvent(new CustomEvent("input", { detail: text }));
|
|
40
|
+
} catch (err) {
|
|
41
|
+
console.error("Clipboard paste failed:", err);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
handleInput(e) {
|
|
46
|
+
this.value = e.target.value;
|
|
47
|
+
this.dispatchEvent(new CustomEvent("input", { detail: this.value }));
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
render() {
|
|
51
|
+
const inputClass = {
|
|
52
|
+
sm: "input-sm",
|
|
53
|
+
md: "input-md",
|
|
54
|
+
lg: "input-lg"
|
|
55
|
+
}[this.kind];
|
|
56
|
+
|
|
57
|
+
const labelClass = {
|
|
58
|
+
sm: "label-sm",
|
|
59
|
+
md: "label-md",
|
|
60
|
+
lg: "label-lg"
|
|
61
|
+
}[this.kind];
|
|
62
|
+
|
|
63
|
+
const inputStateClass = this.disabled
|
|
64
|
+
? "form-input--disabled"
|
|
65
|
+
: this.invalid
|
|
66
|
+
? "form-input--error"
|
|
67
|
+
: this.validated
|
|
68
|
+
? "form-input--success"
|
|
69
|
+
: "";
|
|
70
|
+
|
|
71
|
+
const helpTextClass = this.invalid
|
|
72
|
+
? "form-help-text--error"
|
|
73
|
+
: this.validated
|
|
74
|
+
? "form-help-text--success"
|
|
75
|
+
: "form-help-text--default";
|
|
76
|
+
|
|
77
|
+
return html`
|
|
78
|
+
<div class="input-container">
|
|
79
|
+
<label for="clipboard-input" class="form-label ${labelClass}">
|
|
80
|
+
${this.label}
|
|
81
|
+
${this.required
|
|
82
|
+
? html`<span class="form-label__required">*</span>`
|
|
83
|
+
: ""}
|
|
84
|
+
</label>
|
|
85
|
+
<div class="input-with-button">
|
|
86
|
+
<input
|
|
87
|
+
id="clipboard-input"
|
|
88
|
+
class="form-input-bd ${inputClass} ${this.focused
|
|
89
|
+
? "focused"
|
|
90
|
+
: ""} ${inputStateClass}"
|
|
91
|
+
type="${this.type}"
|
|
92
|
+
placeholder="${this.placeholder}"
|
|
93
|
+
.value="${this.value}"
|
|
94
|
+
?required="${this.required}"
|
|
95
|
+
?disabled="${this.disabled}"
|
|
96
|
+
@input="${this.handleInput}"
|
|
97
|
+
/>
|
|
98
|
+
<button
|
|
99
|
+
class="paste-button"
|
|
100
|
+
@click="${this.pasteFromClipboard}"
|
|
101
|
+
title="Paste from clipboard"
|
|
102
|
+
?disabled="${this.disabled}"
|
|
103
|
+
type="button"
|
|
104
|
+
aria-label="Paste from clipboard"
|
|
105
|
+
>
|
|
106
|
+
<svg
|
|
107
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
108
|
+
width="20"
|
|
109
|
+
height="20"
|
|
110
|
+
viewBox="0 0 24 24"
|
|
111
|
+
fill="none"
|
|
112
|
+
stroke="currentColor"
|
|
113
|
+
stroke-width="1.5"
|
|
114
|
+
stroke-linecap="round"
|
|
115
|
+
stroke-linejoin="round"
|
|
116
|
+
>
|
|
117
|
+
<path
|
|
118
|
+
d="M16 4H18A2 2 0 0 1 20 6V20A2 2 0 0 1 18 22H6A2 2 0 0 1 4 20V6A2 2 0 0 1 6 4H8"
|
|
119
|
+
/>
|
|
120
|
+
<rect x="8" y="2" width="8" height="4" rx="1" ry="1" />
|
|
121
|
+
</svg>
|
|
122
|
+
</button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
${this.tooltip
|
|
126
|
+
? html`<div class="form-help-text ${helpTextClass}">
|
|
127
|
+
${this.tooltip}
|
|
128
|
+
</div>`
|
|
129
|
+
: ""}
|
|
130
|
+
</div>
|
|
131
|
+
`;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
CustomInputClipboard.styles = [tokens, inputClipboardCSS];
|
|
136
|
+
|
|
137
|
+
customElements.define("bd-custom-input-clipboard", CustomInputClipboard);
|
|
@@ -1,68 +1,148 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 90%;
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
.input-container {
|
|
5
10
|
display: flex;
|
|
6
11
|
flex-direction: column;
|
|
7
|
-
margin-bottom: 1em;
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
label {
|
|
11
|
-
|
|
12
|
-
font-weight:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
margin-bottom: 4px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: var(--color-neutral-900);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.form-label__required {
|
|
21
|
+
color: var(--color-red-500);
|
|
22
|
+
margin-left: var(--spacing-4);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.label-sm {
|
|
26
|
+
font-size: var(--typography-fontSize-xs);
|
|
27
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
28
|
+
line-height: var(--typography-lineHeight-normal);
|
|
29
|
+
letter-spacing: var(--typography-letterSpacing-wide);
|
|
30
|
+
margin-bottom: var(--spacing-4);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.label-md {
|
|
34
|
+
font-size: var(--typography-fontSize-sm);
|
|
35
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
36
|
+
line-height: var(--typography-lineHeight-normal);
|
|
37
|
+
margin-bottom: var(--spacing-4);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.label-lg {
|
|
41
|
+
font-size: var(--typography-fontSize-lg);
|
|
42
|
+
font-weight: var(--typography-fontWeight-bold);
|
|
43
|
+
line-height: var(--typography-lineHeight-normal);
|
|
44
|
+
margin-bottom: var(--spacing-8);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.form-input-bd {
|
|
48
|
+
width: 100%;
|
|
49
|
+
border: var(--border-width-1, 1px) solid var(--color-neutral-300);
|
|
50
|
+
font-family: var(--typography-fontFamily-sans, sans-serif);
|
|
51
|
+
line-height: var(--typography-lineHeight-normal, 1.5);
|
|
52
|
+
transition: border-color 0.3s ease, background-color 0.3s ease,
|
|
53
|
+
box-shadow 0.3s ease;
|
|
54
|
+
background-color: var(--color-neutral-0);
|
|
55
|
+
color: var(--color-neutral-900);
|
|
23
56
|
outline: none;
|
|
24
|
-
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
25
57
|
}
|
|
26
58
|
|
|
27
59
|
input:focus {
|
|
28
|
-
border-color:
|
|
29
|
-
box-shadow:
|
|
60
|
+
border-color: var(--color-blue-500);
|
|
61
|
+
box-shadow: var(
|
|
62
|
+
--focus-outline-primary,
|
|
63
|
+
0 0 0 2px rgba(0, 109, 255, 0.3)
|
|
64
|
+
);
|
|
30
65
|
}
|
|
31
66
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
border:
|
|
37
|
-
border-radius: 5px;
|
|
38
|
-
background-color: #f9f9f9;
|
|
67
|
+
.input-sm {
|
|
68
|
+
padding: var(--spacing-8) var(--spacing-12);
|
|
69
|
+
font-size: var(--typography-fontSize-sm);
|
|
70
|
+
height: var(--dimension-34px);
|
|
71
|
+
border-radius: var(--form-input-medium-borderRadius);
|
|
39
72
|
}
|
|
40
73
|
|
|
41
|
-
.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
74
|
+
.input-md {
|
|
75
|
+
padding: var(--spacing-12) var(--spacing-16);
|
|
76
|
+
font-size: var(--typography-fontSize-base);
|
|
77
|
+
height: var(--dimension-45px);
|
|
78
|
+
border-radius: var(--form-input-large-borderRadius);
|
|
45
79
|
}
|
|
46
80
|
|
|
47
|
-
.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
81
|
+
.input-lg {
|
|
82
|
+
padding: var(--spacing-16) var(--spacing-20);
|
|
83
|
+
font-size: var(--typography-fontSize-lg);
|
|
84
|
+
height: var(--dimension-55px);
|
|
85
|
+
border-radius: var(--form-input-large-borderRadius);
|
|
51
86
|
}
|
|
52
87
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
border: 1px solid #ccc;
|
|
57
|
-
border-radius: 4px;
|
|
58
|
-
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
|
59
|
-
width: 80% !important;
|
|
88
|
+
::placeholder {
|
|
89
|
+
color: var(--color-neutral-500);
|
|
90
|
+
opacity: 1;
|
|
60
91
|
}
|
|
61
92
|
|
|
62
|
-
.form-
|
|
63
|
-
|
|
64
|
-
|
|
93
|
+
.form-label {
|
|
94
|
+
display: block;
|
|
95
|
+
font-family: var(--typography-fontFamily-sans);
|
|
96
|
+
color: var(--color-neutral-900);
|
|
97
|
+
letter-spacing: var(--typography-letterSpacing-normal);
|
|
65
98
|
}
|
|
66
99
|
|
|
67
|
-
|
|
100
|
+
.form-input-bd:focus,
|
|
101
|
+
.form-input-bd.focused {
|
|
102
|
+
border-color: var(--color-blue-500);
|
|
103
|
+
box-shadow: var(
|
|
104
|
+
--focus-outline-primary,
|
|
105
|
+
0 0 0 2px rgba(0, 109, 255, 0.3)
|
|
106
|
+
);
|
|
107
|
+
background: none;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.form-help-text {
|
|
111
|
+
font-size: var(--typography-fontSize-xs);
|
|
112
|
+
font-weight: var(--typography-fontWeight-normal);
|
|
113
|
+
line-height: var(--typography-lineHeight-normal);
|
|
114
|
+
letter-spacing: var(--typography-letterSpacing-normal);
|
|
115
|
+
font-family: var(--typography-fontFamily-sans);
|
|
116
|
+
margin-top: var(--spacing-4);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.form-help-text--default {
|
|
120
|
+
color: var(--color-neutral-600);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.form-input--error {
|
|
124
|
+
background-color: var(--color-red-50);
|
|
125
|
+
border-color: var(--color-red-500);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.form-help-text--error {
|
|
129
|
+
color: var(--color-red-600);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.form-input--success {
|
|
133
|
+
background-color: var(--color-green-50);
|
|
134
|
+
border-color: var(--color-green-500);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.form-help-text--success {
|
|
138
|
+
color: var(--color-green-600);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.form-input--disabled {
|
|
142
|
+
background-color: var(--color-neutral-100);
|
|
143
|
+
border-color: var(--color-neutral-300);
|
|
144
|
+
color: var(--color-neutral-500);
|
|
145
|
+
cursor: not-allowed;
|
|
146
|
+
}
|
|
147
|
+
|
|
68
148
|
`;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
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
|
+
--bd-accesibility-focus: var(--color-blue-500);
|
|
11
|
+
display: block;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.bd-accordion-bg-item {
|
|
15
|
+
margin-bottom: var(--spacing-16);
|
|
16
|
+
border-radius: var(--spacing-8);
|
|
17
|
+
background-color: var(--color-blue-50);
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
transition: box-shadow 0.3s ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bd-accordion-bg-item:hover {
|
|
23
|
+
.bd-accordion-bg-question-text {
|
|
24
|
+
text-decoration-line: underline;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.bd-accordion-bg-question {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
display: flex;
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: var(--spacing-10);
|
|
34
|
+
padding: var(--spacing-16);
|
|
35
|
+
font-weight: bold;
|
|
36
|
+
background-color: var(--color-blue-50);
|
|
37
|
+
color: #333;
|
|
38
|
+
transition: background-color 0.3s ease, color 0.3s ease;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.bd-accordion-bg-header {
|
|
42
|
+
margin-bottom: var(--spacing-32);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bd-accordion-bg-question:hover {
|
|
46
|
+
color: #0073e6;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.bd-accordion-bg-item:focus-visible {
|
|
50
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
51
|
+
outline-offset: var(--spacing-2);
|
|
52
|
+
border-radius: var(--space-2xs);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bd-accordion-bg-item:focus {
|
|
56
|
+
.bd-accordion-bg-question-text {
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
text-decoration-line: underline;
|
|
59
|
+
color: var(--color-blue-600);
|
|
60
|
+
text-decoration-thickness: var(--spacing-2);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.bd-accordion-bg-question-text {
|
|
65
|
+
font-family: var(--typography-fontFamily-sans);
|
|
66
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
67
|
+
}
|
|
68
|
+
|
|
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;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.bd-accordion-bg-icon {
|
|
78
|
+
transition: transform 0.3s ease;
|
|
79
|
+
width: var(--spacing-14);
|
|
80
|
+
height: var(--spacing-14);
|
|
81
|
+
color: var(--color-blue-500);
|
|
82
|
+
text-align: center;
|
|
83
|
+
position: relative;
|
|
84
|
+
bottom: 1px;
|
|
85
|
+
}
|
|
86
|
+
|
|
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
|
+
}
|
|
96
|
+
|
|
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
|
+
}
|
|
102
|
+
|
|
103
|
+
.bd-accordion-bg-answer > div {
|
|
104
|
+
overflow: hidden;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.bd-accordion-bg-container {
|
|
108
|
+
width: 90%;
|
|
109
|
+
margin: auto;
|
|
110
|
+
padding-top: var(--spacing-64);
|
|
111
|
+
padding-bottom: var(--spacing-64);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.bd-accordion-bg-link-noline {
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
}
|
|
117
|
+
`;
|