@health-samurai/react-components 0.0.0-alpha.4 → 0.0.0-alpha.5
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/bundle.css +687 -446
- package/dist/src/components/code-editor/http/grammar/http.d.ts +3 -0
- package/dist/src/components/code-editor/http/grammar/http.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.grammar +74 -0
- package/dist/src/components/code-editor/http/grammar/http.js +38 -0
- package/dist/src/components/code-editor/http/grammar/http.js.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.d.ts +2 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.js +4 -0
- package/dist/src/components/code-editor/http/grammar/http.terms.js.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.test.d.ts +2 -0
- package/dist/src/components/code-editor/http/grammar/http.test.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/grammar/http.test.js +80 -0
- package/dist/src/components/code-editor/http/grammar/http.test.js.map +1 -0
- package/dist/src/components/code-editor/http/index.d.ts +4 -0
- package/dist/src/components/code-editor/http/index.d.ts.map +1 -0
- package/dist/src/components/code-editor/http/index.js +66 -0
- package/dist/src/components/code-editor/http/index.js.map +1 -0
- package/dist/src/components/code-editor/index.d.ts +13 -2
- package/dist/src/components/code-editor/index.d.ts.map +1 -1
- package/dist/src/components/code-editor/index.js +161 -20
- package/dist/src/components/code-editor/index.js.map +1 -1
- package/dist/src/components/code-editor.stories.js +3 -1
- package/dist/src/components/code-editor.stories.js.map +1 -1
- package/dist/src/components/request-line-editor.d.ts +11 -35
- package/dist/src/components/request-line-editor.d.ts.map +1 -1
- package/dist/src/components/request-line-editor.js +51 -49
- package/dist/src/components/request-line-editor.js.map +1 -1
- package/dist/src/components/request-line-editor.stories.d.ts.map +1 -1
- package/dist/src/components/request-line-editor.stories.js +17 -53
- package/dist/src/components/request-line-editor.stories.js.map +1 -1
- package/dist/src/components/tree-view.d.ts +16 -0
- package/dist/src/components/tree-view.d.ts.map +1 -0
- package/dist/src/components/tree-view.js +67 -0
- package/dist/src/components/tree-view.js.map +1 -0
- package/dist/src/components/tree-view.stories.d.ts +13 -0
- package/dist/src/components/tree-view.stories.d.ts.map +1 -0
- package/dist/src/components/tree-view.stories.js +274 -0
- package/dist/src/components/tree-view.stories.js.map +1 -0
- package/dist/src/icons.d.ts +3 -0
- package/dist/src/icons.d.ts.map +1 -0
- package/dist/src/icons.js +47 -0
- package/dist/src/icons.js.map +1 -0
- package/dist/src/index.css +42 -3
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/accordion.js +23 -5
- package/dist/src/shadcn/components/ui/accordion.js.map +1 -1
- package/dist/src/shadcn/components/ui/alert.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/alert.js +12 -5
- package/dist/src/shadcn/components/ui/alert.js.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/avatar.js +4 -3
- package/dist/src/shadcn/components/ui/avatar.js.map +1 -1
- package/dist/src/shadcn/components/ui/badge.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/badge.js +16 -5
- package/dist/src/shadcn/components/ui/badge.js.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/breadcrumb.js +6 -6
- package/dist/src/shadcn/components/ui/breadcrumb.js.map +1 -1
- package/dist/src/shadcn/components/ui/button.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/button.js +19 -11
- package/dist/src/shadcn/components/ui/button.js.map +1 -1
- package/dist/src/shadcn/components/ui/card.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/card.js +14 -6
- package/dist/src/shadcn/components/ui/card.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.js +20 -5
- package/dist/src/shadcn/components/ui/checkbox.js.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/checkbox.stories.js +44 -35
- package/dist/src/shadcn/components/ui/checkbox.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/combobox.d.ts +18 -0
- package/dist/src/shadcn/components/ui/combobox.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.js +121 -0
- package/dist/src/shadcn/components/ui/combobox.js.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts +11 -0
- package/dist/src/shadcn/components/ui/combobox.stories.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js +16 -0
- package/dist/src/shadcn/components/ui/combobox.stories.js.map +1 -0
- package/dist/src/shadcn/components/ui/command.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/command.js +73 -12
- package/dist/src/shadcn/components/ui/command.js.map +1 -1
- package/dist/src/shadcn/components/ui/command.stories.js +0 -1
- package/dist/src/shadcn/components/ui/command.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dialog.js +35 -7
- package/dist/src/shadcn/components/ui/dialog.js.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/drawer.js +26 -5
- package/dist/src/shadcn/components/ui/drawer.js.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js +12 -1
- package/dist/src/shadcn/components/ui/dropdown-menu.js.map +1 -1
- package/dist/src/shadcn/components/ui/form.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/form.js +12 -4
- package/dist/src/shadcn/components/ui/form.js.map +1 -1
- package/dist/src/shadcn/components/ui/input.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/input.js +87 -16
- package/dist/src/shadcn/components/ui/input.js.map +1 -1
- package/dist/src/shadcn/components/ui/label.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/label.js +8 -1
- package/dist/src/shadcn/components/ui/label.js.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/menubar.js +35 -13
- package/dist/src/shadcn/components/ui/menubar.js.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/pagination.js +6 -6
- package/dist/src/shadcn/components/ui/pagination.js.map +1 -1
- package/dist/src/shadcn/components/ui/popover.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/popover.js +12 -1
- package/dist/src/shadcn/components/ui/popover.js.map +1 -1
- package/dist/src/shadcn/components/ui/progress.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/progress.js +6 -2
- package/dist/src/shadcn/components/ui/progress.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.js +11 -6
- package/dist/src/shadcn/components/ui/radio-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/radio-group.stories.js +57 -34
- package/dist/src/shadcn/components/ui/radio-group.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/scroll-area.js +9 -3
- package/dist/src/shadcn/components/ui/scroll-area.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.js +49 -14
- package/dist/src/shadcn/components/ui/select.js.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/select.stories.js +1 -4
- package/dist/src/shadcn/components/ui/select.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/separator.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/separator.js +7 -1
- package/dist/src/shadcn/components/ui/separator.js.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sidebar.js +20 -6
- package/dist/src/shadcn/components/ui/sidebar.js.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/skeleton.js +3 -1
- package/dist/src/shadcn/components/ui/skeleton.js.map +1 -1
- package/dist/src/shadcn/components/ui/slider.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/slider.js +34 -4
- package/dist/src/shadcn/components/ui/slider.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts +16 -1
- package/dist/src/shadcn/components/ui/sonner.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.js +23 -3
- package/dist/src/shadcn/components/ui/sonner.js.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/sonner.stories.js +19 -11
- package/dist/src/shadcn/components/ui/sonner.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/switch.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/switch.js +18 -2
- package/dist/src/shadcn/components/ui/switch.js.map +1 -1
- package/dist/src/shadcn/components/ui/table.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/table.js +12 -8
- package/dist/src/shadcn/components/ui/table.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.d.ts +21 -3
- package/dist/src/shadcn/components/ui/tabs.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.js +314 -9
- package/dist/src/shadcn/components/ui/tabs.js.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js +50 -1
- package/dist/src/shadcn/components/ui/tabs.stories.js.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/textarea.js +15 -1
- package/dist/src/shadcn/components/ui/textarea.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle-group.js +6 -2
- package/dist/src/shadcn/components/ui/toggle-group.js.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/toggle.js +18 -6
- package/dist/src/shadcn/components/ui/toggle.js.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.d.ts.map +1 -1
- package/dist/src/shadcn/components/ui/tooltip.js +11 -1
- package/dist/src/shadcn/components/ui/tooltip.js.map +1 -1
- package/dist/src/shadcn/components/ui/tree.d.ts +20 -0
- package/dist/src/shadcn/components/ui/tree.d.ts.map +1 -0
- package/dist/src/shadcn/components/ui/tree.js +111 -0
- package/dist/src/shadcn/components/ui/tree.js.map +1 -0
- package/package.json +9 -2
- package/src/components/code-editor/http/grammar/http.grammar +74 -0
- package/src/components/code-editor/http/grammar/http.terms.ts +9 -0
- package/src/components/code-editor/http/grammar/http.test.ts +110 -0
- package/src/components/code-editor/http/grammar/http.ts +21 -0
- package/src/components/code-editor/http/index.ts +87 -0
- package/src/components/code-editor/index.tsx +182 -21
- package/src/components/code-editor.stories.tsx +1 -1
- package/src/components/request-line-editor.stories.tsx +17 -27
- package/src/components/request-line-editor.tsx +72 -61
- package/src/components/tree-view.stories.tsx +260 -0
- package/src/components/tree-view.tsx +101 -0
- package/src/icons.tsx +45 -0
- package/src/index.css +42 -3
- package/src/index.tsx +1 -1
- package/src/shadcn/components/ui/accordion.tsx +66 -8
- package/src/shadcn/components/ui/alert.tsx +53 -15
- package/src/shadcn/components/ui/avatar.tsx +17 -6
- package/src/shadcn/components/ui/badge.tsx +67 -18
- package/src/shadcn/components/ui/breadcrumb.tsx +35 -7
- package/src/shadcn/components/ui/button.tsx +118 -57
- package/src/shadcn/components/ui/card.tsx +44 -13
- package/src/shadcn/components/ui/checkbox.stories.tsx +20 -24
- package/src/shadcn/components/ui/checkbox.tsx +45 -4
- package/src/shadcn/components/ui/combobox.stories.tsx +19 -0
- package/src/shadcn/components/ui/combobox.tsx +142 -0
- package/src/shadcn/components/ui/command.stories.tsx +1 -1
- package/src/shadcn/components/ui/command.tsx +192 -36
- package/src/shadcn/components/ui/dialog.tsx +101 -13
- package/src/shadcn/components/ui/drawer.tsx +93 -18
- package/src/shadcn/components/ui/dropdown-menu.tsx +38 -9
- package/src/shadcn/components/ui/form.tsx +16 -4
- package/src/shadcn/components/ui/input.tsx +281 -29
- package/src/shadcn/components/ui/label.tsx +21 -4
- package/src/shadcn/components/ui/menubar.tsx +188 -43
- package/src/shadcn/components/ui/pagination.tsx +12 -6
- package/src/shadcn/components/ui/popover.tsx +35 -4
- package/src/shadcn/components/ui/progress.tsx +21 -5
- package/src/shadcn/components/ui/radio-group.stories.tsx +22 -14
- package/src/shadcn/components/ui/radio-group.tsx +42 -5
- package/src/shadcn/components/ui/scroll-area.tsx +33 -5
- package/src/shadcn/components/ui/select.stories.tsx +0 -2
- package/src/shadcn/components/ui/select.tsx +184 -33
- package/src/shadcn/components/ui/separator.tsx +15 -5
- package/src/shadcn/components/ui/sidebar.tsx +68 -26
- package/src/shadcn/components/ui/skeleton.tsx +4 -1
- package/src/shadcn/components/ui/slider.tsx +82 -11
- package/src/shadcn/components/ui/sonner.stories.tsx +19 -15
- package/src/shadcn/components/ui/sonner.tsx +53 -3
- package/src/shadcn/components/ui/switch.tsx +53 -7
- package/src/shadcn/components/ui/table.tsx +38 -11
- package/src/shadcn/components/ui/tabs.stories.tsx +32 -0
- package/src/shadcn/components/ui/tabs.tsx +455 -17
- package/src/shadcn/components/ui/textarea.tsx +42 -4
- package/src/shadcn/components/ui/toggle-group.tsx +27 -5
- package/src/shadcn/components/ui/toggle.tsx +59 -18
- package/src/shadcn/components/ui/tooltip.tsx +33 -8
- package/src/shadcn/components/ui/tree.tsx +200 -0
|
@@ -3,57 +3,309 @@ import type * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import { cn } from "#shadcn/lib/utils";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// Base icon styles
|
|
7
|
+
const iconBaseClasses = cn(
|
|
8
|
+
// Positioning
|
|
9
|
+
"absolute",
|
|
10
|
+
"top-1/2",
|
|
11
|
+
"-translate-y-1/2",
|
|
12
|
+
"z-10",
|
|
8
13
|
|
|
9
|
-
|
|
10
|
-
"
|
|
14
|
+
// Layout & Flexbox
|
|
15
|
+
"flex",
|
|
16
|
+
"items-center",
|
|
17
|
+
"justify-center",
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
"
|
|
19
|
+
// Cursor & Interactions
|
|
20
|
+
"cursor-default",
|
|
21
|
+
"[&_svg]:pointer-events-none",
|
|
14
22
|
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
// Sizing
|
|
24
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
25
|
+
"shrink-0",
|
|
26
|
+
"[&_svg]:shrink-0",
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
// Left icon positioning
|
|
30
|
+
const iconLeftPosition = cn(
|
|
31
|
+
// Positioning
|
|
32
|
+
"left-3",
|
|
33
|
+
|
|
34
|
+
// Transitions
|
|
35
|
+
"transition-colors",
|
|
36
|
+
"duration-300",
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
// Right icon container
|
|
40
|
+
const iconRightContainer = cn(
|
|
41
|
+
// Positioning
|
|
42
|
+
"absolute",
|
|
43
|
+
"right-3",
|
|
44
|
+
"top-1/2",
|
|
45
|
+
"-translate-y-1/2",
|
|
46
|
+
|
|
47
|
+
// Layout & Flexbox
|
|
48
|
+
"flex",
|
|
49
|
+
"gap-2",
|
|
50
|
+
|
|
51
|
+
// Z-index
|
|
52
|
+
"z-10",
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
// Icon color states
|
|
56
|
+
const iconNormalColor = cn(
|
|
57
|
+
// Colors
|
|
58
|
+
"text-text-tertiary",
|
|
59
|
+
|
|
60
|
+
// Transitions
|
|
61
|
+
"transition-colors",
|
|
62
|
+
"duration-300",
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
const iconInvalidColor = cn(
|
|
66
|
+
// Colors
|
|
67
|
+
"text-text-tertiary",
|
|
68
|
+
|
|
69
|
+
// Transitions
|
|
70
|
+
"transition-colors",
|
|
71
|
+
"duration-300",
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const iconDisabledColor = cn(
|
|
75
|
+
// Colors
|
|
76
|
+
"text-text-disabled",
|
|
77
|
+
|
|
78
|
+
// Cursor & Interactions
|
|
79
|
+
"hover:cursor-not-allowed",
|
|
80
|
+
|
|
81
|
+
// Transitions
|
|
82
|
+
"transition-colors",
|
|
83
|
+
"duration-300",
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
// Icon wrapper styles
|
|
87
|
+
const iconWrapperClasses = cn(
|
|
88
|
+
// Sizing
|
|
89
|
+
"flex",
|
|
90
|
+
"items-center",
|
|
91
|
+
"[&>svg]:w-full",
|
|
92
|
+
"[&>svg]:h-full",
|
|
93
|
+
"[&>svg]:stroke-[1.5]",
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
// Right icon item styles
|
|
97
|
+
const iconRightItemClasses = cn(
|
|
98
|
+
// Layout & Flexbox
|
|
99
|
+
"flex",
|
|
100
|
+
"items-center",
|
|
101
|
+
"justify-center",
|
|
102
|
+
|
|
103
|
+
// Transitions
|
|
104
|
+
"transition-colors",
|
|
105
|
+
"duration-300",
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
// Suffix styles
|
|
109
|
+
const suffixClasses = cn(
|
|
110
|
+
// Borders
|
|
111
|
+
"border-border-primary",
|
|
112
|
+
"border",
|
|
113
|
+
|
|
114
|
+
// Background & Colors
|
|
115
|
+
"bg-bg-tertiary",
|
|
116
|
+
"text-text-tertiary",
|
|
117
|
+
|
|
118
|
+
// Layout & Flexbox
|
|
119
|
+
"flex",
|
|
120
|
+
"items-center",
|
|
121
|
+
|
|
122
|
+
// Spacing & Sizing
|
|
123
|
+
"rounded-r-md",
|
|
124
|
+
"px-3",
|
|
125
|
+
"py-1",
|
|
126
|
+
|
|
127
|
+
// Typography
|
|
128
|
+
"typo-body",
|
|
129
|
+
|
|
130
|
+
// Cursor & Interactions
|
|
131
|
+
"cursor-default",
|
|
132
|
+
|
|
133
|
+
// Transitions
|
|
134
|
+
"transition-colors",
|
|
135
|
+
"duration-300",
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// Disabled suffix styles
|
|
139
|
+
const suffixDisabledClasses = cn(
|
|
140
|
+
// Borders
|
|
141
|
+
"border-border-primary",
|
|
142
|
+
"border",
|
|
143
|
+
|
|
144
|
+
// Background & Colors
|
|
145
|
+
"bg-bg-tertiary",
|
|
146
|
+
"text-text-disabled",
|
|
147
|
+
|
|
148
|
+
// Layout & Flexbox
|
|
149
|
+
"flex",
|
|
150
|
+
"items-center",
|
|
21
151
|
|
|
22
|
-
|
|
152
|
+
// Spacing & Sizing
|
|
153
|
+
"rounded-r-md",
|
|
154
|
+
"px-3",
|
|
155
|
+
"py-1",
|
|
156
|
+
|
|
157
|
+
// Typography
|
|
158
|
+
"typo-body",
|
|
159
|
+
|
|
160
|
+
// Cursor & Interactions
|
|
161
|
+
"hover:cursor-not-allowed",
|
|
162
|
+
|
|
163
|
+
// Transitions
|
|
164
|
+
"transition-colors",
|
|
165
|
+
"duration-300",
|
|
166
|
+
);
|
|
23
167
|
|
|
24
|
-
|
|
25
|
-
|
|
168
|
+
// Invalid suffix styles
|
|
169
|
+
const suffixInvalidClasses = cn(
|
|
170
|
+
// Borders
|
|
171
|
+
"border-border-error",
|
|
172
|
+
"border",
|
|
26
173
|
|
|
27
|
-
|
|
28
|
-
"
|
|
174
|
+
// Background & Colors
|
|
175
|
+
"bg-bg-secondary",
|
|
176
|
+
"text-text-tertiary",
|
|
29
177
|
|
|
30
|
-
|
|
31
|
-
"
|
|
178
|
+
// Layout & Flexbox
|
|
179
|
+
"flex",
|
|
180
|
+
"items-center",
|
|
32
181
|
|
|
33
|
-
|
|
34
|
-
"
|
|
182
|
+
// Spacing & Sizing
|
|
183
|
+
"rounded-r-md",
|
|
184
|
+
"px-3",
|
|
185
|
+
"py-1",
|
|
186
|
+
|
|
187
|
+
// Typography
|
|
188
|
+
"typo-body",
|
|
189
|
+
|
|
190
|
+
// Cursor & Interactions
|
|
191
|
+
"cursor-default",
|
|
192
|
+
|
|
193
|
+
// Transitions
|
|
194
|
+
"transition-colors",
|
|
195
|
+
"duration-300",
|
|
196
|
+
);
|
|
35
197
|
|
|
36
198
|
const inputVariants = cva(
|
|
37
199
|
cn(
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"",
|
|
200
|
+
// Sizing & Layout
|
|
201
|
+
"h-9",
|
|
202
|
+
"flex",
|
|
203
|
+
"w-full",
|
|
204
|
+
"min-w-0",
|
|
205
|
+
|
|
206
|
+
// Spacing & Padding
|
|
207
|
+
"px-3",
|
|
208
|
+
"py-2",
|
|
209
|
+
|
|
210
|
+
// Borders
|
|
211
|
+
"border",
|
|
212
|
+
"border-border-primary",
|
|
213
|
+
|
|
214
|
+
// Background & Colors
|
|
215
|
+
"bg-transparent",
|
|
216
|
+
"text-base",
|
|
217
|
+
|
|
218
|
+
// Typography
|
|
219
|
+
"typo-body",
|
|
220
|
+
"md:text-md",
|
|
221
|
+
|
|
222
|
+
// File input styles
|
|
223
|
+
"file:text-text-primary",
|
|
224
|
+
"file:inline-flex",
|
|
225
|
+
"file:h-7",
|
|
226
|
+
"file:border-0",
|
|
227
|
+
"file:bg-transparent",
|
|
228
|
+
"file:text-md",
|
|
229
|
+
"file:font-medium",
|
|
230
|
+
|
|
231
|
+
// Placeholder styles
|
|
232
|
+
"placeholder:text-text-quternary",
|
|
233
|
+
|
|
234
|
+
// Selection styles
|
|
235
|
+
"selection:bg-bg-primary",
|
|
236
|
+
"selection:text-text-primary-foreground",
|
|
237
|
+
"selection:bg-selection",
|
|
238
|
+
|
|
239
|
+
// Hover states
|
|
240
|
+
"hover:border-border-primary_hover",
|
|
241
|
+
|
|
242
|
+
// Focus states
|
|
243
|
+
|
|
244
|
+
"focus-visible:border-border-link",
|
|
245
|
+
|
|
246
|
+
// Invalid states
|
|
247
|
+
"aria-invalid:ring-destructive",
|
|
248
|
+
"aria-invalid:text-text-error-primary",
|
|
249
|
+
"aria-invalid:border-border-error-primary",
|
|
250
|
+
|
|
251
|
+
// Disabled states
|
|
252
|
+
"disabled:bg-bg-secondary",
|
|
253
|
+
"disabled:cursor-not-allowed",
|
|
254
|
+
"disabled:border-border-primary",
|
|
255
|
+
"disabled:text-text-disabled",
|
|
256
|
+
"disabled:placeholder:text-text-disabled",
|
|
257
|
+
|
|
258
|
+
// Transitions
|
|
259
|
+
"transition-all",
|
|
260
|
+
"duration-300",
|
|
261
|
+
|
|
262
|
+
// Outline
|
|
263
|
+
"outline-none",
|
|
264
|
+
|
|
265
|
+
// Border radius
|
|
42
266
|
"rounded-md",
|
|
43
267
|
),
|
|
44
268
|
{
|
|
45
269
|
variants: {
|
|
46
270
|
hasLeftSlot: {
|
|
47
|
-
true:
|
|
271
|
+
true: cn(
|
|
272
|
+
// Left padding for icon
|
|
273
|
+
"pl-9",
|
|
274
|
+
),
|
|
48
275
|
},
|
|
49
276
|
hasRightSlot: {
|
|
50
|
-
true:
|
|
277
|
+
true: cn(
|
|
278
|
+
// Right padding for icon
|
|
279
|
+
"pr-9",
|
|
280
|
+
),
|
|
51
281
|
},
|
|
52
282
|
hasSuffix: {
|
|
53
|
-
true:
|
|
283
|
+
true: cn(
|
|
284
|
+
// Border adjustments for suffix
|
|
285
|
+
"border-r-0",
|
|
286
|
+
"rounded-l-md",
|
|
287
|
+
"rounded-r-none",
|
|
288
|
+
|
|
289
|
+
// Focus adjustments
|
|
290
|
+
"focus-visible:ring-offset-0",
|
|
291
|
+
"focus-visible:border-r-1",
|
|
292
|
+
),
|
|
54
293
|
},
|
|
55
294
|
invalid: {
|
|
56
|
-
true:
|
|
295
|
+
true: cn(
|
|
296
|
+
// Invalid border colors
|
|
297
|
+
"border-border-error",
|
|
298
|
+
"hover:border-border-error_inverse",
|
|
299
|
+
|
|
300
|
+
// Invalid focus states
|
|
301
|
+
"focus-visible:ring-4",
|
|
302
|
+
"focus-visible:ring-ring-red",
|
|
303
|
+
"focus-visible:border-border-error",
|
|
304
|
+
|
|
305
|
+
// Transitions
|
|
306
|
+
"transition-all",
|
|
307
|
+
"duration-300",
|
|
308
|
+
),
|
|
57
309
|
},
|
|
58
310
|
},
|
|
59
311
|
defaultVariants: {
|
|
@@ -4,6 +4,26 @@ import type * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Label styles
|
|
8
|
+
const labelStyles = cn(
|
|
9
|
+
// Layout
|
|
10
|
+
"flex",
|
|
11
|
+
"items-center",
|
|
12
|
+
"gap-2",
|
|
13
|
+
// Typography
|
|
14
|
+
"text-text-primary",
|
|
15
|
+
"typo-label",
|
|
16
|
+
"leading-none",
|
|
17
|
+
// Interaction
|
|
18
|
+
"select-none",
|
|
19
|
+
// Group disabled states
|
|
20
|
+
"group-data-[disabled=true]:pointer-events-none",
|
|
21
|
+
"group-data-[disabled=true]:opacity-50",
|
|
22
|
+
// Peer disabled states
|
|
23
|
+
"peer-disabled:cursor-not-allowed",
|
|
24
|
+
"peer-disabled:opacity-50",
|
|
25
|
+
);
|
|
26
|
+
|
|
7
27
|
function Label({
|
|
8
28
|
className,
|
|
9
29
|
...props
|
|
@@ -11,10 +31,7 @@ function Label({
|
|
|
11
31
|
return (
|
|
12
32
|
<LabelPrimitive.Root
|
|
13
33
|
data-slot="label"
|
|
14
|
-
className={cn(
|
|
15
|
-
"flex items-center gap-2 text-text-primary typo-label leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
34
|
+
className={cn(labelStyles, className)}
|
|
18
35
|
{...props}
|
|
19
36
|
/>
|
|
20
37
|
);
|
|
@@ -4,6 +4,181 @@ import type * as React from "react";
|
|
|
4
4
|
|
|
5
5
|
import { cn } from "#shadcn/lib/utils";
|
|
6
6
|
|
|
7
|
+
// Menubar styles
|
|
8
|
+
const menubarStyles = cn(
|
|
9
|
+
"bg-background",
|
|
10
|
+
"flex",
|
|
11
|
+
"h-9",
|
|
12
|
+
"items-center",
|
|
13
|
+
"gap-1",
|
|
14
|
+
"rounded-md",
|
|
15
|
+
"border",
|
|
16
|
+
"p-1",
|
|
17
|
+
"shadow-xs",
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
// Menubar trigger styles
|
|
21
|
+
const menubarTriggerStyles = cn(
|
|
22
|
+
"focus:bg-accent",
|
|
23
|
+
"focus:text-accent-foreground",
|
|
24
|
+
"data-[state=open]:bg-accent",
|
|
25
|
+
"data-[state=open]:text-accent-foreground",
|
|
26
|
+
"flex",
|
|
27
|
+
"items-center",
|
|
28
|
+
"rounded-sm",
|
|
29
|
+
"px-2",
|
|
30
|
+
"py-1",
|
|
31
|
+
"text-sm",
|
|
32
|
+
"font-medium",
|
|
33
|
+
"outline-hidden",
|
|
34
|
+
"select-none",
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
// Menubar content styles
|
|
38
|
+
const menubarContentStyles = cn(
|
|
39
|
+
"bg-popover",
|
|
40
|
+
"text-popover-foreground",
|
|
41
|
+
"data-[state=open]:animate-in",
|
|
42
|
+
"data-[state=closed]:fade-out-0",
|
|
43
|
+
"data-[state=open]:fade-in-0",
|
|
44
|
+
"data-[state=closed]:zoom-out-95",
|
|
45
|
+
"data-[state=open]:zoom-in-95",
|
|
46
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
47
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
48
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
49
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
50
|
+
"z-50",
|
|
51
|
+
"min-w-[12rem]",
|
|
52
|
+
"origin-(--radix-menubar-content-transform-origin)",
|
|
53
|
+
"overflow-hidden",
|
|
54
|
+
"rounded-md",
|
|
55
|
+
"border",
|
|
56
|
+
"p-1",
|
|
57
|
+
"shadow-md",
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Menubar item styles
|
|
61
|
+
const menubarItemStyles = cn(
|
|
62
|
+
"focus:bg-accent",
|
|
63
|
+
"focus:text-accent-foreground",
|
|
64
|
+
"data-[variant=destructive]:text-destructive",
|
|
65
|
+
"data-[variant=destructive]:focus:bg-destructive/10",
|
|
66
|
+
"dark:data-[variant=destructive]:focus:bg-destructive/20",
|
|
67
|
+
"data-[variant=destructive]:focus:text-destructive",
|
|
68
|
+
"data-[variant=destructive]:*:[svg]:!text-destructive",
|
|
69
|
+
"[&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
70
|
+
"relative",
|
|
71
|
+
"flex",
|
|
72
|
+
"cursor-default",
|
|
73
|
+
"items-center",
|
|
74
|
+
"gap-2",
|
|
75
|
+
"rounded-sm",
|
|
76
|
+
"px-2",
|
|
77
|
+
"py-1.5",
|
|
78
|
+
"text-sm",
|
|
79
|
+
"outline-hidden",
|
|
80
|
+
"select-none",
|
|
81
|
+
"data-[disabled]:pointer-events-none",
|
|
82
|
+
"data-[disabled]:opacity-50",
|
|
83
|
+
"data-[inset]:pl-8",
|
|
84
|
+
"[&_svg]:pointer-events-none",
|
|
85
|
+
"[&_svg]:shrink-0",
|
|
86
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
// Menubar checkbox/radio item styles
|
|
90
|
+
const menubarCheckboxRadioItemStyles = cn(
|
|
91
|
+
"focus:bg-accent",
|
|
92
|
+
"focus:text-accent-foreground",
|
|
93
|
+
"relative",
|
|
94
|
+
"flex",
|
|
95
|
+
"cursor-default",
|
|
96
|
+
"items-center",
|
|
97
|
+
"gap-2",
|
|
98
|
+
"rounded-xs",
|
|
99
|
+
"py-1.5",
|
|
100
|
+
"pr-2",
|
|
101
|
+
"pl-8",
|
|
102
|
+
"text-sm",
|
|
103
|
+
"outline-hidden",
|
|
104
|
+
"select-none",
|
|
105
|
+
"data-[disabled]:pointer-events-none",
|
|
106
|
+
"data-[disabled]:opacity-50",
|
|
107
|
+
"[&_svg]:pointer-events-none",
|
|
108
|
+
"[&_svg]:shrink-0",
|
|
109
|
+
"[&_svg:not([class*='size-'])]:size-4",
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
// Menubar indicator styles
|
|
113
|
+
const menubarIndicatorStyles = cn(
|
|
114
|
+
"pointer-events-none",
|
|
115
|
+
"absolute",
|
|
116
|
+
"left-2",
|
|
117
|
+
"flex",
|
|
118
|
+
"size-3.5",
|
|
119
|
+
"items-center",
|
|
120
|
+
"justify-center",
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
// Menubar label styles
|
|
124
|
+
const menubarLabelStyles = cn(
|
|
125
|
+
"px-2",
|
|
126
|
+
"py-1.5",
|
|
127
|
+
"text-sm",
|
|
128
|
+
"font-medium",
|
|
129
|
+
"data-[inset]:pl-8",
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
// Menubar separator styles
|
|
133
|
+
const menubarSeparatorStyles = cn("bg-border", "-mx-1", "my-1", "h-px");
|
|
134
|
+
|
|
135
|
+
// Menubar shortcut styles
|
|
136
|
+
const menubarShortcutStyles = cn(
|
|
137
|
+
"text-muted-foreground",
|
|
138
|
+
"ml-auto",
|
|
139
|
+
"text-xs",
|
|
140
|
+
"tracking-widest",
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// Menubar sub trigger styles
|
|
144
|
+
const menubarSubTriggerStyles = cn(
|
|
145
|
+
"focus:bg-(--color-surface-1)",
|
|
146
|
+
"data-[state=open]:bg-(--color-surface-1)",
|
|
147
|
+
"flex",
|
|
148
|
+
"items-center",
|
|
149
|
+
"rounded-sm",
|
|
150
|
+
"px-2",
|
|
151
|
+
"py-1",
|
|
152
|
+
"text-sm",
|
|
153
|
+
"font-medium",
|
|
154
|
+
"outline-hidden",
|
|
155
|
+
"select-none",
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
// Menubar sub content styles
|
|
159
|
+
const menubarSubContentStyles = cn(
|
|
160
|
+
"bg-popover",
|
|
161
|
+
"text-popover-foreground",
|
|
162
|
+
"data-[state=open]:animate-in",
|
|
163
|
+
"data-[state=closed]:animate-out",
|
|
164
|
+
"data-[state=closed]:fade-out-0",
|
|
165
|
+
"data-[state=open]:fade-in-0",
|
|
166
|
+
"data-[state=closed]:zoom-out-95",
|
|
167
|
+
"data-[state=open]:zoom-in-95",
|
|
168
|
+
"data-[side=bottom]:slide-in-from-top-2",
|
|
169
|
+
"data-[side=left]:slide-in-from-right-2",
|
|
170
|
+
"data-[side=right]:slide-in-from-left-2",
|
|
171
|
+
"data-[side=top]:slide-in-from-bottom-2",
|
|
172
|
+
"z-50",
|
|
173
|
+
"min-w-[8rem]",
|
|
174
|
+
"origin-(--radix-menubar-content-transform-origin)",
|
|
175
|
+
"overflow-hidden",
|
|
176
|
+
"rounded-md",
|
|
177
|
+
"border",
|
|
178
|
+
"p-1",
|
|
179
|
+
"shadow-lg",
|
|
180
|
+
);
|
|
181
|
+
|
|
7
182
|
function Menubar({
|
|
8
183
|
className,
|
|
9
184
|
...props
|
|
@@ -11,10 +186,7 @@ function Menubar({
|
|
|
11
186
|
return (
|
|
12
187
|
<MenubarPrimitive.Root
|
|
13
188
|
data-slot="menubar"
|
|
14
|
-
className={cn(
|
|
15
|
-
"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",
|
|
16
|
-
className,
|
|
17
|
-
)}
|
|
189
|
+
className={cn(menubarStyles, className)}
|
|
18
190
|
{...props}
|
|
19
191
|
/>
|
|
20
192
|
);
|
|
@@ -53,10 +225,7 @@ function MenubarTrigger({
|
|
|
53
225
|
return (
|
|
54
226
|
<MenubarPrimitive.Trigger
|
|
55
227
|
data-slot="menubar-trigger"
|
|
56
|
-
className={cn(
|
|
57
|
-
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
58
|
-
className,
|
|
59
|
-
)}
|
|
228
|
+
className={cn(menubarTriggerStyles, className)}
|
|
60
229
|
{...props}
|
|
61
230
|
/>
|
|
62
231
|
);
|
|
@@ -76,10 +245,7 @@ function MenubarContent({
|
|
|
76
245
|
align={align}
|
|
77
246
|
alignOffset={alignOffset}
|
|
78
247
|
sideOffset={sideOffset}
|
|
79
|
-
className={cn(
|
|
80
|
-
"bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",
|
|
81
|
-
className,
|
|
82
|
-
)}
|
|
248
|
+
className={cn(menubarContentStyles, className)}
|
|
83
249
|
{...props}
|
|
84
250
|
/>
|
|
85
251
|
</MenubarPortal>
|
|
@@ -100,10 +266,7 @@ function MenubarItem({
|
|
|
100
266
|
data-slot="menubar-item"
|
|
101
267
|
data-inset={inset}
|
|
102
268
|
data-variant={variant}
|
|
103
|
-
className={cn(
|
|
104
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
105
|
-
className,
|
|
106
|
-
)}
|
|
269
|
+
className={cn(menubarItemStyles, className)}
|
|
107
270
|
{...props}
|
|
108
271
|
/>
|
|
109
272
|
);
|
|
@@ -117,13 +280,10 @@ function MenubarCheckboxItem({
|
|
|
117
280
|
return (
|
|
118
281
|
<MenubarPrimitive.CheckboxItem
|
|
119
282
|
data-slot="menubar-checkbox-item"
|
|
120
|
-
className={cn(
|
|
121
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
122
|
-
className,
|
|
123
|
-
)}
|
|
283
|
+
className={cn(menubarCheckboxRadioItemStyles, className)}
|
|
124
284
|
{...props}
|
|
125
285
|
>
|
|
126
|
-
<span className=
|
|
286
|
+
<span className={menubarIndicatorStyles}>
|
|
127
287
|
<MenubarPrimitive.ItemIndicator>
|
|
128
288
|
<CheckIcon className="size-4" />
|
|
129
289
|
</MenubarPrimitive.ItemIndicator>
|
|
@@ -141,13 +301,10 @@ function MenubarRadioItem({
|
|
|
141
301
|
return (
|
|
142
302
|
<MenubarPrimitive.RadioItem
|
|
143
303
|
data-slot="menubar-radio-item"
|
|
144
|
-
className={cn(
|
|
145
|
-
"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
146
|
-
className,
|
|
147
|
-
)}
|
|
304
|
+
className={cn(menubarCheckboxRadioItemStyles, className)}
|
|
148
305
|
{...props}
|
|
149
306
|
>
|
|
150
|
-
<span className=
|
|
307
|
+
<span className={menubarIndicatorStyles}>
|
|
151
308
|
<MenubarPrimitive.ItemIndicator>
|
|
152
309
|
<CircleIcon className="size-2 fill-current" />
|
|
153
310
|
</MenubarPrimitive.ItemIndicator>
|
|
@@ -168,10 +325,7 @@ function MenubarLabel({
|
|
|
168
325
|
<MenubarPrimitive.Label
|
|
169
326
|
data-slot="menubar-label"
|
|
170
327
|
data-inset={inset}
|
|
171
|
-
className={cn(
|
|
172
|
-
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
|
|
173
|
-
className,
|
|
174
|
-
)}
|
|
328
|
+
className={cn(menubarLabelStyles, className)}
|
|
175
329
|
{...props}
|
|
176
330
|
/>
|
|
177
331
|
);
|
|
@@ -184,7 +338,7 @@ function MenubarSeparator({
|
|
|
184
338
|
return (
|
|
185
339
|
<MenubarPrimitive.Separator
|
|
186
340
|
data-slot="menubar-separator"
|
|
187
|
-
className={cn(
|
|
341
|
+
className={cn(menubarSeparatorStyles, className)}
|
|
188
342
|
{...props}
|
|
189
343
|
/>
|
|
190
344
|
);
|
|
@@ -197,10 +351,7 @@ function MenubarShortcut({
|
|
|
197
351
|
return (
|
|
198
352
|
<span
|
|
199
353
|
data-slot="menubar-shortcut"
|
|
200
|
-
className={cn(
|
|
201
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
202
|
-
className,
|
|
203
|
-
)}
|
|
354
|
+
className={cn(menubarShortcutStyles, className)}
|
|
204
355
|
{...props}
|
|
205
356
|
/>
|
|
206
357
|
);
|
|
@@ -224,10 +375,7 @@ function MenubarSubTrigger({
|
|
|
224
375
|
<MenubarPrimitive.SubTrigger
|
|
225
376
|
data-slot="menubar-sub-trigger"
|
|
226
377
|
data-inset={inset}
|
|
227
|
-
className={cn(
|
|
228
|
-
"focus:bg-(--color-surface-1) data-[state=open]:bg-(--color-surface-1) flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",
|
|
229
|
-
className,
|
|
230
|
-
)}
|
|
378
|
+
className={cn(menubarSubTriggerStyles, className)}
|
|
231
379
|
{...props}
|
|
232
380
|
>
|
|
233
381
|
{children}
|
|
@@ -243,10 +391,7 @@ function MenubarSubContent({
|
|
|
243
391
|
return (
|
|
244
392
|
<MenubarPrimitive.SubContent
|
|
245
393
|
data-slot="menubar-sub-content"
|
|
246
|
-
className={cn(
|
|
247
|
-
"bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
|
|
248
|
-
className,
|
|
249
|
-
)}
|
|
394
|
+
className={cn(menubarSubContentStyles, className)}
|
|
250
395
|
{...props}
|
|
251
396
|
/>
|
|
252
397
|
);
|