@repobit/dex-system-design 0.20.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/package.json +2 -2
- package/src/components/Button/button.stories.js +51 -51
- package/src/components/accordion/accordion-bg.css.js +141 -123
- package/src/components/accordion/accordion-bg.stories.js +102 -72
- package/src/components/accordion/accordion-light.stories.js +78 -53
- package/src/components/anchor/anchor.stories.js +24 -22
- package/src/components/back/back.css.js +56 -0
- package/src/components/back/back.js +39 -0
- package/src/components/back/back.stories.js +184 -0
- package/src/components/badge/badge.stories.js +3 -10
- package/src/components/breadcrumb/breadcrumb.css.js +98 -0
- package/src/components/breadcrumb/breadcrumb.js +136 -0
- package/src/components/breadcrumb/breadcrumb.stories.js +109 -0
- package/src/components/cards/card.js +2 -1
- package/src/components/cards/card.stories.js +49 -49
- package/src/components/carousel/carousel.css.js +8 -1
- package/src/components/carousel/carousel.js +0 -1
- package/src/components/carousel/carousel.stories.js +21 -17
- package/src/components/display/display.css.js +68 -0
- package/src/components/display/display.js +26 -0
- package/src/components/display/display.stories.js +339 -0
- package/src/components/divider/divider-horizontal.js +1 -1
- package/src/components/footer/footer-links-group.js +3 -3
- package/src/components/footer/footer-lp.stories.js +0 -1
- package/src/components/footer/footer.css.js +0 -6
- package/src/components/footer/footer.js +21 -41
- package/src/components/footer/footer.stories.js +0 -1
- package/src/components/header/header.js +11 -11
- package/src/components/header/header.stories.js +36 -4
- package/src/components/heading/heading.css.js +79 -0
- package/src/components/heading/heading.js +79 -0
- package/src/components/heading/heading.stories.js +260 -0
- package/src/components/highlight/highlight.stories.js +1 -1
- package/src/components/image/image.css.js +101 -0
- package/src/components/image/image.js +57 -0
- package/src/components/image/image.stories.js +245 -0
- package/src/components/light-carousel/light-carousel-simple.js +3 -2
- package/src/components/light-carousel/light-carousel.js +3 -7
- package/src/components/light-carousel/light-carousel.stories.js +12 -13
- package/src/components/link/link.css.js +107 -18
- package/src/components/link/link.js +16 -12
- package/src/components/link/link.stories.js +177 -0
- package/src/components/list/list-item/list-item.css.js +106 -0
- package/src/components/list/list-item/list-item.js +43 -0
- package/src/components/list/list-item/list-item.stories.js +79 -0
- package/src/components/list/list.css.js +175 -0
- package/src/components/list/list.js +44 -0
- package/src/components/modal/modal.js +6 -5
- package/src/components/paragraph/paragraph.css.js +41 -11
- package/src/components/paragraph/paragraph.js +7 -45
- package/src/components/paragraph/paragraph.stories.js +235 -0
- package/src/components/picture/picture.css.js +0 -0
- package/src/components/picture/picture.js +46 -0
- package/src/components/picture/picture.stories.js +275 -0
- package/src/components/pricing-cards/pricing-card-header.js +9 -7
- package/src/components/pricing-cards/pricing-card-pricing.js +11 -12
- package/src/components/pricing-cards/pricing-card.js +37 -36
- package/src/components/tabs/tabs.js +44 -47
- package/src/components/termsOfUse/terms.js +77 -161
- package/src/components/termsOfUse/terms.stories.js +4 -3
- package/src/stories/Header.js +6 -6
- package/src/tokens/tokens.stories.js +9 -8
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import imgCSS from "./image.css.js";
|
|
4
|
+
|
|
5
|
+
export class BdImg extends LitElement {
|
|
6
|
+
static properties = {
|
|
7
|
+
src : { type: String },
|
|
8
|
+
alt : { type: String },
|
|
9
|
+
width : { type: Number },
|
|
10
|
+
height : { type: Number },
|
|
11
|
+
loading: { type: String },
|
|
12
|
+
fit : { type: String }
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.src = "";
|
|
18
|
+
this.alt = "";
|
|
19
|
+
this.width = null;
|
|
20
|
+
this.height = null;
|
|
21
|
+
this.loading = "lazy";
|
|
22
|
+
this.fit = "cover";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() {
|
|
26
|
+
return html`
|
|
27
|
+
<img
|
|
28
|
+
src="${this.src}"
|
|
29
|
+
alt="${this.alt}"
|
|
30
|
+
width="${this.width}"
|
|
31
|
+
height="${this.height}"
|
|
32
|
+
loading="${this.loading}"
|
|
33
|
+
class="bd-img ${this.fit}"
|
|
34
|
+
@load="${this._handleLoad}"
|
|
35
|
+
@error="${this._handleError}"
|
|
36
|
+
/>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_handleLoad() {
|
|
41
|
+
this.dispatchEvent(new CustomEvent('image-loaded', {
|
|
42
|
+
bubbles : true,
|
|
43
|
+
composed: true
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_handleError() {
|
|
48
|
+
this.dispatchEvent(new CustomEvent('image-error', {
|
|
49
|
+
bubbles : true,
|
|
50
|
+
composed: true
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static styles = [tokens, imgCSS];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
customElements.define("bd-img", BdImg);
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../heading/heading.js';
|
|
3
|
+
import './image.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
title : 'Atoms/Image',
|
|
7
|
+
component: 'bd-img',
|
|
8
|
+
argTypes : {
|
|
9
|
+
src: {
|
|
10
|
+
control : 'text',
|
|
11
|
+
description: 'Image source URL'
|
|
12
|
+
},
|
|
13
|
+
alt: {
|
|
14
|
+
control : 'text',
|
|
15
|
+
description: 'Alt text for accessibility'
|
|
16
|
+
},
|
|
17
|
+
width: {
|
|
18
|
+
control : 'number',
|
|
19
|
+
description: 'Image width'
|
|
20
|
+
},
|
|
21
|
+
height: {
|
|
22
|
+
control : 'number',
|
|
23
|
+
description: 'Image height'
|
|
24
|
+
},
|
|
25
|
+
loading: {
|
|
26
|
+
control : { type: 'select' },
|
|
27
|
+
options : ['lazy', 'eager'],
|
|
28
|
+
description: 'Loading strategy'
|
|
29
|
+
},
|
|
30
|
+
fit: {
|
|
31
|
+
control : { type: 'select' },
|
|
32
|
+
options : ['cover', 'contain', 'fill', 'none', 'scale-down'],
|
|
33
|
+
description: 'Object fit property'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
description: {
|
|
39
|
+
component: 'A simple image component with enhanced styling and event handling.'
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const Template = (args) => html`
|
|
46
|
+
<bd-img
|
|
47
|
+
src="${args.src}"
|
|
48
|
+
alt="${args.alt}"
|
|
49
|
+
width="${args.width}"
|
|
50
|
+
height="${args.height}"
|
|
51
|
+
loading="${args.loading}"
|
|
52
|
+
fit="${args.fit}"
|
|
53
|
+
></bd-img>
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
export const Default = Template.bind({});
|
|
57
|
+
Default.args = {
|
|
58
|
+
src : '/assets/bd-header-us.jpg',
|
|
59
|
+
alt : 'Bitdefender Security Illustration',
|
|
60
|
+
width : 750,
|
|
61
|
+
height : 500,
|
|
62
|
+
loading: 'lazy',
|
|
63
|
+
fit : 'cover'
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export const HeaderImageExample = Template.bind({});
|
|
67
|
+
HeaderImageExample.args = {
|
|
68
|
+
src : '/assets/bd-header-us.jpg',
|
|
69
|
+
alt : 'Bitdefender Ultimate Security Header',
|
|
70
|
+
width : 750,
|
|
71
|
+
height : 500,
|
|
72
|
+
loading: 'eager',
|
|
73
|
+
fit : 'cover'
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export const ObjectFitExamples = () => html`
|
|
77
|
+
<div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 800px;">
|
|
78
|
+
<div>
|
|
79
|
+
<bd-h as="h4">Cover</bd-h>
|
|
80
|
+
<bd-img
|
|
81
|
+
src="/assets/bd-header-us.jpg"
|
|
82
|
+
alt="Cover fit example"
|
|
83
|
+
width="200"
|
|
84
|
+
height="200"
|
|
85
|
+
fit="cover"
|
|
86
|
+
></bd-img>
|
|
87
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
88
|
+
Fills container, may crop - perfect for headers
|
|
89
|
+
</p>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div>
|
|
93
|
+
<bd-h as="h4">Contain</bd-h>
|
|
94
|
+
<bd-img
|
|
95
|
+
src="/assets/bd-header-us.jpg"
|
|
96
|
+
alt="Contain fit example"
|
|
97
|
+
width="200"
|
|
98
|
+
height="200"
|
|
99
|
+
fit="contain"
|
|
100
|
+
></bd-img>
|
|
101
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
102
|
+
Fits entirely, may have empty space
|
|
103
|
+
</p>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div>
|
|
107
|
+
<bd-h as="h4">Fill</bd-h>
|
|
108
|
+
<bd-img
|
|
109
|
+
src="/assets/bd-header-us.jpg"
|
|
110
|
+
alt="Fill fit example"
|
|
111
|
+
width="200"
|
|
112
|
+
height="200"
|
|
113
|
+
fit="fill"
|
|
114
|
+
></bd-img>
|
|
115
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
116
|
+
Stretches to fill container - may distort
|
|
117
|
+
</p>
|
|
118
|
+
</div>
|
|
119
|
+
|
|
120
|
+
<div>
|
|
121
|
+
<bd-h as="h4">Scale Down</bd-h>
|
|
122
|
+
<bd-img
|
|
123
|
+
src="/assets/bd-header-us.jpg"
|
|
124
|
+
alt="Scale down fit example"
|
|
125
|
+
width="200"
|
|
126
|
+
height="200"
|
|
127
|
+
fit="scale-down"
|
|
128
|
+
></bd-img>
|
|
129
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
130
|
+
Like contain, but never scales up
|
|
131
|
+
</p>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
`;
|
|
135
|
+
|
|
136
|
+
export const StylingVariants = () => html`
|
|
137
|
+
<div style="display: flex; flex-wrap: wrap; gap: 2rem; align-items: start;">
|
|
138
|
+
<div style="text-align: center;">
|
|
139
|
+
<bd-h as="h4">Rounded</bd-h>
|
|
140
|
+
<bd-img
|
|
141
|
+
src="/assets/bd-header-us.jpg"
|
|
142
|
+
alt="Rounded security image"
|
|
143
|
+
width="150"
|
|
144
|
+
height="100"
|
|
145
|
+
fit="cover"
|
|
146
|
+
class="rounded"
|
|
147
|
+
></bd-img>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div style="text-align: center;">
|
|
151
|
+
<bd-h as="h4">With Shadow</bd-h>
|
|
152
|
+
<bd-img
|
|
153
|
+
src="/assets/bd-header-us.jpg"
|
|
154
|
+
alt="Image with shadow"
|
|
155
|
+
width="150"
|
|
156
|
+
height="100"
|
|
157
|
+
fit="cover"
|
|
158
|
+
class="shadow-lg"
|
|
159
|
+
></bd-img>
|
|
160
|
+
</div>
|
|
161
|
+
|
|
162
|
+
<div style="text-align: center;">
|
|
163
|
+
<bd-h as="h4">Bordered</bd-h>
|
|
164
|
+
<bd-img
|
|
165
|
+
src="/assets/bd-header-us.jpg"
|
|
166
|
+
alt="Bordered image"
|
|
167
|
+
width="150"
|
|
168
|
+
height="100"
|
|
169
|
+
fit="cover"
|
|
170
|
+
class="bordered-primary"
|
|
171
|
+
></bd-img>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
export const LoadingExamples = () => html`
|
|
177
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; max-width: 600px;">
|
|
178
|
+
<div>
|
|
179
|
+
<bd-h as="h4">Lazy Loading</bd-h>
|
|
180
|
+
<bd-img
|
|
181
|
+
src="/assets/bd-header-us.jpg"
|
|
182
|
+
alt="Lazy loaded security image"
|
|
183
|
+
width="400"
|
|
184
|
+
height="250"
|
|
185
|
+
loading="lazy"
|
|
186
|
+
fit="cover"
|
|
187
|
+
></bd-img>
|
|
188
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
189
|
+
Loads when image enters viewport - better for performance
|
|
190
|
+
</p>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<div>
|
|
194
|
+
<bd-h as="h4">Eager Loading</bd-h>
|
|
195
|
+
<bd-img
|
|
196
|
+
src="/assets/bd-header-us.jpg"
|
|
197
|
+
alt="Eager loaded security image"
|
|
198
|
+
width="400"
|
|
199
|
+
height="250"
|
|
200
|
+
loading="eager"
|
|
201
|
+
fit="cover"
|
|
202
|
+
></bd-img>
|
|
203
|
+
<p style="font-size: 0.875rem; color: #666; margin-top: 0.5rem;">
|
|
204
|
+
Loads immediately - use for header images
|
|
205
|
+
</p>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
`;
|
|
209
|
+
|
|
210
|
+
export const ResponsiveSizes = () => html`
|
|
211
|
+
<div style="display: flex; flex-direction: column; gap: 2rem; max-width: 800px;">
|
|
212
|
+
<div>
|
|
213
|
+
<bd-h as="h4">Small (400px)</bd-h>
|
|
214
|
+
<bd-img
|
|
215
|
+
src="/assets/bd-header-us.jpg"
|
|
216
|
+
alt="Small security image"
|
|
217
|
+
width="400"
|
|
218
|
+
height="250"
|
|
219
|
+
fit="cover"
|
|
220
|
+
></bd-img>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div>
|
|
224
|
+
<bd-h as="h4">Medium (600px)</bd-h>
|
|
225
|
+
<bd-img
|
|
226
|
+
src="/assets/bd-header-us.jpg"
|
|
227
|
+
alt="Medium security image"
|
|
228
|
+
width="600"
|
|
229
|
+
height="375"
|
|
230
|
+
fit="cover"
|
|
231
|
+
></bd-img>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<div>
|
|
235
|
+
<bd-h as="h4">Large (750px - Original)</bd-h>
|
|
236
|
+
<bd-img
|
|
237
|
+
src="/assets/bd-header-us.jpg"
|
|
238
|
+
alt="Large security image"
|
|
239
|
+
width="750"
|
|
240
|
+
height="500"
|
|
241
|
+
fit="cover"
|
|
242
|
+
></bd-img>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
2
|
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../heading/heading.js";
|
|
3
4
|
import carouselCSS from "../light-carousel/light-carousel-simple.css.js";
|
|
4
5
|
|
|
5
6
|
class CustomLightCarouselSimple extends LitElement {
|
|
@@ -56,7 +57,7 @@ class LightCarouselSimpleItem extends LitElement {
|
|
|
56
57
|
${this.title
|
|
57
58
|
? html`
|
|
58
59
|
<div class="bd-light-title-badge-wrapper-s">
|
|
59
|
-
<
|
|
60
|
+
<bd-h as="h4">${this.title}</bd-h>
|
|
60
61
|
</div>
|
|
61
62
|
`
|
|
62
63
|
: ""}
|
|
@@ -70,4 +71,4 @@ CustomLightCarouselSimple.styles = [tokens, carouselCSS];
|
|
|
70
71
|
LightCarouselSimpleItem.styles = [tokens, carouselCSS];
|
|
71
72
|
|
|
72
73
|
customElements.define("bd-light-carousel-simple-item", LightCarouselSimpleItem);
|
|
73
|
-
customElements.define("bd-light-carousel-simple-section", CustomLightCarouselSimple);
|
|
74
|
+
customElements.define("bd-light-carousel-simple-section", CustomLightCarouselSimple);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LitElement, html } from "lit";
|
|
2
2
|
import { tokens } from "../../tokens/tokens.js";
|
|
3
|
+
import "../heading/heading.js";
|
|
3
4
|
import carouselCSS from "../light-carousel/light-carousel.css.js";
|
|
4
5
|
|
|
5
6
|
class CustomLightCarousel extends LitElement {
|
|
@@ -12,8 +13,6 @@ class CustomLightCarousel extends LitElement {
|
|
|
12
13
|
this.title = "";
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
16
|
render() {
|
|
18
17
|
return html`
|
|
19
18
|
<section class="bd-light-carousel">
|
|
@@ -56,7 +55,7 @@ class LightCarouselItem extends LitElement {
|
|
|
56
55
|
${this.title || this.badge
|
|
57
56
|
? html`
|
|
58
57
|
<div class="bd-light-title-badge-wrapper">
|
|
59
|
-
${this.title ? html`<
|
|
58
|
+
${this.title ? html`<bd-h as="h6" padding="10px 0" fontWeight="700">${this.title}</bd-h>` : ""}
|
|
60
59
|
${this.badge
|
|
61
60
|
? html`<bd-badge color="#026DFF">${this.badge}</bd-badge>`
|
|
62
61
|
: ""}
|
|
@@ -68,12 +67,9 @@ class LightCarouselItem extends LitElement {
|
|
|
68
67
|
</div>
|
|
69
68
|
`;
|
|
70
69
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
70
|
}
|
|
74
71
|
CustomLightCarousel.styles = [tokens, carouselCSS];
|
|
75
72
|
LightCarouselItem.styles = [tokens, carouselCSS];
|
|
76
73
|
|
|
77
74
|
customElements.define("bd-light-carousel-item", LightCarouselItem);
|
|
78
|
-
|
|
79
|
-
customElements.define("bd-light-carousel-section", CustomLightCarousel);
|
|
75
|
+
customElements.define("bd-light-carousel-section", CustomLightCarousel);
|
|
@@ -19,15 +19,15 @@ const Template = (args) => html`
|
|
|
19
19
|
icon="/assets/light-carousel-img1.png"
|
|
20
20
|
badge="FAQ"
|
|
21
21
|
>
|
|
22
|
-
<p>Bitdefender Internet Security provides the best protection...</p>
|
|
23
|
-
<p>Advanced AI and behavior-based detection ensure safety online and offline.</p>
|
|
22
|
+
<bd-p kind="small">Bitdefender Internet Security provides the best protection...</bd-p>
|
|
23
|
+
<bd-p kind="small">Advanced AI and behavior-based detection ensure safety online and offline.</bd-p>
|
|
24
24
|
</bd-light-carousel-item>
|
|
25
25
|
|
|
26
26
|
<bd-light-carousel-item
|
|
27
27
|
title="How to install Bitdefender on another device?"
|
|
28
28
|
icon="/assets/light-carousel-img1.png"
|
|
29
29
|
>
|
|
30
|
-
<p>You can install Bitdefender on other devices by logging into your Central account and using the 'My Devices' tab.</p>
|
|
30
|
+
<bd-p kind="small">You can install Bitdefender on other devices by logging into your Central account and using the 'My Devices' tab.</bd-p>
|
|
31
31
|
</bd-light-carousel-item>
|
|
32
32
|
|
|
33
33
|
<bd-light-carousel-item
|
|
@@ -35,7 +35,7 @@ const Template = (args) => html`
|
|
|
35
35
|
icon="/assets/light-carousel-img1.png"
|
|
36
36
|
badge="How To"
|
|
37
37
|
>
|
|
38
|
-
<p>Yes, just remove the license from the old device via Central and activate it on the new one.</p>
|
|
38
|
+
<bd-p kind="small">Yes, just remove the license from the old device via Central and activate it on the new one.</bd-p>
|
|
39
39
|
</bd-light-carousel-item>
|
|
40
40
|
</bd-light-carousel-section>
|
|
41
41
|
`;
|
|
@@ -45,37 +45,36 @@ Default.args = {
|
|
|
45
45
|
title: "Need help? We've got answers!"
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
// NEW: Simple version
|
|
49
48
|
const TemplateSimple = (args) => html`
|
|
50
49
|
<bd-light-carousel-simple-section title="${args.title}">
|
|
51
50
|
<bd-light-carousel-simple-item
|
|
52
51
|
title="Scam Copilot Chatbot"
|
|
53
52
|
icon="/assets/light-carousel-img1.png"
|
|
54
53
|
>
|
|
55
|
-
<p>
|
|
54
|
+
<bd-p kind="small">
|
|
56
55
|
Specialized AI chatbot that helps you identify suspicious online
|
|
57
|
-
interactions so you don
|
|
58
|
-
</p>
|
|
56
|
+
interactions so you don't become a victim.
|
|
57
|
+
</bd-p>
|
|
59
58
|
</bd-light-carousel-simple-item>
|
|
60
59
|
|
|
61
60
|
<bd-light-carousel-simple-item
|
|
62
61
|
title="Scam Wave Alerts"
|
|
63
62
|
icon="/assets/light-carousel-img1.png"
|
|
64
63
|
>
|
|
65
|
-
<p>
|
|
64
|
+
<bd-p kind="small">
|
|
66
65
|
Stay informed with real-time alerts about ongoing scam outbreaks
|
|
67
66
|
detected in your area automatically.
|
|
68
|
-
</p>
|
|
67
|
+
</bd-p>
|
|
69
68
|
</bd-light-carousel-simple-item>
|
|
70
69
|
|
|
71
70
|
<bd-light-carousel-simple-item
|
|
72
71
|
title="Online Scam Protection"
|
|
73
72
|
icon="/assets/light-carousel-img1.png"
|
|
74
73
|
>
|
|
75
|
-
<p>
|
|
74
|
+
<bd-p kind="small">
|
|
76
75
|
Focused on browsing activities, it specializes in detecting the newest
|
|
77
76
|
scam patterns and tactics.
|
|
78
|
-
</p>
|
|
77
|
+
</bd-p>
|
|
79
78
|
</bd-light-carousel-simple-item>
|
|
80
79
|
</bd-light-carousel-simple-section>
|
|
81
80
|
`;
|
|
@@ -83,4 +82,4 @@ const TemplateSimple = (args) => html`
|
|
|
83
82
|
export const Simple = TemplateSimple.bind({});
|
|
84
83
|
Simple.args = {
|
|
85
84
|
title: "Our AI-powered platform that detects and fights scams. In real time."
|
|
86
|
-
};
|
|
85
|
+
};
|
|
@@ -1,41 +1,130 @@
|
|
|
1
1
|
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export default css`
|
|
4
|
-
:host {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
font-family: var(--typography-fontFamily-sans);
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
4
|
.bd-link {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--spacing-4);
|
|
8
|
+
color: var(--color-blue-500);
|
|
14
9
|
text-decoration: none;
|
|
10
|
+
font-family: var(--typography-fontFamily-sans);
|
|
11
|
+
font-size: var(--typography-fontSize-base);
|
|
12
|
+
font-weight: var(--typography-fontWeight-normal);
|
|
13
|
+
line-height: var(--typography-lineHeight-normal);
|
|
14
|
+
transition: all 0.15s ease-in-out;
|
|
15
15
|
cursor: pointer;
|
|
16
|
-
transition: color 0.2s ease;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
/* Primary (default) */
|
|
19
|
+
.bd-link--primary {
|
|
20
|
+
color: var(--color-blue-500);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.bd-link--
|
|
23
|
+
.bd-link--primary:hover {
|
|
24
|
+
color: var(--color-blue-700);
|
|
24
25
|
text-decoration: underline;
|
|
26
|
+
text-underline-offset: 2px;
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
/* Secondary */
|
|
27
30
|
.bd-link--secondary {
|
|
28
|
-
color: var(--color-
|
|
31
|
+
color: var(--color-neutral-600);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.bd-link--secondary:hover {
|
|
35
|
+
color: var(--color-neutral-800);
|
|
36
|
+
text-decoration: underline;
|
|
37
|
+
text-underline-offset: 2px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Light variant for dark backgrounds */
|
|
41
|
+
.bd-link--light {
|
|
42
|
+
color: var(--color-neutral-0);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.bd-link--light:hover {
|
|
46
|
+
color: var(--color-neutral-0); /* Rămâne albă */
|
|
47
|
+
text-decoration: none; /* Fără underline */
|
|
29
48
|
}
|
|
30
49
|
|
|
50
|
+
/* Danger */
|
|
31
51
|
.bd-link--danger {
|
|
32
|
-
color: var(--color-
|
|
52
|
+
color: var(--color-red-500);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.bd-link--danger:hover {
|
|
56
|
+
color: var(--color-red-700);
|
|
57
|
+
text-decoration: underline;
|
|
58
|
+
text-underline-offset: 2px;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Subtle */
|
|
62
|
+
.bd-link--subtle {
|
|
63
|
+
color: var(--color-neutral-500);
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.bd-link--subtle:hover {
|
|
68
|
+
color: var(--color-neutral-700);
|
|
69
|
+
text-decoration: underline;
|
|
70
|
+
text-underline-offset: 2px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Bold */
|
|
74
|
+
.bd-link--bold {
|
|
75
|
+
color: var(--color-blue-600);
|
|
76
|
+
font-weight: var(--typography-fontWeight-semibold);
|
|
77
|
+
text-decoration: none;
|
|
33
78
|
}
|
|
34
79
|
|
|
80
|
+
.bd-link--bold:hover {
|
|
81
|
+
color: var(--color-blue-800);
|
|
82
|
+
text-decoration: underline;
|
|
83
|
+
text-underline-offset: 2px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Underline modifier */
|
|
87
|
+
.bd-link--underline {
|
|
88
|
+
text-decoration: underline;
|
|
89
|
+
text-underline-offset: 2px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.bd-link--underline:hover {
|
|
93
|
+
text-decoration-thickness: 2px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Disabled state */
|
|
35
97
|
.bd-link--disabled {
|
|
36
|
-
color: var(--color-
|
|
98
|
+
color: var(--color-neutral-400);
|
|
99
|
+
cursor: not-allowed;
|
|
100
|
+
text-decoration: none;
|
|
37
101
|
pointer-events: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/* Focus styles for all variants */
|
|
106
|
+
.bd-link:focus {
|
|
107
|
+
outline: 2px solid var(--color-blue-300);
|
|
108
|
+
outline-offset: 2px;
|
|
109
|
+
border-radius: 2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Ensure disabled span has same display */
|
|
113
|
+
.bd-link.bd-link--disabled {
|
|
114
|
+
display: inline-flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* Additional specificity for edge cases */
|
|
119
|
+
a.bd-link {
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
span.bd-link {
|
|
38
124
|
cursor: default;
|
|
39
|
-
text-decoration: none;
|
|
40
125
|
}
|
|
41
|
-
|
|
126
|
+
|
|
127
|
+
span.bd-link--disabled {
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
@@ -6,8 +6,8 @@ class BdLink extends LitElement {
|
|
|
6
6
|
static properties = {
|
|
7
7
|
href : { type: String },
|
|
8
8
|
target : { type: String },
|
|
9
|
-
kind : { type: String },
|
|
10
|
-
underline: { type: Boolean },
|
|
9
|
+
kind : { type: String, reflect: true },
|
|
10
|
+
underline: { type: Boolean, reflect: true },
|
|
11
11
|
disabled : { type: Boolean, reflect: true }
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -23,18 +23,22 @@ class BdLink extends LitElement {
|
|
|
23
23
|
static styles = [tokens, linkCSS];
|
|
24
24
|
|
|
25
25
|
render() {
|
|
26
|
-
const kindClass = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
const kindClass = `bd-link--${this.kind}`;
|
|
27
|
+
const underlineClass = this.underline ? "bd-link--underline" : "";
|
|
28
|
+
const disabledClass = this.disabled ? "bd-link--disabled" : "";
|
|
29
|
+
|
|
30
|
+
if (this.disabled) {
|
|
31
|
+
return html`
|
|
32
|
+
<span class="bd-link ${kindClass} ${underlineClass} ${disabledClass}">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</span>
|
|
35
|
+
`;
|
|
36
|
+
}
|
|
31
37
|
|
|
32
38
|
return html`
|
|
33
39
|
<a
|
|
34
|
-
class="bd-link ${kindClass} ${
|
|
35
|
-
|
|
36
|
-
: ""}"
|
|
37
|
-
href="${this.disabled ? "javascript:void(0)" : this.href}"
|
|
40
|
+
class="bd-link ${kindClass} ${underlineClass} ${disabledClass}"
|
|
41
|
+
href="${this.href}"
|
|
38
42
|
target="${this.target}"
|
|
39
43
|
@click="${this._handleClick}"
|
|
40
44
|
>
|
|
@@ -51,4 +55,4 @@ class BdLink extends LitElement {
|
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
57
|
|
|
54
|
-
customElements.define("bd-link", BdLink);
|
|
58
|
+
customElements.define("bd-link", BdLink);
|