@aiaiai-pt/design-system 0.3.4 → 0.3.5

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.
@@ -82,9 +82,9 @@
82
82
  .alert-icon {
83
83
  display: flex;
84
84
  flex-shrink: 0;
85
- width: 16px;
86
- height: 16px;
87
- margin-top: 2px;
85
+ width: var(--icon-size-sm);
86
+ height: var(--icon-size-sm);
87
+ margin-top: var(--space-2xs);
88
88
  }
89
89
 
90
90
  .alert-icon :global(svg) {
@@ -100,8 +100,8 @@
100
100
  }
101
101
 
102
102
  .bottom-nav-icon-wrap :global(svg) {
103
- width: 20px;
104
- height: 20px;
103
+ width: var(--icon-size-md);
104
+ height: var(--icon-size-md);
105
105
  }
106
106
 
107
107
  .bottom-nav-badge {
@@ -218,8 +218,8 @@
218
218
  display: flex;
219
219
  align-items: center;
220
220
  justify-content: center;
221
- width: 16px;
222
- height: 16px;
221
+ width: var(--icon-size-sm);
222
+ height: var(--icon-size-sm);
223
223
  flex-shrink: 0;
224
224
  }
225
225
 
@@ -0,0 +1,104 @@
1
+ <!--
2
+ @component CardGrid
3
+
4
+ Responsive grid layout for cards. Standardizes column counts and gaps
5
+ across all card grid usages in the application.
6
+
7
+ Uses --grid-gutter token for consistent gap spacing.
8
+
9
+ @example Default (3-column card grid)
10
+ <CardGrid>
11
+ <Card>...</Card>
12
+ <Card>...</Card>
13
+ <Card>...</Card>
14
+ </CardGrid>
15
+
16
+ @example Stats row (4-column, compact)
17
+ <CardGrid columns="4">
18
+ <Card><StatValue /></Card>
19
+ <Card><StatValue /></Card>
20
+ </CardGrid>
21
+
22
+ @example 2-column layout
23
+ <CardGrid columns="2">
24
+ <Card>...</Card>
25
+ <Card>...</Card>
26
+ </CardGrid>
27
+ -->
28
+ <script>
29
+ let {
30
+ /** @type {'2' | '3' | '4'} Number of columns at desktop breakpoint */
31
+ columns = '3',
32
+ /** @type {string} */
33
+ class: className = '',
34
+ /** @type {import('svelte').Snippet | undefined} */
35
+ children = undefined,
36
+ ...rest
37
+ } = $props();
38
+ </script>
39
+
40
+ <div
41
+ class="card-grid card-grid-{columns} {className}"
42
+ {...rest}
43
+ >
44
+ {#if children}
45
+ {@render children()}
46
+ {/if}
47
+ </div>
48
+
49
+ <style>
50
+ .card-grid {
51
+ display: grid;
52
+ gap: var(--grid-gutter);
53
+ grid-template-columns: 1fr;
54
+ }
55
+
56
+ /* Prevent children from blowing out their grid track */
57
+ .card-grid > :global(*) {
58
+ min-width: 0;
59
+ }
60
+
61
+ /* Allow children to span full grid width */
62
+ .card-grid :global(.grid-full) {
63
+ grid-column: 1 / -1;
64
+ }
65
+
66
+ /* ─── 2-column variant ─── */
67
+ .card-grid-2 {
68
+ grid-template-columns: 1fr;
69
+ }
70
+
71
+ @media (min-width: 768px) {
72
+ .card-grid-2 {
73
+ grid-template-columns: repeat(2, 1fr);
74
+ }
75
+ }
76
+
77
+ /* ─── 3-column variant (default) ─── */
78
+ .card-grid-3 {
79
+ grid-template-columns: 1fr;
80
+ }
81
+
82
+ @media (min-width: 768px) {
83
+ .card-grid-3 {
84
+ grid-template-columns: repeat(2, 1fr);
85
+ }
86
+ }
87
+
88
+ @media (min-width: 1024px) {
89
+ .card-grid-3 {
90
+ grid-template-columns: repeat(3, 1fr);
91
+ }
92
+ }
93
+
94
+ /* ─── 4-column variant (stats) ─── */
95
+ .card-grid-4 {
96
+ grid-template-columns: repeat(2, 1fr);
97
+ }
98
+
99
+ @media (min-width: 768px) {
100
+ .card-grid-4 {
101
+ grid-template-columns: repeat(4, 1fr);
102
+ }
103
+ }
104
+ </style>
@@ -121,8 +121,8 @@
121
121
  }
122
122
 
123
123
  .checkbox-icon {
124
- width: 12px;
125
- height: 12px;
124
+ width: var(--icon-size-xs);
125
+ height: var(--icon-size-xs);
126
126
  color: var(--checkbox-check-color);
127
127
  }
128
128
 
@@ -339,7 +339,7 @@
339
339
  .combobox-item {
340
340
  display: flex;
341
341
  flex-direction: column;
342
- gap: 2px;
342
+ gap: var(--space-2xs);
343
343
  padding: var(--combobox-item-padding);
344
344
  border-radius: var(--combobox-item-radius);
345
345
  margin: 0 var(--space-xs);