@orangecheck/design 0.5.0 → 0.5.2
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +81 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -39
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +20 -18
- package/dist/primitives.d.ts +20 -18
- package/dist/primitives.js +49 -34
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +47 -34
- package/dist/primitives.mjs.map +1 -1
- package/dist/tokens.d.mts +9 -1
- package/dist/tokens.d.ts +9 -1
- package/dist/tokens.js +28 -5
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +27 -6
- package/dist/tokens.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DEFAULT_OC_THEME, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcTheme, OcThemeBridge, OcThemeId, OcThemePicker, OcThemePickerProps, OcThemeProvider, OcThemeProviderProps, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin } from './tokens.mjs';
|
|
2
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithActionProps, AlertWithCountdown, AlertWithCountdownProps, Badge, Bar, BarProps, BitcoinAddress, BitcoinAddressProps, Button, Card, CardProps, ConfirmHost, ConfirmOptions, CopyButton, CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, ModalProps, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, PromptOptions, QrCode, QrCodeProps, SatsAmount, SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SkeletonProps, Sparkline, SparklineProps, StatBlock, StatBlockProps, StatusPill, StatusPillProps, StatusTone, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, prompt } from './primitives.mjs';
|
|
1
|
+
export { DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcTheme, OcThemeBridge, OcThemeId, OcThemePicker, OcThemePickerProps, OcThemeProvider, OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin } from './tokens.mjs';
|
|
2
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithActionProps, AlertWithCountdown, AlertWithCountdownProps, Badge, Bar, BarProps, BitcoinAddress, BitcoinAddressProps, Button, Card, CardProps, ConfirmHost, ConfirmOptions, CopyButton, CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, ModalProps, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, PromptOptions, QrCode, QrCodeProps, SatsAmount, SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SkeletonProps, Sparkline, SparklineProps, StatBlock, StatBlockProps, StatusPill, StatusPillProps, StatusTone, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, prompt } from './primitives.mjs';
|
|
3
3
|
export * from '@orangecheck/ui';
|
|
4
4
|
export { ExplorerNetwork, ExplorerTarget, REFERENCE_BTC_USD, explorerUrl, formatSats, formatSatsCompact, priceBoth, relativeTime, satsToUsd, shortenAddress, usdToSats } from './format.mjs';
|
|
5
5
|
import 'clsx';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { DEFAULT_OC_THEME, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcTheme, OcThemeBridge, OcThemeId, OcThemePicker, OcThemePickerProps, OcThemeProvider, OcThemeProviderProps, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin } from './tokens.js';
|
|
2
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithActionProps, AlertWithCountdown, AlertWithCountdownProps, Badge, Bar, BarProps, BitcoinAddress, BitcoinAddressProps, Button, Card, CardProps, ConfirmHost, ConfirmOptions, CopyButton, CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, ModalProps, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, PromptOptions, QrCode, QrCodeProps, SatsAmount, SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SkeletonProps, Sparkline, SparklineProps, StatBlock, StatBlockProps, StatusPill, StatusPillProps, StatusTone, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, prompt } from './primitives.js';
|
|
1
|
+
export { DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcTheme, OcThemeBridge, OcThemeId, OcThemePicker, OcThemePickerProps, OcThemeProvider, OcThemeProviderProps, accentFor, cn, getOcThemeInitScript, isKnownTheme, resolveTheme, useOcSkin } from './tokens.js';
|
|
2
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AlertWithAction, AlertWithActionProps, AlertWithCountdown, AlertWithCountdownProps, Badge, Bar, BarProps, BitcoinAddress, BitcoinAddressProps, Button, Card, CardProps, ConfirmHost, ConfirmOptions, CopyButton, CopyButtonProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, ErrorBoundary, Input, Label, Modal, ModalProps, Pagination, PaginationProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PromptHost, PromptOptions, QrCode, QrCodeProps, SatsAmount, SatsAmountProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SkeletonProps, Sparkline, SparklineProps, StatBlock, StatBlockProps, StatusPill, StatusPillProps, StatusTone, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, prompt } from './primitives.js';
|
|
3
3
|
export * from '@orangecheck/ui';
|
|
4
4
|
export { ExplorerNetwork, ExplorerTarget, REFERENCE_BTC_USD, explorerUrl, formatSats, formatSatsCompact, priceBoth, relativeTime, satsToUsd, shortenAddress, usdToSats } from './format.js';
|
|
5
5
|
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var reactSlot = require('@radix-ui/react-slot');
|
|
|
10
10
|
var classVarianceAuthority = require('class-variance-authority');
|
|
11
11
|
var LabelPrimitive = require('@radix-ui/react-label');
|
|
12
12
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
13
|
-
var
|
|
13
|
+
var SheetPrimitive = require('@radix-ui/react-dialog');
|
|
14
14
|
var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
15
15
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
16
16
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
@@ -41,7 +41,7 @@ function _interopNamespace(e) {
|
|
|
41
41
|
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
42
42
|
var LabelPrimitive__namespace = /*#__PURE__*/_interopNamespace(LabelPrimitive);
|
|
43
43
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
44
|
-
var
|
|
44
|
+
var SheetPrimitive__namespace = /*#__PURE__*/_interopNamespace(SheetPrimitive);
|
|
45
45
|
var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitive);
|
|
46
46
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
47
47
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
@@ -100,6 +100,7 @@ __export(src_exports, {
|
|
|
100
100
|
Input: () => Input,
|
|
101
101
|
Label: () => Label,
|
|
102
102
|
Modal: () => Modal,
|
|
103
|
+
OC_DEFAULT_ACCENT: () => OC_DEFAULT_ACCENT,
|
|
103
104
|
OC_SKIN_COOKIE: () => OC_SKIN_COOKIE,
|
|
104
105
|
OC_THEMES: () => OC_THEMES,
|
|
105
106
|
OcAppearanceMenu: () => OcAppearanceMenu,
|
|
@@ -127,8 +128,10 @@ __export(src_exports, {
|
|
|
127
128
|
SelectValue: () => SelectValue,
|
|
128
129
|
Separator: () => Separator,
|
|
129
130
|
Sheet: () => Sheet,
|
|
131
|
+
SheetClose: () => SheetClose,
|
|
130
132
|
SheetContent: () => SheetContent,
|
|
131
133
|
SheetDescription: () => SheetDescription,
|
|
134
|
+
SheetFooter: () => SheetFooter,
|
|
132
135
|
SheetHeader: () => SheetHeader,
|
|
133
136
|
SheetOverlay: () => SheetOverlay,
|
|
134
137
|
SheetPortal: () => SheetPortal,
|
|
@@ -144,6 +147,7 @@ __export(src_exports, {
|
|
|
144
147
|
Toaster: () => Toaster,
|
|
145
148
|
Working: () => Working,
|
|
146
149
|
WorkingPanel: () => WorkingPanel,
|
|
150
|
+
accentFor: () => accentFor,
|
|
147
151
|
badgeVariants: () => badgeVariants,
|
|
148
152
|
buttonVariants: () => buttonVariants,
|
|
149
153
|
cn: () => cn,
|
|
@@ -171,24 +175,32 @@ var OC_THEMES = [
|
|
|
171
175
|
{
|
|
172
176
|
id: "orangecheck",
|
|
173
177
|
label: "orangecheck",
|
|
174
|
-
description: "the chain \u2014 Bitcoin orange, sharp 0.25rem corners, Inter + JetBrains Mono"
|
|
178
|
+
description: "the chain \u2014 Bitcoin orange, sharp 0.25rem corners, Inter + JetBrains Mono",
|
|
179
|
+
accent: "#f97316"
|
|
175
180
|
},
|
|
176
181
|
{
|
|
177
182
|
id: "phosphor",
|
|
178
183
|
label: "phosphor",
|
|
179
|
-
description: "the node \u2014 CRT terminal green, hard 0.125rem, all-mono \xB7 sovereignty & verify"
|
|
184
|
+
description: "the node \u2014 CRT terminal green, hard 0.125rem, all-mono \xB7 sovereignty & verify",
|
|
185
|
+
accent: "#55d671"
|
|
180
186
|
},
|
|
181
187
|
{
|
|
182
188
|
id: "lightning",
|
|
183
189
|
label: "lightning",
|
|
184
|
-
description: "the network \u2014 electric violet (L2), hardest 0rem edges, sans \xB7 instant"
|
|
190
|
+
description: "the network \u2014 electric violet (L2), hardest 0rem edges, sans \xB7 instant",
|
|
191
|
+
accent: "#c27dff"
|
|
185
192
|
},
|
|
186
193
|
{
|
|
187
194
|
id: "gold",
|
|
188
195
|
label: "gold",
|
|
189
|
-
description: "sound money \u2014 digital gold, hard 0.125rem milled edge, mono ledger \xB7 21M"
|
|
196
|
+
description: "sound money \u2014 digital gold, hard 0.125rem milled edge, mono ledger \xB7 21M",
|
|
197
|
+
accent: "#e3b831"
|
|
190
198
|
}
|
|
191
199
|
];
|
|
200
|
+
var OC_DEFAULT_ACCENT = "#f97316";
|
|
201
|
+
function accentFor(id) {
|
|
202
|
+
return OC_THEMES.find((t) => t.id === id)?.accent ?? OC_DEFAULT_ACCENT;
|
|
203
|
+
}
|
|
192
204
|
var DEFAULT_OC_THEME = "orangecheck";
|
|
193
205
|
function isKnownTheme(id) {
|
|
194
206
|
return !!id && OC_THEMES.some((t) => t.id === id);
|
|
@@ -230,6 +242,15 @@ function applyAttr(skin) {
|
|
|
230
242
|
if (typeof document === "undefined") return;
|
|
231
243
|
document.documentElement.setAttribute(ATTR, skin);
|
|
232
244
|
}
|
|
245
|
+
function applySkinChrome(skin) {
|
|
246
|
+
if (typeof window === "undefined") return;
|
|
247
|
+
if (typeof window.__ocApplySkinChrome === "function") {
|
|
248
|
+
window.__ocApplySkinChrome(skin);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const meta = document.querySelector('meta[name="theme-color"]');
|
|
252
|
+
if (meta) meta.setAttribute("content", accentFor(skin));
|
|
253
|
+
}
|
|
233
254
|
var OcSkinContext = React2.createContext(null);
|
|
234
255
|
function OcThemeProvider({ children, defaultSkin = DEFAULT_OC_THEME }) {
|
|
235
256
|
const [skin, setSkinState] = React2.useState(() => resolveTheme(defaultSkin));
|
|
@@ -239,6 +260,7 @@ function OcThemeProvider({ children, defaultSkin = DEFAULT_OC_THEME }) {
|
|
|
239
260
|
hydratedRef.current = true;
|
|
240
261
|
const fromCookie = resolveTheme(readSkinCookie() ?? defaultSkin);
|
|
241
262
|
applyAttr(fromCookie);
|
|
263
|
+
applySkinChrome(fromCookie);
|
|
242
264
|
setSkinState(fromCookie);
|
|
243
265
|
}, [defaultSkin]);
|
|
244
266
|
React2.useEffect(() => {
|
|
@@ -246,6 +268,7 @@ function OcThemeProvider({ children, defaultSkin = DEFAULT_OC_THEME }) {
|
|
|
246
268
|
const fromCookie = resolveTheme(readSkinCookie() ?? skin);
|
|
247
269
|
if (fromCookie !== skin) {
|
|
248
270
|
applyAttr(fromCookie);
|
|
271
|
+
applySkinChrome(fromCookie);
|
|
249
272
|
setSkinState(fromCookie);
|
|
250
273
|
}
|
|
251
274
|
}
|
|
@@ -259,6 +282,7 @@ function OcThemeProvider({ children, defaultSkin = DEFAULT_OC_THEME }) {
|
|
|
259
282
|
const setSkin = React2.useCallback((id) => {
|
|
260
283
|
const next = resolveTheme(id);
|
|
261
284
|
applyAttr(next);
|
|
285
|
+
applySkinChrome(next);
|
|
262
286
|
writeSkinCookie(next);
|
|
263
287
|
setSkinState(next);
|
|
264
288
|
}, []);
|
|
@@ -276,7 +300,8 @@ function useOcSkin() {
|
|
|
276
300
|
return ctx;
|
|
277
301
|
}
|
|
278
302
|
function getOcThemeInitScript(defaultSkin = DEFAULT_OC_THEME) {
|
|
279
|
-
|
|
303
|
+
const accents = Object.fromEntries(OC_THEMES.map((t) => [t.id, t.accent]));
|
|
304
|
+
return `(function(){var ACC=${JSON.stringify(accents)},DEF=${JSON.stringify(defaultSkin)},ORIG=${JSON.stringify(OC_DEFAULT_ACCENT)},fav=null;function acc(s){return ACC[s]||ACC[DEF]||ORIG;}window.__ocApplySkinChrome=function(s){try{var a=acc(s);var meta=document.querySelector('meta[name="theme-color"]');if(meta){meta.setAttribute('content',a);}var link=document.querySelector('link[rel~="icon"][type="image/svg+xml"]');if(!link){return;}var paint=function(svg){link.setAttribute('href','data:image/svg+xml,'+encodeURIComponent(svg.split(ORIG).join(a)));};if(fav!=null){paint(fav);return;}var h=link.getAttribute('href');if(!h||h.indexOf('data:')===0){return;}fetch(h).then(function(r){return r.text();}).then(function(svg){fav=svg;paint(svg);}).catch(function(){});}catch(e){}};try{var m=document.cookie.match(/(?:^|; )${OC_SKIN_COOKIE}=([^;]*)/);var s=m?decodeURIComponent(m[1]):DEF;if(!s){s=DEF;}document.documentElement.setAttribute('${ATTR}',s);window.__ocApplySkinChrome(s);}catch(e){document.documentElement.setAttribute('${ATTR}',DEF);}})();`;
|
|
280
305
|
}
|
|
281
306
|
var COOKIE = "oc_theme";
|
|
282
307
|
var ALLOWED = /* @__PURE__ */ new Set(["light", "dark", "system"]);
|
|
@@ -907,17 +932,20 @@ function Separator({
|
|
|
907
932
|
);
|
|
908
933
|
}
|
|
909
934
|
function Sheet(props) {
|
|
910
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
935
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "sheet", ...props });
|
|
911
936
|
}
|
|
912
937
|
function SheetTrigger(props) {
|
|
913
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
938
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
939
|
+
}
|
|
940
|
+
function SheetClose(props) {
|
|
941
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { "data-slot": "sheet-close", ...props });
|
|
914
942
|
}
|
|
915
943
|
function SheetPortal(props) {
|
|
916
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
944
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
917
945
|
}
|
|
918
946
|
function SheetOverlay({ className, ...props }) {
|
|
919
947
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
920
|
-
|
|
948
|
+
SheetPrimitive__namespace.Overlay,
|
|
921
949
|
{
|
|
922
950
|
"data-slot": "sheet-overlay",
|
|
923
951
|
className: cn(
|
|
@@ -943,7 +971,7 @@ function SheetContent({
|
|
|
943
971
|
return /* @__PURE__ */ jsxRuntime.jsxs(SheetPortal, { children: [
|
|
944
972
|
/* @__PURE__ */ jsxRuntime.jsx(SheetOverlay, {}),
|
|
945
973
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
946
|
-
|
|
974
|
+
SheetPrimitive__namespace.Content,
|
|
947
975
|
{
|
|
948
976
|
"data-slot": "sheet-content",
|
|
949
977
|
className: cn(
|
|
@@ -954,7 +982,7 @@ function SheetContent({
|
|
|
954
982
|
...props,
|
|
955
983
|
children: [
|
|
956
984
|
children,
|
|
957
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
985
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Close, { className: "ring-offset-background focus:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
|
|
958
986
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" }),
|
|
959
987
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
960
988
|
] })
|
|
@@ -966,9 +994,19 @@ function SheetContent({
|
|
|
966
994
|
function SheetHeader({ className, ...props }) {
|
|
967
995
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5 p-4", className), ...props });
|
|
968
996
|
}
|
|
997
|
+
function SheetFooter({ className, ...props }) {
|
|
998
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
999
|
+
"div",
|
|
1000
|
+
{
|
|
1001
|
+
"data-slot": "sheet-footer",
|
|
1002
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
1003
|
+
...props
|
|
1004
|
+
}
|
|
1005
|
+
);
|
|
1006
|
+
}
|
|
969
1007
|
function SheetTitle({ className, ...props }) {
|
|
970
1008
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
971
|
-
|
|
1009
|
+
SheetPrimitive__namespace.Title,
|
|
972
1010
|
{
|
|
973
1011
|
"data-slot": "sheet-title",
|
|
974
1012
|
className: cn("text-foreground font-semibold", className),
|
|
@@ -981,7 +1019,7 @@ function SheetDescription({
|
|
|
981
1019
|
...props
|
|
982
1020
|
}) {
|
|
983
1021
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
984
|
-
|
|
1022
|
+
SheetPrimitive__namespace.Description,
|
|
985
1023
|
{
|
|
986
1024
|
"data-slot": "sheet-description",
|
|
987
1025
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -990,23 +1028,23 @@ function SheetDescription({
|
|
|
990
1028
|
);
|
|
991
1029
|
}
|
|
992
1030
|
function Dialog({ ...props }) {
|
|
993
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1031
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { "data-slot": "dialog", ...props });
|
|
994
1032
|
}
|
|
995
1033
|
function DialogTrigger({ ...props }) {
|
|
996
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1034
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
997
1035
|
}
|
|
998
1036
|
function DialogPortal({ ...props }) {
|
|
999
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1037
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Portal, { "data-slot": "dialog-portal", ...props });
|
|
1000
1038
|
}
|
|
1001
1039
|
function DialogClose({ ...props }) {
|
|
1002
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1040
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
|
|
1003
1041
|
}
|
|
1004
1042
|
function DialogOverlay({
|
|
1005
1043
|
className,
|
|
1006
1044
|
...props
|
|
1007
1045
|
}) {
|
|
1008
1046
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1009
|
-
|
|
1047
|
+
SheetPrimitive__namespace.Overlay,
|
|
1010
1048
|
{
|
|
1011
1049
|
"data-slot": "dialog-overlay",
|
|
1012
1050
|
className: cn(
|
|
@@ -1026,7 +1064,7 @@ function DialogContent({
|
|
|
1026
1064
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { "data-slot": "dialog-portal", children: [
|
|
1027
1065
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
1028
1066
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1029
|
-
|
|
1067
|
+
SheetPrimitive__namespace.Content,
|
|
1030
1068
|
{
|
|
1031
1069
|
"data-slot": "dialog-content",
|
|
1032
1070
|
className: cn(
|
|
@@ -1037,7 +1075,7 @@ function DialogContent({
|
|
|
1037
1075
|
children: [
|
|
1038
1076
|
children,
|
|
1039
1077
|
showCloseButton && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1040
|
-
|
|
1078
|
+
SheetPrimitive__namespace.Close,
|
|
1041
1079
|
{
|
|
1042
1080
|
"data-slot": "dialog-close",
|
|
1043
1081
|
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -1074,7 +1112,7 @@ function DialogFooter({ className, ...props }) {
|
|
|
1074
1112
|
}
|
|
1075
1113
|
function DialogTitle({ className, ...props }) {
|
|
1076
1114
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1077
|
-
|
|
1115
|
+
SheetPrimitive__namespace.Title,
|
|
1078
1116
|
{
|
|
1079
1117
|
"data-slot": "dialog-title",
|
|
1080
1118
|
className: cn("text-lg leading-none font-semibold", className),
|
|
@@ -1087,7 +1125,7 @@ function DialogDescription({
|
|
|
1087
1125
|
...props
|
|
1088
1126
|
}) {
|
|
1089
1127
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1090
|
-
|
|
1128
|
+
SheetPrimitive__namespace.Description,
|
|
1091
1129
|
{
|
|
1092
1130
|
"data-slot": "dialog-description",
|
|
1093
1131
|
className: cn("text-muted-foreground text-sm", className),
|
|
@@ -1140,9 +1178,9 @@ function ConfirmHost() {
|
|
|
1140
1178
|
[state]
|
|
1141
1179
|
);
|
|
1142
1180
|
if (!state) return null;
|
|
1143
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1144
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1145
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1181
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { open: true, onOpenChange: (open) => !open && close(false), children: /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Portal, { children: [
|
|
1182
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
1183
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Content, { className: "bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none", children: [
|
|
1146
1184
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "terminal-title", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1147
1185
|
"span",
|
|
1148
1186
|
{
|
|
@@ -1154,8 +1192,8 @@ function ConfirmHost() {
|
|
|
1154
1192
|
}
|
|
1155
1193
|
) }),
|
|
1156
1194
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
1157
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1158
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1195
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "sr-only", children: state.title }),
|
|
1196
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
|
|
1159
1197
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
1160
1198
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1161
1199
|
Button,
|
|
@@ -1250,10 +1288,10 @@ function PromptHost() {
|
|
|
1250
1288
|
close(v);
|
|
1251
1289
|
}, [state, value, confirmValue, close]);
|
|
1252
1290
|
if (!state) return null;
|
|
1253
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1254
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1291
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { open: true, onOpenChange: (open) => !open && close(null), children: /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Portal, { children: [
|
|
1292
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Overlay, { className: "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm" }),
|
|
1255
1293
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1256
|
-
|
|
1294
|
+
SheetPrimitive__namespace.Content,
|
|
1257
1295
|
{
|
|
1258
1296
|
className: "bg-card border-border fixed top-1/2 left-1/2 z-50 w-[90vw] max-w-md -translate-x-1/2 -translate-y-1/2 border shadow-lg outline-none",
|
|
1259
1297
|
onKeyDown: (e) => {
|
|
@@ -1268,8 +1306,8 @@ function PromptHost() {
|
|
|
1268
1306
|
state.title
|
|
1269
1307
|
] }) }),
|
|
1270
1308
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 p-4 sm:p-5", children: [
|
|
1271
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1272
|
-
state.message && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1309
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "sr-only", children: state.title }),
|
|
1310
|
+
state.message && /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Description, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground font-mono text-xs leading-relaxed whitespace-pre-wrap", children: state.message }) }),
|
|
1273
1311
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
1274
1312
|
state.label && /* @__PURE__ */ jsxRuntime.jsx(Label, { children: state.label }),
|
|
1275
1313
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1327,10 +1365,10 @@ function PromptHost() {
|
|
|
1327
1365
|
] }) });
|
|
1328
1366
|
}
|
|
1329
1367
|
function Modal({ open, onOpenChange, title, subtitle, children, actions, width = "wide" }) {
|
|
1330
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1331
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1368
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(SheetPrimitive__namespace.Portal, { children: [
|
|
1369
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Overlay, { className: "bg-background/80 fixed inset-0 z-[100] backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
|
|
1332
1370
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1333
|
-
|
|
1371
|
+
SheetPrimitive__namespace.Content,
|
|
1334
1372
|
{
|
|
1335
1373
|
className: cn(
|
|
1336
1374
|
"terminal fixed top-[5vh] left-1/2 z-[110] flex max-h-[90vh] -translate-x-1/2 flex-col overflow-hidden rounded-sm border",
|
|
@@ -1343,7 +1381,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
1343
1381
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "terminal-dot", "aria-hidden": true }),
|
|
1344
1382
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "terminal-dot opacity-70", "aria-hidden": true }),
|
|
1345
1383
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "terminal-dot opacity-50", "aria-hidden": true }),
|
|
1346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1384
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Title, { className: "ml-2 truncate", children: title }),
|
|
1347
1385
|
subtitle && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground/70 ml-1 truncate text-[10px] normal-case tracking-normal", children: [
|
|
1348
1386
|
"\xB7 ",
|
|
1349
1387
|
subtitle
|
|
@@ -1352,7 +1390,7 @@ function Modal({ open, onOpenChange, title, subtitle, children, actions, width =
|
|
|
1352
1390
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1353
1391
|
actions,
|
|
1354
1392
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1355
|
-
|
|
1393
|
+
SheetPrimitive__namespace.Close,
|
|
1356
1394
|
{
|
|
1357
1395
|
"aria-label": "close",
|
|
1358
1396
|
className: "text-muted-foreground hover:text-foreground inline-flex h-6 w-6 items-center justify-center rounded-sm",
|
|
@@ -2014,6 +2052,7 @@ exports.ErrorBoundary = ErrorBoundary;
|
|
|
2014
2052
|
exports.Input = Input;
|
|
2015
2053
|
exports.Label = Label;
|
|
2016
2054
|
exports.Modal = Modal;
|
|
2055
|
+
exports.OC_DEFAULT_ACCENT = OC_DEFAULT_ACCENT;
|
|
2017
2056
|
exports.OC_SKIN_COOKIE = OC_SKIN_COOKIE;
|
|
2018
2057
|
exports.OC_THEMES = OC_THEMES;
|
|
2019
2058
|
exports.OcAppearanceMenu = OcAppearanceMenu;
|
|
@@ -2041,8 +2080,10 @@ exports.SelectTrigger = SelectTrigger;
|
|
|
2041
2080
|
exports.SelectValue = SelectValue;
|
|
2042
2081
|
exports.Separator = Separator;
|
|
2043
2082
|
exports.Sheet = Sheet;
|
|
2083
|
+
exports.SheetClose = SheetClose;
|
|
2044
2084
|
exports.SheetContent = SheetContent;
|
|
2045
2085
|
exports.SheetDescription = SheetDescription;
|
|
2086
|
+
exports.SheetFooter = SheetFooter;
|
|
2046
2087
|
exports.SheetHeader = SheetHeader;
|
|
2047
2088
|
exports.SheetOverlay = SheetOverlay;
|
|
2048
2089
|
exports.SheetPortal = SheetPortal;
|
|
@@ -2058,6 +2099,7 @@ exports.ThemeToggleLink = ThemeToggleLink;
|
|
|
2058
2099
|
exports.Toaster = Toaster;
|
|
2059
2100
|
exports.Working = Working;
|
|
2060
2101
|
exports.WorkingPanel = WorkingPanel;
|
|
2102
|
+
exports.accentFor = accentFor;
|
|
2061
2103
|
exports.badgeVariants = badgeVariants;
|
|
2062
2104
|
exports.buttonVariants = buttonVariants;
|
|
2063
2105
|
exports.cn = cn;
|