@ciridae/ui 1.1.0 → 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 +8 -11
- 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 +71 -91
- 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",
|
|
@@ -60,7 +60,8 @@ const item = css({
|
|
|
60
60
|
height: "control.row",
|
|
61
61
|
paddingInline: "control.compactInline",
|
|
62
62
|
border: "0",
|
|
63
|
-
|
|
63
|
+
// The hover's shape from the start: the row is unfilled at rest, so only the wash appears.
|
|
64
|
+
borderRadius: "shell",
|
|
64
65
|
background: "transparent",
|
|
65
66
|
// Muted against the dark canvas; light keeps every item at full contrast, as Round 2 does.
|
|
66
67
|
color: "fg.muted",
|
|
@@ -72,21 +73,19 @@ const item = css({
|
|
|
72
73
|
lineHeight: "tight",
|
|
73
74
|
textAlign: "start",
|
|
74
75
|
cursor: "pointer",
|
|
75
|
-
transitionProperty: "[background, color
|
|
76
|
+
transitionProperty: "[background, color]",
|
|
76
77
|
transitionDuration: "fast",
|
|
77
78
|
"& > svg:first-child": { opacity: "[.7]" },
|
|
78
79
|
"&[data-icon-tone=bronze] > svg:first-child": { color: "accent.bronze" },
|
|
79
80
|
"&:hover, &[aria-pressed=true]": {
|
|
80
|
-
borderRadius: "shell",
|
|
81
81
|
background: "[token(gradients.selected)]",
|
|
82
82
|
_light: { background: "bg.rowHover" },
|
|
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
|
-
borderRadius: "shell",
|
|
90
89
|
background: "bg.field",
|
|
91
90
|
boxShadow: "[inset 0 0 0 1px token(colors.border.canvas)]",
|
|
92
91
|
color: "fg.primary",
|
|
@@ -95,7 +94,7 @@ const item = css({
|
|
|
95
94
|
paddingInline: "[calc(token(spacing.control.compactInline) + token(sizes.border.hairline))]",
|
|
96
95
|
},
|
|
97
96
|
},
|
|
98
|
-
_focusVisible: {
|
|
97
|
+
_focusVisible: { focusRing: "outer" },
|
|
99
98
|
// A secondary list under the navigation, such as recently opened records: a shorter row in
|
|
100
99
|
// smaller, quieter text, so it reads apart from the pages above it.
|
|
101
100
|
"&[data-size=compact]": {
|
|
@@ -122,17 +121,15 @@ const itemGroup = css({
|
|
|
122
121
|
alignItems: "center",
|
|
123
122
|
width: "full",
|
|
124
123
|
minWidth: "0",
|
|
125
|
-
borderRadius: "
|
|
126
|
-
transitionProperty: "[background
|
|
124
|
+
borderRadius: "shell",
|
|
125
|
+
transitionProperty: "[background]",
|
|
127
126
|
transitionDuration: "fast",
|
|
128
127
|
"&:hover": {
|
|
129
|
-
borderRadius: "shell",
|
|
130
128
|
background: "[token(gradients.selected)]",
|
|
131
129
|
_light: { background: "bg.rowHover" },
|
|
132
130
|
},
|
|
133
131
|
"&:hover > [data-sidebar-row]": { color: "fg.primary" },
|
|
134
132
|
"&:has(> [data-sidebar-row][aria-current=page])": {
|
|
135
|
-
borderRadius: "shell",
|
|
136
133
|
background: "bg.field",
|
|
137
134
|
boxShadow: "[inset 0 0 0 1px token(colors.border.canvas)]",
|
|
138
135
|
},
|
|
@@ -141,7 +138,7 @@ const itemGroup = css({
|
|
|
141
138
|
"& > [data-sidebar-row], & > [data-sidebar-row]:is(:hover, [aria-current=page], [aria-pressed=true])": { background: "transparent", boxShadow: "[none]" },
|
|
142
139
|
// Focus rings the whole row, action included, not just the link inside it.
|
|
143
140
|
"& > [data-sidebar-row]:focus-visible": { outline: "0" },
|
|
144
|
-
"&:has(> [data-sidebar-row]:focus-visible)": {
|
|
141
|
+
"&:has(> [data-sidebar-row]:focus-visible)": { focusRing: "outer" },
|
|
145
142
|
"&:hover > [data-sidebar-action], & > [data-sidebar-action]:focus-within": { opacity: "[1]" },
|
|
146
143
|
});
|
|
147
144
|
// Revealed on hover or focus; always shown where there is no hover to reveal it.
|
|
@@ -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
|
}
|
|
@@ -1776,10 +1777,6 @@
|
|
|
1776
1777
|
gap: var(--spacing-sidebar\.mark-gap);
|
|
1777
1778
|
}
|
|
1778
1779
|
|
|
1779
|
-
.bdr_nav {
|
|
1780
|
-
border-radius: var(--radii-nav);
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
1780
|
.my_\[calc\(\(1lh_-_token\(sizes\.control\.shortcut\)\)_\/_2\)\] {
|
|
1784
1781
|
margin-block: calc((1lh - var(--sizes-control\.shortcut)) / 2);
|
|
1785
1782
|
}
|
|
@@ -2184,6 +2181,14 @@
|
|
|
2184
2181
|
color: var(--colors-fg\.on-accent);
|
|
2185
2182
|
}
|
|
2186
2183
|
|
|
2184
|
+
.c_\[inherit\] {
|
|
2185
|
+
color: inherit;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
.ai_baseline {
|
|
2189
|
+
align-items: baseline;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2187
2192
|
.ff_\[inherit\] {
|
|
2188
2193
|
font-family: inherit;
|
|
2189
2194
|
}
|
|
@@ -2212,10 +2217,6 @@
|
|
|
2212
2217
|
position: relative;
|
|
2213
2218
|
}
|
|
2214
2219
|
|
|
2215
|
-
.c_\[inherit\] {
|
|
2216
|
-
color: inherit;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
2220
|
.op_\[0\.6\] {
|
|
2220
2221
|
opacity: 0.6;
|
|
2221
2222
|
}
|
|
@@ -2682,10 +2683,6 @@
|
|
|
2682
2683
|
padding-inline-start: var(--spacing-layout\.control-gap);
|
|
2683
2684
|
}
|
|
2684
2685
|
|
|
2685
|
-
.ai_baseline {
|
|
2686
|
-
align-items: baseline;
|
|
2687
|
-
}
|
|
2688
|
-
|
|
2689
2686
|
.ac_center {
|
|
2690
2687
|
align-content: center;
|
|
2691
2688
|
}
|
|
@@ -2726,10 +2723,6 @@
|
|
|
2726
2723
|
padding-inline-start: calc(var(--spacing-panel\.compact) + var(--spacing-panel\.default));
|
|
2727
2724
|
}
|
|
2728
2725
|
|
|
2729
|
-
.justify-self_center {
|
|
2730
|
-
justify-self: center;
|
|
2731
|
-
}
|
|
2732
|
-
|
|
2733
2726
|
.cursor_crosshair {
|
|
2734
2727
|
cursor: crosshair;
|
|
2735
2728
|
}
|
|
@@ -2743,6 +2736,10 @@
|
|
|
2743
2736
|
user-select: none;
|
|
2744
2737
|
}
|
|
2745
2738
|
|
|
2739
|
+
.field-sizing_content {
|
|
2740
|
+
field-sizing: content;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2746
2743
|
.pbs_control\.iconGap {
|
|
2747
2744
|
padding-block-start: var(--spacing-control\.icon-gap);
|
|
2748
2745
|
}
|
|
@@ -2954,14 +2951,9 @@
|
|
|
2954
2951
|
padding-block-start: var(--spacing-panel\.default);
|
|
2955
2952
|
}
|
|
2956
2953
|
|
|
2957
|
-
.trs-prop_\[background
|
|
2958
|
-
--transition-prop: background, color,
|
|
2959
|
-
transition-property: background, color,
|
|
2960
|
-
}
|
|
2961
|
-
|
|
2962
|
-
.trs-prop_\[background\,_border-radius\] {
|
|
2963
|
-
--transition-prop: background, border-radius;
|
|
2964
|
-
transition-property: background, border-radius;
|
|
2954
|
+
.trs-prop_\[background\] {
|
|
2955
|
+
--transition-prop: background, background-color, background-image, background-position;
|
|
2956
|
+
transition-property: background, background-color, background-image, background-position;
|
|
2965
2957
|
}
|
|
2966
2958
|
|
|
2967
2959
|
.pe_control\.trackInset {
|
|
@@ -4730,10 +4722,6 @@
|
|
|
4730
4722
|
background: var(--colors-bg\.warning-tint);
|
|
4731
4723
|
}
|
|
4732
4724
|
|
|
4733
|
-
.\[\&_\>_\[data-line\]\]\:bg_\[token\(gradients\.skeletonFill\)\] > [data-line] {
|
|
4734
|
-
background: var(--gradients-skeleton-fill);
|
|
4735
|
-
}
|
|
4736
|
-
|
|
4737
4725
|
.\[\&_\>_ol\]\:m_none > ol {
|
|
4738
4726
|
margin: var(--spacing-none);
|
|
4739
4727
|
}
|
|
@@ -5342,10 +5330,6 @@
|
|
|
5342
5330
|
gap: var(--spacing-layout\.control-gap);
|
|
5343
5331
|
}
|
|
5344
5332
|
|
|
5345
|
-
.\[\&_\>_\[data-line\]\]\:bdr_round > [data-line] {
|
|
5346
|
-
border-radius: var(--radii-round);
|
|
5347
|
-
}
|
|
5348
|
-
|
|
5349
5333
|
.\[\&_\>_\[data-copy\]\]\:gap_layout\.tightGap > [data-copy] {
|
|
5350
5334
|
gap: var(--spacing-layout\.tight-gap);
|
|
5351
5335
|
}
|
|
@@ -5674,6 +5658,18 @@
|
|
|
5674
5658
|
padding-block: var(--spacing-none);
|
|
5675
5659
|
}
|
|
5676
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
|
+
|
|
5677
5673
|
[data-panel-padding=default] > .\[\[data-panel-padding\=default\]_\>_\&\]\:gap_layout\.controlGap {
|
|
5678
5674
|
gap: var(--spacing-layout\.control-gap);
|
|
5679
5675
|
}
|
|
@@ -5730,10 +5726,6 @@
|
|
|
5730
5726
|
flex: 1 1 0%;
|
|
5731
5727
|
}
|
|
5732
5728
|
|
|
5733
|
-
.\[\&\[aria-current\=page\]\]\:bdr_shell[aria-current=page] {
|
|
5734
|
-
border-radius: var(--radii-shell);
|
|
5735
|
-
}
|
|
5736
|
-
|
|
5737
5729
|
.\[\&\[data-icon-only\]\]\:px_none[data-icon-only] {
|
|
5738
5730
|
padding-inline: var(--spacing-none);
|
|
5739
5731
|
}
|
|
@@ -5742,10 +5734,6 @@
|
|
|
5742
5734
|
border-radius: var(--radii-round);
|
|
5743
5735
|
}
|
|
5744
5736
|
|
|
5745
|
-
.\[\&\:has\(\>_\[data-sidebar-row\]\[aria-current\=page\]\)\]\:bdr_shell:has(> [data-sidebar-row][aria-current=page]) {
|
|
5746
|
-
border-radius: var(--radii-shell);
|
|
5747
|
-
}
|
|
5748
|
-
|
|
5749
5737
|
.\[\&\[data-shape\=block\]\]\:bdr_control[data-shape=block] {
|
|
5750
5738
|
border-radius: var(--radii-control);
|
|
5751
5739
|
}
|
|
@@ -6222,6 +6210,10 @@
|
|
|
6222
6210
|
color: var(--colors-accent\.bronze);
|
|
6223
6211
|
}
|
|
6224
6212
|
|
|
6213
|
+
.\[\&_\>_svg\]\:as_center > svg {
|
|
6214
|
+
align-self: center;
|
|
6215
|
+
}
|
|
6216
|
+
|
|
6225
6217
|
.\[\&\:disabled\,_\&\[data-disabled\]\]\:op_disabledRound:disabled,.\[\&\:disabled\,_\&\[data-disabled\]\]\:op_disabledRound[data-disabled] {
|
|
6226
6218
|
opacity: var(--opacity-disabled-round);
|
|
6227
6219
|
}
|
|
@@ -6486,10 +6478,6 @@
|
|
|
6486
6478
|
line-height: var(--line-heights-tight);
|
|
6487
6479
|
}
|
|
6488
6480
|
|
|
6489
|
-
.\[\&_\>_\[data-line\]\]\:d_block > [data-line] {
|
|
6490
|
-
display: block;
|
|
6491
|
-
}
|
|
6492
|
-
|
|
6493
6481
|
.\[\&_\>_svg\]\:fs_icon\.small > svg {
|
|
6494
6482
|
font-size: var(--font-sizes-icon\.small);
|
|
6495
6483
|
}
|
|
@@ -7207,13 +7195,8 @@
|
|
|
7207
7195
|
color: var(--colors-fg\.subtle);
|
|
7208
7196
|
}
|
|
7209
7197
|
|
|
7210
|
-
.\[
|
|
7211
|
-
|
|
7212
|
-
border-top-right-radius: var(--radii-field);
|
|
7213
|
-
}
|
|
7214
|
-
|
|
7215
|
-
.\[\&\[data-under-banner\]\]\:bx-sh_\[inset_0_2px_4px_rgba\(0\,_0\,_0\,_0\.18\)\][data-under-banner] {
|
|
7216
|
-
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.18);
|
|
7198
|
+
.\[\&_\>_\[data-ciridae-ui\]\]\:pos_absolute > [data-ciridae-ui] {
|
|
7199
|
+
position: absolute;
|
|
7217
7200
|
}
|
|
7218
7201
|
|
|
7219
7202
|
.\[\&_\>_\[data-ciridae-ui\]_\>_main_\>_header\]\:ps_page\.inline > [data-ciridae-ui] > main > header {
|
|
@@ -7224,6 +7207,10 @@
|
|
|
7224
7207
|
cursor: default;
|
|
7225
7208
|
}
|
|
7226
7209
|
|
|
7210
|
+
.\[\&\&\]\:resize_none.\[\&\&\]\:resize_none {
|
|
7211
|
+
resize: none;
|
|
7212
|
+
}
|
|
7213
|
+
|
|
7227
7214
|
[data-needs-reply] .\[\[data-needs-reply\]_\&\]\:fw_medium {
|
|
7228
7215
|
font-weight: var(--font-weights-medium);
|
|
7229
7216
|
}
|
|
@@ -7516,10 +7503,27 @@
|
|
|
7516
7503
|
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
7517
7504
|
}
|
|
7518
7505
|
|
|
7506
|
+
.\[\&\:has\(\>_\*_\>_\[data-dialog-bleed\]\)\]\:pbs_none:has(> * > [data-dialog-bleed]) {
|
|
7507
|
+
padding-block-start: var(--spacing-none);
|
|
7508
|
+
}
|
|
7509
|
+
|
|
7519
7510
|
.\[\&\:has\(\>_\[data-wizard-state\=result\]\)\]\:ac_center:has(> [data-wizard-state=result]) {
|
|
7520
7511
|
align-content: center;
|
|
7521
7512
|
}
|
|
7522
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
|
+
|
|
7523
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] {
|
|
7524
7528
|
transform: translate(-50%, calc(-50% + var(--spacing-control\.block)));
|
|
7525
7529
|
}
|
|
@@ -8212,27 +8216,7 @@
|
|
|
8212
8216
|
margin-top: var(--spacing-layout\.control-gap);
|
|
8213
8217
|
}
|
|
8214
8218
|
|
|
8215
|
-
.\[\&_\>_\[data-status\]\]\:min-w_0 > [data-status] {
|
|
8216
|
-
min-width: var(--sizes-0);
|
|
8217
|
-
}
|
|
8218
|
-
|
|
8219
|
-
.\[\&_\>_\[data-line\]\]\:h_\[calc\(token\(fontSizes\.body\)_\*_0\.75\)\] > [data-line] {
|
|
8220
|
-
height: calc(var(--font-sizes-body) * 0.75);
|
|
8221
|
-
}
|
|
8222
|
-
|
|
8223
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(1\)\]\:w_\[98\%\] > [data-line]:nth-of-type(1) {
|
|
8224
|
-
width: 98%;
|
|
8225
|
-
}
|
|
8226
|
-
|
|
8227
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(2\)\]\:w_\[87\%\] > [data-line]:nth-of-type(2) {
|
|
8228
|
-
width: 87%;
|
|
8229
|
-
}
|
|
8230
|
-
|
|
8231
|
-
.\[\&_\>_\[data-line\]\:nth-of-type\(3\)\]\:w_\[66\%\] > [data-line]:nth-of-type(3) {
|
|
8232
|
-
width: 66%;
|
|
8233
|
-
}
|
|
8234
|
-
|
|
8235
|
-
.\[\&_\>_\[data-copy\]\]\:min-w_0 > [data-copy] {
|
|
8219
|
+
.\[\&_\>_\[data-status\]\]\:min-w_0 > [data-status],.\[\&_\>_\[data-copy\]\]\:min-w_0 > [data-copy] {
|
|
8236
8220
|
min-width: var(--sizes-0);
|
|
8237
8221
|
}
|
|
8238
8222
|
|
|
@@ -8480,6 +8464,10 @@
|
|
|
8480
8464
|
max-height: 56dvh;
|
|
8481
8465
|
}
|
|
8482
8466
|
|
|
8467
|
+
.\[\&\&\]\:min-h_control\.default.\[\&\&\]\:min-h_control\.default {
|
|
8468
|
+
min-height: var(--sizes-control\.default);
|
|
8469
|
+
}
|
|
8470
|
+
|
|
8483
8471
|
.\[\&_img\]\:h_auto img {
|
|
8484
8472
|
height: auto;
|
|
8485
8473
|
}
|
|
@@ -8664,6 +8652,10 @@
|
|
|
8664
8652
|
min-width: var(--sizes-0);
|
|
8665
8653
|
}
|
|
8666
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
|
+
|
|
8667
8659
|
.\[\&\[data-shape\=block\]\]\:min-h_skeleton\.line[data-shape=block] {
|
|
8668
8660
|
min-height: var(--sizes-skeleton\.line);
|
|
8669
8661
|
}
|
|
@@ -8945,18 +8937,10 @@
|
|
|
8945
8937
|
outline: 2px solid var(--colors-border\.focus);
|
|
8946
8938
|
}
|
|
8947
8939
|
|
|
8948
|
-
.focusVisible\:bdr_shell:is(:focus-visible, [data-focus-visible]) {
|
|
8949
|
-
border-radius: var(--radii-shell);
|
|
8950
|
-
}
|
|
8951
|
-
|
|
8952
8940
|
.\[\&_\>_\[data-sidebar-row\]\:focus-visible\]\:ring_0 > [data-sidebar-row]:focus-visible {
|
|
8953
8941
|
outline: 0;
|
|
8954
8942
|
}
|
|
8955
8943
|
|
|
8956
|
-
.\[\&\:has\(\>_\[data-sidebar-row\]\:focus-visible\)\]\:bdr_shell:has(> [data-sidebar-row]:focus-visible) {
|
|
8957
|
-
border-radius: var(--radii-shell);
|
|
8958
|
-
}
|
|
8959
|
-
|
|
8960
8944
|
.\[\&\:has\(input\:focus-visible\)\]\:bd-c_fg\.muted:has(input:focus-visible) {
|
|
8961
8945
|
border-color: var(--colors-fg\.muted);
|
|
8962
8946
|
}
|
|
@@ -9130,10 +9114,6 @@
|
|
|
9130
9114
|
border-color: var(--colors-border\.control);
|
|
9131
9115
|
}
|
|
9132
9116
|
|
|
9133
|
-
.\[\&\:hover\,_\&\[aria-pressed\=true\]\]\:bdr_shell:hover,.\[\&\:hover\,_\&\[aria-pressed\=true\]\]\:bdr_shell[aria-pressed=true],.\[\&\:hover\]\:bdr_shell:hover {
|
|
9134
|
-
border-radius: var(--radii-shell);
|
|
9135
|
-
}
|
|
9136
|
-
|
|
9137
9117
|
.\[\&_\:is\(a\,_button\)\:hover\]\:td_underline :is(a, button):hover {
|
|
9138
9118
|
text-decoration: underline;
|
|
9139
9119
|
}
|
|
@@ -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
|
},
|