@tydavidson/design-system 1.1.1 → 1.1.3
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 +925 -0
- package/dist/index.d.ts +925 -7
- package/dist/index.js +1758 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1650 -0
- package/dist/index.mjs.map +1 -0
- package/dist/themes/index.d.mts +104 -0
- package/dist/themes/index.d.ts +104 -6
- package/dist/themes/index.js +204 -17
- package/dist/themes/index.js.map +1 -1
- package/dist/themes/index.mjs +196 -0
- package/dist/themes/index.mjs.map +1 -0
- package/package.json +26 -12
- package/dist/components/SidebarNav.d.ts +0 -13
- package/dist/components/SidebarNav.d.ts.map +0 -1
- package/dist/components/SidebarNav.js +0 -63
- package/dist/components/SidebarNav.js.map +0 -1
- package/dist/components/SidebarNavClient.d.ts +0 -2
- package/dist/components/SidebarNavClient.d.ts.map +0 -1
- package/dist/components/SidebarNavClient.js +0 -35
- package/dist/components/SidebarNavClient.js.map +0 -1
- package/dist/components/email/button.d.ts +0 -11
- package/dist/components/email/button.d.ts.map +0 -1
- package/dist/components/email/button.js +0 -86
- package/dist/components/email/button.js.map +0 -1
- package/dist/components/email/index.d.ts +0 -7
- package/dist/components/email/index.d.ts.map +0 -1
- package/dist/components/email/index.js +0 -17
- package/dist/components/email/index.js.map +0 -1
- package/dist/components/email/layout.d.ts +0 -23
- package/dist/components/email/layout.d.ts.map +0 -1
- package/dist/components/email/layout.js +0 -93
- package/dist/components/email/layout.js.map +0 -1
- package/dist/components/email/typography.d.ts +0 -11
- package/dist/components/email/typography.d.ts.map +0 -1
- package/dist/components/email/typography.js +0 -55
- package/dist/components/email/typography.js.map +0 -1
- package/dist/components/hooks/use-mobile.d.ts +0 -2
- package/dist/components/hooks/use-mobile.d.ts.map +0 -1
- package/dist/components/hooks/use-mobile.js +0 -7
- package/dist/components/hooks/use-mobile.js.map +0 -1
- package/dist/components/typography/heading/heading.d.ts +0 -48
- package/dist/components/typography/heading/heading.d.ts.map +0 -1
- package/dist/components/typography/heading/heading.js +0 -93
- package/dist/components/typography/heading/heading.js.map +0 -1
- package/dist/components/typography/heading/heading.stories.d.ts +0 -12
- package/dist/components/typography/heading/heading.stories.d.ts.map +0 -1
- package/dist/components/typography/heading/heading.stories.js +0 -77
- package/dist/components/typography/heading/heading.stories.js.map +0 -1
- package/dist/components/typography/heading/index.d.ts +0 -2
- package/dist/components/typography/heading/index.d.ts.map +0 -1
- package/dist/components/typography/heading/index.js +0 -18
- package/dist/components/typography/heading/index.js.map +0 -1
- package/dist/components/typography/index.d.ts +0 -5
- package/dist/components/typography/index.d.ts.map +0 -1
- package/dist/components/typography/index.js +0 -24
- package/dist/components/typography/index.js.map +0 -1
- package/dist/components/typography/showcase.d.ts +0 -7
- package/dist/components/typography/showcase.d.ts.map +0 -1
- package/dist/components/typography/showcase.js +0 -15
- package/dist/components/typography/showcase.js.map +0 -1
- package/dist/components/typography/text/index.d.ts +0 -2
- package/dist/components/typography/text/index.d.ts.map +0 -1
- package/dist/components/typography/text/index.js +0 -18
- package/dist/components/typography/text/index.js.map +0 -1
- package/dist/components/typography/text/text.d.ts +0 -43
- package/dist/components/typography/text/text.d.ts.map +0 -1
- package/dist/components/typography/text/text.js +0 -74
- package/dist/components/typography/text/text.js.map +0 -1
- package/dist/components/typography/text/text.stories.d.ts +0 -13
- package/dist/components/typography/text/text.stories.d.ts.map +0 -1
- package/dist/components/typography/text/text.stories.js +0 -75
- package/dist/components/typography/text/text.stories.js.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -8
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -53
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/alert.d.ts +0 -9
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/alert.js +0 -64
- package/dist/components/ui/alert.js.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -5
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.js +0 -40
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/avatar.d.ts +0 -7
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/avatar.js +0 -50
- package/dist/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/badge.d.ts +0 -15
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/badge.js +0 -82
- package/dist/components/ui/badge.js.map +0 -1
- package/dist/components/ui/breadcrumb.d.ts +0 -11
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.js +0 -63
- package/dist/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/button.d.ts +0 -41
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js +0 -109
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/calendar.d.ts +0 -9
- package/dist/components/ui/calendar.d.ts.map +0 -1
- package/dist/components/ui/calendar.js +0 -47
- package/dist/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/card/card.d.ts +0 -35
- package/dist/components/ui/card/card.d.ts.map +0 -1
- package/dist/components/ui/card/card.js +0 -62
- package/dist/components/ui/card/card.js.map +0 -1
- package/dist/components/ui/card/index.d.ts +0 -2
- package/dist/components/ui/card/index.d.ts.map +0 -1
- package/dist/components/ui/card/index.js +0 -18
- package/dist/components/ui/card/index.js.map +0 -1
- package/dist/components/ui/card.d.ts +0 -12
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -65
- package/dist/components/ui/card.js.map +0 -1
- package/dist/components/ui/checkbox.d.ts +0 -5
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -45
- package/dist/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -7
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -44
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/command.d.ts +0 -83
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/command.js +0 -73
- package/dist/components/ui/command.js.map +0 -1
- package/dist/components/ui/context-menu.d.ts +0 -31
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/context-menu.js +0 -92
- package/dist/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/dialog.d.ts +0 -20
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -68
- package/dist/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +0 -32
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.js +0 -108
- package/dist/components/ui/dropdown-menu/dropdown-menu.js.map +0 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +0 -2
- package/dist/components/ui/dropdown-menu/index.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu/index.js +0 -18
- package/dist/components/ui/dropdown-menu/index.js.map +0 -1
- package/dist/components/ui/header.d.ts +0 -3
- package/dist/components/ui/header.d.ts.map +0 -1
- package/dist/components/ui/header.js +0 -16
- package/dist/components/ui/header.js.map +0 -1
- package/dist/components/ui/hover-card.d.ts +0 -7
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/hover-card.js +0 -48
- package/dist/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/index.d.ts +0 -15
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -43
- package/dist/components/ui/index.js.map +0 -1
- package/dist/components/ui/input.d.ts +0 -6
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -45
- package/dist/components/ui/input.js.map +0 -1
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -46
- package/dist/components/ui/label.js.map +0 -1
- package/dist/components/ui/nav.d.ts +0 -9
- package/dist/components/ui/nav.d.ts.map +0 -1
- package/dist/components/ui/nav.js +0 -25
- package/dist/components/ui/nav.js.map +0 -1
- package/dist/components/ui/org-switcher.d.ts +0 -13
- package/dist/components/ui/org-switcher.d.ts.map +0 -1
- package/dist/components/ui/org-switcher.js +0 -52
- package/dist/components/ui/org-switcher.js.map +0 -1
- package/dist/components/ui/popover.d.ts +0 -8
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js +0 -50
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/progress.d.ts +0 -5
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/progress.js +0 -44
- package/dist/components/ui/progress.js.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -6
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/radio-group.js +0 -52
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/select.d.ts +0 -14
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/select.js +0 -72
- package/dist/components/ui/select.js.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -44
- package/dist/components/ui/separator.js.map +0 -1
- package/dist/components/ui/sheet.d.ts +0 -22
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sheet.js +0 -76
- package/dist/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/sidebar.d.ts +0 -65
- package/dist/components/ui/sidebar.d.ts.map +0 -1
- package/dist/components/ui/sidebar.js +0 -269
- package/dist/components/ui/sidebar.js.map +0 -1
- package/dist/components/ui/skeleton.d.ts +0 -3
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/skeleton.js +0 -9
- package/dist/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/slider.d.ts +0 -5
- package/dist/components/ui/slider.d.ts.map +0 -1
- package/dist/components/ui/slider.js +0 -44
- package/dist/components/ui/slider.js.map +0 -1
- package/dist/components/ui/switch.d.ts +0 -5
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -44
- package/dist/components/ui/switch.js.map +0 -1
- package/dist/components/ui/tabs.d.ts +0 -8
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -52
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/textarea.d.ts +0 -6
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -45
- package/dist/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/theme-toggle/index.d.ts +0 -2
- package/dist/components/ui/theme-toggle/index.d.ts.map +0 -1
- package/dist/components/ui/theme-toggle/index.js +0 -18
- package/dist/components/ui/theme-toggle/index.js.map +0 -1
- package/dist/components/ui/theme-toggle/theme-toggle.d.ts +0 -21
- package/dist/components/ui/theme-toggle/theme-toggle.d.ts.map +0 -1
- package/dist/components/ui/theme-toggle/theme-toggle.js +0 -52
- package/dist/components/ui/theme-toggle/theme-toggle.js.map +0 -1
- package/dist/components/ui/toast.d.ts +0 -5
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toast.js +0 -17
- package/dist/components/ui/toast.js.map +0 -1
- package/dist/components/ui/toggle-group.d.ts +0 -6
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -47
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -5
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -44
- package/dist/components/ui/toggle.js.map +0 -1
- package/dist/components/ui/tooltip.d.ts +0 -8
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -50
- package/dist/components/ui/tooltip.js.map +0 -1
- package/dist/components/ui/use-toast.d.ts +0 -3
- package/dist/components/ui/use-toast.d.ts.map +0 -1
- package/dist/components/ui/use-toast.js +0 -7
- package/dist/components/ui/use-toast.js.map +0 -1
- package/dist/email/button.d.ts +0 -11
- package/dist/email/button.d.ts.map +0 -1
- package/dist/email/button.js +0 -86
- package/dist/email/button.js.map +0 -1
- package/dist/email/index.d.ts +0 -7
- package/dist/email/index.d.ts.map +0 -1
- package/dist/email/index.js +0 -17
- package/dist/email/index.js.map +0 -1
- package/dist/email/layout.d.ts +0 -23
- package/dist/email/layout.d.ts.map +0 -1
- package/dist/email/layout.js +0 -93
- package/dist/email/layout.js.map +0 -1
- package/dist/email/typography.d.ts +0 -11
- package/dist/email/typography.d.ts.map +0 -1
- package/dist/email/typography.js +0 -55
- package/dist/email/typography.js.map +0 -1
- package/dist/hooks/use-media-query.d.ts +0 -2
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-media-query.js +0 -20
- package/dist/hooks/use-media-query.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/theme-utils.d.ts +0 -42
- package/dist/lib/theme-utils.d.ts.map +0 -1
- package/dist/lib/theme-utils.js +0 -85
- package/dist/lib/theme-utils.js.map +0 -1
- package/dist/lib/types.d.ts +0 -18
- package/dist/lib/types.d.ts.map +0 -1
- package/dist/lib/types.js +0 -6
- package/dist/lib/types.js.map +0 -1
- package/dist/lib/utils.d.ts +0 -34
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/utils.js +0 -52
- package/dist/lib/utils.js.map +0 -1
- package/dist/styles/constants/button-colors.d.ts +0 -59
- package/dist/styles/constants/button-colors.d.ts.map +0 -1
- package/dist/styles/constants/button-colors.js +0 -61
- package/dist/styles/constants/button-colors.js.map +0 -1
- package/dist/themes/catalog.d.ts +0 -2
- package/dist/themes/catalog.d.ts.map +0 -1
- package/dist/themes/catalog.js +0 -16
- package/dist/themes/catalog.js.map +0 -1
- package/dist/themes/index.d.ts.map +0 -1
- package/dist/themes/theme-context.d.ts +0 -30
- package/dist/themes/theme-context.d.ts.map +0 -1
- package/dist/themes/theme-context.js +0 -43
- package/dist/themes/theme-context.js.map +0 -1
- package/dist/themes/theme-provider.d.ts +0 -9
- package/dist/themes/theme-provider.d.ts.map +0 -1
- package/dist/themes/theme-provider.js +0 -16
- package/dist/themes/theme-provider.js.map +0 -1
- package/dist/tokens/colors.d.ts +0 -135
- package/dist/tokens/colors.d.ts.map +0 -1
- package/dist/tokens/colors.js +0 -140
- package/dist/tokens/colors.js.map +0 -1
- package/dist/tokens/index.d.ts +0 -256
- package/dist/tokens/index.d.ts.map +0 -1
- package/dist/tokens/index.js +0 -39
- package/dist/tokens/index.js.map +0 -1
- package/dist/tokens/radius.d.ts +0 -19
- package/dist/tokens/radius.d.ts.map +0 -1
- package/dist/tokens/radius.js +0 -27
- package/dist/tokens/radius.js.map +0 -1
- package/dist/tokens/shadows.d.ts +0 -21
- package/dist/tokens/shadows.d.ts.map +0 -1
- package/dist/tokens/shadows.js +0 -26
- package/dist/tokens/shadows.js.map +0 -1
- package/dist/tokens/spacing.d.ts +0 -26
- package/dist/tokens/spacing.d.ts.map +0 -1
- package/dist/tokens/spacing.js +0 -36
- package/dist/tokens/spacing.js.map +0 -1
- package/dist/tokens/typography.d.ts +0 -75
- package/dist/tokens/typography.d.ts.map +0 -1
- package/dist/tokens/typography.js +0 -55
- package/dist/tokens/typography.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/dist/index.mjs
ADDED
@@ -0,0 +1,1650 @@
|
|
1
|
+
import * as React2 from 'react';
|
2
|
+
import { createContext, useState, useEffect, useContext } from 'react';
|
3
|
+
import { Slot } from '@radix-ui/react-slot';
|
4
|
+
import { cva } from 'class-variance-authority';
|
5
|
+
import { clsx } from 'clsx';
|
6
|
+
import { twMerge } from 'tailwind-merge';
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
8
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
9
|
+
import { IconCheck, IconPointFilled, IconChevronRight, IconX, IconSearch, IconSun, IconMoon } from '@tabler/icons-react';
|
10
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
11
|
+
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
12
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
13
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
14
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
15
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
16
|
+
import { Command as Command$1 } from 'cmdk';
|
17
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
18
|
+
import * as ContextMenuPrimitive from '@radix-ui/react-context-menu';
|
19
|
+
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1 } from 'next-themes';
|
20
|
+
|
21
|
+
// src/components/ui/button.tsx
|
22
|
+
function cn(...inputs) {
|
23
|
+
return twMerge(clsx(inputs));
|
24
|
+
}
|
25
|
+
function generateId(prefix = "id") {
|
26
|
+
const randomId = Math.random().toString(36).substring(2, 9);
|
27
|
+
return `${prefix}-${randomId}`;
|
28
|
+
}
|
29
|
+
function isNotNullOrUndefined(value) {
|
30
|
+
return value !== null && value !== void 0;
|
31
|
+
}
|
32
|
+
function filterDOMProps(props, propNames) {
|
33
|
+
const result = { ...props };
|
34
|
+
propNames.forEach((name) => delete result[name]);
|
35
|
+
return result;
|
36
|
+
}
|
37
|
+
var buttonVariants = cva(
|
38
|
+
"float-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-[4px] text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
39
|
+
{
|
40
|
+
variants: {
|
41
|
+
variant: {
|
42
|
+
primary: "bg-[var(--button-bg-primary)] text-[var(--button-text-primary)] hover:bg-[var(--button-bg-primary-hover)] hover:text-[var(--button-text-primary-hover)] border-[var(--button-border-primary)] hover:border-[var(--button-border-primary-hover)]",
|
43
|
+
secondary: "bg-[var(--button-bg-secondary)] text-[var(--button-text-secondary)] hover:bg-[var(--button-bg-secondary-hover)] hover:text-[var(--button-text-secondary-hover)] border-[var(--button-border-secondary)] hover:border-[var(--button-border-secondary-hover)]",
|
44
|
+
ghost: "text-[var(--button-text-ghost)] hover:bg-[var(--button-bg-ghost-hover)] hover:text-[var(--button-text-ghost-hover)]",
|
45
|
+
outline: "border text-[var(--button-text-outline)] hover:bg-[var(--button-bg-outline-hover)] hover:text-[var(--button-text-outline-hover)] border-[var(--button-border-outline)] hover:border-[var(--button-border-outline-hover)]",
|
46
|
+
link: "text-[var(--button-text-link)] hover:text-[var(--button-text-link-hover)] bg-transparent border-transparent",
|
47
|
+
destructive: "bg-[var(--button-bg-destructive)] text-[var(--button-text-destructive)] hover:bg-[var(--button-bg-destructive-hover)] hover:text-[var(--button-text-destructive-hover)] border-[var(--button-border-destructive)] hover:border-[var(--button-border-destructive-hover)]",
|
48
|
+
// Backward compatibility
|
49
|
+
default: "bg-[var(--button-bg-primary)] text-[var(--button-text-primary)] hover:bg-[var(--button-bg-primary-hover)] hover:text-[var(--button-text-primary-hover)] border-[var(--button-border-primary)] hover:border-[var(--button-border-primary-hover)]",
|
50
|
+
tertiary: "text-[var(--button-text-ghost)] hover:bg-[var(--button-bg-ghost-hover)] hover:text-[var(--button-text-ghost-hover)]",
|
51
|
+
primaryError: "bg-[var(--button-bg-destructive)] text-[var(--button-text-destructive)] hover:bg-[var(--button-bg-destructive-hover)] hover:text-[var(--button-text-destructive-hover)] border-[var(--button-border-destructive)] hover:border-[var(--button-border-destructive-hover)]"
|
52
|
+
},
|
53
|
+
size: {
|
54
|
+
sm: "h-6 px-2 text-xs float-button-sm",
|
55
|
+
md: "h-8 px-3 text-sm float-button-md",
|
56
|
+
lg: "h-10 px-5 text-base float-button-lg",
|
57
|
+
iconSm: "h-6 w-6 p-0 float-button-icon-sm",
|
58
|
+
iconMd: "h-8 w-8 p-0 float-button-icon-md",
|
59
|
+
iconLg: "h-10 w-10 p-0 float-button-icon-lg",
|
60
|
+
// For backward compatibility
|
61
|
+
icon: "h-8 w-8 p-0 float-button-icon-md"
|
62
|
+
// Map "icon" to be equivalent to iconMd
|
63
|
+
}
|
64
|
+
},
|
65
|
+
defaultVariants: {
|
66
|
+
variant: "primary",
|
67
|
+
size: "md"
|
68
|
+
}
|
69
|
+
}
|
70
|
+
);
|
71
|
+
var Button = React2.forwardRef(
|
72
|
+
({
|
73
|
+
className,
|
74
|
+
variant,
|
75
|
+
size = "md",
|
76
|
+
asChild = false,
|
77
|
+
leftIcon,
|
78
|
+
rightIcon,
|
79
|
+
isLoading = false,
|
80
|
+
color = "brand",
|
81
|
+
dsVariant,
|
82
|
+
iconOnly = false,
|
83
|
+
children,
|
84
|
+
...props
|
85
|
+
}, ref) => {
|
86
|
+
let resolvedVariant = dsVariant || variant;
|
87
|
+
if (resolvedVariant === "default") resolvedVariant = "primary";
|
88
|
+
if (resolvedVariant === "tertiary") resolvedVariant = "ghost";
|
89
|
+
if (resolvedVariant === "primaryError") resolvedVariant = "destructive";
|
90
|
+
const isDisabled = props.disabled || isLoading;
|
91
|
+
let sizeVariant = size;
|
92
|
+
if (iconOnly) {
|
93
|
+
if (typeof size === "string" && !size.startsWith("icon")) {
|
94
|
+
if (size === "sm") sizeVariant = "iconSm";
|
95
|
+
else if (size === "lg") sizeVariant = "iconLg";
|
96
|
+
else sizeVariant = "iconMd";
|
97
|
+
}
|
98
|
+
}
|
99
|
+
const classes = cn(
|
100
|
+
buttonVariants({
|
101
|
+
variant: resolvedVariant,
|
102
|
+
size: sizeVariant,
|
103
|
+
className
|
104
|
+
})
|
105
|
+
);
|
106
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
107
|
+
leftIcon && !asChild && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center", children: leftIcon }),
|
108
|
+
isLoading && !asChild ? /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
|
109
|
+
/* @__PURE__ */ jsxs("svg", { className: "animate-spin -ml-1 mr-2", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
|
110
|
+
/* @__PURE__ */ jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "1" }),
|
111
|
+
/* @__PURE__ */ jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
112
|
+
] }),
|
113
|
+
/* @__PURE__ */ jsx("span", { children: "Loading..." })
|
114
|
+
] }) : children,
|
115
|
+
rightIcon && !asChild && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center", children: rightIcon })
|
116
|
+
] });
|
117
|
+
if (asChild) {
|
118
|
+
return /* @__PURE__ */ jsx(
|
119
|
+
Slot,
|
120
|
+
{
|
121
|
+
className: classes,
|
122
|
+
ref,
|
123
|
+
...props,
|
124
|
+
children
|
125
|
+
}
|
126
|
+
);
|
127
|
+
}
|
128
|
+
return /* @__PURE__ */ jsx(
|
129
|
+
"button",
|
130
|
+
{
|
131
|
+
className: classes,
|
132
|
+
disabled: isDisabled,
|
133
|
+
ref,
|
134
|
+
...props,
|
135
|
+
children: content
|
136
|
+
}
|
137
|
+
);
|
138
|
+
}
|
139
|
+
);
|
140
|
+
Button.displayName = "Button";
|
141
|
+
var DropdownMenuRoot = DropdownMenuPrimitive.Root;
|
142
|
+
var DropdownMenuTrigger = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
143
|
+
DropdownMenuPrimitive.Trigger,
|
144
|
+
{
|
145
|
+
ref,
|
146
|
+
className: cn("outline-none select-none", className),
|
147
|
+
...props,
|
148
|
+
children
|
149
|
+
}
|
150
|
+
));
|
151
|
+
DropdownMenuTrigger.displayName = DropdownMenuPrimitive.Trigger.displayName;
|
152
|
+
var DropdownMenuContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
|
153
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
154
|
+
DropdownMenuPrimitive.Content,
|
155
|
+
{
|
156
|
+
ref,
|
157
|
+
sideOffset,
|
158
|
+
className: cn(
|
159
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border text-sm shadow-md animate-in fade-in-80 px-1",
|
160
|
+
"bg-[var(--dropdown-bg)] text-[var(--dropdown-text)] border-[var(--dropdown-border)]",
|
161
|
+
"shadow-[var(--dropdown-shadow)]",
|
162
|
+
className
|
163
|
+
),
|
164
|
+
...props
|
165
|
+
}
|
166
|
+
) });
|
167
|
+
});
|
168
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
169
|
+
var DropdownMenuItem = React2.forwardRef(({ className, color, leftIcon, rightIcon, children, inset, ...props }, ref) => {
|
170
|
+
const baseClasses = cn(
|
171
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-2.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
172
|
+
"text-[var(--dropdown-item-text)]",
|
173
|
+
"focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)]",
|
174
|
+
"hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
175
|
+
inset && "pl-8"
|
176
|
+
);
|
177
|
+
const colorVariantClasses = {
|
178
|
+
brand: "focus:bg-[var(--dropdown-item-bg-brand-focus)] focus:text-[var(--dropdown-item-text-brand-focus)] hover:bg-[var(--dropdown-item-bg-brand-hover)] hover:text-[var(--dropdown-item-text-brand-hover)]",
|
179
|
+
error: "focus:bg-[var(--dropdown-item-bg-error-focus)] focus:text-[var(--dropdown-item-text-error-focus)] hover:bg-[var(--dropdown-item-bg-error-hover)] hover:text-[var(--dropdown-item-text-error-hover)]",
|
180
|
+
warning: "focus:bg-[var(--dropdown-item-bg-warning-focus)] focus:text-[var(--dropdown-item-text-warning-focus)] hover:bg-[var(--dropdown-item-bg-warning-hover)] hover:text-[var(--dropdown-item-text-warning-hover)]",
|
181
|
+
success: "focus:bg-[var(--dropdown-item-bg-success-focus)] focus:text-[var(--dropdown-item-text-success-focus)] hover:bg-[var(--dropdown-item-bg-success-hover)] hover:text-[var(--dropdown-item-text-success-hover)]"
|
182
|
+
};
|
183
|
+
return /* @__PURE__ */ jsxs(
|
184
|
+
DropdownMenuPrimitive.Item,
|
185
|
+
{
|
186
|
+
ref,
|
187
|
+
className: cn(
|
188
|
+
baseClasses,
|
189
|
+
color && colorVariantClasses[color],
|
190
|
+
className
|
191
|
+
),
|
192
|
+
...props,
|
193
|
+
children: [
|
194
|
+
leftIcon && /* @__PURE__ */ jsx("span", { className: cn("mr-2 h-4 w-4 flex items-center justify-center text-[var(--text-tertiary)]", { "ml-auto": !children && rightIcon }), children: leftIcon }),
|
195
|
+
children,
|
196
|
+
rightIcon && /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2 text-[var(--text-tertiary)] group-hover:text-current", children: rightIcon })
|
197
|
+
]
|
198
|
+
}
|
199
|
+
);
|
200
|
+
});
|
201
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
202
|
+
var DropdownMenuLabel = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
203
|
+
DropdownMenuPrimitive.Label,
|
204
|
+
{
|
205
|
+
ref,
|
206
|
+
className: cn(
|
207
|
+
"py-1.5 pr-2 text-sm font-normal text-[var(--text-tertiary)] mb-1",
|
208
|
+
inset ? "pl-8" : "pl-2",
|
209
|
+
className
|
210
|
+
),
|
211
|
+
...props
|
212
|
+
}
|
213
|
+
));
|
214
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
215
|
+
var DropdownMenuCheckboxItem = React2.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
216
|
+
DropdownMenuPrimitive.CheckboxItem,
|
217
|
+
{
|
218
|
+
ref,
|
219
|
+
className: cn(
|
220
|
+
"relative flex cursor-default select-none items-center rounded-sm py-2.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
221
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
222
|
+
className
|
223
|
+
),
|
224
|
+
checked,
|
225
|
+
...props,
|
226
|
+
children: [
|
227
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, { className: "h-4 w-4 text-[var(--text-tertiary)]", strokeWidth: 2 }) }) }),
|
228
|
+
children
|
229
|
+
]
|
230
|
+
}
|
231
|
+
));
|
232
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
233
|
+
var DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
234
|
+
var DropdownMenuRadioItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
235
|
+
DropdownMenuPrimitive.RadioItem,
|
236
|
+
{
|
237
|
+
ref,
|
238
|
+
className: cn(
|
239
|
+
"relative flex cursor-default select-none items-center rounded-sm py-2.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
240
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
241
|
+
className
|
242
|
+
),
|
243
|
+
...props,
|
244
|
+
children: [
|
245
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(IconPointFilled, { className: "h-3 w-3 fill-current text-[var(--text-tertiary)]" }) }) }),
|
246
|
+
children
|
247
|
+
]
|
248
|
+
}
|
249
|
+
));
|
250
|
+
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
251
|
+
var DropdownMenuSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
252
|
+
DropdownMenuPrimitive.Separator,
|
253
|
+
{
|
254
|
+
ref,
|
255
|
+
className: cn("-mx-1 my-1 h-px bg-[var(--dropdown-separator-bg)]", className),
|
256
|
+
...props
|
257
|
+
}
|
258
|
+
));
|
259
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
260
|
+
var DropdownMenuShortcut = ({
|
261
|
+
className,
|
262
|
+
...props
|
263
|
+
}) => {
|
264
|
+
return /* @__PURE__ */ jsx(
|
265
|
+
"span",
|
266
|
+
{
|
267
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60 text-[var(--text-tertiary)]", className),
|
268
|
+
...props
|
269
|
+
}
|
270
|
+
);
|
271
|
+
};
|
272
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
273
|
+
var DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
274
|
+
var DropdownMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
275
|
+
DropdownMenuPrimitive.SubTrigger,
|
276
|
+
{
|
277
|
+
ref,
|
278
|
+
className: cn(
|
279
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-2.5 text-sm outline-none data-[state=open]:bg-[var(--dropdown-item-bg-hover)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
280
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
281
|
+
inset && "pl-8",
|
282
|
+
className
|
283
|
+
),
|
284
|
+
...props,
|
285
|
+
children: [
|
286
|
+
children,
|
287
|
+
/* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto h-4 w-4 text-[var(--text-tertiary)]" })
|
288
|
+
]
|
289
|
+
}
|
290
|
+
));
|
291
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
292
|
+
var DropdownMenuSubContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
293
|
+
DropdownMenuPrimitive.SubContent,
|
294
|
+
{
|
295
|
+
ref,
|
296
|
+
className: cn(
|
297
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-lg animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 py-1 px-2",
|
298
|
+
"bg-[var(--dropdown-bg)] text-[var(--dropdown-text)] border-[var(--dropdown-border)] shadow-[var(--dropdown-shadow)]",
|
299
|
+
className
|
300
|
+
),
|
301
|
+
...props
|
302
|
+
}
|
303
|
+
));
|
304
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
305
|
+
var DropdownMenu = {
|
306
|
+
Root: DropdownMenuRoot,
|
307
|
+
Trigger: DropdownMenuTrigger,
|
308
|
+
Content: DropdownMenuContent,
|
309
|
+
Item: DropdownMenuItem,
|
310
|
+
CheckboxItem: DropdownMenuCheckboxItem,
|
311
|
+
RadioGroup: DropdownMenuRadioGroup,
|
312
|
+
RadioItem: DropdownMenuRadioItem,
|
313
|
+
Label: DropdownMenuLabel,
|
314
|
+
Separator: DropdownMenuSeparator,
|
315
|
+
Shortcut: DropdownMenuShortcut,
|
316
|
+
Group: DropdownMenuPrimitive.Group,
|
317
|
+
Portal: DropdownMenuPrimitive.Portal,
|
318
|
+
Sub: DropdownMenuSub,
|
319
|
+
SubContent: DropdownMenuSubContent,
|
320
|
+
SubTrigger: DropdownMenuSubTrigger
|
321
|
+
};
|
322
|
+
var Heading = React2.forwardRef(
|
323
|
+
({
|
324
|
+
level = 1,
|
325
|
+
size,
|
326
|
+
weight = "bold",
|
327
|
+
italic = false,
|
328
|
+
underline = false,
|
329
|
+
color = "default",
|
330
|
+
className = "",
|
331
|
+
as,
|
332
|
+
children,
|
333
|
+
...props
|
334
|
+
}, ref) => {
|
335
|
+
const defaultTag = `h${level}`;
|
336
|
+
const Component = as || defaultTag;
|
337
|
+
const defaultSizes = {
|
338
|
+
1: "md",
|
339
|
+
2: "sm",
|
340
|
+
3: "xs",
|
341
|
+
4: "text-xl",
|
342
|
+
5: "text-lg",
|
343
|
+
6: "text-md"
|
344
|
+
};
|
345
|
+
const finalSize = size || defaultSizes[level];
|
346
|
+
const sizeClasses = {
|
347
|
+
"2xl": "text-5xl leading-tight tracking-tight",
|
348
|
+
"xl": "text-4xl leading-tight tracking-tight",
|
349
|
+
"lg": "text-3xl leading-tight tracking-tight",
|
350
|
+
"md": "text-2xl leading-tight tracking-tight",
|
351
|
+
"sm": "text-xl leading-tight tracking-tight",
|
352
|
+
"xs": "text-lg leading-tight tracking-tight",
|
353
|
+
"text-xl": "text-xl leading-tight",
|
354
|
+
"text-lg": "text-lg leading-tight",
|
355
|
+
"text-md": "text-base leading-tight"
|
356
|
+
};
|
357
|
+
const weightClasses = {
|
358
|
+
regular: "font-normal",
|
359
|
+
medium: "font-medium",
|
360
|
+
semibold: "font-semibold",
|
361
|
+
bold: "font-bold"
|
362
|
+
};
|
363
|
+
const colorClasses = {
|
364
|
+
default: "text-foreground",
|
365
|
+
muted: "text-muted-foreground",
|
366
|
+
brand: "text-brand-700 dark:text-brand-400",
|
367
|
+
error: "text-error-700 dark:text-error-400",
|
368
|
+
warning: "text-warning-700 dark:text-warning-400",
|
369
|
+
success: "text-success-700 dark:text-success-400"
|
370
|
+
};
|
371
|
+
return /* @__PURE__ */ jsx(
|
372
|
+
Component,
|
373
|
+
{
|
374
|
+
ref,
|
375
|
+
className: cn(
|
376
|
+
sizeClasses[finalSize],
|
377
|
+
weightClasses[weight],
|
378
|
+
colorClasses[color],
|
379
|
+
italic && "italic",
|
380
|
+
underline && "underline",
|
381
|
+
className
|
382
|
+
),
|
383
|
+
...props,
|
384
|
+
children
|
385
|
+
}
|
386
|
+
);
|
387
|
+
}
|
388
|
+
);
|
389
|
+
Heading.displayName = "Heading";
|
390
|
+
var Text = React2.forwardRef(
|
391
|
+
({
|
392
|
+
size = "md",
|
393
|
+
weight = "regular",
|
394
|
+
italic = false,
|
395
|
+
underline = false,
|
396
|
+
color = "default",
|
397
|
+
className = "",
|
398
|
+
as: Component = "p",
|
399
|
+
children,
|
400
|
+
...props
|
401
|
+
}, ref) => {
|
402
|
+
const sizeClasses = {
|
403
|
+
xl: "text-xl leading-relaxed",
|
404
|
+
lg: "text-lg leading-relaxed",
|
405
|
+
md: "text-base leading-relaxed",
|
406
|
+
sm: "text-sm leading-relaxed",
|
407
|
+
xs: "text-xs leading-relaxed"
|
408
|
+
};
|
409
|
+
const weightClasses = {
|
410
|
+
regular: "font-normal",
|
411
|
+
medium: "font-medium",
|
412
|
+
semibold: "font-semibold",
|
413
|
+
bold: "font-bold"
|
414
|
+
};
|
415
|
+
const colorClasses = {
|
416
|
+
default: "text-foreground",
|
417
|
+
muted: "text-muted-foreground",
|
418
|
+
brand: "text-brand-700 dark:text-brand-400",
|
419
|
+
error: "text-error-700 dark:text-error-400",
|
420
|
+
warning: "text-warning-700 dark:text-warning-400",
|
421
|
+
success: "text-success-700 dark:text-success-400"
|
422
|
+
};
|
423
|
+
return /* @__PURE__ */ jsx(
|
424
|
+
Component,
|
425
|
+
{
|
426
|
+
ref,
|
427
|
+
className: cn(
|
428
|
+
sizeClasses[size],
|
429
|
+
weightClasses[weight],
|
430
|
+
colorClasses[color],
|
431
|
+
italic && "italic",
|
432
|
+
underline && "underline",
|
433
|
+
className
|
434
|
+
),
|
435
|
+
...props,
|
436
|
+
children
|
437
|
+
}
|
438
|
+
);
|
439
|
+
}
|
440
|
+
);
|
441
|
+
Text.displayName = "Text";
|
442
|
+
var Toggle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
443
|
+
TogglePrimitive.Root,
|
444
|
+
{
|
445
|
+
ref,
|
446
|
+
className: cn(
|
447
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors px-3 h-10 border border-[var(--border-tertiary)] bg-[var(--bg-secondary)] text-[var(--text-tertiary)] hover:bg-[var(--bg-tertiary)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--border-brand)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-[var(--bg-brand-solid)] data-[state=on]:text-[var(--text-brand-primary)]",
|
448
|
+
className
|
449
|
+
),
|
450
|
+
...props
|
451
|
+
}
|
452
|
+
));
|
453
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
454
|
+
var ToggleGroup = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
455
|
+
ToggleGroupPrimitive.Root,
|
456
|
+
{
|
457
|
+
ref,
|
458
|
+
className: cn("flex items-center gap-1", className),
|
459
|
+
...props,
|
460
|
+
children
|
461
|
+
}
|
462
|
+
));
|
463
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
464
|
+
var ToggleGroupItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
465
|
+
ToggleGroupPrimitive.Item,
|
466
|
+
{
|
467
|
+
ref,
|
468
|
+
className: cn(
|
469
|
+
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors px-3 h-10 border border-[var(--border-tertiary)] bg-[var(--bg-secondary)] text-[var(--text-tertiary)] hover:bg-[var(--bg-tertiary)] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--border-brand)] focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-[var(--bg-brand-solid)] data-[state=on]:text-[var(--text-brand-primary)]",
|
470
|
+
className
|
471
|
+
),
|
472
|
+
...props
|
473
|
+
}
|
474
|
+
));
|
475
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
476
|
+
var Slider = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
477
|
+
SliderPrimitive.Root,
|
478
|
+
{
|
479
|
+
ref,
|
480
|
+
className: cn(
|
481
|
+
"relative flex w-full touch-none select-none items-center",
|
482
|
+
className
|
483
|
+
),
|
484
|
+
...props,
|
485
|
+
children: [
|
486
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-1.5 w-full grow overflow-hidden rounded-full bg-primary/20", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
487
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-4 w-4 rounded-full border border-primary/50 bg-background shadow transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" })
|
488
|
+
]
|
489
|
+
}
|
490
|
+
));
|
491
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
492
|
+
var Popover = PopoverPrimitive.Root;
|
493
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
494
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
495
|
+
var PopoverContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
496
|
+
PopoverPrimitive.Content,
|
497
|
+
{
|
498
|
+
ref,
|
499
|
+
align,
|
500
|
+
sideOffset,
|
501
|
+
className: cn(
|
502
|
+
"z-50 w-72 rounded-md border border-[var(--border-tertiary)] bg-[var(--bg-tertiary)] p-4 text-[var(--text-tertiary)] shadow-md outline-none 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
503
|
+
className
|
504
|
+
),
|
505
|
+
...props
|
506
|
+
}
|
507
|
+
) }));
|
508
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
509
|
+
var HoverCard = HoverCardPrimitive.Root;
|
510
|
+
var HoverCardTrigger = HoverCardPrimitive.Trigger;
|
511
|
+
var HoverCardContent = React2.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
512
|
+
HoverCardPrimitive.Content,
|
513
|
+
{
|
514
|
+
ref,
|
515
|
+
align,
|
516
|
+
sideOffset,
|
517
|
+
className: cn(
|
518
|
+
"z-50 w-64 rounded-md border border-[var(--border-tertiary)] bg-[var(--bg-tertiary)] p-4 text-[var(--text-tertiary)] shadow-md outline-none 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-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
519
|
+
className
|
520
|
+
),
|
521
|
+
...props
|
522
|
+
}
|
523
|
+
));
|
524
|
+
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName;
|
525
|
+
var Sheet = SheetPrimitive.Root;
|
526
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
527
|
+
var SheetClose = SheetPrimitive.Close;
|
528
|
+
var SheetPortal = SheetPrimitive.Portal;
|
529
|
+
var SheetOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
530
|
+
SheetPrimitive.Overlay,
|
531
|
+
{
|
532
|
+
className: cn(
|
533
|
+
"fixed inset-0 z-50 bg-[var(--bg-overlay)]/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
534
|
+
className
|
535
|
+
),
|
536
|
+
...props,
|
537
|
+
ref
|
538
|
+
}
|
539
|
+
));
|
540
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
541
|
+
var SheetContent = React2.forwardRef(({ side = "right", className, children, ...props }, ref) => {
|
542
|
+
const sideClasses = {
|
543
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
544
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
545
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
|
546
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
|
547
|
+
};
|
548
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
549
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
550
|
+
/* @__PURE__ */ jsxs(
|
551
|
+
SheetPrimitive.Content,
|
552
|
+
{
|
553
|
+
ref,
|
554
|
+
className: cn(
|
555
|
+
"fixed z-50 gap-4 bg-[var(--bg-primary)] text-[var(--text-primary)] border-[var(--border-tertiary)] p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
556
|
+
sideClasses[side],
|
557
|
+
className
|
558
|
+
),
|
559
|
+
...props,
|
560
|
+
children: [
|
561
|
+
children,
|
562
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[var(--bg-primary)] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--border-brand)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-[var(--bg-secondary)] data-[state=open]:text-[var(--text-tertiary)]", children: [
|
563
|
+
/* @__PURE__ */ jsx(IconX, { size: 16, stroke: 1.5 }),
|
564
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
565
|
+
] })
|
566
|
+
]
|
567
|
+
}
|
568
|
+
)
|
569
|
+
] });
|
570
|
+
});
|
571
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
572
|
+
var SheetHeader = ({
|
573
|
+
className,
|
574
|
+
...props
|
575
|
+
}) => /* @__PURE__ */ jsx(
|
576
|
+
"div",
|
577
|
+
{
|
578
|
+
className: cn(
|
579
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
580
|
+
className
|
581
|
+
),
|
582
|
+
...props
|
583
|
+
}
|
584
|
+
);
|
585
|
+
SheetHeader.displayName = "SheetHeader";
|
586
|
+
var SheetFooter = ({
|
587
|
+
className,
|
588
|
+
...props
|
589
|
+
}) => /* @__PURE__ */ jsx(
|
590
|
+
"div",
|
591
|
+
{
|
592
|
+
className: cn(
|
593
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
594
|
+
className
|
595
|
+
),
|
596
|
+
...props
|
597
|
+
}
|
598
|
+
);
|
599
|
+
SheetFooter.displayName = "SheetFooter";
|
600
|
+
var SheetTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
601
|
+
SheetPrimitive.Title,
|
602
|
+
{
|
603
|
+
ref,
|
604
|
+
className: cn("text-lg font-semibold text-[var(--text-primary)]", className),
|
605
|
+
...props
|
606
|
+
}
|
607
|
+
));
|
608
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
609
|
+
var SheetDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
610
|
+
SheetPrimitive.Description,
|
611
|
+
{
|
612
|
+
ref,
|
613
|
+
className: cn("text-sm text-[var(--text-tertiary)]", className),
|
614
|
+
...props
|
615
|
+
}
|
616
|
+
));
|
617
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
618
|
+
var Dialog = SheetPrimitive.Root;
|
619
|
+
var DialogPortal = SheetPrimitive.Portal;
|
620
|
+
var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
621
|
+
SheetPrimitive.Overlay,
|
622
|
+
{
|
623
|
+
ref,
|
624
|
+
className: cn(
|
625
|
+
"fixed inset-0 z-50 bg-[var(--bg-overlay)]/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
626
|
+
className
|
627
|
+
),
|
628
|
+
...props
|
629
|
+
}
|
630
|
+
));
|
631
|
+
DialogOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
632
|
+
var DialogContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
633
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
634
|
+
/* @__PURE__ */ jsxs(
|
635
|
+
SheetPrimitive.Content,
|
636
|
+
{
|
637
|
+
ref,
|
638
|
+
className: cn(
|
639
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-[var(--bg-primary)] text-[var(--text-primary)] border-[var(--border-tertiary)] shadow-lg p-6 duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
640
|
+
className
|
641
|
+
),
|
642
|
+
...props,
|
643
|
+
children: [
|
644
|
+
children,
|
645
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[var(--bg-primary)] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--border-brand)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-[var(--bg-secondary)] data-[state=open]:text-[var(--text-tertiary)]", children: [
|
646
|
+
/* @__PURE__ */ jsx(IconX, { className: "h-4 w-4", stroke: 1.5 }),
|
647
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
648
|
+
] })
|
649
|
+
]
|
650
|
+
}
|
651
|
+
)
|
652
|
+
] }));
|
653
|
+
DialogContent.displayName = SheetPrimitive.Content.displayName;
|
654
|
+
var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
655
|
+
SheetPrimitive.Title,
|
656
|
+
{
|
657
|
+
ref,
|
658
|
+
className: cn(
|
659
|
+
"text-lg font-semibold leading-none tracking-tight text-[var(--text-primary)]",
|
660
|
+
className
|
661
|
+
),
|
662
|
+
...props
|
663
|
+
}
|
664
|
+
));
|
665
|
+
DialogTitle.displayName = SheetPrimitive.Title.displayName;
|
666
|
+
var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
667
|
+
SheetPrimitive.Description,
|
668
|
+
{
|
669
|
+
ref,
|
670
|
+
className: cn("text-sm text-[var(--text-tertiary)]", className),
|
671
|
+
...props
|
672
|
+
}
|
673
|
+
));
|
674
|
+
DialogDescription.displayName = SheetPrimitive.Description.displayName;
|
675
|
+
var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
676
|
+
Command$1,
|
677
|
+
{
|
678
|
+
ref,
|
679
|
+
className: cn(
|
680
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
681
|
+
className
|
682
|
+
),
|
683
|
+
...props
|
684
|
+
}
|
685
|
+
));
|
686
|
+
Command.displayName = Command$1.displayName;
|
687
|
+
var CommandDialog = ({ children, ...props }) => {
|
688
|
+
return /* @__PURE__ */ jsx(Dialog, { ...props, children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) });
|
689
|
+
};
|
690
|
+
var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
691
|
+
/* @__PURE__ */ jsx(IconSearch, { size: 16, stroke: 1.5, className: "mr-2 shrink-0 opacity-50" }),
|
692
|
+
/* @__PURE__ */ jsx(
|
693
|
+
Command$1.Input,
|
694
|
+
{
|
695
|
+
ref,
|
696
|
+
className: cn(
|
697
|
+
"flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
698
|
+
className
|
699
|
+
),
|
700
|
+
...props
|
701
|
+
}
|
702
|
+
)
|
703
|
+
] }));
|
704
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
705
|
+
var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
706
|
+
Command$1.List,
|
707
|
+
{
|
708
|
+
ref,
|
709
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
710
|
+
...props
|
711
|
+
}
|
712
|
+
));
|
713
|
+
CommandList.displayName = Command$1.List.displayName;
|
714
|
+
var CommandEmpty = React2.forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
715
|
+
Command$1.Empty,
|
716
|
+
{
|
717
|
+
ref,
|
718
|
+
className: "py-6 text-center text-sm",
|
719
|
+
...props
|
720
|
+
}
|
721
|
+
));
|
722
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
723
|
+
var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
724
|
+
Command$1.Group,
|
725
|
+
{
|
726
|
+
ref,
|
727
|
+
className: cn(
|
728
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
729
|
+
className
|
730
|
+
),
|
731
|
+
...props
|
732
|
+
}
|
733
|
+
));
|
734
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
735
|
+
var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
736
|
+
Command$1.Separator,
|
737
|
+
{
|
738
|
+
ref,
|
739
|
+
className: cn("-mx-1 h-px bg-border", className),
|
740
|
+
...props
|
741
|
+
}
|
742
|
+
));
|
743
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
744
|
+
var CommandItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
745
|
+
Command$1.Item,
|
746
|
+
{
|
747
|
+
ref,
|
748
|
+
className: cn(
|
749
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
750
|
+
className
|
751
|
+
),
|
752
|
+
...props
|
753
|
+
}
|
754
|
+
));
|
755
|
+
CommandItem.displayName = Command$1.Item.displayName;
|
756
|
+
var CommandShortcut = ({
|
757
|
+
className,
|
758
|
+
...props
|
759
|
+
}) => {
|
760
|
+
return /* @__PURE__ */ jsx(
|
761
|
+
"span",
|
762
|
+
{
|
763
|
+
className: cn(
|
764
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
765
|
+
className
|
766
|
+
),
|
767
|
+
...props
|
768
|
+
}
|
769
|
+
);
|
770
|
+
};
|
771
|
+
CommandShortcut.displayName = "CommandShortcut";
|
772
|
+
var Collapsible = CollapsiblePrimitive.Root;
|
773
|
+
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
774
|
+
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
775
|
+
var ContextMenu = ContextMenuPrimitive.Root;
|
776
|
+
var ContextMenuTrigger = ContextMenuPrimitive.Trigger;
|
777
|
+
var ContextMenuGroup = ContextMenuPrimitive.Group;
|
778
|
+
var ContextMenuPortal = ContextMenuPrimitive.Portal;
|
779
|
+
var ContextMenuSub = ContextMenuPrimitive.Sub;
|
780
|
+
var ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;
|
781
|
+
var ContextMenuSubTrigger = React2.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
782
|
+
ContextMenuPrimitive.SubTrigger,
|
783
|
+
{
|
784
|
+
ref,
|
785
|
+
className: cn(
|
786
|
+
"flex cursor-default select-none items-center rounded-sm px-2 py-2.5 text-sm outline-none data-[state=open]:bg-[var(--dropdown-item-bg-hover)] data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
787
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
788
|
+
inset && "pl-8",
|
789
|
+
className
|
790
|
+
),
|
791
|
+
...props,
|
792
|
+
children: [
|
793
|
+
children,
|
794
|
+
/* @__PURE__ */ jsx(IconChevronRight, { className: "ml-auto h-4 w-4 text-[var(--text-tertiary)]" })
|
795
|
+
]
|
796
|
+
}
|
797
|
+
));
|
798
|
+
ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
|
799
|
+
var ContextMenuSubContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
800
|
+
ContextMenuPrimitive.SubContent,
|
801
|
+
{
|
802
|
+
ref,
|
803
|
+
className: cn(
|
804
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-lg animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 py-1 px-2",
|
805
|
+
"bg-[var(--dropdown-bg)] text-[var(--dropdown-text)] border-[var(--dropdown-border)] shadow-[var(--dropdown-shadow)]",
|
806
|
+
className
|
807
|
+
),
|
808
|
+
...props
|
809
|
+
}
|
810
|
+
));
|
811
|
+
ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;
|
812
|
+
var ContextMenuContent = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
813
|
+
ContextMenuPrimitive.Content,
|
814
|
+
{
|
815
|
+
ref,
|
816
|
+
className: cn(
|
817
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-md animate-in fade-in-80 px-1",
|
818
|
+
"bg-[var(--dropdown-bg)] text-[var(--dropdown-text)] border-[var(--dropdown-border)]",
|
819
|
+
"shadow-[var(--dropdown-shadow)]",
|
820
|
+
className
|
821
|
+
),
|
822
|
+
...props
|
823
|
+
}
|
824
|
+
) }));
|
825
|
+
ContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;
|
826
|
+
var ContextMenuItem = React2.forwardRef(({ className, inset, color, leftIcon, rightIcon, children, ...props }, ref) => {
|
827
|
+
const baseClasses = cn(
|
828
|
+
"relative flex cursor-default select-none items-center rounded-sm px-2 py-2.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
829
|
+
"text-[var(--dropdown-item-text)]",
|
830
|
+
"focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)]",
|
831
|
+
"hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
832
|
+
inset && "pl-8"
|
833
|
+
);
|
834
|
+
const colorVariantClasses = {
|
835
|
+
brand: "focus:bg-[var(--dropdown-item-bg-brand-focus)] focus:text-[var(--dropdown-item-text-brand-focus)] hover:bg-[var(--dropdown-item-bg-brand-hover)] hover:text-[var(--dropdown-item-text-brand-hover)]",
|
836
|
+
error: "focus:bg-[var(--dropdown-item-bg-error-focus)] focus:text-[var(--dropdown-item-text-error-focus)] hover:bg-[var(--dropdown-item-bg-error-hover)] hover:text-[var(--dropdown-item-text-error-hover)]",
|
837
|
+
warning: "focus:bg-[var(--dropdown-item-bg-warning-focus)] focus:text-[var(--dropdown-item-text-warning-focus)] hover:bg-[var(--dropdown-item-bg-warning-hover)] hover:text-[var(--dropdown-item-text-warning-hover)]",
|
838
|
+
success: "focus:bg-[var(--dropdown-item-bg-success-focus)] focus:text-[var(--dropdown-item-text-success-focus)] hover:bg-[var(--dropdown-item-bg-success-hover)] hover:text-[var(--dropdown-item-text-success-hover)]"
|
839
|
+
};
|
840
|
+
return /* @__PURE__ */ jsxs(
|
841
|
+
ContextMenuPrimitive.Item,
|
842
|
+
{
|
843
|
+
ref,
|
844
|
+
className: cn(
|
845
|
+
baseClasses,
|
846
|
+
color && colorVariantClasses[color],
|
847
|
+
className
|
848
|
+
),
|
849
|
+
...props,
|
850
|
+
children: [
|
851
|
+
leftIcon && /* @__PURE__ */ jsx("span", { className: cn("mr-2 h-4 w-4 flex items-center justify-center text-[var(--text-tertiary)]", { "ml-auto": !children && rightIcon }), children: leftIcon }),
|
852
|
+
children,
|
853
|
+
rightIcon && /* @__PURE__ */ jsx("span", { className: "ml-auto pl-2 text-[var(--text-tertiary)] group-hover:text-current", children: rightIcon })
|
854
|
+
]
|
855
|
+
}
|
856
|
+
);
|
857
|
+
});
|
858
|
+
ContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;
|
859
|
+
var ContextMenuCheckboxItem = React2.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
860
|
+
ContextMenuPrimitive.CheckboxItem,
|
861
|
+
{
|
862
|
+
ref,
|
863
|
+
className: cn(
|
864
|
+
"relative flex cursor-default select-none items-center rounded-sm py-2.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
865
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
866
|
+
className
|
867
|
+
),
|
868
|
+
checked,
|
869
|
+
...props,
|
870
|
+
children: [
|
871
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(IconCheck, { className: "h-4 w-4 text-[var(--text-tertiary)]", strokeWidth: 2 }) }) }),
|
872
|
+
children
|
873
|
+
]
|
874
|
+
}
|
875
|
+
));
|
876
|
+
ContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;
|
877
|
+
var ContextMenuRadioItem = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
878
|
+
ContextMenuPrimitive.RadioItem,
|
879
|
+
{
|
880
|
+
ref,
|
881
|
+
className: cn(
|
882
|
+
"relative flex cursor-default select-none items-center rounded-sm py-2.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
883
|
+
"text-[var(--dropdown-item-text)] focus:bg-[var(--dropdown-item-bg-focus)] focus:text-[var(--dropdown-item-text-focus)] hover:bg-[var(--dropdown-item-bg-hover)] hover:text-[var(--dropdown-item-text-hover)]",
|
884
|
+
className
|
885
|
+
),
|
886
|
+
...props,
|
887
|
+
children: [
|
888
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(IconPointFilled, { className: "h-3 w-3 fill-current text-[var(--text-tertiary)]" }) }) }),
|
889
|
+
children
|
890
|
+
]
|
891
|
+
}
|
892
|
+
));
|
893
|
+
ContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;
|
894
|
+
var ContextMenuLabel = React2.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
895
|
+
ContextMenuPrimitive.Label,
|
896
|
+
{
|
897
|
+
ref,
|
898
|
+
className: cn(
|
899
|
+
"py-1.5 pr-2 text-sm font-normal text-[var(--text-tertiary)] mb-1",
|
900
|
+
inset ? "pl-8" : "pl-2",
|
901
|
+
className
|
902
|
+
),
|
903
|
+
...props
|
904
|
+
}
|
905
|
+
));
|
906
|
+
ContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;
|
907
|
+
var ContextMenuSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
908
|
+
ContextMenuPrimitive.Separator,
|
909
|
+
{
|
910
|
+
ref,
|
911
|
+
className: cn("-mx-1 my-1 h-px bg-[var(--dropdown-separator-bg)]", className),
|
912
|
+
...props
|
913
|
+
}
|
914
|
+
));
|
915
|
+
ContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;
|
916
|
+
var ContextMenuShortcut = ({
|
917
|
+
className,
|
918
|
+
...props
|
919
|
+
}) => {
|
920
|
+
return /* @__PURE__ */ jsx(
|
921
|
+
"span",
|
922
|
+
{
|
923
|
+
className: cn("ml-auto text-xs tracking-widest opacity-60 text-[var(--text-tertiary)]", className),
|
924
|
+
...props
|
925
|
+
}
|
926
|
+
);
|
927
|
+
};
|
928
|
+
ContextMenuShortcut.displayName = "ContextMenuShortcut";
|
929
|
+
var EmailButton = ({
|
930
|
+
variant = "primary",
|
931
|
+
size = "md",
|
932
|
+
children,
|
933
|
+
href,
|
934
|
+
style,
|
935
|
+
fullWidth = false,
|
936
|
+
...props
|
937
|
+
}) => {
|
938
|
+
const getVariantStyles = () => {
|
939
|
+
switch (variant) {
|
940
|
+
case "primary":
|
941
|
+
return {
|
942
|
+
backgroundColor: "#4A49A6",
|
943
|
+
color: "#ffffff",
|
944
|
+
border: "1px solid #4A49A6"
|
945
|
+
};
|
946
|
+
case "secondary":
|
947
|
+
return {
|
948
|
+
backgroundColor: "#f8f9fa",
|
949
|
+
color: "#4A49A6",
|
950
|
+
border: "1px solid #dee2e6"
|
951
|
+
};
|
952
|
+
case "ghost":
|
953
|
+
return {
|
954
|
+
backgroundColor: "transparent",
|
955
|
+
color: "#4A49A6",
|
956
|
+
border: "1px solid transparent"
|
957
|
+
};
|
958
|
+
case "outline":
|
959
|
+
return {
|
960
|
+
backgroundColor: "transparent",
|
961
|
+
color: "#4A49A6",
|
962
|
+
border: "1px solid #4A49A6"
|
963
|
+
};
|
964
|
+
case "destructive":
|
965
|
+
return {
|
966
|
+
backgroundColor: "#dc3545",
|
967
|
+
color: "#ffffff",
|
968
|
+
border: "1px solid #dc3545"
|
969
|
+
};
|
970
|
+
default:
|
971
|
+
return {
|
972
|
+
backgroundColor: "#4A49A6",
|
973
|
+
color: "#ffffff",
|
974
|
+
border: "1px solid #4A49A6"
|
975
|
+
};
|
976
|
+
}
|
977
|
+
};
|
978
|
+
const getSizeStyles = () => {
|
979
|
+
switch (size) {
|
980
|
+
case "sm":
|
981
|
+
return {
|
982
|
+
padding: "6px 12px",
|
983
|
+
fontSize: "12px",
|
984
|
+
borderRadius: "4px"
|
985
|
+
};
|
986
|
+
case "lg":
|
987
|
+
return {
|
988
|
+
padding: "12px 24px",
|
989
|
+
fontSize: "16px",
|
990
|
+
borderRadius: "6px"
|
991
|
+
};
|
992
|
+
default:
|
993
|
+
return {
|
994
|
+
padding: "8px 16px",
|
995
|
+
fontSize: "14px",
|
996
|
+
borderRadius: "4px"
|
997
|
+
};
|
998
|
+
}
|
999
|
+
};
|
1000
|
+
const baseStyles = {
|
1001
|
+
display: "inline-block",
|
1002
|
+
textDecoration: "none",
|
1003
|
+
textAlign: "center",
|
1004
|
+
fontWeight: "500",
|
1005
|
+
cursor: "pointer",
|
1006
|
+
width: fullWidth ? "100%" : "auto",
|
1007
|
+
...getVariantStyles(),
|
1008
|
+
...getSizeStyles(),
|
1009
|
+
...style
|
1010
|
+
};
|
1011
|
+
if (href) {
|
1012
|
+
return /* @__PURE__ */ jsx("a", { href, style: baseStyles, ...props, children });
|
1013
|
+
}
|
1014
|
+
return /* @__PURE__ */ jsx("button", { style: baseStyles, ...props, children });
|
1015
|
+
};
|
1016
|
+
var EmailText = ({
|
1017
|
+
children,
|
1018
|
+
variant = "body",
|
1019
|
+
style
|
1020
|
+
}) => {
|
1021
|
+
const getVariantStyles = () => {
|
1022
|
+
switch (variant) {
|
1023
|
+
case "heading":
|
1024
|
+
return {
|
1025
|
+
fontSize: "24px",
|
1026
|
+
fontWeight: "bold",
|
1027
|
+
color: "#1A1A1E",
|
1028
|
+
margin: "0 0 16px 0",
|
1029
|
+
lineHeight: "1.2"
|
1030
|
+
};
|
1031
|
+
case "lead":
|
1032
|
+
return {
|
1033
|
+
fontSize: "16px",
|
1034
|
+
color: "#1A1A1E",
|
1035
|
+
margin: "0 0 12px 0",
|
1036
|
+
lineHeight: "1.5"
|
1037
|
+
};
|
1038
|
+
case "caption":
|
1039
|
+
return {
|
1040
|
+
fontSize: "12px",
|
1041
|
+
color: "#6B7280",
|
1042
|
+
margin: "0 0 8px 0",
|
1043
|
+
lineHeight: "1.4"
|
1044
|
+
};
|
1045
|
+
case "muted":
|
1046
|
+
return {
|
1047
|
+
fontSize: "14px",
|
1048
|
+
color: "#6B7280",
|
1049
|
+
margin: "0 0 12px 0",
|
1050
|
+
lineHeight: "1.5"
|
1051
|
+
};
|
1052
|
+
default:
|
1053
|
+
return {
|
1054
|
+
fontSize: "14px",
|
1055
|
+
color: "#1A1A1E",
|
1056
|
+
margin: "0 0 12px 0",
|
1057
|
+
lineHeight: "1.5"
|
1058
|
+
};
|
1059
|
+
}
|
1060
|
+
};
|
1061
|
+
return /* @__PURE__ */ jsx("div", { style: { ...getVariantStyles(), ...style }, children });
|
1062
|
+
};
|
1063
|
+
var EmailHeading = (props) => /* @__PURE__ */ jsx(EmailText, { variant: "heading", ...props });
|
1064
|
+
var EmailCaption = (props) => /* @__PURE__ */ jsx(EmailText, { variant: "caption", ...props });
|
1065
|
+
var EmailMuted = (props) => /* @__PURE__ */ jsx(EmailText, { variant: "muted", ...props });
|
1066
|
+
var EmailLayout = ({
|
1067
|
+
children,
|
1068
|
+
preheader
|
1069
|
+
}) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
1070
|
+
preheader && /* @__PURE__ */ jsx("div", { style: {
|
1071
|
+
color: "transparent",
|
1072
|
+
display: "none",
|
1073
|
+
height: "0",
|
1074
|
+
maxHeight: "0",
|
1075
|
+
maxWidth: "0",
|
1076
|
+
opacity: "0",
|
1077
|
+
overflow: "hidden",
|
1078
|
+
visibility: "hidden",
|
1079
|
+
width: "0"
|
1080
|
+
}, children: preheader }),
|
1081
|
+
/* @__PURE__ */ jsx("div", { style: {
|
1082
|
+
backgroundColor: "#F4F4F5",
|
1083
|
+
fontFamily: "Helvetica-Neue, Helvetica, Arial, sans-serif",
|
1084
|
+
fontSize: "16px",
|
1085
|
+
lineHeight: "1.3",
|
1086
|
+
margin: "0",
|
1087
|
+
padding: "0"
|
1088
|
+
}, children })
|
1089
|
+
] });
|
1090
|
+
var EmailContainer = ({
|
1091
|
+
children,
|
1092
|
+
style
|
1093
|
+
}) => /* @__PURE__ */ jsx("div", { style: {
|
1094
|
+
maxWidth: "600px",
|
1095
|
+
margin: "0 auto",
|
1096
|
+
padding: "24px",
|
1097
|
+
backgroundColor: "#ffffff",
|
1098
|
+
border: "1px solid #eaebed",
|
1099
|
+
borderRadius: "16px",
|
1100
|
+
...style
|
1101
|
+
}, children });
|
1102
|
+
var EmailHeader = ({
|
1103
|
+
logoUrl = "http://cdn.mcauto-images-production.sendgrid.net/a704493bc4576a45/e4e1b526-0ef3-4511-a7a8-bc94353e9b3b/201x67.png",
|
1104
|
+
logoAlt = "Float",
|
1105
|
+
logoWidth = "100px",
|
1106
|
+
logoHeight = "auto"
|
1107
|
+
}) => {
|
1108
|
+
return /* @__PURE__ */ jsx("div", { style: {
|
1109
|
+
width: "100px",
|
1110
|
+
textAlign: "center",
|
1111
|
+
marginBottom: "24px"
|
1112
|
+
}, children: /* @__PURE__ */ jsx("a", { href: "https://float.tech", style: {
|
1113
|
+
color: "#4A49A6",
|
1114
|
+
fontWeight: "bold",
|
1115
|
+
textDecoration: "none"
|
1116
|
+
}, children: /* @__PURE__ */ jsx(
|
1117
|
+
"img",
|
1118
|
+
{
|
1119
|
+
src: logoUrl,
|
1120
|
+
alt: logoAlt,
|
1121
|
+
width: logoWidth,
|
1122
|
+
height: logoHeight,
|
1123
|
+
style: {
|
1124
|
+
display: "block",
|
1125
|
+
margin: "0 auto",
|
1126
|
+
border: "0",
|
1127
|
+
outline: "none",
|
1128
|
+
textDecoration: "none",
|
1129
|
+
height: "auto",
|
1130
|
+
maxWidth: "200px",
|
1131
|
+
width: "100%"
|
1132
|
+
}
|
1133
|
+
}
|
1134
|
+
) }) });
|
1135
|
+
};
|
1136
|
+
var EmailFooter = ({ children }) => /* @__PURE__ */ jsx("div", { style: {
|
1137
|
+
clear: "both",
|
1138
|
+
paddingTop: "24px",
|
1139
|
+
textAlign: "center",
|
1140
|
+
width: "100%"
|
1141
|
+
}, children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
|
1142
|
+
/* @__PURE__ */ jsxs("p", { style: {
|
1143
|
+
color: "#9a9ea6",
|
1144
|
+
fontFamily: "Helvetica-Neue, Helvetica, Arial, sans-serif",
|
1145
|
+
fontSize: "14px",
|
1146
|
+
fontWeight: "normal",
|
1147
|
+
margin: "0",
|
1148
|
+
marginBottom: "16px",
|
1149
|
+
paddingBottom: "0px",
|
1150
|
+
textAlign: "center"
|
1151
|
+
}, children: [
|
1152
|
+
"Float helps financial institutions interact seamlessly through shared digital workflows and standardized APIs across the transaction lifecycle.",
|
1153
|
+
" ",
|
1154
|
+
/* @__PURE__ */ jsx("a", { href: "https://float.tech", style: {
|
1155
|
+
color: "#4A49A6",
|
1156
|
+
fontSize: "14px",
|
1157
|
+
fontWeight: "bold",
|
1158
|
+
paddingBottom: "0px",
|
1159
|
+
textAlign: "center",
|
1160
|
+
textDecoration: "underline"
|
1161
|
+
}, children: "Learn more" }),
|
1162
|
+
"."
|
1163
|
+
] }),
|
1164
|
+
/* @__PURE__ */ jsx("a", { href: "https://float.tech", style: {
|
1165
|
+
color: "#4A49A6",
|
1166
|
+
fontSize: "14px",
|
1167
|
+
fontWeight: "bold",
|
1168
|
+
paddingBottom: "0px",
|
1169
|
+
textAlign: "center",
|
1170
|
+
textDecoration: "underline"
|
1171
|
+
}, children: /* @__PURE__ */ jsx(
|
1172
|
+
"img",
|
1173
|
+
{
|
1174
|
+
src: "http://cdn.mcauto-images-production.sendgrid.net/a704493bc4576a45/6a3db2b3-d35b-423f-8aac-830de81fb114/32x32.png",
|
1175
|
+
alt: "Float Logo",
|
1176
|
+
width: "32",
|
1177
|
+
height: "32",
|
1178
|
+
style: {
|
1179
|
+
display: "inline-block",
|
1180
|
+
marginBottom: "16px"
|
1181
|
+
}
|
1182
|
+
}
|
1183
|
+
) }),
|
1184
|
+
/* @__PURE__ */ jsxs("div", { style: {
|
1185
|
+
color: "#9a9ea6",
|
1186
|
+
fontFamily: "Helvetica-Neue, Helvetica, Arial, sans-serif",
|
1187
|
+
fontSize: "14px",
|
1188
|
+
paddingBottom: "0px"
|
1189
|
+
}, children: [
|
1190
|
+
/* @__PURE__ */ jsx("div", { children: "Float Technologies Inc." }),
|
1191
|
+
/* @__PURE__ */ jsx("div", { children: "SoHo, New York" })
|
1192
|
+
] })
|
1193
|
+
] }) });
|
1194
|
+
|
1195
|
+
// src/tokens/colors.ts
|
1196
|
+
var colors = {
|
1197
|
+
// Base colors
|
1198
|
+
brand: {
|
1199
|
+
25: "hsl(var(--brand-25))",
|
1200
|
+
50: "hsl(var(--brand-50))",
|
1201
|
+
100: "hsl(var(--brand-100))",
|
1202
|
+
200: "hsl(var(--brand-200))",
|
1203
|
+
300: "hsl(var(--brand-300))",
|
1204
|
+
400: "hsl(var(--brand-400))",
|
1205
|
+
500: "hsl(var(--brand-500))",
|
1206
|
+
600: "hsl(var(--brand-600))",
|
1207
|
+
700: "hsl(var(--brand-700))",
|
1208
|
+
800: "hsl(var(--brand-800))",
|
1209
|
+
900: "hsl(var(--brand-900))",
|
1210
|
+
950: "hsl(var(--brand-950))"
|
1211
|
+
},
|
1212
|
+
error: {
|
1213
|
+
25: "hsl(var(--error-25))",
|
1214
|
+
50: "hsl(var(--error-50))",
|
1215
|
+
100: "hsl(var(--error-100))",
|
1216
|
+
200: "hsl(var(--error-200))",
|
1217
|
+
300: "hsl(var(--error-300))",
|
1218
|
+
400: "hsl(var(--error-400))",
|
1219
|
+
500: "hsl(var(--error-500))",
|
1220
|
+
600: "hsl(var(--error-600))",
|
1221
|
+
700: "hsl(var(--error-700))",
|
1222
|
+
800: "hsl(var(--error-800))",
|
1223
|
+
900: "hsl(var(--error-900))",
|
1224
|
+
950: "hsl(var(--error-950))"
|
1225
|
+
},
|
1226
|
+
warning: {
|
1227
|
+
25: "hsl(var(--warning-25))",
|
1228
|
+
50: "hsl(var(--warning-50))",
|
1229
|
+
100: "hsl(var(--warning-100))",
|
1230
|
+
200: "hsl(var(--warning-200))",
|
1231
|
+
300: "hsl(var(--warning-300))",
|
1232
|
+
400: "hsl(var(--warning-400))",
|
1233
|
+
500: "hsl(var(--warning-500))",
|
1234
|
+
600: "hsl(var(--warning-600))",
|
1235
|
+
700: "hsl(var(--warning-700))",
|
1236
|
+
800: "hsl(var(--warning-800))",
|
1237
|
+
900: "hsl(var(--warning-900))",
|
1238
|
+
950: "hsl(var(--warning-950))"
|
1239
|
+
},
|
1240
|
+
success: {
|
1241
|
+
25: "hsl(var(--success-25))",
|
1242
|
+
50: "hsl(var(--success-50))",
|
1243
|
+
100: "hsl(var(--success-100))",
|
1244
|
+
200: "hsl(var(--success-200))",
|
1245
|
+
300: "hsl(var(--success-300))",
|
1246
|
+
400: "hsl(var(--success-400))",
|
1247
|
+
500: "hsl(var(--success-500))",
|
1248
|
+
600: "hsl(var(--success-600))",
|
1249
|
+
700: "hsl(var(--success-700))",
|
1250
|
+
800: "hsl(var(--success-800))",
|
1251
|
+
900: "hsl(var(--success-900))",
|
1252
|
+
950: "hsl(var(--success-950))"
|
1253
|
+
},
|
1254
|
+
gray: {
|
1255
|
+
25: "hsl(var(--gray-25))",
|
1256
|
+
50: "hsl(var(--gray-50))",
|
1257
|
+
100: "hsl(var(--gray-100))",
|
1258
|
+
200: "hsl(var(--gray-200))",
|
1259
|
+
300: "hsl(var(--gray-300))",
|
1260
|
+
400: "hsl(var(--gray-400))",
|
1261
|
+
500: "hsl(var(--gray-500))",
|
1262
|
+
600: "hsl(var(--gray-600))",
|
1263
|
+
700: "hsl(var(--gray-700))",
|
1264
|
+
800: "hsl(var(--gray-800))",
|
1265
|
+
900: "hsl(var(--gray-900))",
|
1266
|
+
950: "hsl(var(--gray-950))"
|
1267
|
+
},
|
1268
|
+
// Semantic tokens
|
1269
|
+
text: {
|
1270
|
+
primary: "hsl(var(--foreground))",
|
1271
|
+
secondary: "hsl(var(--muted-foreground))",
|
1272
|
+
tertiary: "hsl(var(--muted-foreground))",
|
1273
|
+
disabled: "hsl(var(--muted-foreground))",
|
1274
|
+
brand: "hsl(var(--brand-700))",
|
1275
|
+
"on-brand": "hsl(var(--brand-50))",
|
1276
|
+
error: "hsl(var(--error-600))",
|
1277
|
+
warning: "hsl(var(--warning-600))",
|
1278
|
+
success: "hsl(var(--success-600))"
|
1279
|
+
},
|
1280
|
+
background: {
|
1281
|
+
primary: "hsl(var(--background))",
|
1282
|
+
secondary: "hsl(var(--secondary))",
|
1283
|
+
tertiary: "hsl(var(--muted))",
|
1284
|
+
brand: "hsl(var(--brand-50))",
|
1285
|
+
error: "hsl(var(--error-50))",
|
1286
|
+
warning: "hsl(var(--warning-50))",
|
1287
|
+
success: "hsl(var(--success-50))",
|
1288
|
+
card: "hsl(var(--card))"
|
1289
|
+
},
|
1290
|
+
border: {
|
1291
|
+
primary: "hsl(var(--border))",
|
1292
|
+
secondary: "hsl(var(--input))",
|
1293
|
+
tertiary: "hsl(var(--accent))",
|
1294
|
+
brand: "hsl(var(--brand-300))",
|
1295
|
+
error: "hsl(var(--error-300))",
|
1296
|
+
warning: "hsl(var(--warning-300))",
|
1297
|
+
success: "hsl(var(--success-300))"
|
1298
|
+
},
|
1299
|
+
focus: {
|
1300
|
+
ring: "hsl(var(--ring))",
|
1301
|
+
brand: "hsl(var(--brand-500))",
|
1302
|
+
error: "hsl(var(--error-500))",
|
1303
|
+
warning: "hsl(var(--warning-500))",
|
1304
|
+
success: "hsl(var(--success-500))"
|
1305
|
+
},
|
1306
|
+
// Component-specific
|
1307
|
+
button: {
|
1308
|
+
primary: {
|
1309
|
+
bg: "hsl(var(--brand-600))",
|
1310
|
+
text: "white",
|
1311
|
+
hover: "hsl(var(--brand-700))",
|
1312
|
+
focus: "hsl(var(--brand-500))"
|
1313
|
+
},
|
1314
|
+
secondary: {
|
1315
|
+
bg: "transparent",
|
1316
|
+
text: "hsl(var(--brand-700))",
|
1317
|
+
border: "hsl(var(--brand-300))",
|
1318
|
+
hover: "hsl(var(--brand-50))",
|
1319
|
+
focus: "hsl(var(--brand-500))"
|
1320
|
+
},
|
1321
|
+
tertiary: {
|
1322
|
+
bg: "transparent",
|
1323
|
+
text: "hsl(var(--brand-700))",
|
1324
|
+
hover: "hsl(var(--brand-50))",
|
1325
|
+
focus: "hsl(var(--brand-500))"
|
1326
|
+
}
|
1327
|
+
}
|
1328
|
+
};
|
1329
|
+
|
1330
|
+
// src/tokens/typography.ts
|
1331
|
+
var typography = {
|
1332
|
+
fontFamily: {
|
1333
|
+
sans: ["var(--font-inter)", "sans-serif"]
|
1334
|
+
},
|
1335
|
+
fontWeight: {
|
1336
|
+
regular: "400",
|
1337
|
+
medium: "500",
|
1338
|
+
semibold: "600",
|
1339
|
+
bold: "700"
|
1340
|
+
},
|
1341
|
+
fontSize: {
|
1342
|
+
// Display sizes
|
1343
|
+
"display-2xl": ["4.5rem", { lineHeight: "5.625rem", letterSpacing: "-0.02em" }],
|
1344
|
+
"display-xl": ["3.75rem", { lineHeight: "4.5rem", letterSpacing: "-0.02em" }],
|
1345
|
+
"display-lg": ["3rem", { lineHeight: "3.75rem", letterSpacing: "-0.02em" }],
|
1346
|
+
"display-md": ["2.25rem", { lineHeight: "2.75rem", letterSpacing: "-0.02em" }],
|
1347
|
+
"display-sm": ["1.875rem", { lineHeight: "2.375rem", letterSpacing: "-0.02em" }],
|
1348
|
+
"display-xs": ["1.5rem", { lineHeight: "2rem", letterSpacing: "-0.02em" }],
|
1349
|
+
// Text sizes
|
1350
|
+
"text-xl": ["1.25rem", { lineHeight: "1.875rem" }],
|
1351
|
+
"text-lg": ["1.125rem", { lineHeight: "1.75rem" }],
|
1352
|
+
"text-md": ["1rem", { lineHeight: "1.5rem" }],
|
1353
|
+
"text-sm": ["0.875rem", { lineHeight: "1.25rem" }],
|
1354
|
+
"text-xs": ["0.75rem", { lineHeight: "1.125rem" }]
|
1355
|
+
},
|
1356
|
+
// Predefined style combinations
|
1357
|
+
styles: {
|
1358
|
+
h1: "text-display-md font-bold",
|
1359
|
+
h2: "text-display-sm font-bold",
|
1360
|
+
h3: "text-display-xs font-bold",
|
1361
|
+
h4: "text-text-xl font-semibold",
|
1362
|
+
h5: "text-text-lg font-semibold",
|
1363
|
+
h6: "text-text-md font-semibold",
|
1364
|
+
// Body text
|
1365
|
+
body: "text-text-md font-regular",
|
1366
|
+
"body-large": "text-text-lg font-regular",
|
1367
|
+
"body-small": "text-text-sm font-regular",
|
1368
|
+
// Special styles
|
1369
|
+
caption: "text-text-xs font-medium",
|
1370
|
+
overline: "text-text-xs font-medium uppercase tracking-wider",
|
1371
|
+
label: "text-text-sm font-medium"
|
1372
|
+
},
|
1373
|
+
// For semantic variants
|
1374
|
+
variants: {
|
1375
|
+
italic: "italic",
|
1376
|
+
underline: "underline"
|
1377
|
+
}
|
1378
|
+
};
|
1379
|
+
|
1380
|
+
// src/tokens/spacing.ts
|
1381
|
+
var spacing = {
|
1382
|
+
// We don't need to redefine the base spacing scale
|
1383
|
+
// as we'll use Tailwind's defaults
|
1384
|
+
// Semantic spacing that maps to Tailwind's scale
|
1385
|
+
layout: {
|
1386
|
+
page: "6",
|
1387
|
+
// maps to Tailwind's spacing-6 (1.5rem, 24px)
|
1388
|
+
section: "8",
|
1389
|
+
// maps to Tailwind's spacing-8 (2rem, 32px)
|
1390
|
+
subsection: "4",
|
1391
|
+
// maps to Tailwind's spacing-4 (1rem, 16px)
|
1392
|
+
inline: "2"
|
1393
|
+
// maps to Tailwind's spacing-2 (0.5rem, 8px)
|
1394
|
+
},
|
1395
|
+
// Component-specific spacing that maps to Tailwind's scale
|
1396
|
+
component: {
|
1397
|
+
xxs: "1",
|
1398
|
+
// maps to Tailwind's spacing-1 (0.25rem, 4px)
|
1399
|
+
xs: "2",
|
1400
|
+
// maps to Tailwind's spacing-2 (0.5rem, 8px)
|
1401
|
+
sm: "3",
|
1402
|
+
// maps to Tailwind's spacing-3 (0.75rem, 12px)
|
1403
|
+
md: "4",
|
1404
|
+
// maps to Tailwind's spacing-4 (1rem, 16px)
|
1405
|
+
lg: "6",
|
1406
|
+
// maps to Tailwind's spacing-6 (1.5rem, 24px)
|
1407
|
+
xl: "8",
|
1408
|
+
// maps to Tailwind's spacing-8 (2rem, 32px)
|
1409
|
+
xxl: "12"
|
1410
|
+
// maps to Tailwind's spacing-12 (3rem, 48px)
|
1411
|
+
},
|
1412
|
+
// Any custom spacing values not in Tailwind's default scale
|
1413
|
+
// would be defined here for extending in the Tailwind config
|
1414
|
+
custom: {
|
1415
|
+
// Example: '4.5': '1.125rem', // 18px
|
1416
|
+
}
|
1417
|
+
};
|
1418
|
+
|
1419
|
+
// src/tokens/radius.ts
|
1420
|
+
var radius = {
|
1421
|
+
// Semantic radius values using CSS variables
|
1422
|
+
default: "var(--radius)",
|
1423
|
+
card: "var(--radius)",
|
1424
|
+
button: "var(--radius)",
|
1425
|
+
input: "var(--radius)",
|
1426
|
+
badge: "var(--radius)",
|
1427
|
+
// Shape variants
|
1428
|
+
pill: "9999px",
|
1429
|
+
circle: "50%",
|
1430
|
+
// Any custom radius values to extend Tailwind's defaults
|
1431
|
+
// would be defined here
|
1432
|
+
custom: {
|
1433
|
+
// Example: 'medium': '0.375rem', // 6px
|
1434
|
+
}
|
1435
|
+
};
|
1436
|
+
|
1437
|
+
// src/tokens/shadows.ts
|
1438
|
+
var shadows = {
|
1439
|
+
// Base shadow values
|
1440
|
+
none: "none",
|
1441
|
+
xs: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
|
1442
|
+
sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
1443
|
+
md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
1444
|
+
lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
1445
|
+
xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
|
1446
|
+
"2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
|
1447
|
+
inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",
|
1448
|
+
// Semantic shadow values
|
1449
|
+
"elevation-low": "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
1450
|
+
"elevation-medium": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
|
1451
|
+
"elevation-high": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
1452
|
+
// Component specific
|
1453
|
+
card: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
|
1454
|
+
dropdown: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
|
1455
|
+
modal: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
|
1456
|
+
};
|
1457
|
+
|
1458
|
+
// src/tokens/index.ts
|
1459
|
+
var tokens = {
|
1460
|
+
colors,
|
1461
|
+
typography,
|
1462
|
+
spacing,
|
1463
|
+
radius,
|
1464
|
+
shadows
|
1465
|
+
};
|
1466
|
+
function ThemeProvider({
|
1467
|
+
children,
|
1468
|
+
...props
|
1469
|
+
}) {
|
1470
|
+
return /* @__PURE__ */ jsx(
|
1471
|
+
ThemeProvider$1,
|
1472
|
+
{
|
1473
|
+
attribute: "class",
|
1474
|
+
defaultTheme: "system",
|
1475
|
+
enableSystem: true,
|
1476
|
+
disableTransitionOnChange: true,
|
1477
|
+
...props,
|
1478
|
+
children
|
1479
|
+
}
|
1480
|
+
);
|
1481
|
+
}
|
1482
|
+
|
1483
|
+
// src/lib/theme-utils.ts
|
1484
|
+
var mapColorToShadcnVariant = (color) => {
|
1485
|
+
switch (color) {
|
1486
|
+
case "brand":
|
1487
|
+
return "default";
|
1488
|
+
case "error":
|
1489
|
+
return "destructive";
|
1490
|
+
case "warning":
|
1491
|
+
case "success":
|
1492
|
+
return "secondary";
|
1493
|
+
// Will need additional classes
|
1494
|
+
default:
|
1495
|
+
return "default";
|
1496
|
+
}
|
1497
|
+
};
|
1498
|
+
var mapVariantToShadcnVariant = (variant) => {
|
1499
|
+
switch (variant) {
|
1500
|
+
case "primary":
|
1501
|
+
return "default";
|
1502
|
+
case "secondary":
|
1503
|
+
return "outline";
|
1504
|
+
case "tertiary":
|
1505
|
+
return "ghost";
|
1506
|
+
default:
|
1507
|
+
return "default";
|
1508
|
+
}
|
1509
|
+
};
|
1510
|
+
var getColorVariantClasses = (color, variant) => {
|
1511
|
+
const colorVariantMap = {
|
1512
|
+
primary: {
|
1513
|
+
brand: "bg-brand-600 hover:bg-brand-700 text-white focus-visible:ring-brand-500",
|
1514
|
+
error: "bg-error-600 hover:bg-error-700 text-white focus-visible:ring-error-500",
|
1515
|
+
warning: "bg-warning-600 hover:bg-warning-700 text-white focus-visible:ring-warning-500",
|
1516
|
+
success: "bg-success-600 hover:bg-success-700 text-white focus-visible:ring-success-500"
|
1517
|
+
},
|
1518
|
+
secondary: {
|
1519
|
+
brand: "border-brand-300 text-brand-700 hover:bg-brand-50 focus-visible:ring-brand-500",
|
1520
|
+
error: "border-error-300 text-error-700 hover:bg-error-50 focus-visible:ring-error-500",
|
1521
|
+
warning: "border-warning-300 text-warning-700 hover:bg-warning-50 focus-visible:ring-warning-500",
|
1522
|
+
success: "border-success-300 text-success-700 hover:bg-success-50 focus-visible:ring-success-500"
|
1523
|
+
},
|
1524
|
+
tertiary: {
|
1525
|
+
brand: "text-brand-700 hover:bg-brand-50 focus-visible:ring-brand-500",
|
1526
|
+
error: "text-error-700 hover:bg-error-50 focus-visible:ring-error-500",
|
1527
|
+
warning: "text-warning-700 hover:bg-warning-50 focus-visible:ring-warning-500",
|
1528
|
+
success: "text-success-700 hover:bg-success-50 focus-visible:ring-success-500"
|
1529
|
+
}
|
1530
|
+
};
|
1531
|
+
return colorVariantMap[variant]?.[color] || "";
|
1532
|
+
};
|
1533
|
+
var isDarkTheme = (theme, systemTheme) => {
|
1534
|
+
if (theme === "system") {
|
1535
|
+
return systemTheme === "dark";
|
1536
|
+
}
|
1537
|
+
return theme === "dark";
|
1538
|
+
};
|
1539
|
+
var ThemeContext = createContext(void 0);
|
1540
|
+
function ThemeContextProvider({
|
1541
|
+
children
|
1542
|
+
}) {
|
1543
|
+
const [isClient, setIsClient] = useState(false);
|
1544
|
+
const { theme, setTheme, resolvedTheme, systemTheme } = useTheme$1();
|
1545
|
+
useEffect(() => {
|
1546
|
+
setIsClient(true);
|
1547
|
+
}, []);
|
1548
|
+
const isDark = isDarkTheme(theme, systemTheme);
|
1549
|
+
return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: {
|
1550
|
+
theme: theme || "system",
|
1551
|
+
setTheme,
|
1552
|
+
resolvedTheme: resolvedTheme || "light",
|
1553
|
+
isClient,
|
1554
|
+
isDark
|
1555
|
+
}, children });
|
1556
|
+
}
|
1557
|
+
function useTheme() {
|
1558
|
+
const context = useContext(ThemeContext);
|
1559
|
+
if (context === void 0) {
|
1560
|
+
throw new Error("useTheme must be used within a ThemeContextProvider");
|
1561
|
+
}
|
1562
|
+
return context;
|
1563
|
+
}
|
1564
|
+
function ThemeToggle({
|
1565
|
+
className,
|
1566
|
+
variant = "icon",
|
1567
|
+
size = "md",
|
1568
|
+
...props
|
1569
|
+
}) {
|
1570
|
+
const { theme, setTheme, resolvedTheme, isClient } = useTheme();
|
1571
|
+
if (!isClient) return null;
|
1572
|
+
const toggleTheme = () => {
|
1573
|
+
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
1574
|
+
};
|
1575
|
+
const iconSize = {
|
1576
|
+
sm: 16,
|
1577
|
+
md: 20,
|
1578
|
+
lg: 24
|
1579
|
+
};
|
1580
|
+
const sizeClasses = {
|
1581
|
+
sm: "h-8 w-8",
|
1582
|
+
md: "h-10 w-10",
|
1583
|
+
lg: "h-12 w-12"
|
1584
|
+
};
|
1585
|
+
const textSizeClasses = {
|
1586
|
+
sm: "text-xs",
|
1587
|
+
md: "text-sm",
|
1588
|
+
lg: "text-base"
|
1589
|
+
};
|
1590
|
+
if (variant === "icon") {
|
1591
|
+
return /* @__PURE__ */ jsx(
|
1592
|
+
"button",
|
1593
|
+
{
|
1594
|
+
type: "button",
|
1595
|
+
onClick: toggleTheme,
|
1596
|
+
className: cn(
|
1597
|
+
"inline-flex items-center justify-center rounded-md border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
1598
|
+
sizeClasses[size],
|
1599
|
+
className
|
1600
|
+
),
|
1601
|
+
"aria-label": resolvedTheme === "dark" ? "Switch to light theme" : "Switch to dark theme",
|
1602
|
+
...props,
|
1603
|
+
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsx(IconSun, { size: iconSize[size], stroke: 1.5 }) : /* @__PURE__ */ jsx(IconMoon, { size: iconSize[size], stroke: 1.5 })
|
1604
|
+
}
|
1605
|
+
);
|
1606
|
+
}
|
1607
|
+
if (variant === "button") {
|
1608
|
+
return /* @__PURE__ */ jsx(
|
1609
|
+
"button",
|
1610
|
+
{
|
1611
|
+
type: "button",
|
1612
|
+
onClick: toggleTheme,
|
1613
|
+
className: cn(
|
1614
|
+
"inline-flex items-center justify-center rounded-md border border-input bg-background px-4 py-2",
|
1615
|
+
textSizeClasses[size],
|
1616
|
+
"hover:bg-accent hover:text-accent-foreground",
|
1617
|
+
className
|
1618
|
+
),
|
1619
|
+
...props,
|
1620
|
+
children: resolvedTheme === "dark" ? "Light Mode" : "Dark Mode"
|
1621
|
+
}
|
1622
|
+
);
|
1623
|
+
}
|
1624
|
+
return /* @__PURE__ */ jsx(
|
1625
|
+
"button",
|
1626
|
+
{
|
1627
|
+
type: "button",
|
1628
|
+
onClick: toggleTheme,
|
1629
|
+
className: cn(
|
1630
|
+
"inline-flex items-center justify-center rounded-md px-3 py-2 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
1631
|
+
textSizeClasses[size],
|
1632
|
+
resolvedTheme === "dark" ? "bg-accent text-accent-foreground hover:bg-accent/80" : "bg-muted text-muted-foreground hover:bg-muted/80",
|
1633
|
+
className
|
1634
|
+
),
|
1635
|
+
"aria-label": resolvedTheme === "dark" ? "Switch to light theme" : "Switch to dark theme",
|
1636
|
+
...props,
|
1637
|
+
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
|
1638
|
+
/* @__PURE__ */ jsx(IconSun, { size: iconSize[size], stroke: 1.5, className: "mr-2" }),
|
1639
|
+
"Light"
|
1640
|
+
] }) : /* @__PURE__ */ jsxs("span", { className: "flex items-center", children: [
|
1641
|
+
/* @__PURE__ */ jsx(IconMoon, { size: iconSize[size], stroke: 1.5, className: "mr-2" }),
|
1642
|
+
"Dark"
|
1643
|
+
] })
|
1644
|
+
}
|
1645
|
+
);
|
1646
|
+
}
|
1647
|
+
|
1648
|
+
export { Button, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DropdownMenu, EmailButton, EmailCaption, EmailContainer, EmailFooter, EmailHeader, EmailHeading, EmailLayout, EmailMuted, EmailText, Heading, HoverCard, HoverCardContent, HoverCardTrigger, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Slider, Text, ThemeContextProvider, ThemeProvider, ThemeToggle, Toggle, ToggleGroup, ToggleGroupItem, buttonVariants, cn, colors, filterDOMProps, generateId, getColorVariantClasses, isDarkTheme, isNotNullOrUndefined, mapColorToShadcnVariant, mapVariantToShadcnVariant, radius, shadows, spacing, tokens, typography, useTheme };
|
1649
|
+
//# sourceMappingURL=index.mjs.map
|
1650
|
+
//# sourceMappingURL=index.mjs.map
|