@devalok/shilp-sutra 0.39.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +151 -0
- package/MIGRATION.md +137 -0
- package/README.md +3 -0
- package/dist/_chunks/badge-group.js +75 -74
- package/dist/_chunks/badge-group.js.map +1 -1
- package/dist/_chunks/chart-container.js +50 -0
- package/dist/_chunks/chart-container.js.map +1 -0
- package/dist/_chunks/chat.js +231 -223
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/colors.js +30 -0
- package/dist/_chunks/colors.js.map +1 -0
- package/dist/_chunks/emoji-data.js +45 -0
- package/dist/_chunks/emoji-data.js.map +1 -0
- package/dist/_chunks/grid-lines.js +72 -0
- package/dist/_chunks/grid-lines.js.map +1 -0
- package/dist/_chunks/mention-suggestion.js +31 -259
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/normalize-icon.js +18 -0
- package/dist/_chunks/normalize-icon.js.map +1 -0
- package/dist/_chunks/oauth-button.js +227 -0
- package/dist/_chunks/oauth-button.js.map +1 -0
- package/dist/_chunks/primitives.js +107 -107
- package/dist/_chunks/primitives.js.map +1 -1
- package/dist/_chunks/{text.js → success.js} +24 -61
- package/dist/_chunks/success.js.map +1 -0
- package/dist/_chunks/tiptap.js +1952 -1949
- package/dist/_chunks/tiptap.js.map +1 -1
- package/dist/_chunks/tooltip.js +58 -0
- package/dist/_chunks/tooltip.js.map +1 -0
- package/dist/_chunks/tree-view.js +101 -96
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/ai/ai-command-provider.d.ts +3 -2
- package/dist/ai/ai-command-provider.d.ts.map +1 -1
- package/dist/ai/ai-command-provider.js.map +1 -1
- package/dist/ai/block-renderer.js +11 -9
- package/dist/ai/block-renderer.js.map +1 -1
- package/dist/ai/blocks/error.js +31 -0
- package/dist/ai/blocks/error.js.map +1 -0
- package/dist/ai/blocks/index.d.ts +0 -2
- package/dist/ai/blocks/index.d.ts.map +1 -1
- package/dist/ai/blocks/index.js +2 -2
- package/dist/ai/blocks/text.js +19 -0
- package/dist/ai/blocks/text.js.map +1 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +192 -187
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.d.ts +2 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +88 -83
- package/dist/ai/conversation.js.map +1 -1
- package/dist/ai/index.d.ts +0 -4
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +45 -46
- package/dist/ai/index.js.map +1 -1
- package/dist/composed/activity-feed.d.ts +2 -1
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts +2 -2
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +11 -11
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.d.ts +2 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +103 -98
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/date-picker/index.js +747 -3
- package/dist/composed/date-picker/index.js.map +1 -0
- package/dist/composed/empty-state.d.ts +3 -3
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +40 -31
- package/dist/composed/empty-state.js.map +1 -1
- package/dist/composed/extensions/emoji-node.js +81 -0
- package/dist/composed/extensions/emoji-node.js.map +1 -0
- package/dist/composed/extensions/emoji-suggestion.js +117 -0
- package/dist/composed/extensions/emoji-suggestion.js.map +1 -0
- package/dist/composed/file-preview.js +498 -2
- package/dist/{_chunks → composed}/file-preview.js.map +1 -1
- package/dist/composed/index.d.ts +0 -15
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +16 -24
- package/dist/composed/rich-chat-input.js +2073 -2
- package/dist/{_chunks → composed}/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.js +64 -61
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/composed/status-badge.d.ts +3 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -53
- package/dist/composed/status-badge.js.map +1 -1
- package/dist/shell/app-command-palette.d.ts +2 -1
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +3 -1
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -82
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/command-registry.d.ts +2 -1
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/command-registry.js.map +1 -1
- package/dist/shell/sidebar.d.ts +7 -4
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +143 -129
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts +4 -3
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +114 -106
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/ui/badge.d.ts +3 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/button.d.ts +3 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -53
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/charts/area-chart.js +177 -0
- package/dist/ui/charts/area-chart.js.map +1 -0
- package/dist/ui/charts/bar-chart.js +127 -0
- package/dist/ui/charts/bar-chart.js.map +1 -0
- package/dist/ui/charts/chart-container.js +3 -0
- package/dist/ui/charts/gauge-chart.js +72 -0
- package/dist/ui/charts/gauge-chart.js.map +1 -0
- package/dist/ui/charts/index.js +10 -1035
- package/dist/ui/charts/line-chart.js +135 -0
- package/dist/ui/charts/line-chart.js.map +1 -0
- package/dist/ui/charts/pie-chart.js +111 -0
- package/dist/ui/charts/pie-chart.js.map +1 -0
- package/dist/ui/charts/radar-chart.js +170 -0
- package/dist/ui/charts/radar-chart.js.map +1 -0
- package/dist/ui/charts/sparkline.js +119 -0
- package/dist/ui/charts/sparkline.js.map +1 -0
- package/dist/ui/chat/message.d.ts +3 -3
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts +2 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/combobox.d.ts +2 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +97 -92
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/container.d.ts +6 -1
- package/dist/ui/container.d.ts.map +1 -1
- package/dist/ui/container.js +2 -1
- package/dist/ui/container.js.map +1 -1
- package/dist/ui/icon-button.d.ts +9 -2
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +14 -13
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/index.d.ts +1 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +31 -33
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/lib/icon-input.d.ts +42 -0
- package/dist/ui/lib/icon-input.d.ts.map +1 -0
- package/dist/ui/lib/normalize-icon.d.ts +39 -0
- package/dist/ui/lib/normalize-icon.d.ts.map +1 -0
- package/dist/ui/oauth-button/index.d.ts +3 -0
- package/dist/ui/oauth-button/index.d.ts.map +1 -0
- package/dist/ui/oauth-button/index.js +3 -0
- package/dist/ui/oauth-button/oauth-button.d.ts +208 -0
- package/dist/ui/oauth-button/oauth-button.d.ts.map +1 -0
- package/dist/ui/progress.js +1 -1
- package/dist/ui/segmented-control.d.ts +3 -4
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +53 -45
- package/dist/ui/segmented-control.js.map +1 -1
- package/dist/ui/stack.d.ts +6 -1
- package/dist/ui/stack.d.ts.map +1 -1
- package/dist/ui/stack.js +2 -1
- package/dist/ui/stack.js.map +1 -1
- package/dist/ui/stat-card.d.ts +2 -3
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +117 -115
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/stepper.d.ts +2 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +74 -69
- package/dist/ui/stepper.js.map +1 -1
- package/dist/ui/text.d.ts +7 -2
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +2 -1
- package/dist/ui/text.js.map +1 -1
- package/dist/ui/toaster.d.ts +11 -2
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js.map +1 -1
- package/dist/ui/tooltip.js +12 -12
- package/dist/ui/tree-view/tree-item.d.ts +3 -2
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/dist/ui/tree-view/use-tree.d.ts +2 -1
- package/dist/ui/tree-view/use-tree.d.ts.map +1 -1
- package/docs/components/ui/oauth-button.md +86 -0
- package/docs/recipes/customize-brand.md +15 -0
- package/docs/recipes/index.md +5 -1
- package/docs/recipes/install-astro.md +15 -0
- package/docs/recipes/install-next-app-router.md +21 -5
- package/docs/recipes/install-next-pages.md +2 -0
- package/docs/recipes/install-remix.md +15 -0
- package/docs/recipes/install-tanstack-start.md +15 -0
- package/docs/recipes/install-vite.md +15 -0
- package/docs/recipes/troubleshoot.md +22 -0
- package/llms-full.txt +87 -1
- package/llms-quick.txt +247 -0
- package/llms.txt +107 -2
- package/package.json +79 -2
- package/scripts/welcome.mjs +219 -0
- package/skill/SKILL.md +22 -3
- package/skill/references/components-full.md +87 -1
- package/skill/references/components.md +107 -2
- package/skill/references/customize-brand.md +15 -0
- package/skill/references/setup-astro.md +15 -0
- package/skill/references/setup-next-app-router.md +21 -5
- package/skill/references/setup-next-pages.md +2 -0
- package/skill/references/setup-remix.md +15 -0
- package/skill/references/setup-tanstack-start.md +15 -0
- package/skill/references/setup-vite.md +15 -0
- package/skill/references/troubleshoot.md +22 -0
- package/dist/_chunks/date-picker.js +0 -748
- package/dist/_chunks/date-picker.js.map +0 -1
- package/dist/_chunks/file-preview.js +0 -499
- package/dist/_chunks/rich-chat-input.js +0 -2071
- package/dist/_chunks/text.js.map +0 -1
- package/dist/ui/charts/index.js.map +0 -1
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../ui/lib/utils.js";
|
|
3
|
+
import { t } from "./normalize-icon.js";
|
|
4
|
+
import { Button as n } from "../ui/button.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
import { IconBrandApple as o, IconBrandDiscord as s, IconBrandFacebook as c, IconBrandGithub as l, IconBrandGitlab as u, IconBrandGoogleFilled as d, IconBrandLinkedin as f, IconBrandSlack as p, IconBrandWindows as m, IconBrandXFilled as h, IconFingerprint as g, IconKey as _, IconMail as v } from "@tabler/icons-react";
|
|
8
|
+
//#region src/ui/oauth-button/oauth-button.tsx
|
|
9
|
+
var y = {
|
|
10
|
+
google: "Google",
|
|
11
|
+
apple: "Apple",
|
|
12
|
+
github: "GitHub",
|
|
13
|
+
microsoft: "Microsoft",
|
|
14
|
+
x: "X",
|
|
15
|
+
linkedin: "LinkedIn",
|
|
16
|
+
facebook: "Facebook",
|
|
17
|
+
discord: "Discord",
|
|
18
|
+
slack: "Slack",
|
|
19
|
+
gitlab: "GitLab",
|
|
20
|
+
sso: "SSO",
|
|
21
|
+
email: "email",
|
|
22
|
+
passkey: "a passkey"
|
|
23
|
+
}, b = {
|
|
24
|
+
google: d,
|
|
25
|
+
apple: o,
|
|
26
|
+
github: l,
|
|
27
|
+
microsoft: m,
|
|
28
|
+
x: h,
|
|
29
|
+
linkedin: f,
|
|
30
|
+
facebook: c,
|
|
31
|
+
discord: s,
|
|
32
|
+
slack: p,
|
|
33
|
+
gitlab: u,
|
|
34
|
+
sso: _,
|
|
35
|
+
email: v,
|
|
36
|
+
passkey: g
|
|
37
|
+
};
|
|
38
|
+
function x(e) {
|
|
39
|
+
return e === "passkey" ? "Passkey" : y[e];
|
|
40
|
+
}
|
|
41
|
+
function S(e, t, n) {
|
|
42
|
+
if (n) return x(e);
|
|
43
|
+
let r = y[e];
|
|
44
|
+
switch (t) {
|
|
45
|
+
case "signin": return `Sign in with ${r}`;
|
|
46
|
+
case "signup": return `Sign up with ${r}`;
|
|
47
|
+
default: return `Continue with ${r}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var C = { passkey: {
|
|
51
|
+
continue: "Continue with a passkey",
|
|
52
|
+
signin: "Sign in with a passkey",
|
|
53
|
+
signup: "Create a passkey"
|
|
54
|
+
} };
|
|
55
|
+
function w(e, t, n) {
|
|
56
|
+
return n ? x(e) : C[e]?.[t] ?? S(e, t, n);
|
|
57
|
+
}
|
|
58
|
+
function T(e, t) {
|
|
59
|
+
return C[e]?.[t] ?? S(e, t, !1);
|
|
60
|
+
}
|
|
61
|
+
var E = {
|
|
62
|
+
xs: 14,
|
|
63
|
+
sm: 16,
|
|
64
|
+
md: 18,
|
|
65
|
+
lg: 20,
|
|
66
|
+
"compact-xs": 14,
|
|
67
|
+
"compact-sm": 14,
|
|
68
|
+
"compact-md": 16,
|
|
69
|
+
icon: 18,
|
|
70
|
+
"icon-xs": 14,
|
|
71
|
+
"icon-sm": 16,
|
|
72
|
+
"icon-md": 18,
|
|
73
|
+
"icon-lg": 20
|
|
74
|
+
}, D = {
|
|
75
|
+
xs: "icon-xs",
|
|
76
|
+
sm: "icon-sm",
|
|
77
|
+
md: "icon-md",
|
|
78
|
+
lg: "icon-lg",
|
|
79
|
+
"compact-xs": "icon-xs",
|
|
80
|
+
"compact-sm": "icon-sm",
|
|
81
|
+
"compact-md": "icon-md"
|
|
82
|
+
}, O = r.forwardRef(({ provider: r, intent: o = "continue", variant: s, appearance: c, icon: l, iconOnly: u = !1, compact: d = !1, lastUsed: f = !1, lastUsedSlot: p, lastUsedLabel: m = "Last used", helperText: h, children: g, className: _, size: v, fullWidth: y = !1, ...x }, S) => {
|
|
83
|
+
let C = v ?? "md", O = b[r], k = E[C] ?? 18, A = t(l) ?? /* @__PURE__ */ i(O, {
|
|
84
|
+
size: k,
|
|
85
|
+
"aria-hidden": !0
|
|
86
|
+
}), j = g ?? w(r, o, d), M = s ?? (c === "outline" ? "outline" : "solid"), N = T(r, o), P = u || d || f ? `${N}${f ? " (last used)" : ""}` : void 0, F = /* @__PURE__ */ i("span", {
|
|
87
|
+
className: "pointer-events-none inline-flex items-center rounded-pill bg-accent-9 text-accent-fg px-2 py-1 text-[9px] leading-none font-semibold uppercase tracking-wide shadow-overlay",
|
|
88
|
+
children: m
|
|
89
|
+
}), I = (typeof p == "function" ? p({ label: m }) : p) ?? F, L = /* @__PURE__ */ i(n, {
|
|
90
|
+
ref: S,
|
|
91
|
+
variant: M,
|
|
92
|
+
color: "neutral",
|
|
93
|
+
size: u ? D[C] ?? "icon-md" : C,
|
|
94
|
+
fullWidth: y && !u,
|
|
95
|
+
startIcon: u ? void 0 : A,
|
|
96
|
+
"aria-label": P,
|
|
97
|
+
"data-provider": r,
|
|
98
|
+
"data-oauth-variant": M,
|
|
99
|
+
"data-last-used": f || void 0,
|
|
100
|
+
className: _,
|
|
101
|
+
...x,
|
|
102
|
+
children: u ? A : j
|
|
103
|
+
}), R = f && !u;
|
|
104
|
+
return !R && !h ? L : /* @__PURE__ */ a("div", {
|
|
105
|
+
className: e("relative inline-flex flex-col", y && "w-full"),
|
|
106
|
+
children: [
|
|
107
|
+
L,
|
|
108
|
+
R ? /* @__PURE__ */ i("span", {
|
|
109
|
+
"aria-hidden": "true",
|
|
110
|
+
"data-last-used-badge": "",
|
|
111
|
+
className: "pointer-events-none absolute -top-[10px] -right-2 z-10",
|
|
112
|
+
children: I
|
|
113
|
+
}) : null,
|
|
114
|
+
h ? /* @__PURE__ */ i("span", {
|
|
115
|
+
className: "mt-ds-02 text-ds-sm text-surface-fg-subtle",
|
|
116
|
+
children: h
|
|
117
|
+
}) : null
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
O.displayName = "OAuthButton";
|
|
122
|
+
var k = r.forwardRef(({ orientation: t = "vertical", gap: n = "ds-03", fullWidth: a = !0, reorderLastUsedFirst: o = !1, className: s, children: c, ...l }, u) => {
|
|
123
|
+
let d = n === "ds-02" ? "gap-ds-02" : n === "ds-04" ? "gap-ds-04" : "gap-ds-03", f = t === "vertical" && a, p = r.useMemo(() => {
|
|
124
|
+
if (!o) return c;
|
|
125
|
+
let e = r.Children.toArray(c), t = e.findIndex((e) => r.isValidElement(e) && e.props?.lastUsed);
|
|
126
|
+
if (t <= 0) return c;
|
|
127
|
+
let n = [...e], [i] = n.splice(t, 1);
|
|
128
|
+
return n.unshift(i), n;
|
|
129
|
+
}, [c, o]);
|
|
130
|
+
return /* @__PURE__ */ i("div", {
|
|
131
|
+
ref: u,
|
|
132
|
+
className: e("flex", t === "vertical" ? "flex-col" : "flex-row flex-wrap items-center", d, f && "w-full [&>*]:w-full [&_button]:w-full", s),
|
|
133
|
+
...l,
|
|
134
|
+
children: p
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
k.displayName = "OAuthGroup";
|
|
138
|
+
var A = r.forwardRef(({ label: t = "or", className: n, ...r }, o) => /* @__PURE__ */ a("div", {
|
|
139
|
+
ref: o,
|
|
140
|
+
role: "separator",
|
|
141
|
+
"aria-orientation": "horizontal",
|
|
142
|
+
className: e("flex items-center gap-ds-03", n),
|
|
143
|
+
...r,
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ i("hr", {
|
|
146
|
+
"aria-hidden": "true",
|
|
147
|
+
className: "flex-1 border-t border-surface-border-subtle"
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ i("span", {
|
|
150
|
+
className: "text-ds-sm text-surface-fg-subtle uppercase tracking-wide",
|
|
151
|
+
children: t
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ i("hr", {
|
|
154
|
+
"aria-hidden": "true",
|
|
155
|
+
className: "flex-1 border-t border-surface-border-subtle"
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
}));
|
|
159
|
+
A.displayName = "OAuthDivider";
|
|
160
|
+
var j = r.forwardRef(({ provider: r, accountLabel: o, connected: s, onAction: c, onActionAsync: l, actionLabel: u, disabled: d, icon: f, className: p, ...m }, h) => {
|
|
161
|
+
let g = b[r], _ = y[r], v = u ?? (s ? "Disconnect" : `Connect ${_}`);
|
|
162
|
+
return /* @__PURE__ */ a("div", {
|
|
163
|
+
ref: h,
|
|
164
|
+
className: e("flex items-center justify-between gap-ds-04 py-ds-04 px-ds-04 rounded-surface border border-surface-border bg-surface-raised", p),
|
|
165
|
+
"data-provider": r,
|
|
166
|
+
"data-connected": s ? "true" : "false",
|
|
167
|
+
...m,
|
|
168
|
+
children: [/* @__PURE__ */ a("div", {
|
|
169
|
+
className: "flex items-center gap-ds-03 min-w-0",
|
|
170
|
+
children: [t(f) ?? /* @__PURE__ */ i(g, {
|
|
171
|
+
size: 24,
|
|
172
|
+
"aria-hidden": !0
|
|
173
|
+
}), /* @__PURE__ */ a("div", {
|
|
174
|
+
className: "flex flex-col min-w-0",
|
|
175
|
+
children: [/* @__PURE__ */ i("span", {
|
|
176
|
+
className: "text-ds-md font-semibold text-surface-fg truncate",
|
|
177
|
+
children: _
|
|
178
|
+
}), o ? /* @__PURE__ */ i("span", {
|
|
179
|
+
className: "text-ds-sm text-surface-fg-muted truncate",
|
|
180
|
+
children: o
|
|
181
|
+
}) : s ? /* @__PURE__ */ i("span", {
|
|
182
|
+
className: "text-ds-sm text-success-11",
|
|
183
|
+
children: "Connected"
|
|
184
|
+
}) : /* @__PURE__ */ i("span", {
|
|
185
|
+
className: "text-ds-sm text-surface-fg-subtle",
|
|
186
|
+
children: "Not connected"
|
|
187
|
+
})]
|
|
188
|
+
})]
|
|
189
|
+
}), /* @__PURE__ */ i(n, {
|
|
190
|
+
size: "sm",
|
|
191
|
+
variant: s ? "soft" : "solid",
|
|
192
|
+
color: s ? "neutral" : "accent",
|
|
193
|
+
disabled: d,
|
|
194
|
+
onClick: c,
|
|
195
|
+
onClickAsync: l,
|
|
196
|
+
children: v
|
|
197
|
+
})]
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
j.displayName = "OAuthConnectionRow";
|
|
201
|
+
var M = r.forwardRef(({ provider: e, size: t = 18, ...n }, r) => {
|
|
202
|
+
let a = b[e];
|
|
203
|
+
return /* @__PURE__ */ i(a, {
|
|
204
|
+
ref: r,
|
|
205
|
+
size: t,
|
|
206
|
+
"aria-hidden": !0,
|
|
207
|
+
...n
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
M.displayName = "OAuthGlyph";
|
|
211
|
+
function N(e, t = "continue", n = !1) {
|
|
212
|
+
return w(e, t, n);
|
|
213
|
+
}
|
|
214
|
+
function P(e) {
|
|
215
|
+
return x(e);
|
|
216
|
+
}
|
|
217
|
+
var F = {
|
|
218
|
+
Button: O,
|
|
219
|
+
Group: k,
|
|
220
|
+
Divider: A,
|
|
221
|
+
ConnectionRow: j,
|
|
222
|
+
Glyph: M,
|
|
223
|
+
getLabel: N,
|
|
224
|
+
getName: P
|
|
225
|
+
};
|
|
226
|
+
//#endregion
|
|
227
|
+
export { M as a, P as c, A as i, O as n, k as o, j as r, N as s, F as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-button.js","names":[],"sources":["../../src/ui/oauth-button/oauth-button.tsx"],"sourcesContent":["'use client'\n\nimport {\n IconBrandApple,\n IconBrandDiscord,\n IconBrandFacebook,\n IconBrandGithub,\n IconBrandGitlab,\n IconBrandGoogleFilled,\n IconBrandLinkedin,\n IconBrandSlack,\n IconBrandWindows,\n IconBrandXFilled,\n IconFingerprint,\n IconKey,\n IconMail,\n} from '@tabler/icons-react'\nimport * as React from 'react'\n\nimport { Button, type ButtonProps } from '../button'\nimport type { IconInput } from '../lib/icon-input'\nimport { normalizeIcon } from '../lib/normalize-icon'\nimport { cn } from '../lib/utils'\n\n// ── Types ───────────────────────────────────────────────────────\n\nexport type OAuthProvider =\n | 'google'\n | 'apple'\n | 'github'\n | 'microsoft'\n | 'x'\n | 'linkedin'\n | 'facebook'\n | 'discord'\n | 'slack'\n | 'gitlab'\n | 'sso'\n | 'email'\n | 'passkey'\n\nexport type OAuthIntent = 'continue' | 'signin' | 'signup'\n\n/**\n * Visual treatment — 1:1 with Button's variant axis. OAuthButton is a thin\n * wrapper over Button, so every variant renders pixel-for-pixel identical\n * to a regular Button at the same variant + size. Brand identity lives in\n * the glyph (override via `icon` for a brand-multicolour SVG), not the\n * button surface.\n *\n * - `solid` (default) | `soft` | `outline` | `ghost`\n */\nexport type OAuthVariant = 'solid' | 'soft' | 'outline' | 'ghost'\n\n/** @deprecated Use `OAuthVariant`. brand/dark map to solid; outline passes through. */\nexport type OAuthAppearance = 'brand' | 'outline' | 'dark'\n\n// ── Static metadata ─────────────────────────────────────────────\n\nconst providerDisplay: Record<OAuthProvider, string> = {\n google: 'Google',\n apple: 'Apple',\n github: 'GitHub',\n microsoft: 'Microsoft',\n x: 'X',\n linkedin: 'LinkedIn',\n facebook: 'Facebook',\n discord: 'Discord',\n slack: 'Slack',\n gitlab: 'GitLab',\n sso: 'SSO',\n email: 'email',\n passkey: 'a passkey',\n}\n\n// Default glyph per provider — sourced from Tabler (already a peer dep).\n// Consumer can override with the `icon` prop to drop in a brand-multicolour SVG.\nconst providerIcon: Record<OAuthProvider, React.ComponentType<{ size?: number | string; 'aria-hidden'?: boolean }>> = {\n google: IconBrandGoogleFilled,\n apple: IconBrandApple,\n github: IconBrandGithub,\n microsoft: IconBrandWindows,\n x: IconBrandXFilled,\n linkedin: IconBrandLinkedin,\n facebook: IconBrandFacebook,\n discord: IconBrandDiscord,\n slack: IconBrandSlack,\n gitlab: IconBrandGitlab,\n sso: IconKey,\n email: IconMail,\n passkey: IconFingerprint,\n}\n\nfunction providerName(provider: OAuthProvider): string {\n // Display name for `compact` mode — drops the \"a\" article on passkey.\n return provider === 'passkey' ? 'Passkey' : providerDisplay[provider]\n}\n\nfunction defaultLabel(provider: OAuthProvider, intent: OAuthIntent, compact: boolean): string {\n if (compact) return providerName(provider)\n const name = providerDisplay[provider]\n switch (intent) {\n case 'signin':\n return `Sign in with ${name}`\n case 'signup':\n return `Sign up with ${name}`\n case 'continue':\n default:\n return `Continue with ${name}`\n }\n}\n\nconst providerCopyOverride: Partial<Record<OAuthProvider, Partial<Record<OAuthIntent, string>>>> = {\n passkey: {\n continue: 'Continue with a passkey',\n signin: 'Sign in with a passkey',\n signup: 'Create a passkey',\n },\n}\n\nfunction resolveLabel(provider: OAuthProvider, intent: OAuthIntent, compact: boolean): string {\n if (compact) return providerName(provider)\n return providerCopyOverride[provider]?.[intent] ?? defaultLabel(provider, intent, compact)\n}\n\n/** Long-form name used for aria-label even when compact label is rendered. */\nfunction resolveAriaName(provider: OAuthProvider, intent: OAuthIntent): string {\n return providerCopyOverride[provider]?.[intent] ?? defaultLabel(provider, intent, false)\n}\n\n// **Visual treatment:** OAuthButton is a thin wrapper over `<Button>` — every\n// height, padding, radius, border, hover, focus, active, and disabled state is\n// the DS Button's. We do NOT inject per-provider hex backgrounds: brand\n// identity lives in the glyph (Tabler default; consumer can pass a real\n// multicolour SVG via `icon`). This guarantees pixel-for-pixel consistency\n// with every other button in the system at every variant.\n\nconst ICON_PX: Record<string, number> = {\n xs: 14,\n sm: 16,\n md: 18,\n lg: 20,\n 'compact-xs': 14,\n 'compact-sm': 14,\n 'compact-md': 16,\n icon: 18,\n 'icon-xs': 14,\n 'icon-sm': 16,\n 'icon-md': 18,\n 'icon-lg': 20,\n}\n\nconst ICON_ONLY_SIZE: Record<string, NonNullable<ButtonProps['size']>> = {\n xs: 'icon-xs',\n sm: 'icon-sm',\n md: 'icon-md',\n lg: 'icon-lg',\n 'compact-xs': 'icon-xs',\n 'compact-sm': 'icon-sm',\n 'compact-md': 'icon-md',\n}\n\n// ── Component ───────────────────────────────────────────────────\n\n/**\n * Props for `OAuthButton` — a brand-aware sign-in button for OAuth providers.\n *\n * Composes on top of `<Button>`, inheriting `size`, `loading`, `onClickAsync`,\n * `fullWidth`, and async state machinery. The provider's icon, label, and\n * brand-coloured styling are derived from the `provider` prop.\n *\n * **Provider** (required): includes 10 social providers + 3 generic\n * identifiers (`sso` enterprise, `email` magic-link, `passkey` WebAuthn).\n *\n * **Intent**: drives the verb in the label.\n * - `continue` (default) — \"Continue with Google\" — works on login and signup.\n * - `signin` — \"Sign in with Google\".\n * - `signup` — \"Sign up with Google\".\n *\n * **Appearance**: visual treatment.\n * - `brand` (default) — provider's brand background colour.\n * - `outline` — DS-neutral outline with monochrome glyph. Best for uniform rows.\n * - `dark` — unified Apple-style across all providers for visual consistency.\n *\n * **icon**: override the default Tabler glyph (e.g. drop in the provider's\n * official multicolour SVG downloaded from their brand page).\n *\n * **iconOnly**: render a square icon button. Provider name kept in `aria-label`.\n *\n * **lastUsed**: shows a small \"Last used\" pill above the button — high-converting\n * UX hint. Consumer tracks which provider the user picked previously.\n *\n * **helperText**: optional reassurance copy rendered below the button.\n *\n * @example\n * <OAuthButton provider=\"google\" intent=\"continue\" fullWidth onClickAsync={signInWithGoogle} />\n *\n * @example\n * // True brand-multicolour glyph:\n * <OAuthButton provider=\"google\" icon={<GoogleGSvg />} />\n *\n * @example\n * <OAuthGroup>\n * <OAuthButton provider=\"google\" appearance=\"dark\" />\n * <OAuthButton provider=\"apple\" appearance=\"dark\" />\n * <OAuthButton provider=\"github\" appearance=\"dark\" />\n * </OAuthGroup>\n */\nexport interface OAuthButtonProps\n extends Omit<\n ButtonProps,\n 'variant' | 'color' | 'startIcon' | 'endIcon' | 'shape' | 'children'\n > {\n /** OAuth provider this button represents */\n provider: OAuthProvider\n /** Verb in the default label. Default: `continue` */\n intent?: OAuthIntent\n /**\n * Visual treatment. Default: `solid`. Mirrors Button's variant axis with\n * an extra `dark` for row coherence across providers.\n */\n variant?: OAuthVariant\n /** @deprecated Use `variant`. `appearance=\"brand\"` maps to `variant=\"solid\"`. */\n appearance?: OAuthAppearance\n /** Override the default glyph (e.g. brand-multicolour SVG). Accepts any `IconInput`. */\n icon?: IconInput\n /** Render a compact icon-only button (provider name kept in aria-label) */\n iconOnly?: boolean\n /**\n * Short label — renders just the provider name (\"Google\") instead of the\n * full \"Continue with Google\". Use under an explicit \"Or sign in with\"\n * divider where the verb is already established. aria-label still gets the\n * full long form for screen readers.\n */\n compact?: boolean\n /**\n * Show \"Last used\" hint — a small pill anchored to the top-right corner of\n * the button (sits ON the corner, half outside the button bounds).\n */\n lastUsed?: boolean\n /**\n * Customise the \"Last used\" badge. Pass a ReactNode to replace the entire\n * pill (use this for custom copy, icons, or styling), or a render fn that\n * receives the default props for tweaks. Only rendered when `lastUsed` is\n * also set so the wrapper / aria augmentation logic stays consistent.\n *\n * @example\n * <OAuthButton provider=\"google\" lastUsed lastUsedSlot={<MyBadge />} />\n */\n lastUsedSlot?: React.ReactNode | ((defaults: { label: string }) => React.ReactNode)\n /** Override the visible badge label text. Default: \"Last used\". */\n lastUsedLabel?: string\n /** Reassurance copy rendered below the button */\n helperText?: React.ReactNode\n /** Override the default label entirely (i18n / custom copy) */\n children?: React.ReactNode\n}\n\nconst OAuthButton = React.forwardRef<HTMLButtonElement, OAuthButtonProps>(\n (\n {\n provider,\n intent = 'continue',\n variant: variantProp,\n appearance,\n icon,\n iconOnly = false,\n compact = false,\n lastUsed = false,\n lastUsedSlot,\n lastUsedLabel = 'Last used',\n helperText,\n children,\n className,\n size: sizeProp,\n fullWidth = false,\n ...buttonProps\n },\n ref,\n ) => {\n const size: NonNullable<ButtonProps['size']> = sizeProp ?? 'md'\n const DefaultGlyph = providerIcon[provider]\n const iconPx = ICON_PX[size] ?? 18\n const glyphNode = normalizeIcon(icon) ?? <DefaultGlyph size={iconPx} aria-hidden />\n const label = children ?? resolveLabel(provider, intent, compact)\n\n // Resolve final variant. `appearance` is a deprecated alias mapped to\n // the closest DS variant — brand/dark both collapse to solid since\n // OAuthButton no longer injects per-provider brand colours.\n const variant: OAuthVariant =\n variantProp ??\n (appearance === 'outline' ? 'outline' : 'solid')\n\n // aria-label always carries the long-form name so screen readers stay\n // informative even when the visual label is compact or icon-only.\n const longName = resolveAriaName(provider, intent)\n const ariaLabelForButton = iconOnly || compact || lastUsed\n ? `${longName}${lastUsed ? ' (last used)' : ''}`\n : undefined\n\n // \"Last used\" badge — sits ON the top-right corner of the button,\n // overlapping the button edge for the classic \"notification badge\"\n // look. Rendered as a SIBLING to Button (not a child) because Button's\n // `overflow-hidden` would clip a child poking outside the corner.\n //\n // Composable: pass `lastUsedSlot` (ReactNode or render fn) to replace\n // the default pill. `lastUsedLabel` swaps just the text inside it.\n // aria-label augments the accessible name with \"(last used)\".\n const defaultBadge = (\n <span className=\"pointer-events-none inline-flex items-center rounded-pill bg-accent-9 text-accent-fg px-2 py-1 text-[9px] leading-none font-semibold uppercase tracking-wide shadow-overlay\">\n {lastUsedLabel}\n </span>\n )\n const customBadge =\n typeof lastUsedSlot === 'function' ? lastUsedSlot({ label: lastUsedLabel }) : lastUsedSlot\n const renderedBadge = customBadge ?? defaultBadge\n\n const buttonEl = (\n <Button\n ref={ref}\n variant={variant}\n color=\"neutral\"\n size={iconOnly ? ICON_ONLY_SIZE[size] ?? 'icon-md' : size}\n fullWidth={fullWidth && !iconOnly}\n startIcon={iconOnly ? undefined : (glyphNode as React.ReactElement)}\n aria-label={ariaLabelForButton}\n data-provider={provider}\n data-oauth-variant={variant}\n data-last-used={lastUsed || undefined}\n className={className}\n {...buttonProps}\n >\n {iconOnly ? glyphNode : label}\n </Button>\n )\n\n const showBadge = lastUsed && !iconOnly\n if (!showBadge && !helperText) return buttonEl\n\n return (\n <div className={cn('relative inline-flex flex-col', fullWidth && 'w-full')}>\n {buttonEl}\n {showBadge ? (\n <span\n aria-hidden=\"true\"\n data-last-used-badge=\"\"\n className=\"pointer-events-none absolute -top-[10px] -right-2 z-10\"\n >\n {renderedBadge}\n </span>\n ) : null}\n {helperText ? (\n <span className=\"mt-ds-02 text-ds-sm text-surface-fg-subtle\">{helperText}</span>\n ) : null}\n </div>\n )\n },\n)\nOAuthButton.displayName = 'OAuthButton'\n\nexport { OAuthButton }\n\n// ── OAuthGroup ─────────────────────────────────────────────────\n\nexport interface OAuthGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout. `vertical` (default) stacks full-width buttons. */\n orientation?: 'vertical' | 'horizontal'\n /** Gap token between buttons. Default: `ds-03` */\n gap?: 'ds-02' | 'ds-03' | 'ds-04'\n /** Stretch children to fill width (vertical only). Default: true */\n fullWidth?: boolean\n /**\n * Move any child with `lastUsed` to position 0. Stripe-style ordering — the\n * provider the user picked last time becomes the top option, which gives a\n * stronger conversion lift than a \"Last used\" badge does on its own.\n * Default: false (preserve source order).\n */\n reorderLastUsedFirst?: boolean\n}\n\n/**\n * Stacked layout wrapper for OAuth buttons with consistent spacing. Defaults to\n * vertical, full-width children — the dominant sign-in pattern. For an icon-only\n * row, set `orientation=\"horizontal\"` and use `<OAuthButton iconOnly />`.\n */\nconst OAuthGroup = React.forwardRef<HTMLDivElement, OAuthGroupProps>(\n (\n {\n orientation = 'vertical',\n gap = 'ds-03',\n fullWidth = true,\n reorderLastUsedFirst = false,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const gapClass =\n gap === 'ds-02' ? 'gap-ds-02' : gap === 'ds-04' ? 'gap-ds-04' : 'gap-ds-03'\n const stretch = orientation === 'vertical' && fullWidth\n\n const ordered = React.useMemo(() => {\n if (!reorderLastUsedFirst) return children\n const arr = React.Children.toArray(children)\n const lastUsedIdx = arr.findIndex(\n (c) => React.isValidElement(c) && (c.props as { lastUsed?: boolean })?.lastUsed,\n )\n if (lastUsedIdx <= 0) return children\n const next = [...arr]\n const [pulled] = next.splice(lastUsedIdx, 1)\n next.unshift(pulled)\n return next\n }, [children, reorderLastUsedFirst])\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex',\n orientation === 'vertical' ? 'flex-col' : 'flex-row flex-wrap items-center',\n gapClass,\n // Force both the direct wrapper AND the leaf <button> to stretch.\n // OAuthButton's outer wrapper picks up [&>*]:w-full; the button itself\n // sits two layers deep when a helperText wrapper exists, so\n // [&_button]:w-full covers both cases (wrapped + unwrapped) without\n // affecting unrelated descendants — only Buttons live inside.\n stretch && 'w-full [&>*]:w-full [&_button]:w-full',\n className,\n )}\n {...props}\n >\n {ordered}\n </div>\n )\n },\n)\nOAuthGroup.displayName = 'OAuthGroup'\n\nexport { OAuthGroup }\n\n// ── OAuthDivider ───────────────────────────────────────────────\n\nexport interface OAuthDividerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Text between the rules. Default: \"or\" */\n label?: React.ReactNode\n}\n\nconst OAuthDivider = React.forwardRef<HTMLDivElement, OAuthDividerProps>(\n ({ label = 'or', className, ...props }, ref) => (\n <div\n ref={ref}\n role=\"separator\"\n aria-orientation=\"horizontal\"\n className={cn('flex items-center gap-ds-03', className)}\n {...props}\n >\n <hr aria-hidden=\"true\" className=\"flex-1 border-t border-surface-border-subtle\" />\n <span className=\"text-ds-sm text-surface-fg-subtle uppercase tracking-wide\">{label}</span>\n <hr aria-hidden=\"true\" className=\"flex-1 border-t border-surface-border-subtle\" />\n </div>\n ),\n)\nOAuthDivider.displayName = 'OAuthDivider'\n\nexport { OAuthDivider }\n\n// ── OAuthConnectionRow (settings page — linked state) ──────────\n\nexport interface OAuthConnectionRowProps extends React.HTMLAttributes<HTMLDivElement> {\n provider: OAuthProvider\n /** Optional account identifier shown next to the provider name (e.g. email) */\n accountLabel?: React.ReactNode\n /** Whether the provider is currently linked */\n connected: boolean\n /** Click handler for the connect/disconnect action */\n onAction?: (e: React.MouseEvent<HTMLButtonElement>) => void\n /** Promise-returning click handler — uses Button's async state machine */\n onActionAsync?: (e: React.MouseEvent<HTMLButtonElement>) => Promise<void>\n /** Override the action label */\n actionLabel?: React.ReactNode\n /** Disable the action button */\n disabled?: boolean\n /** Override the default glyph. Accepts any `IconInput`. */\n icon?: IconInput\n}\n\n/**\n * Settings-page row representing a linked OAuth provider. Different surface\n * from sign-in: this is an existing connection the user can disconnect or\n * (re-)connect. Renders glyph + provider name + optional account label + a\n * connect/disconnect button.\n */\nconst OAuthConnectionRow = React.forwardRef<HTMLDivElement, OAuthConnectionRowProps>(\n (\n {\n provider,\n accountLabel,\n connected,\n onAction,\n onActionAsync,\n actionLabel,\n disabled,\n icon,\n className,\n ...props\n },\n ref,\n ) => {\n const DefaultGlyph = providerIcon[provider]\n const name = providerDisplay[provider]\n const resolvedLabel = actionLabel ?? (connected ? 'Disconnect' : `Connect ${name}`)\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex items-center justify-between gap-ds-04 py-ds-04 px-ds-04 rounded-surface border border-surface-border bg-surface-raised',\n className,\n )}\n data-provider={provider}\n data-connected={connected ? 'true' : 'false'}\n {...props}\n >\n <div className=\"flex items-center gap-ds-03 min-w-0\">\n {normalizeIcon(icon) ?? <DefaultGlyph size={24} aria-hidden />}\n <div className=\"flex flex-col min-w-0\">\n <span className=\"text-ds-md font-semibold text-surface-fg truncate\">{name}</span>\n {accountLabel ? (\n <span className=\"text-ds-sm text-surface-fg-muted truncate\">{accountLabel}</span>\n ) : connected ? (\n <span className=\"text-ds-sm text-success-11\">Connected</span>\n ) : (\n <span className=\"text-ds-sm text-surface-fg-subtle\">Not connected</span>\n )}\n </div>\n </div>\n <Button\n size=\"sm\"\n variant={connected ? 'soft' : 'solid'}\n color={connected ? 'neutral' : 'accent'}\n disabled={disabled}\n onClick={onAction}\n onClickAsync={onActionAsync}\n >\n {resolvedLabel}\n </Button>\n </div>\n )\n },\n)\nOAuthConnectionRow.displayName = 'OAuthConnectionRow'\n\nexport { OAuthConnectionRow }\n\n// ── OAuthGlyph (atomic glyph render) ───────────────────────────\n\nexport interface OAuthGlyphProps extends Omit<React.SVGAttributes<SVGElement>, 'children'> {\n provider: OAuthProvider\n /** Glyph pixel size. Default 18. */\n size?: number\n}\n\n/**\n * Render just the provider glyph — useful when building a custom OAuth\n * trigger (e.g. an icon-button inside a Tooltip, or a provider chip on a\n * profile card). Defaults to the Tabler glyph; the icon prop on\n * `OAuthButton` is the right escape hatch for the brand multi-colour mark.\n */\nconst OAuthGlyph = React.forwardRef<SVGSVGElement, OAuthGlyphProps>(\n ({ provider, size = 18, ...props }, ref) => {\n const Cmp = providerIcon[provider] as React.ComponentType<{\n size?: number\n 'aria-hidden'?: boolean\n ref?: React.Ref<SVGSVGElement>\n }>\n return <Cmp ref={ref} size={size} aria-hidden {...(props as Record<string, unknown>)} />\n },\n)\nOAuthGlyph.displayName = 'OAuthGlyph'\n\nexport { OAuthGlyph }\n\n// ── Static helpers (composable building blocks) ────────────────\n\n/**\n * Resolve the visible label for a provider × intent combo. Useful when\n * rendering OAuth UIs outside of `OAuthButton` (e.g. a Confirm dialog\n * \"Disconnect from Google?\" title).\n */\nexport function getOAuthLabel(provider: OAuthProvider, intent: OAuthIntent = 'continue', compact = false): string {\n return resolveLabel(provider, intent, compact)\n}\n\n/** Display name for a provider, ready for sentence interpolation. */\nexport function getOAuthName(provider: OAuthProvider): string {\n return providerName(provider)\n}\n\n// ── Compound namespace ─────────────────────────────────────────\n\n/**\n * Namespaced API — drop-in alternative to importing each piece separately.\n *\n * @example\n * import { OAuth } from '@devalok/shilp-sutra/ui/oauth-button'\n *\n * <OAuth.Group reorderLastUsedFirst>\n * <OAuth.Button provider=\"google\" lastUsed />\n * <OAuth.Button provider=\"passkey\" />\n * <OAuth.Divider />\n * <OAuth.Button provider=\"sso\" variant=\"ghost\" />\n * </OAuth.Group>\n */\nexport const OAuth = {\n Button: OAuthButton,\n Group: OAuthGroup,\n Divider: OAuthDivider,\n ConnectionRow: OAuthConnectionRow,\n Glyph: OAuthGlyph,\n getLabel: getOAuthLabel,\n getName: getOAuthName,\n} as const\n"],"mappings":"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"}
|
|
@@ -6299,74 +6299,12 @@ var Cg = t.forwardRef((e, t) => {
|
|
|
6299
6299
|
e ? o.onItemActivate(r) : o.onItemDeactivate(r);
|
|
6300
6300
|
}
|
|
6301
6301
|
});
|
|
6302
|
-
}), wg = pg, Tg = Sg, Eg = "
|
|
6303
|
-
let {
|
|
6304
|
-
(i || i === 0) && !Rg(i) && console.error(Bg(`${i}`, "Progress"));
|
|
6305
|
-
let c = Rg(i) ? i : Dg;
|
|
6306
|
-
r !== null && !zg(r, c) && console.error(Vg(`${r}`, "Progress"));
|
|
6307
|
-
let l = zg(r, c) ? r : null, u = Lg(l) ? o(l, c) : void 0;
|
|
6308
|
-
return /* @__PURE__ */ a(Ag, {
|
|
6309
|
-
scope: n,
|
|
6310
|
-
value: l,
|
|
6311
|
-
max: c,
|
|
6312
|
-
children: /* @__PURE__ */ a(F.div, {
|
|
6313
|
-
"aria-valuemax": c,
|
|
6314
|
-
"aria-valuemin": 0,
|
|
6315
|
-
"aria-valuenow": Lg(l) ? l : void 0,
|
|
6316
|
-
"aria-valuetext": u,
|
|
6317
|
-
role: "progressbar",
|
|
6318
|
-
"data-state": Ig(l, c),
|
|
6319
|
-
"data-value": l ?? void 0,
|
|
6320
|
-
"data-max": c,
|
|
6321
|
-
...s,
|
|
6322
|
-
ref: t
|
|
6323
|
-
})
|
|
6324
|
-
});
|
|
6325
|
-
});
|
|
6326
|
-
Mg.displayName = Eg;
|
|
6327
|
-
var Ng = "ProgressIndicator", Pg = e.forwardRef((e, t) => {
|
|
6328
|
-
let { __scopeProgress: n, ...r } = e, i = jg(Ng, n);
|
|
6329
|
-
return /* @__PURE__ */ a(F.div, {
|
|
6330
|
-
"data-state": Ig(i.value, i.max),
|
|
6331
|
-
"data-value": i.value ?? void 0,
|
|
6332
|
-
"data-max": i.max,
|
|
6333
|
-
...r,
|
|
6334
|
-
ref: t
|
|
6335
|
-
});
|
|
6336
|
-
});
|
|
6337
|
-
Pg.displayName = Ng;
|
|
6338
|
-
function Fg(e, t) {
|
|
6339
|
-
return `${Math.round(e / t * 100)}%`;
|
|
6340
|
-
}
|
|
6341
|
-
function Ig(e, t) {
|
|
6342
|
-
return e == null ? "indeterminate" : e === t ? "complete" : "loading";
|
|
6343
|
-
}
|
|
6344
|
-
function Lg(e) {
|
|
6345
|
-
return typeof e == "number";
|
|
6346
|
-
}
|
|
6347
|
-
function Rg(e) {
|
|
6348
|
-
return Lg(e) && !isNaN(e) && e > 0;
|
|
6349
|
-
}
|
|
6350
|
-
function zg(e, t) {
|
|
6351
|
-
return Lg(e) && !isNaN(e) && e <= t && e >= 0;
|
|
6352
|
-
}
|
|
6353
|
-
function Bg(e, t) {
|
|
6354
|
-
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Dg}\`.`;
|
|
6355
|
-
}
|
|
6356
|
-
function Vg(e, t) {
|
|
6357
|
-
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
6358
|
-
- a positive number
|
|
6359
|
-
- less than the value passed to \`max\` (or ${Dg} if no \`max\` prop is set)
|
|
6360
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
6361
|
-
|
|
6362
|
-
Defaulting to \`null\`.`;
|
|
6363
|
-
}
|
|
6364
|
-
var Hg = Mg, Ug = Pg, [Wg, Gg] = u("Tooltip", [Ds]), Kg = Ds(), qg = "TooltipProvider", Jg = 700, Yg = "tooltip.open", [Xg, Zg] = Wg(qg), Qg = (t) => {
|
|
6365
|
-
let { __scopeTooltip: n, delayDuration: r = Jg, skipDelayDuration: i = 300, disableHoverableContent: o = !1, children: s } = t, c = e.useRef(!0), l = e.useRef(!1), u = e.useRef(0);
|
|
6302
|
+
}), wg = pg, Tg = Sg, [Eg, Dg] = u("Tooltip", [Ds]), Og = Ds(), kg = "TooltipProvider", Ag = 700, jg = "tooltip.open", [Mg, Ng] = Eg(kg), Pg = (t) => {
|
|
6303
|
+
let { __scopeTooltip: n, delayDuration: r = Ag, skipDelayDuration: i = 300, disableHoverableContent: o = !1, children: s } = t, c = e.useRef(!0), l = e.useRef(!1), u = e.useRef(0);
|
|
6366
6304
|
return e.useEffect(() => {
|
|
6367
6305
|
let e = u.current;
|
|
6368
6306
|
return () => window.clearTimeout(e);
|
|
6369
|
-
}, []), /* @__PURE__ */ a(
|
|
6307
|
+
}, []), /* @__PURE__ */ a(Mg, {
|
|
6370
6308
|
scope: n,
|
|
6371
6309
|
isOpenDelayedRef: c,
|
|
6372
6310
|
delayDuration: r,
|
|
@@ -6384,15 +6322,15 @@ var Hg = Mg, Ug = Pg, [Wg, Gg] = u("Tooltip", [Ds]), Kg = Ds(), qg = "TooltipPro
|
|
|
6384
6322
|
children: s
|
|
6385
6323
|
});
|
|
6386
6324
|
};
|
|
6387
|
-
|
|
6388
|
-
var
|
|
6389
|
-
let { __scopeTooltip: n, children: r, open: i, defaultOpen: o, onOpenChange: s, disableHoverableContent: c, delayDuration: l } = t, u =
|
|
6325
|
+
Pg.displayName = kg;
|
|
6326
|
+
var Fg = "Tooltip", [Ig, Lg] = Eg(Fg), Rg = (t) => {
|
|
6327
|
+
let { __scopeTooltip: n, children: r, open: i, defaultOpen: o, onOpenChange: s, disableHoverableContent: c, delayDuration: l } = t, u = Ng(Fg, t.__scopeTooltip), d = Og(n), [f, p] = e.useState(null), m = R(), h = e.useRef(0), g = c ?? u.disableHoverableContent, _ = l ?? u.delayDuration, v = e.useRef(!1), [y, b] = M({
|
|
6390
6328
|
prop: i,
|
|
6391
6329
|
defaultProp: o ?? !1,
|
|
6392
6330
|
onChange: (e) => {
|
|
6393
|
-
e ? (u.onOpen(), document.dispatchEvent(new CustomEvent(
|
|
6331
|
+
e ? (u.onOpen(), document.dispatchEvent(new CustomEvent(jg))) : u.onClose(), s?.(e);
|
|
6394
6332
|
},
|
|
6395
|
-
caller:
|
|
6333
|
+
caller: Fg
|
|
6396
6334
|
}), x = e.useMemo(() => y ? v.current ? "delayed-open" : "instant-open" : "closed", [y]), S = e.useCallback(() => {
|
|
6397
6335
|
window.clearTimeout(h.current), h.current = 0, v.current = !1, b(!0);
|
|
6398
6336
|
}, [b]), C = e.useCallback(() => {
|
|
@@ -6406,7 +6344,7 @@ var $g = "Tooltip", [e_, t_] = Wg($g), n_ = (t) => {
|
|
|
6406
6344
|
h.current &&= (window.clearTimeout(h.current), 0);
|
|
6407
6345
|
}, []), /* @__PURE__ */ a(Us, {
|
|
6408
6346
|
...d,
|
|
6409
|
-
children: /* @__PURE__ */ a(
|
|
6347
|
+
children: /* @__PURE__ */ a(Ig, {
|
|
6410
6348
|
scope: n,
|
|
6411
6349
|
contentId: m,
|
|
6412
6350
|
open: y,
|
|
@@ -6430,9 +6368,9 @@ var $g = "Tooltip", [e_, t_] = Wg($g), n_ = (t) => {
|
|
|
6430
6368
|
})
|
|
6431
6369
|
});
|
|
6432
6370
|
};
|
|
6433
|
-
|
|
6434
|
-
var
|
|
6435
|
-
let { __scopeTooltip: r, ...i } = t, o =
|
|
6371
|
+
Rg.displayName = Fg;
|
|
6372
|
+
var zg = "TooltipTrigger", Bg = e.forwardRef((t, n) => {
|
|
6373
|
+
let { __scopeTooltip: r, ...i } = t, o = Lg(zg, r), s = Ng(zg, r), c = Og(r), l = m(n, e.useRef(null), o.onTriggerChange), u = e.useRef(!1), d = e.useRef(!1), f = e.useCallback(() => u.current = !1, []);
|
|
6436
6374
|
return e.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ a(Ws, {
|
|
6437
6375
|
asChild: !0,
|
|
6438
6376
|
...c,
|
|
@@ -6458,10 +6396,10 @@ var r_ = "TooltipTrigger", i_ = e.forwardRef((t, n) => {
|
|
|
6458
6396
|
})
|
|
6459
6397
|
});
|
|
6460
6398
|
});
|
|
6461
|
-
|
|
6462
|
-
var
|
|
6463
|
-
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, o =
|
|
6464
|
-
return /* @__PURE__ */ a(
|
|
6399
|
+
Bg.displayName = zg;
|
|
6400
|
+
var Vg = "TooltipPortal", [Hg, Ug] = Eg(Vg, { forceMount: void 0 }), Wg = (e) => {
|
|
6401
|
+
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, o = Lg(Vg, t);
|
|
6402
|
+
return /* @__PURE__ */ a(Hg, {
|
|
6465
6403
|
scope: t,
|
|
6466
6404
|
forceMount: n,
|
|
6467
6405
|
children: /* @__PURE__ */ a(I, {
|
|
@@ -6474,30 +6412,30 @@ var a_ = "TooltipPortal", [o_, s_] = Wg(a_, { forceMount: void 0 }), c_ = (e) =>
|
|
|
6474
6412
|
})
|
|
6475
6413
|
});
|
|
6476
6414
|
};
|
|
6477
|
-
|
|
6478
|
-
var
|
|
6479
|
-
let n =
|
|
6415
|
+
Wg.displayName = Vg;
|
|
6416
|
+
var Gg = "TooltipContent", Kg = e.forwardRef((e, t) => {
|
|
6417
|
+
let n = Ug(Gg, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...o } = e, s = Lg(Gg, e.__scopeTooltip);
|
|
6480
6418
|
return /* @__PURE__ */ a(I, {
|
|
6481
6419
|
present: r || s.open,
|
|
6482
|
-
children: s.disableHoverableContent ? /* @__PURE__ */ a(
|
|
6420
|
+
children: s.disableHoverableContent ? /* @__PURE__ */ a(Zg, {
|
|
6483
6421
|
side: i,
|
|
6484
6422
|
...o,
|
|
6485
6423
|
ref: t
|
|
6486
|
-
}) : /* @__PURE__ */ a(
|
|
6424
|
+
}) : /* @__PURE__ */ a(qg, {
|
|
6487
6425
|
side: i,
|
|
6488
6426
|
...o,
|
|
6489
6427
|
ref: t
|
|
6490
6428
|
})
|
|
6491
6429
|
});
|
|
6492
|
-
}),
|
|
6493
|
-
let r =
|
|
6430
|
+
}), qg = e.forwardRef((t, n) => {
|
|
6431
|
+
let r = Lg(Gg, t.__scopeTooltip), i = Ng(Gg, t.__scopeTooltip), o = e.useRef(null), s = m(n, o), [c, l] = e.useState(null), { trigger: u, onClose: d } = r, f = o.current, { onPointerInTransitChange: p } = i, h = e.useCallback(() => {
|
|
6494
6432
|
l(null), p(!1);
|
|
6495
6433
|
}, [p]), g = e.useCallback((e, t) => {
|
|
6496
6434
|
let n = e.currentTarget, r = {
|
|
6497
6435
|
x: e.clientX,
|
|
6498
6436
|
y: e.clientY
|
|
6499
|
-
}, i =
|
|
6500
|
-
l(
|
|
6437
|
+
}, i = t_(r, e_(r, n.getBoundingClientRect())), a = n_(t.getBoundingClientRect());
|
|
6438
|
+
l(i_([...i, ...a])), p(!0);
|
|
6501
6439
|
}, [p]);
|
|
6502
6440
|
return e.useEffect(() => () => h(), [h]), e.useEffect(() => {
|
|
6503
6441
|
if (u && f) {
|
|
@@ -6517,7 +6455,7 @@ var l_ = "TooltipContent", u_ = e.forwardRef((e, t) => {
|
|
|
6517
6455
|
let t = e.target, n = {
|
|
6518
6456
|
x: e.clientX,
|
|
6519
6457
|
y: e.clientY
|
|
6520
|
-
}, r = u?.contains(t) || f?.contains(t), i = !
|
|
6458
|
+
}, r = u?.contains(t) || f?.contains(t), i = !r_(n, c);
|
|
6521
6459
|
r ? h() : i && (h(), d());
|
|
6522
6460
|
};
|
|
6523
6461
|
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
@@ -6528,13 +6466,13 @@ var l_ = "TooltipContent", u_ = e.forwardRef((e, t) => {
|
|
|
6528
6466
|
c,
|
|
6529
6467
|
d,
|
|
6530
6468
|
h
|
|
6531
|
-
]), /* @__PURE__ */ a(
|
|
6469
|
+
]), /* @__PURE__ */ a(Zg, {
|
|
6532
6470
|
...t,
|
|
6533
6471
|
ref: s
|
|
6534
6472
|
});
|
|
6535
|
-
}), [
|
|
6536
|
-
let { __scopeTooltip: r, children: i, "aria-label": s, onEscapeKeyDown: c, onPointerDownOutside: l, ...u } = t, d =
|
|
6537
|
-
return e.useEffect(() => (document.addEventListener(
|
|
6473
|
+
}), [Jg, Yg] = Eg(Fg, { isInside: !1 }), Xg = /* @__PURE__ */ C("TooltipContent"), Zg = e.forwardRef((t, n) => {
|
|
6474
|
+
let { __scopeTooltip: r, children: i, "aria-label": s, onEscapeKeyDown: c, onPointerDownOutside: l, ...u } = t, d = Lg(Gg, r), f = Og(r), { onClose: p } = d;
|
|
6475
|
+
return e.useEffect(() => (document.addEventListener(jg, p), () => document.removeEventListener(jg, p)), [p]), e.useEffect(() => {
|
|
6538
6476
|
if (d.trigger) {
|
|
6539
6477
|
let e = (e) => {
|
|
6540
6478
|
e.target?.contains(d.trigger) && p();
|
|
@@ -6561,7 +6499,7 @@ var l_ = "TooltipContent", u_ = e.forwardRef((e, t) => {
|
|
|
6561
6499
|
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
6562
6500
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
6563
6501
|
},
|
|
6564
|
-
children: [/* @__PURE__ */ a(
|
|
6502
|
+
children: [/* @__PURE__ */ a(Xg, { children: i }), /* @__PURE__ */ a(Jg, {
|
|
6565
6503
|
scope: r,
|
|
6566
6504
|
isInside: !0,
|
|
6567
6505
|
children: /* @__PURE__ */ a(Mp, {
|
|
@@ -6573,17 +6511,17 @@ var l_ = "TooltipContent", u_ = e.forwardRef((e, t) => {
|
|
|
6573
6511
|
})
|
|
6574
6512
|
});
|
|
6575
6513
|
});
|
|
6576
|
-
|
|
6577
|
-
var
|
|
6578
|
-
let { __scopeTooltip: n, ...r } = e, i =
|
|
6579
|
-
return
|
|
6514
|
+
Kg.displayName = Gg;
|
|
6515
|
+
var Qg = "TooltipArrow", $g = e.forwardRef((e, t) => {
|
|
6516
|
+
let { __scopeTooltip: n, ...r } = e, i = Og(n);
|
|
6517
|
+
return Yg(Qg, n).isInside ? null : /* @__PURE__ */ a(Ks, {
|
|
6580
6518
|
...i,
|
|
6581
6519
|
...r,
|
|
6582
6520
|
ref: t
|
|
6583
6521
|
});
|
|
6584
6522
|
});
|
|
6585
|
-
|
|
6586
|
-
function
|
|
6523
|
+
$g.displayName = Qg;
|
|
6524
|
+
function e_(e, t) {
|
|
6587
6525
|
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
|
|
6588
6526
|
switch (Math.min(n, r, i, a)) {
|
|
6589
6527
|
case a: return "left";
|
|
@@ -6593,7 +6531,7 @@ function v_(e, t) {
|
|
|
6593
6531
|
default: throw Error("unreachable");
|
|
6594
6532
|
}
|
|
6595
6533
|
}
|
|
6596
|
-
function
|
|
6534
|
+
function t_(e, t, n = 5) {
|
|
6597
6535
|
let r = [];
|
|
6598
6536
|
switch (t) {
|
|
6599
6537
|
case "top":
|
|
@@ -6635,7 +6573,7 @@ function y_(e, t, n = 5) {
|
|
|
6635
6573
|
}
|
|
6636
6574
|
return r;
|
|
6637
6575
|
}
|
|
6638
|
-
function
|
|
6576
|
+
function n_(e) {
|
|
6639
6577
|
let { top: t, right: n, bottom: r, left: i } = e;
|
|
6640
6578
|
return [
|
|
6641
6579
|
{
|
|
@@ -6656,7 +6594,7 @@ function b_(e) {
|
|
|
6656
6594
|
}
|
|
6657
6595
|
];
|
|
6658
6596
|
}
|
|
6659
|
-
function
|
|
6597
|
+
function r_(e, t) {
|
|
6660
6598
|
let { x: n, y: r } = e, i = !1;
|
|
6661
6599
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
6662
6600
|
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
@@ -6664,11 +6602,11 @@ function x_(e, t) {
|
|
|
6664
6602
|
}
|
|
6665
6603
|
return i;
|
|
6666
6604
|
}
|
|
6667
|
-
function
|
|
6605
|
+
function i_(e) {
|
|
6668
6606
|
let t = e.slice();
|
|
6669
|
-
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)),
|
|
6607
|
+
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), a_(t);
|
|
6670
6608
|
}
|
|
6671
|
-
function
|
|
6609
|
+
function a_(e) {
|
|
6672
6610
|
if (e.length <= 1) return e.slice();
|
|
6673
6611
|
let t = [];
|
|
6674
6612
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -6693,7 +6631,69 @@ function C_(e) {
|
|
|
6693
6631
|
}
|
|
6694
6632
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
6695
6633
|
}
|
|
6696
|
-
var
|
|
6634
|
+
var o_ = Pg, s_ = Rg, c_ = Bg, l_ = Wg, u_ = Kg, d_ = "Progress", f_ = 100, [p_, m_] = u(d_), [h_, g_] = p_(d_), __ = e.forwardRef((e, t) => {
|
|
6635
|
+
let { __scopeProgress: n, value: r = null, max: i, getValueLabel: o = b_, ...s } = e;
|
|
6636
|
+
(i || i === 0) && !C_(i) && console.error(T_(`${i}`, "Progress"));
|
|
6637
|
+
let c = C_(i) ? i : f_;
|
|
6638
|
+
r !== null && !w_(r, c) && console.error(E_(`${r}`, "Progress"));
|
|
6639
|
+
let l = w_(r, c) ? r : null, u = S_(l) ? o(l, c) : void 0;
|
|
6640
|
+
return /* @__PURE__ */ a(h_, {
|
|
6641
|
+
scope: n,
|
|
6642
|
+
value: l,
|
|
6643
|
+
max: c,
|
|
6644
|
+
children: /* @__PURE__ */ a(F.div, {
|
|
6645
|
+
"aria-valuemax": c,
|
|
6646
|
+
"aria-valuemin": 0,
|
|
6647
|
+
"aria-valuenow": S_(l) ? l : void 0,
|
|
6648
|
+
"aria-valuetext": u,
|
|
6649
|
+
role: "progressbar",
|
|
6650
|
+
"data-state": x_(l, c),
|
|
6651
|
+
"data-value": l ?? void 0,
|
|
6652
|
+
"data-max": c,
|
|
6653
|
+
...s,
|
|
6654
|
+
ref: t
|
|
6655
|
+
})
|
|
6656
|
+
});
|
|
6657
|
+
});
|
|
6658
|
+
__.displayName = d_;
|
|
6659
|
+
var v_ = "ProgressIndicator", y_ = e.forwardRef((e, t) => {
|
|
6660
|
+
let { __scopeProgress: n, ...r } = e, i = g_(v_, n);
|
|
6661
|
+
return /* @__PURE__ */ a(F.div, {
|
|
6662
|
+
"data-state": x_(i.value, i.max),
|
|
6663
|
+
"data-value": i.value ?? void 0,
|
|
6664
|
+
"data-max": i.max,
|
|
6665
|
+
...r,
|
|
6666
|
+
ref: t
|
|
6667
|
+
});
|
|
6668
|
+
});
|
|
6669
|
+
y_.displayName = v_;
|
|
6670
|
+
function b_(e, t) {
|
|
6671
|
+
return `${Math.round(e / t * 100)}%`;
|
|
6672
|
+
}
|
|
6673
|
+
function x_(e, t) {
|
|
6674
|
+
return e == null ? "indeterminate" : e === t ? "complete" : "loading";
|
|
6675
|
+
}
|
|
6676
|
+
function S_(e) {
|
|
6677
|
+
return typeof e == "number";
|
|
6678
|
+
}
|
|
6679
|
+
function C_(e) {
|
|
6680
|
+
return S_(e) && !isNaN(e) && e > 0;
|
|
6681
|
+
}
|
|
6682
|
+
function w_(e, t) {
|
|
6683
|
+
return S_(e) && !isNaN(e) && e <= t && e >= 0;
|
|
6684
|
+
}
|
|
6685
|
+
function T_(e, t) {
|
|
6686
|
+
return `Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${f_}\`.`;
|
|
6687
|
+
}
|
|
6688
|
+
function E_(e, t) {
|
|
6689
|
+
return `Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
6690
|
+
- a positive number
|
|
6691
|
+
- less than the value passed to \`max\` (or ${f_} if no \`max\` prop is set)
|
|
6692
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
6693
|
+
|
|
6694
|
+
Defaulting to \`null\`.`;
|
|
6695
|
+
}
|
|
6696
|
+
var D_ = __, O_ = y_, k_ = "Menubar", [A_, j_, M_] = O(k_), [N_, P_] = u(k_, [M_, jc]), Q = nl(), F_ = jc(), [I_, L_] = N_(k_), R_ = e.forwardRef((t, n) => {
|
|
6697
6697
|
let { __scopeMenubar: r, value: i, onValueChange: o, defaultValue: s, loop: c = !0, dir: l, ...u } = t, d = Se(l), f = F_(r), [p, m] = M({
|
|
6698
6698
|
prop: i,
|
|
6699
6699
|
onChange: o,
|
|
@@ -7626,4 +7626,4 @@ function tb(e, t) {
|
|
|
7626
7626
|
}
|
|
7627
7627
|
var nb = qy, rb = Yy, ib = Zy, ab = $y;
|
|
7628
7628
|
//#endregion
|
|
7629
|
-
export { Km as $, ns as $t, D_ as A, Lr as An, gd as At, ag as B, ve as Bn, bd as Bt, bv as C, mi as Cn, hf as Ct, Pv as D, zr as Dn, bf as Dt, Fv as E, Hr as En, vf as Et,
|
|
7629
|
+
export { Km as $, ns as $t, D_ as A, Lr as An, gd as At, ag as B, ve as Bn, bd as Bt, bv as C, mi as Cn, hf as Ct, Pv as D, zr as Dn, bf as Dt, Fv as E, Hr as En, vf as Et, c_ as F, $e as Fn, md as Ft, Zm as G, bc as Gt, Uh as H, b as Hn, Cd as Ht, Tg as I, Qe as In, dd as It, th as J, yc as Jt, $m as K, Cc as Kt, wg as L, Ze as Ln, _d as Lt, l_ as M, Br as Mn, pd as Mt, o_ as N, Ir as Nn, hd as Nt, Sv as O, Vr as On, yf as Ot, s_ as P, tt as Pn, yd as Pt, Xm as Q, rs as Qt, cg as R, et as Rn, vd as Rt, Av as S, gi as Sn, mf as St, Nv as T, hi as Tn, _f as Tt, Kh as U, w as Un, Sd as Ut, Gh as V, ye as Vn, xd as Vt, Wh as W, ud as Wt, nh as X, ms as Xt, rh as Y, xc as Yt, eh as Z, gs as Zt, jv as _, yi as _n, uf as _t, zy as a, Mo as an, Qm as at, Cv as b, Si as bn, df as bt, Ly as c, go as cn, Tp as ct, Iy as d, So as dn, Gf as dt, ts as en, ah as et, By as f, wo as fn, Wf as ft, Dv as g, Ti as gn, lf as gt, Tv as h, xo as hn, pf as ht, ib as i, Ro as in, Jm as it, u_ as j, Fr as jn, fd as jt, O_ as k, Rr as kn, sf as kt, Py as l, Eo as ln, ep as lt, wv as m, yo as mn, Uf as mt, rb as n, Po as nn, oh as nt, Ry as o, Co as on, Dp as ot, Ov as p, _o as pn, Hf as pt, Ym as q, Sc as qt, nb as r, Fo as rn, qm as rt, Fy as s, vo as sn, Ep as st, ab as t, Lo as tn, ih as tt, Ny as u, bo as un, Jf as ut, Ev as v, bi as vn, ff as vt, Mv as w, xi as wn, of as wt, kv as x, _i as xn, cf as xt, xv as y, vi as yn, gf as yt, ig as z, be as zn, ld as zt };
|