@repobit/dex-system-design 0.22.12 → 0.23.1
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 +32 -0
- package/package.json +3 -2
- package/src/components/Button/button.stories.js +292 -120
- package/src/components/accordion/accordion-bg.css.js +7 -2
- package/src/components/accordion/accordion-bg.stories.js +268 -449
- package/src/components/accordion/accordion.stories.js +259 -265
- package/src/components/anchor/anchor.stories.js +160 -159
- package/src/components/awards/awards-icon.js +44 -0
- package/src/components/awards/awards.css.js +328 -0
- package/src/components/awards/awards.js +224 -0
- package/src/components/awards/awards.stories.js +447 -0
- package/src/components/back/back.stories.js +100 -375
- package/src/components/badge/badge.stories.js +241 -129
- package/src/components/breadcrumb/breadcrumb.stories.js +218 -219
- package/src/components/cards/card.stories.js +174 -622
- package/src/components/carousel/carousel.stories.js +196 -225
- package/src/components/checkbox/checkbox.stories.js +136 -51
- package/src/components/compare/compare.css.js +237 -0
- package/src/components/compare/compare.js +253 -0
- package/src/components/compare/compare.stories.js +372 -0
- package/src/components/display/display.stories.js +91 -297
- package/src/components/divider/divider.stories.js +160 -342
- package/src/components/footer/footer.stories.js +177 -402
- package/src/components/header/header.stories.js +130 -338
- package/src/components/heading/heading.js +8 -5
- package/src/components/heading/heading.stories.js +162 -471
- package/src/components/highlight/highlight.stories.js +153 -38
- package/src/components/image/image.stories.js +135 -563
- package/src/components/input/custom-form.stories.js +761 -224
- package/src/components/link/link.js +29 -12
- package/src/components/link/link.stories.js +130 -468
- package/src/components/modal/modal.stories.js +174 -28
- package/src/components/paragraph/paragraph.css.js +10 -1
- package/src/components/paragraph/paragraph.stories.js +85 -410
- package/src/components/picture/picture.stories.js +147 -561
- package/src/components/radio/radio.stories.js +230 -81
- package/src/components/tabs/tabs.stories.js +126 -10
- package/src/components/termsOfUse/terms.stories.js +223 -8
- package/src/tokens/tokens.js +1 -0
|
@@ -6,30 +6,46 @@ class BdLink extends LitElement {
|
|
|
6
6
|
static properties = {
|
|
7
7
|
href : { type: String },
|
|
8
8
|
target : { type: String },
|
|
9
|
-
kind : { type: String,
|
|
9
|
+
kind : { type: String, reflect: true },
|
|
10
10
|
underline: { type: Boolean, reflect: true },
|
|
11
|
-
disabled : { type: Boolean, reflect: true }
|
|
11
|
+
disabled : { type: Boolean, reflect: true },
|
|
12
|
+
fontSize : { type: String, attribute: "font-size" },
|
|
13
|
+
color : { type: String }
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
constructor() {
|
|
15
17
|
super();
|
|
16
|
-
this.href
|
|
17
|
-
this.target
|
|
18
|
-
this.kind
|
|
18
|
+
this.href = "#";
|
|
19
|
+
this.target = "_self";
|
|
20
|
+
this.kind = "primary";
|
|
19
21
|
this.underline = false;
|
|
20
|
-
this.disabled
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
this.fontSize = "";
|
|
24
|
+
this.color = "";
|
|
21
25
|
}
|
|
22
26
|
|
|
23
27
|
static styles = [tokens, linkCSS];
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
get _classes() {
|
|
30
|
+
return [
|
|
31
|
+
"bd-link",
|
|
32
|
+
`bd-link--${this.kind}`,
|
|
33
|
+
this.underline ? "bd-link--underline" : "",
|
|
34
|
+
this.disabled ? "bd-link--disabled" : ""
|
|
35
|
+
].filter(Boolean).join(" ");
|
|
36
|
+
}
|
|
29
37
|
|
|
38
|
+
get _inlineStyle() {
|
|
39
|
+
const styles = [];
|
|
40
|
+
if (this.fontSize) styles.push(`font-size: ${this.fontSize}`);
|
|
41
|
+
if (this.color) styles.push(`color: ${this.color}`);
|
|
42
|
+
return styles.join("; ");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
render() {
|
|
30
46
|
if (this.disabled) {
|
|
31
47
|
return html`
|
|
32
|
-
<span class="
|
|
48
|
+
<span class="${this._classes}" style="${this._inlineStyle}">
|
|
33
49
|
<slot></slot>
|
|
34
50
|
</span>
|
|
35
51
|
`;
|
|
@@ -37,7 +53,8 @@ class BdLink extends LitElement {
|
|
|
37
53
|
|
|
38
54
|
return html`
|
|
39
55
|
<a
|
|
40
|
-
class="
|
|
56
|
+
class="${this._classes}"
|
|
57
|
+
style="${this._inlineStyle}"
|
|
41
58
|
href="${this.href}"
|
|
42
59
|
target="${this.target}"
|
|
43
60
|
@click="${this._handleClick}"
|