@vamos-ui/react 0.4.0 → 0.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 +4 -0
- package/dist/blocks/block-heading.js +1 -1
- package/dist/blocks/block-link.js +1 -1
- package/dist/blocks/index.d.ts +3 -3
- package/dist/blocks/index.js +3 -3
- package/dist/blocks/labels.d.ts +8 -0
- package/dist/blocks/labels.js +60 -0
- package/dist/blocks/section-header.js +1 -1
- package/dist/blocks/section.js +2 -2
- package/dist/blocks/site/feature-tabs.js +1 -1
- package/dist/blocks/site/footer.d.ts +10 -1
- package/dist/blocks/site/footer.js +28 -4
- package/dist/blocks/site/registry-2.js +3 -1
- package/dist/blocks/site/shared/labels-2.d.ts +8 -0
- package/dist/blocks/site/shared/labels-2.js +808 -0
- package/dist/blocks/site/site-shell.js +3 -3
- package/dist/business/approval-flow.js +2 -2
- package/dist/business/import-wizard.js +1 -1
- package/dist/business/line-items.js +1 -1
- package/dist/business/multi-step-form.js +2 -2
- package/dist/business/permission-matrix.js +1 -1
- package/dist/business/setup-checklist.js +2 -2
- package/dist/business/signer-status.js +1 -1
- package/dist/charts/bar-list.js +1 -1
- package/dist/charts/chart-shell.js +1 -1
- package/dist/charts/donut-chart.js +1 -1
- package/dist/charts/funnel.js +1 -1
- package/dist/charts/gauge.js +2 -2
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +8 -8
- package/dist/components/activity-timeline.js +6 -6
- package/dist/components/address-field.js +3 -3
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +8 -8
- package/dist/components/alert.js +2 -2
- package/dist/components/app-shell.js +3 -3
- package/dist/components/aspect-ratio.js +2 -2
- package/dist/components/attachment-list.js +2 -2
- package/dist/components/audit-log.js +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/backup-codes.js +1 -1
- package/dist/components/badge.js +3 -3
- package/dist/components/breadcrumb.js +10 -9
- package/dist/components/button-group.js +4 -4
- package/dist/components/button.js +4 -4
- package/dist/components/calendar.js +5 -5
- package/dist/components/card.js +8 -8
- package/dist/components/carousel.js +9 -9
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +6 -6
- package/dist/components/collapsible.d.ts +1 -1
- package/dist/components/collapsible.js +4 -4
- package/dist/components/color-picker.js +3 -3
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +9 -9
- package/dist/components/comment-thread.js +3 -3
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +9 -9
- package/dist/components/currency-input.js +1 -1
- package/dist/components/date-picker.js +2 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/description-list.js +2 -2
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +9 -9
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +9 -9
- package/dist/components/editor-layout.js +9 -9
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entity-card.js +1 -1
- package/dist/components/file-upload.js +5 -5
- package/dist/components/formatted-input.js +3 -3
- package/dist/components/hierarchy-chart.js +1 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +3 -3
- package/dist/components/iban-input.js +1 -1
- package/dist/components/id-input.js +3 -3
- package/dist/components/image.js +5 -5
- package/dist/components/input-otp.js +6 -6
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +6 -6
- package/dist/components/item.js +4 -4
- package/dist/components/kbd.js +3 -3
- package/dist/components/list-layout.js +9 -9
- package/dist/components/menubar.d.ts +1 -1
- package/dist/components/menubar.js +12 -12
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu.js +12 -11
- package/dist/components/notification-center.js +4 -4
- package/dist/components/page-header.js +3 -3
- package/dist/components/pagination.js +9 -9
- package/dist/components/phone-input.js +1 -1
- package/dist/components/pin-map.js +1 -1
- package/dist/components/placeholder-art.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +3 -3
- package/dist/components/qr-code.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +4 -4
- package/dist/components/record-detail-layout.js +10 -10
- package/dist/components/record-picker.js +2 -2
- package/dist/components/resizable.js +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area.js +4 -4
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +10 -10
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/settings-layout.js +6 -6
- package/dist/components/sheet.js +3 -3
- package/dist/components/sidebar.js +12 -11
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/skeleton.js +5 -5
- package/dist/components/sla-timer.js +2 -2
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/slug-input.js +1 -1
- package/dist/components/sparkline.js +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/stat.js +5 -5
- package/dist/components/status-picker.js +2 -2
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +3 -3
- package/dist/components/table.js +10 -10
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +11 -11
- package/dist/components/tag-input.js +1 -1
- package/dist/components/task-list.js +1 -1
- package/dist/components/time-picker.js +3 -3
- package/dist/components/toggle.d.ts +2 -1
- package/dist/components/toggle.js +7 -6
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +5 -4
- package/dist/components/top-bar.js +4 -4
- package/dist/components/tour.js +1 -1
- package/dist/components/tree-select.js +2 -2
- package/dist/components/tree-view.js +3 -3
- package/dist/components/typography.js +11 -11
- package/dist/components/user-picker.js +2 -2
- package/dist/components/version-history.js +3 -3
- package/dist/data-table/data-table.js +1 -1
- package/dist/data-table/filter-bar.js +2 -2
- package/dist/data-table/index.d.ts +15 -8
- package/dist/data-table/index.js +9 -8
- package/dist/data-table/saved-views.js +1 -1
- package/dist/editor/block-editor.js +1 -1
- package/dist/editor/context.js +1 -1
- package/dist/editor/menus.js +1 -1
- package/dist/fonts/font-picker.js +3 -3
- package/dist/fonts/pairing-picker.js +1 -1
- package/dist/fonts/provider.js +1 -1
- package/dist/index.d.ts +188 -94
- package/dist/index.js +94 -94
- package/dist/lib/data-islands.js +1 -1
- package/dist/lib/field-context.js +1 -1
- package/dist/lib/floating-arrow.js +1 -1
- package/dist/lib/islands.js +1 -1
- package/dist/lib/layer.js +3 -3
- package/dist/lib/locale.js +2 -2
- package/dist/lib/menu.js +2 -2
- package/dist/lib/provider.js +4 -4
- package/dist/lib/theme-scope.js +4 -3
- package/dist/lib/variants.js +2 -2
- package/dist/media/focal-point.js +1 -1
- package/dist/media/gallery.js +1 -1
- package/dist/media/image-cropper.js +1 -1
- package/dist/media/image-field.js +2 -2
- package/dist/media/lightbox.js +4 -3
- package/dist/media/link-preview.js +3 -3
- package/dist/media/media-library.js +3 -3
- package/dist/media/media-picker.js +1 -1
- package/dist/media/media-provider.js +1 -1
- package/dist/media/video-player.js +4 -4
- package/dist/motion/count-up.js +1 -1
- package/dist/motion/motion-scope.js +2 -2
- package/dist/motion/page-transition.js +1 -1
- package/dist/motion/parallax.js +2 -2
- package/dist/motion/pointer.js +3 -3
- package/dist/motion/reveal.js +3 -3
- package/dist/motion/skeleton-swap.js +1 -1
- package/dist/motion/text-reveal.js +1 -1
- package/dist/motion/ticker.js +1 -1
- package/dist/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/scheduler/gantt.js +2 -2
- package/dist/scheduler/resource-calendar.js +2 -2
- package/dist/scheduler/scheduler.js +3 -3
- package/dist/scheduler/time-tracker.js +4 -4
- package/dist/sortable/kanban.js +2 -2
- package/dist/sortable/sortable-list.js +2 -2
- package/dist/sortable/sortable.js +4 -4
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import { isBuiltInAccent, siteAccent, siteAccentCss, siteAccentKey } from "./sha
|
|
|
8
8
|
import { motionAllowed } from "../../motion/core.js";
|
|
9
9
|
import { startPageTransition, viewTransitionsSupported } from "../../motion/page-transition.js";
|
|
10
10
|
import { parseSiteHref, readSiteLocation, sitePageHref, writeSiteLocation } from "./shared/site-routing.js";
|
|
11
|
-
const SiteShellContext = React.createContext(null);
|
|
11
|
+
const SiteShellContext = /*#__PURE__*/ React.createContext(null);
|
|
12
12
|
/** Page, locale and navigation of the closest Site shell. Throws outside one. */
|
|
13
13
|
export function useSiteShell() {
|
|
14
14
|
const ctx = React.useContext(SiteShellContext);
|
|
@@ -34,7 +34,7 @@ export function useSiteShell() {
|
|
|
34
34
|
* </SiteShell>
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export const SiteShell = React.forwardRef(function SiteShell({ accent, accentDark, font, material, density, theme, dir, locales = ["en", "tr"], locale: localeProp, defaultLocale, onLocaleChange, pages = ["home"], page: pageProp, defaultPage, onPageChange, routing = "search", pageParam = "page", localeParam = "lang", motion = "subtle", className, onClick, children, ...props }, ref) {
|
|
37
|
+
export const SiteShell = /*#__PURE__*/ React.forwardRef(function SiteShell({ accent, accentDark, font, material, density, theme, dir, locales = ["en", "tr"], locale: localeProp, defaultLocale, onLocaleChange, pages = ["home"], page: pageProp, defaultPage, onPageChange, routing = "search", pageParam = "page", localeParam = "lang", motion = "subtle", className, onClick, children, ...props }, ref) {
|
|
38
38
|
const homeLocale = defaultLocale ?? locales[0] ?? "en";
|
|
39
39
|
const homePage = defaultPage ?? pages[0] ?? "home";
|
|
40
40
|
const [locale, setLocale] = useControllableState({ value: localeProp, defaultValue: homeLocale, onChange: onLocaleChange, name: "SiteShell" });
|
|
@@ -248,7 +248,7 @@ export function SiteShellLocale({ code, children }) {
|
|
|
248
248
|
* A link to an inner page for client code. Server components can use a plain
|
|
249
249
|
* `href={sitePageHref("pricing")}` instead; the shell handles both.
|
|
250
250
|
*/
|
|
251
|
-
export const SiteShellLink = React.forwardRef(function SiteShellLink({ page, anchor, ...props }, ref) {
|
|
251
|
+
export const SiteShellLink = /*#__PURE__*/ React.forwardRef(function SiteShellLink({ page, anchor, ...props }, ref) {
|
|
252
252
|
const { hrefFor, page: current } = useSiteShell();
|
|
253
253
|
return _jsx("a", { ref: ref, href: hrefFor(page, anchor), "aria-current": !anchor && current === page ? "page" : undefined, ...props });
|
|
254
254
|
});
|
|
@@ -110,7 +110,7 @@ function groupStatus(g) {
|
|
|
110
110
|
* <ApprovalFlow requester={{ name: "Deniz Aydın", at: "2026-11-03T09:12:00Z" }} stages={stages} />
|
|
111
111
|
* ```
|
|
112
112
|
*/
|
|
113
|
-
export const ApprovalFlow = React.forwardRef(function ApprovalFlow({ stages, requester, orientation = "vertical", variant = "full", now, labels, className, ...props }, ref) {
|
|
113
|
+
export const ApprovalFlow = /*#__PURE__*/ React.forwardRef(function ApprovalFlow({ stages, requester, orientation = "vertical", variant = "full", now, labels, className, ...props }, ref) {
|
|
114
114
|
const t = useLabels("approvalFlow", approvalFlowLabels, labels);
|
|
115
115
|
if (variant === "compact")
|
|
116
116
|
return _jsx(ApprovalSummary, { stages: stages, labels: labels, className: className });
|
|
@@ -153,7 +153,7 @@ function ApproverRow({ approver: a, t, stageActive }) {
|
|
|
153
153
|
return (_jsxs("li", { className: "flex min-w-0 gap-2.5", "data-slot": "approval-approver", "data-decision": d?.value, children: [_jsx(Avatar, { name: a.name, src: a.avatarUrl, size: "sm" }), _jsxs("div", { className: "min-w-0 flex-1 text-[13px] leading-snug", children: [_jsxs("p", { className: "flex flex-wrap items-baseline gap-x-1.5", children: [_jsx("span", { className: "font-medium text-fg", children: a.name }), a.role ? _jsx("span", { className: "text-xs text-fg-subtle", children: a.role }) : null, d?.delegatedFrom ? (_jsxs(Badge, { tone: "info", size: "sm", children: [_jsx(Forward, {}), " ", t("delegated")] })) : null] }), d ? (_jsxs("p", { className: "mt-0.5 text-xs text-fg-muted", children: [_jsx("span", { className: cn("font-medium", decisionTone), children: decisionWord(t, d.value) }), " ", _jsx("time", { dateTime: d.at, className: "tabular", children: format.dateTime(d.at, { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }) }), d.delegatedFrom ? _jsxs(_Fragment, { children: [" \u00B7 ", t("delegatedFrom", { name: d.delegatedFrom.name })] }) : null] })) : (_jsx("p", { className: "mt-0.5 text-xs text-fg-subtle", children: stageActive ? t("pending") : "—" })), d?.note ? (_jsx("blockquote", { className: "mt-1.5 rounded-ui-sm border-s-2 border-(--q) bg-surface-2 px-2.5 py-1.5 text-[13px] text-fg [--q:var(--line)] data-[v=rejected]:[--q:var(--danger)] data-[v=changes_requested]:[--q:var(--warning)]", "data-v": d.value, children: d.note })) : null] })] }));
|
|
154
154
|
}
|
|
155
155
|
/** Inline status for table rows: one dot per stage + "2 of 3 approved". */
|
|
156
|
-
export const ApprovalSummary = React.forwardRef(function ApprovalSummary({ stages, showCurrent = true, labels, className, ...props }, ref) {
|
|
156
|
+
export const ApprovalSummary = /*#__PURE__*/ React.forwardRef(function ApprovalSummary({ stages, showCurrent = true, labels, className, ...props }, ref) {
|
|
157
157
|
const t = useLabels("approvalFlow", approvalFlowLabels, labels);
|
|
158
158
|
const counted = stages.filter((s) => s.status !== "skipped");
|
|
159
159
|
const done = counted.filter((s) => s.status === "approved").length;
|
|
@@ -111,7 +111,7 @@ const DEFAULT_LOCALES = [
|
|
|
111
111
|
* <ImportWizard fields={contactFields} dedupeKeys={["email"]} onImport={(rows, { signal }) => api.contacts.bulk(rows, { signal })} />
|
|
112
112
|
* ```
|
|
113
113
|
*/
|
|
114
|
-
export const ImportWizard = React.forwardRef(function ImportWizard({ fields, dedupeKeys, maxRows = 50_000, maxSize = 20 * 1024 * 1024, chunkSize = 200, onImport, templates, sampleFile, fileLocales, onDone, previewLimit = 200, labels, className, ...props }, ref) {
|
|
114
|
+
export const ImportWizard = /*#__PURE__*/ React.forwardRef(function ImportWizard({ fields, dedupeKeys, maxRows = 50_000, maxSize = 20 * 1024 * 1024, chunkSize = 200, onImport, templates, sampleFile, fileLocales, onDone, previewLimit = 200, labels, className, ...props }, ref) {
|
|
115
115
|
const t = useLabels("importWizard", importWizardLabels, labels);
|
|
116
116
|
const { locale, format } = useLocale();
|
|
117
117
|
const [step, setStep] = React.useState("upload");
|
|
@@ -278,7 +278,7 @@ function LineItemsInner(props, ref) {
|
|
|
278
278
|
* <LineItems currency="TRY" taxPack={trLineTaxPack()} units={["hour", "day", "pcs"]} defaultValue={rows} onValueChange={(rows, totals) => save(rows, totals.payable)} />
|
|
279
279
|
* ```
|
|
280
280
|
*/
|
|
281
|
-
export const LineItems = React.forwardRef(LineItemsInner);
|
|
281
|
+
export const LineItems = /*#__PURE__*/ React.forwardRef(LineItemsInner);
|
|
282
282
|
/* ------------------------------------------------------------------ */
|
|
283
283
|
/* Summary */
|
|
284
284
|
/* ------------------------------------------------------------------ */
|
|
@@ -28,7 +28,7 @@ export const multiStepFormLabels = {
|
|
|
28
28
|
review: "Review",
|
|
29
29
|
leave: "You have unsaved changes. Leave anyway?",
|
|
30
30
|
};
|
|
31
|
-
const MultiStepFormContext = React.createContext(null);
|
|
31
|
+
const MultiStepFormContext = /*#__PURE__*/ React.createContext(null);
|
|
32
32
|
function useCtx(part) {
|
|
33
33
|
const ctx = React.useContext(MultiStepFormContext);
|
|
34
34
|
if (!ctx)
|
|
@@ -262,7 +262,7 @@ function MultiStepFormInner(props, ref) {
|
|
|
262
262
|
* </MultiStepForm>
|
|
263
263
|
* ```
|
|
264
264
|
*/
|
|
265
|
-
export const MultiStepForm = React.forwardRef(MultiStepFormInner);
|
|
265
|
+
export const MultiStepForm = /*#__PURE__*/ React.forwardRef(MultiStepFormInner);
|
|
266
266
|
/** The progress display (kit `Stepper`), wired to the form: completed steps are clickable. */
|
|
267
267
|
export function MultiStepFormStepper({ variant = "numbered", className }) {
|
|
268
268
|
const c = useCtx("MultiStepFormStepper");
|
|
@@ -67,7 +67,7 @@ const levelLabel = (t, v, scoped, scopeNames) => {
|
|
|
67
67
|
* inherited={manager} inheritedFrom="Manager" baseline={saved} onSave={save} dependencies={[{ action: "edit", requires: "view" }]} />
|
|
68
68
|
* ```
|
|
69
69
|
*/
|
|
70
|
-
export const PermissionMatrix = React.forwardRef(function PermissionMatrix({ resources, actions, scopes, value: valueProp, defaultValue, onValueChange, inherited, inheritedFrom = "parent role", baseline, onSave, subject = "this role", readOnly, dependencies, onDependencyApplied, maxHeight, labels, className, ...props }, ref) {
|
|
70
|
+
export const PermissionMatrix = /*#__PURE__*/ React.forwardRef(function PermissionMatrix({ resources, actions, scopes, value: valueProp, defaultValue, onValueChange, inherited, inheritedFrom = "parent role", baseline, onSave, subject = "this role", readOnly, dependencies, onDependencyApplied, maxHeight, labels, className, ...props }, ref) {
|
|
71
71
|
const t = useLabels("permissionMatrix", permissionMatrixLabels, labels);
|
|
72
72
|
const [value, setValueState] = useControllableState({ value: valueProp, defaultValue: defaultValue ?? {} });
|
|
73
73
|
const [collapsed, setCollapsed] = React.useState(() => new Set());
|
|
@@ -44,7 +44,7 @@ function counts(items) {
|
|
|
44
44
|
* {hidden ? <SetupChecklistLauncher items={steps} onOpen={() => setHidden(false)} /> : null}
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export const SetupChecklist = React.forwardRef(function SetupChecklist({ title, description, items, onSkip, onUndoSkip, dismissed, onDismissedChange, variant = "card", expandFirstIncomplete = true, onAllDone, loading, labels, className, ...props }, ref) {
|
|
47
|
+
export const SetupChecklist = /*#__PURE__*/ React.forwardRef(function SetupChecklist({ title, description, items, onSkip, onUndoSkip, dismissed, onDismissedChange, variant = "card", expandFirstIncomplete = true, onAllDone, loading, labels, className, ...props }, ref) {
|
|
48
48
|
const t = useLabels("setupChecklist", setupChecklistLabels, labels);
|
|
49
49
|
const { done, total, allDone } = counts(items);
|
|
50
50
|
const firstOpen = items.find((i) => (i.status === "todo" || i.status === "in_progress") && !i.locked)?.id;
|
|
@@ -85,7 +85,7 @@ function SetupChecklistItem({ item, index, open, current, onToggle, onSkip, onUn
|
|
|
85
85
|
return (_jsxs("li", { "data-slot": "setup-checklist-item", "data-status": item.status, "data-current": current && !finished ? "" : undefined, className: cn("vui-setup-item rounded-ui transition-colors", current && !finished && !compact && "bg-accent-soft/50"), children: [_jsx("h3", { className: "m-0 text-inherit font-normal", children: _jsxs("button", { type: "button", "aria-expanded": hasDetails ? open : undefined, "aria-controls": hasDetails ? panelId : undefined, onClick: hasDetails ? onToggle : undefined, className: cn("focus-ring flex w-full items-center gap-3 rounded-ui text-start", compact ? "px-1 py-1.5" : "px-2.5 py-2.5", hasDetails && "hover:bg-hover"), children: [_jsx(StatusMark, { status: item.status, locked: locked, index: index }), _jsxs("span", { className: cn("min-w-0 flex-1 text-sm", finished ? "text-fg-muted" : "text-fg", item.status === "done" && "line-through decoration-fg-subtle/60", item.status === "skipped" && "italic"), children: [item.title, _jsxs("span", { className: "sr-only", children: [", ", statusText] })] }), item.optional && !finished ? _jsx("span", { className: "text-[11px] text-fg-subtle", children: t("optional") }) : null, item.estimate && !finished && !compact ? _jsx("span", { className: "font-mono text-[11px] text-fg-subtle tabular", children: item.estimate }) : null, hasDetails ? _jsx(ChevronDown, { "aria-hidden": true, className: cn("size-4 shrink-0 text-fg-subtle transition-transform duration-200", open && "rotate-180") }) : null] }) }), hasDetails ? (_jsxs("div", { id: panelId, hidden: !open, className: cn("vui-setup-panel", compact ? "ps-8 pb-2" : "ps-[2.875rem] pe-3 pb-3"), children: [item.description ? _jsx("p", { className: "text-[13px] text-fg-muted", children: item.description }) : null, locked ? (_jsxs("p", { className: "mt-1.5 flex items-center gap-1.5 text-xs text-fg-subtle", children: [_jsx(Lock, { "aria-hidden": true, className: "size-3" }), " ", item.locked.reason] })) : null, _jsxs("div", { className: "mt-2.5 flex flex-wrap items-center gap-2 empty:hidden", children: [item.action && !finished ? (item.action.href ? (_jsx(Button, { asChild: true, size: "sm", variant: current ? "primary" : "secondary", disabled: locked, children: _jsxs(SmartLink, { href: item.action.href, children: [item.action.label, " ", _jsx(ArrowRight, { className: "rtl:rotate-180" })] }) })) : (_jsxs(Button, { size: "sm", variant: current ? "primary" : "secondary", disabled: locked, onClick: item.action.onSelect, children: [item.action.label, " ", _jsx(ArrowRight, { className: "rtl:rotate-180" })] }))) : null, !finished && onSkip ? (_jsx(Button, { size: "sm", variant: "ghost", onClick: () => onSkip(item.id), children: t("skip") })) : null, item.status === "skipped" && onUndoSkip ? (_jsxs(Button, { size: "sm", variant: "ghost", onClick: () => onUndoSkip(item.id), children: [_jsx(Undo2, {}), " ", t("undoSkip")] })) : null] })] })) : null] }));
|
|
86
86
|
}
|
|
87
87
|
/** A pill that reopens a dismissed checklist: "Setup guide · 3 of 6". */
|
|
88
|
-
export const SetupChecklistLauncher = React.forwardRef(function SetupChecklistLauncher({ items, onOpen, floating, labels, className, ...props }, ref) {
|
|
88
|
+
export const SetupChecklistLauncher = /*#__PURE__*/ React.forwardRef(function SetupChecklistLauncher({ items, onOpen, floating, labels, className, ...props }, ref) {
|
|
89
89
|
const t = useLabels("setupChecklist", setupChecklistLabels, labels);
|
|
90
90
|
const { done, total } = counts(items);
|
|
91
91
|
return (_jsxs("button", { ref: ref, type: "button", "data-slot": "setup-checklist-launcher", onClick: onOpen, className: cn("focus-ring inline-flex h-9 items-center gap-2 rounded-full surface-popover ps-1.5 pe-3.5 text-[13px] font-medium text-fg transition-[transform,box-shadow] duration-150 motion-safe:hover:-translate-y-px", floating && "fixed end-5 bottom-5 z-40", className), ...props, children: [_jsx(ProgressCircle, { value: total ? (done / total) * 100 : 0, size: "sm", "aria-hidden": true, className: "size-6" }), t("reopen", { done, total })] }));
|
|
@@ -44,7 +44,7 @@ const stateTone = {
|
|
|
44
44
|
* <SignerStatus sequential signers={contract.signers} onRemind={(s) => api.remind(s.id)} />
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export const SignerStatus = React.forwardRef(function SignerStatus({ signers, sequential, title, onRemind, now, labels, className, ...props }, ref) {
|
|
47
|
+
export const SignerStatus = /*#__PURE__*/ React.forwardRef(function SignerStatus({ signers, sequential, title, onRemind, now, labels, className, ...props }, ref) {
|
|
48
48
|
const t = useLabels("signerStatus", signerStatusLabels, labels);
|
|
49
49
|
const f = useFormat();
|
|
50
50
|
const titleId = React.useId();
|
package/dist/charts/bar-list.js
CHANGED
|
@@ -18,7 +18,7 @@ const textOf = (item) => item.textLabel ?? (typeof item.label === "string" ? ite
|
|
|
18
18
|
* <BarList aria-label="Top sources" data={[{ key: "google", label: "Google", value: 4120 }]} showShare />
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export const BarList = React.forwardRef(function BarList({ data, format = "number", color, max, sort = "desc", showShare, onItemClick, size = "md", variant = "filled", loading, loadingRows = 5, emptyMessage, labels, className, ...props }, ref) {
|
|
21
|
+
export const BarList = /*#__PURE__*/ React.forwardRef(function BarList({ data, format = "number", color, max, sort = "desc", showShare, onItemClick, size = "md", variant = "filled", loading, loadingRows = 5, emptyMessage, labels, className, ...props }, ref) {
|
|
22
22
|
const f = useFormat();
|
|
23
23
|
const { locale } = useLocale();
|
|
24
24
|
const t = useLabels("chart", chartLabels, labels);
|
|
@@ -29,7 +29,7 @@ export const chartLabels = {
|
|
|
29
29
|
range: "{from} – {to}.",
|
|
30
30
|
seriesSummary: "{label}: low {min} ({minAt}), high {max} ({maxAt}), average {avg}.",
|
|
31
31
|
};
|
|
32
|
-
const ChartContext = React.createContext(null);
|
|
32
|
+
const ChartContext = /*#__PURE__*/ React.createContext(null);
|
|
33
33
|
/** Chart context: config, formatters and hidden series. Use inside `<Chart>`. */
|
|
34
34
|
export function useChart() {
|
|
35
35
|
const ctx = React.useContext(ChartContext);
|
|
@@ -55,7 +55,7 @@ export function DonutChart({ data, nameKey, valueKey, config, center = "total",
|
|
|
55
55
|
const ctx = React.useMemo(() => ({ active, setActive, raw: slices }), [active, setActive, slices]);
|
|
56
56
|
return (_jsx(DonutContext.Provider, { value: ctx, children: _jsx(Chart, { ...props, data: slices, config: effectiveConfig, height: height, legend: "none", skeleton: "donut", summary: summaryText, table: table, state: props.state ?? (rows.length === 0 ? { status: "empty" } : undefined), aside: legend === "none" ? undefined : _jsx(DonutLegend, {}), asidePosition: legend === "bottom" ? "bottom" : "side", children: _jsx(DonutPlot, { px: px, height: height, variant: variant, center: center, centerLabel: centerLabel }) }) }));
|
|
57
57
|
}
|
|
58
|
-
const DonutContext = React.createContext(null);
|
|
58
|
+
const DonutContext = /*#__PURE__*/ React.createContext(null);
|
|
59
59
|
const useDonut = () => React.useContext(DonutContext);
|
|
60
60
|
function useSlices(slices) {
|
|
61
61
|
const chart = useChart();
|
package/dist/charts/funnel.js
CHANGED
|
@@ -26,7 +26,7 @@ export const funnelLabels = {
|
|
|
26
26
|
* <Funnel title="Sales pipeline" steps={[{ key: "leads", label: "Leads", value: 1240 }, …]} />
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export const Funnel = React.forwardRef(function Funnel({ steps, orientation = "horizontal", format = "integer", amountFormat = "currency", show = ["conversion", "dropoff"], color = "chart-1", compareTo, onStepClick, size = "md", loading, title, labels, className, style, ...props }, ref) {
|
|
29
|
+
export const Funnel = /*#__PURE__*/ React.forwardRef(function Funnel({ steps, orientation = "horizontal", format = "integer", amountFormat = "currency", show = ["conversion", "dropoff"], color = "chart-1", compareTo, onStepClick, size = "md", loading, title, labels, className, style, ...props }, ref) {
|
|
30
30
|
const f = useFormat();
|
|
31
31
|
const t = useLabels("funnel", funnelLabels, labels);
|
|
32
32
|
const first = steps[0]?.value ?? 0;
|
package/dist/charts/gauge.js
CHANGED
|
@@ -44,7 +44,7 @@ function a11yProps(semantic, value, max, valueText, label) {
|
|
|
44
44
|
* <ProgressRing value={85} aria-label="Profile completeness" format="percent" size="md" />
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export const ProgressRing = React.forwardRef(function ProgressRing({ value, max = 100, size = "md", thickness, color = "chart-1", thresholds, label, format, semantic = "progress", labels, className, style, "aria-label": ariaLabel, ...props }, ref) {
|
|
47
|
+
export const ProgressRing = /*#__PURE__*/ React.forwardRef(function ProgressRing({ value, max = 100, size = "md", thickness, color = "chart-1", thresholds, label, format, semantic = "progress", labels, className, style, "aria-label": ariaLabel, ...props }, ref) {
|
|
48
48
|
const px = typeof size === "number" ? size : SIZES[size];
|
|
49
49
|
const sw = thickness ?? Math.max(2.5, Math.round(px * 0.09 * 10) / 10);
|
|
50
50
|
const threshold = pickThreshold(value, thresholds);
|
|
@@ -64,7 +64,7 @@ export const ProgressRing = React.forwardRef(function ProgressRing({ value, max
|
|
|
64
64
|
* <Gauge value={64} aria-label="SEO score" semantic="meter" thresholds={[{ at: 0, color: "danger", label: "Poor" }, { at: 50, color: "warning", label: "Fair" }, { at: 80, color: "success", label: "Good" }]} color="auto" />
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
export const Gauge = React.forwardRef(function Gauge({ value, max = 100, size = "lg", thickness, color = "chart-1", thresholds, label, format, semantic = "meter", arc = 270, showThresholdBands, target, labels, className, style, "aria-label": ariaLabel, ...props }, ref) {
|
|
67
|
+
export const Gauge = /*#__PURE__*/ React.forwardRef(function Gauge({ value, max = 100, size = "lg", thickness, color = "chart-1", thresholds, label, format, semantic = "meter", arc = 270, showThresholdBands, target, labels, className, style, "aria-label": ariaLabel, ...props }, ref) {
|
|
68
68
|
const px = typeof size === "number" ? size : SIZES[size];
|
|
69
69
|
const sw = thickness ?? Math.max(3, Math.round(px * 0.075 * 10) / 10);
|
|
70
70
|
const threshold = pickThreshold(value, thresholds);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as RadixAccordion from "radix-ui/accordion";
|
|
3
3
|
type AccordionVariant = "plain" | "separated" | "card";
|
|
4
4
|
type AccordionSize = "sm" | "md";
|
|
5
5
|
type AccordionRootProps = React.ComponentPropsWithoutRef<typeof RadixAccordion.Root>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as RadixAccordion from "radix-ui/accordion";
|
|
5
5
|
import { ChevronDown } from "lucide-react";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
7
7
|
import { cn } from "../lib/cn.js";
|
|
8
|
-
const AccordionContext = React.createContext({
|
|
8
|
+
const AccordionContext = /*#__PURE__*/ React.createContext({
|
|
9
9
|
variant: "plain",
|
|
10
10
|
size: "md",
|
|
11
11
|
headingLevel: 3,
|
|
12
12
|
});
|
|
13
|
-
const rootVariants = cva("w-full", {
|
|
13
|
+
const rootVariants = /*#__PURE__*/ cva("w-full", {
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
16
|
/** Ruled list: hairlines between items. */
|
|
@@ -38,11 +38,11 @@ const rootVariants = cva("w-full", {
|
|
|
38
38
|
*
|
|
39
39
|
* Persisting the open sections is the consumer's job: control `value` and store it.
|
|
40
40
|
*/
|
|
41
|
-
export const Accordion = React.forwardRef(function Accordion({ variant = "plain", size = "md", headingLevel = 3, className, ...props }, ref) {
|
|
41
|
+
export const Accordion = /*#__PURE__*/ React.forwardRef(function Accordion({ variant = "plain", size = "md", headingLevel = 3, className, ...props }, ref) {
|
|
42
42
|
const ctx = React.useMemo(() => ({ variant, size, headingLevel }), [variant, size, headingLevel]);
|
|
43
43
|
return (_jsx(AccordionContext.Provider, { value: ctx, children: _jsx(RadixAccordion.Root, { ref: ref, "data-slot": "accordion", "data-variant": variant, className: cn(rootVariants({ variant }), className), ...props }) }));
|
|
44
44
|
});
|
|
45
|
-
const accordionItemVariants = cva("group/acc-item", {
|
|
45
|
+
const accordionItemVariants = /*#__PURE__*/ cva("group/acc-item", {
|
|
46
46
|
variants: {
|
|
47
47
|
variant: {
|
|
48
48
|
plain: "border-b border-line last:border-b-0",
|
|
@@ -52,19 +52,19 @@ const accordionItemVariants = cva("group/acc-item", {
|
|
|
52
52
|
},
|
|
53
53
|
});
|
|
54
54
|
/** One section. `value` identifies it; `disabled` locks it. */
|
|
55
|
-
export const AccordionItem = React.forwardRef(function AccordionItem({ className, ...props }, ref) {
|
|
55
|
+
export const AccordionItem = /*#__PURE__*/ React.forwardRef(function AccordionItem({ className, ...props }, ref) {
|
|
56
56
|
const { variant } = React.useContext(AccordionContext);
|
|
57
57
|
return _jsx(RadixAccordion.Item, { ref: ref, "data-slot": "accordion-item", className: cn(accordionItemVariants({ variant }), className), ...props });
|
|
58
58
|
});
|
|
59
59
|
const pad = { plain: "", separated: "px-4", card: "px-(--gap)" };
|
|
60
60
|
/** The section header: a heading with the toggle button (and optional actions beside it). */
|
|
61
|
-
export const AccordionTrigger = React.forwardRef(function AccordionTrigger({ icon, meta, actions, className, children, ...props }, ref) {
|
|
61
|
+
export const AccordionTrigger = /*#__PURE__*/ React.forwardRef(function AccordionTrigger({ icon, meta, actions, className, children, ...props }, ref) {
|
|
62
62
|
const { variant, size, headingLevel } = React.useContext(AccordionContext);
|
|
63
63
|
const Heading = `h${headingLevel}`;
|
|
64
64
|
return (_jsx(RadixAccordion.Header, { asChild: true, children: _jsxs(Heading, { "data-slot": "accordion-header", className: cn("flex items-center gap-1", pad[variant], actions && "pe-2"), children: [_jsxs(RadixAccordion.Trigger, { ref: ref, "data-slot": "accordion-trigger", className: cn("group/acc flex min-w-0 flex-1 items-center gap-3 rounded-ui-sm text-start font-medium text-fg outline-none transition-colors focus-ring", "disabled:cursor-not-allowed disabled:opacity-45", "hover:[&_[data-slot=accordion-title]]:underline hover:[&_[data-slot=accordion-title]]:decoration-line hover:[&_[data-slot=accordion-title]]:underline-offset-4", size === "sm" ? "py-2.5 text-[13px] [&_svg]:size-3.5" : "py-3.5 text-sm [&_svg]:size-4", variant === "plain" && (size === "sm" ? "py-2" : "py-3"), className), ...props, children: [icon ? _jsx("span", { "aria-hidden": true, className: "inline-flex shrink-0 text-fg-muted [&_svg]:shrink-0", children: icon }) : null, _jsx("span", { "data-slot": "accordion-title", className: "min-w-0 flex-1 text-pretty", children: children }), meta ? _jsx("span", { className: "sr-only", children: ", " }) : null, meta ? (_jsx("span", { "data-slot": "accordion-meta", className: "tabular shrink-0 truncate text-[13px] font-normal text-fg-subtle", children: meta })) : null, _jsx(ChevronDown, { "aria-hidden": true, className: "shrink-0 text-fg-subtle transition-transform duration-200 motion-reduce:transition-none group-data-[state=open]/acc:rotate-180" })] }), actions ? (_jsx("span", { "data-slot": "accordion-actions", className: "flex shrink-0 items-center gap-0.5", children: actions })) : null] }) }));
|
|
65
65
|
});
|
|
66
66
|
/** The collapsible body. Animates its height (`ui-collapse`, reduced-motion safe). */
|
|
67
|
-
export const AccordionContent = React.forwardRef(function AccordionContent({ className, children, ...props }, ref) {
|
|
67
|
+
export const AccordionContent = /*#__PURE__*/ React.forwardRef(function AccordionContent({ className, children, ...props }, ref) {
|
|
68
68
|
const { variant, size } = React.useContext(AccordionContext);
|
|
69
69
|
return (_jsx(RadixAccordion.Content, { ref: ref, "data-slot": "accordion-content", className: "ui-collapse", ...props, children: _jsx("div", { className: cn("text-fg-muted", size === "sm" ? "pb-3 text-[13px]" : "pb-4 text-sm leading-relaxed", pad[variant], className), children: children }) }));
|
|
70
70
|
});
|
|
@@ -13,20 +13,20 @@ export { RelativeTime } from "../lib/data-islands.js";
|
|
|
13
13
|
* Composable timeline (`<ol>`). For data use `ActivityTimeline`; compose these parts for
|
|
14
14
|
* custom rows: `Timeline › TimelineGroup › TimelineItem › TimelineIndicator + TimelineContent`.
|
|
15
15
|
*/
|
|
16
|
-
export const Timeline = React.forwardRef(function Timeline({ variant = "feed", density = "inherit", className, ...props }, ref) {
|
|
16
|
+
export const Timeline = /*#__PURE__*/ React.forwardRef(function Timeline({ variant = "feed", density = "inherit", className, ...props }, ref) {
|
|
17
17
|
return (_jsx("ol", { ref: ref, "data-slot": "timeline", "data-variant": variant, "data-density": density === "inherit" ? undefined : density, className: cn("group/timeline m-0 grid list-none gap-(--tl-gap) p-0 [--tl-gap:calc(var(--row-h)*0.3)] [--tl-ind:1.75rem]", "data-[density=compact]:[--tl-ind:1.5rem] [[data-density=compact]_&]:[--tl-ind:1.5rem]", className), ...props }));
|
|
18
18
|
});
|
|
19
19
|
/** A labelled section (a day). Children are TimelineItems. */
|
|
20
|
-
export const TimelineGroup = React.forwardRef(function TimelineGroup({ date, label, now, labels, className, children, ...props }, ref) {
|
|
20
|
+
export const TimelineGroup = /*#__PURE__*/ React.forwardRef(function TimelineGroup({ date, label, now, labels, className, children, ...props }, ref) {
|
|
21
21
|
const id = React.useId();
|
|
22
22
|
return (_jsxs("li", { ref: ref, "data-slot": "timeline-group", "aria-labelledby": id, className: cn("grid gap-(--tl-gap)", className), ...props, children: [_jsxs("div", { id: id, className: "flex items-center gap-3 font-mono text-[11px] font-medium tracking-[0.06em] text-fg-subtle", children: [_jsx("span", { className: "shrink-0", children: label ?? (date ? _jsx(TimelineDayLabel, { date: date, now: now, labels: labels }) : null) }), _jsx("span", { "aria-hidden": true, className: "h-px flex-1 bg-line" })] }), _jsx("ol", { className: "m-0 grid list-none gap-(--tl-gap) p-0", children: children })] }));
|
|
23
23
|
});
|
|
24
|
-
export const TimelineItem = React.forwardRef(function TimelineItem({ status, highlight, className, ...props }, ref) {
|
|
24
|
+
export const TimelineItem = /*#__PURE__*/ React.forwardRef(function TimelineItem({ status, highlight, className, ...props }, ref) {
|
|
25
25
|
return (_jsx("li", { ref: ref, "data-slot": "timeline-item", "data-status": status, "data-highlight": highlight ? "" : undefined, "aria-current": status === "current" ? "step" : undefined, className: cn("relative grid grid-cols-[var(--tl-ind)_minmax(0,1fr)] gap-x-3",
|
|
26
26
|
// connector from below this indicator to the next one (start side, RTL-aware)
|
|
27
27
|
"before:absolute before:start-[calc(var(--tl-ind)/2-0.5px)] before:top-[calc(var(--tl-ind)+0.25rem)] before:-bottom-[calc(var(--tl-gap)-0.25rem)] before:w-px before:bg-line last:before:hidden", "data-[status=upcoming]:before:w-0 data-[status=upcoming]:before:border-s data-[status=upcoming]:before:border-dashed data-[status=upcoming]:before:border-line data-[status=upcoming]:before:bg-transparent", "data-[status=current]:before:w-0 data-[status=current]:before:border-s data-[status=current]:before:border-dashed data-[status=current]:before:border-line data-[status=current]:before:bg-transparent", className), ...props }));
|
|
28
28
|
});
|
|
29
|
-
const indicatorVariants = cva("relative z-[1] grid size-(--tl-ind) shrink-0 place-items-center rounded-full border text-fg-muted [&_svg]:size-[calc(var(--tl-ind)*0.5)] [&_svg]:shrink-0", {
|
|
29
|
+
const indicatorVariants = /*#__PURE__*/ cva("relative z-[1] grid size-(--tl-ind) shrink-0 place-items-center rounded-full border text-fg-muted [&_svg]:size-[calc(var(--tl-ind)*0.5)] [&_svg]:shrink-0", {
|
|
30
30
|
variants: {
|
|
31
31
|
tone: {
|
|
32
32
|
neutral: "border-line bg-[color-mix(in_oklch,var(--surface)_90%,var(--scene))]",
|
|
@@ -70,7 +70,7 @@ export function TimelineActions({ className, ...props }) {
|
|
|
70
70
|
return _jsx("div", { "data-slot": "timeline-actions", className: cn("mt-2 flex flex-wrap items-center gap-1.5", className), ...props });
|
|
71
71
|
}
|
|
72
72
|
/** "3 new updates" pill for live feeds: new items wait above instead of shifting the list. */
|
|
73
|
-
export const TimelineNewItems = React.forwardRef(function TimelineNewItems({ count, labels, className, children, ...props }, ref) {
|
|
73
|
+
export const TimelineNewItems = /*#__PURE__*/ React.forwardRef(function TimelineNewItems({ count, labels, className, children, ...props }, ref) {
|
|
74
74
|
if (count <= 0)
|
|
75
75
|
return null;
|
|
76
76
|
return (_jsxs("button", { ref: ref, type: "button", "data-slot": "timeline-new-items", className: cn("mx-auto inline-flex h-7 items-center gap-1.5 rounded-full bg-accent-soft px-3 text-xs font-medium text-accent-ink transition-[filter] hover:brightness-95 focus-ring motion-safe:ui-fade", className), ...props, children: [_jsx("span", { "aria-hidden": true, className: "size-1.5 rounded-full bg-current" }), children ?? _jsx(DataLabel, { ns: "timeline", id: "newItems", vars: { count }, override: labels })] }));
|
|
@@ -91,7 +91,7 @@ export function TimelineSkeleton({ count = 3, className }) {
|
|
|
91
91
|
* ]} />
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
|
-
export const ActivityTimeline = React.forwardRef(function ActivityTimeline({ items, variant = "feed", groupBy = "none", order, timeZone = "UTC", now, timeMode, loading, empty, hasMore, onLoadMore, newCount = 0, onShowNew, announcement, filter, labels, className, density, ...props }, ref) {
|
|
94
|
+
export const ActivityTimeline = /*#__PURE__*/ React.forwardRef(function ActivityTimeline({ items, variant = "feed", groupBy = "none", order, timeZone = "UTC", now, timeMode, loading, empty, hasMore, onLoadMore, newCount = 0, onShowNew, announcement, filter, labels, className, density, ...props }, ref) {
|
|
95
95
|
const dir = order ?? (variant === "steps" ? "asc" : "desc");
|
|
96
96
|
const sorted = variant === "steps" && order === undefined ? items : [...items].sort((a, b) => cmp(a.at, b.at) * (dir === "asc" ? 1 : -1));
|
|
97
97
|
const renderItem = (it, inGroup) => (_jsxs(TimelineItem, { status: it.status, children: [_jsx(TimelineIndicator, { icon: it.icon, avatar: it.avatar, tone: it.tone, status: variant === "steps" ? (it.status ?? "upcoming") : undefined, labels: labels }), _jsxs(TimelineContent, { children: [_jsxs(TimelineTitle, { className: it.status === "upcoming" ? "text-fg-subtle" : undefined, children: [it.actor ? _jsxs("b", { children: [it.actor, " "] }) : null, it.href ? (_jsx("a", { href: it.href, className: "rounded-[2px] underline-offset-2 hover:text-fg hover:underline focus-ring", children: it.title })) : (it.title)] }), variant === "steps" && it.status === "upcoming" ? null : _jsx(TimelineTime, { value: toIsoInstant(it.at), now: now, mode: timeMode ?? (inGroup ? "absolute" : "relative") }), it.body ? _jsx(TimelineBody, { children: it.body }) : null, it.actions ? _jsx(TimelineActions, { children: it.actions }) : null] })] }, it.id));
|
|
@@ -65,7 +65,7 @@ export function formatAddress(a, opts = {}) {
|
|
|
65
65
|
lines.push(displayNames(locale)?.of(c) ?? c);
|
|
66
66
|
return lines.map((l) => l?.trim()).filter((l) => !!l);
|
|
67
67
|
}
|
|
68
|
-
const NativeSelect = React.forwardRef(function NativeSelect({ className, size = "md", invalid, children, ...rest }, ref) {
|
|
68
|
+
const NativeSelect = /*#__PURE__*/ React.forwardRef(function NativeSelect({ className, size = "md", invalid, children, ...rest }, ref) {
|
|
69
69
|
const props = useFieldControl({ ...rest, "aria-invalid": invalid ? true : rest["aria-invalid"] });
|
|
70
70
|
return (_jsxs("div", { "data-slot": "address-select", className: cn(controlVariants({ size }), "px-0", className), children: [_jsx("select", { ref: ref, ...props, className: cn("h-full w-full min-w-0 cursor-pointer appearance-none rounded-[inherit] bg-transparent ps-3 pe-9 text-[length:inherit] text-fg outline-none disabled:cursor-not-allowed", props.value === "" && "text-fg-subtle"), children: children }), _jsx(ChevronDown, { "aria-hidden": true, className: "pointer-events-none absolute end-3 size-4 text-fg-subtle" })] }));
|
|
71
71
|
});
|
|
@@ -120,7 +120,7 @@ function useRegions(source, level, province) {
|
|
|
120
120
|
* <Field label="Province"><RegionSelect source={trAddress} level="province" /></Field>
|
|
121
121
|
* ```
|
|
122
122
|
*/
|
|
123
|
-
export const RegionSelect = React.forwardRef(function RegionSelect({ source, level, province, value, defaultValue, onValueChange, placeholder, labels, disabled, ...rest }, ref) {
|
|
123
|
+
export const RegionSelect = /*#__PURE__*/ React.forwardRef(function RegionSelect({ source, level, province, value, defaultValue, onValueChange, placeholder, labels, disabled, ...rest }, ref) {
|
|
124
124
|
const t = useLabels("address", addressLabels, labels);
|
|
125
125
|
const [current, setCurrent] = useControllableState({ value, defaultValue: defaultValue ?? "", onChange: onValueChange, name: "RegionSelect" });
|
|
126
126
|
const { items } = useRegions(source, level, province);
|
|
@@ -140,7 +140,7 @@ const DEFAULT_FIELDS = ["country", "region1", "region2", "line1", "line2", "post
|
|
|
140
140
|
* <AddressField legend="Billing address" name="billing" defaultValue={{ country: "TR" }} required={["line1", "region1", "region2"]} />
|
|
141
141
|
* ```
|
|
142
142
|
*/
|
|
143
|
-
export const AddressField = React.forwardRef(function AddressField(props, ref) {
|
|
143
|
+
export const AddressField = /*#__PURE__*/ React.forwardRef(function AddressField(props, ref) {
|
|
144
144
|
const { value, defaultValue, onValueChange, sources = { TR: trAddress }, countries, defaultCountry, fields = DEFAULT_FIELDS, required = [], layout = "grid", name, legend, hint, errors, readOnly, disabled, size, labels, className, ...rest } = props;
|
|
145
145
|
const { locale } = useLocale();
|
|
146
146
|
const t = useLabels("address", addressLabels, labels);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as AlertDialogPrimitive from "radix-ui/alert-dialog";
|
|
3
3
|
import { type ButtonProps } from "./button.js";
|
|
4
4
|
import { type LayerHeaderProps } from "./dialog.js";
|
|
5
5
|
type Tone = "default" | "danger";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as AlertDialogPrimitive from "radix-ui/alert-dialog";
|
|
5
5
|
import { TriangleAlert } from "lucide-react";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { useLabels } from "../lib/labels.js";
|
|
@@ -12,7 +12,7 @@ import { Button } from "./button.js";
|
|
|
12
12
|
import { Field, Input } from "./input.js";
|
|
13
13
|
import { Alert } from "./alert.js";
|
|
14
14
|
import { LayerBody, LayerFooter, LayerHeader, LayerPartsProvider } from "./dialog.js";
|
|
15
|
-
const AlertDialogContentContext = React.createContext({ tone: "default", actionRef: { current: null } });
|
|
15
|
+
const AlertDialogContentContext = /*#__PURE__*/ React.createContext({ tone: "default", actionRef: { current: null } });
|
|
16
16
|
/**
|
|
17
17
|
* Confirms an irreversible or high-stakes action. `role="alertdialog"`; the overlay never closes it.
|
|
18
18
|
*
|
|
@@ -34,7 +34,7 @@ const AlertDialogContentContext = React.createContext({ tone: "default", actionR
|
|
|
34
34
|
export const AlertDialog = AlertDialogPrimitive.Root;
|
|
35
35
|
export const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
36
36
|
/** Fixed 420px panel. Below 640px it anchors to the bottom and stacks the buttons, action on top. */
|
|
37
|
-
export const AlertDialogContent = React.forwardRef(function AlertDialogContent({ tone = "default", dismissible = true, container, className, children, onEscapeKeyDown, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) {
|
|
37
|
+
export const AlertDialogContent = /*#__PURE__*/ React.forwardRef(function AlertDialogContent({ tone = "default", dismissible = true, container, className, children, onEscapeKeyDown, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) {
|
|
38
38
|
const scope = usePortalContainer();
|
|
39
39
|
const depth = useLayerDepth() + 1;
|
|
40
40
|
const actionRef = React.useRef(null);
|
|
@@ -82,24 +82,24 @@ export function AlertDialogIcon({ className, children }) {
|
|
|
82
82
|
return (_jsx("span", { "aria-hidden": true, className: cn("flex size-10 items-center justify-center rounded-ui tone-danger bg-[color-mix(in_srgb,var(--danger)_12%,transparent)] text-danger [&_svg]:size-5", className), children: children ?? _jsx(TriangleAlert, {}) }));
|
|
83
83
|
}
|
|
84
84
|
/** `LayerHeader` that adds the warning icon well when the content is `tone="danger"` (pass `icon={null}` to drop it). */
|
|
85
|
-
export const AlertDialogHeader = React.forwardRef(function AlertDialogHeader({ icon, className, ...props }, ref) {
|
|
85
|
+
export const AlertDialogHeader = /*#__PURE__*/ React.forwardRef(function AlertDialogHeader({ icon, className, ...props }, ref) {
|
|
86
86
|
const { tone } = React.useContext(AlertDialogContentContext);
|
|
87
87
|
const resolvedIcon = icon === undefined ? (tone === "danger" ? _jsx(AlertDialogIcon, {}) : undefined) : icon;
|
|
88
88
|
return _jsx(LayerHeader, { ref: ref, icon: resolvedIcon, className: cn("pt-6", className), ...props });
|
|
89
89
|
});
|
|
90
90
|
export const AlertDialogBody = LayerBody;
|
|
91
91
|
/** Footer without the hairline; buttons at the end, stacked on mobile. */
|
|
92
|
-
export const AlertDialogFooter = React.forwardRef(function AlertDialogFooter({ className, ...props }, ref) {
|
|
92
|
+
export const AlertDialogFooter = /*#__PURE__*/ React.forwardRef(function AlertDialogFooter({ className, ...props }, ref) {
|
|
93
93
|
return _jsx(LayerFooter, { ref: ref, className: cn("border-t-0 pt-1 pb-5", className), ...props });
|
|
94
94
|
});
|
|
95
95
|
const confirmLabels = { cancel: "Cancel", confirm: "Confirm", typeToConfirm: "Type {text} to confirm", error: "That didn't work. Try again." };
|
|
96
96
|
/** Closes without acting. Receives initial focus in a danger dialog. Default label "Cancel". */
|
|
97
|
-
export const AlertDialogCancel = React.forwardRef(function AlertDialogCancel({ children, labels, variant = "secondary", ...props }, ref) {
|
|
97
|
+
export const AlertDialogCancel = /*#__PURE__*/ React.forwardRef(function AlertDialogCancel({ children, labels, variant = "secondary", ...props }, ref) {
|
|
98
98
|
const t = useLabels("confirm", confirmLabels, labels);
|
|
99
99
|
return (_jsx(AlertDialogPrimitive.Cancel, { asChild: true, children: _jsx(Button, { ref: ref, variant: variant, ...props, children: children ?? t("cancel") }) }));
|
|
100
100
|
});
|
|
101
101
|
/** Runs the action and closes. `variant` follows the content tone (`danger` or `primary`). */
|
|
102
|
-
export const AlertDialogAction = React.forwardRef(function AlertDialogAction({ children, labels, variant, keepOpen, onClick, ...props }, ref) {
|
|
102
|
+
export const AlertDialogAction = /*#__PURE__*/ React.forwardRef(function AlertDialogAction({ children, labels, variant, keepOpen, onClick, ...props }, ref) {
|
|
103
103
|
const { tone, actionRef } = React.useContext(AlertDialogContentContext);
|
|
104
104
|
const t = useLabels("confirm", confirmLabels, labels);
|
|
105
105
|
const setRefs = React.useCallback((node) => {
|
|
@@ -155,7 +155,7 @@ export function ConfirmDialog({ open, onResult, title, description, tone = "defa
|
|
|
155
155
|
}
|
|
156
156
|
} }) })) : null] })) : null, _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: busy, children: cancelLabel ?? t("cancel") }), _jsx(AlertDialogAction, { keepOpen: true, disabled: !matches, loading: busy, onClick: () => void run(), children: confirmLabel ?? t("confirm") })] })] }) }));
|
|
157
157
|
}
|
|
158
|
-
const ConfirmContext = React.createContext(null);
|
|
158
|
+
const ConfirmContext = /*#__PURE__*/ React.createContext(null);
|
|
159
159
|
/**
|
|
160
160
|
* Provides `useConfirm()` to its subtree and renders the one shared confirmation dialog.
|
|
161
161
|
* App shell includes it; mount it yourself at the app root otherwise.
|
package/dist/components/alert.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CircleAlert, CircleCheck, Info, Lightbulb, TriangleAlert, X } from "luc
|
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { useLabels } from "../lib/labels.js";
|
|
7
7
|
import { IconButton } from "./button.js";
|
|
8
|
-
export const alertVariants = cva([
|
|
8
|
+
export const alertVariants = /*#__PURE__*/ cva([
|
|
9
9
|
"vui-alert relative grid grid-cols-[auto_minmax(0,1fr)_auto] items-start text-fg",
|
|
10
10
|
// Tinted surface + hairline in the tone colour; body text stays --fg for contrast.
|
|
11
11
|
"[--alert-tone:var(--tone)]",
|
|
@@ -56,7 +56,7 @@ const alertLabels = { dismiss: "Dismiss" };
|
|
|
56
56
|
*
|
|
57
57
|
* Critical information must not live only in a toast — show it here too.
|
|
58
58
|
*/
|
|
59
|
-
export const Alert = React.forwardRef(function Alert({ tone, variant, size, title, icon, actions, onDismiss, dismissLabel, live, className, children, ...props }, ref) {
|
|
59
|
+
export const Alert = /*#__PURE__*/ React.forwardRef(function Alert({ tone, variant, size, title, icon, actions, onDismiss, dismissLabel, live, className, children, ...props }, ref) {
|
|
60
60
|
const t = tone ?? "neutral";
|
|
61
61
|
const DefaultIcon = defaultIcons[t];
|
|
62
62
|
const iconNode = icon === false ? null : (icon ?? _jsx(DefaultIcon, { "aria-hidden": true }));
|
|
@@ -33,9 +33,9 @@ const appShellLabels = {
|
|
|
33
33
|
noAppsDescription: "Your account doesn't have access to any app yet. Ask an administrator to invite you.",
|
|
34
34
|
pageChanged: "{title}",
|
|
35
35
|
};
|
|
36
|
-
const AppShellContext = React.createContext(null);
|
|
36
|
+
const AppShellContext = /*#__PURE__*/ React.createContext(null);
|
|
37
37
|
/** Rail state as resolved by the layout (preference or width). */
|
|
38
|
-
const CollapsedContext = React.createContext(false);
|
|
38
|
+
const CollapsedContext = /*#__PURE__*/ React.createContext(false);
|
|
39
39
|
function writeCookie(v) {
|
|
40
40
|
try {
|
|
41
41
|
document.cookie = `${SIDEBAR_COOKIE}=${v ? "1" : "0"}; path=/; max-age=31536000; samesite=lax`;
|
|
@@ -226,7 +226,7 @@ export function AppShellBreadcrumb({ includeApp = true, className }) {
|
|
|
226
226
|
* </AppShellProvider>
|
|
227
227
|
* ```
|
|
228
228
|
*/
|
|
229
|
-
export const AppShell = React.forwardRef(function AppShell({ sidebar, topbar, banner, notifications, actions, user, badges, sidebarFooter, appSwitcherFooter, layout = "sidebar", loading, announceRouteChanges = true, height = "screen", globals = true, labels, className, children, ...props }, ref) {
|
|
229
|
+
export const AppShell = /*#__PURE__*/ React.forwardRef(function AppShell({ sidebar, topbar, banner, notifications, actions, user, badges, sidebarFooter, appSwitcherFooter, layout = "sidebar", loading, announceRouteChanges = true, height = "screen", globals = true, labels, className, children, ...props }, ref) {
|
|
230
230
|
const ctx = React.useContext(AppShellContext);
|
|
231
231
|
if (!ctx)
|
|
232
232
|
throw new Error("AppShell must be used inside <AppShellProvider>.");
|
|
@@ -14,7 +14,7 @@ export function parseAspectRatio(ratio) {
|
|
|
14
14
|
const n = Number(ratio);
|
|
15
15
|
return Number.isFinite(n) && n > 0 ? n : undefined;
|
|
16
16
|
}
|
|
17
|
-
export const aspectRatioVariants = cva("relative isolate block w-full overflow-hidden", {
|
|
17
|
+
export const aspectRatioVariants = /*#__PURE__*/ cva("relative isolate block w-full overflow-hidden", {
|
|
18
18
|
variants: {
|
|
19
19
|
rounded: { none: "", ui: "rounded-ui", "ui-lg": "rounded-ui-lg", full: "rounded-full" },
|
|
20
20
|
/** How a direct `img` / `video` child fills the box. */
|
|
@@ -34,7 +34,7 @@ export const aspectRatioVariants = cva("relative isolate block w-full overflow-h
|
|
|
34
34
|
* </AspectRatio>
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
export const AspectRatio = React.forwardRef(function AspectRatio({ ratio = "16/9", rounded, fit, tone, className, style, children, ...props }, ref) {
|
|
37
|
+
export const AspectRatio = /*#__PURE__*/ React.forwardRef(function AspectRatio({ ratio = "16/9", rounded, fit, tone, className, style, children, ...props }, ref) {
|
|
38
38
|
const value = parseAspectRatio(ratio) ?? 16 / 9;
|
|
39
39
|
return (_jsx("div", { ref: ref, "data-slot": "aspect-ratio", className: cn(aspectRatioVariants({ rounded, fit, tone }),
|
|
40
40
|
// The child fills the box; iframes lose their default border.
|
|
@@ -110,7 +110,7 @@ export function AttachmentName({ name, className, ...props }) {
|
|
|
110
110
|
/* ------------------------------------------------------------------ */
|
|
111
111
|
/* AttachmentList */
|
|
112
112
|
/* ------------------------------------------------------------------ */
|
|
113
|
-
const listVariants = cva("", {
|
|
113
|
+
const listVariants = /*#__PURE__*/ cva("", {
|
|
114
114
|
variants: {
|
|
115
115
|
layout: {
|
|
116
116
|
list: "flex flex-col divide-y divide-line overflow-hidden rounded-ui border border-line",
|
|
@@ -131,7 +131,7 @@ const listVariants = cva("", {
|
|
|
131
131
|
* <AttachmentList layout="chips" items={commentFiles} readOnly />
|
|
132
132
|
* ```
|
|
133
133
|
*/
|
|
134
|
-
export const AttachmentList = React.forwardRef(function AttachmentList({ items, layout = "list", size = "md", onPreview, onDownload, onRemove, onRetry, onAddFiles, accept, uploadSlot, readOnly, empty, labels, className, "aria-label": ariaLabel, ...props }, ref) {
|
|
134
|
+
export const AttachmentList = /*#__PURE__*/ React.forwardRef(function AttachmentList({ items, layout = "list", size = "md", onPreview, onDownload, onRemove, onRetry, onAddFiles, accept, uploadSlot, readOnly, empty, labels, className, "aria-label": ariaLabel, ...props }, ref) {
|
|
135
135
|
const t = useLabels("attachments", attachmentLabels, labels);
|
|
136
136
|
const [removing, setRemoving] = React.useState(() => new Set());
|
|
137
137
|
const inputRef = React.useRef(null);
|
|
@@ -96,7 +96,7 @@ export function filterAuditEvents(events, filters, locale, actionLabels) {
|
|
|
96
96
|
* />
|
|
97
97
|
* ```
|
|
98
98
|
*/
|
|
99
|
-
export const AuditLog = React.forwardRef(function AuditLog({ events, rowCount, actionLabels, changeFields, filters: filtersProp, defaultFilters, onFiltersChange, manualFiltering, showFilters = true, toolbar, notice, onExport, hasMore, onLoadMore, loading, height = "32rem", virtualizeAfter = 80, variant = "table", now, labels, className, ...props }, ref) {
|
|
99
|
+
export const AuditLog = /*#__PURE__*/ React.forwardRef(function AuditLog({ events, rowCount, actionLabels, changeFields, filters: filtersProp, defaultFilters, onFiltersChange, manualFiltering, showFilters = true, toolbar, notice, onExport, hasMore, onLoadMore, loading, height = "32rem", virtualizeAfter = 80, variant = "table", now, labels, className, ...props }, ref) {
|
|
100
100
|
const t = useLabels("auditLog", auditLogLabels, labels);
|
|
101
101
|
const f = useFormat();
|
|
102
102
|
const { locale } = useLocale();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as AvatarPrimitive from "radix-ui/avatar";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
import { cn } from "../lib/cn.js";
|
|
7
7
|
import { useLabels } from "../lib/labels.js";
|
|
@@ -16,7 +16,7 @@ const avatarLabels = {
|
|
|
16
16
|
overflow: "+{count}",
|
|
17
17
|
more: "{count, plural, one {# more person} other {# more people}}",
|
|
18
18
|
};
|
|
19
|
-
export const avatarVariants = cva("relative inline-flex shrink-0 select-none items-center justify-center align-middle font-medium leading-none tracking-[0.01em]", {
|
|
19
|
+
export const avatarVariants = /*#__PURE__*/ cva("relative inline-flex shrink-0 select-none items-center justify-center align-middle font-medium leading-none tracking-[0.01em]", {
|
|
20
20
|
variants: {
|
|
21
21
|
size: {
|
|
22
22
|
xs: "size-5 text-[8.5px]",
|
|
@@ -61,20 +61,20 @@ export function avatarColor(seed) {
|
|
|
61
61
|
color: `color-mix(in oklch, ${c} 60%, var(--fg))`,
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
const AvatarGroupContext = React.createContext(null);
|
|
64
|
+
const AvatarGroupContext = /*#__PURE__*/ React.createContext(null);
|
|
65
65
|
/** Root of the composite API: `<AvatarRoot><AvatarImage/><AvatarFallback/></AvatarRoot>`. */
|
|
66
|
-
export const AvatarRoot = React.forwardRef(function AvatarRoot({ size, shape, className, ...props }, ref) {
|
|
66
|
+
export const AvatarRoot = /*#__PURE__*/ React.forwardRef(function AvatarRoot({ size, shape, className, ...props }, ref) {
|
|
67
67
|
const group = React.useContext(AvatarGroupContext);
|
|
68
68
|
const s = size ?? group?.size ?? "md";
|
|
69
69
|
const sh = shape ?? group?.shape ?? "circle";
|
|
70
70
|
return (_jsx(AvatarPrimitive.Root, { ref: ref, "data-slot": "avatar", "data-size": s, "data-shape": sh, className: cn(avatarVariants({ size: s, shape: sh }), group && "ring-2 ring-(--avatar-ring)", className), ...props }));
|
|
71
71
|
});
|
|
72
72
|
/** The photo. Pass `asChild` to render a framework image (Next `<Image>`). */
|
|
73
|
-
export const AvatarImage = React.forwardRef(function AvatarImage({ className, ...props }, ref) {
|
|
73
|
+
export const AvatarImage = /*#__PURE__*/ React.forwardRef(function AvatarImage({ className, ...props }, ref) {
|
|
74
74
|
return _jsx(AvatarPrimitive.Image, { ref: ref, "data-slot": "avatar-image", className: cn("size-full rounded-[inherit] object-cover", className), ...props });
|
|
75
75
|
});
|
|
76
76
|
/** Shown while the image loads (after `delayMs`), when it fails, or when there is none. */
|
|
77
|
-
export const AvatarFallback = React.forwardRef(function AvatarFallback({ className, ...props }, ref) {
|
|
77
|
+
export const AvatarFallback = /*#__PURE__*/ React.forwardRef(function AvatarFallback({ className, ...props }, ref) {
|
|
78
78
|
return (_jsx(AvatarPrimitive.Fallback, { ref: ref, "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center rounded-[inherit] bg-selected text-fg-muted [&_svg]:size-[55%]", className), ...props }));
|
|
79
79
|
});
|
|
80
80
|
/**
|
|
@@ -87,7 +87,7 @@ export const AvatarFallback = React.forwardRef(function AvatarFallback({ classNa
|
|
|
87
87
|
* <Avatar name="Northwind Traders" shape="square" size="lg" />
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
|
-
export const Avatar = React.forwardRef(function Avatar({ src, name, size, shape, status, statusLabel, fallback, delayMs = 300, neutral, labels, className, style, ...props }, ref) {
|
|
90
|
+
export const Avatar = /*#__PURE__*/ React.forwardRef(function Avatar({ src, name, size, shape, status, statusLabel, fallback, delayMs = 300, neutral, labels, className, style, ...props }, ref) {
|
|
91
91
|
const t = useLabels("avatar", avatarLabels, labels);
|
|
92
92
|
const { locale } = useLocale();
|
|
93
93
|
const group = React.useContext(AvatarGroupContext);
|
|
@@ -114,7 +114,7 @@ const overlap = {
|
|
|
114
114
|
* </AvatarGroup>
|
|
115
115
|
* ```
|
|
116
116
|
*/
|
|
117
|
-
export const AvatarGroup = React.forwardRef(function AvatarGroup({ max = 4, total, size = "md", shape = "circle", onOverflowClick, spacing = "md", labels, className, children, ...props }, ref) {
|
|
117
|
+
export const AvatarGroup = /*#__PURE__*/ React.forwardRef(function AvatarGroup({ max = 4, total, size = "md", shape = "circle", onOverflowClick, spacing = "md", labels, className, children, ...props }, ref) {
|
|
118
118
|
const t = useLabels("avatar", avatarLabels, labels);
|
|
119
119
|
const items = React.Children.toArray(children).filter(React.isValidElement);
|
|
120
120
|
const shown = items.slice(0, Math.max(0, max));
|
|
@@ -25,7 +25,7 @@ export const backupCodesLabels = {
|
|
|
25
25
|
* <BackupCodes codes={codes} used={["4K7Q-PX2M"]} onRegenerate={regenerate} />
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
export const BackupCodes = React.forwardRef(function BackupCodes({ codes, used = [], title, filename = "backup-codes.txt", fileNote, onCopy, onDownload, onRegenerate, regenerating, labels, className, ...props }, ref) {
|
|
28
|
+
export const BackupCodes = /*#__PURE__*/ React.forwardRef(function BackupCodes({ codes, used = [], title, filename = "backup-codes.txt", fileNote, onCopy, onDownload, onRegenerate, regenerating, labels, className, ...props }, ref) {
|
|
29
29
|
const t = useLabels("backupCodes", backupCodesLabels, labels);
|
|
30
30
|
const f = useFormat();
|
|
31
31
|
const [copied, setCopied] = React.useState(false);
|