@stoa-dev/kit 1.1.1 → 1.2.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 +2 -2
- package/dist/i18n/locales/at.json.js +9 -3
- package/dist/i18n/locales/at.json.js.map +1 -1
- package/dist/i18n/locales/de.json.js +12 -6
- package/dist/i18n/locales/de.json.js.map +1 -1
- package/dist/i18n/locales/en.json.js +16 -10
- package/dist/i18n/locales/en.json.js.map +1 -1
- package/dist/i18n/locales/it.json.js +9 -3
- package/dist/i18n/locales/it.json.js.map +1 -1
- package/dist/kit.css +1 -1
- package/dist/shell/ScrollToTop/index.js +80 -0
- package/dist/shell/ScrollToTop/index.js.map +1 -0
- package/dist/shell/index.js +34 -32
- package/dist/shell/index.js.map +1 -1
- package/dist/types/i18n/index.d.ts +128 -0
- package/dist/types/i18n/index.d.ts.map +1 -1
- package/dist/types/shell/ScrollToTop/index.d.ts +17 -0
- package/dist/types/shell/ScrollToTop/index.d.ts.map +1 -0
- package/dist/types/shell/index.d.ts +1 -0
- package/dist/types/shell/index.d.ts.map +1 -1
- package/dist/types/ui/audio-player/index.d.ts +30 -0
- package/dist/types/ui/audio-player/index.d.ts.map +1 -0
- package/dist/types/ui/combobox/index.d.ts +41 -0
- package/dist/types/ui/combobox/index.d.ts.map +1 -0
- package/dist/types/ui/file-viewer/index.d.ts +31 -0
- package/dist/types/ui/file-viewer/index.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/ui/index.d.ts.map +1 -1
- package/dist/types/ui/input/index.d.ts.map +1 -1
- package/dist/ui/audio-player/AudioPlayer.module.scss.js +60 -0
- package/dist/ui/audio-player/AudioPlayer.module.scss.js.map +1 -0
- package/dist/ui/audio-player/index.js +323 -0
- package/dist/ui/audio-player/index.js.map +1 -0
- package/dist/ui/combobox/index.js +178 -0
- package/dist/ui/combobox/index.js.map +1 -0
- package/dist/ui/file-viewer/FileViewer.module.scss.js +56 -0
- package/dist/ui/file-viewer/FileViewer.module.scss.js.map +1 -0
- package/dist/ui/file-viewer/index.js +251 -0
- package/dist/ui/file-viewer/index.js.map +1 -0
- package/dist/ui/index.js +124 -115
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/input/index.js +22 -21
- package/dist/ui/input/index.js.map +1 -1
- package/dist/ui/textarea/index.js +1 -1
- package/dist/ui/textarea/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/instrument.css +40 -2
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft as q, ChevronRight as G, Minus as J, Plus as Q } from "lucide-react";
|
|
3
|
+
import { useId as U, useRef as Y, useState as N, useEffect as ee } from "react";
|
|
4
|
+
import { useTranslation as ie } from "react-i18next";
|
|
5
|
+
import { STOA_NS as te } from "../../i18n/namespace.js";
|
|
6
|
+
import { cn as ae } from "../../utils/cn.js";
|
|
7
|
+
import i from "./FileViewer.module.scss.js";
|
|
8
|
+
const re = [
|
|
9
|
+
0.25,
|
|
10
|
+
0.5,
|
|
11
|
+
0.75,
|
|
12
|
+
1,
|
|
13
|
+
1.5,
|
|
14
|
+
2,
|
|
15
|
+
3,
|
|
16
|
+
4
|
|
17
|
+
], o = re, le = 12;
|
|
18
|
+
function ne(r) {
|
|
19
|
+
let c = 0;
|
|
20
|
+
for (let u = 1; u < o.length; u += 1)
|
|
21
|
+
Math.abs(o[u] - r) < Math.abs(o[c] - r) && (c = u);
|
|
22
|
+
return c;
|
|
23
|
+
}
|
|
24
|
+
const S = (r) => String(r).padStart(2, "0");
|
|
25
|
+
function he({
|
|
26
|
+
src: r,
|
|
27
|
+
name: c,
|
|
28
|
+
kind: u,
|
|
29
|
+
description: E,
|
|
30
|
+
index: m = 0,
|
|
31
|
+
count: d = 1,
|
|
32
|
+
onIndexChange: O,
|
|
33
|
+
errorMessage: R,
|
|
34
|
+
footer: T,
|
|
35
|
+
onError: D,
|
|
36
|
+
className: L
|
|
37
|
+
}) {
|
|
38
|
+
const { t: a } = ie(te), $ = U(), A = Y(null), [M, W] = N(!1), [s, h] = N(null), [p, _] = N(0), [P, F] = N(1), [j, B] = N(r);
|
|
39
|
+
r !== j && (B(r), W(!1), h(null), _(0), F(1));
|
|
40
|
+
const I = u ?? (/\.pdf$/i.test(c) ? "pdf" : "image"), v = I === "pdf", f = r !== null && !M, w = d > 1 && !!O;
|
|
41
|
+
function y(t) {
|
|
42
|
+
w && O?.((m + t + d) % d);
|
|
43
|
+
}
|
|
44
|
+
ee(() => {
|
|
45
|
+
const t = A.current;
|
|
46
|
+
if (s !== null || !t || !p) return;
|
|
47
|
+
const n = () => F(t.clientWidth / p);
|
|
48
|
+
n();
|
|
49
|
+
const b = new ResizeObserver(n);
|
|
50
|
+
return b.observe(t), () => b.disconnect();
|
|
51
|
+
}, [s, p]);
|
|
52
|
+
const k = () => s ?? P;
|
|
53
|
+
function V(t) {
|
|
54
|
+
const n = k(), b = t > 0 ? o.find((C) => C > n + 1e-3) : [...o].reverse().find((C) => C < n - 1e-3);
|
|
55
|
+
b !== void 0 && h(b);
|
|
56
|
+
}
|
|
57
|
+
function Z() {
|
|
58
|
+
W(!0), D?.();
|
|
59
|
+
}
|
|
60
|
+
function H(t) {
|
|
61
|
+
if (!t.target.closest("input, textarea, select"))
|
|
62
|
+
if (t.key === "ArrowLeft" && w)
|
|
63
|
+
t.preventDefault(), y(-1);
|
|
64
|
+
else if (t.key === "ArrowRight" && w)
|
|
65
|
+
t.preventDefault(), y(1);
|
|
66
|
+
else {
|
|
67
|
+
if (v || !f) return;
|
|
68
|
+
t.key === "+" || t.key === "=" ? V(1) : t.key === "-" ? V(-1) : t.key === "0" && h(null);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const g = ne(f ? k() : 1), x = `${Math.round((s ?? k()) * 100)} %`, K = [a(v ? "fileViewer.pdf" : "fileViewer.image")], z = a("fileViewer.position", { current: m + 1, count: d });
|
|
72
|
+
return /* @__PURE__ */ l(
|
|
73
|
+
"section",
|
|
74
|
+
{
|
|
75
|
+
className: ae(i.viewer, L),
|
|
76
|
+
"data-slot": "file-viewer",
|
|
77
|
+
"data-kind": I,
|
|
78
|
+
"data-zoomed": s !== null || void 0,
|
|
79
|
+
"aria-labelledby": `${$}-title`,
|
|
80
|
+
onKeyDown: H,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ l("header", { className: i.header, children: [
|
|
83
|
+
/* @__PURE__ */ l("div", { className: i.heading, children: [
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
"h2",
|
|
86
|
+
{
|
|
87
|
+
id: `${$}-title`,
|
|
88
|
+
className: "truncate font-heading text-2xl leading-snug font-semibold tracking-tight",
|
|
89
|
+
children: c || a("fileViewer.title")
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ l("p", { className: i.caption, children: [
|
|
93
|
+
K,
|
|
94
|
+
E && /* @__PURE__ */ l(X, { children: [
|
|
95
|
+
" · ",
|
|
96
|
+
E
|
|
97
|
+
] })
|
|
98
|
+
] })
|
|
99
|
+
] }),
|
|
100
|
+
d > 1 && /* @__PURE__ */ l("span", { className: i.index, title: z, children: [
|
|
101
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: z }),
|
|
102
|
+
/* @__PURE__ */ l("span", { "aria-hidden": "true", children: [
|
|
103
|
+
S(m + 1),
|
|
104
|
+
" / ",
|
|
105
|
+
S(d)
|
|
106
|
+
] })
|
|
107
|
+
] })
|
|
108
|
+
] }),
|
|
109
|
+
/* @__PURE__ */ l("div", { className: i.stage, children: [
|
|
110
|
+
/* @__PURE__ */ l("div", { className: i.marks, "aria-hidden": "true", children: [
|
|
111
|
+
/* @__PURE__ */ e("i", { "data-corner": "tl" }),
|
|
112
|
+
/* @__PURE__ */ e("i", { "data-corner": "tr" }),
|
|
113
|
+
/* @__PURE__ */ e("i", { "data-corner": "bl" }),
|
|
114
|
+
/* @__PURE__ */ e("i", { "data-corner": "br" }),
|
|
115
|
+
/* @__PURE__ */ e("i", { "data-edge": "top" }),
|
|
116
|
+
/* @__PURE__ */ e("i", { "data-edge": "bottom" }),
|
|
117
|
+
/* @__PURE__ */ e("i", { "data-edge": "left" }),
|
|
118
|
+
/* @__PURE__ */ e("i", { "data-edge": "right" }),
|
|
119
|
+
/* @__PURE__ */ e("i", { "data-center": "" })
|
|
120
|
+
] }),
|
|
121
|
+
/* @__PURE__ */ e("div", { className: i.viewport, children: M ? /* @__PURE__ */ e("p", { className: i.error, role: "alert", children: R ?? a("fileViewer.error") }) : r === null ? /* @__PURE__ */ e("p", { className: i.loading, role: "status", children: a("fileViewer.loading") }) : v ? /* @__PURE__ */ e("iframe", { src: r, title: c, className: i.pdf }, r) : /* @__PURE__ */ e("div", { className: i.canvas, children: /* @__PURE__ */ e(
|
|
122
|
+
"img",
|
|
123
|
+
{
|
|
124
|
+
ref: A,
|
|
125
|
+
src: r,
|
|
126
|
+
alt: c,
|
|
127
|
+
className: i.image,
|
|
128
|
+
style: s === null || !p ? void 0 : {
|
|
129
|
+
width: p * s,
|
|
130
|
+
maxWidth: "none",
|
|
131
|
+
maxHeight: "none"
|
|
132
|
+
},
|
|
133
|
+
onLoad: (t) => _(t.currentTarget.naturalWidth),
|
|
134
|
+
onError: Z
|
|
135
|
+
},
|
|
136
|
+
r
|
|
137
|
+
) }) })
|
|
138
|
+
] }),
|
|
139
|
+
/* @__PURE__ */ l("div", { className: i.controls, children: [
|
|
140
|
+
w && /* @__PURE__ */ l("div", { className: i.paging, children: [
|
|
141
|
+
/* @__PURE__ */ e(
|
|
142
|
+
"button",
|
|
143
|
+
{
|
|
144
|
+
type: "button",
|
|
145
|
+
className: i.round,
|
|
146
|
+
"aria-label": a("fileViewer.previous"),
|
|
147
|
+
title: a("fileViewer.previous"),
|
|
148
|
+
onClick: () => y(-1),
|
|
149
|
+
children: /* @__PURE__ */ e(q, {})
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
d <= le ? /* @__PURE__ */ e("ol", { className: i.dots, "aria-label": z, children: Array.from({ length: d }, (t, n) => /* @__PURE__ */ e(
|
|
153
|
+
"li",
|
|
154
|
+
{
|
|
155
|
+
"aria-current": n === m ? "true" : void 0
|
|
156
|
+
},
|
|
157
|
+
n
|
|
158
|
+
)) }) : /* @__PURE__ */ l("span", { className: i.counter, "aria-hidden": "true", children: [
|
|
159
|
+
S(m + 1),
|
|
160
|
+
" / ",
|
|
161
|
+
S(d)
|
|
162
|
+
] }),
|
|
163
|
+
/* @__PURE__ */ e(
|
|
164
|
+
"button",
|
|
165
|
+
{
|
|
166
|
+
type: "button",
|
|
167
|
+
className: i.round,
|
|
168
|
+
"aria-label": a("fileViewer.next"),
|
|
169
|
+
title: a("fileViewer.next"),
|
|
170
|
+
onClick: () => y(1),
|
|
171
|
+
children: /* @__PURE__ */ e(G, {})
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }),
|
|
175
|
+
!v && /* @__PURE__ */ l("div", { className: i.zoom, children: [
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
"button",
|
|
178
|
+
{
|
|
179
|
+
type: "button",
|
|
180
|
+
className: i.round,
|
|
181
|
+
disabled: !f || g === 0,
|
|
182
|
+
"aria-label": a("fileViewer.zoomOut"),
|
|
183
|
+
title: a("fileViewer.zoomOut"),
|
|
184
|
+
onClick: () => V(-1),
|
|
185
|
+
children: /* @__PURE__ */ e(J, {})
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ l("div", { className: i.scale, children: [
|
|
189
|
+
/* @__PURE__ */ e(
|
|
190
|
+
"input",
|
|
191
|
+
{
|
|
192
|
+
className: i.slider,
|
|
193
|
+
type: "range",
|
|
194
|
+
min: 0,
|
|
195
|
+
max: o.length - 1,
|
|
196
|
+
step: 1,
|
|
197
|
+
value: g,
|
|
198
|
+
disabled: !f,
|
|
199
|
+
"aria-label": a("fileViewer.zoom"),
|
|
200
|
+
"aria-valuetext": s === null ? `${a("fileViewer.fit")} (${x})` : x,
|
|
201
|
+
style: {
|
|
202
|
+
"--progress": `${g / (o.length - 1) * 100}%`
|
|
203
|
+
},
|
|
204
|
+
onChange: (t) => h(o[t.currentTarget.valueAsNumber])
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
/* @__PURE__ */ e("div", { className: i.ruler, "aria-hidden": "true", children: o.map((t, n) => /* @__PURE__ */ e(
|
|
208
|
+
"i",
|
|
209
|
+
{
|
|
210
|
+
"data-major": t === 1 || void 0,
|
|
211
|
+
"data-passed": n <= g || void 0
|
|
212
|
+
},
|
|
213
|
+
t
|
|
214
|
+
)) })
|
|
215
|
+
] }),
|
|
216
|
+
/* @__PURE__ */ e(
|
|
217
|
+
"button",
|
|
218
|
+
{
|
|
219
|
+
type: "button",
|
|
220
|
+
className: i.round,
|
|
221
|
+
disabled: !f || g === o.length - 1,
|
|
222
|
+
"aria-label": a("fileViewer.zoomIn"),
|
|
223
|
+
title: a("fileViewer.zoomIn"),
|
|
224
|
+
onClick: () => V(1),
|
|
225
|
+
children: /* @__PURE__ */ e(Q, {})
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
/* @__PURE__ */ e("span", { className: i.readout, "aria-hidden": "true", children: x }),
|
|
229
|
+
/* @__PURE__ */ e(
|
|
230
|
+
"button",
|
|
231
|
+
{
|
|
232
|
+
type: "button",
|
|
233
|
+
className: i.fit,
|
|
234
|
+
disabled: !f,
|
|
235
|
+
"aria-pressed": s === null,
|
|
236
|
+
onClick: () => h(s === null ? 1 : null),
|
|
237
|
+
children: a("fileViewer.fit")
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
] })
|
|
241
|
+
] }),
|
|
242
|
+
T && /* @__PURE__ */ e("footer", { className: i.footer, children: T })
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
export {
|
|
248
|
+
re as FILE_VIEWER_ZOOM_STEPS,
|
|
249
|
+
he as FileViewer
|
|
250
|
+
};
|
|
251
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/ui/file-viewer/index.tsx"],"sourcesContent":["'use client'\n\nimport { ChevronLeft, ChevronRight, Minus, Plus } from 'lucide-react'\nimport {\n\ttype CSSProperties,\n\ttype KeyboardEvent,\n\ttype ReactNode,\n\tuseEffect,\n\tuseId,\n\tuseRef,\n\tuseState,\n} from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { STOA_NS } from '../../i18n/namespace'\nimport { cn } from '../../utils/cn'\nimport styles from './FileViewer.module.scss'\n\nexport type FileViewerKind = 'image' | 'pdf'\n\nexport interface FileViewerProps {\n\t/** File URL; `null` while the app is still resolving it. */\n\tsrc: string | null\n\t/** File name: heading, alt text and the source of the default `kind`. */\n\tname: string\n\t/** Defaults to `pdf` for `*.pdf` names, otherwise `image`. */\n\tkind?: FileViewerKind\n\t/** Extra caption next to the kind, e.g. the file size. */\n\tdescription?: ReactNode\n\t/** Position in a collection (0-based) for paging. */\n\tindex?: number\n\tcount?: number\n\tonIndexChange?: (index: number) => void\n\t/** Shown instead of the default message when the file cannot be displayed. */\n\terrorMessage?: ReactNode\n\t/** Extra actions below the controls, e.g. \"open in default app\". */\n\tfooter?: ReactNode\n\tonError?: () => void\n\tclassName?: string\n}\n\n/** Zoom stops of the scale; `null` (fit) sits outside the scale. */\nexport const FILE_VIEWER_ZOOM_STEPS = [\n\t0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4,\n] as const\nconst STEPS = FILE_VIEWER_ZOOM_STEPS\nconst DOTS_MAX = 12\n\nfunction nearestStep(scale: number) {\n\tlet best = 0\n\tfor (let index = 1; index < STEPS.length; index += 1)\n\t\tif (Math.abs(STEPS[index] - scale) < Math.abs(STEPS[best] - scale))\n\t\t\tbest = index\n\treturn best\n}\n\nconst pad = (value: number) => String(value).padStart(2, '0')\n\n/**\n * In-app viewer for images and PDFs in the instrument style: a stage with\n * viewfinder marks, a straight zoom scale, and paging through a collection.\n * PDFs use the webview's own PDF viewer (pages, scrolling, zoom).\n */\nexport function FileViewer({\n\tsrc,\n\tname,\n\tkind,\n\tdescription,\n\tindex = 0,\n\tcount = 1,\n\tonIndexChange,\n\terrorMessage,\n\tfooter,\n\tonError,\n\tclassName,\n}: FileViewerProps) {\n\tconst { t } = useTranslation(STOA_NS)\n\tconst id = useId()\n\tconst image = useRef<HTMLImageElement>(null)\n\tconst [failed, setFailed] = useState(false)\n\t// `null` fits the image into the stage.\n\tconst [zoom, setZoom] = useState<number | null>(null)\n\tconst [naturalWidth, setNaturalWidth] = useState(0)\n\t// The scale the fitted image is shown at, measured from the layout.\n\tconst [fitScale, setFitScale] = useState(1)\n\n\t// A new file starts fitted (reset during render, no extra effect).\n\tconst [previousSrc, setPreviousSrc] = useState(src)\n\tif (src !== previousSrc) {\n\t\tsetPreviousSrc(src)\n\t\tsetFailed(false)\n\t\tsetZoom(null)\n\t\tsetNaturalWidth(0)\n\t\tsetFitScale(1)\n\t}\n\n\tconst type: FileViewerKind = kind ?? (/\\.pdf$/i.test(name) ? 'pdf' : 'image')\n\tconst pdf = type === 'pdf'\n\tconst ready = src !== null && !failed\n\tconst paging = count > 1 && Boolean(onIndexChange)\n\n\tfunction go(step: number) {\n\t\tif (!paging) return\n\t\tonIndexChange?.((index + step + count) % count)\n\t}\n\n\tuseEffect(() => {\n\t\tconst element = image.current\n\t\tif (zoom !== null || !element || !naturalWidth) return\n\t\tconst measure = () => setFitScale(element.clientWidth / naturalWidth)\n\t\tmeasure()\n\t\tconst observer = new ResizeObserver(measure)\n\t\tobserver.observe(element)\n\t\treturn () => observer.disconnect()\n\t}, [zoom, naturalWidth])\n\n\t/** The scale the image is shown at right now, also while fitted. */\n\tconst shownScale = () => zoom ?? fitScale\n\n\tfunction zoomBy(direction: 1 | -1) {\n\t\tconst from = shownScale()\n\t\tconst next =\n\t\t\tdirection > 0\n\t\t\t\t? STEPS.find((step) => step > from + 0.001)\n\t\t\t\t: [...STEPS].reverse().find((step) => step < from - 0.001)\n\t\tif (next !== undefined) setZoom(next)\n\t}\n\n\tfunction fail() {\n\t\tsetFailed(true)\n\t\tonError?.()\n\t}\n\n\tfunction onKeyDown(event: KeyboardEvent) {\n\t\tconst target = event.target as HTMLElement\n\t\tif (target.closest('input, textarea, select')) return\n\t\tif (event.key === 'ArrowLeft' && paging) {\n\t\t\tevent.preventDefault()\n\t\t\tgo(-1)\n\t\t} else if (event.key === 'ArrowRight' && paging) {\n\t\t\tevent.preventDefault()\n\t\t\tgo(1)\n\t\t} else if (pdf || !ready) return\n\t\telse if (event.key === '+' || event.key === '=') zoomBy(1)\n\t\telse if (event.key === '-') zoomBy(-1)\n\t\telse if (event.key === '0') setZoom(null)\n\t}\n\n\tconst stepIndex = nearestStep(ready ? shownScale() : 1)\n\tconst percent = `${Math.round((zoom ?? shownScale()) * 100)} %`\n\tconst caption = [t(pdf ? 'fileViewer.pdf' : 'fileViewer.image')]\n\tconst position = t('fileViewer.position', { current: index + 1, count })\n\n\treturn (\n\t\t<section\n\t\t\tclassName={cn(styles.viewer, className)}\n\t\t\tdata-slot='file-viewer'\n\t\t\tdata-kind={type}\n\t\t\tdata-zoomed={zoom !== null || undefined}\n\t\t\taria-labelledby={`${id}-title`}\n\t\t\tonKeyDown={onKeyDown}\n\t\t>\n\t\t\t<header className={styles.header}>\n\t\t\t\t<div className={styles.heading}>\n\t\t\t\t\t<h2\n\t\t\t\t\t\tid={`${id}-title`}\n\t\t\t\t\t\tclassName='truncate font-heading text-2xl leading-snug font-semibold tracking-tight'\n\t\t\t\t\t>\n\t\t\t\t\t\t{name || t('fileViewer.title')}\n\t\t\t\t\t</h2>\n\t\t\t\t\t<p className={styles.caption}>\n\t\t\t\t\t\t{caption}\n\t\t\t\t\t\t{description && <> · {description}</>}\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t{count > 1 && (\n\t\t\t\t\t<span className={styles.index} title={position}>\n\t\t\t\t\t\t<span className='sr-only'>{position}</span>\n\t\t\t\t\t\t<span aria-hidden='true'>\n\t\t\t\t\t\t\t{pad(index + 1)} / {pad(count)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</header>\n\n\t\t\t<div className={styles.stage}>\n\t\t\t\t{/* Viewfinder marks behind the content: decoration only. */}\n\t\t\t\t<div className={styles.marks} aria-hidden='true'>\n\t\t\t\t\t<i data-corner='tl' />\n\t\t\t\t\t<i data-corner='tr' />\n\t\t\t\t\t<i data-corner='bl' />\n\t\t\t\t\t<i data-corner='br' />\n\t\t\t\t\t<i data-edge='top' />\n\t\t\t\t\t<i data-edge='bottom' />\n\t\t\t\t\t<i data-edge='left' />\n\t\t\t\t\t<i data-edge='right' />\n\t\t\t\t\t<i data-center='' />\n\t\t\t\t</div>\n\t\t\t\t<div className={styles.viewport}>\n\t\t\t\t\t{failed ? (\n\t\t\t\t\t\t<p className={styles.error} role='alert'>\n\t\t\t\t\t\t\t{errorMessage ?? t('fileViewer.error')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) : src === null ? (\n\t\t\t\t\t\t<p className={styles.loading} role='status'>\n\t\t\t\t\t\t\t{t('fileViewer.loading')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t) : pdf ? (\n\t\t\t\t\t\t<iframe key={src} src={src} title={name} className={styles.pdf} />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className={styles.canvas}>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tref={image}\n\t\t\t\t\t\t\t\tkey={src}\n\t\t\t\t\t\t\t\tsrc={src}\n\t\t\t\t\t\t\t\talt={name}\n\t\t\t\t\t\t\t\tclassName={styles.image}\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\tzoom === null || !naturalWidth\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: naturalWidth * zoom,\n\t\t\t\t\t\t\t\t\t\t\t\tmaxWidth: 'none',\n\t\t\t\t\t\t\t\t\t\t\t\tmaxHeight: 'none',\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonLoad={(event) =>\n\t\t\t\t\t\t\t\t\tsetNaturalWidth(event.currentTarget.naturalWidth)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonError={fail}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<div className={styles.controls}>\n\t\t\t\t{paging && (\n\t\t\t\t\t<div className={styles.paging}>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype='button'\n\t\t\t\t\t\t\tclassName={styles.round}\n\t\t\t\t\t\t\taria-label={t('fileViewer.previous')}\n\t\t\t\t\t\t\ttitle={t('fileViewer.previous')}\n\t\t\t\t\t\t\tonClick={() => go(-1)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ChevronLeft />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{count <= DOTS_MAX ? (\n\t\t\t\t\t\t\t<ol className={styles.dots} aria-label={position}>\n\t\t\t\t\t\t\t\t{Array.from({ length: count }, (_, dot) => (\n\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t// biome-ignore lint/suspicious/noArrayIndexKey: one dot per position\n\t\t\t\t\t\t\t\t\t\tkey={dot}\n\t\t\t\t\t\t\t\t\t\taria-current={dot === index ? 'true' : undefined}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span className={styles.counter} aria-hidden='true'>\n\t\t\t\t\t\t\t\t{pad(index + 1)} / {pad(count)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype='button'\n\t\t\t\t\t\t\tclassName={styles.round}\n\t\t\t\t\t\t\taria-label={t('fileViewer.next')}\n\t\t\t\t\t\t\ttitle={t('fileViewer.next')}\n\t\t\t\t\t\t\tonClick={() => go(1)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<ChevronRight />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t{!pdf && (\n\t\t\t\t\t<div className={styles.zoom}>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype='button'\n\t\t\t\t\t\t\tclassName={styles.round}\n\t\t\t\t\t\t\tdisabled={!ready || stepIndex === 0}\n\t\t\t\t\t\t\taria-label={t('fileViewer.zoomOut')}\n\t\t\t\t\t\t\ttitle={t('fileViewer.zoomOut')}\n\t\t\t\t\t\t\tonClick={() => zoomBy(-1)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Minus />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<div className={styles.scale}>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\tclassName={styles.slider}\n\t\t\t\t\t\t\t\ttype='range'\n\t\t\t\t\t\t\t\tmin={0}\n\t\t\t\t\t\t\t\tmax={STEPS.length - 1}\n\t\t\t\t\t\t\t\tstep={1}\n\t\t\t\t\t\t\t\tvalue={stepIndex}\n\t\t\t\t\t\t\t\tdisabled={!ready}\n\t\t\t\t\t\t\t\taria-label={t('fileViewer.zoom')}\n\t\t\t\t\t\t\t\taria-valuetext={\n\t\t\t\t\t\t\t\t\tzoom === null\n\t\t\t\t\t\t\t\t\t\t? `${t('fileViewer.fit')} (${percent})`\n\t\t\t\t\t\t\t\t\t\t: percent\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t'--progress': `${(stepIndex / (STEPS.length - 1)) * 100}%`,\n\t\t\t\t\t\t\t\t\t} as CSSProperties\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tonChange={(event) =>\n\t\t\t\t\t\t\t\t\tsetZoom(STEPS[event.currentTarget.valueAsNumber])\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<div className={styles.ruler} aria-hidden='true'>\n\t\t\t\t\t\t\t\t{STEPS.map((step, tick) => (\n\t\t\t\t\t\t\t\t\t<i\n\t\t\t\t\t\t\t\t\t\tkey={step}\n\t\t\t\t\t\t\t\t\t\tdata-major={step === 1 || undefined}\n\t\t\t\t\t\t\t\t\t\tdata-passed={tick <= stepIndex || undefined}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype='button'\n\t\t\t\t\t\t\tclassName={styles.round}\n\t\t\t\t\t\t\tdisabled={!ready || stepIndex === STEPS.length - 1}\n\t\t\t\t\t\t\taria-label={t('fileViewer.zoomIn')}\n\t\t\t\t\t\t\ttitle={t('fileViewer.zoomIn')}\n\t\t\t\t\t\t\tonClick={() => zoomBy(1)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Plus />\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<span className={styles.readout} aria-hidden='true'>\n\t\t\t\t\t\t\t{percent}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype='button'\n\t\t\t\t\t\t\tclassName={styles.fit}\n\t\t\t\t\t\t\tdisabled={!ready}\n\t\t\t\t\t\t\taria-pressed={zoom === null}\n\t\t\t\t\t\t\tonClick={() => setZoom(zoom === null ? 1 : null)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{t('fileViewer.fit')}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\n\t\t\t{footer && <footer className={styles.footer}>{footer}</footer>}\n\t\t</section>\n\t)\n}\n"],"names":["FILE_VIEWER_ZOOM_STEPS","STEPS","DOTS_MAX","nearestStep","scale","best","index","pad","value","FileViewer","src","name","kind","description","count","onIndexChange","errorMessage","footer","onError","className","t","useTranslation","STOA_NS","id","useId","image","useRef","failed","setFailed","useState","zoom","setZoom","naturalWidth","setNaturalWidth","fitScale","setFitScale","previousSrc","setPreviousSrc","type","pdf","ready","paging","go","step","useEffect","element","measure","observer","shownScale","zoomBy","direction","from","next","fail","onKeyDown","event","stepIndex","percent","caption","position","jsxs","cn","styles","jsx","Fragment","ChevronLeft","_","dot","ChevronRight","Minus","tick","Plus"],"mappings":";;;;;;;AAyCO,MAAMA,KAAyB;AAAA,EACrC;AAAA,EAAM;AAAA,EAAK;AAAA,EAAM;AAAA,EAAG;AAAA,EAAK;AAAA,EAAG;AAAA,EAAG;AAChC,GACMC,IAAQD,IACRE,KAAW;AAEjB,SAASC,GAAYC,GAAe;AACnC,MAAIC,IAAO;AACX,WAASC,IAAQ,GAAGA,IAAQL,EAAM,QAAQK,KAAS;AAClD,IAAI,KAAK,IAAIL,EAAMK,CAAK,IAAIF,CAAK,IAAI,KAAK,IAAIH,EAAMI,CAAI,IAAID,CAAK,MAChEC,IAAOC;AACT,SAAOD;AACR;AAEA,MAAME,IAAM,CAACC,MAAkB,OAAOA,CAAK,EAAE,SAAS,GAAG,GAAG;AAOrD,SAASC,GAAW;AAAA,EAC1B,KAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAP,IAAQ;AAAA,EACR,OAAAQ,IAAQ;AAAA,EACR,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACD,GAAoB;AACnB,QAAM,EAAE,GAAAC,EAAA,IAAMC,GAAeC,EAAO,GAC9BC,IAAKC,EAAA,GACLC,IAAQC,E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EAAO;AAAA,gBAClB,UAAU,CAACtB;AAAA,gBACX,gBAAcV,MAAS;AAAA,gBACvB,SAAS,MAAMC,EAAQD,MAAS,OAAO,IAAI,IAAI;AAAA,gBAE9C,YAAE,gBAAgB;AAAA,cAAA;AAAA,YAAA;AAAA,UACpB,EAAA,CACD;AAAA,QAAA,GAEF;AAAA,QAECb,KAAU,gBAAA8C,EAAC,UAAA,EAAO,WAAWD,EAAO,QAAS,UAAA7C,EAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxD;"}
|
package/dist/ui/index.js
CHANGED
|
@@ -1,124 +1,133 @@
|
|
|
1
1
|
import { Accordion as e, AccordionContent as t, AccordionItem as p, AccordionTrigger as n } from "./accordion/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
2
|
+
import { AudioPlayer as i } from "./audio-player/index.js";
|
|
3
|
+
import { Button as d, buttonVariants as u } from "./button/index.js";
|
|
4
|
+
import { Calendar as x, CalendarDayButton as c } from "./calendar/index.js";
|
|
5
|
+
import { Card as D, CardAction as f, CardContent as S, CardDescription as T, CardFooter as C, CardHeader as w, CardTitle as M } from "./card/index.js";
|
|
6
|
+
import { ColorPicker as b } from "./color-picker/index.js";
|
|
7
|
+
import { ColorPickerToggle as F } from "./color-picker-toggle/index.js";
|
|
8
|
+
import { Combobox as s, matchComboboxOptions as v, normalizeComboboxText as A } from "./combobox/index.js";
|
|
9
|
+
import { Dialog as B, DialogClose as L, DialogContent as E, DialogDescription as R, DialogFooter as V, DialogHeader as k, DialogOverlay as O, DialogPortal as y, DialogTitle as H, DialogTrigger as _ } from "./dialog/index.js";
|
|
10
|
+
import { DropdownMenu as U, DropdownMenuCheckboxItem as W, DropdownMenuContent as Z, DropdownMenuGroup as j, DropdownMenuItem as q, DropdownMenuLabel as J, DropdownMenuPortal as K, DropdownMenuRadioGroup as N, DropdownMenuRadioItem as Q, DropdownMenuSeparator as X, DropdownMenuShortcut as Y, DropdownMenuSub as $, DropdownMenuSubContent as oo, DropdownMenuSubTrigger as ro, DropdownMenuTrigger as eo } from "./dropdown-menu/index.js";
|
|
11
|
+
import { Field as po, FieldContent as no, FieldDescription as lo, FieldError as io, FieldGroup as ao, FieldLabel as uo, FieldLegend as mo, FieldSeparator as xo, FieldSet as co, FieldTitle as go } from "./field/index.js";
|
|
12
|
+
import { FILE_VIEWER_ZOOM_STEPS as fo, FileViewer as So } from "./file-viewer/index.js";
|
|
13
|
+
import { Input as Co } from "./input/index.js";
|
|
14
|
+
import { InputGroup as Mo, InputGroupAddon as Io, InputGroupButton as bo, InputGroupInput as Po, InputGroupText as Fo, InputGroupTextarea as Go } from "./input-group/index.js";
|
|
15
|
+
import { Label as vo } from "./label/index.js";
|
|
16
|
+
import { MarkedText as ho } from "./marked-text/index.js";
|
|
17
|
+
import { Pill as Lo } from "./pill/index.js";
|
|
18
|
+
import { Popover as Ro, PopoverAnchor as Vo, PopoverContent as ko, PopoverDescription as Oo, PopoverHeader as yo, PopoverTitle as Ho, PopoverTrigger as _o } from "./popover/index.js";
|
|
19
|
+
import { RadioGroup as Uo, RadioGroupItem as Wo } from "./radio-group/index.js";
|
|
20
|
+
import { ScrollArea as jo, ScrollBar as qo } from "./scroll-area/index.js";
|
|
21
|
+
import { Select as Ko, SelectContent as No, SelectGroup as Qo, SelectItem as Xo, SelectLabel as Yo, SelectScrollDownButton as $o, SelectScrollUpButton as or, SelectSeparator as rr, SelectTrigger as er, SelectValue as tr } from "./select/index.js";
|
|
22
|
+
import { Separator as nr } from "./separator/index.js";
|
|
23
|
+
import { Toaster as ir } from "./sonner/index.js";
|
|
24
|
+
import { Switch as dr } from "./switch/index.js";
|
|
25
|
+
import { Textarea as mr } from "./textarea/index.js";
|
|
26
|
+
import { ThemeSwitch as cr } from "./theme-switch/index.js";
|
|
27
|
+
import { ThemeToggle as Dr } from "./theme-toggle/index.js";
|
|
28
|
+
import { Toggle as Sr, toggleVariants as Tr } from "./toggle/index.js";
|
|
29
|
+
import { Tooltip as wr, TooltipContent as Mr, TooltipProvider as Ir, TooltipTrigger as br } from "./tooltip/index.js";
|
|
27
30
|
export {
|
|
28
31
|
e as Accordion,
|
|
29
32
|
t as AccordionContent,
|
|
30
33
|
p as AccordionItem,
|
|
31
34
|
n as AccordionTrigger,
|
|
32
|
-
i as
|
|
33
|
-
|
|
35
|
+
i as AudioPlayer,
|
|
36
|
+
d as Button,
|
|
37
|
+
x as Calendar,
|
|
34
38
|
c as CalendarDayButton,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
39
|
+
D as Card,
|
|
40
|
+
f as CardAction,
|
|
41
|
+
S as CardContent,
|
|
42
|
+
T as CardDescription,
|
|
43
|
+
C as CardFooter,
|
|
44
|
+
w as CardHeader,
|
|
45
|
+
M as CardTitle,
|
|
46
|
+
b as ColorPicker,
|
|
47
|
+
F as ColorPickerToggle,
|
|
48
|
+
s as Combobox,
|
|
49
|
+
B as Dialog,
|
|
50
|
+
L as DialogClose,
|
|
51
|
+
E as DialogContent,
|
|
52
|
+
R as DialogDescription,
|
|
53
|
+
V as DialogFooter,
|
|
54
|
+
k as DialogHeader,
|
|
55
|
+
O as DialogOverlay,
|
|
56
|
+
y as DialogPortal,
|
|
57
|
+
H as DialogTitle,
|
|
58
|
+
_ as DialogTrigger,
|
|
59
|
+
U as DropdownMenu,
|
|
60
|
+
W as DropdownMenuCheckboxItem,
|
|
61
|
+
Z as DropdownMenuContent,
|
|
62
|
+
j as DropdownMenuGroup,
|
|
63
|
+
q as DropdownMenuItem,
|
|
64
|
+
J as DropdownMenuLabel,
|
|
65
|
+
K as DropdownMenuPortal,
|
|
66
|
+
N as DropdownMenuRadioGroup,
|
|
67
|
+
Q as DropdownMenuRadioItem,
|
|
68
|
+
X as DropdownMenuSeparator,
|
|
69
|
+
Y as DropdownMenuShortcut,
|
|
70
|
+
$ as DropdownMenuSub,
|
|
71
|
+
oo as DropdownMenuSubContent,
|
|
72
|
+
ro as DropdownMenuSubTrigger,
|
|
73
|
+
eo as DropdownMenuTrigger,
|
|
74
|
+
fo as FILE_VIEWER_ZOOM_STEPS,
|
|
75
|
+
po as Field,
|
|
76
|
+
no as FieldContent,
|
|
77
|
+
lo as FieldDescription,
|
|
78
|
+
io as FieldError,
|
|
79
|
+
ao as FieldGroup,
|
|
80
|
+
uo as FieldLabel,
|
|
81
|
+
mo as FieldLegend,
|
|
82
|
+
xo as FieldSeparator,
|
|
83
|
+
co as FieldSet,
|
|
84
|
+
go as FieldTitle,
|
|
85
|
+
So as FileViewer,
|
|
86
|
+
Co as Input,
|
|
87
|
+
Mo as InputGroup,
|
|
88
|
+
Io as InputGroupAddon,
|
|
89
|
+
bo as InputGroupButton,
|
|
90
|
+
Po as InputGroupInput,
|
|
91
|
+
Fo as InputGroupText,
|
|
92
|
+
Go as InputGroupTextarea,
|
|
93
|
+
vo as Label,
|
|
94
|
+
ho as MarkedText,
|
|
95
|
+
Lo as Pill,
|
|
96
|
+
Ro as Popover,
|
|
97
|
+
Vo as PopoverAnchor,
|
|
98
|
+
ko as PopoverContent,
|
|
99
|
+
Oo as PopoverDescription,
|
|
100
|
+
yo as PopoverHeader,
|
|
101
|
+
Ho as PopoverTitle,
|
|
102
|
+
_o as PopoverTrigger,
|
|
103
|
+
Uo as RadioGroup,
|
|
104
|
+
Wo as RadioGroupItem,
|
|
105
|
+
jo as ScrollArea,
|
|
106
|
+
qo as ScrollBar,
|
|
107
|
+
Ko as Select,
|
|
108
|
+
No as SelectContent,
|
|
109
|
+
Qo as SelectGroup,
|
|
110
|
+
Xo as SelectItem,
|
|
111
|
+
Yo as SelectLabel,
|
|
112
|
+
$o as SelectScrollDownButton,
|
|
113
|
+
or as SelectScrollUpButton,
|
|
114
|
+
rr as SelectSeparator,
|
|
115
|
+
er as SelectTrigger,
|
|
116
|
+
tr as SelectValue,
|
|
117
|
+
nr as Separator,
|
|
118
|
+
dr as Switch,
|
|
119
|
+
mr as Textarea,
|
|
120
|
+
cr as ThemeSwitch,
|
|
121
|
+
Dr as ThemeToggle,
|
|
122
|
+
ir as Toaster,
|
|
123
|
+
Sr as Toggle,
|
|
124
|
+
wr as Tooltip,
|
|
125
|
+
Mr as TooltipContent,
|
|
126
|
+
Ir as TooltipProvider,
|
|
127
|
+
br as TooltipTrigger,
|
|
128
|
+
u as buttonVariants,
|
|
129
|
+
v as matchComboboxOptions,
|
|
130
|
+
A as normalizeComboboxText,
|
|
131
|
+
Tr as toggleVariants
|
|
123
132
|
};
|
|
124
133
|
//# sourceMappingURL=index.js.map
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|