@digiko-npm/designsystem 0.7.2 → 0.8.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 (58) hide show
  1. package/dist/designsystem.css +6682 -4515
  2. package/dist/designsystem.min.css +2 -2
  3. package/package.json +18 -3
  4. package/src/components/accordion.css +129 -128
  5. package/src/components/alert.css +137 -134
  6. package/src/components/avatar.css +77 -77
  7. package/src/components/badge.css +52 -52
  8. package/src/components/bottom-nav.css +71 -71
  9. package/src/components/bottom-sheet.css +146 -0
  10. package/src/components/breadcrumb.css +61 -61
  11. package/src/components/button.css +162 -154
  12. package/src/components/card.css +94 -72
  13. package/src/components/chip.css +38 -38
  14. package/src/components/collapsible.css +96 -100
  15. package/src/components/color-picker.css +82 -0
  16. package/src/components/combobox.css +418 -0
  17. package/src/components/command.css +141 -140
  18. package/src/components/copy-button.css +106 -0
  19. package/src/components/datepicker.css +257 -251
  20. package/src/components/description-list.css +89 -87
  21. package/src/components/divider.css +45 -45
  22. package/src/components/drawer.css +185 -174
  23. package/src/components/drop-zone.css +85 -84
  24. package/src/components/dropdown.css +148 -140
  25. package/src/components/empty-state.css +50 -50
  26. package/src/components/field.css +35 -0
  27. package/src/components/gallery.css +257 -0
  28. package/src/components/icon-btn.css +2 -1
  29. package/src/components/index.css +14 -3
  30. package/src/components/input.css +205 -146
  31. package/src/components/kbd.css +10 -10
  32. package/src/components/modal.css +92 -90
  33. package/src/components/nav.css +140 -138
  34. package/src/components/number-input.css +163 -0
  35. package/src/components/pagination.css +152 -139
  36. package/src/components/pin-input.css +136 -0
  37. package/src/components/popover.css +72 -72
  38. package/src/components/progress.css +128 -129
  39. package/src/components/result.css +53 -57
  40. package/src/components/scroll-area.css +73 -0
  41. package/src/components/search.css +10 -4
  42. package/src/components/segmented-control.css +93 -0
  43. package/src/components/skeleton.css +58 -58
  44. package/src/components/slider.css +102 -100
  45. package/src/components/sortable.css +44 -45
  46. package/src/components/spinner.css +27 -27
  47. package/src/components/star-rating.css +121 -0
  48. package/src/components/stat-card.css +38 -25
  49. package/src/components/table.css +288 -3
  50. package/src/components/tabs.css +121 -121
  51. package/src/components/tag.css +124 -124
  52. package/src/components/timeline.css +99 -99
  53. package/src/components/toast.css +37 -38
  54. package/src/components/toggle.css +88 -88
  55. package/src/components/toolbar.css +137 -121
  56. package/src/components/tooltip.css +150 -150
  57. package/src/components/truncated-text.css +75 -0
  58. package/src/tokens/tokens.json +413 -0
@@ -0,0 +1,257 @@
1
+ /* ==========================================================================
2
+ Component: Gallery
3
+ Image gallery with main image, thumbnail strip, and lightbox overlay.
4
+
5
+ ARIA requirements (consumer responsibility):
6
+ - Container: role="region", aria-label="Image gallery"
7
+ - Thumbnails: role="tablist", individual thumbnails role="tab"
8
+ - Main image: role="img", alt text required
9
+ - Lightbox: role="dialog", aria-label="Image viewer"
10
+ - Lightbox close: aria-label="Close"
11
+ - Navigation: aria-label="Previous image" / "Next image"
12
+ - Keyboard: ArrowLeft/Right for navigation, Escape to close lightbox
13
+
14
+ Usage:
15
+ <div class="ds-gallery">
16
+ <div class="ds-gallery__main">
17
+ <img src="..." alt="..." />
18
+ </div>
19
+ <div class="ds-gallery__thumbs">
20
+ <button class="ds-gallery__thumb ds-gallery__thumb--active">
21
+ <img src="..." alt="Thumbnail 1" />
22
+ </button>
23
+ <button class="ds-gallery__thumb">
24
+ <img src="..." alt="Thumbnail 2" />
25
+ </button>
26
+ <button class="ds-gallery__thumb-more">+3</button>
27
+ </div>
28
+ </div>
29
+
30
+ Lightbox overlay:
31
+ <div class="ds-lightbox ds-lightbox--open">
32
+ <button class="ds-lightbox__close" aria-label="Close">&times;</button>
33
+ <button class="ds-lightbox__prev" aria-label="Previous">&lsaquo;</button>
34
+ <img class="ds-lightbox__image" src="..." alt="..." />
35
+ <button class="ds-lightbox__next" aria-label="Next">&rsaquo;</button>
36
+ <span class="ds-lightbox__counter">2 / 8</span>
37
+ </div>
38
+ ========================================================================== */
39
+
40
+ /* ==========================================================================
41
+ Gallery (thumbnails)
42
+ ========================================================================== */
43
+
44
+ .ds-gallery {
45
+ display: flex;
46
+ flex-direction: column;
47
+ gap: var(--ds-space-2);
48
+
49
+ /* --- Main image --- */
50
+ &__main {
51
+ position: relative;
52
+ overflow: hidden;
53
+ border-radius: var(--ds-radius-xl);
54
+ background-color: var(--ds-color-bg-muted);
55
+ cursor: pointer;
56
+
57
+ & img {
58
+ display: block;
59
+ width: 100%;
60
+ height: auto;
61
+ object-fit: cover;
62
+ }
63
+ }
64
+
65
+ /* --- Thumbnail strip --- */
66
+ &__thumbs {
67
+ display: flex;
68
+ gap: var(--ds-space-2);
69
+ overflow-x: auto;
70
+ scrollbar-width: none;
71
+ -ms-overflow-style: none;
72
+
73
+ &::-webkit-scrollbar {
74
+ display: none;
75
+ }
76
+ }
77
+
78
+ /* --- Individual thumbnail --- */
79
+ &__thumb {
80
+ flex-shrink: 0;
81
+ width: 4rem;
82
+ height: 4rem;
83
+ padding: 0;
84
+ border: 2px solid transparent;
85
+ border-radius: var(--ds-radius-md);
86
+ overflow: hidden;
87
+ cursor: pointer;
88
+ background: var(--ds-color-bg-muted);
89
+ transition:
90
+ border-color var(--ds-duration-fast) var(--ds-ease-default),
91
+ opacity var(--ds-duration-fast) var(--ds-ease-default);
92
+
93
+ & img {
94
+ display: block;
95
+ width: 100%;
96
+ height: 100%;
97
+ object-fit: cover;
98
+ }
99
+
100
+ &:hover {
101
+ border-color: var(--ds-color-border-hover);
102
+ }
103
+
104
+ &:focus-visible {
105
+ outline: none;
106
+ box-shadow: 0 0 0 var(--ds-ring-width) var(--ds-ring-color);
107
+ scroll-margin-block: var(--ds-space-16, 4rem);
108
+ }
109
+
110
+ &--active {
111
+ border-color: var(--ds-color-interactive);
112
+ }
113
+ }
114
+
115
+ /* --- "+N more" button --- */
116
+ &__thumb-more {
117
+ flex-shrink: 0;
118
+ display: flex;
119
+ align-items: center;
120
+ justify-content: center;
121
+ width: 4rem;
122
+ height: 4rem;
123
+ border: 1px solid var(--ds-color-border);
124
+ border-radius: var(--ds-radius-md);
125
+ background-color: var(--ds-color-bg-elevated);
126
+ color: var(--ds-color-text-secondary);
127
+ font-size: var(--ds-text-sm);
128
+ font-weight: var(--ds-weight-medium);
129
+ font-family: var(--ds-font-sans);
130
+ cursor: pointer;
131
+ transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
132
+
133
+ &:hover {
134
+ background-color: var(--ds-color-surface-hover);
135
+ }
136
+ }
137
+ }
138
+
139
+ /* ==========================================================================
140
+ Lightbox (fullscreen overlay)
141
+ ========================================================================== */
142
+
143
+ .ds-lightbox {
144
+ position: fixed;
145
+ inset: 0;
146
+ z-index: var(--ds-z-modal);
147
+ display: none;
148
+ align-items: center;
149
+ justify-content: center;
150
+ background-color: rgba(0, 0, 0, 0.9);
151
+
152
+ &--open {
153
+ display: flex;
154
+ }
155
+
156
+ /* --- Image --- */
157
+ &__image {
158
+ max-width: 90vw;
159
+ max-height: 85vh;
160
+ object-fit: contain;
161
+ border-radius: var(--ds-radius-md);
162
+ user-select: none;
163
+ }
164
+
165
+ /* --- Close button --- */
166
+ &__close {
167
+ position: absolute;
168
+ inset-block-start: var(--ds-space-4);
169
+ inset-inline-end: var(--ds-space-4);
170
+ display: flex;
171
+ align-items: center;
172
+ justify-content: center;
173
+ width: var(--ds-size-3);
174
+ height: var(--ds-size-3);
175
+ border: none;
176
+ border-radius: var(--ds-radius-full);
177
+ background-color: rgba(255, 255, 255, 0.15);
178
+ color: #fff;
179
+ font-size: var(--ds-text-xl);
180
+ cursor: pointer;
181
+ transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
182
+
183
+ &:hover {
184
+ background-color: rgba(255, 255, 255, 0.25);
185
+ }
186
+
187
+ &:focus-visible {
188
+ outline: none;
189
+ box-shadow: 0 0 0 var(--ds-ring-width) rgba(255, 255, 255, 0.5);
190
+ }
191
+ }
192
+
193
+ /* --- Prev/Next navigation --- */
194
+ &__prev,
195
+ &__next {
196
+ position: absolute;
197
+ inset-block-start: 50%;
198
+ transform: translateY(-50%);
199
+ display: flex;
200
+ align-items: center;
201
+ justify-content: center;
202
+ width: var(--ds-size-4);
203
+ height: var(--ds-size-4);
204
+ border: none;
205
+ border-radius: var(--ds-radius-full);
206
+ background-color: rgba(255, 255, 255, 0.15);
207
+ color: #fff;
208
+ font-size: var(--ds-text-2xl);
209
+ cursor: pointer;
210
+ transition: background-color var(--ds-duration-fast) var(--ds-ease-default);
211
+
212
+ &:hover {
213
+ background-color: rgba(255, 255, 255, 0.25);
214
+ }
215
+
216
+ &:focus-visible {
217
+ outline: none;
218
+ box-shadow: 0 0 0 var(--ds-ring-width) rgba(255, 255, 255, 0.5);
219
+ }
220
+
221
+ &:disabled {
222
+ opacity: var(--ds-opacity-disabled);
223
+ pointer-events: none;
224
+ }
225
+ }
226
+
227
+ &__prev {
228
+ inset-inline-start: var(--ds-space-4);
229
+ }
230
+
231
+ &__next {
232
+ inset-inline-end: var(--ds-space-4);
233
+ }
234
+
235
+ /* --- Counter --- */
236
+ &__counter {
237
+ position: absolute;
238
+ inset-block-end: var(--ds-space-4);
239
+ inset-inline-start: 50%;
240
+ transform: translateX(-50%);
241
+ padding: var(--ds-space-1) var(--ds-space-3);
242
+ border-radius: var(--ds-radius-full);
243
+ background-color: rgba(0, 0, 0, 0.6);
244
+ color: #fff;
245
+ font-size: var(--ds-text-sm);
246
+ font-family: var(--ds-font-sans);
247
+ font-variant-numeric: tabular-nums;
248
+ user-select: none;
249
+ }
250
+ }
251
+
252
+ /* --- Reduced motion --- */
253
+ @media (prefers-reduced-motion: reduce) {
254
+ .ds-lightbox {
255
+ animation: none;
256
+ }
257
+ }
@@ -17,7 +17,7 @@
17
17
 
18
18
  Sizes:
19
19
  .ds-icon-btn--xs — 24px (var(--ds-size-1))
20
- .ds-icon-btn--sm — 28px
20
+ .ds-icon-btn--sm — 32px (var(--ds-size-2))
21
21
  (default) — 32px (var(--ds-size-2))
22
22
  .ds-icon-btn--lg — 40px (var(--ds-size-3))
23
23
 
@@ -86,6 +86,7 @@
86
86
  /* Danger variant */
87
87
  .ds-icon-btn--danger:hover {
88
88
  color: var(--ds-color-error);
89
+ background-color: var(--ds-color-error-subtle); /* fallback for browsers without color-mix() */
89
90
  background-color: color-mix(in srgb, var(--ds-color-error) 10%, transparent);
90
91
  }
91
92
 
@@ -9,6 +9,8 @@
9
9
  @import './modal.css';
10
10
  @import './toast.css';
11
11
  @import './table.css';
12
+ @import './icon-btn.css';
13
+ @import './combobox.css';
12
14
 
13
15
  /* === Tier 1 — Essential === */
14
16
  @import './tabs.css';
@@ -19,6 +21,9 @@
19
21
  @import './avatar.css';
20
22
  @import './skeleton.css';
21
23
  @import './empty-state.css';
24
+ @import './search.css';
25
+ @import './spinner.css';
26
+ @import './segmented-control.css';
22
27
 
23
28
  /* === Tier 2 — Common === */
24
29
  @import './datepicker.css';
@@ -35,6 +40,15 @@
35
40
  @import './description-list.css';
36
41
  @import './result.css';
37
42
  @import './sortable.css';
43
+ @import './number-input.css';
44
+ @import './pin-input.css';
45
+ @import './copy-button.css';
46
+ @import './scroll-area.css';
47
+ @import './truncated-text.css';
48
+ @import './color-picker.css';
49
+ @import './star-rating.css';
50
+ @import './gallery.css';
51
+ @import './bottom-sheet.css';
38
52
 
39
53
  /* === Tier 3 — Advanced === */
40
54
  @import './popover.css';
@@ -42,9 +56,6 @@
42
56
  @import './timeline.css';
43
57
  @import './kbd.css';
44
58
  @import './command.css';
45
- @import './search.css';
46
59
  @import './toolbar.css';
47
60
  @import './chip.css';
48
- @import './icon-btn.css';
49
61
  @import './bottom-nav.css';
50
- @import './spinner.css';