@ciridae/ui 1.1.1 → 1.2.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/dist/app/auth.js +7 -0
- package/dist/app/frame.d.ts +8 -0
- package/dist/app/frame.js +15 -0
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +1 -0
- package/dist/components/button.js +3 -1
- package/dist/components/chat.js +2 -11
- package/dist/components/color-theme.js +16 -1
- package/dist/components/data-grid.d.ts +5 -1
- package/dist/components/data-grid.js +4 -3
- package/dist/components/environment-frame.d.ts +1 -1
- package/dist/components/environment-frame.js +4 -8
- package/dist/components/feedback-screenshot.js +16 -7
- package/dist/components/form-controls.js +2 -1
- package/dist/components/locale.d.ts +27 -0
- package/dist/components/locale.js +19 -0
- package/dist/components/member-directory.d.ts +35 -0
- package/dist/components/member-directory.js +125 -0
- package/dist/components/overlays.js +11 -0
- package/dist/components/select.js +4 -1
- package/dist/components/shell.js +4 -2
- package/dist/components/sidebar.js +1 -1
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +18 -5
- package/dist/preset.js +0 -2
- package/dist/styled-system/styles.css +68 -59
- package/dist/styled-system/tokens/index.mjs +0 -8
- package/dist/styled-system/tokens/tokens.d.ts +2 -2
- package/dist/theme/tokens.d.ts +1 -1
- package/dist/theme/tokens.js +0 -6
- package/package.json +6 -1
package/dist/app/auth.js
CHANGED
|
@@ -3,6 +3,7 @@ import { parseSameOriginPath } from "@ciridae/auth/client";
|
|
|
3
3
|
import { useCiridaeAuth, useCompleteCiridaeSignIn } from "@ciridae/auth/react";
|
|
4
4
|
import { useCallback, useEffect, useState } from "react";
|
|
5
5
|
import { useLocation, useNavigate } from "react-router-dom";
|
|
6
|
+
import { forgetShapes } from "skullet";
|
|
6
7
|
import { CiridaeMark } from "../components/brand-icons.js";
|
|
7
8
|
import { icon, Spinner } from "../components/icon.js";
|
|
8
9
|
import { Stack } from "../components/layout.js";
|
|
@@ -20,6 +21,12 @@ function SignInLoading() {
|
|
|
20
21
|
/** Renders children for a signed-in session and sends everyone else to the auth service. */
|
|
21
22
|
export function RequireSignIn({ children, loading = _jsx(SignInLoading, {}), }) {
|
|
22
23
|
const { auth, session } = useCiridaeAuth();
|
|
24
|
+
const signedInUserId = session.status === "signedIn" ? session.user.uid : null;
|
|
25
|
+
// Skullet remembers layout outlines across visits. Never carry them across accounts.
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
forgetShapes();
|
|
28
|
+
return () => forgetShapes();
|
|
29
|
+
}, [signedInUserId]);
|
|
23
30
|
const signInUrl = session.status === "signedOut"
|
|
24
31
|
? auth.getSignInUrl(window.location.pathname + window.location.search)
|
|
25
32
|
: null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AppFrameProps } from "../components/app-frame.js";
|
|
2
|
+
import { type FeedbackScope } from "./feedback.js";
|
|
3
|
+
export type CiridaeAppFrameProps = AppFrameProps & {
|
|
4
|
+
/** Enables the shared feedback controls and sheet for this app's inbox. */
|
|
5
|
+
feedbackScope?: FeedbackScope | null;
|
|
6
|
+
};
|
|
7
|
+
/** AppFrame with opt-in Ciridae feedback: one footer row, rail and phone controls, and the sheet. */
|
|
8
|
+
export declare function CiridaeAppFrame({ feedbackScope, footnote, railActions, compactActions, overlays, ...props }: CiridaeAppFrameProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChatCircleTextIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { AppFrame } from "../components/app-frame.js";
|
|
5
|
+
import { Button, IconButton } from "../components/button.js";
|
|
6
|
+
import { icon } from "../components/icon.js";
|
|
7
|
+
import { Tooltip } from "../components/overlays.js";
|
|
8
|
+
import { SidebarItem } from "../components/sidebar.js";
|
|
9
|
+
import { FeedbackDialog } from "./feedback.js";
|
|
10
|
+
/** AppFrame with opt-in Ciridae feedback: one footer row, rail and phone controls, and the sheet. */
|
|
11
|
+
export function CiridaeAppFrame({ feedbackScope, footnote, railActions, compactActions, overlays, ...props }) {
|
|
12
|
+
const [feedbackOpen, setFeedbackOpen] = useState(false);
|
|
13
|
+
const openFeedback = () => setFeedbackOpen(true);
|
|
14
|
+
return (_jsx(AppFrame, { ...props, footnote: feedbackScope ? (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "link", icon: _jsx(ChatCircleTextIcon, { className: icon({ size: "small" }) }), onClick: openFeedback, children: "Feedback" }), footnote] })) : (footnote), railActions: feedbackScope ? (_jsxs(_Fragment, { children: [_jsx(Tooltip, { content: "Feedback", side: "inline-end", children: _jsx(SidebarItem, { "aria-label": "Feedback", icon: _jsx(ChatCircleTextIcon, { className: icon() }), onClick: openFeedback }) }), railActions] })) : (railActions), compactActions: feedbackScope ? (_jsxs(_Fragment, { children: [_jsx(IconButton, { variant: "ghost", "aria-label": "Feedback", onClick: openFeedback, children: _jsx(ChatCircleTextIcon, { className: icon() }) }), compactActions] })) : (compactActions), overlays: _jsxs(_Fragment, { children: [overlays, feedbackScope && (_jsx(FeedbackDialog, { scope: feedbackScope, open: feedbackOpen, onOpenChange: setFeedbackOpen }))] }) }));
|
|
15
|
+
}
|
package/dist/app/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export { RequireSignIn, SignInCallbackPage } from "./auth.js";
|
|
3
3
|
export { AppErrorBoundary } from "./error-boundary.js";
|
|
4
4
|
export { FeedbackDialog, type FeedbackScope } from "./feedback.js";
|
|
5
|
+
export { CiridaeAppFrame, type CiridaeAppFrameProps } from "./frame.js";
|
|
5
6
|
export { errorMessage, errorStatus, errorTraceId, QueryContent, reportedInline, reportedInlineMeta, requestErrorDescription, RequestErrorToasts, RequestFieldError, requestErrorToast, withResponseDetails, } from "./request-errors.js";
|
|
6
7
|
export { initializeSentry, setSentryOrganization } from "./sentry.js";
|
|
7
8
|
export { AppTelemetryProvider } from "./telemetry.js";
|
package/dist/app/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export { RequireSignIn, SignInCallbackPage } from "./auth.js";
|
|
3
3
|
export { AppErrorBoundary } from "./error-boundary.js";
|
|
4
4
|
export { FeedbackDialog } from "./feedback.js";
|
|
5
|
+
export { CiridaeAppFrame } from "./frame.js";
|
|
5
6
|
export { errorMessage, errorStatus, errorTraceId, QueryContent, reportedInline, reportedInlineMeta, requestErrorDescription, RequestErrorToasts, RequestFieldError, requestErrorToast, withResponseDetails, } from "./request-errors.js";
|
|
6
7
|
export { initializeSentry, setSentryOrganization } from "./sentry.js";
|
|
7
8
|
export { AppTelemetryProvider } from "./telemetry.js";
|
|
@@ -104,7 +104,9 @@ const action = cva({
|
|
|
104
104
|
// Words only, in the text around it: no face, no height, underlined on hover.
|
|
105
105
|
link: {
|
|
106
106
|
background: "transparent",
|
|
107
|
-
color: "
|
|
107
|
+
color: "[inherit]",
|
|
108
|
+
alignItems: "baseline",
|
|
109
|
+
"& > svg": { alignSelf: "center" },
|
|
108
110
|
fontFamily: "[inherit]",
|
|
109
111
|
fontWeight: "[inherit]",
|
|
110
112
|
letterSpacing: "[inherit]",
|
package/dist/components/chat.js
CHANGED
|
@@ -13,6 +13,7 @@ import { useCiridaeLocale } from "./locale.js";
|
|
|
13
13
|
import { LogGroupHeader } from "./log-entry.js";
|
|
14
14
|
import { MentionInput } from "./mention-input.js";
|
|
15
15
|
import { useResolvedFileUrl } from "./resolved-file-url.js";
|
|
16
|
+
import { Skeleton } from "./skeleton.js";
|
|
16
17
|
export { MessageText, splitSources, } from "../chat/message-text.js";
|
|
17
18
|
const pageComposer = css({
|
|
18
19
|
display: "flex",
|
|
@@ -490,7 +491,6 @@ const attachmentList = css({
|
|
|
490
491
|
fontSize: "code",
|
|
491
492
|
"& a": { color: "[inherit]" },
|
|
492
493
|
});
|
|
493
|
-
/* The lines stand in for the reply's text, so each is that text's bar height. */
|
|
494
494
|
const thinking = css({
|
|
495
495
|
display: "grid",
|
|
496
496
|
gap: "layout.contentGap",
|
|
@@ -506,15 +506,6 @@ const thinking = css({
|
|
|
506
506
|
lineHeight: "tight",
|
|
507
507
|
"& > span": { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
508
508
|
},
|
|
509
|
-
"& > [data-line]": {
|
|
510
|
-
display: "block",
|
|
511
|
-
height: "[calc(token(fontSizes.body) * 0.75)]",
|
|
512
|
-
borderRadius: "round",
|
|
513
|
-
background: "[token(gradients.skeletonFill)]",
|
|
514
|
-
},
|
|
515
|
-
"& > [data-line]:nth-of-type(1)": { width: "[98%]" },
|
|
516
|
-
"& > [data-line]:nth-of-type(2)": { width: "[87%]" },
|
|
517
|
-
"& > [data-line]:nth-of-type(3)": { width: "[66%]" },
|
|
518
509
|
});
|
|
519
510
|
const failure = css({
|
|
520
511
|
display: "grid",
|
|
@@ -757,7 +748,7 @@ function ThreadEntryContent({ entry, side, groupPosition, renderCustom, attachme
|
|
|
757
748
|
}
|
|
758
749
|
function AgentThinking({ label }) {
|
|
759
750
|
const { labels } = useCiridaeLocale();
|
|
760
|
-
return (_jsxs("div", { className: thinking, children: [_jsxs("div", { "data-status": "", children: [_jsx(Spinner, { "aria-hidden": "true" }), _jsx("span", { children: label ?? labels.common.working })] }), _jsx("
|
|
751
|
+
return (_jsxs("div", { className: thinking, children: [_jsxs("div", { "data-status": "", children: [_jsx(Spinner, { "aria-hidden": "true" }), _jsx("span", { children: label ?? labels.common.working })] }), _jsx(Skeleton, { shape: "text", height: "line", width: "98%" }), _jsx(Skeleton, { shape: "text", height: "line", width: "87%" }), _jsx(Skeleton, { shape: "text", height: "line", width: "66%" })] }));
|
|
761
752
|
}
|
|
762
753
|
function AgentSteps({ steps }) {
|
|
763
754
|
const { labels } = useCiridaeLocale();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState, } from "react";
|
|
3
|
+
import { SkulletProvider } from "skullet/react";
|
|
3
4
|
import { fontStylesheet } from "../theme/tokens.js";
|
|
4
5
|
/** The attribute the `light` Panda condition and `ciridae.css` both select on. */
|
|
5
6
|
const THEME_ATTRIBUTE = "data-ciridae-theme";
|
|
@@ -33,6 +34,20 @@ function readSystemTheme() {
|
|
|
33
34
|
}
|
|
34
35
|
const ColorThemeContext = createContext(null);
|
|
35
36
|
const BrandContext = createContext(null);
|
|
37
|
+
// Both modes use the product's resolved ink, so custom palettes follow the same theme. The
|
|
38
|
+
// highlight paints over the bar: dark ink would smear it, so light has none and holds still.
|
|
39
|
+
const loadingTheme = {
|
|
40
|
+
light: {
|
|
41
|
+
base: "color-mix(in srgb, var(--colors-fg\\.primary) 8%, transparent)",
|
|
42
|
+
highlight: "transparent",
|
|
43
|
+
},
|
|
44
|
+
dark: {
|
|
45
|
+
base: "color-mix(in srgb, var(--colors-fg\\.primary) 8%, transparent)",
|
|
46
|
+
highlight: "color-mix(in srgb, var(--colors-fg\\.primary) 5%, transparent)",
|
|
47
|
+
},
|
|
48
|
+
animation: "shimmer",
|
|
49
|
+
speed: "slow",
|
|
50
|
+
};
|
|
36
51
|
const RUNTIME_FONTS_ELEMENT_ID = "ciridae-runtime-fonts";
|
|
37
52
|
function useRuntimeFonts(fonts) {
|
|
38
53
|
const display = fonts?.display;
|
|
@@ -90,7 +105,7 @@ export function ThemeProvider({ children, defaultColorTheme = "dark", storageKey
|
|
|
90
105
|
const setTheme = setPreference;
|
|
91
106
|
const toggleTheme = useCallback(() => setTheme(theme === "dark" ? "light" : "dark"), [setTheme, theme]);
|
|
92
107
|
const value = useMemo(() => ({ theme, preference, setPreference, setTheme, toggleTheme }), [theme, preference, setPreference, setTheme, toggleTheme]);
|
|
93
|
-
return (_jsx(ColorThemeContext.Provider, { value: value, children: _jsx(BrandContext.Provider, { value: brand ?? null, children: children }) }));
|
|
108
|
+
return (_jsx(ColorThemeContext.Provider, { value: value, children: _jsx(BrandContext.Provider, { value: brand ?? null, children: _jsx(SkulletProvider, { mode: theme, theme: loadingTheme, reveal: "smart", children: children }) }) }));
|
|
94
109
|
}
|
|
95
110
|
/** Throws outside a `ThemeProvider`, where there is no theme to report or change. */
|
|
96
111
|
export function useColorTheme() {
|
|
@@ -167,6 +167,10 @@ export type DataGridProps<Row extends RowData> = Omit<ComponentProps<"div">, "ch
|
|
|
167
167
|
*/
|
|
168
168
|
export declare function DataGrid<Row extends RowData>({ data, columns, getRowId, variant, density, sorting: sortingProp, defaultSorting, onSortingChange, manualSorting, page, enableRowSelection, rowSelection: rowSelectionProp, defaultRowSelection, onRowSelectionChange, stickySelectColumn, columnVisibility: columnVisibilityProp, defaultColumnVisibility, onColumnVisibilityChange, columnOrder: columnOrderProp, defaultColumnOrder, onColumnOrderChange, headerMenu, filters, onFiltersChange, getRowHref, renderRowLink, onRowClick, activeRowId, keyboardNavigation, virtualize, rowActions, renderRowDetail, groupBy, renderGroupRow, loading, empty, noResults, filtered, hideHeader, fill, narrowScreenLayout, footer, labels: ownLabels, className, frameClassName, style, ...props }: DataGridProps<Row>): import("react").JSX.Element;
|
|
169
169
|
export type TableProps<Row extends RowData> = Omit<DataGridProps<Row>, "defaultSorting" | "empty"> & {
|
|
170
|
+
/** Representative rows measured with the real columns instead of authored placeholder cells. */
|
|
171
|
+
loadingSample?: readonly Row[];
|
|
172
|
+
/** Accessible announcement for measured loading. */
|
|
173
|
+
loadingLabel?: string;
|
|
170
174
|
/** The sort the table starts with; `defaultSorting` on `DataGrid`. */
|
|
171
175
|
initialSorting?: SortingState;
|
|
172
176
|
/** Shown when there are no rows; `empty` on `DataGrid`. */
|
|
@@ -176,4 +180,4 @@ export type TableProps<Row extends RowData> = Omit<DataGridProps<Row>, "defaultS
|
|
|
176
180
|
* `DataGrid` with the plain look: flush with its section, rows that light on hover when they lead
|
|
177
181
|
* somewhere.
|
|
178
182
|
*/
|
|
179
|
-
export declare function Table<Row extends RowData>({ variant, initialSorting, emptyMessage, ...props }: TableProps<Row>): import("react").JSX.Element;
|
|
183
|
+
export declare function Table<Row extends RowData>({ variant, initialSorting, emptyMessage, loadingSample, loadingLabel, ...props }: TableProps<Row>): import("react").JSX.Element;
|
|
@@ -20,7 +20,7 @@ import { icon } from "./icon.js";
|
|
|
20
20
|
import { useCiridaeLocale } from "./locale.js";
|
|
21
21
|
import { Menu } from "./menu.js";
|
|
22
22
|
import { Popover } from "./overlays.js";
|
|
23
|
-
import { Skeleton } from "./skeleton.js";
|
|
23
|
+
import { ContentSkeleton, Skeleton } from "./skeleton.js";
|
|
24
24
|
/** TanStack uses this type-only slot to type `meta`. */
|
|
25
25
|
const columnMeta = {};
|
|
26
26
|
const tableFeatureSet = tableFeatures({
|
|
@@ -511,8 +511,9 @@ export function DataGrid({ data, columns, getRowId, variant = "framed", density
|
|
|
511
511
|
* `DataGrid` with the plain look: flush with its section, rows that light on hover when they lead
|
|
512
512
|
* somewhere.
|
|
513
513
|
*/
|
|
514
|
-
export function Table({ variant = "plain", initialSorting, emptyMessage, ...props }) {
|
|
515
|
-
|
|
514
|
+
export function Table({ variant = "plain", initialSorting, emptyMessage, loadingSample, loadingLabel = "Loading rows", ...props }) {
|
|
515
|
+
const render = (data, loading = props.loading) => (_jsx(DataGrid, { variant: variant, defaultSorting: initialSorting, empty: emptyMessage, ...props, data: data, loading: loading }));
|
|
516
|
+
return loadingSample ? (_jsx(ContentSkeleton, { data: props.loading ? undefined : props.data, sample: loadingSample, label: loadingLabel, fill: props.fill, children: (data) => render(data, false) })) : (render(props.data));
|
|
516
517
|
}
|
|
517
518
|
const emptySorting = [];
|
|
518
519
|
const emptySelection = {};
|
|
@@ -9,5 +9,5 @@ export type EnvironmentFrameProps = ComponentProps<"div"> & {
|
|
|
9
9
|
/** The strip's tint: `warning` for a staging build, `info` for dev. */
|
|
10
10
|
tone?: SiteBannerProps["tone"];
|
|
11
11
|
};
|
|
12
|
-
/** An environment strip, which the reader can dismiss for the session, and
|
|
12
|
+
/** An environment strip, which the reader can dismiss for the session, and the AppShell viewport below it. */
|
|
13
13
|
export declare function EnvironmentFrame({ label, tone, children, className, ...props }: EnvironmentFrameProps): import("react").JSX.Element;
|
|
@@ -15,19 +15,15 @@ const environmentBanner = css({
|
|
|
15
15
|
_phone: { paddingInlineStart: "panel.default" },
|
|
16
16
|
});
|
|
17
17
|
const viewport = css({
|
|
18
|
+
position: "relative",
|
|
18
19
|
flex: "1",
|
|
19
20
|
minHeight: "0",
|
|
20
21
|
overflow: "hidden",
|
|
21
22
|
background: "[token(gradients.canvas)]",
|
|
22
|
-
// Only under the environment strip does the app read as inset below it.
|
|
23
|
-
"&[data-under-banner]": {
|
|
24
|
-
borderTopRadius: "field",
|
|
25
|
-
boxShadow: "[inset 0 2px 4px rgba(0, 0, 0, 0.18)]",
|
|
26
|
-
},
|
|
27
23
|
// Keep the shell and its phone layout within the space below the site banner. On a desktop the
|
|
28
24
|
// shell's row sizes the main panel inside its block margins, so a full height would push it past
|
|
29
25
|
// them; a phone's main panel is a full window tall, so there it takes the space under the strip.
|
|
30
|
-
"& > [data-ciridae-ui]": { height: "full", background: "transparent" },
|
|
26
|
+
"& > [data-ciridae-ui]": { position: "absolute", height: "full", background: "transparent" },
|
|
31
27
|
// The main panel keeps its own 8 corners, as the Figma's page card has them everywhere.
|
|
32
28
|
"& > [data-ciridae-ui] > main": { _phone: { height: "full" } },
|
|
33
29
|
"& > [data-ciridae-ui] > main > header": {
|
|
@@ -58,7 +54,7 @@ function rememberDismissedForSession() {
|
|
|
58
54
|
console.warn(`Could not save ${dismissedStorageKey}; the strip stays hidden until the page reloads`, error);
|
|
59
55
|
}
|
|
60
56
|
}
|
|
61
|
-
/** An environment strip, which the reader can dismiss for the session, and
|
|
57
|
+
/** An environment strip, which the reader can dismiss for the session, and the AppShell viewport below it. */
|
|
62
58
|
export function EnvironmentFrame({ label, tone = "info", children, className, ...props }) {
|
|
63
59
|
const { labels } = useCiridaeLocale();
|
|
64
60
|
const [dismissed, setDismissed] = useState(readDismissedForSession);
|
|
@@ -67,5 +63,5 @@ export function EnvironmentFrame({ label, tone = "info", children, className, ..
|
|
|
67
63
|
rememberDismissedForSession();
|
|
68
64
|
setDismissed(true);
|
|
69
65
|
};
|
|
70
|
-
return (_jsxs("div", { ...props, className: cx(frame, className), children: [shown && (_jsx(SiteBanner, { className: environmentBanner, tone: tone, onDismiss: dismiss, children: typeof label === "string" ? labels.shell.environment(label) : label })), _jsx("div", { className: viewport,
|
|
66
|
+
return (_jsxs("div", { ...props, className: cx(frame, className), children: [shown && (_jsx(SiteBanner, { className: environmentBanner, tone: tone, onDismiss: dismiss, children: typeof label === "string" ? labels.shell.environment(label) : label })), _jsx("div", { className: viewport, children: children })] }));
|
|
71
67
|
}
|
|
@@ -7,23 +7,26 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
7
7
|
import { XIcon } from "@phosphor-icons/react";
|
|
8
8
|
import { useRef, useState } from "react";
|
|
9
9
|
import { css } from "#primitives/css";
|
|
10
|
-
import {
|
|
10
|
+
import { IconButton } from "./button.js";
|
|
11
|
+
import { Textarea } from "./form-controls.js";
|
|
11
12
|
import { icon } from "./icon.js";
|
|
12
|
-
import { Input } from "./input.js";
|
|
13
13
|
import { useCiridaeLocale } from "./locale.js";
|
|
14
14
|
import { Dialog } from "./overlays.js";
|
|
15
15
|
/** The most pointers one screenshot takes. */
|
|
16
16
|
export const MAX_SCREENSHOT_POINTERS = 7;
|
|
17
|
+
/* Runs the dialog's width behind an image its height limit keeps narrower. */
|
|
18
|
+
const stageFrame = css({
|
|
19
|
+
display: "grid",
|
|
20
|
+
justifyItems: "center",
|
|
21
|
+
borderBlockEnd: "1px solid token(colors.border.control)",
|
|
22
|
+
background: "bg.field",
|
|
23
|
+
});
|
|
17
24
|
/* The image and its pointers share one box, so a pointer's percentages are the image's. */
|
|
18
25
|
const stage = css({
|
|
19
26
|
position: "relative",
|
|
20
|
-
justifySelf: "center",
|
|
21
27
|
width: "[fit-content]",
|
|
22
28
|
maxWidth: "full",
|
|
23
29
|
overflow: "hidden",
|
|
24
|
-
border: "1px solid token(colors.border.control)",
|
|
25
|
-
borderRadius: "control",
|
|
26
|
-
background: "bg.field",
|
|
27
30
|
});
|
|
28
31
|
const stageButton = css({
|
|
29
32
|
display: "block",
|
|
@@ -65,6 +68,12 @@ const pointerList = css({
|
|
|
65
68
|
padding: "none",
|
|
66
69
|
listStyle: "none",
|
|
67
70
|
});
|
|
71
|
+
/* One line until the note needs more. */
|
|
72
|
+
const pointerNote = css({
|
|
73
|
+
/* Doubled, to outrank the Textarea's own taller minimum and resize handle. */
|
|
74
|
+
"&&": { minHeight: "control.default", resize: "none" },
|
|
75
|
+
fieldSizing: "content",
|
|
76
|
+
});
|
|
68
77
|
const pointerRow = css({
|
|
69
78
|
display: "grid",
|
|
70
79
|
gridTemplateColumns: "auto minmax(0, 1fr) auto",
|
|
@@ -153,7 +162,7 @@ export function FeedbackScreenshot({ src, pointers, onPointersChange, disabled,
|
|
|
153
162
|
onPointersChange(pointers.map((pointer) => (pointer.id === id ? { ...pointer, ...at } : pointer)));
|
|
154
163
|
};
|
|
155
164
|
const remove = (id) => onPointersChange(pointers.filter((pointer) => pointer.id !== id));
|
|
156
|
-
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: thumbnail, "aria-label": pointers.length ? labels.annotateCount(pointers.length) : labels.annotate, disabled: disabled, onClick: () => setOpen(true), children: [_jsx("img", { src: src, alt: "" }), pointers.map((pointer) => (_jsx("span", { className: thumbnailDot, style: placeAt(pointer) }, pointer.id))), pointers.length > 0 && _jsx("span", { className: thumbnailCount, children: pointers.length })] }), _jsxs(Dialog, { open: open, onOpenChange: setOpen, title: labels.annotate, kind: "info", size: "wide",
|
|
165
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: thumbnail, "aria-label": pointers.length ? labels.annotateCount(pointers.length) : labels.annotate, disabled: disabled, onClick: () => setOpen(true), children: [_jsx("img", { src: src, alt: "" }), pointers.map((pointer) => (_jsx("span", { className: thumbnailDot, style: placeAt(pointer) }, pointer.id))), pointers.length > 0 && _jsx("span", { className: thumbnailCount, children: pointers.length })] }), _jsxs(Dialog, { open: open, onOpenChange: setOpen, title: labels.annotate, titleVisibility: "hidden", kind: "info", dismiss: "footer", closeLabel: common.done, size: "wide", children: [_jsx("div", { className: stageFrame, "data-dialog-bleed": "", children: _jsxs("div", { className: stage, children: [_jsx("button", { type: "button", ref: image, className: stageButton, "aria-label": labels.addPointer, "data-full": (full && pointers.every((pointer) => pointer.note.trim())) || undefined, onClick: drop, children: _jsx("img", { src: src, alt: labels.screenshot }) }), pointers.map((pointer, index) => (_jsx("span", { className: pointerMark, style: placeAt(pointer), "aria-hidden": "true", onPointerDown: (event) => event.currentTarget.setPointerCapture(event.pointerId), onPointerMove: (event) => drag(pointer.id, event), children: index + 1 }, pointer.id)))] }) }), pointers.length > 0 && (_jsx("ol", { className: pointerList, children: pointers.map((pointer, index) => (_jsxs("li", { className: pointerRow, children: [_jsx("span", { className: pointerBadge, "aria-hidden": "true", children: index + 1 }), _jsx(Textarea, { className: pointerNote, rows: 1, ref: (element) => {
|
|
157
166
|
if (element && focusPointerId.current === pointer.id) {
|
|
158
167
|
element.focus();
|
|
159
168
|
focusPointerId.current = null;
|
|
@@ -17,7 +17,8 @@ export const checkMark = cva({
|
|
|
17
17
|
display: "inline-grid",
|
|
18
18
|
placeItems: "center",
|
|
19
19
|
padding: "none",
|
|
20
|
-
border:
|
|
20
|
+
// No reserved border: the edge and the face fill the mark, and the focus ring sits against it.
|
|
21
|
+
border: "0",
|
|
21
22
|
background: "[token(gradients.selected)]",
|
|
22
23
|
color: "bg.canvas",
|
|
23
24
|
_light: { color: "fg.onAccent", background: "bg.check" },
|
|
@@ -124,6 +124,33 @@ export declare const englishLabels: {
|
|
|
124
124
|
userChip: {
|
|
125
125
|
copyEmail: string;
|
|
126
126
|
};
|
|
127
|
+
memberDirectory: {
|
|
128
|
+
title: string;
|
|
129
|
+
search: string;
|
|
130
|
+
columns: {
|
|
131
|
+
member: string;
|
|
132
|
+
status: string;
|
|
133
|
+
role: string;
|
|
134
|
+
activity: string;
|
|
135
|
+
};
|
|
136
|
+
statuses: {
|
|
137
|
+
active: string;
|
|
138
|
+
invited: string;
|
|
139
|
+
expired: string;
|
|
140
|
+
};
|
|
141
|
+
memberSort: [string, string];
|
|
142
|
+
activitySort: [string, string];
|
|
143
|
+
you: string;
|
|
144
|
+
lastActive: string;
|
|
145
|
+
accountConnected: string;
|
|
146
|
+
noActivity: string;
|
|
147
|
+
invitationSent: string;
|
|
148
|
+
invitationExpired: string;
|
|
149
|
+
empty: string;
|
|
150
|
+
noMatches: string;
|
|
151
|
+
clearFilters: string;
|
|
152
|
+
unavailable: string;
|
|
153
|
+
};
|
|
127
154
|
activity: {
|
|
128
155
|
show: string;
|
|
129
156
|
all: string;
|
|
@@ -106,6 +106,24 @@ export const englishLabels = {
|
|
|
106
106
|
attachFiles: "Attach files",
|
|
107
107
|
},
|
|
108
108
|
userChip: { copyEmail: "Copy email" },
|
|
109
|
+
memberDirectory: {
|
|
110
|
+
title: "Members",
|
|
111
|
+
search: "Search members",
|
|
112
|
+
columns: { member: "Member", status: "Status", role: "Role", activity: "Activity" },
|
|
113
|
+
statuses: { active: "Active", invited: "Invited", expired: "Expired" },
|
|
114
|
+
memberSort: ["A to Z", "Z to A"],
|
|
115
|
+
activitySort: ["Oldest first", "Newest first"],
|
|
116
|
+
you: "You",
|
|
117
|
+
lastActive: "Last active",
|
|
118
|
+
accountConnected: "Account connected",
|
|
119
|
+
noActivity: "No activity yet",
|
|
120
|
+
invitationSent: "Invitation sent",
|
|
121
|
+
invitationExpired: "Invitation expired",
|
|
122
|
+
empty: "No members found",
|
|
123
|
+
noMatches: "No members match your search and filters",
|
|
124
|
+
clearFilters: "Clear filters",
|
|
125
|
+
unavailable: "Could not load members",
|
|
126
|
+
},
|
|
109
127
|
activity: {
|
|
110
128
|
show: "Show",
|
|
111
129
|
all: "All",
|
|
@@ -475,6 +493,7 @@ function mergeLabels(overrides) {
|
|
|
475
493
|
dates: { ...englishLabels.dates, ...overrides.dates },
|
|
476
494
|
dropzone: { ...englishLabels.dropzone, ...overrides.dropzone },
|
|
477
495
|
userChip: { ...englishLabels.userChip, ...overrides.userChip },
|
|
496
|
+
memberDirectory: { ...englishLabels.memberDirectory, ...overrides.memberDirectory },
|
|
478
497
|
activity: { ...englishLabels.activity, ...overrides.activity },
|
|
479
498
|
notifications: { ...englishLabels.notifications, ...overrides.notifications },
|
|
480
499
|
feedback: { ...englishLabels.feedback, ...overrides.feedback },
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type SortingState } from "./data-grid.js";
|
|
2
|
+
import { type FilterValue } from "./filter-bar.js";
|
|
3
|
+
/** Ordered healthiest first, which is also how the Status column sorts ascending. */
|
|
4
|
+
export declare const MEMBER_STATUSES: readonly ["active", "invited", "expired"];
|
|
5
|
+
/** The built-in roles; a member may also hold a role the organization defines. */
|
|
6
|
+
export declare const MEMBER_ROLES: readonly ["admin", "member"];
|
|
7
|
+
export declare const MEMBER_DIRECTORY_COLUMNS: readonly ["member", "status", "role", "activity"];
|
|
8
|
+
export type MemberStatus = (typeof MEMBER_STATUSES)[number];
|
|
9
|
+
export type MemberRole = (typeof MEMBER_ROLES)[number];
|
|
10
|
+
export type MemberDirectoryColumn = (typeof MEMBER_DIRECTORY_COLUMNS)[number];
|
|
11
|
+
export type DirectoryMember = {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string | null;
|
|
14
|
+
email: string;
|
|
15
|
+
pictureUrl: string | null;
|
|
16
|
+
role: string;
|
|
17
|
+
status: MemberStatus;
|
|
18
|
+
lastActiveAt: string | null;
|
|
19
|
+
};
|
|
20
|
+
export type MemberDirectoryProps = {
|
|
21
|
+
members: DirectoryMember[];
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
/** Why the list could not load; pass it only when there is nothing to show. */
|
|
24
|
+
error?: string;
|
|
25
|
+
onRetry?: () => void;
|
|
26
|
+
currentMemberId?: string | null;
|
|
27
|
+
search: string;
|
|
28
|
+
onSearchChange: (search: string) => void;
|
|
29
|
+
filters: FilterValue[];
|
|
30
|
+
onFiltersChange: (filters: FilterValue[]) => void;
|
|
31
|
+
sorting: SortingState;
|
|
32
|
+
onSortingChange: (sorting: SortingState) => void;
|
|
33
|
+
onClearFilters: () => void;
|
|
34
|
+
};
|
|
35
|
+
export declare function MemberDirectory({ members, loading, error, onRetry, currentMemberId, search, onSearchChange, filters, onFiltersChange, sorting, onSortingChange, onClearFilters, }: MemberDirectoryProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { CheckCircleIcon, ClockIcon, ShieldCheckIcon, WarningCircleIcon, } from "@phosphor-icons/react";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { css } from "#primitives/css";
|
|
5
|
+
import { Badge } from "./badge.js";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { createTableColumns, DataGrid } from "./data-grid.js";
|
|
8
|
+
import { DateTime } from "./date-time.js";
|
|
9
|
+
import { FilterBar } from "./filter-bar.js";
|
|
10
|
+
import { icon } from "./icon.js";
|
|
11
|
+
import { SearchInput } from "./input.js";
|
|
12
|
+
import { useCiridaeLocale } from "./locale.js";
|
|
13
|
+
import { EmptyState } from "./navigation.js";
|
|
14
|
+
import { StatusBanner } from "./status-banner.js";
|
|
15
|
+
import { UserChip } from "./user-chip.js";
|
|
16
|
+
/*
|
|
17
|
+
* Who belongs to an organization: every member at once, searched, filtered and sorted in the
|
|
18
|
+
* browser, scrolling inside its own frame under a pinned head. The app owns the view state, so it
|
|
19
|
+
* can keep it in the address, and maps its member rows onto `DirectoryMember`.
|
|
20
|
+
*/
|
|
21
|
+
/** Ordered healthiest first, which is also how the Status column sorts ascending. */
|
|
22
|
+
export const MEMBER_STATUSES = ["active", "invited", "expired"];
|
|
23
|
+
/** The built-in roles; a member may also hold a role the organization defines. */
|
|
24
|
+
export const MEMBER_ROLES = ["admin", "member"];
|
|
25
|
+
export const MEMBER_DIRECTORY_COLUMNS = ["member", "status", "role", "activity"];
|
|
26
|
+
const directory = css({ display: "flex", flexDirection: "column", minHeight: "0" });
|
|
27
|
+
const cell = css({ display: "grid", gap: "layout.tightGap", minWidth: "0" });
|
|
28
|
+
const identity = css({
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
gap: "layout.controlGap",
|
|
32
|
+
minWidth: "0",
|
|
33
|
+
});
|
|
34
|
+
const muted = css({ color: "fg.muted", fontSize: "code", whiteSpace: "nowrap" });
|
|
35
|
+
const STATUS_DISPLAY = {
|
|
36
|
+
active: { tone: "success", Icon: CheckCircleIcon },
|
|
37
|
+
invited: { tone: "warning", Icon: ClockIcon },
|
|
38
|
+
expired: { tone: "danger", Icon: WarningCircleIcon },
|
|
39
|
+
};
|
|
40
|
+
/** Role keys are lowercase slugs such as `admin`; the label capitalizes the first letter. */
|
|
41
|
+
function roleLabel(role) {
|
|
42
|
+
return role.charAt(0).toUpperCase() + role.slice(1);
|
|
43
|
+
}
|
|
44
|
+
function MemberStatusBadge({ status, labels }) {
|
|
45
|
+
const { tone, Icon } = STATUS_DISPLAY[status];
|
|
46
|
+
return (_jsx(Badge, { appearance: "bare", icon: _jsx(Icon, {}), tone: tone, children: labels.statuses[status] }));
|
|
47
|
+
}
|
|
48
|
+
function MemberRoleBadge({ role }) {
|
|
49
|
+
return role === "admin" ? (_jsx(Badge, { appearance: "bare", icon: _jsx(ShieldCheckIcon, {}), tone: "info", children: roleLabel(role) })) : (_jsx("span", { className: muted, children: roleLabel(role) }));
|
|
50
|
+
}
|
|
51
|
+
function MemberActivity({ member, labels }) {
|
|
52
|
+
if (member.status !== "active") {
|
|
53
|
+
return (_jsx("span", { children: member.status === "expired" ? labels.invitationExpired : labels.invitationSent }));
|
|
54
|
+
}
|
|
55
|
+
return (_jsxs("span", { className: cell, children: [_jsx("span", { children: member.lastActiveAt ? labels.lastActive : labels.accountConnected }), _jsx("span", { className: muted, children: member.lastActiveAt ? (_jsx(DateTime, { mode: "dateTime", value: member.lastActiveAt })) : (labels.noActivity) })] }));
|
|
56
|
+
}
|
|
57
|
+
const column = createTableColumns();
|
|
58
|
+
function memberColumns(labels, currentMemberId) {
|
|
59
|
+
return column.columns([
|
|
60
|
+
column.accessor((member) => member.name ?? member.email, {
|
|
61
|
+
id: "member",
|
|
62
|
+
header: labels.columns.member,
|
|
63
|
+
meta: { locked: true, width: "minmax(220px, 1fr)", sortLabels: labels.memberSort },
|
|
64
|
+
cell: ({ row: { original: member } }) => (_jsxs("span", { className: `${identity} ph-no-capture`, children: [_jsx(UserChip, { detail: member.name ? member.email : undefined, name: member.name ?? member.email, size: "compact", src: member.pictureUrl ?? undefined }), member.id === currentMemberId ? _jsx("span", { className: muted, children: labels.you }) : null] })),
|
|
65
|
+
}),
|
|
66
|
+
column.accessor((member) => MEMBER_STATUSES.indexOf(member.status), {
|
|
67
|
+
id: "status",
|
|
68
|
+
header: labels.columns.status,
|
|
69
|
+
meta: { width: 140 },
|
|
70
|
+
cell: ({ row: { original: member } }) => (_jsx(MemberStatusBadge, { labels: labels, status: member.status })),
|
|
71
|
+
}),
|
|
72
|
+
column.accessor((member) => member.role, {
|
|
73
|
+
id: "role",
|
|
74
|
+
header: labels.columns.role,
|
|
75
|
+
meta: { width: 130, priority: 2 },
|
|
76
|
+
cell: ({ row: { original: member } }) => _jsx(MemberRoleBadge, { role: member.role }),
|
|
77
|
+
}),
|
|
78
|
+
column.accessor((member) => (member.lastActiveAt === null ? 0 : new Date(member.lastActiveAt).getTime()), {
|
|
79
|
+
id: "activity",
|
|
80
|
+
header: labels.columns.activity,
|
|
81
|
+
meta: { width: 240, priority: 1, sortLabels: labels.activitySort },
|
|
82
|
+
cell: ({ row: { original: member } }) => _jsx(MemberActivity, { labels: labels, member: member }),
|
|
83
|
+
}),
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
function memberFilterFields(labels) {
|
|
87
|
+
return [
|
|
88
|
+
{
|
|
89
|
+
key: "status",
|
|
90
|
+
label: labels.columns.status,
|
|
91
|
+
icon: _jsx(CheckCircleIcon, { className: icon({ size: "small" }) }),
|
|
92
|
+
kind: "multi",
|
|
93
|
+
operators: ["is_any_of"],
|
|
94
|
+
options: MEMBER_STATUSES.map((value) => ({ value, label: labels.statuses[value] })),
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
key: "role",
|
|
98
|
+
label: labels.columns.role,
|
|
99
|
+
icon: _jsx(ShieldCheckIcon, { className: icon({ size: "small" }) }),
|
|
100
|
+
kind: "multi",
|
|
101
|
+
operators: ["is_any_of"],
|
|
102
|
+
options: MEMBER_ROLES.map((value) => ({ value, label: roleLabel(value) })),
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
}
|
|
106
|
+
function matchesView(member, search, filters) {
|
|
107
|
+
const needle = search.trim().toLowerCase();
|
|
108
|
+
const found = needle === "" ||
|
|
109
|
+
[member.name, member.email].some((value) => value?.toLowerCase().includes(needle));
|
|
110
|
+
return (found &&
|
|
111
|
+
filters.every((filter) => {
|
|
112
|
+
if (filter.field === "status")
|
|
113
|
+
return filter.values.includes(member.status);
|
|
114
|
+
if (filter.field === "role")
|
|
115
|
+
return filter.values.includes(member.role);
|
|
116
|
+
return true;
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
export function MemberDirectory({ members, loading, error, onRetry, currentMemberId = null, search, onSearchChange, filters, onFiltersChange, sorting, onSortingChange, onClearFilters, }) {
|
|
120
|
+
const { labels: allLabels } = useCiridaeLocale();
|
|
121
|
+
const labels = allLabels.memberDirectory;
|
|
122
|
+
const columns = useMemo(() => memberColumns(labels, currentMemberId), [labels, currentMemberId]);
|
|
123
|
+
const fields = useMemo(() => memberFilterFields(labels), [labels]);
|
|
124
|
+
return (_jsxs(_Fragment, { children: [_jsx(FilterBar, { fields: fields, onValueChange: onFiltersChange, value: filters, children: _jsx(SearchInput, { "aria-label": labels.search, onValueCommit: onSearchChange, placeholder: labels.search, value: search, width: "field" }) }), error === undefined ? (_jsx("div", { className: directory, children: _jsx(DataGrid, { "aria-label": labels.title, columns: columns, data: members.filter((member) => matchesView(member, search, filters)), empty: _jsx(EmptyState, { title: labels.empty, variant: "inline" }), fill: true, filtered: search.trim() !== "" || filters.length > 0, getRowId: (member) => member.id, loading: loading, noResults: _jsx(EmptyState, { action: _jsx(Button, { onClick: onClearFilters, variant: "secondary", children: labels.clearFilters }), title: labels.noMatches, variant: "bare" }), onSortingChange: onSortingChange, sorting: sorting, virtualize: true }) })) : (_jsx(StatusBanner, { action: onRetry ? (_jsx(Button, { onClick: onRetry, variant: "link", children: allLabels.common.tryAgain })) : undefined, description: error, title: labels.unavailable, tone: "danger" }))] }));
|
|
125
|
+
}
|
|
@@ -31,6 +31,7 @@ const dialogLayout = css.raw({
|
|
|
31
31
|
"&:has(> :nth-child(3))": { gridTemplateRows: "auto minmax(0, 1fr) auto" },
|
|
32
32
|
// A dialog's own inset, not the page margin, so page density changes leave it alone.
|
|
33
33
|
padding: "panel.comfortable",
|
|
34
|
+
"&:has(> * > [data-dialog-bleed])": { paddingBlockStart: "none" },
|
|
34
35
|
});
|
|
35
36
|
/* `--dialog-sheet` is the sheet's width; the shell adds its inset and edge. Dark blurs the shell and light the sheet. */
|
|
36
37
|
const dialogShell = css.raw({
|
|
@@ -102,6 +103,16 @@ const dialogBody = css({
|
|
|
102
103
|
alignContent: "start",
|
|
103
104
|
// A terminal wizard result centers its icon, message, and actions together.
|
|
104
105
|
"&:has(> [data-wizard-state=result])": { alignContent: "center" },
|
|
106
|
+
// A section that fills the sheet edge to edge: the body reaches the sheet's edges and top, so its
|
|
107
|
+
// scroll does not clip the section, and every other section keeps its inset. For a hidden title.
|
|
108
|
+
"&:has(> [data-dialog-bleed])": {
|
|
109
|
+
marginInline: "[calc(token(spacing.panel.comfortable) * -1)]",
|
|
110
|
+
marginBlockStart: "[calc(token(spacing.layout.clusterGap) * -1)]",
|
|
111
|
+
paddingInline: "panel.comfortable",
|
|
112
|
+
paddingBlockStart: "none",
|
|
113
|
+
borderTopRadius: "inset",
|
|
114
|
+
},
|
|
115
|
+
"& > [data-dialog-bleed]": { marginInline: "[calc(token(spacing.panel.comfortable) * -1)]" },
|
|
105
116
|
gap: "layout.contentGap",
|
|
106
117
|
overflowY: "auto",
|
|
107
118
|
margin: "[calc(token(spacing.control.block) * -1)]",
|
|
@@ -226,7 +226,10 @@ const optionContent = css({
|
|
|
226
226
|
overflow: "hidden",
|
|
227
227
|
textOverflow: "ellipsis",
|
|
228
228
|
});
|
|
229
|
-
|
|
229
|
+
// Runs edge to edge: the search field heads the menu, it doesn't sit among its rows.
|
|
230
|
+
const searchDivider = css(glassMenuDivider, {
|
|
231
|
+
marginInline: "[calc(token(spacing.menu.inset) * -1)]",
|
|
232
|
+
});
|
|
230
233
|
const emptyMessageStyle = css({
|
|
231
234
|
paddingBlock: "control.compactBlock",
|
|
232
235
|
paddingInline: "menu.itemInline",
|
package/dist/components/shell.js
CHANGED
|
@@ -9,9 +9,11 @@ import { icon } from "./icon.js";
|
|
|
9
9
|
import { useCiridaeLocale } from "./locale.js";
|
|
10
10
|
import { singleLineTextClass } from "./single-line-text.js";
|
|
11
11
|
// The sidebar sits flush against the window; only the main panel is inset from the edges.
|
|
12
|
+
// Pinned to the viewport, so anything that makes the document scroll can't slide the frame.
|
|
12
13
|
const shell = css({
|
|
13
14
|
display: "flex",
|
|
14
|
-
|
|
15
|
+
position: "fixed",
|
|
16
|
+
inset: "none",
|
|
15
17
|
overflow: "hidden",
|
|
16
18
|
background: "[token(gradients.canvas)]",
|
|
17
19
|
color: "fg.primary",
|
|
@@ -278,7 +280,7 @@ const sidebarFooter = css({
|
|
|
278
280
|
/** A line of small print, such as build and status, with a leading button flush beside it. */
|
|
279
281
|
const sidebarFootnote = css({
|
|
280
282
|
display: "flex",
|
|
281
|
-
alignItems: "
|
|
283
|
+
alignItems: "baseline",
|
|
282
284
|
flexWrap: "wrap",
|
|
283
285
|
gap: "layout.tightGap",
|
|
284
286
|
paddingInline: "layout.tightGap",
|
|
@@ -83,7 +83,7 @@ const item = css({
|
|
|
83
83
|
color: "fg.primary",
|
|
84
84
|
"& > svg:first-child": { color: "[inherit]" },
|
|
85
85
|
},
|
|
86
|
-
// The open page keeps the
|
|
86
|
+
// The open page keeps the row's shape and size; the field face and the canvas's edge mark it.
|
|
87
87
|
// The design counts that edge inside the row, so its content sits a hairline further in.
|
|
88
88
|
"&[aria-current=page]": {
|
|
89
89
|
background: "bg.field",
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { type SkeletonProps } from "skullet/react";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
3
|
+
/** Measure the real view once; keep pane wrappers from breaking full-height lists. */
|
|
4
|
+
export declare function ContentSkeleton<T>({ fill, className, label, ...props }: SkeletonProps<T> & {
|
|
5
|
+
fill?: boolean;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
2
7
|
export type SkeletonWidth = "short" | "medium" | "long" | "full" | `${number}%`;
|
|
3
8
|
export type SkeletonHeight = "text" | "caption" | "line" | "smallLine" | "bar" | "badge" | "control" | "row" | "block" | "chart" | "chart.small" | "chart.medium" | "chart.large";
|
|
4
9
|
/**
|
|
@@ -1,11 +1,24 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton as MeasuredSkeleton, SkeletonBox } from "skullet/react";
|
|
2
3
|
import { css, cx } from "#primitives/css";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
const fillContent = css({
|
|
5
|
+
flex: "1",
|
|
6
|
+
minHeight: "0",
|
|
7
|
+
height: "full",
|
|
8
|
+
"& > [skullet-pane], & > [skullet-pane] > [skullet-loading], & > [skullet-pane] > [skullet-loading] > [skullet-ghost]": { height: "full" },
|
|
9
|
+
});
|
|
10
|
+
/** Measure the real view once; keep pane wrappers from breaking full-height lists. */
|
|
11
|
+
export function ContentSkeleton({ fill, className, label = "Loading content", ...props }) {
|
|
12
|
+
const loading = props.loading ||
|
|
13
|
+
(typeof props.children === "function" && props.data == null && !props.error && !props.empty);
|
|
14
|
+
return (_jsxs(_Fragment, { children: [loading && (_jsx("span", { role: "status", className: loadingAnnouncement, children: label })), _jsx(MeasuredSkeleton, { ...props, className: cx(fill && fillContent, className) })] }));
|
|
15
|
+
}
|
|
16
|
+
const loadingAnnouncement = css({ srOnly: true });
|
|
17
|
+
// Preserve the existing layout contract while Skullet paints one synchronized shimmer.
|
|
5
18
|
const skeleton = css({
|
|
6
19
|
display: "block",
|
|
7
20
|
flexShrink: "0",
|
|
8
|
-
|
|
21
|
+
position: "relative",
|
|
9
22
|
"&[data-shape=block]": { minHeight: "skeleton.line", borderRadius: "control" },
|
|
10
23
|
// One line of the surrounding text: the bar is shorter than the line box and centered in it.
|
|
11
24
|
"&[data-shape=text]": {
|
|
@@ -66,5 +79,5 @@ const skeleton = css({
|
|
|
66
79
|
export function Skeleton({ shape = "block", width, height, className, style, ...props }) {
|
|
67
80
|
const percent = width?.endsWith("%") ? width : undefined;
|
|
68
81
|
// A block-level span, so it is valid inside buttons, headings, and other phrasing content.
|
|
69
|
-
return (_jsx("span", { ...props, "aria-hidden": "true", "data-ciridae-ui": "", "data-shape": shape, "data-width": percent ? undefined : width, "data-height": height, style: percent ? { width: percent, ...style } : style, className: cx(skeleton, className) }));
|
|
82
|
+
return (_jsx("span", { ...props, "aria-hidden": "true", "data-ciridae-ui": "", "data-shape": shape, "data-width": percent ? undefined : width, "data-height": height, style: percent ? { width: percent, ...style } : style, className: cx(skeleton, className), children: _jsx(SkeletonBox, { width: "100%", height: "100%", radius: "inherit", style: { position: "absolute", inset: 0 } }) }));
|
|
70
83
|
}
|
package/dist/preset.js
CHANGED
|
@@ -445,7 +445,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
445
445
|
radii: {
|
|
446
446
|
none: { value: "0" },
|
|
447
447
|
round: { value: "999px" },
|
|
448
|
-
nav: { value: "3px" },
|
|
449
448
|
keycap: { value: "6px" },
|
|
450
449
|
// Round 2 fields -- inputs, selects, checkboxes -- are nearly square-cornered.
|
|
451
450
|
control: { value: "4px" },
|
|
@@ -595,7 +594,6 @@ export function createCiridaePreset({ appBase = false, ...theme } = {}) {
|
|
|
595
594
|
"control.pressed": { value: shadows["control.pressed"] },
|
|
596
595
|
},
|
|
597
596
|
gradients: {
|
|
598
|
-
skeletonFill: { value: gradients.skeletonFill },
|
|
599
597
|
orb: {
|
|
600
598
|
value: "radial-gradient(circle at 70% 24%, rgba(232,224,195,.9) 0 9%, transparent 11%), linear-gradient(180deg, #E8E0C3, #46361D)",
|
|
601
599
|
},
|
|
@@ -314,7 +314,6 @@
|
|
|
314
314
|
--z-index-toast: 90;
|
|
315
315
|
--radii-none: 0;
|
|
316
316
|
--radii-round: 999px;
|
|
317
|
-
--radii-nav: 3px;
|
|
318
317
|
--radii-keycap: 6px;
|
|
319
318
|
--radii-control: 4px;
|
|
320
319
|
--radii-action: 8px;
|
|
@@ -416,7 +415,6 @@
|
|
|
416
415
|
--shadows-control\.raised: inset 0 1px 0 rgba(255,255,255,.07), inset 0 -1px 0 rgba(0,0,0,.14), 0 1px 2px rgba(0,0,0,.3);
|
|
417
416
|
--shadows-control\.raised-hover: inset 0 1px 0 rgba(255,255,255,.1), inset 0 -1px 0 rgba(0,0,0,.16), 0 2px 4px rgba(0,0,0,.34);
|
|
418
417
|
--shadows-control\.pressed: inset 0 1px 2px rgba(0,0,0,.4);
|
|
419
|
-
--gradients-skeleton-fill: linear-gradient(to bottom, rgba(255,255,255,.08), rgba(255,255,255,.08));
|
|
420
418
|
--gradients-orb: radial-gradient(circle at 70% 24%, rgba(232,224,195,.9) 0 9%, transparent 11%), linear-gradient(180deg, #E8E0C3, #46361D);
|
|
421
419
|
--gradients-canvas: linear-gradient(to bottom, #141416, #141416);
|
|
422
420
|
--gradients-panel: linear-gradient(to bottom, rgba(39,39,42,.66), rgba(39,39,42,.66));
|
|
@@ -550,7 +548,6 @@
|
|
|
550
548
|
--shadows-control\.raised: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(20,20,22,.09), 0 1px 2px rgba(20,20,22,.08);
|
|
551
549
|
--shadows-control\.raised-hover: inset 0 1px 0 rgba(255,255,255,.24), inset 0 -1px 0 rgba(20,20,22,.11), 0 2px 4px rgba(20,20,22,.1);
|
|
552
550
|
--shadows-control\.pressed: inset 0 1px 2px rgba(20,20,22,.13);
|
|
553
|
-
--gradients-skeleton-fill: linear-gradient(to bottom, #D8D8D8, #EBEBEB);
|
|
554
551
|
--gradients-canvas: linear-gradient(to bottom, #D8D8D8, #EBEBEB);
|
|
555
552
|
--gradients-panel: linear-gradient(to bottom, rgba(240,240,240,.66), rgba(255,255,255,.66));
|
|
556
553
|
--gradients-card: linear-gradient(to bottom, #FBFBFB, #FBFBFB);
|
|
@@ -1220,10 +1217,6 @@
|
|
|
1220
1217
|
background: var(--colors-bg\.warning-subtle);
|
|
1221
1218
|
}
|
|
1222
1219
|
|
|
1223
|
-
.bg_\[token\(gradients\.skeletonFill\)\] {
|
|
1224
|
-
background: var(--gradients-skeleton-fill);
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
1220
|
.p_panel\.card {
|
|
1228
1221
|
padding: var(--spacing-panel\.card);
|
|
1229
1222
|
}
|
|
@@ -1596,6 +1589,10 @@
|
|
|
1596
1589
|
text-decoration: underline;
|
|
1597
1590
|
}
|
|
1598
1591
|
|
|
1592
|
+
.bd-be_1px_solid_token\(colors\.border\.control\) {
|
|
1593
|
+
border-block-end: 1px solid var(--colors-border\.control);
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1599
1596
|
.bd-b_1px_solid_token\(colors\.border\.subtle\) {
|
|
1600
1597
|
border-bottom: 1px solid var(--colors-border\.subtle);
|
|
1601
1598
|
}
|
|
@@ -1748,6 +1745,10 @@
|
|
|
1748
1745
|
border-width: 0 0 1px;
|
|
1749
1746
|
}
|
|
1750
1747
|
|
|
1748
|
+
.mx_\[calc\(token\(spacing\.menu\.inset\)_\*_-1\)\] {
|
|
1749
|
+
margin-inline: calc(var(--spacing-menu\.inset) * -1);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1751
1752
|
.gap_sidebar\.footerGap {
|
|
1752
1753
|
gap: var(--spacing-sidebar\.footer-gap);
|
|
1753
1754
|
}
|
|
@@ -2180,6 +2181,14 @@
|
|
|
2180
2181
|
color: var(--colors-fg\.on-accent);
|
|
2181
2182
|
}
|
|
2182
2183
|
|
|
2184
|
+
.c_\[inherit\] {
|
|
2185
|
+
color: inherit;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
.ai_baseline {
|
|
2189
|
+
align-items: baseline;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2183
2192
|
.ff_\[inherit\] {
|
|
2184
2193
|
font-family: inherit;
|
|
2185
2194
|
}
|
|
@@ -2208,10 +2217,6 @@
|
|
|
2208
2217
|
position: relative;
|
|
2209
2218
|
}
|
|
2210
2219
|
|
|
2211
|
-
.c_\[inherit\] {
|
|
2212
|
-
color: inherit;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
2220
|
.op_\[0\.6\] {
|
|
2216
2221
|
opacity: 0.6;
|
|
2217
2222
|
}
|
|
@@ -2678,10 +2683,6 @@
|
|
|
2678
2683
|
padding-inline-start: var(--spacing-layout\.control-gap);
|
|
2679
2684
|
}
|
|
2680
2685
|
|
|
2681
|
-
.ai_baseline {
|
|
2682
|
-
align-items: baseline;
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
2686
|
.ac_center {
|
|
2686
2687
|
align-content: center;
|
|
2687
2688
|
}
|
|
@@ -2722,10 +2723,6 @@
|
|
|
2722
2723
|
padding-inline-start: calc(var(--spacing-panel\.compact) + var(--spacing-panel\.default));
|
|
2723
2724
|
}
|
|
2724
2725
|
|
|
2725
|
-
.justify-self_center {
|
|
2726
|
-
justify-self: center;
|
|
2727
|
-
}
|
|
2728
|
-
|
|
2729
2726
|
.cursor_crosshair {
|
|
2730
2727
|
cursor: crosshair;
|
|
2731
2728
|
}
|
|
@@ -2739,6 +2736,10 @@
|
|
|
2739
2736
|
user-select: none;
|
|
2740
2737
|
}
|
|
2741
2738
|
|
|
2739
|
+
.field-sizing_content {
|
|
2740
|
+
field-sizing: content;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2742
2743
|
.pbs_control\.iconGap {
|
|
2743
2744
|
padding-block-start: var(--spacing-control\.icon-gap);
|
|
2744
2745
|
}
|
|
@@ -4721,10 +4722,6 @@
|
|
|
4721
4722
|
background: var(--colors-bg\.warning-tint);
|
|
4722
4723
|
}
|
|
4723
4724
|
|
|
4724
|
-
.\[\&_\>_\[data-line\]\]\:bg_\[token\(gradients\.skeletonFill\)\] > [data-line] {
|
|
4725
|
-
background: var(--gradients-skeleton-fill);
|
|
4726
|
-
}
|
|
4727
|
-
|
|
4728
4725
|
.\[\&_\>_ol\]\:m_none > ol {
|
|
4729
4726
|
margin: var(--spacing-none);
|
|
4730
4727
|
}
|
|
@@ -5333,10 +5330,6 @@
|
|
|
5333
5330
|
gap: var(--spacing-layout\.control-gap);
|
|
5334
5331
|
}
|
|
5335
5332
|
|
|
5336
|
-
.\[\&_\>_\[data-line\]\]\:bdr_round > [data-line] {
|
|
5337
|
-
border-radius: var(--radii-round);
|
|
5338
|
-
}
|
|
5339
|
-
|
|
5340
5333
|
.\[\&_\>_\[data-copy\]\]\:gap_layout\.tightGap > [data-copy] {
|
|
5341
5334
|
gap: var(--spacing-layout\.tight-gap);
|
|
5342
5335
|
}
|
|
@@ -5665,6 +5658,18 @@
|
|
|
5665
5658
|
padding-block: var(--spacing-none);
|
|
5666
5659
|
}
|
|
5667
5660
|
|
|
5661
|
+
.\[\&\:has\(\>_\[data-dialog-bleed\]\)\]\:mx_\[calc\(token\(spacing\.panel\.comfortable\)_\*_-1\)\]:has(> [data-dialog-bleed]) {
|
|
5662
|
+
margin-inline: calc(var(--spacing-panel\.comfortable) * -1);
|
|
5663
|
+
}
|
|
5664
|
+
|
|
5665
|
+
.\[\&\:has\(\>_\[data-dialog-bleed\]\)\]\:px_panel\.comfortable:has(> [data-dialog-bleed]) {
|
|
5666
|
+
padding-inline: var(--spacing-panel\.comfortable);
|
|
5667
|
+
}
|
|
5668
|
+
|
|
5669
|
+
.\[\&_\>_\[data-dialog-bleed\]\]\:mx_\[calc\(token\(spacing\.panel\.comfortable\)_\*_-1\)\] > [data-dialog-bleed] {
|
|
5670
|
+
margin-inline: calc(var(--spacing-panel\.comfortable) * -1);
|
|
5671
|
+
}
|
|
5672
|
+
|
|
5668
5673
|
[data-panel-padding=default] > .\[\[data-panel-padding\=default\]_\>_\&\]\:gap_layout\.controlGap {
|
|
5669
5674
|
gap: var(--spacing-layout\.control-gap);
|
|
5670
5675
|
}
|
|
@@ -6205,6 +6210,10 @@
|
|
|
6205
6210
|
color: var(--colors-accent\.bronze);
|
|
6206
6211
|
}
|
|
6207
6212
|
|
|
6213
|
+
.\[\&_\>_svg\]\:as_center > svg {
|
|
6214
|
+
align-self: center;
|
|
6215
|
+
}
|
|
6216
|
+
|
|
6208
6217
|
.\[\&\:disabled\,_\&\[data-disabled\]\]\:op_disabledRound:disabled,.\[\&\:disabled\,_\&\[data-disabled\]\]\:op_disabledRound[data-disabled] {
|
|
6209
6218
|
opacity: var(--opacity-disabled-round);
|
|
6210
6219
|
}
|
|
@@ -6469,10 +6478,6 @@
|
|
|
6469
6478
|
line-height: var(--line-heights-tight);
|
|
6470
6479
|
}
|
|
6471
6480
|
|
|
6472
|
-
.\[\&_\>_\[data-line\]\]\:d_block > [data-line] {
|
|
6473
|
-
display: block;
|
|
6474
|
-
}
|
|
6475
|
-
|
|
6476
6481
|
.\[\&_\>_svg\]\:fs_icon\.small > svg {
|
|
6477
6482
|
font-size: var(--font-sizes-icon\.small);
|
|
6478
6483
|
}
|
|
@@ -7190,13 +7195,8 @@
|
|
|
7190
7195
|
color: var(--colors-fg\.subtle);
|
|
7191
7196
|
}
|
|
7192
7197
|
|
|
7193
|
-
.\[
|
|
7194
|
-
|
|
7195
|
-
border-top-right-radius: var(--radii-field);
|
|
7196
|
-
}
|
|
7197
|
-
|
|
7198
|
-
.\[\&\[data-under-banner\]\]\:bx-sh_\[inset_0_2px_4px_rgba\(0\,_0\,_0\,_0\.18\)\][data-under-banner] {
|
|
7199
|
-
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
|
|
7198
|
+
.\[\&_\>_\[data-ciridae-ui\]\]\:pos_absolute > [data-ciridae-ui] {
|
|
7199
|
+
position: absolute;
|
|
7200
7200
|
}
|
|
7201
7201
|
|
|
7202
7202
|
.\[\&_\>_\[data-ciridae-ui\]_\>_main_\>_header\]\:ps_page\.inline > [data-ciridae-ui] > main > header {
|
|
@@ -7207,6 +7207,10 @@
|
|
|
7207
7207
|
cursor: default;
|
|
7208
7208
|
}
|
|
7209
7209
|
|
|
7210
|
+
.\[\&\&\]\:resize_none.\[\&\&\]\:resize_none {
|
|
7211
|
+
resize: none;
|
|
7212
|
+
}
|
|
7213
|
+
|
|
7210
7214
|
[data-needs-reply] .\[\[data-needs-reply\]_\&\]\:fw_medium {
|
|
7211
7215
|
font-weight: var(--font-weights-medium);
|
|
7212
7216
|
}
|
|
@@ -7499,10 +7503,27 @@
|
|
|
7499
7503
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
7500
7504
|
}
|
|
7501
7505
|
|
|
7506
|
+
.\[\&\:has\(\>_\*_\>_\[data-dialog-bleed\]\)\]\:pbs_none:has(> * > [data-dialog-bleed]) {
|
|
7507
|
+
padding-block-start: var(--spacing-none);
|
|
7508
|
+
}
|
|
7509
|
+
|
|
7502
7510
|
.\[\&\:has\(\>_\[data-wizard-state\=result\]\)\]\:ac_center:has(> [data-wizard-state=result]) {
|
|
7503
7511
|
align-content: center;
|
|
7504
7512
|
}
|
|
7505
7513
|
|
|
7514
|
+
.\[\&\:has\(\>_\[data-dialog-bleed\]\)\]\:mbs_\[calc\(token\(spacing\.layout\.clusterGap\)_\*_-1\)\]:has(> [data-dialog-bleed]) {
|
|
7515
|
+
margin-block-start: calc(var(--spacing-layout\.cluster-gap) * -1);
|
|
7516
|
+
}
|
|
7517
|
+
|
|
7518
|
+
.\[\&\:has\(\>_\[data-dialog-bleed\]\)\]\:pbs_none:has(> [data-dialog-bleed]) {
|
|
7519
|
+
padding-block-start: var(--spacing-none);
|
|
7520
|
+
}
|
|
7521
|
+
|
|
7522
|
+
.\[\&\:has\(\>_\[data-dialog-bleed\]\)\]\:bdr-t_inset:has(> [data-dialog-bleed]) {
|
|
7523
|
+
border-top-left-radius: var(--radii-inset);
|
|
7524
|
+
border-top-right-radius: var(--radii-inset);
|
|
7525
|
+
}
|
|
7526
|
+
|
|
7506
7527
|
.\[\&\[data-starting-style\]\,_\&\[data-ending-style\]\]\:trf_translate\(-50\%\,_calc\(-50\%_\+_token\(spacing\.control\.block\)\)\)[data-starting-style],.\[\&\[data-starting-style\]\,_\&\[data-ending-style\]\]\:trf_translate\(-50\%\,_calc\(-50\%_\+_token\(spacing\.control\.block\)\)\)[data-ending-style] {
|
|
7507
7528
|
transform: translate(-50%, calc(-50% + var(--spacing-control\.block)));
|
|
7508
7529
|
}
|
|
@@ -8195,27 +8216,7 @@
|
|
|
8195
8216
|
margin-top: var(--spacing-layout\.control-gap);
|
|
8196
8217
|
}
|
|
8197
8218
|
|
|
8198
|
-
.\[\&_\>_\[data-status\]\]\:min-w_0 > [data-status] {
|
|
8199
|
-
min-width: var(--sizes-0);
|
|
8200
|
-
}
|
|
8201
|
-
|
|
8202
|
-
.\[\&_\>_\[data-line\]\]\:h_\[calc\(token\(fontSizes\.body\)_\*_0\.75\)\] > [data-line] {
|
|
8203
|
-
height: calc(var(--font-sizes-body) * 0.75);
|
|
8204
|
-
}
|
|
8205
|
-
|
|
8206
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(1\)\]\:w_\[98\%\] > [data-line]:nth-of-type(1) {
|
|
8207
|
-
width: 98%;
|
|
8208
|
-
}
|
|
8209
|
-
|
|
8210
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(2\)\]\:w_\[87\%\] > [data-line]:nth-of-type(2) {
|
|
8211
|
-
width: 87%;
|
|
8212
|
-
}
|
|
8213
|
-
|
|
8214
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(3\)\]\:w_\[66\%\] > [data-line]:nth-of-type(3) {
|
|
8215
|
-
width: 66%;
|
|
8216
|
-
}
|
|
8217
|
-
|
|
8218
|
-
.\[\&_\>_\[data-copy\]\]\:min-w_0 > [data-copy] {
|
|
8219
|
+
.\[\&_\>_\[data-status\]\]\:min-w_0 > [data-status],.\[\&_\>_\[data-copy\]\]\:min-w_0 > [data-copy] {
|
|
8219
8220
|
min-width: var(--sizes-0);
|
|
8220
8221
|
}
|
|
8221
8222
|
|
|
@@ -8463,6 +8464,10 @@
|
|
|
8463
8464
|
max-height: 56dvh;
|
|
8464
8465
|
}
|
|
8465
8466
|
|
|
8467
|
+
.\[\&\&\]\:min-h_control\.default.\[\&\&\]\:min-h_control\.default {
|
|
8468
|
+
min-height: var(--sizes-control\.default);
|
|
8469
|
+
}
|
|
8470
|
+
|
|
8466
8471
|
.\[\&_img\]\:h_auto img {
|
|
8467
8472
|
height: auto;
|
|
8468
8473
|
}
|
|
@@ -8647,6 +8652,10 @@
|
|
|
8647
8652
|
min-width: var(--sizes-0);
|
|
8648
8653
|
}
|
|
8649
8654
|
|
|
8655
|
+
.\[\&_\>_\[skullet-pane\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]_\>_\[skullet-ghost\]\]\:h_full > [skullet-pane],.\[\&_\>_\[skullet-pane\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]_\>_\[skullet-ghost\]\]\:h_full > [skullet-pane] > [skullet-loading],.\[\&_\>_\[skullet-pane\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]\,_\&_\>_\[skullet-pane\]_\>_\[skullet-loading\]_\>_\[skullet-ghost\]\]\:h_full > [skullet-pane] > [skullet-loading] > [skullet-ghost] {
|
|
8656
|
+
height: var(--sizes-full);
|
|
8657
|
+
}
|
|
8658
|
+
|
|
8650
8659
|
.\[\&\[data-shape\=block\]\]\:min-h_skeleton\.line[data-shape=block] {
|
|
8651
8660
|
min-height: var(--sizes-skeleton\.line);
|
|
8652
8661
|
}
|
|
@@ -1003,10 +1003,6 @@ const tokens = {
|
|
|
1003
1003
|
"value": "999px",
|
|
1004
1004
|
"variable": "var(--radii-round)"
|
|
1005
1005
|
},
|
|
1006
|
-
"radii.nav": {
|
|
1007
|
-
"value": "3px",
|
|
1008
|
-
"variable": "var(--radii-nav)"
|
|
1009
|
-
},
|
|
1010
1006
|
"radii.keycap": {
|
|
1011
1007
|
"value": "6px",
|
|
1012
1008
|
"variable": "var(--radii-keycap)"
|
|
@@ -1411,10 +1407,6 @@ const tokens = {
|
|
|
1411
1407
|
"value": "var(--shadows-control\\.pressed)",
|
|
1412
1408
|
"variable": "var(--shadows-control\\.pressed)"
|
|
1413
1409
|
},
|
|
1414
|
-
"gradients.skeletonFill": {
|
|
1415
|
-
"value": "var(--gradients-skeleton-fill)",
|
|
1416
|
-
"variable": "var(--gradients-skeleton-fill)"
|
|
1417
|
-
},
|
|
1418
1410
|
"gradients.orb": {
|
|
1419
1411
|
"value": "radial-gradient(circle at 70% 24%, rgba(232,224,195,.9) 0 9%, transparent 11%), linear-gradient(180deg, #E8E0C3, #46361D)",
|
|
1420
1412
|
"variable": "var(--gradients-orb)"
|
|
@@ -25,11 +25,11 @@ export type DurationToken = "fast" | "default"
|
|
|
25
25
|
|
|
26
26
|
export type ZIndexToken = "raised" | "scrollbar" | "drawer" | "dialog" | "popover" | "tooltip" | "toast"
|
|
27
27
|
|
|
28
|
-
export type RadiusToken = "none" | "round" | "
|
|
28
|
+
export type RadiusToken = "none" | "round" | "keycap" | "control" | "action" | "field" | "inset" | "shell" | "card" | "pill"
|
|
29
29
|
|
|
30
30
|
export type ShadowToken = "indicator.live" | "search" | "inset" | "card" | "soft" | "drawerShell" | "focus" | "panel" | "glow" | "badge" | "toast" | "control.raised" | "control.raisedHover" | "control.pressed"
|
|
31
31
|
|
|
32
|
-
export type GradientToken = "
|
|
32
|
+
export type GradientToken = "orb" | "canvas" | "panel" | "card" | "raised" | "raisedHover" | "selected" | "rowHover" | "primary" | "primaryHover" | "tinted" | "danger" | "border.raised" | "border.primary" | "border.danger" | "border.tinted" | "border.otherWorkspaceMark" | "border.selected" | "chart.area" | "chart.progress" | "chart.atRisk" | "infoGlass" | "successGlass" | "dangerGlass" | "stepDoneGlass" | "currentStageGlass" | "border.infoGlass" | "border.successGlass" | "border.dangerGlass" | "border.stepDoneGlass" | "border.currentStageGlass" | "border.warningTint" | "border.successTint" | "border.errorTint"
|
|
33
33
|
|
|
34
34
|
export type BlurToken = "popover" | "modalShell" | "modalSheet" | "drawerShell"
|
|
35
35
|
|
package/dist/theme/tokens.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type CiridaeTheme } from "./options.js";
|
|
|
3
3
|
import { type ThemedColor } from "./palette.js";
|
|
4
4
|
export type ThemeTokens = {
|
|
5
5
|
colors: Record<keyof PaletteTokens["colors"] | "border.focus" | "border.error" | "bg.canvas" | "bg.panel" | "bg.card" | "bg.surface" | "bg.avatar" | "bg.backdrop" | "bg.popover" | "bg.modalShell" | "bg.modalSheet" | "bg.drawerShell" | "bg.drawerSheet" | "bg.field" | "bg.formField" | "bg.openTrigger" | "bg.fieldDisabled" | "bg.control" | "bg.pill" | "bg.glass" | "bg.raised" | "bg.raisedHover" | "bg.check" | "bg.hover" | "bg.controlHover" | "bg.fill" | "bg.rowHover" | "bg.track" | "bg.knob" | "fg.primary" | "fg.secondary" | "fg.muted" | "fg.subtle" | "fg.label" | "fg.archived" | "border.subtle" | "border.control" | "border.panel" | "border.card" | "border.canvas" | "border.divider" | "border.popover" | "border.menuHover" | "border.mark" | "border.glass" | "border.hairline" | "chart.neutral" | "chart.notStarted", ThemedColor>;
|
|
6
|
-
gradients: Record<keyof PaletteTokens["gradients"] | "
|
|
6
|
+
gradients: Record<keyof PaletteTokens["gradients"] | "canvas" | "panel" | "card" | "raised" | "raisedHover" | "selected" | "rowHover", ThemedColor>;
|
|
7
7
|
shadows: Record<"search" | "inset" | "card" | "soft" | "focus" | "glow" | "toast" | "control.raised" | "control.raisedHover" | "control.pressed", ThemedColor>;
|
|
8
8
|
fonts: {
|
|
9
9
|
display: string;
|
package/dist/theme/tokens.js
CHANGED
|
@@ -123,12 +123,6 @@ export function deriveThemeTokens(theme = {}) {
|
|
|
123
123
|
},
|
|
124
124
|
gradients: {
|
|
125
125
|
...palette.gradients,
|
|
126
|
-
// The skeleton as the design draws it, with no shimmer: the canvas's gradient in light,
|
|
127
|
-
// a flat white wash in dark.
|
|
128
|
-
skeletonFill: {
|
|
129
|
-
base: linearGradient("to bottom", [dark.wash, dark.wash], 0.08),
|
|
130
|
-
_light: linearGradient("to bottom", light.gradients.canvas, 1),
|
|
131
|
-
},
|
|
132
126
|
/*
|
|
133
127
|
* Each flat `bg.*` face sits near the middle of its gradient. Dark draws the canvas and panel flat,
|
|
134
128
|
* and the raised, selected and card faces as white glass falling to the muted grey.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ciridae/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -202,6 +202,10 @@
|
|
|
202
202
|
"types": "./dist/components/chip.d.ts",
|
|
203
203
|
"default": "./dist/components/chip.js"
|
|
204
204
|
},
|
|
205
|
+
"./member-directory": {
|
|
206
|
+
"types": "./dist/components/member-directory.d.ts",
|
|
207
|
+
"default": "./dist/components/member-directory.js"
|
|
208
|
+
},
|
|
205
209
|
"./status": {
|
|
206
210
|
"types": "./dist/components/status.d.ts",
|
|
207
211
|
"default": "./dist/components/status.js"
|
|
@@ -548,6 +552,7 @@
|
|
|
548
552
|
"@tanstack/react-table": "9.2.4",
|
|
549
553
|
"@tanstack/react-virtual": "3.14.23",
|
|
550
554
|
"cmdk": "1.1.1",
|
|
555
|
+
"skullet": "0.0.3",
|
|
551
556
|
"sonner": "2.0.8",
|
|
552
557
|
"zod": "^4.4.3"
|
|
553
558
|
},
|