@repobit/dex-system-design 0.21.2 → 0.22.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 (52) hide show
  1. package/CHANGELOG.md +11 -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
@@ -0,0 +1,209 @@
1
+ import { css } from "lit";
2
+
3
+ export default css`
4
+ @layer bd-components {
5
+ .bd-picture {
6
+ display: block;
7
+ max-width: 100%;
8
+ height: auto;
9
+ }
10
+
11
+ .bd-picture img {
12
+ display: block;
13
+ max-width: 100%;
14
+ height: auto;
15
+ }
16
+
17
+ /* Object Fit Classes */
18
+ .bd-picture.fit-cover img {
19
+ object-fit: cover;
20
+ }
21
+
22
+ .bd-picture.fit-contain img {
23
+ object-fit: contain;
24
+ }
25
+
26
+ .bd-picture.fit-fill img {
27
+ object-fit: fill;
28
+ }
29
+
30
+ .bd-picture.fit-none img {
31
+ object-fit: none;
32
+ }
33
+
34
+ .bd-picture.fit-scale-down img {
35
+ object-fit: scale-down;
36
+ }
37
+
38
+ /* Radius Classes */
39
+ .bd-picture.radius-none img {
40
+ border-radius: 0;
41
+ }
42
+
43
+ .bd-picture.radius-sm img {
44
+ border-radius: var(--radius-sm, 0.25rem);
45
+ }
46
+
47
+ .bd-picture.radius-md img {
48
+ border-radius: var(--radius-md, 0.5rem);
49
+ }
50
+
51
+ .bd-picture.radius-lg img {
52
+ border-radius: var(--radius-lg, 0.75rem);
53
+ }
54
+
55
+ .bd-picture.radius-full img {
56
+ border-radius: 50%;
57
+ }
58
+
59
+ /* Responsive Behavior */
60
+ .bd-picture.responsive {
61
+ width: 100%;
62
+ }
63
+
64
+ .bd-picture.responsive img {
65
+ width: 100%;
66
+ height: auto;
67
+ }
68
+
69
+ /* Aspect Ratio Containers */
70
+ .bd-picture.aspect-16-9 {
71
+ aspect-ratio: 16 / 9;
72
+ }
73
+
74
+ .bd-picture.aspect-16-9 img {
75
+ width: 100%;
76
+ height: 100%;
77
+ object-fit: cover;
78
+ }
79
+
80
+ .bd-picture.aspect-4-3 {
81
+ aspect-ratio: 4 / 3;
82
+ }
83
+
84
+ .bd-picture.aspect-4-3 img {
85
+ width: 100%;
86
+ height: 100%;
87
+ object-fit: cover;
88
+ }
89
+
90
+ .bd-picture.aspect-1-1 {
91
+ aspect-ratio: 1 / 1;
92
+ }
93
+
94
+ .bd-picture.aspect-1-1 img {
95
+ width: 100%;
96
+ height: 100%;
97
+ object-fit: cover;
98
+ }
99
+
100
+ /* Focus styles for accessibility */
101
+ .bd-picture:focus-within {
102
+ outline: 2px solid var(--color-primary-500, #3b82f6);
103
+ outline-offset: 2px;
104
+ border-radius: 2px;
105
+ }
106
+
107
+ /* Loading state */
108
+ .bd-picture:not([loaded]) {
109
+ background-color: var(--color-neutral-100, #f3f4f6);
110
+ min-height: 100px;
111
+ display: flex;
112
+ align-items: center;
113
+ justify-content: center;
114
+ color: var(--color-neutral-400, #9ca3af);
115
+ }
116
+
117
+ .bd-picture:not([loaded])::before {
118
+ content: "Loading image...";
119
+ font-size: var(--text-sm, 0.875rem);
120
+ }
121
+
122
+ /* Smooth transitions */
123
+ .bd-picture img {
124
+ transition: opacity 0.3s ease, transform 0.3s ease;
125
+ }
126
+
127
+ .bd-picture img[loading="lazy"] {
128
+ opacity: 0;
129
+ transform: scale(0.95);
130
+ }
131
+
132
+ .bd-picture img[loading="lazy"][loaded] {
133
+ opacity: 1;
134
+ transform: scale(1);
135
+ }
136
+
137
+ /* Hover effects */
138
+ .bd-picture.hover-zoom:hover img {
139
+ transform: scale(1.05);
140
+ }
141
+
142
+ .bd-picture.hover-lift:hover {
143
+ transform: translateY(-2px);
144
+ transition: transform 0.3s ease;
145
+ }
146
+
147
+ /* Performance optimizations */
148
+ .bd-picture img {
149
+ will-change: transform, opacity;
150
+ }
151
+
152
+ /* Responsive width utilities */
153
+ @container (max-width: 480px) {
154
+ .bd-picture.mobile-full {
155
+ width: 100vw;
156
+ margin-left: -1rem;
157
+ margin-right: -1rem;
158
+ }
159
+ }
160
+
161
+ @container (max-width: 768px) {
162
+ .bd-picture.tablet-optimized img {
163
+ object-fit: contain;
164
+ }
165
+ }
166
+
167
+ /* Print styles */
168
+ @media print {
169
+ .bd-picture {
170
+ break-inside: avoid;
171
+ }
172
+
173
+ .bd-picture img {
174
+ max-width: 100% !important;
175
+ height: auto !important;
176
+ }
177
+ }
178
+
179
+ /* High contrast mode support */
180
+ @media (prefers-contrast: high) {
181
+ .bd-picture img {
182
+ border: 1px solid currentColor;
183
+ }
184
+ }
185
+
186
+ /* Reduced motion support */
187
+ @media (prefers-reduced-motion: reduce) {
188
+ .bd-picture img {
189
+ transition: none;
190
+ }
191
+
192
+ .bd-picture.hover-zoom:hover img {
193
+ transform: none;
194
+ }
195
+
196
+ .bd-picture.hover-lift:hover {
197
+ transform: none;
198
+ }
199
+ }
200
+
201
+ /* Dark mode support */
202
+ @media (prefers-color-scheme: dark) {
203
+ .bd-picture:not([loaded]) {
204
+ background-color: var(--color-neutral-800, #1f2937);
205
+ color: var(--color-neutral-400, #9ca3af);
206
+ }
207
+ }
208
+ }
209
+ `;
@@ -1,4 +1,6 @@
1
1
  import { LitElement, html } from "lit";
2
+ import { tokens } from "../../tokens/tokens.js";
3
+ import pictureCSS from "./picture.css.js";
2
4
 
3
5
  export class BdPicture extends LitElement {
4
6
  static properties = {
@@ -7,7 +9,9 @@ export class BdPicture extends LitElement {
7
9
  fallbackSrc: { type: String },
8
10
  width : { type: Number },
9
11
  height : { type: Number },
10
- loading : { type: String }
12
+ loading : { type: String },
13
+ fit : { type: String },
14
+ radius : { type: String }
11
15
  };
12
16
 
13
17
  constructor() {
@@ -18,11 +22,19 @@ export class BdPicture extends LitElement {
18
22
  this.width = null;
19
23
  this.height = null;
20
24
  this.loading = "lazy";
25
+ this.fit = "cover";
26
+ this.radius = "none";
21
27
  }
22
28
 
23
29
  render() {
30
+ const classes = [
31
+ 'bd-picture',
32
+ `fit-${this.fit}`,
33
+ `radius-${this.radius}`
34
+ ].filter(Boolean).join(' ');
35
+
24
36
  return html`
25
- <picture>
37
+ <picture class="${classes}">
26
38
  ${this.sources.map(source => html`
27
39
  <source
28
40
  type="${source.type}"
@@ -41,6 +53,8 @@ export class BdPicture extends LitElement {
41
53
  </picture>
42
54
  `;
43
55
  }
56
+
57
+ static styles = [tokens, pictureCSS];
44
58
  }
45
59
 
46
60
  customElements.define("bd-picture", BdPicture);