@fiestaboard/ui 5.3.0 → 5.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/components/board/board-teaser.d.ts +9 -1
- package/dist/components/board/board-teaser.js +56 -52
- package/dist/components/board/board-teaser.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/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.js +1 -1
- package/dist/components/overlays/lightbox.js.map +1 -1
- 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.d.ts +8 -1
- package/dist/components/plugin/board-showcase.js +18 -17
- package/dist/components/plugin/board-showcase.js.map +1 -1
- package/dist/components/plugin/plugin-card.d.ts +8 -1
- package/dist/components/plugin/plugin-card.js +8 -7
- package/dist/components/plugin/plugin-card.js.map +1 -1
- package/dist/components/plugin/scaled-board-teaser.d.ts +4 -1
- package/dist/components/plugin/scaled-board-teaser.js +12 -11
- package/dist/components/plugin/scaled-board-teaser.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 +4 -0
- package/dist/index.js +104 -100
- package/dist/lib/board-characters.d.ts +13 -0
- package/dist/lib/board-characters.js +1 -1
- package/dist/lib/board-characters.js.map +1 -1
- package/dist/theme.css +85 -4
- package/package.json +9 -2
package/README.md
CHANGED
|
@@ -85,9 +85,27 @@ npm install
|
|
|
85
85
|
npm run storybook # component workbench on :6006
|
|
86
86
|
npm run build # dist/ — ESM + d.ts + theme.css
|
|
87
87
|
npm run lint && npm run typecheck && npm run format:check
|
|
88
|
+
npm test # unit tests (Vitest + jsdom), single run
|
|
89
|
+
npm run test:watch # the same suite, watching
|
|
88
90
|
npm run build-storybook && npm run test-storybook # axe a11y sweep (needs the static build served on :6006)
|
|
89
91
|
```
|
|
90
92
|
|
|
93
|
+
### Unit tests
|
|
94
|
+
|
|
95
|
+
Vitest + Testing Library on jsdom, configured in `vitest.config.ts` (deliberately a separate file from the library build's `vite.config.ts`) with globals bootstrapped in `src/test/setup.ts`.
|
|
96
|
+
|
|
97
|
+
Tests are **colocated**: the test for `src/components/forms/button.tsx` is `src/components/forms/button.test.tsx`. Only `src/**/*.test.{ts,tsx}` is collected — the harness suites under `scripts/` keep their own runners (`npm run perf:test`, `npm run release:test`).
|
|
98
|
+
|
|
99
|
+
**Tailwind does not run in jsdom.** No stylesheet is loaded, so class strings are inert and `getComputedStyle` reports UA defaults for every component in this package; an assertion on a colour or a size there passes for the wrong reason. Assert on what jsdom actually models — roles, accessible names, ARIA state, focus, keyboard, events and `data-*` props. Appearance is covered twice already, by VRT (`docs/VISUAL_REGRESSION.md`) and by the Storybook a11y sweep, both of which run a real browser.
|
|
100
|
+
|
|
101
|
+
Three files are maintained as exemplars of the house pattern; copy the nearest one:
|
|
102
|
+
|
|
103
|
+
| Exemplar | Pattern it models |
|
|
104
|
+
| ------------------------------------------- | ----------------------------------------------------------------------- |
|
|
105
|
+
| `src/components/chrome/breadcrumb.test.tsx` | presentational — landmark, list semantics, `aria-current`, `asChild` |
|
|
106
|
+
| `src/components/forms/button.test.tsx` | interactive — `userEvent`, keyboard activation, busy/disabled semantics |
|
|
107
|
+
| `src/components/forms/toggle.test.tsx` | ARIA state and selection — `aria-pressed`, roving tabindex, arrow keys |
|
|
108
|
+
|
|
91
109
|
### Visual parity rule
|
|
92
110
|
|
|
93
111
|
This package was extracted from FiestaBoard's `web/src/components/ui` with a pixel-parity guarantee. Token values in `src/styles/theme.css` and component class strings are contract, not implementation detail — changes to them are visible in every consumer. Change intentionally and version accordingly (patch: fixes, minor: additive components/variants, major: breaking API or visual changes).
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Code62Glyph } from "../../lib/board-characters";
|
|
1
2
|
export interface BoardTeaserProps {
|
|
2
3
|
/** Literal board line, e.g. `"{66}AAPL +1.88%"`. */
|
|
3
4
|
teaser: string;
|
|
@@ -5,6 +6,13 @@ export interface BoardTeaserProps {
|
|
|
5
6
|
tiles?: number;
|
|
6
7
|
size?: "sm" | "md" | "lg";
|
|
7
8
|
boardType?: "black" | "white";
|
|
9
|
+
/**
|
|
10
|
+
* Which glyph the board this strip stands for draws for code 62. Already
|
|
11
|
+
* resolved by the consumer — a strip is one row with no shape of its own, so
|
|
12
|
+
* it has no `deviceType` to resolve from; a Note consumer passes `"heart"`.
|
|
13
|
+
* Defaults to `"degree"`, the glyph every Flagship carried before 2026.
|
|
14
|
+
*/
|
|
15
|
+
code62Glyph?: Code62Glyph;
|
|
8
16
|
className?: string;
|
|
9
17
|
}
|
|
10
|
-
export declare const BoardTeaser: import("react").MemoExoticComponent<({ teaser, tiles, size, boardType, className, }: BoardTeaserProps) => import("react").JSX.Element>;
|
|
18
|
+
export declare const BoardTeaser: import("react").MemoExoticComponent<({ teaser, tiles, size, boardType, code62Glyph, className, }: BoardTeaserProps) => import("react").JSX.Element>;
|
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { resolveColorCode as e } from "../../lib/board-colors.js";
|
|
3
|
-
import {
|
|
4
|
-
import { gapClasses as
|
|
5
|
-
import { SEAM_CLASS as
|
|
6
|
-
import { memo as
|
|
7
|
-
import { jsx as
|
|
3
|
+
import { applyCode62Glyph as t, messageToText as n, parseLine as r } from "../../lib/board-characters.js";
|
|
4
|
+
import { gapClasses as i, radiusClasses as a, sizeClasses as o, textSizeClasses as s } from "../../lib/board-metrics.js";
|
|
5
|
+
import { SEAM_CLASS as c, charLeafBoxShadow as l, seamStyle as u } from "./board-surfaces.js";
|
|
6
|
+
import { memo as d, useMemo as f } from "react";
|
|
7
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/board/board-teaser.tsx
|
|
9
|
-
var
|
|
10
|
-
let
|
|
11
|
-
let e =
|
|
12
|
-
for (; e.length <
|
|
9
|
+
var h = d(function({ teaser: d, tiles: h = 15, size: g = "sm", boardType: _ = "black", code62Glyph: v = "degree", className: y = "" }) {
|
|
10
|
+
let b = _ === "white", x = b ? "var(--color-board-surface-light)" : "var(--color-board-surface-dark)", S = b ? "var(--color-board-text-on-light)" : "var(--color-board-text-on-dark)", C = f(() => {
|
|
11
|
+
let e = r(d).slice(0, h).map((e) => t(e, v));
|
|
12
|
+
for (; e.length < h;) e.push({
|
|
13
13
|
type: "char",
|
|
14
14
|
value: " "
|
|
15
15
|
});
|
|
16
16
|
return e;
|
|
17
|
-
}, [
|
|
18
|
-
|
|
17
|
+
}, [
|
|
18
|
+
d,
|
|
19
|
+
h,
|
|
20
|
+
v
|
|
21
|
+
]), w = f(() => n(d, "flagship", v) || "Board teaser", [d, v]), T = g === "sm" ? b ? "0 1px 2px rgba(0,0,0,0.15)" : "0 1px 2px rgba(0,0,0,0.4)" : b ? "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)";
|
|
22
|
+
return /* @__PURE__ */ p("div", {
|
|
19
23
|
role: "img",
|
|
20
|
-
"aria-label":
|
|
24
|
+
"aria-label": w,
|
|
21
25
|
"data-slot": "board-teaser",
|
|
22
|
-
className: `inline-flex max-w-full ${
|
|
23
|
-
children: /* @__PURE__ */
|
|
26
|
+
className: `inline-flex max-w-full ${y}`,
|
|
27
|
+
children: /* @__PURE__ */ p("div", {
|
|
24
28
|
"aria-hidden": "true",
|
|
25
|
-
className: `flex ${
|
|
26
|
-
children:
|
|
29
|
+
className: `flex ${i[g]}`,
|
|
30
|
+
children: C.map((t, n) => {
|
|
27
31
|
if (t.type === "color") {
|
|
28
|
-
let r = e(t.code,
|
|
29
|
-
return
|
|
32
|
+
let r = e(t.code, b);
|
|
33
|
+
return g === "sm" ? /* @__PURE__ */ p("div", {
|
|
30
34
|
"data-teaser-tile": "",
|
|
31
|
-
className: `${
|
|
35
|
+
className: `${o[g]} ${a[g]}`,
|
|
32
36
|
style: {
|
|
33
37
|
backgroundColor: r,
|
|
34
|
-
boxShadow:
|
|
38
|
+
boxShadow: T,
|
|
35
39
|
contain: "layout style paint"
|
|
36
40
|
}
|
|
37
|
-
}, n) : /* @__PURE__ */
|
|
41
|
+
}, n) : /* @__PURE__ */ p("div", {
|
|
38
42
|
"data-teaser-tile": "",
|
|
39
|
-
className: `relative ${
|
|
43
|
+
className: `relative ${o[g]} ${a[g]} overflow-hidden`,
|
|
40
44
|
style: {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
boxShadow:
|
|
45
|
+
backgroundColor: x,
|
|
46
|
+
boxShadow: T,
|
|
43
47
|
contain: "layout style paint"
|
|
44
48
|
},
|
|
45
|
-
children: /* @__PURE__ */
|
|
46
|
-
className: `absolute ${
|
|
49
|
+
children: /* @__PURE__ */ p("div", {
|
|
50
|
+
className: `absolute ${a[g]} overflow-hidden`,
|
|
47
51
|
style: {
|
|
48
52
|
top: "3px",
|
|
49
53
|
bottom: "4px",
|
|
@@ -52,57 +56,57 @@ var m = u(function({ teaser: u, tiles: m = 15, size: h = "sm", boardType: g = "b
|
|
|
52
56
|
backgroundColor: r,
|
|
53
57
|
boxShadow: "0 2px 4px rgba(0,0,0,0.3), inset 0 1px 1px rgba(255,255,255,0.15), inset 0 -1px 1px rgba(0,0,0,0.25)"
|
|
54
58
|
},
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
style:
|
|
59
|
+
children: /* @__PURE__ */ p("div", {
|
|
60
|
+
className: c,
|
|
61
|
+
style: u[_]
|
|
58
62
|
})
|
|
59
63
|
})
|
|
60
64
|
}, n);
|
|
61
65
|
}
|
|
62
|
-
let r = t.value,
|
|
63
|
-
return
|
|
66
|
+
let r = t.value, i = r === "♥";
|
|
67
|
+
return g === "sm" ? /* @__PURE__ */ p("div", {
|
|
64
68
|
"data-teaser-tile": "",
|
|
65
|
-
className: `${
|
|
69
|
+
className: `${o[g]} ${a[g]} flex items-center justify-center`,
|
|
66
70
|
style: {
|
|
67
|
-
backgroundColor:
|
|
68
|
-
boxShadow:
|
|
71
|
+
backgroundColor: x,
|
|
72
|
+
boxShadow: T,
|
|
69
73
|
contain: "layout style paint"
|
|
70
74
|
},
|
|
71
|
-
children: r !== " " && /* @__PURE__ */
|
|
72
|
-
className: `${
|
|
73
|
-
style: { color:
|
|
75
|
+
children: r !== " " && /* @__PURE__ */ p("span", {
|
|
76
|
+
className: `${s[g]} font-mono font-semibold select-none leading-none`,
|
|
77
|
+
style: { color: i ? "#eb4034" : S },
|
|
74
78
|
children: r
|
|
75
79
|
})
|
|
76
|
-
}, n) : /* @__PURE__ */
|
|
80
|
+
}, n) : /* @__PURE__ */ m("div", {
|
|
77
81
|
"data-teaser-tile": "",
|
|
78
|
-
className: `relative ${
|
|
82
|
+
className: `relative ${o[g]} ${a[g]} overflow-hidden`,
|
|
79
83
|
style: {
|
|
80
|
-
backgroundColor:
|
|
81
|
-
boxShadow:
|
|
84
|
+
backgroundColor: x,
|
|
85
|
+
boxShadow: T,
|
|
82
86
|
contain: "layout style paint"
|
|
83
87
|
},
|
|
84
88
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ p("div", {
|
|
86
90
|
className: "absolute inset-0 flex items-center justify-center",
|
|
87
91
|
style: {
|
|
88
92
|
zIndex: 2,
|
|
89
|
-
boxShadow:
|
|
93
|
+
boxShadow: l[_]
|
|
90
94
|
},
|
|
91
|
-
children: r !== " " && /* @__PURE__ */
|
|
92
|
-
className: `${
|
|
93
|
-
style: { color:
|
|
95
|
+
children: r !== " " && /* @__PURE__ */ p("span", {
|
|
96
|
+
className: `${s[g]} font-mono font-semibold select-none leading-none`,
|
|
97
|
+
style: { color: i ? "#eb4034" : S },
|
|
94
98
|
children: r
|
|
95
99
|
})
|
|
96
100
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
className:
|
|
99
|
-
style:
|
|
101
|
+
/* @__PURE__ */ p("div", {
|
|
102
|
+
className: c,
|
|
103
|
+
style: u[_]
|
|
100
104
|
}),
|
|
101
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ p("div", {
|
|
102
106
|
className: "absolute inset-0 pointer-events-none",
|
|
103
107
|
style: {
|
|
104
108
|
zIndex: 1,
|
|
105
|
-
background:
|
|
109
|
+
background: b ? "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%)"
|
|
106
110
|
}
|
|
107
111
|
})
|
|
108
112
|
]
|
|
@@ -112,6 +116,6 @@ var m = u(function({ teaser: u, tiles: m = 15, size: h = "sm", boardType: g = "b
|
|
|
112
116
|
});
|
|
113
117
|
});
|
|
114
118
|
//#endregion
|
|
115
|
-
export {
|
|
119
|
+
export { h as BoardTeaser };
|
|
116
120
|
|
|
117
121
|
//# sourceMappingURL=board-teaser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-teaser.js","names":[],"sources":["../../../src/components/board/board-teaser.tsx"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"board-teaser.js","names":[],"sources":["../../../src/components/board/board-teaser.tsx"],"mappings":";;;;;;;;AA4CA,IAAa,IAAc,EAAK,SAAqB,EACnD,WACA,WAAQ,IACR,UAAO,MACP,eAAY,SACZ,iBAAc,UACd,eAAY,MACO;CACnB,IAAM,IAAe,MAAc,SAC7B,IAAS,IAAe,qCAAqC,mCAC7D,IAAY,IAAe,qCAAqC,mCAE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AAS;IA2BzB,OAxBI,MAAS,OAET,kBAAC,OAAD;KAEE,oBAAiB;KACjB,WAAW,GAAG,EAAY,GAAM,GAAG,EAAc,GAAM;KACvD,OAAO;MACL,iBAAiB;MACjB,WAAW;MACX,SAAS;KACX;KAEC,UAAA,MAAS,OACR,kBAAC,QAAD;MACE,WAAW,GAAG,EAAgB,GAAM;MACpC,OAAO,EAAE,OAAO,IAAU,YAAY,EAAU;MAE/C,UAAA;KACG,CAAA;IAEL,GAjBE,CAiBF,IAKP,kBAAC,OAAD;KAEE,oBAAiB;KACjB,WAAW,YAAY,EAAY,GAAM,GAAG,EAAc,GAAM;KAChE,OAAO;MACL,iBAAiB;MACjB,WAAW;MACX,SAAS;KACX;KARF,UAAA;MAWE,kBAAC,OAAD;OACE,WAAU;OACV,OAAO;QAAE,QAAQ;QAAG,WAAW,EAAkB;OAAW;OAE3D,UAAA,MAAS,OACR,kBAAC,QAAD;QACE,WAAW,GAAG,EAAgB,GAAM;QACpC,OAAO,EAAE,OAAO,IAAU,YAAY,EAAU;QAE/C,UAAA;OACG,CAAA;MAEL,CAAA;MACL,kBAAC,OAAD;OAAK,WAAW;OAAY,OAAO,EAAU;MAAa,CAAA;MAC1D,kBAAC,OAAD;OACE,WAAU;OACV,OAAO;QACL,QAAQ;QACR,YAAY,IACR,8FACA;OACN;MACD,CAAA;KACE;IAjCE,GAAA,CAiCF;GAET,CAAC;EACE,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;AAGA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAqC;CACxE,OAAO,kBAAC,MAAD;EAAI,aAAU;EAAgB,WAAW,EAAG,WAAW,CAAS;EAAG,GAAI;CAAQ,CAAA;AACxF;AA8BA,SAAS,EAAY,EACnB,cACA,aAAU,IACV,YAAS,IACT,aAAU,QACV,aACA,QACA,GAAG,KACgB;CACnB,OAAO,EAAU;EACf,gBAAgB;EACX;EACL,QAAQ,IAAW,EAAM,SAAS,KAAK,CAAQ,IAA2B,KAAA;EAC1E,OAAO;GACL,aAAa;GAGb,eAAe,IAAS,KAAK,KAAA;GAC7B,gBAAgB,IAAS,IAAU,KAAA;GACnC,WAAW,EAAG,GAAc,IAAS,IAAsB,GAAsB,CAAS;GAC1F,GAAI,IAAU,CAAC,IAAI,EAAE,YAAS;GAC9B,GAAG;EACL;CACF,CAAC;AACH;AAkBA,SAAS,EAAe,EAAE,cAAW,aAAU,gBAAa,SAAM,iBAAc,GAAG,KAA8B;CAC/G,OAGE,kBAAC,MAAD;EAAI,aAAU;EAAmB,WAAW,EAAG,WAAW,CAAS;EAAG,GAAI;EACxE,UAAA,kBAAC,GAAD;GACE,WAAU;GACG;GACP;GACN,cAAc,KAAgB,MAAa,EAAa,CAAQ,IAAI,KAAA;GAEnE;EACU,CAAA;CACX,CAAA;AAER;AAQA,SAAS,EAAsB,EAAE,cAAW,aAAU,GAAG,KAAyC;CAChG,OACE,kBAAC,GAAD;EACE,aAAU;EACV,WAAW,EAAG,GAAc,GAAsB,kDAAkD,CAAS;EAC7G,GAAI;EAHN,UAAA,CAKG,GAQD,kBAAC,GAAD;GACE,eAAY;GACZ,WAAU;EACX,CAAA,CACiB;;AAExB;AAMA,SAAS,EAAsB,EAAE,cAAW,aAAU,GAAG,KAAqC;CAC5F,OACE,kBAAC,GAAD;EAAoB,aAAU;EAsB5B,UAAA,kBAAC,MAAD;GACE,MAAK;GACL,aAAU;GACV,WAAW,EAGT,2EACA,CACF;GACA,GAAI;GAEH;EACC,CAAA;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,E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G,EAAK,GAAG,MAAQ,GACpE,IAAQ,IAAU,IAAI,EAAI,MAAM,GAAG,EAAI;KAC7C,OACE,kBAAC,MAAD;MAAc,WAAU;MAAxB,UAAA,CACE,kBAAC,QAAD;OAAM,WAAW,EAAG,iDAAiD,IAAU,IAAa,CAAQ;OACjG,UAAA;MACG,CAAA,GACL,EAAS,CAAK,IACb,kBAAC,GAAD;OACE,MAAM;OACN,MAAM;OACI;OACV,sBAAsB;OACd;MACT,CAAA,IAED,kBAAC,QAAD;OAAM,WAAU;OAAhB,UAAA,CACE,kBAAC,QAAD;QAAM,WAAW,EAAG,8BAA8B,EAAQ,CAAK,CAAC;QAAI,UAAA,EAAa,CAAK;OAAQ,CAAA,GAC7F,KACC,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,EAAa,GAAW,CAAK;QAC5C,cAAY,EAAW,CAAS;QAChC,OAAO,EAAW,CAAS;QAC3B,WAAW;QAEV,UAAA,MAAiB,IAChB,kBAAC,GAAD,EAAO,WAAU,sBAAuB,CAAA,IAExC,kBAAC,GAAD,EAAM,WAAU,+BAAgC,CAAA;OAE5C,CAAA,CAEN;MAEN,CAAA,CAAA;KAhCK,GAAA,CAgCL;IAER,CAAC,CACC;;EAEH;;AAET,CAAC"}
|
|
@@ -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",
|