@aiaiai-pt/design-system 0.3.4 → 0.3.6
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.
- package/components/Alert.svelte +3 -3
- package/components/BottomNavItem.svelte +2 -2
- package/components/Button.svelte +2 -2
- package/components/CardGrid.svelte +104 -0
- package/components/Checkbox.svelte +2 -2
- package/components/Combobox.svelte +1 -1
- package/components/CommandPalette.svelte +605 -0
- package/components/ConditionTable.svelte +12 -1
- package/components/FileUploadItem.svelte +3 -3
- package/components/FilterBar.svelte +255 -0
- package/components/Input.svelte +3 -3
- package/components/LogViewer.svelte +410 -0
- package/components/Modal.svelte +2 -2
- package/components/SearchInput.svelte +473 -0
- package/components/Select.svelte +14 -2
- package/components/SidebarItem.svelte +2 -2
- package/components/Stepper.svelte +2 -2
- package/components/index.js +6 -0
- package/package.json +1 -1
- package/tokens/base.css +8 -0
- package/tokens/components.css +131 -9
- package/tokens/semantic.css +17 -0
package/components/Alert.svelte
CHANGED
package/components/Button.svelte
CHANGED
|
@@ -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>
|