terminoir 0.13.0 → 0.14.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.
- package/README.md +2 -2
- package/css/glass.css +1 -1
- package/css/shell.css +5 -5
- package/dist/components/AppShell.svelte +1 -1
- package/dist/components/Chip.svelte +21 -2
- package/dist/components/Chip.svelte.d.ts +2 -0
- package/dist/components/DataTable.svelte +2 -2
- package/dist/components/EmptyState.svelte +10 -3
- package/dist/components/EmptyState.svelte.d.ts +2 -0
- package/dist/components/ListItem.svelte +3 -3
- package/dist/components/Page.svelte +4 -4
- package/dist/components/Tabs.svelte +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ Import from **`terminoir`**:
|
|
|
122
122
|
|-----------|--------|
|
|
123
123
|
| `Button`, `IconButton` | Variants: primary, secondary, ghost, destructive, outline · sizes sm/md/lg · `Button href` renders a link |
|
|
124
124
|
| `Input`, `Textarea`, `Select`, `Checkbox`, `Switch` | `hideLabel` (screen-reader only), `hint`, `error`, `quiet` (borderless until hover/focus, for inline property editing); `Input` `width` for toolbar fields |
|
|
125
|
-
| `Chip`, `Badge` | Status tones; `Chip` `color` dot, `onclick`, removable `onremove` |
|
|
125
|
+
| `Chip`, `Badge` | Status tones; `Chip` `color` dot, `onclick`, removable `onremove`, on/off toggle `pressed` (filters) |
|
|
126
126
|
| `StatusChip` | On/off status: green dot + `activeLabel`, or muted `inactiveLabel` (defaults Connected / Not connected) |
|
|
127
127
|
| `Card`, `CardGrid` | Accent tint, badge, chips, progress, meta, hover lift; `CardGrid columns={2\|3\|4}` fixes the column count on wide screens (one column on phones), also for `Panel`s |
|
|
128
128
|
| `Panel` | Glass panel surface |
|
|
@@ -136,7 +136,7 @@ Import from **`terminoir`**:
|
|
|
136
136
|
| `AppShell` | `header` + `sidebar` snippets; mobile drawer; `fitViewport` (main scrolls, for canvases), `flush`, `headerMode="mobile"`; `toggleSidebar()` / `closeMobileDrawer()` via `bind:this` |
|
|
137
137
|
| `AppShellNavLink` | `href?`, `active`, nav row with active highlight |
|
|
138
138
|
| `SettingsPage`, `SettingsSection` | Settings layout — intro + stacked glass section cards |
|
|
139
|
-
| `EmptyState`, `Skeleton`, `Avatar`, `Kbd` | Presentation |
|
|
139
|
+
| `EmptyState`, `Skeleton`, `Avatar`, `Kbd` | Presentation; `EmptyState framed={false}` inside a Panel or card |
|
|
140
140
|
| `FontPicker` | UI + code font lists, lazy `@fontsource`, persisted per `appId` |
|
|
141
141
|
| `NavIcon` | `name`, optional `color` — Font Awesome 6 (`fa-*` or plain ids like `inbox`); host app loads FA CSS |
|
|
142
142
|
| `IconField` | `bind:value` icon id picker (`ICON_PICKER_OPTIONS`); `compact` opens the grid in a popover |
|
package/css/glass.css
CHANGED
package/css/shell.css
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.terminoir-shell {
|
|
7
|
-
--terminoir-sidebar-width:
|
|
7
|
+
--terminoir-sidebar-width: 236px;
|
|
8
8
|
--terminoir-sidebar-min: 180px;
|
|
9
9
|
--terminoir-sidebar-max: 420px;
|
|
10
10
|
--terminoir-shell-duration: var(--duration-normal);
|
|
11
11
|
display: grid;
|
|
12
|
-
grid-template-columns: var(--terminoir-sidebar-width,
|
|
12
|
+
grid-template-columns: var(--terminoir-sidebar-width, 236px) minmax(0, 1fr);
|
|
13
13
|
min-height: 100dvh;
|
|
14
14
|
transition: grid-template-columns var(--terminoir-shell-duration) var(--ease-out-soft);
|
|
15
15
|
}
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.terminoir-shell__sidebar-inner {
|
|
37
|
-
width: var(--terminoir-sidebar-width,
|
|
37
|
+
width: var(--terminoir-sidebar-width, 236px);
|
|
38
38
|
height: 100%;
|
|
39
39
|
min-height: 100dvh;
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: column;
|
|
42
|
-
padding: var(--space-
|
|
42
|
+
padding: var(--space-3);
|
|
43
43
|
gap: var(--space-2);
|
|
44
44
|
}
|
|
45
45
|
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
align-items: center;
|
|
49
49
|
gap: var(--space-2);
|
|
50
50
|
width: 100%;
|
|
51
|
-
padding: 0.
|
|
51
|
+
padding: 0.35rem 0.6rem;
|
|
52
52
|
border: 1px solid transparent;
|
|
53
53
|
border-radius: var(--radius-control);
|
|
54
54
|
background: transparent;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
onremove,
|
|
11
11
|
removeLabel = 'Remove',
|
|
12
12
|
onclick,
|
|
13
|
+
pressed,
|
|
13
14
|
class: className = '',
|
|
14
15
|
children,
|
|
15
16
|
...rest
|
|
@@ -23,6 +24,8 @@
|
|
|
23
24
|
removeLabel?: string;
|
|
24
25
|
/** Makes the chip text a button (e.g. open the linked item). */
|
|
25
26
|
onclick?: (event: MouseEvent) => void;
|
|
27
|
+
/** Makes the chip an on/off toggle (with `onclick`), e.g. a filter. Off chips are muted with a hollow dot. */
|
|
28
|
+
pressed?: boolean;
|
|
26
29
|
class?: string;
|
|
27
30
|
children?: import('svelte').Snippet;
|
|
28
31
|
} & Record<string, unknown> = $props();
|
|
@@ -36,13 +39,19 @@
|
|
|
36
39
|
tone === 'overdue' && 'terminoir-card__chip--overdue',
|
|
37
40
|
tone === 'today' && 'terminoir-card__chip--today',
|
|
38
41
|
tone === 'done' && 'terminoir-card__chip--done',
|
|
42
|
+
pressed === false && 'terminoir-chip--off',
|
|
39
43
|
className,
|
|
40
44
|
)}
|
|
41
45
|
{...rest}
|
|
42
46
|
>
|
|
43
|
-
{#if dot}<span
|
|
47
|
+
{#if dot}<span
|
|
48
|
+
class="terminoir-chip__dot"
|
|
49
|
+
style:background={pressed === false ? 'transparent' : dot}
|
|
50
|
+
style:box-shadow={pressed === false ? `inset 0 0 0 1.5px ${dot}` : undefined}
|
|
51
|
+
aria-hidden="true"
|
|
52
|
+
></span>{/if}
|
|
44
53
|
{#if onclick}
|
|
45
|
-
<button type="button" class="terminoir-chip__label terminoir-focusable" {onclick}>{@render children?.()}</button>
|
|
54
|
+
<button type="button" class="terminoir-chip__label terminoir-focusable" aria-pressed={pressed} {onclick}>{@render children?.()}</button>
|
|
46
55
|
{:else}
|
|
47
56
|
<span class="terminoir-chip__label">{@render children?.()}</span>
|
|
48
57
|
{/if}
|
|
@@ -85,6 +94,16 @@
|
|
|
85
94
|
cursor: pointer;
|
|
86
95
|
}
|
|
87
96
|
button.terminoir-chip__label:hover { text-decoration: underline; }
|
|
97
|
+
button.terminoir-chip__label[aria-pressed]:hover { text-decoration: none; }
|
|
98
|
+
.terminoir-chip:has(button[aria-pressed]):hover {
|
|
99
|
+
border-color: color-mix(in srgb, var(--foreground) 28%, transparent);
|
|
100
|
+
}
|
|
101
|
+
.terminoir-chip--off { color: var(--muted-foreground); }
|
|
102
|
+
.terminoir-chip--off:not(.terminoir-card__chip--overdue):not(.terminoir-card__chip--today):not(.terminoir-card__chip--done) {
|
|
103
|
+
background: transparent;
|
|
104
|
+
border-style: dashed;
|
|
105
|
+
}
|
|
106
|
+
|
|
88
107
|
.terminoir-chip__remove {
|
|
89
108
|
display: inline-flex;
|
|
90
109
|
align-items: center;
|
|
@@ -9,6 +9,8 @@ type $$ComponentProps = {
|
|
|
9
9
|
removeLabel?: string;
|
|
10
10
|
/** Makes the chip text a button (e.g. open the linked item). */
|
|
11
11
|
onclick?: (event: MouseEvent) => void;
|
|
12
|
+
/** Makes the chip an on/off toggle (with `onclick`), e.g. a filter. Off chips are muted with a hollow dot. */
|
|
13
|
+
pressed?: boolean;
|
|
12
14
|
class?: string;
|
|
13
15
|
children?: import('svelte').Snippet;
|
|
14
16
|
} & Record<string, unknown>;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
th {
|
|
98
98
|
position: sticky;
|
|
99
99
|
top: 0;
|
|
100
|
-
padding: 0.
|
|
100
|
+
padding: 0.35rem 0.75rem;
|
|
101
101
|
text-align: left;
|
|
102
102
|
font-size: 0.6875rem;
|
|
103
103
|
font-weight: 600;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
white-space: nowrap;
|
|
110
110
|
}
|
|
111
111
|
td {
|
|
112
|
-
padding: 0.
|
|
112
|
+
padding: 0.35rem 0.75rem;
|
|
113
113
|
border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
|
|
114
114
|
vertical-align: middle;
|
|
115
115
|
max-width: 0;
|
|
@@ -5,17 +5,20 @@
|
|
|
5
5
|
let {
|
|
6
6
|
title,
|
|
7
7
|
description,
|
|
8
|
+
framed = true,
|
|
8
9
|
class: className = '',
|
|
9
10
|
children,
|
|
10
11
|
}: {
|
|
11
12
|
title: string;
|
|
12
13
|
description?: string;
|
|
14
|
+
/** Glass panel around it. Set false inside a Panel or card, so the frames don't nest. */
|
|
15
|
+
framed?: boolean;
|
|
13
16
|
class?: string;
|
|
14
17
|
children?: Snippet;
|
|
15
18
|
} = $props();
|
|
16
19
|
</script>
|
|
17
20
|
|
|
18
|
-
<div class={cn('terminoir-empty glass-panel', className)} role="status">
|
|
21
|
+
<div class={cn('terminoir-empty', framed ? 'glass-panel' : 'terminoir-empty--bare', className)} role="status">
|
|
19
22
|
<h2 class="terminoir-empty__title">{title}</h2>
|
|
20
23
|
{#if description}<p class="terminoir-empty__desc">{description}</p>{/if}
|
|
21
24
|
{@render children?.()}
|
|
@@ -23,17 +26,21 @@
|
|
|
23
26
|
|
|
24
27
|
<style>
|
|
25
28
|
.terminoir-empty {
|
|
26
|
-
padding: var(--space-
|
|
29
|
+
padding: var(--space-5) var(--space-4);
|
|
27
30
|
text-align: center;
|
|
28
31
|
}
|
|
29
32
|
|
|
33
|
+
.terminoir-empty--bare {
|
|
34
|
+
padding: var(--space-3) var(--space-2);
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
.terminoir-empty__title {
|
|
31
38
|
margin: 0 0 var(--space-2);
|
|
32
39
|
font-size: 1.125rem;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
.terminoir-empty__desc {
|
|
36
|
-
margin: 0
|
|
43
|
+
margin: 0;
|
|
37
44
|
color: var(--muted-foreground);
|
|
38
45
|
}
|
|
39
46
|
</style>
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
align-items: center;
|
|
67
67
|
gap: var(--space-3);
|
|
68
68
|
width: 100%;
|
|
69
|
-
min-height: 2.
|
|
70
|
-
padding: 0.
|
|
69
|
+
min-height: 2.25rem;
|
|
70
|
+
padding: 0.35rem 0.75rem;
|
|
71
71
|
box-sizing: border-box;
|
|
72
72
|
}
|
|
73
73
|
.terminoir-list-item__button {
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
white-space: nowrap;
|
|
114
114
|
}
|
|
115
115
|
.terminoir-list-item__details {
|
|
116
|
-
padding: var(--space-1) 0.
|
|
116
|
+
padding: var(--space-1) 0.75rem var(--space-3) calc(0.75rem + 1.25rem + var(--space-3));
|
|
117
117
|
}
|
|
118
118
|
.terminoir-list-item__trailing {
|
|
119
119
|
display: inline-flex;
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
.terminoir-page {
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
|
-
gap: var(--space-
|
|
29
|
+
gap: var(--space-4);
|
|
30
30
|
width: 100%;
|
|
31
31
|
margin-inline: auto;
|
|
32
|
-
padding: var(--space-
|
|
32
|
+
padding: var(--space-4) var(--space-5) var(--space-8);
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
min-width: 0;
|
|
35
35
|
}
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
}
|
|
47
47
|
@media (max-width: 700px) {
|
|
48
48
|
.terminoir-page:not(.terminoir-page--fill) {
|
|
49
|
-
padding: var(--space-
|
|
50
|
-
gap: var(--space-
|
|
49
|
+
padding: var(--space-3) var(--space-3) var(--space-6);
|
|
50
|
+
gap: var(--space-4);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
</style>
|