@repobit/dex-system-design 0.21.2 → 0.22.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +4 -2
  3. package/src/components/Button/Button.js +7 -2
  4. package/src/components/Button/button.css.js +30 -0
  5. package/src/components/accordion/accordion-bg.stories.js +341 -171
  6. package/src/components/accordion/accordion.stories.js +345 -0
  7. package/src/components/anchor/anchor.stories.js +134 -76
  8. package/src/components/back/back.css.js +1 -1
  9. package/src/components/back/back.stories.js +301 -63
  10. package/src/components/badge/badge.js +4 -7
  11. package/src/components/badge/badge.stories.js +89 -96
  12. package/src/components/breadcrumb/breadcrumb.stories.js +167 -3
  13. package/src/components/cards/card.stories.js +153 -3
  14. package/src/components/display/display.css.js +7 -10
  15. package/src/components/display/display.js +14 -2
  16. package/src/components/display/display.stories.js +213 -219
  17. package/src/components/divider/divider.stories.js +337 -30
  18. package/src/components/footer/footer-lp.stories.js +346 -3
  19. package/src/components/footer/footer.js +0 -3
  20. package/src/components/footer/footer.stories.js +267 -4
  21. package/src/components/header/header.css.js +1 -1
  22. package/src/components/header/header.js +77 -56
  23. package/src/components/header/header.stories.js +298 -22
  24. package/src/components/heading/heading.css.js +1 -1
  25. package/src/components/heading/heading.stories.js +355 -113
  26. package/src/components/image/image.css.js +146 -98
  27. package/src/components/image/image.js +13 -2
  28. package/src/components/image/image.stories.js +546 -160
  29. package/src/components/input/custom-form.stories.js +209 -12
  30. package/src/components/link/link.css.js +2 -2
  31. package/src/components/link/link.stories.js +383 -53
  32. package/src/components/paragraph/paragraph.css.js +1 -1
  33. package/src/components/paragraph/paragraph.stories.js +365 -157
  34. package/src/components/picture/picture.css.js +209 -0
  35. package/src/components/picture/picture.js +16 -2
  36. package/src/components/picture/picture.stories.js +525 -180
  37. package/src/components/pricing-cards/new-pricing-card.js +19 -4
  38. package/src/components/pricing-cards/new-pricing-card.stories.js +422 -0
  39. package/src/components/pricing-cards/new-pricing.css.js +8 -0
  40. package/src/components/pricing-cards/pricing-card-actions.js +49 -9
  41. package/src/components/pricing-cards/pricing-card-container.css.js +1 -1
  42. package/src/components/pricing-cards/pricing-card-header.css.js +73 -63
  43. package/src/components/pricing-cards/pricing-card-header.js +44 -10
  44. package/src/components/pricing-cards/pricing-card-pricing.js +63 -64
  45. package/src/components/pricing-cards/pricing-card.css.js +7 -15
  46. package/src/components/pricing-cards/pricing-card.js +353 -270
  47. package/src/components/pricing-cards/pricing-card.stories.js +3 -3
  48. package/src/tokens/fonts.stories.js +335 -8
  49. package/src/tokens/spacing.stories.js +701 -34
  50. package/src/tokens/tokens-grid.stories.js +897 -48
  51. package/src/tokens/typography.stories.js +980 -38
  52. package/src/components/accordion/accordion-light.stories.js +0 -241
@@ -1,101 +1,149 @@
1
1
  import { css } from "lit";
2
2
 
3
3
  export default css`
4
- @layer bd-components {
5
- .bd-img {
6
- display: block;
7
- max-width: 100%;
8
- height: auto;
9
- }
10
-
11
- /* Object Fit Variants */
12
- .bd-img.cover {
13
- object-fit: cover;
14
- }
15
-
16
- .bd-img.contain {
17
- object-fit: contain;
18
- }
19
-
20
- .bd-img.fill {
21
- object-fit: fill;
22
- }
23
-
24
- .bd-img.none {
25
- object-fit: none;
26
- }
27
-
28
- .bd-img.scale-down {
29
- object-fit: scale-down;
30
- }
31
-
32
- /* Rounded Variants */
33
- .bd-img.rounded {
34
- border-radius: var(--spacing-8);
35
- }
36
-
37
- .bd-img.rounded-lg {
38
- border-radius: var(--spacing-12);
39
- }
40
-
41
- .bd-img.rounded-full {
42
- border-radius: 50%;
43
- }
44
-
45
- /* Shadow Variants */
46
- .bd-img.shadow {
47
- box-shadow: var(--shadow-sm);
48
- }
49
-
50
- .bd-img.shadow-lg {
51
- box-shadow: var(--shadow-lg);
52
- }
53
-
54
- .bd-img.shadow-xl {
55
- box-shadow: var(--shadow-xl);
56
- }
57
-
58
- /* Border Variants */
59
- .bd-img.bordered {
60
- border: 2px solid var(--color-neutral-200);
61
- }
62
-
63
- .bd-img.bordered-primary {
64
- border: 2px solid var(--color-blue-500);
65
- }
66
-
67
- .bd-img.bordered-thick {
68
- border: 4px solid var(--color-neutral-300);
69
- }
70
-
71
- /* Responsive Behavior */
72
- .bd-img.responsive {
73
- width: 100%;
74
- height: auto;
75
- }
76
-
77
- /* Aspect Ratio Containers */
78
- .bd-img.aspect-16-9 {
79
- aspect-ratio: 16 / 9;
80
- }
81
-
82
- .bd-img.aspect-4-3 {
83
- aspect-ratio: 4 / 3;
84
- }
85
-
86
- .bd-img.aspect-1-1 {
87
- aspect-ratio: 1 / 1;
88
- }
89
-
90
- /* Hover Effects */
91
- .bd-img.hover-zoom:hover {
92
- transform: scale(1.05);
93
- transition: transform 0.3s ease;
94
- }
95
-
96
- .bd-img.hover-shadow:hover {
97
- box-shadow: var(--shadow-lg);
98
- transition: box-shadow 0.3s ease;
99
- }
100
- };
101
- `
4
+ @layer bd-components {
5
+ .bd-img {
6
+ display: block;
7
+ max-width: 100%;
8
+ height: auto;
9
+ }
10
+
11
+ /* Object Fit Variants */
12
+ .bd-img.cover {
13
+ object-fit: cover;
14
+ }
15
+
16
+ .bd-img.contain {
17
+ object-fit: contain;
18
+ }
19
+
20
+ .bd-img.fill {
21
+ object-fit: fill;
22
+ }
23
+
24
+ .bd-img.none {
25
+ object-fit: none;
26
+ }
27
+
28
+ .bd-img.scale-down {
29
+ object-fit: scale-down;
30
+ }
31
+
32
+ /* Radius Variants - Updated to match radius prop */
33
+ .bd-img.radius-none {
34
+ border-radius: 0;
35
+ }
36
+
37
+ .bd-img.radius-sm {
38
+ border-radius: var(--radius-sm, var(--spacing-4, 0.25rem));
39
+ }
40
+
41
+ .bd-img.radius-md {
42
+ border-radius: var(--radius-md, var(--spacing-8, 0.5rem));
43
+ }
44
+
45
+ .bd-img.radius-lg {
46
+ border-radius: var(--radius-lg, var(--spacing-12, 0.75rem));
47
+ }
48
+
49
+ .bd-img.radius-full {
50
+ border-radius: 50%;
51
+ }
52
+
53
+ /* Shadow Variants - Updated to match shadow prop */
54
+ .bd-img.shadow-none {
55
+ box-shadow: none;
56
+ }
57
+
58
+ .bd-img.shadow-sm {
59
+ box-shadow: var(--shadow-sm, 0 1px 2px 0 rgba(0, 0, 0, 0.05));
60
+ }
61
+
62
+ .bd-img.shadow-md {
63
+ box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06));
64
+ }
65
+
66
+ .bd-img.shadow-lg {
67
+ box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05));
68
+ }
69
+
70
+ /* Shadow XL - Additional variant */
71
+ .bd-img.shadow-xl {
72
+ box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
73
+ }
74
+
75
+ /* Border Variants - Keep for additional styling options */
76
+ .bd-img.bordered {
77
+ border: 2px solid var(--color-neutral-200);
78
+ }
79
+
80
+ .bd-img.bordered-primary {
81
+ border: 2px solid var(--color-blue-500);
82
+ }
83
+
84
+ .bd-img.bordered-thick {
85
+ border: 4px solid var(--color-neutral-300);
86
+ }
87
+
88
+ /* Responsive Behavior */
89
+ .bd-img.responsive {
90
+ width: 100%;
91
+ height: auto;
92
+ }
93
+
94
+ /* Aspect Ratio Containers */
95
+ .bd-img.aspect-16-9 {
96
+ aspect-ratio: 16 / 9;
97
+ }
98
+
99
+ .bd-img.aspect-4-3 {
100
+ aspect-ratio: 4 / 3;
101
+ }
102
+
103
+ .bd-img.aspect-1-1 {
104
+ aspect-ratio: 1 / 1;
105
+ }
106
+
107
+ /* Hover Effects */
108
+ .bd-img.hover-zoom:hover {
109
+ transform: scale(1.05);
110
+ transition: transform 0.3s ease;
111
+ }
112
+
113
+ .bd-img.hover-shadow:hover {
114
+ box-shadow: var(--shadow-lg);
115
+ transition: box-shadow 0.3s ease;
116
+ }
117
+
118
+ /* Focus styles for accessibility */
119
+ .bd-img:focus {
120
+ outline: 2px solid var(--color-primary-500, #3b82f6);
121
+ outline-offset: 2px;
122
+ }
123
+
124
+ /* Loading state */
125
+ .bd-img:not([src]) {
126
+ background-color: var(--color-neutral-100, #f3f4f6);
127
+ min-height: 100px;
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ color: var(--color-neutral-400, #9ca3af);
132
+ font-size: var(--text-sm, 0.875rem);
133
+ }
134
+
135
+ .bd-img:not([src])::before {
136
+ content: "Image loading...";
137
+ }
138
+
139
+ /* Smooth transitions for radius and shadow changes */
140
+ .bd-img {
141
+ transition: border-radius 0.2s ease, box-shadow 0.2s ease;
142
+ }
143
+
144
+ /* Performance optimization for transforms */
145
+ .bd-img.hover-zoom {
146
+ will-change: transform;
147
+ }
148
+ }
149
+ `;
@@ -9,7 +9,9 @@ export class BdImg extends LitElement {
9
9
  width : { type: Number },
10
10
  height : { type: Number },
11
11
  loading: { type: String },
12
- fit : { type: String }
12
+ fit : { type: String },
13
+ radius : { type: String },
14
+ shadow : { type: String }
13
15
  };
14
16
 
15
17
  constructor() {
@@ -20,9 +22,18 @@ export class BdImg extends LitElement {
20
22
  this.height = null;
21
23
  this.loading = "lazy";
22
24
  this.fit = "cover";
25
+ this.radius = "none";
26
+ this.shadow = "none";
23
27
  }
24
28
 
25
29
  render() {
30
+ const baseClass = 'bd-img';
31
+ const fitClass = this.fit || 'cover';
32
+ const radiusClass = `radius-${this.radius || 'none'}`;
33
+ const shadowClass = `shadow-${this.shadow || 'none'}`;
34
+
35
+ const finalClass = `${baseClass} ${fitClass} ${radiusClass} ${shadowClass}`;
36
+
26
37
  return html`
27
38
  <img
28
39
  src="${this.src}"
@@ -30,7 +41,7 @@ export class BdImg extends LitElement {
30
41
  width="${this.width}"
31
42
  height="${this.height}"
32
43
  loading="${this.loading}"
33
- class="bd-img ${this.fit}"
44
+ class="${finalClass}"
34
45
  @load="${this._handleLoad}"
35
46
  @error="${this._handleError}"
36
47
  />