@repobit/dex-system-design 0.11.0 → 0.14.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.
Files changed (97) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/package.json +2 -2
  3. package/src/assets/icons/Identity_protection.png +0 -0
  4. package/src/assets/icons/device_protection.png +0 -0
  5. package/src/assets/icons/financial_insurance.png +0 -0
  6. package/src/assets/icons/privacy_protection.png +0 -0
  7. package/src/assets/icons/user_guide.png +0 -0
  8. package/src/components/Button/Button.js +19 -16
  9. package/src/components/Button/button.css.js +18 -16
  10. package/src/components/Button/icons.js +8 -8
  11. package/src/components/FAQ/faq.css.js +48 -49
  12. package/src/components/FAQ/faq.js +0 -86
  13. package/src/components/Input/Input.js +68 -6
  14. package/src/components/Input/custom-form.stories.js +88 -0
  15. package/src/components/Input/input-clipboard.css.js +168 -0
  16. package/src/components/Input/input-clipboard.js +137 -0
  17. package/src/components/Input/input.css.js +122 -42
  18. package/src/components/accordion/accordion-bg.css.js +117 -0
  19. package/src/components/accordion/accordion-bg.js +80 -0
  20. package/src/components/accordion/accordion-no-bg.css.js +114 -0
  21. package/src/components/accordion/accordion-no-bg.js +80 -0
  22. package/src/components/accordion/accordion.css.js +88 -0
  23. package/src/components/accordion/accordion.js +81 -0
  24. package/src/components/anchor/anchor-nav.css.js +15 -15
  25. package/src/components/anchor/anchor-nav.js +0 -1
  26. package/src/components/anchor/anchor.stories.js +10 -13
  27. package/src/components/badge/badge.css.js +6 -6
  28. package/src/components/badge/badge.js +1 -2
  29. package/src/components/badge/badge.stories.js +6 -6
  30. package/src/components/carousel/carousel.css.js +60 -60
  31. package/src/components/carousel/carousel.js +26 -30
  32. package/src/components/carousel/carousel.stories.js +55 -55
  33. package/src/components/checkbox/checkbox.css.js +14 -14
  34. package/src/components/divider/divider-horizontal.js +19 -14
  35. package/src/components/divider/divider-vertical.js +23 -14
  36. package/src/components/divider/divider.css.js +19 -0
  37. package/src/components/dropdown/dropdown.css.js +138 -0
  38. package/src/components/dropdown/dropdown.js +111 -0
  39. package/src/components/footer/footer-links-group.css.js +42 -0
  40. package/src/components/footer/footer-links-group.js +25 -0
  41. package/src/components/footer/footer-lp.css.js +625 -0
  42. package/src/components/footer/footer-lp.js +368 -0
  43. package/src/components/footer/footer-lp.stories.js +69 -0
  44. package/src/components/footer/footer-nav-menu.css.js +24 -0
  45. package/src/components/footer/footer-nav-menu.js +36 -0
  46. package/src/components/footer/footer.css.js +625 -0
  47. package/src/components/footer/footer.js +465 -0
  48. package/src/components/footer/footer.stories.js +60 -0
  49. package/src/components/footer/localeMap.js +1 -0
  50. package/src/components/grid/grid.css.js +38 -0
  51. package/src/components/grid/grid.js +55 -0
  52. package/src/components/header/header.css.js +81 -52
  53. package/src/components/header/header.js +19 -19
  54. package/src/components/highlight/highlight.css.js +32 -22
  55. package/src/components/highlight/highlight.js +15 -4
  56. package/src/components/highlight/highlight.stories.js +4 -4
  57. package/src/components/light-carousel/light-carousel-simple.css.js +183 -0
  58. package/src/components/light-carousel/light-carousel-simple.js +73 -0
  59. package/src/components/light-carousel/light-carousel.css.js +50 -31
  60. package/src/components/light-carousel/light-carousel.js +14 -57
  61. package/src/components/light-carousel/light-carousel.stories.js +51 -10
  62. package/src/components/link/link.css.js +41 -0
  63. package/src/components/link/link.js +54 -0
  64. package/src/components/modal/modal.css.js +75 -0
  65. package/src/components/modal/modal.js +41 -0
  66. package/src/components/modal/modal.stories.js +40 -0
  67. package/src/components/paragraph/paragraph.css.js +1 -3
  68. package/src/components/pricing-cards/new-pricing-card.js +30 -0
  69. package/src/components/pricing-cards/new-pricing.css.js +58 -0
  70. package/src/components/pricing-cards/pricing-card-actions.css.js +16 -0
  71. package/src/components/pricing-cards/pricing-card-actions.js +20 -0
  72. package/src/components/pricing-cards/pricing-card-container.css.js +41 -0
  73. package/src/components/pricing-cards/pricing-card-container.js +31 -0
  74. package/src/components/pricing-cards/pricing-card-header.css.js +70 -0
  75. package/src/components/pricing-cards/pricing-card-header.js +46 -0
  76. package/src/components/pricing-cards/pricing-card-pricing.css.js +63 -0
  77. package/src/components/pricing-cards/pricing-card-pricing.js +101 -0
  78. package/src/components/pricing-cards/pricing-card-show-more.css.js +22 -0
  79. package/src/components/pricing-cards/pricing-card-show-more.js +33 -0
  80. package/src/components/pricing-cards/pricing-card.css.js +91 -89
  81. package/src/components/pricing-cards/pricing-card.js +13 -16
  82. package/src/components/pricing-cards/pricing-feature-item.css.js +18 -0
  83. package/src/components/pricing-cards/pricing-feature-item.js +14 -0
  84. package/src/components/radio/radio.css.js +18 -18
  85. package/src/components/radio/radio.js +1 -0
  86. package/src/components/tabs/tabs.css.js +21 -11
  87. package/src/components/tabs/tabs.js +24 -18
  88. package/src/components/termsOfUse/terms.css.js +6 -6
  89. package/src/components/termsOfUse/terms.js +0 -1
  90. package/src/stories/demo.stories.js +270 -0
  91. package/src/tokens/layout.css +1 -0
  92. package/src/tokens/tokens.css +412 -0
  93. package/src/components/highlight/highlight-s.css.js +0 -88
  94. package/src/components/highlight/highlight-s.js +0 -35
  95. package/src/components/highlight/highlight-s.stories.js +0 -22
  96. package/src/tokens/fonts.css +0 -166
  97. package/src/tokens/tokens.js +0 -281
@@ -1,30 +1,35 @@
1
- import { LitElement, css, html } from 'lit';
1
+ import { LitElement, html } from "lit";
2
2
  import { tokens } from "../../tokens/tokens.js";
3
+ import { dividerHorizontal } from "./divider.css.js";
3
4
 
4
5
  export class BdDividerHorizontal extends LitElement {
6
+ static styles = [tokens, dividerHorizontal];
7
+
5
8
  static properties = {
6
- width: { type: String } // Noua proprietate
9
+ width : { type: String },
10
+ color : { type: String },
11
+ opacity: { type: String }
7
12
  };
8
13
 
9
- static styles = [tokens, css`
10
- .hr-line {
11
- border: none;
12
- border-top: 1px solid var(--color-neutral-200);
13
- margin: 0;
14
- width: 100%; /* valoare implicită */
15
- }
16
- `];
17
-
18
14
  constructor() {
19
15
  super();
20
- this.width = '100%'; // default
16
+ this.width = "200px";
17
+ this.color = "var(--color-neutral-400)";
18
+ this.opacity = "0.25";
21
19
  }
22
20
 
23
21
  render() {
24
22
  return html`
25
- <hr class="hr-line" style="width: ${this.width};" />
23
+ <hr
24
+ class="hr-line"
25
+ style="
26
+ width: ${this.width};
27
+ border-top-color: ${this.color};
28
+ opacity: ${this.opacity};
29
+ "
30
+ />
26
31
  `;
27
32
  }
28
33
  }
29
34
 
30
- customElements.define('bd-divider-horizontal', BdDividerHorizontal);
35
+ customElements.define("bd-divider-horizontal", BdDividerHorizontal);
@@ -1,32 +1,41 @@
1
- import { LitElement, html, css } from 'lit';
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import { dividerVertical } from "./divider.css.js";
2
4
 
3
5
  export class BdDividerVertical extends LitElement {
6
+ static styles = [tokens, dividerVertical];
7
+
4
8
  static properties = {
5
- height: { type: String },
6
- thickness: { type: String }, // lățimea "vizuală"
7
- };
9
+ height : { type: String },
10
+ thickness: { type: String },
11
+ color : { type: String },
12
+ opacity : { type: String }
8
13
 
9
- static styles = css`
10
- .divider {
11
- background-color: var(--color-neutral-200);
12
- display: inline-block;
13
- }
14
- `;
14
+ };
15
15
 
16
16
  constructor() {
17
17
  super();
18
- this.height = '100%';
19
- this.thickness = '1px';
18
+ this.height = "15px";
19
+ this.thickness = "1px";
20
+ this.color = "var(--color-neutral-400)";
21
+ this.opacity = "1.00";
22
+
20
23
  }
21
24
 
22
25
  render() {
23
26
  return html`
24
27
  <div
25
28
  class="divider"
26
- style="width: ${this.thickness}; height: ${this.height};"
29
+ style="
30
+ width: ${this.thickness};
31
+ height: ${this.height};
32
+ background-color: ${this.color};
33
+ opacity: ${this.opacity};
34
+
35
+ "
27
36
  ></div>
28
37
  `;
29
38
  }
30
39
  }
31
40
 
32
- customElements.define('bd-divider-vertical', BdDividerVertical);
41
+ customElements.define("bd-divider-vertical", BdDividerVertical);
@@ -0,0 +1,19 @@
1
+ import { css } from "lit";
2
+
3
+ export const dividerHorizontal = css`
4
+ .hr-line {
5
+ border: none;
6
+ border-top: 1px solid var(--color-neutral-400);
7
+ margin: 0;
8
+ width: 100%;
9
+ margin-left: auto;
10
+ margin-right: auto
11
+ }
12
+ `;
13
+
14
+ export const dividerVertical = css`
15
+ .divider {
16
+ background-color: var(--color-neutral-400);
17
+ display: inline-block;
18
+ }
19
+ `;
@@ -0,0 +1,138 @@
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
+ select {
48
+ width: 100%;
49
+ font-family: var(--typography-fontFamily-sans, sans-serif);
50
+ border: var(--border-width-1, 1px) solid var(--color-neutral-300);
51
+ background-color: var(--color-neutral-0);
52
+ color: var(--color-neutral-900);
53
+ line-height: var(--typography-lineHeight-normal, 1.5);
54
+ transition: border-color 0.3s ease, background-color 0.3s ease,
55
+ box-shadow 0.3s ease;
56
+ outline: none;
57
+ appearance: none;
58
+ -webkit-appearance: none;
59
+ -moz-appearance: none;
60
+ background-image: url('data:image/svg+xml;utf8,<svg fill="%23000000" height="20" viewBox="0 0 24 24" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5H7z"/></svg>');
61
+ background-repeat: no-repeat;
62
+ background-position: right var(--spacing-16) center;
63
+ background-size: 1rem;
64
+ padding-right: var(--spacing-28);
65
+ cursor: pointer;
66
+ }
67
+
68
+ select:focus {
69
+ border-color: var(--color-blue-500);
70
+ box-shadow: var(--focus-outline-primary, 0 0 0 2px rgba(0, 109, 255, 0.3));
71
+ }
72
+
73
+ .input-sm {
74
+ padding: var(--spacing-8) var(--spacing-12);
75
+ font-size: var(--typography-fontSize-sm);
76
+ height: var(--dimension-34px);
77
+ border-radius: var(--form-input-medium-borderRadius);
78
+ }
79
+
80
+ .input-md {
81
+ padding: var(--spacing-12) var(--spacing-16);
82
+ font-size: var(--typography-fontSize-base);
83
+ height: var(--dimension-45px);
84
+ border-radius: var(--form-input-large-borderRadius);
85
+ }
86
+
87
+ .input-lg {
88
+ padding: var(--spacing-16) var(--spacing-20);
89
+ font-size: var(--typography-fontSize-lg);
90
+ height: var(--dimension-55px);
91
+ border-radius: var(--form-input-large-borderRadius);
92
+ }
93
+
94
+ .form-label {
95
+ display: block;
96
+ font-family: var(--typography-fontFamily-sans);
97
+ color: var(--color-neutral-900);
98
+ letter-spacing: var(--typography-letterSpacing-normal);
99
+ }
100
+
101
+ .form-help-text {
102
+ font-size: var(--typography-fontSize-xs);
103
+ font-weight: var(--typography-fontWeight-normal);
104
+ line-height: var(--typography-lineHeight-normal);
105
+ letter-spacing: var(--typography-letterSpacing-normal);
106
+ font-family: var(--typography-fontFamily-sans);
107
+ margin-top: var(--spacing-4);
108
+ }
109
+
110
+ .form-help-text--default {
111
+ color: var(--color-neutral-600);
112
+ }
113
+
114
+ .form-input--error {
115
+ background-color: var(--color-red-50);
116
+ border-color: var(--color-red-500);
117
+ }
118
+
119
+ .form-help-text--error {
120
+ color: var(--color-red-600);
121
+ }
122
+
123
+ .form-input--success {
124
+ background-color: var(--color-green-50);
125
+ border-color: var(--color-green-500);
126
+ }
127
+
128
+ .form-help-text--success {
129
+ color: var(--color-green-600);
130
+ }
131
+
132
+ .form-input--disabled {
133
+ background-color: var(--color-neutral-100);
134
+ border-color: var(--color-neutral-300);
135
+ color: var(--color-neutral-500);
136
+ cursor: not-allowed;
137
+ }
138
+ `;
@@ -0,0 +1,111 @@
1
+ import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import dropdownCSS from "../dropdown/dropdown.css.js";
4
+
5
+
6
+ class CustomDropdown extends LitElement {
7
+ static properties = {
8
+ label : { type: String },
9
+ options : { type: Array },
10
+ kind : { type: String },
11
+ required : { type: Boolean },
12
+ tooltip : { type: String },
13
+ invalid : { type: Boolean },
14
+ validated: { type: Boolean },
15
+ disabled : { type: Boolean }
16
+ };
17
+
18
+ constructor() {
19
+ super();
20
+ this.label = "Select an option";
21
+ this.options = [];
22
+ this.kind = "md";
23
+ this.required = false;
24
+ this.tooltip = "";
25
+ this.invalid = false;
26
+ this.validated = false;
27
+ this.disabled = false;
28
+ }
29
+
30
+ set options(val) {
31
+ if (typeof val === "string") {
32
+ try {
33
+ this._options = JSON.parse(val);
34
+ } catch {
35
+ this._options = [];
36
+ }
37
+ } else {
38
+ this._options = val;
39
+ }
40
+ }
41
+
42
+ get options() {
43
+ return this._options;
44
+ }
45
+ render() {
46
+ const inputClass = {
47
+ sm: "input-sm",
48
+ md: "input-md",
49
+ lg: "input-lg"
50
+ }[this.kind];
51
+
52
+ const labelClass = {
53
+ sm: "label-sm",
54
+ md: "label-md",
55
+ lg: "label-lg"
56
+ }[this.kind];
57
+
58
+ const inputStateClass = this.disabled
59
+ ? "form-input--disabled"
60
+ : this.invalid
61
+ ? "form-input--error"
62
+ : this.validated
63
+ ? "form-input--success"
64
+ : "";
65
+
66
+ const helpTextClass = this.invalid
67
+ ? "form-help-text--error"
68
+ : this.validated
69
+ ? "form-help-text--success"
70
+ : "form-help-text--default";
71
+
72
+ return html`
73
+ <div class="input-container">
74
+ <label for="custom-dropdown" class="form-label ${labelClass}">
75
+ ${this.label}
76
+ ${this.required
77
+ ? html`<span class="form-label__required">*</span>`
78
+ : ""}
79
+ </label>
80
+ <select
81
+ id="custom-dropdown"
82
+ class="${inputClass} ${inputStateClass}"
83
+ ?required="${this.required}"
84
+ ?disabled="${this.disabled}"
85
+ >
86
+ ${this.options.map(
87
+ (option, index) =>
88
+ html`<option
89
+ value="${option}"
90
+ ?selected="${index === 0}"
91
+ >
92
+ ${option}
93
+ </option>`
94
+ )}
95
+ </select>
96
+
97
+
98
+
99
+
100
+ ${this.tooltip
101
+ ? html`<div class="form-help-text ${helpTextClass}">
102
+ ${this.tooltip}
103
+ </div>`
104
+ : ""}
105
+ </div>
106
+ `;
107
+ }
108
+ }
109
+ CustomDropdown.styles = [tokens, dropdownCSS];
110
+
111
+ customElements.define("bd-custom-dropdown", CustomDropdown);
@@ -0,0 +1,42 @@
1
+ import { css } from 'lit';
2
+
3
+ export default css`
4
+ :host {
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: var(--spacing-12);
8
+ padding-top: var(--spacing-24);
9
+ padding-bottom: var(--spacing-24);
10
+
11
+ }
12
+
13
+ h4 {
14
+ font-size: var(--font-size-sm);
15
+ font-weight: var(--font-weight-bold);
16
+ color: #ffffff;
17
+ margin: 0;
18
+ }
19
+
20
+ ::slotted(a) {
21
+ color: #ffffff;
22
+ text-decoration: none;
23
+ font-size: var(--typography-body-regular-fontSize);
24
+ line-height: 1.8;
25
+ }
26
+
27
+ .group-title {
28
+ font-size: var(--typography-body-regular-fontSize);
29
+ font-family: var(--typography-fontFamily-sans, 'IBM Plex Sans');
30
+ font-weight: var(--typography-heading-h1-fontWeight);
31
+ margin-bottom: 1rem;
32
+ margin-top: 1rem;
33
+ color: #ffffff;
34
+ }
35
+
36
+ @media (max-width: 768px) {
37
+
38
+ :host(:nth-of-type(2)) .group-title {
39
+ display: none !important;
40
+ }
41
+ }
42
+ `;
@@ -0,0 +1,25 @@
1
+ import { LitElement, html } from 'lit';
2
+ import { tokens } from '../../tokens/tokens.js';
3
+ import footerCSS from './footer-links-group.css.js';
4
+
5
+ export class BdFooterLinksGroup extends LitElement {
6
+ static properties = {
7
+ title: { type: String }
8
+ };
9
+
10
+ constructor() {
11
+ super();
12
+ this.title = '';
13
+ }
14
+
15
+
16
+ render() {
17
+ return html`
18
+ <h4 class="group-title">${this.title ? this.title : html`&nbsp;`}</h4>
19
+ <slot></slot>
20
+ `;
21
+ }
22
+ }
23
+ BdFooterLinksGroup.styles = [tokens, footerCSS];
24
+
25
+ customElements.define('bd-footer-links-group', BdFooterLinksGroup);