@byline/ui 2.4.0 → 2.4.1
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/dist/react.d.ts +10 -18
- package/dist/react.js +2 -15
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal.d.ts +8 -1
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal.js +4 -6
- package/dist/widgets/diff-viewer/diff-modal.module.js +14 -0
- package/dist/{admin/components/collections → widgets/diff-viewer}/diff-modal_module.css +9 -9
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge.js +1 -1
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge.module.js +3 -3
- package/dist/{admin/components/collections → widgets/status-badge}/status-badge_module.css +3 -3
- package/package.json +2 -4
- package/src/react.ts +12 -34
- package/src/{admin/components/collections → widgets/diff-viewer}/diff-modal.tsx +16 -5
- package/src/{admin/components/collections → widgets/status-badge}/status-badge.tsx +1 -1
- package/dist/admin/components/admin-account/change-password.d.ts +0 -8
- package/dist/admin/components/admin-account/change-password.js +0 -192
- package/dist/admin/components/admin-account/change-password.module.js +0 -8
- package/dist/admin/components/admin-account/change-password_module.css +0 -27
- package/dist/admin/components/admin-account/container.d.ts +0 -29
- package/dist/admin/components/admin-account/container.js +0 -299
- package/dist/admin/components/admin-account/container.module.js +0 -28
- package/dist/admin/components/admin-account/container_module.css +0 -106
- package/dist/admin/components/admin-account/update.d.ts +0 -8
- package/dist/admin/components/admin-account/update.js +0 -207
- package/dist/admin/components/admin-account/update.module.js +0 -8
- package/dist/admin/components/admin-account/update_module.css +0 -27
- package/dist/admin/components/admin-permissions/inspector.d.ts +0 -4
- package/dist/admin/components/admin-permissions/inspector.js +0 -284
- package/dist/admin/components/admin-permissions/inspector.module.js +0 -56
- package/dist/admin/components/admin-permissions/inspector_module.css +0 -238
- package/dist/admin/components/admin-roles/create.d.ts +0 -7
- package/dist/admin/components/admin-roles/create.js +0 -177
- package/dist/admin/components/admin-roles/create.module.js +0 -8
- package/dist/admin/components/admin-roles/create_module.css +0 -27
- package/dist/admin/components/admin-roles/permissions.d.ts +0 -10
- package/dist/admin/components/admin-roles/permissions.js +0 -303
- package/dist/admin/components/admin-roles/permissions.module.js +0 -44
- package/dist/admin/components/admin-roles/permissions_module.css +0 -192
- package/dist/admin/components/admin-roles/update.d.ts +0 -8
- package/dist/admin/components/admin-roles/update.js +0 -166
- package/dist/admin/components/admin-roles/update.module.js +0 -8
- package/dist/admin/components/admin-roles/update_module.css +0 -27
- package/dist/admin/components/admin-users/create.d.ts +0 -8
- package/dist/admin/components/admin-users/create.js +0 -268
- package/dist/admin/components/admin-users/create.module.js +0 -10
- package/dist/admin/components/admin-users/create_module.css +0 -45
- package/dist/admin/components/admin-users/roles.d.ts +0 -11
- package/dist/admin/components/admin-users/roles.js +0 -148
- package/dist/admin/components/admin-users/roles.module.js +0 -18
- package/dist/admin/components/admin-users/roles_module.css +0 -75
- package/dist/admin/components/admin-users/set-password.d.ts +0 -8
- package/dist/admin/components/admin-users/set-password.js +0 -170
- package/dist/admin/components/admin-users/set-password.module.js +0 -9
- package/dist/admin/components/admin-users/set-password_module.css +0 -31
- package/dist/admin/components/admin-users/update.d.ts +0 -8
- package/dist/admin/components/admin-users/update.js +0 -254
- package/dist/admin/components/admin-users/update.module.js +0 -9
- package/dist/admin/components/admin-users/update_module.css +0 -34
- package/dist/admin/components/auth/sign-in-form.d.ts +0 -12
- package/dist/admin/components/auth/sign-in-form.js +0 -115
- package/dist/admin/components/auth/sign-in-form.module.js +0 -12
- package/dist/admin/components/auth/sign-in-form_module.css +0 -41
- package/dist/admin/components/collections/diff-modal.module.js +0 -14
- package/dist/services/admin-services-context.d.ts +0 -16
- package/dist/services/admin-services-context.js +0 -13
- package/dist/services/admin-services-types.d.ts +0 -129
- package/dist/services/admin-services-types.js +0 -1
- package/src/admin/components/admin-account/change-password.module.css +0 -40
- package/src/admin/components/admin-account/change-password.tsx +0 -232
- package/src/admin/components/admin-account/container.module.css +0 -158
- package/src/admin/components/admin-account/container.tsx +0 -230
- package/src/admin/components/admin-account/update.module.css +0 -40
- package/src/admin/components/admin-account/update.tsx +0 -263
- package/src/admin/components/admin-permissions/inspector.module.css +0 -326
- package/src/admin/components/admin-permissions/inspector.tsx +0 -298
- package/src/admin/components/admin-roles/create.module.css +0 -40
- package/src/admin/components/admin-roles/create.tsx +0 -218
- package/src/admin/components/admin-roles/permissions.module.css +0 -279
- package/src/admin/components/admin-roles/permissions.tsx +0 -396
- package/src/admin/components/admin-roles/update.module.css +0 -40
- package/src/admin/components/admin-roles/update.tsx +0 -218
- package/src/admin/components/admin-users/create.module.css +0 -63
- package/src/admin/components/admin-users/create.tsx +0 -323
- package/src/admin/components/admin-users/roles.module.css +0 -119
- package/src/admin/components/admin-users/roles.tsx +0 -172
- package/src/admin/components/admin-users/set-password.module.css +0 -46
- package/src/admin/components/admin-users/set-password.tsx +0 -199
- package/src/admin/components/admin-users/update.module.css +0 -49
- package/src/admin/components/admin-users/update.tsx +0 -328
- package/src/admin/components/auth/sign-in-form.module.css +0 -62
- package/src/admin/components/auth/sign-in-form.tsx +0 -132
- package/src/services/admin-services-context.tsx +0 -35
- package/src/services/admin-services-types.ts +0 -177
- /package/dist/{admin/components/collections → widgets/status-badge}/status-badge.d.ts +0 -0
- /package/src/{admin/components/collections → widgets/diff-viewer}/diff-modal.module.css +0 -0
- /package/src/{admin/components/collections → widgets/status-badge}/status-badge.module.css +0 -0
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This Source Code is subject to the terms of the Mozilla Public
|
|
5
|
-
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
6
|
-
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
7
|
-
*
|
|
8
|
-
* Copyright (c) Infonomic Company Limited
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Self-service profile form.
|
|
13
|
-
*
|
|
14
|
-
* Editable surface is intentionally narrower than the admin-users
|
|
15
|
-
* `update.tsx`: no `is_super_admin`, `is_enabled`, or
|
|
16
|
-
* `is_email_verified` toggles. A user cannot grant themselves
|
|
17
|
-
* super-admin or flip their own status — those flow through the
|
|
18
|
-
* admin-users module on a privileged admin's session.
|
|
19
|
-
*
|
|
20
|
-
* Patch is built diff-style against the loaded row and submitted with
|
|
21
|
-
* the row's `vid` so a concurrent edit elsewhere surfaces as
|
|
22
|
-
* `admin.users.versionConflict` and we prompt for reload.
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
import { useState } from 'react'
|
|
26
|
-
import { revalidateLogic, useForm } from '@tanstack/react-form-start'
|
|
27
|
-
|
|
28
|
-
import type { AccountResponse } from '@byline/admin/admin-account'
|
|
29
|
-
import cx from 'classnames'
|
|
30
|
-
import { z } from 'zod'
|
|
31
|
-
|
|
32
|
-
import { useBylineAdminServices } from '../../../services/admin-services-context.js'
|
|
33
|
-
import { Alert, Button, Input, LoaderEllipsis } from '../../../uikit.js'
|
|
34
|
-
import styles from './update.module.css'
|
|
35
|
-
|
|
36
|
-
const updateAccountSchema = z.object({
|
|
37
|
-
given_name: z.string().max(100, 'Given name must not exceed 100 characters'),
|
|
38
|
-
family_name: z.string().max(100, 'Family name must not exceed 100 characters'),
|
|
39
|
-
username: z.string().max(100, 'Username must not exceed 100 characters'),
|
|
40
|
-
email: z
|
|
41
|
-
.email({ message: 'Enter a valid email address' })
|
|
42
|
-
.min(3)
|
|
43
|
-
.max(254, 'Email must not exceed 254 characters'),
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
type UpdateAccountValues = z.infer<typeof updateAccountSchema>
|
|
47
|
-
|
|
48
|
-
function defaultsFrom(account: AccountResponse): UpdateAccountValues {
|
|
49
|
-
return {
|
|
50
|
-
given_name: account.given_name ?? '',
|
|
51
|
-
family_name: account.family_name ?? '',
|
|
52
|
-
username: account.username ?? '',
|
|
53
|
-
email: account.email,
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function buildPatch(values: UpdateAccountValues, account: AccountResponse) {
|
|
58
|
-
const patch: {
|
|
59
|
-
given_name?: string | null
|
|
60
|
-
family_name?: string | null
|
|
61
|
-
username?: string | null
|
|
62
|
-
email?: string
|
|
63
|
-
} = {}
|
|
64
|
-
const normaliseText = (value: string): string | null => (value.trim().length > 0 ? value : null)
|
|
65
|
-
const nextGiven = normaliseText(values.given_name)
|
|
66
|
-
const nextFamily = normaliseText(values.family_name)
|
|
67
|
-
const nextUsername = normaliseText(values.username)
|
|
68
|
-
if (nextGiven !== account.given_name) patch.given_name = nextGiven
|
|
69
|
-
if (nextFamily !== account.family_name) patch.family_name = nextFamily
|
|
70
|
-
if (nextUsername !== account.username) patch.username = nextUsername
|
|
71
|
-
if (values.email !== account.email) patch.email = values.email
|
|
72
|
-
return patch
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface UpdateAccountProps {
|
|
76
|
-
account: AccountResponse
|
|
77
|
-
onClose?: () => void
|
|
78
|
-
onSuccess?: (account: AccountResponse) => void
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export function UpdateAccount({ account, onClose, onSuccess }: UpdateAccountProps) {
|
|
82
|
-
const { updateAccount } = useBylineAdminServices()
|
|
83
|
-
const [formError, setFormError] = useState<string | null>(null)
|
|
84
|
-
const [successMessage, setSuccessMessage] = useState<string | null>(null)
|
|
85
|
-
|
|
86
|
-
const form = useForm({
|
|
87
|
-
defaultValues: defaultsFrom(account),
|
|
88
|
-
validationLogic: revalidateLogic({
|
|
89
|
-
mode: 'blur',
|
|
90
|
-
modeAfterSubmission: 'change',
|
|
91
|
-
}),
|
|
92
|
-
validators: {
|
|
93
|
-
onDynamic: updateAccountSchema,
|
|
94
|
-
},
|
|
95
|
-
onSubmit: async ({ value }) => {
|
|
96
|
-
setFormError(null)
|
|
97
|
-
setSuccessMessage(null)
|
|
98
|
-
const patch = buildPatch(value, account)
|
|
99
|
-
if (Object.keys(patch).length === 0) {
|
|
100
|
-
setSuccessMessage('No changes to save.')
|
|
101
|
-
return
|
|
102
|
-
}
|
|
103
|
-
try {
|
|
104
|
-
const updated = await updateAccount({ data: { vid: account.vid, patch } })
|
|
105
|
-
setSuccessMessage('Saved.')
|
|
106
|
-
onSuccess?.(updated)
|
|
107
|
-
} catch (err) {
|
|
108
|
-
const code = getErrorCode(err)
|
|
109
|
-
if (code === 'admin.users.emailInUse') {
|
|
110
|
-
form.setFieldMeta('email', (meta) => ({
|
|
111
|
-
...meta,
|
|
112
|
-
errorMap: { ...meta.errorMap, onServer: 'This email is already in use.' },
|
|
113
|
-
errors: ['This email is already in use.'],
|
|
114
|
-
}))
|
|
115
|
-
return
|
|
116
|
-
}
|
|
117
|
-
if (code === 'admin.users.versionConflict') {
|
|
118
|
-
setFormError(
|
|
119
|
-
'Your account has been modified elsewhere since you opened this form. Reload to refresh and try again.'
|
|
120
|
-
)
|
|
121
|
-
return
|
|
122
|
-
}
|
|
123
|
-
if (code === 'admin.account.notFound') {
|
|
124
|
-
setFormError('Your admin account could not be found. Please sign in again.')
|
|
125
|
-
return
|
|
126
|
-
}
|
|
127
|
-
setFormError('Could not save changes. Please try again.')
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
return (
|
|
133
|
-
<div className={cx('byline-account-update-wrap', styles.wrap)}>
|
|
134
|
-
<form
|
|
135
|
-
noValidate
|
|
136
|
-
onSubmit={(event) => {
|
|
137
|
-
event.preventDefault()
|
|
138
|
-
event.stopPropagation()
|
|
139
|
-
void form.handleSubmit()
|
|
140
|
-
}}
|
|
141
|
-
className={cx('byline-account-update-form', styles.form)}
|
|
142
|
-
>
|
|
143
|
-
{formError ? <Alert intent="danger">{formError}</Alert> : null}
|
|
144
|
-
{successMessage ? <Alert intent="success">{successMessage}</Alert> : null}
|
|
145
|
-
|
|
146
|
-
<form.Field name="given_name">
|
|
147
|
-
{(field) => (
|
|
148
|
-
<Input
|
|
149
|
-
label="Given name"
|
|
150
|
-
id="given_name"
|
|
151
|
-
name={field.name}
|
|
152
|
-
value={field.state.value}
|
|
153
|
-
onBlur={field.handleBlur}
|
|
154
|
-
onChange={(e) => field.handleChange(e.currentTarget.value)}
|
|
155
|
-
error={field.state.meta.errors.length > 0}
|
|
156
|
-
errorText={firstError(field.state.meta.errors)}
|
|
157
|
-
autoComplete="given-name"
|
|
158
|
-
/>
|
|
159
|
-
)}
|
|
160
|
-
</form.Field>
|
|
161
|
-
|
|
162
|
-
<form.Field name="family_name">
|
|
163
|
-
{(field) => (
|
|
164
|
-
<Input
|
|
165
|
-
label="Family name"
|
|
166
|
-
id="family_name"
|
|
167
|
-
name={field.name}
|
|
168
|
-
value={field.state.value}
|
|
169
|
-
onBlur={field.handleBlur}
|
|
170
|
-
onChange={(e) => field.handleChange(e.currentTarget.value)}
|
|
171
|
-
error={field.state.meta.errors.length > 0}
|
|
172
|
-
errorText={firstError(field.state.meta.errors)}
|
|
173
|
-
autoComplete="family-name"
|
|
174
|
-
/>
|
|
175
|
-
)}
|
|
176
|
-
</form.Field>
|
|
177
|
-
|
|
178
|
-
<form.Field name="username">
|
|
179
|
-
{(field) => (
|
|
180
|
-
<Input
|
|
181
|
-
label="Username"
|
|
182
|
-
id="username"
|
|
183
|
-
name={field.name}
|
|
184
|
-
value={field.state.value}
|
|
185
|
-
onBlur={field.handleBlur}
|
|
186
|
-
onChange={(e) => field.handleChange(e.currentTarget.value)}
|
|
187
|
-
error={field.state.meta.errors.length > 0}
|
|
188
|
-
errorText={firstError(field.state.meta.errors)}
|
|
189
|
-
helpText="Optional. Leave blank to clear."
|
|
190
|
-
autoComplete="username"
|
|
191
|
-
/>
|
|
192
|
-
)}
|
|
193
|
-
</form.Field>
|
|
194
|
-
|
|
195
|
-
<form.Field name="email">
|
|
196
|
-
{(field) => (
|
|
197
|
-
<Input
|
|
198
|
-
label="Email"
|
|
199
|
-
id="email"
|
|
200
|
-
name={field.name}
|
|
201
|
-
type="email"
|
|
202
|
-
value={field.state.value}
|
|
203
|
-
onBlur={field.handleBlur}
|
|
204
|
-
onChange={(e) => field.handleChange(e.currentTarget.value)}
|
|
205
|
-
error={field.state.meta.errors.length > 0}
|
|
206
|
-
errorText={firstError(field.state.meta.errors)}
|
|
207
|
-
autoComplete="email"
|
|
208
|
-
required
|
|
209
|
-
/>
|
|
210
|
-
)}
|
|
211
|
-
</form.Field>
|
|
212
|
-
|
|
213
|
-
<div className={cx('byline-account-update-actions', styles.actions)}>
|
|
214
|
-
<Button
|
|
215
|
-
type="button"
|
|
216
|
-
intent="secondary"
|
|
217
|
-
size="sm"
|
|
218
|
-
onClick={onClose}
|
|
219
|
-
className={cx('byline-account-update-action', styles.action)}
|
|
220
|
-
>
|
|
221
|
-
{successMessage ? 'Close' : 'Cancel'}
|
|
222
|
-
</Button>
|
|
223
|
-
<form.Subscribe
|
|
224
|
-
selector={(state) => ({
|
|
225
|
-
canSubmit: state.canSubmit,
|
|
226
|
-
isSubmitting: state.isSubmitting,
|
|
227
|
-
isDirty: state.isDirty,
|
|
228
|
-
})}
|
|
229
|
-
>
|
|
230
|
-
{({ canSubmit, isSubmitting }) => (
|
|
231
|
-
<Button
|
|
232
|
-
size="sm"
|
|
233
|
-
intent="primary"
|
|
234
|
-
type="submit"
|
|
235
|
-
disabled={!canSubmit || isSubmitting}
|
|
236
|
-
className={cx('byline-account-update-action', styles.action)}
|
|
237
|
-
>
|
|
238
|
-
{isSubmitting === true ? <LoaderEllipsis size={42} /> : 'Save'}
|
|
239
|
-
</Button>
|
|
240
|
-
)}
|
|
241
|
-
</form.Subscribe>
|
|
242
|
-
</div>
|
|
243
|
-
</form>
|
|
244
|
-
</div>
|
|
245
|
-
)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
function firstError(errors: readonly unknown[]): string | undefined {
|
|
249
|
-
for (const err of errors) {
|
|
250
|
-
if (typeof err === 'string') return err
|
|
251
|
-
if (err && typeof err === 'object' && 'message' in err) {
|
|
252
|
-
const msg = (err as { message?: unknown }).message
|
|
253
|
-
if (typeof msg === 'string') return msg
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return undefined
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
function getErrorCode(err: unknown): string | null {
|
|
260
|
-
return typeof (err as { code?: unknown })?.code === 'string'
|
|
261
|
-
? (err as { code: string }).code
|
|
262
|
-
: null
|
|
263
|
-
}
|
|
@@ -1,326 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AbilitiesInspector — registry inspector with lazy-loaded role/user matrices.
|
|
3
|
-
*
|
|
4
|
-
* Override handles:
|
|
5
|
-
* .byline-inspector-head — title row
|
|
6
|
-
* .byline-inspector-title — main heading
|
|
7
|
-
* .byline-inspector-count-pill — total-count pill
|
|
8
|
-
* .byline-inspector-lead — paragraph-style description
|
|
9
|
-
* .byline-inspector-empty — empty-state paragraph
|
|
10
|
-
* .byline-inspector-groups — vertical group stack
|
|
11
|
-
* .byline-inspector-group — group <details> card
|
|
12
|
-
* .byline-inspector-group-summary — group summary row
|
|
13
|
-
* .byline-inspector-group-name — group display name
|
|
14
|
-
* .byline-inspector-group-count — abilities-in-group count
|
|
15
|
-
* .byline-inspector-group-body — group body
|
|
16
|
-
* .byline-inspector-row — single ability row
|
|
17
|
-
* .byline-inspector-row-head — header inside a row
|
|
18
|
-
* .byline-inspector-row-info — info column inside row-head
|
|
19
|
-
* .byline-inspector-row-meta — code + source-badge row
|
|
20
|
-
* .byline-inspector-row-key — ability key code pill
|
|
21
|
-
* .byline-inspector-row-source — source badge base
|
|
22
|
-
* .byline-inspector-row-source-collection
|
|
23
|
-
* .byline-inspector-row-source-admin
|
|
24
|
-
* .byline-inspector-row-source-plugin
|
|
25
|
-
* .byline-inspector-row-source-core
|
|
26
|
-
* .byline-inspector-row-source-unknown
|
|
27
|
-
* .byline-inspector-row-label — ability display name
|
|
28
|
-
* .byline-inspector-row-description — ability description
|
|
29
|
-
* .byline-inspector-loader — loading row inside expanded row
|
|
30
|
-
* .byline-inspector-matrix — two-column roles/users panel
|
|
31
|
-
* .byline-inspector-matrix-title — column heading
|
|
32
|
-
* .byline-inspector-matrix-empty — empty-list message
|
|
33
|
-
* .byline-inspector-matrix-list — bare list
|
|
34
|
-
* .byline-inspector-matrix-item — list item
|
|
35
|
-
* .byline-inspector-matrix-name — bold name span
|
|
36
|
-
* .byline-inspector-matrix-machine — muted machine-name suffix
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
.head,
|
|
40
|
-
:global(.byline-inspector-head) {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: var(--spacing-12);
|
|
44
|
-
margin-bottom: var(--spacing-16);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.title,
|
|
48
|
-
:global(.byline-inspector-title) {
|
|
49
|
-
margin: 0;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.count-pill,
|
|
53
|
-
:global(.byline-inspector-count-pill) {
|
|
54
|
-
background-color: var(--gray-25);
|
|
55
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-200);
|
|
56
|
-
padding: var(--spacing-4) var(--spacing-8);
|
|
57
|
-
font-size: var(--font-size-sm);
|
|
58
|
-
border-radius: var(--border-radius-sm);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.lead,
|
|
62
|
-
:global(.byline-inspector-lead) {
|
|
63
|
-
margin-bottom: var(--spacing-16);
|
|
64
|
-
font-size: var(--font-size-sm);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.empty,
|
|
68
|
-
:global(.byline-inspector-empty) {
|
|
69
|
-
/* Inherits .muted colour from sibling utility class. */
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.groups,
|
|
73
|
-
:global(.byline-inspector-groups) {
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
gap: var(--spacing-8);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.group,
|
|
80
|
-
:global(.byline-inspector-group) {
|
|
81
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
82
|
-
border-radius: var(--border-radius-sm);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/* Hide the default summary disclosure marker (browser-specific). */
|
|
86
|
-
.group :global(summary)::-webkit-details-marker {
|
|
87
|
-
display: none;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.group-summary,
|
|
91
|
-
:global(.byline-inspector-group-summary) {
|
|
92
|
-
display: flex;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
align-items: center;
|
|
95
|
-
justify-content: space-between;
|
|
96
|
-
padding: var(--spacing-12);
|
|
97
|
-
list-style: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.group-name,
|
|
101
|
-
:global(.byline-inspector-group-name) {
|
|
102
|
-
font-weight: var(--font-weight-medium);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.group-count,
|
|
106
|
-
:global(.byline-inspector-group-count) {
|
|
107
|
-
font-size: var(--font-size-xs);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.group-body,
|
|
111
|
-
:global(.byline-inspector-group-body) {
|
|
112
|
-
padding: 0 var(--spacing-12) var(--spacing-12) var(--spacing-12);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.row,
|
|
116
|
-
:global(.byline-inspector-row) {
|
|
117
|
-
border-top: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
118
|
-
padding: var(--spacing-8) 0;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.row:first-child,
|
|
122
|
-
:global(.byline-inspector-row):first-child {
|
|
123
|
-
border-top: 0;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.row-head,
|
|
127
|
-
:global(.byline-inspector-row-head) {
|
|
128
|
-
display: flex;
|
|
129
|
-
align-items: flex-start;
|
|
130
|
-
gap: var(--spacing-12);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.row-info,
|
|
134
|
-
:global(.byline-inspector-row-info) {
|
|
135
|
-
min-width: 0;
|
|
136
|
-
flex: 1 1 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.row-meta,
|
|
140
|
-
:global(.byline-inspector-row-meta) {
|
|
141
|
-
display: flex;
|
|
142
|
-
align-items: center;
|
|
143
|
-
gap: var(--spacing-8);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.row-key,
|
|
147
|
-
:global(.byline-inspector-row-key) {
|
|
148
|
-
background-color: var(--gray-50);
|
|
149
|
-
padding: 0.125rem 0.375rem;
|
|
150
|
-
font-size: var(--font-size-xs);
|
|
151
|
-
border-radius: var(--border-radius-sm);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.row-source,
|
|
155
|
-
:global(.byline-inspector-row-source) {
|
|
156
|
-
padding: 0.125rem 0.375rem;
|
|
157
|
-
font-size: 0.625rem;
|
|
158
|
-
text-transform: uppercase;
|
|
159
|
-
letter-spacing: 0.05em;
|
|
160
|
-
border-radius: var(--border-radius-sm);
|
|
161
|
-
background-color: var(--gray-100);
|
|
162
|
-
color: var(--gray-800);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.row-source-collection,
|
|
166
|
-
:global(.byline-inspector-row-source-collection) {
|
|
167
|
-
background-color: var(--gray-100);
|
|
168
|
-
color: var(--gray-800);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.row-source-admin,
|
|
172
|
-
:global(.byline-inspector-row-source-admin) {
|
|
173
|
-
background-color: var(--blue-50);
|
|
174
|
-
color: var(--blue-700);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
.row-source-plugin,
|
|
178
|
-
:global(.byline-inspector-row-source-plugin) {
|
|
179
|
-
/* No purple token in uikit; fall back to primary scale. */
|
|
180
|
-
background-color: var(--primary-50);
|
|
181
|
-
color: var(--primary-700);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.row-source-core,
|
|
185
|
-
:global(.byline-inspector-row-source-core) {
|
|
186
|
-
background-color: var(--green-50);
|
|
187
|
-
color: var(--green-700);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.row-source-unknown,
|
|
191
|
-
:global(.byline-inspector-row-source-unknown) {
|
|
192
|
-
background-color: var(--gray-50);
|
|
193
|
-
color: var(--gray-600);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.row-label,
|
|
197
|
-
:global(.byline-inspector-row-label) {
|
|
198
|
-
margin: var(--spacing-4) 0 0 0;
|
|
199
|
-
font-size: var(--font-size-sm);
|
|
200
|
-
font-weight: var(--font-weight-medium);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.row-description,
|
|
204
|
-
:global(.byline-inspector-row-description) {
|
|
205
|
-
margin-bottom: 0;
|
|
206
|
-
font-size: var(--font-size-xs);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.loader,
|
|
210
|
-
:global(.byline-inspector-loader) {
|
|
211
|
-
display: flex;
|
|
212
|
-
align-items: center;
|
|
213
|
-
gap: var(--spacing-8);
|
|
214
|
-
margin-top: var(--spacing-8);
|
|
215
|
-
font-size: var(--font-size-sm);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.matrix,
|
|
219
|
-
:global(.byline-inspector-matrix) {
|
|
220
|
-
margin-top: var(--spacing-8);
|
|
221
|
-
display: grid;
|
|
222
|
-
grid-template-columns: 1fr;
|
|
223
|
-
gap: var(--spacing-12);
|
|
224
|
-
padding: var(--spacing-12);
|
|
225
|
-
background-color: var(--canvas-25);
|
|
226
|
-
border: var(--border-width-thin) var(--border-style-solid) var(--gray-100);
|
|
227
|
-
border-radius: var(--border-radius-sm);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
@media (min-width: 40rem) {
|
|
231
|
-
.matrix,
|
|
232
|
-
:global(.byline-inspector-matrix) {
|
|
233
|
-
grid-template-columns: 1fr 1fr;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.matrix-title,
|
|
238
|
-
:global(.byline-inspector-matrix-title) {
|
|
239
|
-
margin: 0 0 var(--spacing-8) 0;
|
|
240
|
-
font-size: var(--font-size-sm);
|
|
241
|
-
font-weight: var(--font-weight-bold);
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.matrix-empty,
|
|
245
|
-
:global(.byline-inspector-matrix-empty) {
|
|
246
|
-
margin: 0;
|
|
247
|
-
font-style: italic;
|
|
248
|
-
font-size: var(--font-size-sm);
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.matrix-list,
|
|
252
|
-
:global(.byline-inspector-matrix-list) {
|
|
253
|
-
margin: 0;
|
|
254
|
-
list-style: none;
|
|
255
|
-
padding: 0;
|
|
256
|
-
font-size: var(--font-size-sm);
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.matrix-item,
|
|
260
|
-
:global(.byline-inspector-matrix-item) {
|
|
261
|
-
margin-bottom: var(--spacing-4);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.matrix-name,
|
|
265
|
-
:global(.byline-inspector-matrix-name) {
|
|
266
|
-
font-weight: var(--font-weight-medium);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
:is([data-theme="dark"], :global(.dark)) {
|
|
270
|
-
.count-pill,
|
|
271
|
-
:global(.byline-inspector-count-pill) {
|
|
272
|
-
background-color: var(--canvas-700);
|
|
273
|
-
border-color: var(--gray-700);
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.group,
|
|
277
|
-
:global(.byline-inspector-group) {
|
|
278
|
-
border-color: var(--gray-700);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.row,
|
|
282
|
-
:global(.byline-inspector-row) {
|
|
283
|
-
border-top-color: var(--gray-700);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.row-key,
|
|
287
|
-
:global(.byline-inspector-row-key) {
|
|
288
|
-
background-color: var(--canvas-800);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.row-source-collection,
|
|
292
|
-
:global(.byline-inspector-row-source-collection) {
|
|
293
|
-
background-color: var(--canvas-700);
|
|
294
|
-
color: var(--gray-200);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.row-source-admin,
|
|
298
|
-
:global(.byline-inspector-row-source-admin) {
|
|
299
|
-
background-color: var(--blue-900);
|
|
300
|
-
color: var(--blue-200);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.row-source-plugin,
|
|
304
|
-
:global(.byline-inspector-row-source-plugin) {
|
|
305
|
-
background-color: var(--primary-900);
|
|
306
|
-
color: var(--primary-200);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
.row-source-core,
|
|
310
|
-
:global(.byline-inspector-row-source-core) {
|
|
311
|
-
background-color: var(--green-900);
|
|
312
|
-
color: var(--green-200);
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.row-source-unknown,
|
|
316
|
-
:global(.byline-inspector-row-source-unknown) {
|
|
317
|
-
background-color: var(--canvas-800);
|
|
318
|
-
color: var(--gray-400);
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.matrix,
|
|
322
|
-
:global(.byline-inspector-matrix) {
|
|
323
|
-
background-color: var(--canvas-800);
|
|
324
|
-
border-color: var(--gray-700);
|
|
325
|
-
}
|
|
326
|
-
}
|