@repobit/dex-system-design 0.24.4 → 0.24.5
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 +7 -0
- package/package.json +4 -4
- package/src/components/accordion/accordion.css.js +40 -0
- package/src/components/accordion/accordion.js +31 -0
- package/src/components/accordion/accordion.stories.js +147 -4
- package/src/components/agent-endpoints/agent-endpoints.css.js +92 -0
- package/src/components/agent-endpoints/agent-endpoints.js +86 -0
- package/src/components/agent-endpoints/agent-endpoints.stories.js +148 -0
- package/src/components/ai-guardian-demo.stories.js +669 -0
- package/src/components/awards/awards-flex.css.js +169 -0
- package/src/components/awards/awards-flex.js +269 -0
- package/src/components/awards/awards-flex.stories.js +657 -0
- package/src/components/bento-grid/bento-grid.css.js +57 -0
- package/src/components/bento-grid/bento-grid.js +186 -0
- package/src/components/bento-grid/bento-grid.stories.js +440 -0
- package/src/components/bento-grid/bento-item.css.js +79 -0
- package/src/components/bento-grid/bento-item.js +54 -0
- package/src/components/button/button.css.js +26 -0
- package/src/components/button/button.js +8 -0
- package/src/components/button/button.stories.js +12 -0
- package/src/components/comparison-panel/comparison-panel.css.js +104 -0
- package/src/components/comparison-panel/comparison-panel.js +100 -0
- package/src/components/comparison-panel/comparison-panel.stories.js +223 -0
- package/src/components/compatibility-table/compatibility-table.css.js +243 -0
- package/src/components/compatibility-table/compatibility-table.js +123 -0
- package/src/components/compatibility-table/compatibility-table.stories.js +189 -0
- package/src/components/cta-banner/cta-banner.css.js +60 -0
- package/src/components/cta-banner/cta-banner.js +63 -0
- package/src/components/dropdown/dropdown.css.js +1 -1
- package/src/components/footer/footer.css.js +0 -1
- package/src/components/header/header-code.css.js +125 -0
- package/src/components/header/header-code.js +69 -0
- package/src/components/header/header-code.stories.js +226 -0
- package/src/components/heading/heading.css.js +3 -0
- package/src/components/icons/bd-ai-icon.js +27 -0
- package/src/components/list/list-item/list-item.css.js +3 -3
- package/src/components/list/list-item/list-item.js +10 -4
- package/src/components/overview/overview.css.js +121 -0
- package/src/components/overview/overview.js +63 -0
- package/src/components/overview/overview.stories.js +193 -0
- package/src/components/page-switcher/page-switcher.css.js +100 -0
- package/src/components/page-switcher/page-switcher.js +42 -0
- package/src/components/paragraph/paragraph.js +7 -3
- package/src/components/process-steps/process-steps.css.js +95 -0
- package/src/components/process-steps/process-steps.js +72 -0
- package/src/components/process-steps/process-steps.stories.js +144 -0
- package/src/components/quick-answer/quick-answer.css.js +67 -0
- package/src/components/quick-answer/quick-answer.js +59 -0
- package/src/components/quick-answer/quick-answer.stories.js +160 -0
- package/src/components/terminal/terminal-cursor.js +49 -0
- package/src/components/terminal/terminal-message.css.js +161 -0
- package/src/components/terminal/terminal-message.js +169 -0
- package/src/components/terminal/terminal-message.stories.js +321 -0
- package/src/components/trust-panel/trust-panel.css.js +167 -0
- package/src/components/trust-panel/trust-panel.js +116 -0
- package/src/components/trust-panel/trust-panel.stories.js +234 -0
- package/src/tokens/tokens.css +1 -1
- package/src/components/tabsComponent/tabsComponent.css.js +0 -267
- package/src/components/tabsComponent/tabsComponent.js +0 -193
- package/src/components/tabsComponent/tabsComponent.stories.js +0 -134
- package/src/components/tabsComponentFamily/tabsComponentFamily.css.js +0 -181
- package/src/components/tabsComponentFamily/tabsComponentFamily.js +0 -180
- package/src/components/tabsComponentFamily/tabsComponentFamily.stories.js +0 -319
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { LitElement, html, nothing } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../heading/heading.js";
|
|
4
|
+
import "../paragraph/paragraph.js";
|
|
5
|
+
import infoPanelCSS from "./overview.css.js";
|
|
6
|
+
|
|
7
|
+
class Overview extends LitElement {
|
|
8
|
+
static properties = {
|
|
9
|
+
title : { type: String },
|
|
10
|
+
description: { type: String },
|
|
11
|
+
facts : { type: Array } // [{ label: String, value: String }]
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
static styles = [tokens, infoPanelCSS];
|
|
15
|
+
|
|
16
|
+
constructor() {
|
|
17
|
+
super();
|
|
18
|
+
this.title = "";
|
|
19
|
+
this.description = "";
|
|
20
|
+
this.facts = [];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
render() {
|
|
24
|
+
return html`
|
|
25
|
+
<div class="bd-infopanel-container">
|
|
26
|
+
${this.title
|
|
27
|
+
? html`
|
|
28
|
+
<bd-h as="h2" class="bd-infopanel-title">
|
|
29
|
+
<slot name="title">${this.title}</slot>
|
|
30
|
+
</bd-h>
|
|
31
|
+
`
|
|
32
|
+
: nothing}
|
|
33
|
+
|
|
34
|
+
<div class="bd-infopanel-left">
|
|
35
|
+
${this.description
|
|
36
|
+
? html`
|
|
37
|
+
<bd-p kind="large" class="bd-infopanel-description">
|
|
38
|
+
<slot name="description">${this.description}</slot>
|
|
39
|
+
</bd-p>
|
|
40
|
+
`
|
|
41
|
+
: nothing}
|
|
42
|
+
|
|
43
|
+
<slot></slot>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div class="bd-infopanel-right">
|
|
47
|
+
${this.facts.map(
|
|
48
|
+
(fact) => html`
|
|
49
|
+
<div class="bd-infopanel-row">
|
|
50
|
+
<div class="bd-infopanel-divider"></div>
|
|
51
|
+
<bd-p kind="xsmall" class="bd-infopanel-label">${fact.label}</bd-p>
|
|
52
|
+
<bd-p kind="normal" class="bd-infopanel-value">${fact.value}</bd-p>
|
|
53
|
+
</div>
|
|
54
|
+
`
|
|
55
|
+
)}
|
|
56
|
+
<slot name="facts"></slot>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
`;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
customElements.define("bd-overview", Overview);
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "./overview.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title : "Components/Overview",
|
|
6
|
+
component : "bd-info-panel",
|
|
7
|
+
tags : ["autodocs"],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "fullscreen",
|
|
10
|
+
docs : {
|
|
11
|
+
description: {
|
|
12
|
+
component: `
|
|
13
|
+
**InfoPanel** pairs a large title + description on the left with a stacked list of
|
|
14
|
+
labeled facts on the right, each row separated by a thin top border line — a
|
|
15
|
+
"spec sheet" style layout, e.g. for a product's key facts.
|
|
16
|
+
|
|
17
|
+
### Usage
|
|
18
|
+
\`\`\`html
|
|
19
|
+
<bd-info-panel
|
|
20
|
+
title="What is AI Guardian?"
|
|
21
|
+
description="AI Guardian is a Bitdefender security product that helps protect people and organisations from the risks of autonomous AI agents — prompt injection, unsafe tool use, data leakage, and unauthorised actions. It adds a baseline security model of policies, permissions, and auditing, guardrails for tool execution, and monitoring and response workflows."
|
|
22
|
+
.facts=\${[
|
|
23
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
24
|
+
{ label: "PLATFORM", value: "macOS (initial)" },
|
|
25
|
+
{ label: "RUNS AS", value: "Background service" },
|
|
26
|
+
{ label: "VERDICTS", value: "Allowed / Flagged / Blocked" }
|
|
27
|
+
]}
|
|
28
|
+
></bd-info-panel>
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
### Attributes
|
|
32
|
+
| Attribute | Type | Default | Description |
|
|
33
|
+
|------------------|--------|---------|-------------------------------------------------------------|
|
|
34
|
+
| \`title\` | String | \`""\` | Large heading on the left (or use the \`title\` slot) |
|
|
35
|
+
| \`description\` | String | \`""\` | Supporting paragraph under the title (or the \`description\` slot) |
|
|
36
|
+
| \`facts\` | Array | \`[]\` | Right-column rows: \`{ label, value }\` |
|
|
37
|
+
|
|
38
|
+
### Slots
|
|
39
|
+
| Slot | Description |
|
|
40
|
+
|-----------------|--------------------------------------------------------------|
|
|
41
|
+
| \`title\` | Overrides the \`title\` attribute if content is provided |
|
|
42
|
+
| \`description\` | Overrides the \`description\` attribute if content is provided |
|
|
43
|
+
| \`facts\` | Extra freeform fact rows appended after the ones from \`facts\` |
|
|
44
|
+
| (default) | Extra freeform content appended after the description on the left |
|
|
45
|
+
`
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
argTypes: {
|
|
50
|
+
title : { control: "text", table: { category: "Content" } },
|
|
51
|
+
description: { control: "text", table: { category: "Content" } },
|
|
52
|
+
facts : { control: "object", table: { category: "Content" } }
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const render = (args) => html`
|
|
57
|
+
<bd-info-panel
|
|
58
|
+
title=${args.title}
|
|
59
|
+
description=${args.description}
|
|
60
|
+
.facts=${args.facts}
|
|
61
|
+
></bd-info-panel>
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
export const Default = {
|
|
65
|
+
name: "Default — AI Guardian",
|
|
66
|
+
args: {
|
|
67
|
+
title : "What is AI Guardian?",
|
|
68
|
+
description: "AI Guardian is a Bitdefender security product that helps protect people and organisations from the risks of autonomous AI agents — prompt injection, unsafe tool use, data leakage, and unauthorised actions. It adds a baseline security model of policies, permissions, and auditing, guardrails for tool execution, and monitoring and response workflows.",
|
|
69
|
+
facts : [
|
|
70
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
71
|
+
{ label: "PLATFORM", value: "macOS (initial)" },
|
|
72
|
+
{ label: "RUNS AS", value: "Background service" },
|
|
73
|
+
{ label: "VERDICTS", value: "Allowed / Flagged / Blocked" }
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
render,
|
|
77
|
+
parameters: {
|
|
78
|
+
docs: {
|
|
79
|
+
description: {
|
|
80
|
+
story: "Matches the reference design exactly: title + description on the left, 4 labeled fact rows on the right, each preceded by a thin blue divider line."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const TwoFacts = {
|
|
87
|
+
name: "Two Facts",
|
|
88
|
+
args: {
|
|
89
|
+
title : "What is AI Guardian?",
|
|
90
|
+
description: "A shorter description paired with just two fact rows on the right.",
|
|
91
|
+
facts : [
|
|
92
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
93
|
+
{ label: "PLATFORM", value: "macOS (initial)" }
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
render,
|
|
97
|
+
parameters: {
|
|
98
|
+
docs: {
|
|
99
|
+
description: {
|
|
100
|
+
story: "Only 2 facts — the right column is simply shorter, no extra spacing added to compensate."
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const ManyFacts = {
|
|
107
|
+
name: "Many Facts",
|
|
108
|
+
args: {
|
|
109
|
+
title : "What is AI Guardian?",
|
|
110
|
+
description: "A longer fact list demonstrates the row/divider pattern repeating cleanly.",
|
|
111
|
+
facts : [
|
|
112
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
113
|
+
{ label: "PLATFORM", value: "macOS (initial)" },
|
|
114
|
+
{ label: "RUNS AS", value: "Background service" },
|
|
115
|
+
{ label: "VERDICTS", value: "Allowed / Flagged / Blocked" },
|
|
116
|
+
{ label: "PRICING", value: "Free during open BETA" },
|
|
117
|
+
{ label: "LANGUAGE", value: "Swift" }
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
render,
|
|
121
|
+
parameters: {
|
|
122
|
+
docs: {
|
|
123
|
+
description: {
|
|
124
|
+
story: "6 fact rows — the pattern of divider + label + value repeats consistently regardless of count."
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const NoDescription = {
|
|
131
|
+
name: "No Description",
|
|
132
|
+
args: {
|
|
133
|
+
title : "What is AI Guardian?",
|
|
134
|
+
description: "",
|
|
135
|
+
facts : [
|
|
136
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
137
|
+
{ label: "PLATFORM", value: "macOS (initial)" }
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
render,
|
|
141
|
+
parameters: {
|
|
142
|
+
docs: {
|
|
143
|
+
description: {
|
|
144
|
+
story: "`description` omitted — no paragraph rendered under the title, no leftover gap."
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export const SlottedContent = {
|
|
151
|
+
name : "Slotted Title, Description, and Extra Facts",
|
|
152
|
+
render: () => html`
|
|
153
|
+
<bd-info-panel>
|
|
154
|
+
<span slot="title">Custom <em>slotted</em> title</span>
|
|
155
|
+
<span slot="description">Custom slotted description with <strong>inline markup</strong>.</span>
|
|
156
|
+
|
|
157
|
+
<div slot="facts" class="bd-infopanel-row" style="display:flex; flex-direction:column; gap:4px; padding-top:16px;">
|
|
158
|
+
<div style="border-top: 1px solid #3b82f6; margin-bottom:16px;"></div>
|
|
159
|
+
<span style="text-transform:uppercase; letter-spacing:0.06em; font-size:12px; color:#60a5fa;">EXTRA</span>
|
|
160
|
+
<strong>A manually slotted fact row</strong>
|
|
161
|
+
</div>
|
|
162
|
+
</bd-info-panel>
|
|
163
|
+
`,
|
|
164
|
+
parameters: {
|
|
165
|
+
docs: {
|
|
166
|
+
description: {
|
|
167
|
+
story: "Demonstrates overriding `title`/`description` via slots (for inline markup) and appending an extra fact row via the `facts` slot alongside the ones generated from the `facts` array."
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
export const Playground = {
|
|
174
|
+
name: "Playground",
|
|
175
|
+
args: {
|
|
176
|
+
title : "What is AI Guardian?",
|
|
177
|
+
description: "AI Guardian is a Bitdefender security product that helps protect people and organisations from the risks of autonomous AI agents.",
|
|
178
|
+
facts : [
|
|
179
|
+
{ label: "CATEGORY", value: "AI agent security" },
|
|
180
|
+
{ label: "PLATFORM", value: "macOS (initial)" },
|
|
181
|
+
{ label: "RUNS AS", value: "Background service" },
|
|
182
|
+
{ label: "VERDICTS", value: "Allowed / Flagged / Blocked" }
|
|
183
|
+
]
|
|
184
|
+
},
|
|
185
|
+
render,
|
|
186
|
+
parameters: {
|
|
187
|
+
docs: {
|
|
188
|
+
description: {
|
|
189
|
+
story: "Fully interactive story — use the Controls panel to edit title, description, and the facts array live."
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const pageSwitcherStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
position: sticky;
|
|
7
|
+
top: 0;
|
|
8
|
+
z-index: 200;
|
|
9
|
+
background: var(--color-neutral-0);
|
|
10
|
+
border-bottom: var(--border-width-1) solid var(--color-neutral-100);
|
|
11
|
+
--bd-accesibility-focus: var(--color-blue-500);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.inner {
|
|
15
|
+
max-width: 1200px;
|
|
16
|
+
margin-inline: auto;
|
|
17
|
+
padding-block: var(--spacing-16);
|
|
18
|
+
padding-inline: var(--spacing-24);
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
gap: var(--spacing-32);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.logo {
|
|
27
|
+
font-size: var(--typography-fontSize-lg);
|
|
28
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
29
|
+
color: var(--color-neutral-900);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.logo span {
|
|
33
|
+
color: var(--color-blue-500);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
nav {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: var(--spacing-16) var(--spacing-32);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.page-link {
|
|
43
|
+
position: relative;
|
|
44
|
+
text-decoration: none !important;
|
|
45
|
+
color: var(--color-neutral-900);
|
|
46
|
+
font-weight: var(--typography-fontWeight-normal);
|
|
47
|
+
padding: var(--spacing-10) var(--spacing-0);
|
|
48
|
+
display: inline-block;
|
|
49
|
+
font-size: var(--typography-body-regular-fontSize);
|
|
50
|
+
font-family: var(--typography-body-regular-fontFamily);
|
|
51
|
+
transition: color var(--transition-duration-fast) var(--transition-easing-smooth);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.page-link.active {
|
|
55
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
56
|
+
color: var(--color-neutral-900);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.page-link:hover,
|
|
60
|
+
.page-link.bd-link--primary:hover {
|
|
61
|
+
color: var(--color-blue-500) !important;
|
|
62
|
+
text-decoration: none !important;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.page-link.bd-link--secondary:hover {
|
|
66
|
+
color: var(--color-neutral-900) !important;
|
|
67
|
+
text-decoration: none !important;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.page-link.active:hover {
|
|
71
|
+
color: var(--color-neutral-900) !important;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.page-link::after {
|
|
75
|
+
content: "";
|
|
76
|
+
position: absolute;
|
|
77
|
+
left: var(--spacing-0);
|
|
78
|
+
bottom: calc(-1 * var(--spacing-14));
|
|
79
|
+
width: 0%;
|
|
80
|
+
height: var(--border-width-3);
|
|
81
|
+
background-color: var(--color-blue-500);
|
|
82
|
+
transition: width var(--transition-duration-slow) var(--transition-easing-ease-out);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.page-link.active::after {
|
|
86
|
+
width: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.page-link:focus-visible {
|
|
90
|
+
outline: var(--spacing-2) solid var(--bd-accesibility-focus);
|
|
91
|
+
outline-offset: var(--spacing-2);
|
|
92
|
+
border-radius: var(--space-2xs);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@media (prefers-reduced-motion: reduce) {
|
|
96
|
+
.page-link::after {
|
|
97
|
+
transition: none !important;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement, html, nothing } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../icons/bd-ai-icon.js";
|
|
4
|
+
import "../link/link.js";
|
|
5
|
+
import { pageSwitcherStyles } from "./page-switcher.css.js";
|
|
6
|
+
|
|
7
|
+
class BdPageSwitcher extends LitElement {
|
|
8
|
+
static properties = {
|
|
9
|
+
items: { type: Array } // [{ title, href, active }]
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
static styles = [tokens, pageSwitcherStyles];
|
|
13
|
+
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.items = [];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
render() {
|
|
20
|
+
return html`
|
|
21
|
+
<div class="inner">
|
|
22
|
+
<bd-ai-icon class="logo" width="126" height="24"></bd-ai-icon>
|
|
23
|
+
|
|
24
|
+
<nav aria-label="Product navigation">
|
|
25
|
+
${this.items.map(({ title, href, active }) => html`
|
|
26
|
+
<bd-link
|
|
27
|
+
href=${href}
|
|
28
|
+
kind=${active ? "primary" : "secondary"}
|
|
29
|
+
no-underline
|
|
30
|
+
color="var(--color-neutral-900)"
|
|
31
|
+
?active=${active}
|
|
32
|
+
aria-current=${active ? "true" : nothing}
|
|
33
|
+
class="page-link ${active ? "active" : ""}"
|
|
34
|
+
>${title || nothing}</bd-link>
|
|
35
|
+
`)}
|
|
36
|
+
</nav>
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
customElements.define("bd-page-switcher", BdPageSwitcher);
|
|
@@ -7,8 +7,9 @@ export class BdP extends LitElement {
|
|
|
7
7
|
kind : { type: String, reflect: true },
|
|
8
8
|
padding : { type: String },
|
|
9
9
|
paddingBottom: { type: String },
|
|
10
|
-
paddingTop : { type: String }
|
|
11
|
-
|
|
10
|
+
paddingTop : { type: String },
|
|
11
|
+
fontFamily : { type: String, attribute: "font-family" },
|
|
12
|
+
fontWeight : { type: String, attribute: "font-weight" }
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
constructor() {
|
|
@@ -17,7 +18,8 @@ export class BdP extends LitElement {
|
|
|
17
18
|
this.padding = "";
|
|
18
19
|
this.paddingBottom = "";
|
|
19
20
|
this.paddingTop = "";
|
|
20
|
-
|
|
21
|
+
this.fontFamily = "";
|
|
22
|
+
this.fontWeight = "";
|
|
21
23
|
}
|
|
22
24
|
|
|
23
25
|
_getKindClass() {
|
|
@@ -38,6 +40,8 @@ export class BdP extends LitElement {
|
|
|
38
40
|
if (this.padding) styles.push(`padding: ${this.padding};`);
|
|
39
41
|
if (this.paddingBottom) styles.push(`padding-bottom: ${this.paddingBottom};`);
|
|
40
42
|
if (this.paddingTop) styles.push(`padding-top: ${this.paddingTop};`);
|
|
43
|
+
if (this.fontFamily) styles.push(`font-family: ${this.fontFamily};`);
|
|
44
|
+
if (this.fontWeight) styles.push(`font-weight: ${this.fontWeight};`);
|
|
41
45
|
|
|
42
46
|
const kindClass = this._getKindClass();
|
|
43
47
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export default css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
font-family: var(--typography-fontFamily-sans);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.bd-processsteps-container {
|
|
10
|
+
color: var(--color-neutral-0);
|
|
11
|
+
background: linear-gradient(160deg, var(--color-neutral-800) 0%, #0b1626 100%);
|
|
12
|
+
padding: var(--spacing-64) var(--spacing-24) var(--spacing-64) var(--spacing-24);
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bd-processsteps-title {
|
|
17
|
+
display: block;
|
|
18
|
+
margin: 0 0 var(--spacing-12);
|
|
19
|
+
color: var(--color-neutral-0, #fff);
|
|
20
|
+
line-height: var(--typography-lineHeight-tight, 1.1);
|
|
21
|
+
max-width: 900px;
|
|
22
|
+
margin-left: auto;
|
|
23
|
+
margin-right: auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.bd-processsteps-description {
|
|
27
|
+
display: block;
|
|
28
|
+
margin: 0 0 var(--spacing-40);
|
|
29
|
+
color: var(--color-neutral-300, #d1d5db);
|
|
30
|
+
max-width: 900px;
|
|
31
|
+
margin-left: auto;
|
|
32
|
+
margin-right: auto;
|
|
33
|
+
--typography-body-regular-fontWeight: var(--typography-fontWeight-bold, 700);
|
|
34
|
+
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* === GRID === */
|
|
38
|
+
.bd-processsteps-grid {
|
|
39
|
+
display: grid;
|
|
40
|
+
grid-template-columns: repeat(3, 1fr);
|
|
41
|
+
gap: var(--spacing-32);
|
|
42
|
+
max-width: 900px;
|
|
43
|
+
margin: 0 auto;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.bd-processsteps-step {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bd-processsteps-divider {
|
|
52
|
+
border-top: 1px solid rgba(255, 255, 255, 0.12);
|
|
53
|
+
margin-bottom: var(--spacing-24);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.bd-processsteps-icon-wrap {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
width: 40px;
|
|
61
|
+
height: 40px;
|
|
62
|
+
margin-bottom: var(--spacing-16);
|
|
63
|
+
color: var(--color-blue-400, #60a5fa);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.bd-processsteps-icon-img {
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: 100%;
|
|
69
|
+
object-fit: contain;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.bd-processsteps-step-title {
|
|
73
|
+
display: block;
|
|
74
|
+
margin: 0 0 var(--spacing-8);
|
|
75
|
+
color: var(--color-neutral-0, #fff);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.bd-processsteps-step-description {
|
|
79
|
+
display: block;
|
|
80
|
+
margin: 0;
|
|
81
|
+
color: var(--color-neutral-300, #d1d5db);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* === RESPONSIVE === */
|
|
85
|
+
@media (max-width: 899px) {
|
|
86
|
+
.bd-processsteps-grid {
|
|
87
|
+
grid-template-columns: 1fr;
|
|
88
|
+
gap: var(--spacing-32);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.bd-processsteps-container {
|
|
92
|
+
padding: var(--spacing-48) var(--spacing-24);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
`;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { LitElement, html, nothing } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../heading/heading.js";
|
|
4
|
+
import "../icons/close-icon.js";
|
|
5
|
+
import "../icons/globe-icon.js";
|
|
6
|
+
import "../icons/guide-icon.js";
|
|
7
|
+
import "../paragraph/paragraph.js";
|
|
8
|
+
import processStepsCSS from "./process-steps.css.js";
|
|
9
|
+
|
|
10
|
+
class ProcessSteps extends LitElement {
|
|
11
|
+
static properties = {
|
|
12
|
+
title : { type: String },
|
|
13
|
+
description: { type: String },
|
|
14
|
+
steps : { type: Array } // [{ icon: TemplateResult|String, title: String, description: String }]
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
static styles = [tokens, processStepsCSS];
|
|
18
|
+
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
this.title = "";
|
|
22
|
+
this.description = "";
|
|
23
|
+
this.steps = [];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
_renderIcon(icon) {
|
|
27
|
+
if (!icon) return nothing;
|
|
28
|
+
if (typeof icon === "string") {
|
|
29
|
+
return html`<img src="${icon}" alt="" class="bd-processsteps-icon-img" />`;
|
|
30
|
+
}
|
|
31
|
+
return icon;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
render() {
|
|
35
|
+
return html`
|
|
36
|
+
<div class="bd-processsteps-container">
|
|
37
|
+
${this.title
|
|
38
|
+
? html`
|
|
39
|
+
<bd-h as="h2" class="bd-processsteps-title">
|
|
40
|
+
<slot name="title">${this.title}</slot>
|
|
41
|
+
</bd-h>
|
|
42
|
+
`
|
|
43
|
+
: nothing}
|
|
44
|
+
|
|
45
|
+
${this.description
|
|
46
|
+
? html`
|
|
47
|
+
<bd-p kind="regular" class="bd-processsteps-description">
|
|
48
|
+
<slot name="description">${this.description}</slot>
|
|
49
|
+
</bd-p>
|
|
50
|
+
`
|
|
51
|
+
: nothing}
|
|
52
|
+
|
|
53
|
+
<div class="bd-processsteps-grid">
|
|
54
|
+
${this.steps.map(
|
|
55
|
+
(step) => html`
|
|
56
|
+
<div class="bd-processsteps-step">
|
|
57
|
+
<div class="bd-processsteps-divider"></div>
|
|
58
|
+
<div class="bd-processsteps-icon-wrap">${this._renderIcon(step.icon)}</div>
|
|
59
|
+
<bd-h as="h4" class="bd-processsteps-step-title">${step.title}</bd-h>
|
|
60
|
+
<bd-p kind="regular" class="bd-processsteps-step-description">${step.description}</bd-p>
|
|
61
|
+
</div>
|
|
62
|
+
`
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<slot name="steps"></slot>
|
|
67
|
+
</div>
|
|
68
|
+
`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
customElements.define("bd-process-steps", ProcessSteps);
|