@zeyolabs/ui 2026.11.32 → 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.
- package/account/AccountMembers.svelte +9 -25
- package/account/AccountPolicies.svelte +6 -16
- package/package.json +1 -1
- package/text/Title.svelte +2 -2
- package/typography.css +8 -0
|
@@ -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/package.json
CHANGED
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;
|