@fiestaboard/ui 5.2.0 → 5.4.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/README.md +18 -0
- package/dist/components/board/board-display.d.ts +13 -1
- package/dist/components/board/board-display.js +103 -101
- package/dist/components/board/board-display.js.map +1 -1
- package/dist/components/board/static-board-display.d.ts +6 -1
- package/dist/components/board/static-board-display.js +36 -34
- package/dist/components/board/static-board-display.js.map +1 -1
- package/dist/components/chrome/nav-list.d.ts +53 -0
- package/dist/components/chrome/nav-list.js +84 -0
- package/dist/components/chrome/nav-list.js.map +1 -0
- package/dist/components/containment/icon-tile.d.ts +67 -0
- package/dist/components/containment/icon-tile.js +44 -0
- package/dist/components/containment/icon-tile.js.map +1 -0
- package/dist/components/containment/json-tree.js +1 -1
- package/dist/components/containment/json-tree.js.map +1 -1
- package/dist/components/containment/media-frame.d.ts +28 -0
- package/dist/components/containment/media-frame.js +40 -0
- package/dist/components/containment/media-frame.js.map +1 -0
- package/dist/components/containment/scroll-area.d.ts +17 -0
- package/dist/components/containment/scroll-area.js +2 -2
- package/dist/components/containment/scroll-area.js.map +1 -1
- package/dist/components/containment/tabs.js +2 -2
- package/dist/components/containment/tabs.js.map +1 -1
- package/dist/components/editor/formula/formula-editor-panel.js +2 -2
- package/dist/components/editor/formula/formula-editor-panel.js.map +1 -1
- package/dist/components/editor/template-editor-toolbar.d.ts +27 -3
- package/dist/components/editor/template-editor-toolbar.js +99 -96
- package/dist/components/editor/template-editor-toolbar.js.map +1 -1
- package/dist/components/forms/button.d.ts +1 -1
- package/dist/components/forms/button.js +2 -0
- package/dist/components/forms/button.js.map +1 -1
- package/dist/components/forms/selection-group.d.ts +82 -0
- package/dist/components/forms/selection-group.js +51 -0
- package/dist/components/forms/selection-group.js.map +1 -0
- package/dist/components/forms/swatch.d.ts +81 -0
- package/dist/components/forms/swatch.js +91 -0
- package/dist/components/forms/swatch.js.map +1 -0
- package/dist/components/forms/timezone-picker.d.ts +163 -0
- package/dist/components/forms/timezone-picker.js +158 -0
- package/dist/components/forms/timezone-picker.js.map +1 -0
- package/dist/components/forms/toggle-card.d.ts +45 -35
- package/dist/components/forms/toggle-card.js +187 -122
- package/dist/components/forms/toggle-card.js.map +1 -1
- package/dist/components/forms/toggle.d.ts +1 -1
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/grid.d.ts +1 -1
- package/dist/components/layout/stack.d.ts +1 -1
- package/dist/components/overlays/lightbox.d.ts +37 -0
- package/dist/components/overlays/lightbox.js +54 -0
- package/dist/components/overlays/lightbox.js.map +1 -0
- package/dist/components/overlays/overlay-close.js +1 -1
- package/dist/components/overlays/overlay-close.js.map +1 -1
- package/dist/components/plugin/board-showcase.js +1 -1
- package/dist/components/plugin/board-showcase.js.map +1 -1
- package/dist/components/typography/heading.d.ts +1 -1
- package/dist/components/typography/text-link.d.ts +27 -3
- package/dist/components/typography/text-link.js +1 -1
- package/dist/components/typography/text-link.js.map +1 -1
- package/dist/components/typography/text.d.ts +1 -1
- package/dist/components/wizard/wizard-shell.d.ts +6 -1
- package/dist/components/wizard/wizard-shell.js +38 -35
- package/dist/components/wizard/wizard-shell.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +104 -98
- package/dist/lib/board-characters.d.ts +33 -7
- package/dist/lib/board-characters.js +14 -11
- package/dist/lib/board-characters.js.map +1 -1
- package/dist/theme.css +85 -4
- package/package.json +9 -2
|
@@ -7,61 +7,63 @@ import { isNoteArray as d, resolveDimensions as f } from "../../lib/board-dimens
|
|
|
7
7
|
import { memo as p, useMemo as m } from "react";
|
|
8
8
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/board/static-board-display.tsx
|
|
10
|
-
var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ message: p, size: y = "sm", boardType: b = "black", deviceType: x = "flagship",
|
|
11
|
-
let
|
|
10
|
+
var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ message: p, size: y = "sm", boardType: b = "black", deviceType: x = "flagship", code62Glyph: S, className: C = "", notesWide: w = 1, notesTall: T = 1, previewLabel: E, messageLabel: D = _, emptyLabel: O = "Empty board display" }) {
|
|
11
|
+
let k = f(x, w, T), A = d(x), j = b === "white", M = j ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", N = j ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", P = m(() => t(p ?? "", k.rows, k.cols, x, S), [
|
|
12
12
|
p,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
x
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
k.rows,
|
|
14
|
+
k.cols,
|
|
15
|
+
x,
|
|
16
|
+
S
|
|
17
|
+
]), F = m(() => {
|
|
18
|
+
if (!p) return O;
|
|
19
|
+
if (E !== void 0) return E;
|
|
20
|
+
let e = n(p, x, S);
|
|
21
|
+
return e ? D(e) : v;
|
|
21
22
|
}, [
|
|
22
23
|
p,
|
|
23
24
|
x,
|
|
24
|
-
|
|
25
|
+
S,
|
|
25
26
|
E,
|
|
26
|
-
D
|
|
27
|
-
|
|
27
|
+
D,
|
|
28
|
+
O
|
|
29
|
+
]), I = y === "sm" ? "6px" : y === "md" ? "8px" : "10px", L = j ? "var(--color-board-bezel-light)" : "var(--color-board-bezel-dark)", R = j ? "var(--color-board-bezel-border-light)" : "var(--color-board-bezel-border-dark)", z = y === "sm" ? j ? "0 2px 8px rgba(0,0,0,0.1), inset 0 1px 2px rgba(255,255,255,0.9)" : "0 2px 8px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.06)" : j ? "0 8px 32px rgba(0,0,0,0.12), 0 4px 16px rgba(0,0,0,0.08), inset 0 1px 2px rgba(255,255,255,0.9), inset 0 0 0 1px rgba(255,255,255,0.5)" : "0 8px 32px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.08), inset 0 0 0 1px rgba(255,255,255,0.03)", B = y === "sm" ? j ? "0 1px 2px rgba(0,0,0,0.15)" : "0 1px 2px rgba(0,0,0,0.4)" : j ? "0 2px 4px rgba(0,0,0,0.2), inset 0 1px 2px rgba(0,0,0,0.1), inset 0 -1px 2px rgba(255,255,255,0.5), inset 1px 0 1px rgba(0,0,0,0.08), inset -1px 0 1px rgba(255,255,255,0.4)" : "0 2px 4px rgba(0,0,0,0.5), inset 0 1px 2px rgba(0,0,0,0.8), inset 0 -1px 1px rgba(255,255,255,0.08), inset 1px 0 1px rgba(0,0,0,0.5), inset -1px 0 1px rgba(255,255,255,0.05)";
|
|
28
30
|
return /* @__PURE__ */ h("div", {
|
|
29
31
|
className: "w-full flex justify-center",
|
|
30
32
|
children: /* @__PURE__ */ h("div", {
|
|
31
33
|
role: "img",
|
|
32
|
-
"aria-label":
|
|
34
|
+
"aria-label": F,
|
|
33
35
|
"data-slot": "static-board-display",
|
|
34
|
-
className: `${y === "sm" ? "rounded-lg border-[3px]" : "rounded-lg sm:rounded-xl border-[3px] sm:border-[4px] lg:border-[5px]"} ${
|
|
36
|
+
className: `${y === "sm" ? "rounded-lg border-[3px]" : "rounded-lg sm:rounded-xl border-[3px] sm:border-[4px] lg:border-[5px]"} ${C}`,
|
|
35
37
|
style: {
|
|
36
|
-
backgroundColor:
|
|
37
|
-
borderColor:
|
|
38
|
-
boxShadow:
|
|
38
|
+
backgroundColor: L,
|
|
39
|
+
borderColor: R,
|
|
40
|
+
boxShadow: z,
|
|
39
41
|
width: "fit-content"
|
|
40
42
|
},
|
|
41
43
|
children: /* @__PURE__ */ h("div", {
|
|
42
44
|
className: `${i[y]} relative`,
|
|
43
45
|
"aria-hidden": "true",
|
|
44
|
-
style: { background:
|
|
46
|
+
style: { background: j ? "linear-gradient(135deg, var(--color-board-surface-light) 0%, var(--color-board-bezel-border-light) 100%)" : "linear-gradient(135deg, var(--color-board-surface-dark) 0%, var(--color-board-black) 100%)" },
|
|
45
47
|
children: /* @__PURE__ */ h("div", {
|
|
46
48
|
className: `flex flex-col ${r[y]}`,
|
|
47
|
-
children:
|
|
48
|
-
let i =
|
|
49
|
+
children: P.map((t, n) => {
|
|
50
|
+
let i = A && n > 0 && n % 3 == 0;
|
|
49
51
|
return /* @__PURE__ */ h("div", {
|
|
50
52
|
"data-note-row": "",
|
|
51
53
|
...i ? { "data-note-row-seam": "true" } : {},
|
|
52
54
|
className: `flex ${r[y]} justify-center`,
|
|
53
|
-
style: i ? { marginTop:
|
|
55
|
+
style: i ? { marginTop: I } : void 0,
|
|
54
56
|
children: t.map((t, n) => {
|
|
55
|
-
let r =
|
|
57
|
+
let r = A && n > 0 && n % 15 == 0, i = r ? { marginLeft: I } : void 0, d = r ? { "data-note-col-seam": "true" } : {};
|
|
56
58
|
if (t.type === "color") {
|
|
57
|
-
let r = e(t.code,
|
|
59
|
+
let r = e(t.code, j);
|
|
58
60
|
return y === "sm" ? /* @__PURE__ */ h("div", {
|
|
59
61
|
"data-note-tile": "",
|
|
60
62
|
...d,
|
|
61
63
|
className: `${o[y]} ${a[y]} shrink-0`,
|
|
62
64
|
style: {
|
|
63
65
|
backgroundColor: r,
|
|
64
|
-
boxShadow:
|
|
66
|
+
boxShadow: B,
|
|
65
67
|
contain: "layout style paint",
|
|
66
68
|
...i
|
|
67
69
|
}
|
|
@@ -70,8 +72,8 @@ var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ mess
|
|
|
70
72
|
...d,
|
|
71
73
|
className: `relative ${o[y]} ${a[y]} shrink-0 overflow-hidden`,
|
|
72
74
|
style: {
|
|
73
|
-
backgroundColor:
|
|
74
|
-
boxShadow:
|
|
75
|
+
backgroundColor: M,
|
|
76
|
+
boxShadow: B,
|
|
75
77
|
contain: "layout style paint",
|
|
76
78
|
...i
|
|
77
79
|
},
|
|
@@ -98,14 +100,14 @@ var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ mess
|
|
|
98
100
|
...d,
|
|
99
101
|
className: `${o[y]} ${a[y]} flex shrink-0 items-center justify-center`,
|
|
100
102
|
style: {
|
|
101
|
-
backgroundColor:
|
|
102
|
-
boxShadow:
|
|
103
|
+
backgroundColor: M,
|
|
104
|
+
boxShadow: B,
|
|
103
105
|
contain: "layout style paint",
|
|
104
106
|
...i
|
|
105
107
|
},
|
|
106
108
|
children: f !== " " && /* @__PURE__ */ h("span", {
|
|
107
109
|
className: `${s[y]} font-mono font-semibold select-none leading-none`,
|
|
108
|
-
style: { color: p ? "#eb4034" :
|
|
110
|
+
style: { color: p ? "#eb4034" : N },
|
|
109
111
|
children: f
|
|
110
112
|
})
|
|
111
113
|
}, n) : /* @__PURE__ */ g("div", {
|
|
@@ -113,8 +115,8 @@ var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ mess
|
|
|
113
115
|
...d,
|
|
114
116
|
className: `relative ${o[y]} ${a[y]} shrink-0 overflow-hidden`,
|
|
115
117
|
style: {
|
|
116
|
-
backgroundColor:
|
|
117
|
-
boxShadow:
|
|
118
|
+
backgroundColor: M,
|
|
119
|
+
boxShadow: B,
|
|
118
120
|
contain: "layout style paint",
|
|
119
121
|
...i
|
|
120
122
|
},
|
|
@@ -127,7 +129,7 @@ var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ mess
|
|
|
127
129
|
},
|
|
128
130
|
children: f !== " " && /* @__PURE__ */ h("span", {
|
|
129
131
|
className: `${s[y]} font-mono font-semibold select-none leading-none`,
|
|
130
|
-
style: { color: p ? "#eb4034" :
|
|
132
|
+
style: { color: p ? "#eb4034" : N },
|
|
131
133
|
children: f
|
|
132
134
|
})
|
|
133
135
|
}),
|
|
@@ -139,7 +141,7 @@ var _ = (e) => `Board preview: ${e}`, v = "Board preview", y = p(function({ mess
|
|
|
139
141
|
className: "absolute inset-0 pointer-events-none",
|
|
140
142
|
style: {
|
|
141
143
|
zIndex: 1,
|
|
142
|
-
background:
|
|
144
|
+
background: j ? "linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 50%, rgba(0,0,0,0.05) 100%)" : "linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%, rgba(0,0,0,0.2) 100%)"
|
|
143
145
|
}
|
|
144
146
|
})
|
|
145
147
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-board-display.js","names":[],"sources":["../../../src/components/board/static-board-display.tsx"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"static-board-display.js","names":[],"sources":["../../../src/components/board/static-board-display.tsx"],"mappings":";;;;;;;;;AAkDA,IAAM,KAAuB,MAAgB,kBAAkB,KAGzD,IAAgB,iBAET,IAAqB,EAAK,SAA4B,EACjE,YACA,UAAO,MACP,eAAY,SACZ,gBAAa,YACb,gBACA,eAAY,IACZ,eAAY,GACZ,eAAY,GACZ,iBACA,kBAAe,GACf,gBAAa,yBACa;CAC1B,IAAM,IAAO,EAAkB,GAAY,GAAW,CAAS,GACzD,IAAY,EAAY,CAAU,GAClC,IAAe,MAAc,SAC7B,IAAS,IAAe,qCAAqC,mCAC7D,IAAY,IAAe,qCAAqC,mCAEhE,IAAO,QACL,EAAc,KAAW,IAAI,EAAK,MAAM,EAAK,MAAM,GAAY,CAAW,GAChF;EAAC;EAAS,EAAK;EAAM,EAAK;EAAM;EAAY;CAAW,CACzD,GAOM,IAAQ,QAAc;EAC1B,IAAI,CAAC,GAAS,OAAO;EACrB,IAAI,MAAiB,KAAA,GAAW,OAAO;EAGvC,IAAM,IAAO,EAAc,GAAS,GAAY,CAAW;EAC3D,OAAO,IAAO,EAAa,CAAI,IAAI;CACrC,GAAG;EAAC;EAAS;EAAY;EAAa;EAAc;EAAc;CAAU,CAAC,GAGvE,IAAU,MAAS,OAAO,QAAQ,MAAS,OAAO,QAAQ,QAE1D,IAAU,IAAe,mCAAmC,iCAC5D,IAAc,IAAe,0CAA0C,wCAGvE,IACJ,MAAS,OACL,IACE,qEACA,sEACF,IACE,2IACA,0IACF,IACJ,MAAS,O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JE,CAuJF;KAET,CAAC;IACE,CAAA;GACF,CAAA;EACF,CAAA;CACF,CAAA;AAET,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function NavList({ className, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
3
|
+
/** One row's list item. Wraps a {@link NavListLink} — or anything else a row needs to be. */
|
|
4
|
+
declare function NavListItem({ className, ...props }: React.ComponentProps<"li">): React.JSX.Element;
|
|
5
|
+
export type NavListLinkProps = React.ComponentProps<"a"> & {
|
|
6
|
+
/**
|
|
7
|
+
* Render the caller's own element instead of an `<a>` — the same
|
|
8
|
+
* `useRender` mechanics as {@link "./breadcrumb".BreadcrumbLink}. This is
|
|
9
|
+
* how a router Link (Docusaurus's `<Link>`, FiestaBoard's
|
|
10
|
+
* ViewTransitionLink) gets prefetch and base-path handling while this
|
|
11
|
+
* component keeps owning the row's look and its ARIA.
|
|
12
|
+
*/
|
|
13
|
+
asChild?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Marks this row as the current destination: paints the pill AND sets
|
|
16
|
+
* `aria-current`. The app derives it from its router — the design system
|
|
17
|
+
* never guesses at routes.
|
|
18
|
+
*/
|
|
19
|
+
active?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Which kind of "current" this row is, when `active`. Defaults to `"page"`;
|
|
22
|
+
* pass `"location"` for a table of contents, where the row points at a
|
|
23
|
+
* position inside the page you are already on.
|
|
24
|
+
* @default "page"
|
|
25
|
+
*/
|
|
26
|
+
current?: "page" | "step" | "location" | "date" | "time";
|
|
27
|
+
};
|
|
28
|
+
declare function NavListLink({ className, asChild, active, current, children, ref, ...props }: NavListLinkProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
export type NavListSectionProps = React.ComponentProps<"li"> & {
|
|
30
|
+
/** Open on first render, uncontrolled — a router opens the section holding the current route. */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/** Controlled open state; pair with {@link NavListSectionProps.onOpenChange}. */
|
|
33
|
+
open?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Fired with the next open state. One argument, not Base UI's
|
|
36
|
+
* `(open, eventDetails)` pair, so `onOpenChange={setOpen}` behaves.
|
|
37
|
+
*/
|
|
38
|
+
onOpenChange?: (open: boolean) => void;
|
|
39
|
+
};
|
|
40
|
+
declare function NavListSection({ className, children, defaultOpen, open, onOpenChange, ...props }: NavListSectionProps): React.JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* The section's header row: a real `<button>` from Base UI's Collapsible, so
|
|
43
|
+
* `aria-expanded` and the panel wiring are the primitive's. Children are the
|
|
44
|
+
* section's localized label (plus an optional leading icon); the caret is
|
|
45
|
+
* appended and hidden from AT.
|
|
46
|
+
*/
|
|
47
|
+
declare function NavListSectionTrigger({ className, children, ...props }: React.ComponentProps<"button">): React.JSX.Element;
|
|
48
|
+
/**
|
|
49
|
+
* The section's sublist. Renders the Collapsible panel wrapping a nested
|
|
50
|
+
* `<ul>` — children are {@link NavListItem}s, exactly as in the parent list.
|
|
51
|
+
*/
|
|
52
|
+
declare function NavListSectionContent({ className, children, ...props }: React.ComponentProps<"ul">): React.JSX.Element;
|
|
53
|
+
export { NavList, NavListItem, NavListLink, NavListSection, NavListSectionContent, NavListSectionTrigger };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../../lib/utils.js";
|
|
3
|
+
import { Collapsible as t, CollapsibleContent as n, CollapsibleTrigger as r } from "../containment/collapsible.js";
|
|
4
|
+
import { ChevronRight as i } from "lucide-react";
|
|
5
|
+
import * as a from "react";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { useRender as c } from "@base-ui/react/use-render";
|
|
8
|
+
//#region src/components/chrome/nav-list.tsx
|
|
9
|
+
var l = [
|
|
10
|
+
"flex min-h-9 w-full items-center gap-2.5 rounded-md px-3 py-2 text-left text-sm font-medium",
|
|
11
|
+
"transition-[color,background-color,border-color,box-shadow] duration-control focus-ring",
|
|
12
|
+
"[&>svg]:size-4 [&>svg]:shrink-0"
|
|
13
|
+
], u = "nav-active font-semibold", d = "text-muted-foreground nav-active-hover hover:text-foreground";
|
|
14
|
+
function f({ className: t, ...n }) {
|
|
15
|
+
return /* @__PURE__ */ o("ul", {
|
|
16
|
+
role: "list",
|
|
17
|
+
"data-slot": "nav-list",
|
|
18
|
+
className: e("flex list-none flex-col gap-0.5 p-0", t),
|
|
19
|
+
...n
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function p({ className: t, ...n }) {
|
|
23
|
+
return /* @__PURE__ */ o("li", {
|
|
24
|
+
"data-slot": "nav-list-item",
|
|
25
|
+
className: e("min-w-0", t),
|
|
26
|
+
...n
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function m({ className: t, asChild: n = !1, active: r = !1, current: i = "page", children: o, ref: s, ...f }) {
|
|
30
|
+
return c({
|
|
31
|
+
defaultTagName: "a",
|
|
32
|
+
ref: s,
|
|
33
|
+
render: n ? a.Children.only(o) : void 0,
|
|
34
|
+
props: {
|
|
35
|
+
"data-slot": "nav-list-link",
|
|
36
|
+
"data-active": r ? "" : void 0,
|
|
37
|
+
"aria-current": r ? i : void 0,
|
|
38
|
+
className: e(l, r ? u : d, t),
|
|
39
|
+
...n ? {} : { children: o },
|
|
40
|
+
...f
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function h({ className: n, children: r, defaultOpen: i, open: a, onOpenChange: s, ...c }) {
|
|
45
|
+
return /* @__PURE__ */ o("li", {
|
|
46
|
+
"data-slot": "nav-list-section",
|
|
47
|
+
className: e("min-w-0", n),
|
|
48
|
+
...c,
|
|
49
|
+
children: /* @__PURE__ */ o(t, {
|
|
50
|
+
className: "flex flex-col gap-0.5",
|
|
51
|
+
defaultOpen: i,
|
|
52
|
+
open: a,
|
|
53
|
+
onOpenChange: s ? (e) => s(e) : void 0,
|
|
54
|
+
children: r
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function g({ className: t, children: n, ...a }) {
|
|
59
|
+
return /* @__PURE__ */ s(r, {
|
|
60
|
+
"data-slot": "nav-list-section-trigger",
|
|
61
|
+
className: e(l, d, "group/nav-list-section-trigger justify-between", t),
|
|
62
|
+
...a,
|
|
63
|
+
children: [n, /* @__PURE__ */ o(i, {
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: "ml-auto transition-transform duration-control group-data-[panel-open]/nav-list-section-trigger:rotate-90"
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function _({ className: t, children: r, ...i }) {
|
|
70
|
+
return /* @__PURE__ */ o(n, {
|
|
71
|
+
"data-slot": "nav-list-section-panel",
|
|
72
|
+
children: /* @__PURE__ */ o("ul", {
|
|
73
|
+
role: "list",
|
|
74
|
+
"data-slot": "nav-list-section-content",
|
|
75
|
+
className: e("ml-4 flex list-none flex-col gap-0.5 border-l border-border py-0.5 pl-2", t),
|
|
76
|
+
...i,
|
|
77
|
+
children: r
|
|
78
|
+
})
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { f as NavList, p as NavListItem, m as NavListLink, h as NavListSection, _ as NavListSectionContent, g as NavListSectionTrigger };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=nav-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-list.js","names":[],"sources":["../../../src/components/chrome/nav-list.tsx"],"mappings":";;;;;;;;AA4FA,IAAM,IAAe;CACnB;CACA;CACA;AACF,GAIM,IAAsB,4BACtB,IAAuB;AAM7B,SAAS,EAAQ,EAAE,cAAW,GAAG,KAAqC;CACpE,OAME,kBAAC,MAAD;EAAI,MAAK;EAAO,aAAU;EAAW,WAAW,EAAG,uCAAuC,CAAS;EAAG,GAAI;CAAQ,CAAA;AAEtH;A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AAA;CACc,CAAA;AAExB"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* IconTile — the small rounded square that holds one icon (#229 item 5).
|
|
5
|
+
*
|
|
6
|
+
* Taxonomy: `containment/`, because the job is literally "box another thing".
|
|
7
|
+
* The two neighbours it is NOT:
|
|
8
|
+
*
|
|
9
|
+
* * `feedback/` owns the system talking about itself — Badge, Chip, Alert,
|
|
10
|
+
* StatusDot. An IconTile says nothing; it is a ground for whatever glyph
|
|
11
|
+
* the consumer puts in it, and it carries no state, no severity and no
|
|
12
|
+
* announcement. Filing it beside Badge because both are small and
|
|
13
|
+
* rounded would file it by looks, which is the one rule §1.1 forbids.
|
|
14
|
+
* * `chrome/` owns the app frame (Sidebar, PageHeader, the logos). The tile
|
|
15
|
+
* is not frame furniture — it appears inside cards, empty states, list
|
|
16
|
+
* rows and wizard headers alike.
|
|
17
|
+
*
|
|
18
|
+
* Card is the same idea one order of magnitude up (a surface that holds
|
|
19
|
+
* arbitrary content); IconTile is the smallest member of that family, sized
|
|
20
|
+
* for exactly one glyph. Hence `containment/`.
|
|
21
|
+
*
|
|
22
|
+
* What it replaces: the wizard header medallion, which hand-rolled
|
|
23
|
+
* `size-12 … rounded-xl ring-1 ring-white/10` on the board surface
|
|
24
|
+
* (wizard-shell.tsx), and the same shape typed out again wherever an icon
|
|
25
|
+
* needed a ground. One primitive, two tones, three sizes.
|
|
26
|
+
*
|
|
27
|
+
* Accessibility: the tile is DECORATIVE BY DEFAULT and stamps
|
|
28
|
+
* `aria-hidden="true"` on itself. An icon in a tile is nearly always a
|
|
29
|
+
* restatement of the text beside it — the wizard's brand mark sits next to
|
|
30
|
+
* the wordmark, an empty state's icon sits above its title — and announcing
|
|
31
|
+
* both is the double-announcement §6.7 forbids. Opting out (`decorative
|
|
32
|
+
* ={false}`) hands the semantics back to the consumer, who must then give
|
|
33
|
+
* the glyph itself a name. There is deliberately no `label` prop: a tile
|
|
34
|
+
* that needs a name needs a *localized* name, and this package ships no
|
|
35
|
+
* copy of its own (§8) — an `aria-label` on the glyph or on the tile via
|
|
36
|
+
* props is the consumer's call, not a default this file can invent.
|
|
37
|
+
*
|
|
38
|
+
* Not a control. It has no `focus-ring`, no hover state and no `onClick`
|
|
39
|
+
* contract, so SC 2.5.8's 24×24 floor does not reach it (the smallest size
|
|
40
|
+
* is 32px anyway). Wrap it in a Button or make the row the target if the
|
|
41
|
+
* tile needs to be pressable — a clickable `<span>` is the bug MediaFrame
|
|
42
|
+
* was promoted to fix.
|
|
43
|
+
*/
|
|
44
|
+
declare const iconTileVariants: (props?: ({
|
|
45
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
46
|
+
tone?: "muted" | "board" | null | undefined;
|
|
47
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
48
|
+
export type IconTileProps = React.ComponentProps<"span"> & VariantProps<typeof iconTileVariants> & {
|
|
49
|
+
/**
|
|
50
|
+
* Keep the tile and its glyph out of the accessibility tree.
|
|
51
|
+
* `@default true` — an icon in a tile almost always repeats the text
|
|
52
|
+
* beside it. Pass `false` when the glyph is the only carrier of its
|
|
53
|
+
* meaning, and give that glyph a localized name yourself.
|
|
54
|
+
*/
|
|
55
|
+
decorative?: boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* A muted (or board-black) rounded square that centres one icon.
|
|
59
|
+
*
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <IconTile size="lg" tone="board">
|
|
62
|
+
* <FiestaIcon className="size-8" />
|
|
63
|
+
* </IconTile>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
declare function IconTile({ className, size, tone, decorative, ref, ...props }: IconTileProps): React.JSX.Element;
|
|
67
|
+
export { IconTile, iconTileVariants };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import { cva as n } from "class-variance-authority";
|
|
5
|
+
//#region src/components/containment/icon-tile.tsx
|
|
6
|
+
var r = n([
|
|
7
|
+
"inline-flex shrink-0 items-center justify-center",
|
|
8
|
+
"overflow-hidden",
|
|
9
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
10
|
+
], {
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: "size-8 rounded-md [&_svg:not([class*='size-'])]:size-4",
|
|
14
|
+
md: "size-10 rounded-lg [&_svg:not([class*='size-'])]:size-5",
|
|
15
|
+
lg: "size-12 rounded-xl [&_svg:not([class*='size-'])]:size-6"
|
|
16
|
+
},
|
|
17
|
+
tone: {
|
|
18
|
+
muted: "bg-muted text-muted-foreground",
|
|
19
|
+
board: "bg-board-surface-dark text-board-text-on-dark ring-1 ring-white/10"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "md",
|
|
24
|
+
tone: "muted"
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
function i({ className: n, size: i, tone: a, decorative: o = !0, ref: s, ...c }) {
|
|
28
|
+
return /* @__PURE__ */ t("span", {
|
|
29
|
+
"data-slot": "icon-tile",
|
|
30
|
+
"data-size": i ?? "md",
|
|
31
|
+
"data-tone": a ?? "muted",
|
|
32
|
+
"aria-hidden": o ? !0 : void 0,
|
|
33
|
+
ref: s,
|
|
34
|
+
className: e(r({
|
|
35
|
+
size: i,
|
|
36
|
+
tone: a
|
|
37
|
+
}), n),
|
|
38
|
+
...c
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { i as IconTile, r as iconTileVariants };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=icon-tile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icon-tile.js","names":[],"sources":["../../../src/components/containment/icon-tile.tsx"],"mappings":";;;;;AA8CA,IAAM,IAAmB,EACvB;CAIE;CAKA;CACA;AACF,GACA;CACE,UAAU;EAWR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,MAAM;GAKJ,OAAO;GAeP,OAAO;EACT;CACF;CACA,iBAAiB;EACf,MAAM;EACN,MAAM;CACR;AACF,CACF;AAsBA,SAAS,EAAS,EAAE,cAAW,SAAM,SAAM,gBAAa,IAAM,QAAK,GAAG,KAAwB;CAC5F,OACE,kBAAC,QAAD;EACE,aAAU;EAGV,aAAW,KAAQ;EACnB,aAAW,KAAQ;EAGnB,eAAa,IAAa,KAAO,KAAA;EAC5B;EACL,WAAW,EAAG,EAAiB;GAAE;GAAM;EAAK,CAAC,GAAG,CAAS;EACzD,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -10,7 +10,7 @@ var c = {
|
|
|
10
10
|
boolean: "text-hue-yellow",
|
|
11
11
|
nullish: "text-muted-foreground italic",
|
|
12
12
|
other: "text-foreground"
|
|
13
|
-
}, l = "text-info", u = "text-tag-variable-foreground", d = "-ml-1 flex w-full items-center gap-1 rounded-sm px-1 py-0.5 text-left text-xs text-muted-foreground transition-colors duration-control hover:bg-muted/60
|
|
13
|
+
}, l = "text-info", u = "text-tag-variable-foreground", d = "-ml-1 flex w-full items-center gap-1 rounded-sm px-1 py-0.5 text-left text-xs text-muted-foreground transition-colors duration-control hover:bg-muted/60 focus-ring", f = "shrink-0 rounded-sm p-0.5 opacity-0 transition-opacity duration-control hover:bg-muted group-hover:opacity-100 focus-visible:opacity-100 focus-ring", p = 1500;
|
|
14
14
|
function m(e) {
|
|
15
15
|
return typeof e == "object" && !!e;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-tree.js","names":[],"sources":["../../../src/components/containment/json-tree.tsx"],"mappings":";;;;;;AAeA,IAAM,IAAa;CACjB,QAAQ;CAGR,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;AACT,GAGM,IAAW,aACX,IAAa,gCAEb,IACJ,
|
|
1
|
+
{"version":3,"file":"json-tree.js","names":[],"sources":["../../../src/components/containment/json-tree.tsx"],"mappings":";;;;;;AAeA,IAAM,IAAa;CACjB,QAAQ;CAGR,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;AACT,GAGM,IAAW,aACX,IAAa,gCAEb,IACJ,uKAKI,IACJ,uJAEI,IAAoB;AAE1B,SAAS,EAAS,GAA8D;CAC9E,OAAO,OAAO,KAAU,cAAY;AACtC;AAEA,SAAS,EAAQ,GAAwB;CACvC,IAAI,KAAU,MAA6B,OAAO,EAAW;CAC7D,QAAQ,OAAO,GAAf;EACE,KAAK,UACH,OAAO,EAAW;EACpB,KAAK;EACL,KAAK,UACH,OAAO,EAAW;EACpB,KAAK,WACH,OAAO,EAAW;EACpB,SACE,OAAO,EAAW;CACtB;AACF;AAGA,SAAS,EAAa,GAAwB;CAG5C,OAFI,KAAU,OAAoC,SAC9C,OAAO,KAAU,WAAiB,IAAI,EAAM,KACzC,OAAO,CAAK;AACrB;AA6DA,IAAa,IAAW,EAAM,KAAK,SAAsB,EACvD,SACA,UAAO,IACP,aACA,qBAAkB,IAClB,0BAAuB,GACvB,WACA,gBACgB;CAChB,IAAM,EACJ,iBAAc,MAAc,aAAa,KACzC,iBAAc,GAAW,MAAkB,GAAG,EAAE,IAAI,EAAM,GAAG,MAAU,IAAI,SAAS,QAAQ,IAC5F,UAAO,QACP,cAAW,eACX,WAAQ,YACN,KAAU,CAAC,GAET,IAAc,IAAuB,GACrC,CAAC,GAAU,KAAe,EAAM,SAAS,KAAmB,CAAW,GAIvE,CAAC,GAAS,KAAc,EAAM,SAAS,KAAmB,CAAW,GACrE,CAAC,GAAc,KAAmB,EAAM,SAAwB,IAAI,GACpE,IAAU,EAAM,MAAM,GACtB,IAAa,EAAM,OAA6C,IAAI;CAE1E,EAAM,sBACS;EACX,AAAI,EAAW,YAAY,QAAM,aAAa,EA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|
2
|
+
/**
|
|
3
|
+
* MediaFrame — a framed figure for screenshots and other media.
|
|
4
|
+
*
|
|
5
|
+
* Promoted from the docs site's BoardScreenshot/ThemedScreenshot pair
|
|
6
|
+
* (issue #229 item 4), which shipped two structurally identical CSS modules.
|
|
7
|
+
* The frame is the shared shell: media on a card surface with a hairline
|
|
8
|
+
* border, plus an optional bar for a caption or a toolbar (the docs put a
|
|
9
|
+
* black/white toggle there). The bar renders whatever the consumer passes —
|
|
10
|
+
* the toggle itself belongs to ToggleGroup (#218), not here.
|
|
11
|
+
*
|
|
12
|
+
* Zooming is composition, not a built-in: wrap `MediaFrameMedia` in a
|
|
13
|
+
* `LightboxTrigger asChild` (see overlays/lightbox.tsx), or pass `onZoom`
|
|
14
|
+
* for a hand-rolled handler. Either way the media becomes a real `<button>`,
|
|
15
|
+
* so the affordance is keyboard-operable for free.
|
|
16
|
+
*/
|
|
17
|
+
declare function MediaFrame({ className, ...props }: React.ComponentProps<"figure">): React.JSX.Element;
|
|
18
|
+
interface MediaFrameMediaProps extends React.ComponentProps<"button"> {
|
|
19
|
+
/**
|
|
20
|
+
* Zoom-affordance handler. Setting it (or `onClick`, which a
|
|
21
|
+
* `LightboxTrigger asChild` injects) switches the media well from a plain
|
|
22
|
+
* `<div>` to a `<button>` with a zoom cursor and focus ring.
|
|
23
|
+
*/
|
|
24
|
+
onZoom?: React.MouseEventHandler<HTMLButtonElement>;
|
|
25
|
+
}
|
|
26
|
+
declare function MediaFrameMedia({ className, onZoom, onClick, type, children, ...props }: MediaFrameMediaProps): React.JSX.Element;
|
|
27
|
+
declare function MediaFrameBar({ className, ...props }: React.ComponentProps<"figcaption">): React.JSX.Element;
|
|
28
|
+
export { MediaFrame, MediaFrameBar, MediaFrameMedia };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn as e } from "../../lib/utils.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/containment/media-frame.tsx
|
|
5
|
+
function n({ className: n, ...r }) {
|
|
6
|
+
return /* @__PURE__ */ t("figure", {
|
|
7
|
+
"data-slot": "media-frame",
|
|
8
|
+
className: e("flex flex-col overflow-hidden rounded-xl border bg-card text-card-foreground shadow-card", n),
|
|
9
|
+
...r
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
var r = "block w-full [&_img]:block [&_img]:h-auto [&_img]:w-full [&_video]:block [&_video]:h-auto [&_video]:w-full";
|
|
13
|
+
function i({ className: n, onZoom: i, onClick: a, type: o, children: s, ...c }) {
|
|
14
|
+
return i == null && a == null ? /* @__PURE__ */ t("div", {
|
|
15
|
+
"data-slot": "media-frame-media",
|
|
16
|
+
className: e(r, n),
|
|
17
|
+
...c,
|
|
18
|
+
children: s
|
|
19
|
+
}) : /* @__PURE__ */ t("button", {
|
|
20
|
+
type: o ?? "button",
|
|
21
|
+
"data-slot": "media-frame-media",
|
|
22
|
+
className: e(r, "cursor-zoom-in outline-none focus-visible:ring-[3px] focus-visible:ring-inset focus-visible:ring-ring/50", n),
|
|
23
|
+
onClick: (e) => {
|
|
24
|
+
a?.(e), i?.(e);
|
|
25
|
+
},
|
|
26
|
+
...c,
|
|
27
|
+
children: s
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function a({ className: n, ...r }) {
|
|
31
|
+
return /* @__PURE__ */ t("figcaption", {
|
|
32
|
+
"data-slot": "media-frame-bar",
|
|
33
|
+
className: e("flex flex-wrap items-center justify-center gap-2 border-t px-3 py-2 text-sm text-muted-foreground", n),
|
|
34
|
+
...r
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { n as MediaFrame, a as MediaFrameBar, i as MediaFrameMedia };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=media-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-frame.js","names":[],"sources":["../../../src/components/containment/media-frame.tsx"],"mappings":";;;;AAoBA,SAAS,EAAW,EAAE,cAAW,GAAG,KAAyC;CAC3E,OACE,kBAAC,UAAD;EACE,aAAU;EAKV,WAAW,EACT,4FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,IAAM,IACJ;AAWF,SAAS,EAAgB,EAAE,cAAW,WAAQ,YAAS,SAAM,aAAU,GAAG,KAA+B;CA8BvG,OAtBoB,KAAU,QAAQ,KAAW,OAI7C,kBAAC,OAAD;EACE,aAAU;EACV,WAAW,EAAG,GAAkB,CAAS;EACzC,GAAK;EAEJ;CACE,CAAA,IAaP,kBAAC,UAAD;EAEE,MAAM,KAAQ;EACd,aAAU;EAIV,WAAW,EACT,GACA,4GACA,CACF;EACA,UArB6D,MAAU;GAKzE,AADA,IAAU,CAAK,GACf,IAAS,CAAK;EAChB;EAgBI,GAAI;EAEH;CACK,CAAA;AAEZ;AAEA,SAAS,EAAc,EAAE,cAAW,GAAG,KAA6C;CAClF,OACE,kBAAC,cAAD;EACE,aAAU;EAMV,WAAW,EACT,qGACA,CACF;EACA,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
2
2
|
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* The viewport is a real tab stop (`tabIndex={0}` — a scrollable region has to
|
|
5
|
+
* be keyboard-operable), so it needs a visible focus indicator. It cannot draw
|
|
6
|
+
* its own: the Root is `overflow-hidden` and the Viewport is an `h-full w-full`
|
|
7
|
+
* direct child filling it exactly, so ANY outset ring on the Viewport — the
|
|
8
|
+
* `.focus-ring` box-shadow, or the `focus-visible:ring-[3px]` this used to
|
|
9
|
+
* spell — paints entirely inside the clipped region and is never seen. That is
|
|
10
|
+
* the same clipping that keeps `media-frame.tsx` and `time-picker.tsx` pinned
|
|
11
|
+
* in the theme-contrast guard, and it made this control's indicator invisible
|
|
12
|
+
* long before the ring recipe changed (SC 2.4.7).
|
|
13
|
+
*
|
|
14
|
+
* So the ring is drawn on the ROOT, which clips its descendants but not its own
|
|
15
|
+
* box-shadow, and it is keyed to the Viewport's focus with `has-*`. The value
|
|
16
|
+
* comes from `--focus-ring-shadow` (#228 item 5) rather than a re-spelling of
|
|
17
|
+
* the three stops, so a retune of the ring tracks here by construction — the
|
|
18
|
+
* same move `plugin-card.tsx` will make for its `::after` overlay.
|
|
19
|
+
*/
|
|
3
20
|
declare function ScrollArea({ className, children, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): React.JSX.Element;
|
|
4
21
|
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.Scrollbar>): React.JSX.Element;
|
|
5
22
|
export { ScrollArea, ScrollBar };
|
|
@@ -7,12 +7,12 @@ import { ScrollArea as r } from "@base-ui/react/scroll-area";
|
|
|
7
7
|
function i({ className: i, children: o, ...s }) {
|
|
8
8
|
return /* @__PURE__ */ n(r.Root, {
|
|
9
9
|
"data-slot": "scroll-area",
|
|
10
|
-
className: e("relative overflow-hidden", i),
|
|
10
|
+
className: e("relative overflow-hidden has-[[data-slot=scroll-area-viewport]:focus-visible]:shadow-[var(--focus-ring-shadow)]", i),
|
|
11
11
|
...s,
|
|
12
12
|
children: [
|
|
13
13
|
/* @__PURE__ */ t(r.Viewport, {
|
|
14
14
|
"data-slot": "scroll-area-viewport",
|
|
15
|
-
className: "h-full w-full rounded-[inherit] outline-none
|
|
15
|
+
className: "h-full w-full rounded-[inherit] outline-none",
|
|
16
16
|
tabIndex: 0,
|
|
17
17
|
children: o
|
|
18
18
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../src/components/containment/scroll-area.tsx"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"scroll-area.js","names":[],"sources":["../../../src/components/containment/scroll-area.tsx"],"mappings":";;;;;;AAwBA,SAAS,EAAW,EAAE,cAAW,aAAU,GAAG,KAAgE;CAC5G,OACE,kBAAC,EAAoB,MAArB;EACE,aAAU;EACV,WAAW,EACT,mHACA,CACF;EACA,GAAI;EANN,UAAA;GAQE,kBAAC,EAAoB,UAArB;IACE,aAAU;IAGV,WAAU;IACV,UAAU;IAET;GAC2B,CAAA;GAC9B,kBAAC,GAAD,CAAY,CAAA;GACZ,kBAAC,EAAoB,QAArB,CAA6B,CAAA;EACL;;AAE9B;AAEA,SAAS,EAAU,EACjB,cACA,iBAAc,YACd,GAAG,KAC0D;CAC7D,OACE,kBAAC,EAAoB,WAArB;EACE,aAAU;EACG;EACb,WAAW,EACT,+IACA,MAAgB,cAAc,sDAC9B,MAAgB,gBAAgB,wDAChC,CACF;EACA,GAAI;EAEJ,UAAA,kBAAC,EAAoB,OAArB;GAA2B,aAAU;GAAoB,WAAU;EAA0C,CAAA;CAChF,CAAA;AAEnC"}
|
|
@@ -20,14 +20,14 @@ function i({ className: r, ...i }) {
|
|
|
20
20
|
function a({ className: r, ...i }) {
|
|
21
21
|
return /* @__PURE__ */ t(n.Tab, {
|
|
22
22
|
"data-slot": "tabs-trigger",
|
|
23
|
-
className: e("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-[color,background-color,box-shadow] duration-base
|
|
23
|
+
className: e("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-[color,background-color,box-shadow] duration-base focus-ring not-data-[active]:hover:bg-background/50 not-data-[active]:hover:text-foreground disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-background data-[active]:text-foreground data-[active]:shadow-sm", r),
|
|
24
24
|
...i
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
function o({ className: r, ...i }) {
|
|
28
28
|
return /* @__PURE__ */ t(n.Panel, {
|
|
29
29
|
"data-slot": "tabs-content",
|
|
30
|
-
className: e("mt-2
|
|
30
|
+
className: e("mt-2 focus-ring", r),
|
|
31
31
|
...i
|
|
32
32
|
});
|
|
33
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/containment/tabs.tsx"],"mappings":";;;;;;AAOA,SAAS,EAAK,EAAE,GAAG,KAA0D;CAC3E,OAAO,kBAAC,EAAc,MAAf;EAAoB,aAAU;EAAO,GAAI;CAAQ,CAAA;AAC1D;AAEA,SAAS,EAAS,EAAE,cAAW,GAAG,KAA0D;CAC1F,OACE,kBAAC,EAAc,MAAf;EACE,aAAU;EACV,WAAW,EACT,8FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAyD;CAC5F,OACE,kBAAC,EAAc,KAAf;EACE,aAAU;EACV,WAAW,EAIT,
|
|
1
|
+
{"version":3,"file":"tabs.js","names":[],"sources":["../../../src/components/containment/tabs.tsx"],"mappings":";;;;;;AAOA,SAAS,EAAK,EAAE,GAAG,KAA0D;CAC3E,OAAO,kBAAC,EAAc,MAAf;EAAoB,aAAU;EAAO,GAAI;CAAQ,CAAA;AAC1D;AAEA,SAAS,EAAS,EAAE,cAAW,GAAG,KAA0D;CAC1F,OACE,kBAAC,EAAc,MAAf;EACE,aAAU;EACV,WAAW,EACT,8FACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAyD;CAC5F,OACE,kBAAC,EAAc,KAAf;EACE,aAAU;EACV,WAAW,EAIT,oYACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAA2D;CAC9F,OAAO,kBAAC,EAAc,OAAf;EAAqB,aAAU;EAAe,WAAW,EAAG,mBAAmB,CAAS;EAAG,GAAI;CAAQ,CAAA;AAChH"}
|
|
@@ -367,7 +367,7 @@ function P({ initialExpr: d = "", mode: f, onConfirm: p, onCancel: m, formulaFun
|
|
|
367
367
|
onClick: () => Ae(t),
|
|
368
368
|
"aria-expanded": !r,
|
|
369
369
|
"aria-controls": s,
|
|
370
|
-
className: e("flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold transition-colors", "bg-muted/40 hover:bg-muted/70", "
|
|
370
|
+
className: e("flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold transition-colors", "bg-muted/40 hover:bg-muted/70", "focus-ring", a?.text ?? "text-muted-foreground"),
|
|
371
371
|
children: [/* @__PURE__ */ C(l, {
|
|
372
372
|
as: "span",
|
|
373
373
|
weight: "semibold",
|
|
@@ -382,7 +382,7 @@ function P({ initialExpr: d = "", mode: f, onConfirm: p, onCancel: m, formulaFun
|
|
|
382
382
|
children: /* @__PURE__ */ C("button", {
|
|
383
383
|
type: "button",
|
|
384
384
|
onClick: () => Oe(e.name),
|
|
385
|
-
className: "w-full text-left px-3 py-1 text-xs hover:bg-accent hover:text-accent-foreground transition-colors flex items-baseline gap-2 group
|
|
385
|
+
className: "w-full text-left px-3 py-1 text-xs hover:bg-accent hover:text-accent-foreground transition-colors flex items-baseline gap-2 group focus-ring",
|
|
386
386
|
children: [/* @__PURE__ */ S(l, {
|
|
387
387
|
as: "span",
|
|
388
388
|
size: "xs",
|