@orangecheck/design 0.7.6 → 0.9.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/dist/chrome.js +254 -59
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +205 -29
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.js +231 -56
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +200 -25
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +215 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +214 -28
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +20 -4
- package/dist/primitives.d.ts +20 -4
- package/dist/primitives.js +136 -0
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +136 -1
- package/dist/primitives.mjs.map +1 -1
- package/dist/styles/aurora.css +224 -0
- package/dist/styles.css +1 -0
- package/dist/tokens.d.mts +11 -2
- package/dist/tokens.d.ts +11 -2
- package/dist/tokens.js +15 -2
- package/dist/tokens.js.map +1 -1
- package/dist/tokens.mjs +15 -3
- 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_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, Checkbox, 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, RadioGroup, RadioGroupItem, 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, StatusPillSpec, StatusPillVariant, StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt } from './primitives.mjs';
|
|
1
|
+
export { DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcAurora, OcAuroraProps, 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, Checkbox, 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, RadioGroup, RadioGroupItem, 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, StatusPillSpec, StatusPillVariant, StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Tooltip, TooltipProps, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt } from './primitives.mjs';
|
|
3
3
|
export { Callout, CalloutProps, CalloutTone, DataRow, DataRowProps, DefinitionItem, DefinitionList, DefinitionListProps, EmptyState, EmptyStateCta, EmptyStateProps, HelpHint, HelpHintProps, SectionHeader, SectionHeaderProps, StatCard, StatCardProps, StatGrid, StatGridProps, StatItem, StatTile } from './composites.mjs';
|
|
4
4
|
export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.mjs';
|
|
5
5
|
export { ExplorerNetwork, ExplorerTarget, REFERENCE_BTC_USD, SpotPrice, UseSpotPriceOptions, asOf, explorerUrl, formatSats, formatSatsCompact, priceBoth, relativeTime, satsToUsd, shortenAddress, usdToSats, useSpotPrice } from './format.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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, Checkbox, 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, RadioGroup, RadioGroupItem, 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, StatusPillSpec, StatusPillVariant, StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt } from './primitives.js';
|
|
1
|
+
export { DEFAULT_OC_THEME, OC_DEFAULT_ACCENT, OC_SKIN_COOKIE, OC_THEMES, OcAppearanceMenu, OcAppearanceMenuProps, OcAurora, OcAuroraProps, 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, Checkbox, 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, RadioGroup, RadioGroupItem, 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, StatusPillSpec, StatusPillVariant, StatusTone, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, ThemeToggleLink, Toaster, Tooltip, TooltipProps, Working, WorkingPanel, WorkingProps, badgeVariants, buttonVariants, confirm, makeStatusPill, prompt } from './primitives.js';
|
|
3
3
|
export { Callout, CalloutProps, CalloutTone, DataRow, DataRowProps, DefinitionItem, DefinitionList, DefinitionListProps, EmptyState, EmptyStateCta, EmptyStateProps, HelpHint, HelpHintProps, SectionHeader, SectionHeaderProps, StatCard, StatCardProps, StatGrid, StatGridProps, StatItem, StatTile } from './composites.js';
|
|
4
4
|
export { AppShell, AppShellProps, EcosystemSlug, EcosystemSwitcher, EcosystemSwitcherProps, FAMILY_PROPERTIES, FamilyCategory, FamilyProperty, LayoutSubHeader, LayoutSubHeaderProps, LayoutSubHeaderTag, OcAccountMenu, OcAccountMenuBuildInfo, OcAccountMenuItem, OcAccountMenuProps, OcAccountMenuSession, OcAccountMenuView, OcAccountMenuViewProps, OcDashboardHub, OcDashboardHubProps, OcDashboardShell, OcDashboardShellProps, OcDashboardTool, OcLogoDropdown, OcLogoDropdownProps, OcPrimaryNav, OcPrimaryNavLink, OcPrimaryNavProps, SITE_STATE_LABEL, SiteState, findFamilyProperty } from './chrome.js';
|
|
5
5
|
export { ExplorerNetwork, ExplorerTarget, REFERENCE_BTC_USD, SpotPrice, UseSpotPriceOptions, asOf, explorerUrl, formatSats, formatSatsCompact, priceBoth, relativeTime, satsToUsd, shortenAddress, usdToSats, useSpotPrice } from './format.js';
|
package/dist/index.js
CHANGED
|
@@ -102,6 +102,11 @@ function resolveTheme(id) {
|
|
|
102
102
|
return isKnownTheme(id) ? id : DEFAULT_OC_THEME;
|
|
103
103
|
}
|
|
104
104
|
var OC_SKIN_COOKIE = "oc_skin";
|
|
105
|
+
var BLOBS = [1, 2, 3, 4, 5];
|
|
106
|
+
function OcAurora({ intensity, className }) {
|
|
107
|
+
const style = intensity == null ? void 0 : { "--oc-aurora-intensity": String(intensity) };
|
|
108
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("oc-aurora", className), style, "aria-hidden": "true", children: BLOBS.map((n) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: `oc-aurora__blob oc-aurora__blob-${n}` }, n)) });
|
|
109
|
+
}
|
|
105
110
|
var ONE_YEAR = 60 * 60 * 24 * 365;
|
|
106
111
|
var ATTR = "data-oc-theme";
|
|
107
112
|
function readSkinCookie() {
|
|
@@ -145,7 +150,11 @@ function applySkinChrome(skin) {
|
|
|
145
150
|
if (meta) meta.setAttribute("content", accentFor(skin));
|
|
146
151
|
}
|
|
147
152
|
var OcSkinContext = React2.createContext(null);
|
|
148
|
-
function OcThemeProvider({
|
|
153
|
+
function OcThemeProvider({
|
|
154
|
+
children,
|
|
155
|
+
defaultSkin = DEFAULT_OC_THEME,
|
|
156
|
+
aurora = true
|
|
157
|
+
}) {
|
|
149
158
|
const [skin, setSkinState] = React2.useState(() => resolveTheme(defaultSkin));
|
|
150
159
|
const hydratedRef = React2.useRef(false);
|
|
151
160
|
React2.useEffect(() => {
|
|
@@ -183,7 +192,10 @@ function OcThemeProvider({ children, defaultSkin = DEFAULT_OC_THEME }) {
|
|
|
183
192
|
() => ({ skin, setSkin, themes: OC_THEMES }),
|
|
184
193
|
[skin, setSkin]
|
|
185
194
|
);
|
|
186
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
195
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(OcSkinContext.Provider, { value, children: [
|
|
196
|
+
aurora !== false && /* @__PURE__ */ jsxRuntime.jsx(OcAurora, { intensity: typeof aurora === "object" ? aurora.intensity : void 0 }),
|
|
197
|
+
children
|
|
198
|
+
] });
|
|
187
199
|
}
|
|
188
200
|
function useOcSkin() {
|
|
189
201
|
const ctx = React2.useContext(OcSkinContext);
|
|
@@ -1457,6 +1469,141 @@ function PopoverContent({
|
|
|
1457
1469
|
function PopoverAnchor({ ...props }) {
|
|
1458
1470
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
1459
1471
|
}
|
|
1472
|
+
var TOOLTIP_SURFACE_CLASS = "bg-popover text-popover-foreground border-border rounded-md border p-2.5 shadow-md";
|
|
1473
|
+
var TOOLTIP_MOTION_CLASS = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 origin-(--radix-popover-content-transform-origin) duration-150 ease-out";
|
|
1474
|
+
function compose(theirs, ours) {
|
|
1475
|
+
return (e) => {
|
|
1476
|
+
theirs?.(e);
|
|
1477
|
+
ours(e);
|
|
1478
|
+
};
|
|
1479
|
+
}
|
|
1480
|
+
var lastInputWasKeyboard = false;
|
|
1481
|
+
var modalityInstalled = false;
|
|
1482
|
+
function installModalityTracking() {
|
|
1483
|
+
if (modalityInstalled || typeof window === "undefined") return;
|
|
1484
|
+
modalityInstalled = true;
|
|
1485
|
+
window.addEventListener("keydown", () => lastInputWasKeyboard = true, true);
|
|
1486
|
+
window.addEventListener("pointerdown", () => lastInputWasKeyboard = false, true);
|
|
1487
|
+
}
|
|
1488
|
+
function Tooltip({
|
|
1489
|
+
content,
|
|
1490
|
+
children,
|
|
1491
|
+
side = "bottom",
|
|
1492
|
+
align = "start",
|
|
1493
|
+
sideOffset = 8,
|
|
1494
|
+
collisionPadding = 12,
|
|
1495
|
+
openDelay = 300,
|
|
1496
|
+
closeDelay = 90,
|
|
1497
|
+
disabled = false,
|
|
1498
|
+
portal = true,
|
|
1499
|
+
zIndexClassName = "z-50",
|
|
1500
|
+
contentClassName
|
|
1501
|
+
}) {
|
|
1502
|
+
const [hovering, setHovering] = React2__namespace.useState(false);
|
|
1503
|
+
const [focusing, setFocusing] = React2__namespace.useState(false);
|
|
1504
|
+
const [isFinePointer, setIsFinePointer] = React2__namespace.useState(false);
|
|
1505
|
+
const openTimer = React2__namespace.useRef(null);
|
|
1506
|
+
const closeTimer = React2__namespace.useRef(null);
|
|
1507
|
+
React2__namespace.useEffect(() => {
|
|
1508
|
+
installModalityTracking();
|
|
1509
|
+
const mq = window.matchMedia("(hover: hover) and (pointer: fine)");
|
|
1510
|
+
const apply = () => setIsFinePointer(mq.matches);
|
|
1511
|
+
apply();
|
|
1512
|
+
mq.addEventListener("change", apply);
|
|
1513
|
+
return () => mq.removeEventListener("change", apply);
|
|
1514
|
+
}, []);
|
|
1515
|
+
const clearTimers = React2__namespace.useCallback(() => {
|
|
1516
|
+
if (openTimer.current) clearTimeout(openTimer.current);
|
|
1517
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
1518
|
+
}, []);
|
|
1519
|
+
React2__namespace.useEffect(() => clearTimers, [clearTimers]);
|
|
1520
|
+
React2__namespace.useEffect(() => {
|
|
1521
|
+
if (disabled) {
|
|
1522
|
+
clearTimers();
|
|
1523
|
+
setHovering(false);
|
|
1524
|
+
}
|
|
1525
|
+
}, [disabled, clearTimers]);
|
|
1526
|
+
const handlePointerEnter = () => {
|
|
1527
|
+
if (!isFinePointer) return;
|
|
1528
|
+
if (closeTimer.current) clearTimeout(closeTimer.current);
|
|
1529
|
+
openTimer.current = setTimeout(() => setHovering(true), openDelay);
|
|
1530
|
+
};
|
|
1531
|
+
const handlePointerLeave = () => {
|
|
1532
|
+
if (openTimer.current) clearTimeout(openTimer.current);
|
|
1533
|
+
closeTimer.current = setTimeout(() => setHovering(false), closeDelay);
|
|
1534
|
+
};
|
|
1535
|
+
const handlePointerDown = () => {
|
|
1536
|
+
clearTimers();
|
|
1537
|
+
setHovering(false);
|
|
1538
|
+
setFocusing(false);
|
|
1539
|
+
};
|
|
1540
|
+
const handleFocus = () => {
|
|
1541
|
+
if (lastInputWasKeyboard) {
|
|
1542
|
+
clearTimers();
|
|
1543
|
+
setFocusing(true);
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
const handleBlur = () => {
|
|
1547
|
+
clearTimers();
|
|
1548
|
+
setFocusing(false);
|
|
1549
|
+
};
|
|
1550
|
+
const handleKeyDown = (e) => {
|
|
1551
|
+
if (e.key === "Escape") {
|
|
1552
|
+
clearTimers();
|
|
1553
|
+
setHovering(false);
|
|
1554
|
+
setFocusing(false);
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
const effectiveOpen = !disabled && (isFinePointer && hovering || focusing);
|
|
1558
|
+
const extra = {};
|
|
1559
|
+
const childProps = children.props;
|
|
1560
|
+
extra.onPointerEnter = compose(childProps.onPointerEnter, handlePointerEnter);
|
|
1561
|
+
extra.onPointerLeave = compose(childProps.onPointerLeave, handlePointerLeave);
|
|
1562
|
+
extra.onPointerDown = compose(childProps.onPointerDown, handlePointerDown);
|
|
1563
|
+
extra.onFocus = compose(childProps.onFocus, handleFocus);
|
|
1564
|
+
extra.onBlur = compose(childProps.onBlur, handleBlur);
|
|
1565
|
+
extra.onKeyDown = compose(childProps.onKeyDown, handleKeyDown);
|
|
1566
|
+
const trigger = React2__namespace.cloneElement(children, extra);
|
|
1567
|
+
const contentEl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1568
|
+
PopoverPrimitive__namespace.Content,
|
|
1569
|
+
{
|
|
1570
|
+
side,
|
|
1571
|
+
align,
|
|
1572
|
+
sideOffset,
|
|
1573
|
+
collisionPadding,
|
|
1574
|
+
"aria-hidden": true,
|
|
1575
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
1576
|
+
onCloseAutoFocus: (e) => e.preventDefault(),
|
|
1577
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
1578
|
+
className: cn(
|
|
1579
|
+
TOOLTIP_SURFACE_CLASS,
|
|
1580
|
+
TOOLTIP_MOTION_CLASS,
|
|
1581
|
+
"pointer-events-none",
|
|
1582
|
+
zIndexClassName,
|
|
1583
|
+
contentClassName
|
|
1584
|
+
),
|
|
1585
|
+
children: content
|
|
1586
|
+
}
|
|
1587
|
+
);
|
|
1588
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1589
|
+
PopoverPrimitive__namespace.Root,
|
|
1590
|
+
{
|
|
1591
|
+
open: effectiveOpen,
|
|
1592
|
+
onOpenChange: (o) => {
|
|
1593
|
+
if (!o) {
|
|
1594
|
+
clearTimers();
|
|
1595
|
+
setHovering(false);
|
|
1596
|
+
setFocusing(false);
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
modal: false,
|
|
1600
|
+
children: [
|
|
1601
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { asChild: true, children: trigger }),
|
|
1602
|
+
portal ? /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: contentEl }) : contentEl
|
|
1603
|
+
]
|
|
1604
|
+
}
|
|
1605
|
+
);
|
|
1606
|
+
}
|
|
1460
1607
|
var Accordion = AccordionPrimitive__namespace.Root;
|
|
1461
1608
|
var AccordionItem = React2__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Item, { ref, className: cn("border-b", className), ...props }));
|
|
1462
1609
|
AccordionItem.displayName = "AccordionItem";
|
|
@@ -2707,6 +2854,31 @@ function MenuCategoryChip({ category }) {
|
|
|
2707
2854
|
}
|
|
2708
2855
|
);
|
|
2709
2856
|
}
|
|
2857
|
+
function SwitcherTooltipCard({ current }) {
|
|
2858
|
+
const prop = findFamilyProperty(current);
|
|
2859
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-[13rem] max-w-[calc(100vw-1.5rem)]", children: [
|
|
2860
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col leading-tight", children: [
|
|
2861
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-wrap items-baseline gap-x-1.5", children: [
|
|
2862
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[9px] tracking-widest uppercase", children: "you\u2019re on" }),
|
|
2863
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary font-display text-[12px] font-semibold tracking-tight", children: prop?.label ?? "orangecheck family" })
|
|
2864
|
+
] }),
|
|
2865
|
+
prop?.sub && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide", children: prop.sub })
|
|
2866
|
+
] }),
|
|
2867
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-border -mx-2.5 my-2 border-t" }),
|
|
2868
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2869
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { "aria-hidden": true, className: "text-muted-foreground h-3 w-3 shrink-0" }),
|
|
2870
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary font-mono text-[10px] font-medium tracking-widest uppercase", children: "click" }),
|
|
2871
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[10px]", children: "\xB7" }),
|
|
2872
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[10px] tracking-wide", children: "switch site" })
|
|
2873
|
+
] }),
|
|
2874
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-1.5 flex items-center gap-1.5", children: [
|
|
2875
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CornerDownLeft, { "aria-hidden": true, className: "text-muted-foreground h-3 w-3 shrink-0" }),
|
|
2876
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary font-mono text-[10px] font-medium tracking-widest uppercase", children: "double-click" }),
|
|
2877
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[10px]", children: "\xB7" }),
|
|
2878
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[10px] tracking-wide", children: "home" })
|
|
2879
|
+
] })
|
|
2880
|
+
] });
|
|
2881
|
+
}
|
|
2710
2882
|
function OcLogoDropdown({
|
|
2711
2883
|
current,
|
|
2712
2884
|
homeHref = "/",
|
|
@@ -2756,31 +2928,45 @@ function OcLogoDropdown({
|
|
|
2756
2928
|
"data-oc-current-category": currentCategory,
|
|
2757
2929
|
"data-oc-site-state": siteState,
|
|
2758
2930
|
children: [
|
|
2759
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2760
|
-
|
|
2931
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2932
|
+
Tooltip,
|
|
2761
2933
|
{
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
"
|
|
2765
|
-
"
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
"
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2934
|
+
content: /* @__PURE__ */ jsxRuntime.jsx(SwitcherTooltipCard, { current }),
|
|
2935
|
+
disabled: open,
|
|
2936
|
+
side: "bottom",
|
|
2937
|
+
align: "start",
|
|
2938
|
+
sideOffset: 8,
|
|
2939
|
+
zIndexClassName: "z-[70]",
|
|
2940
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2941
|
+
"button",
|
|
2942
|
+
{
|
|
2943
|
+
type: "button",
|
|
2944
|
+
"aria-haspopup": "menu",
|
|
2945
|
+
"aria-expanded": open,
|
|
2946
|
+
"aria-controls": menuId,
|
|
2947
|
+
"aria-label": "orangecheck family menu",
|
|
2948
|
+
onClick: handleTriggerClick,
|
|
2949
|
+
className: cn(
|
|
2950
|
+
// focus indicator is guaranteed even if a consumer overrides triggerClassName
|
|
2951
|
+
"focus-visible:ring-primary/60 rounded-sm focus-visible:ring-2 focus-visible:outline-none",
|
|
2952
|
+
triggerClassName ?? "group hover:bg-accent/30 -mx-1.5 -my-1 flex min-h-[40px] items-center gap-2 rounded-sm px-1.5 py-1 transition-colors " + (open ? "bg-accent/20" : "")
|
|
2953
|
+
),
|
|
2954
|
+
"data-oc-logo-dropdown-trigger": "",
|
|
2955
|
+
"data-oc-logo-dropdown-open": open ? "true" : "false",
|
|
2956
|
+
children: [
|
|
2957
|
+
children,
|
|
2958
|
+
/* @__PURE__ */ jsxRuntime.jsx(CategoryChip, { category: currentCategory }),
|
|
2959
|
+
/* @__PURE__ */ jsxRuntime.jsx(SiteStateBadge, { state: siteState }),
|
|
2960
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2961
|
+
lucideReact.ChevronDown,
|
|
2962
|
+
{
|
|
2963
|
+
"aria-hidden": true,
|
|
2964
|
+
className: "text-muted-foreground/70 group-hover:text-foreground/80 h-3.5 w-3.5 shrink-0 transition-transform duration-200 " + (open ? "rotate-180" : "")
|
|
2965
|
+
}
|
|
2966
|
+
)
|
|
2967
|
+
]
|
|
2968
|
+
}
|
|
2969
|
+
)
|
|
2784
2970
|
}
|
|
2785
2971
|
),
|
|
2786
2972
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2809,7 +2995,7 @@ function OcLogoDropdown({
|
|
|
2809
2995
|
{
|
|
2810
2996
|
id: menuId,
|
|
2811
2997
|
role: "menu",
|
|
2812
|
-
"aria-label": "
|
|
2998
|
+
"aria-label": "orangecheck family",
|
|
2813
2999
|
className: popoverClassName ?? "bg-background absolute top-full left-0 z-[60] mt-2 w-[min(20rem,calc(100vw-1rem))] border shadow-lg",
|
|
2814
3000
|
"data-oc-logo-dropdown-popover": "",
|
|
2815
3001
|
children: [
|
|
@@ -4012,6 +4198,7 @@ exports.OC_THEMES = OC_THEMES;
|
|
|
4012
4198
|
exports.OcAccountMenu = OcAccountMenu;
|
|
4013
4199
|
exports.OcAccountMenuView = OcAccountMenuView;
|
|
4014
4200
|
exports.OcAppearanceMenu = OcAppearanceMenu;
|
|
4201
|
+
exports.OcAurora = OcAurora;
|
|
4015
4202
|
exports.OcDashboardHub = OcDashboardHub;
|
|
4016
4203
|
exports.OcDashboardShell = OcDashboardShell;
|
|
4017
4204
|
exports.OcLogoDropdown = OcLogoDropdown;
|
|
@@ -4069,6 +4256,7 @@ exports.Textarea = Textarea;
|
|
|
4069
4256
|
exports.ThemeToggle = ThemeToggle;
|
|
4070
4257
|
exports.ThemeToggleLink = ThemeToggleLink;
|
|
4071
4258
|
exports.Toaster = Toaster;
|
|
4259
|
+
exports.Tooltip = Tooltip;
|
|
4072
4260
|
exports.Working = Working;
|
|
4073
4261
|
exports.WorkingPanel = WorkingPanel;
|
|
4074
4262
|
exports.accentFor = accentFor;
|