@zeyolabs/ui 2026.11.31 → 2026.11.33
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.
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
import Form from '../form/Form.svelte';
|
|
20
20
|
import Select from '../form/primitives/Select.svelte';
|
|
21
21
|
import SkeletonText from '../skeleton/SkeletonText.svelte';
|
|
22
|
+
import Span from '../text/Span.svelte';
|
|
23
|
+
import Title from '../text/Title.svelte';
|
|
22
24
|
|
|
23
25
|
/**
|
|
24
26
|
* Members of the request's account (`@zeyolabs/kit/auth`): who is in it, with which policy,
|
|
@@ -49,13 +51,13 @@
|
|
|
49
51
|
{const policyName = (key: string) => data.policies.find((p) => p.key === key)?.name ?? key}
|
|
50
52
|
|
|
51
53
|
<Card gap="sm" padding="md">
|
|
52
|
-
<
|
|
54
|
+
<Title level={2} size="xs">{title}</Title>
|
|
53
55
|
<ul class="account-list">
|
|
54
56
|
{#each data.members as member (member.userId)}
|
|
55
57
|
<li>
|
|
56
58
|
<div class="who">
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
+
<Span bold>{member.name}</Span>
|
|
60
|
+
<Span color="tertiary" size="sm">{member.email}</Span>
|
|
59
61
|
</div>
|
|
60
62
|
{#if data.can.manage && member.userId !== data.me.userId && (member.policy !== 'owner' || data.me.policy === 'owner')}
|
|
61
63
|
<Select
|
|
@@ -91,15 +93,15 @@
|
|
|
91
93
|
</ul>
|
|
92
94
|
|
|
93
95
|
{#if data.invites.length}
|
|
94
|
-
<
|
|
96
|
+
<Title level={3} size="xs">Pending invitations</Title>
|
|
95
97
|
<ul class="account-list">
|
|
96
98
|
{#each data.invites as invite (invite.email)}
|
|
97
99
|
<li>
|
|
98
100
|
<div class="who">
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
+
<Span bold>{invite.email}</Span>
|
|
102
|
+
<Span color="tertiary" size="sm">
|
|
101
103
|
{policyName(invite.policy)}, expires {day.format(invite.expiresAt)}
|
|
102
|
-
</
|
|
104
|
+
</Span>
|
|
103
105
|
</div>
|
|
104
106
|
{#if data.can.invite}
|
|
105
107
|
<Button
|
|
@@ -142,17 +144,6 @@
|
|
|
142
144
|
</Boundary>
|
|
143
145
|
|
|
144
146
|
<style>
|
|
145
|
-
.account-title {
|
|
146
|
-
margin: 0;
|
|
147
|
-
font-size: var(--text-base);
|
|
148
|
-
font-weight: 600;
|
|
149
|
-
}
|
|
150
|
-
.account-subtitle {
|
|
151
|
-
margin: 4px 0 0;
|
|
152
|
-
font-size: 12px;
|
|
153
|
-
font-weight: 600;
|
|
154
|
-
color: var(--txs);
|
|
155
|
-
}
|
|
156
147
|
.account-list {
|
|
157
148
|
display: flex;
|
|
158
149
|
flex-direction: column;
|
|
@@ -173,13 +164,6 @@
|
|
|
173
164
|
flex-direction: column;
|
|
174
165
|
min-width: 0;
|
|
175
166
|
}
|
|
176
|
-
.name {
|
|
177
|
-
font-weight: 500;
|
|
178
|
-
}
|
|
179
|
-
.sub {
|
|
180
|
-
color: var(--txt);
|
|
181
|
-
font-size: 12px;
|
|
182
|
-
}
|
|
183
167
|
.account-list :global(.policy) {
|
|
184
168
|
width: 160px;
|
|
185
169
|
}
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
import Checkbox from '../form/primitives/Checkbox.svelte';
|
|
15
15
|
import Input from '../form/primitives/Input.svelte';
|
|
16
16
|
import SkeletonText from '../skeleton/SkeletonText.svelte';
|
|
17
|
+
import Span from '../text/Span.svelte';
|
|
18
|
+
import Title from '../text/Title.svelte';
|
|
17
19
|
|
|
18
20
|
/**
|
|
19
21
|
* The account's policies (`@zeyolabs/kit/auth`): the built-in ones, read-only, and the
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
|
|
70
72
|
<Card gap="sm" padding="md">
|
|
71
73
|
<div class="head">
|
|
72
|
-
<
|
|
74
|
+
<Title level={2} size="xs">{title}</Title>
|
|
73
75
|
{#if data.can.managePolicies && !draft}
|
|
74
76
|
<Button onclick={() => edit()} size="sm" variant="secondary">
|
|
75
77
|
<Plus size={13} /> New policy
|
|
@@ -81,12 +83,12 @@
|
|
|
81
83
|
{#each data.policies as policy (policy.key)}
|
|
82
84
|
<li>
|
|
83
85
|
<div class="what">
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
+
<Span bold>{policy.name}</Span>
|
|
87
|
+
<Span color="tertiary" size="sm">
|
|
86
88
|
{policy.permissions.includes('*')
|
|
87
89
|
? 'Everything'
|
|
88
90
|
: policy.permissions.join(', ') || 'Nothing'}
|
|
89
|
-
</
|
|
91
|
+
</Span>
|
|
90
92
|
</div>
|
|
91
93
|
{#if policy.builtIn}
|
|
92
94
|
<Badge dot={false}>Built in</Badge>
|
|
@@ -150,11 +152,6 @@
|
|
|
150
152
|
align-items: center;
|
|
151
153
|
justify-content: space-between;
|
|
152
154
|
}
|
|
153
|
-
.policies-title {
|
|
154
|
-
margin: 0;
|
|
155
|
-
font-size: var(--text-base);
|
|
156
|
-
font-weight: 600;
|
|
157
|
-
}
|
|
158
155
|
.policies {
|
|
159
156
|
display: flex;
|
|
160
157
|
flex-direction: column;
|
|
@@ -175,13 +172,6 @@
|
|
|
175
172
|
flex-direction: column;
|
|
176
173
|
min-width: 0;
|
|
177
174
|
}
|
|
178
|
-
.name {
|
|
179
|
-
font-weight: 500;
|
|
180
|
-
}
|
|
181
|
-
.sub {
|
|
182
|
-
color: var(--txt);
|
|
183
|
-
font-size: 12px;
|
|
184
|
-
}
|
|
185
175
|
.editor {
|
|
186
176
|
display: flex;
|
|
187
177
|
flex-direction: column;
|
package/badge/PromoBadge.svelte
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
|
|
4
|
+
import ChevronRight from '@lucide/svelte/icons/chevron-right';
|
|
4
5
|
import { onMount } from 'svelte';
|
|
5
6
|
|
|
6
7
|
type UnicornScene = {
|
|
@@ -228,18 +229,14 @@
|
|
|
228
229
|
{href}
|
|
229
230
|
>
|
|
230
231
|
<span>{@render children()}</span>
|
|
231
|
-
<
|
|
232
|
-
<path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
|
|
233
|
-
</svg>
|
|
232
|
+
<ChevronRight class="w-2.5 h-2.5" aria-hidden="true" strokeWidth={2} />
|
|
234
233
|
</a>
|
|
235
234
|
{:else}
|
|
236
235
|
<span
|
|
237
236
|
class="{styles.link} px-3 py-1 sm inline-flex items-center gap-1.5 transition-colors cursor-pointer"
|
|
238
237
|
>
|
|
239
238
|
<span>{@render children()}</span>
|
|
240
|
-
<
|
|
241
|
-
<path d="M9 5l7 7-7 7" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
|
|
242
|
-
</svg>
|
|
239
|
+
<ChevronRight class="w-2.5 h-2.5" aria-hidden="true" strokeWidth={2} />
|
|
243
240
|
</span>
|
|
244
241
|
{/if}
|
|
245
242
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeyolabs/ui",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.33",
|
|
4
4
|
"description": "Shared Svelte 5 components, form fields and design tokens for SvelteKit 3 apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"devDependencies": {
|
|
153
153
|
"@eslint/compat": "2.1.1",
|
|
154
154
|
"@eslint/js": "10.0.1",
|
|
155
|
-
"@zeyolabs/kit": "2026.11.
|
|
155
|
+
"@zeyolabs/kit": "2026.11.35",
|
|
156
156
|
"@sveltejs/kit": "3.2.0",
|
|
157
157
|
"@types/flickity": "2.2.12",
|
|
158
158
|
"eslint": "10.15.0",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
const fontSize = $derived(resolvedSize * (24 / 108));
|
|
42
42
|
</script>
|
|
43
43
|
|
|
44
|
+
<!-- eslint-disable-next-line svelte/no-restricted-html-elements -- a drawn progress ring, not an icon -->
|
|
44
45
|
<svg height={resolvedSize} viewBox="0 0 {resolvedSize} {resolvedSize}" width={resolvedSize}>
|
|
45
46
|
<circle
|
|
46
47
|
cx={center}
|
package/text/Title.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { BG_CLASS, type Color, COLOR_CLASS } from './color';
|
|
5
5
|
|
|
6
6
|
type Level = 1 | 2 | 3 | 4 | 5 | 6;
|
|
7
|
-
type Size = 'lg' | 'md' | 'sm' | 'xl';
|
|
7
|
+
type Size = 'lg' | 'md' | 'sm' | 'xl' | 'xs';
|
|
8
8
|
|
|
9
9
|
const DEFAULT_SIZE: Record<Level, Size> = {
|
|
10
10
|
1: 'xl',
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* default `size` below. */
|
|
47
47
|
level: Level;
|
|
48
48
|
maxWidth?: string;
|
|
49
|
-
/** The look: `xl` | `lg` | `md` | `sm
|
|
49
|
+
/** The look: `xl` | `lg` | `md` | `sm` | `xs` (body size, for card headings). Omit it and it follows `level` (1 xl, 2 lg, 3-4 md,
|
|
50
50
|
* 5-6 sm), so pass it only when the look and the tag differ. */
|
|
51
51
|
size?: Size;
|
|
52
52
|
/** Single-line ellipsis. Needs a bounded width from context (a flex child needs its own
|
package/typography.css
CHANGED
|
@@ -117,6 +117,14 @@
|
|
|
117
117
|
letter-spacing: -0.01em;
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
+
/* Body size, semibold: card and panel headings in dense pages. */
|
|
121
|
+
.title-xs {
|
|
122
|
+
font-size: var(--text-base, 13px);
|
|
123
|
+
font-weight: 600;
|
|
124
|
+
line-height: 1.5;
|
|
125
|
+
letter-spacing: 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
120
128
|
.xs {
|
|
121
129
|
font-size: 11px;
|
|
122
130
|
letter-spacing: 0.01em;
|