@repobit/dex-system-design 0.22.12 → 0.23.2

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/package.json +4 -3
  3. package/src/components/Button/button.stories.js +292 -120
  4. package/src/components/accordion/accordion-bg.css.js +7 -2
  5. package/src/components/accordion/accordion-bg.stories.js +268 -449
  6. package/src/components/accordion/accordion.stories.js +259 -265
  7. package/src/components/anchor/anchor.stories.js +160 -159
  8. package/src/components/awards/awards-icon.js +44 -0
  9. package/src/components/awards/awards.css.js +328 -0
  10. package/src/components/awards/awards.js +224 -0
  11. package/src/components/awards/awards.stories.js +447 -0
  12. package/src/components/back/back.stories.js +100 -375
  13. package/src/components/badge/badge.stories.js +241 -129
  14. package/src/components/breadcrumb/breadcrumb.stories.js +218 -219
  15. package/src/components/cards/card.stories.js +174 -622
  16. package/src/components/carousel/carousel.stories.js +196 -225
  17. package/src/components/checkbox/checkbox.stories.js +136 -51
  18. package/src/components/compare/compare.css.js +237 -0
  19. package/src/components/compare/compare.js +253 -0
  20. package/src/components/compare/compare.stories.js +372 -0
  21. package/src/components/display/display.stories.js +91 -297
  22. package/src/components/divider/divider.stories.js +160 -342
  23. package/src/components/footer/footer.stories.js +177 -402
  24. package/src/components/header/header.stories.js +130 -338
  25. package/src/components/heading/heading.js +8 -5
  26. package/src/components/heading/heading.stories.js +162 -471
  27. package/src/components/highlight/highlight.stories.js +153 -38
  28. package/src/components/image/image.stories.js +135 -563
  29. package/src/components/input/custom-form.stories.js +761 -224
  30. package/src/components/link/link.js +29 -12
  31. package/src/components/link/link.stories.js +130 -468
  32. package/src/components/modal/modal.stories.js +174 -28
  33. package/src/components/paragraph/paragraph.css.js +10 -1
  34. package/src/components/paragraph/paragraph.stories.js +85 -410
  35. package/src/components/picture/picture.stories.js +147 -561
  36. package/src/components/radio/radio.stories.js +230 -81
  37. package/src/components/tabs/tabs.stories.js +126 -10
  38. package/src/components/termsOfUse/terms.stories.js +223 -8
  39. 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, reflect: true },
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 = "_self";
18
- this.kind = "primary";
18
+ this.href = "#";
19
+ this.target = "_self";
20
+ this.kind = "primary";
19
21
  this.underline = false;
20
- this.disabled = false;
22
+ this.disabled = false;
23
+ this.fontSize = "";
24
+ this.color = "";
21
25
  }
22
26
 
23
27
  static styles = [tokens, linkCSS];
24
28
 
25
- render() {
26
- const kindClass = `bd-link--${this.kind}`;
27
- const underlineClass = this.underline ? "bd-link--underline" : "";
28
- const disabledClass = this.disabled ? "bd-link--disabled" : "";
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="bd-link ${kindClass} ${underlineClass} ${disabledClass}">
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="bd-link ${kindClass} ${underlineClass} ${disabledClass}"
56
+ class="${this._classes}"
57
+ style="${this._inlineStyle}"
41
58
  href="${this.href}"
42
59
  target="${this.target}"
43
60
  @click="${this._handleClick}"