@syscore/ui-library 1.1.12 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/client/components/icons/AchievementBadges.tsx +33 -0
  2. package/client/components/icons/ConceptIcons.tsx +169 -22
  3. package/client/components/icons/NavLogo.tsx +4 -4
  4. package/client/components/icons/ProviderBadges.tsx +28 -28
  5. package/client/components/icons/ProviderSeals.tsx +35 -35
  6. package/client/components/icons/StandardLogo.tsx +47 -0
  7. package/client/components/icons/UtilityChevronDown.tsx +1 -1
  8. package/client/components/icons/UtilityClearRegular.tsx +43 -0
  9. package/client/components/icons/UtilityCompare.tsx +71 -0
  10. package/client/components/icons/UtilityHome.tsx +26 -0
  11. package/client/components/icons/UtilityReset.tsx +7 -7
  12. package/client/components/icons/UtilitySave.tsx +35 -0
  13. package/client/components/icons/UtilityScopeLarge.tsx +86 -0
  14. package/client/components/icons/UtilityShow.tsx +41 -0
  15. package/client/components/icons/UtilityTarget.tsx +21 -0
  16. package/client/components/icons/UtilityTargetActive.tsx +34 -0
  17. package/client/components/icons/UtilityText.tsx +8 -8
  18. package/client/components/ui/accordion.tsx +6 -9
  19. package/client/components/ui/alert-dialog.tsx +6 -19
  20. package/client/components/ui/alert.tsx +5 -6
  21. package/client/components/ui/avatar.tsx +3 -9
  22. package/client/components/ui/badge.tsx +5 -8
  23. package/client/components/ui/breadcrumb.tsx +24 -11
  24. package/client/components/ui/button.tsx +40 -56
  25. package/client/components/ui/calendar.tsx +24 -28
  26. package/client/components/ui/card.tsx +6 -9
  27. package/client/components/ui/carousel.tsx +14 -14
  28. package/client/components/ui/chart.tsx +25 -28
  29. package/client/components/ui/checkbox.tsx +3 -8
  30. package/client/components/ui/code-badge.tsx +22 -0
  31. package/client/components/ui/command.tsx +12 -48
  32. package/client/components/ui/context-menu.tsx +17 -32
  33. package/client/components/ui/dialog.tsx +9 -18
  34. package/client/components/ui/drawer.tsx +7 -13
  35. package/client/components/ui/dropdown-menu.tsx +17 -29
  36. package/client/components/ui/form.tsx +4 -4
  37. package/client/components/ui/hover-card.tsx +1 -4
  38. package/client/components/ui/input-otp.tsx +7 -10
  39. package/client/components/ui/input.tsx +34 -9
  40. package/client/components/ui/label.tsx +2 -4
  41. package/client/components/ui/menubar.tsx +19 -40
  42. package/client/components/ui/navigation-menu.tsx +10 -27
  43. package/client/components/ui/navigation.tsx +861 -0
  44. package/client/components/ui/pagination.tsx +8 -8
  45. package/client/components/ui/popover.tsx +1 -4
  46. package/client/components/ui/progress.tsx +2 -5
  47. package/client/components/ui/radio-group.tsx +4 -7
  48. package/client/components/ui/resizable.tsx +4 -10
  49. package/client/components/ui/scroll-area.tsx +5 -8
  50. package/client/components/ui/{SearchField.tsx → search.tsx} +7 -10
  51. package/client/components/ui/select.tsx +19 -44
  52. package/client/components/ui/separator.tsx +2 -2
  53. package/client/components/ui/sheet.tsx +12 -23
  54. package/client/components/ui/sidebar.tsx +55 -82
  55. package/client/components/ui/skeleton.tsx +1 -1
  56. package/client/components/ui/slider.tsx +4 -7
  57. package/client/components/ui/sonner.tsx +5 -8
  58. package/client/components/ui/switch.tsx +2 -9
  59. package/client/components/ui/table.tsx +9 -18
  60. package/client/components/ui/tabs.tsx +43 -203
  61. package/client/components/ui/tag.tsx +68 -0
  62. package/client/components/ui/textarea.tsx +1 -4
  63. package/client/components/ui/toast.tsx +9 -19
  64. package/client/components/ui/toaster.tsx +1 -1
  65. package/client/components/ui/toggle-group.tsx +20 -3
  66. package/client/components/ui/toggle.tsx +13 -13
  67. package/client/components/ui/tooltip.tsx +147 -10
  68. package/client/global.css +5421 -1049
  69. package/client/storybook.css +1164 -0
  70. package/client/ui/AspectRatio.stories.tsx +1 -1
  71. package/client/ui/Button.stories.tsx +5 -5
  72. package/client/ui/Card.stories.tsx +223 -2
  73. package/client/ui/CodeBadge.stories.tsx +76 -0
  74. package/client/ui/Dialog.stories.tsx +52 -5
  75. package/client/ui/Icons.stories.tsx +31 -31
  76. package/client/ui/Input.stories.tsx +125 -0
  77. package/client/ui/Label.stories.tsx +8 -11
  78. package/client/ui/Navigation.stories.tsx +1 -1
  79. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  80. package/client/ui/SearchField.stories.tsx +1 -1
  81. package/client/ui/{Select/Select.stories.tsx → Select.stories.tsx} +2 -2
  82. package/client/ui/{Switch/Switch.stories.tsx → Switch.stories.tsx} +3 -3
  83. package/client/ui/Tabs.stories.tsx +174 -10
  84. package/client/ui/Tag.stories.tsx +48 -1
  85. package/client/ui/{Textarea/Textarea.stories.tsx → Textarea.stories.tsx} +9 -10
  86. package/client/ui/Toggle.stories.tsx +3 -3
  87. package/client/ui/Tooltip.stories.tsx +28 -4
  88. package/dist/ui/index.cjs.js +1 -1
  89. package/dist/ui/index.d.ts +4 -6
  90. package/dist/ui/index.es.js +1227 -2235
  91. package/dist/ui/ui-library.css +1 -0
  92. package/package.json +3 -3
  93. package/client/components/ui/Navigation.tsx +0 -958
  94. package/client/components/ui/StrategyTable.tsx +0 -303
  95. package/client/components/ui/Tag.tsx +0 -127
  96. package/client/ui/Input/Input.stories.tsx +0 -69
  97. package/client/ui/StrategyTable.stories.tsx +0 -138
  98. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
  99. package/client/ui/WELLDashboard/index.tsx +0 -317
  100. /package/client/hooks/{UseTabs.tsx → use-tabs.tsx} +0 -0
@@ -25,14 +25,14 @@ const DropdownMenuSubTrigger = React.forwardRef<
25
25
  <DropdownMenuPrimitive.SubTrigger
26
26
  ref={ref}
27
27
  className={cn(
28
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent",
29
- inset && "pl-8",
28
+ "dropdown-menu-sub-trigger",
29
+ inset && "dropdown-menu-sub-trigger--inset",
30
30
  className,
31
31
  )}
32
32
  {...props}
33
33
  >
34
34
  {children}
35
- <ChevronRight className="ml-auto h-4 w-4" />
35
+ <ChevronRight className="dropdown-menu-sub-trigger-icon icon-4" />
36
36
  </DropdownMenuPrimitive.SubTrigger>
37
37
  ));
38
38
  DropdownMenuSubTrigger.displayName =
@@ -44,10 +44,7 @@ const DropdownMenuSubContent = React.forwardRef<
44
44
  >(({ className, ...props }, ref) => (
45
45
  <DropdownMenuPrimitive.SubContent
46
46
  ref={ref}
47
- className={cn(
48
- "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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",
49
- className,
50
- )}
47
+ className={cn("dropdown-menu-sub-content", className)}
51
48
  {...props}
52
49
  />
53
50
  ));
@@ -62,10 +59,7 @@ const DropdownMenuContent = React.forwardRef<
62
59
  <DropdownMenuPrimitive.Content
63
60
  ref={ref}
64
61
  sideOffset={sideOffset}
65
- className={cn(
66
- "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
67
- className,
68
- )}
62
+ className={cn("dropdown-menu-content", className)}
69
63
  {...props}
70
64
  />
71
65
  </DropdownMenuPrimitive.Portal>
@@ -81,8 +75,8 @@ const DropdownMenuItem = React.forwardRef<
81
75
  <DropdownMenuPrimitive.Item
82
76
  ref={ref}
83
77
  className={cn(
84
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
85
- inset && "pl-8",
78
+ "dropdown-menu-item",
79
+ inset && "dropdown-menu-item--inset",
86
80
  className,
87
81
  )}
88
82
  {...props}
@@ -96,16 +90,13 @@ const DropdownMenuCheckboxItem = React.forwardRef<
96
90
  >(({ className, children, checked, ...props }, ref) => (
97
91
  <DropdownMenuPrimitive.CheckboxItem
98
92
  ref={ref}
99
- className={cn(
100
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
101
- className,
102
- )}
93
+ className={cn("dropdown-menu-checkbox-item", className)}
103
94
  checked={checked}
104
95
  {...props}
105
96
  >
106
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
97
+ <span className="dropdown-menu-item-indicator">
107
98
  <DropdownMenuPrimitive.ItemIndicator>
108
- <Check className="h-4 w-4" />
99
+ <Check className="icon-4" />
109
100
  </DropdownMenuPrimitive.ItemIndicator>
110
101
  </span>
111
102
  {children}
@@ -120,15 +111,12 @@ const DropdownMenuRadioItem = React.forwardRef<
120
111
  >(({ className, children, ...props }, ref) => (
121
112
  <DropdownMenuPrimitive.RadioItem
122
113
  ref={ref}
123
- className={cn(
124
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
125
- className,
126
- )}
114
+ className={cn("dropdown-menu-radio-item", className)}
127
115
  {...props}
128
116
  >
129
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
117
+ <span className="dropdown-menu-item-indicator">
130
118
  <DropdownMenuPrimitive.ItemIndicator>
131
- <Circle className="h-2 w-2 fill-current" />
119
+ <Circle className="icon-2 fill-current" />
132
120
  </DropdownMenuPrimitive.ItemIndicator>
133
121
  </span>
134
122
  {children}
@@ -145,8 +133,8 @@ const DropdownMenuLabel = React.forwardRef<
145
133
  <DropdownMenuPrimitive.Label
146
134
  ref={ref}
147
135
  className={cn(
148
- "px-2 py-1.5 text-sm font-semibold",
149
- inset && "pl-8",
136
+ "dropdown-menu-label",
137
+ inset && "dropdown-menu-label--inset",
150
138
  className,
151
139
  )}
152
140
  {...props}
@@ -160,7 +148,7 @@ const DropdownMenuSeparator = React.forwardRef<
160
148
  >(({ className, ...props }, ref) => (
161
149
  <DropdownMenuPrimitive.Separator
162
150
  ref={ref}
163
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
151
+ className={cn("dropdown-menu-separator", className)}
164
152
  {...props}
165
153
  />
166
154
  ));
@@ -172,7 +160,7 @@ const DropdownMenuShortcut = ({
172
160
  }: React.HTMLAttributes<HTMLSpanElement>) => {
173
161
  return (
174
162
  <span
175
- className={cn("ml-auto text-xs tracking-widest opacity-60", className)}
163
+ className={cn("dropdown-menu-shortcut", className)}
176
164
  {...props}
177
165
  />
178
166
  );
@@ -78,7 +78,7 @@ const FormItem = React.forwardRef<
78
78
 
79
79
  return (
80
80
  <FormItemContext.Provider value={{ id }}>
81
- <div ref={ref} className={cn("space-y-2", className)} {...props} />
81
+ <div ref={ref} className={cn("form-item", className)} {...props} />
82
82
  </FormItemContext.Provider>
83
83
  );
84
84
  });
@@ -93,7 +93,7 @@ const FormLabel = React.forwardRef<
93
93
  return (
94
94
  <Label
95
95
  ref={ref}
96
- className={cn(error && "text-destructive", className)}
96
+ className={cn(error && "form-label--error", className)}
97
97
  htmlFor={formItemId}
98
98
  {...props}
99
99
  />
@@ -134,7 +134,7 @@ const FormDescription = React.forwardRef<
134
134
  <p
135
135
  ref={ref}
136
136
  id={formDescriptionId}
137
- className={cn("text-sm text-muted-foreground", className)}
137
+ className={cn("form-description", className)}
138
138
  {...props}
139
139
  />
140
140
  );
@@ -156,7 +156,7 @@ const FormMessage = React.forwardRef<
156
156
  <p
157
157
  ref={ref}
158
158
  id={formMessageId}
159
- className={cn("text-sm font-medium text-destructive", className)}
159
+ className={cn("form-message", className)}
160
160
  {...props}
161
161
  >
162
162
  {body}
@@ -15,10 +15,7 @@ const HoverCardContent = React.forwardRef<
15
15
  ref={ref}
16
16
  align={align}
17
17
  sideOffset={sideOffset}
18
- className={cn(
19
- "z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
20
- className,
21
- )}
18
+ className={cn("hover-card-content", className)}
22
19
  {...props}
23
20
  />
24
21
  ));
@@ -10,11 +10,8 @@ const InputOTP = React.forwardRef<
10
10
  >(({ className, containerClassName, ...props }, ref) => (
11
11
  <OTPInput
12
12
  ref={ref}
13
- containerClassName={cn(
14
- "flex items-center gap-2 has-disabled:opacity-50",
15
- containerClassName,
16
- )}
17
- className={cn("disabled:cursor-not-allowed", className)}
13
+ containerClassName={cn("input-otp-container", containerClassName)}
14
+ className={cn("input-otp", className)}
18
15
  {...props}
19
16
  />
20
17
  ));
@@ -24,7 +21,7 @@ const InputOTPGroup = React.forwardRef<
24
21
  React.ElementRef<"div">,
25
22
  React.ComponentPropsWithoutRef<"div">
26
23
  >(({ className, ...props }, ref) => (
27
- <div ref={ref} className={cn("flex items-center", className)} {...props} />
24
+ <div ref={ref} className={cn("input-otp-group", className)} {...props} />
28
25
  ));
29
26
  InputOTPGroup.displayName = "InputOTPGroup";
30
27
 
@@ -39,16 +36,16 @@ const InputOTPSlot = React.forwardRef<
39
36
  <div
40
37
  ref={ref}
41
38
  className={cn(
42
- "relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",
43
- isActive && "z-10 ring-2 ring-ring ring-offset-background",
39
+ "input-otp-slot",
40
+ isActive && "input-otp-slot--active",
44
41
  className,
45
42
  )}
46
43
  {...props}
47
44
  >
48
45
  {char}
49
46
  {hasFakeCaret && (
50
- <div className="pointer-events-none absolute inset-0 flex items-center justify-center">
51
- <div className="h-4 w-px animate-caret-blink bg-foreground duration-1000" />
47
+ <div className="input-otp-caret">
48
+ <div className="input-otp-caret-line" />
52
49
  </div>
53
50
  )}
54
51
  </div>
@@ -1,19 +1,44 @@
1
+ import { cn } from "@/lib/utils";
1
2
  import * as React from "react";
2
3
 
3
- import { cn } from "@/lib/utils";
4
+ export interface InputProps extends React.ComponentProps<"input"> {
5
+ startIcon?: React.ReactNode;
6
+ endIcon?: React.ReactNode;
7
+ }
8
+
9
+ const Input = React.forwardRef<HTMLInputElement, InputProps>(
10
+ ({ className, type, startIcon, endIcon, ...props }, ref) => {
11
+ const isReadOnly = props.readOnly;
12
+ const isDisabled = props.disabled;
4
13
 
5
- const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
6
- ({ className, type, ...props }, ref) => {
7
14
  return (
8
- <input
9
- type={type}
15
+ <div
10
16
  className={cn(
11
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
17
+ "input-wrapper body-base font-mazzard",
12
18
  className,
13
19
  )}
14
- ref={ref}
15
- {...props}
16
- />
20
+ >
21
+ {startIcon ? (
22
+ <div className="input-icon-start">
23
+ {startIcon}
24
+ </div>
25
+ ) : null}
26
+
27
+ <input
28
+ type={type}
29
+ className="input"
30
+ ref={ref}
31
+ disabled={isDisabled}
32
+ readOnly={isReadOnly}
33
+ {...props}
34
+ />
35
+
36
+ {endIcon ? (
37
+ <div className="input-icon-end">
38
+ {endIcon}
39
+ </div>
40
+ ) : null}
41
+ </div>
17
42
  );
18
43
  },
19
44
  );
@@ -4,9 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority";
4
4
 
5
5
  import { cn } from "@/lib/utils";
6
6
 
7
- const labelVariants = cva(
8
- "overline-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
9
- );
7
+ const labelVariants = cva("label");
10
8
 
11
9
  const Label = React.forwardRef<
12
10
  React.ElementRef<typeof LabelPrimitive.Root>,
@@ -18,7 +16,7 @@ const Label = React.forwardRef<
18
16
  className={cn(labelVariants(), className)}
19
17
  {...props}
20
18
  >
21
- {children}
19
+ <span className="overline-medium">{children}</span>
22
20
  </LabelPrimitive.Root>
23
21
  ));
24
22
  Label.displayName = LabelPrimitive.Root.displayName;
@@ -20,10 +20,7 @@ const Menubar = React.forwardRef<
20
20
  >(({ className, ...props }, ref) => (
21
21
  <MenubarPrimitive.Root
22
22
  ref={ref}
23
- className={cn(
24
- "flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
25
- className,
26
- )}
23
+ className={cn("menubar", className)}
27
24
  {...props}
28
25
  />
29
26
  ));
@@ -35,10 +32,7 @@ const MenubarTrigger = React.forwardRef<
35
32
  >(({ className, ...props }, ref) => (
36
33
  <MenubarPrimitive.Trigger
37
34
  ref={ref}
38
- className={cn(
39
- "flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
40
- className,
41
- )}
35
+ className={cn("menubar-trigger", className)}
42
36
  {...props}
43
37
  />
44
38
  ));
@@ -53,14 +47,14 @@ const MenubarSubTrigger = React.forwardRef<
53
47
  <MenubarPrimitive.SubTrigger
54
48
  ref={ref}
55
49
  className={cn(
56
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
57
- inset && "pl-8",
50
+ "menubar-sub-trigger",
51
+ inset && "menubar-sub-trigger--inset",
58
52
  className,
59
53
  )}
60
54
  {...props}
61
55
  >
62
56
  {children}
63
- <ChevronRight className="ml-auto h-4 w-4" />
57
+ <ChevronRight className="icon-4" />
64
58
  </MenubarPrimitive.SubTrigger>
65
59
  ));
66
60
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
@@ -71,10 +65,7 @@ const MenubarSubContent = React.forwardRef<
71
65
  >(({ className, ...props }, ref) => (
72
66
  <MenubarPrimitive.SubContent
73
67
  ref={ref}
74
- className={cn(
75
- "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 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",
76
- className,
77
- )}
68
+ className={cn("menubar-sub-content", className)}
78
69
  {...props}
79
70
  />
80
71
  ));
@@ -94,10 +85,7 @@ const MenubarContent = React.forwardRef<
94
85
  align={align}
95
86
  alignOffset={alignOffset}
96
87
  sideOffset={sideOffset}
97
- className={cn(
98
- "z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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",
99
- className,
100
- )}
88
+ className={cn("menubar-content", className)}
101
89
  {...props}
102
90
  />
103
91
  </MenubarPrimitive.Portal>
@@ -114,8 +102,8 @@ const MenubarItem = React.forwardRef<
114
102
  <MenubarPrimitive.Item
115
103
  ref={ref}
116
104
  className={cn(
117
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
118
- inset && "pl-8",
105
+ "menubar-item",
106
+ inset && "menubar-item--inset",
119
107
  className,
120
108
  )}
121
109
  {...props}
@@ -129,16 +117,13 @@ const MenubarCheckboxItem = React.forwardRef<
129
117
  >(({ className, children, checked, ...props }, ref) => (
130
118
  <MenubarPrimitive.CheckboxItem
131
119
  ref={ref}
132
- className={cn(
133
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
134
- className,
135
- )}
120
+ className={cn("menubar-checkbox-item", className)}
136
121
  checked={checked}
137
122
  {...props}
138
123
  >
139
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
124
+ <span className="menubar-item-indicator">
140
125
  <MenubarPrimitive.ItemIndicator>
141
- <Check className="h-4 w-4" />
126
+ <Check className="icon-4" />
142
127
  </MenubarPrimitive.ItemIndicator>
143
128
  </span>
144
129
  {children}
@@ -152,15 +137,12 @@ const MenubarRadioItem = React.forwardRef<
152
137
  >(({ className, children, ...props }, ref) => (
153
138
  <MenubarPrimitive.RadioItem
154
139
  ref={ref}
155
- className={cn(
156
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
157
- className,
158
- )}
140
+ className={cn("menubar-radio-item", className)}
159
141
  {...props}
160
142
  >
161
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
143
+ <span className="menubar-item-indicator">
162
144
  <MenubarPrimitive.ItemIndicator>
163
- <Circle className="h-2 w-2 fill-current" />
145
+ <Circle className="icon-2 fill-current" />
164
146
  </MenubarPrimitive.ItemIndicator>
165
147
  </span>
166
148
  {children}
@@ -177,8 +159,8 @@ const MenubarLabel = React.forwardRef<
177
159
  <MenubarPrimitive.Label
178
160
  ref={ref}
179
161
  className={cn(
180
- "px-2 py-1.5 text-sm font-semibold",
181
- inset && "pl-8",
162
+ "menubar-label",
163
+ inset && "menubar-label--inset",
182
164
  className,
183
165
  )}
184
166
  {...props}
@@ -192,7 +174,7 @@ const MenubarSeparator = React.forwardRef<
192
174
  >(({ className, ...props }, ref) => (
193
175
  <MenubarPrimitive.Separator
194
176
  ref={ref}
195
- className={cn("-mx-1 my-1 h-px bg-muted", className)}
177
+ className={cn("menubar-separator", className)}
196
178
  {...props}
197
179
  />
198
180
  ));
@@ -204,10 +186,7 @@ const MenubarShortcut = ({
204
186
  }: React.HTMLAttributes<HTMLSpanElement>) => {
205
187
  return (
206
188
  <span
207
- className={cn(
208
- "ml-auto text-xs tracking-widest text-muted-foreground",
209
- className,
210
- )}
189
+ className={cn("menubar-shortcut", className)}
211
190
  {...props}
212
191
  />
213
192
  );
@@ -11,10 +11,7 @@ const NavigationMenu = React.forwardRef<
11
11
  >(({ className, children, ...props }, ref) => (
12
12
  <NavigationMenuPrimitive.Root
13
13
  ref={ref}
14
- className={cn(
15
- "relative z-10 flex max-w-max flex-1 items-center justify-center",
16
- className,
17
- )}
14
+ className={cn("navigation-menu", className)}
18
15
  {...props}
19
16
  >
20
17
  {children}
@@ -29,10 +26,7 @@ const NavigationMenuList = React.forwardRef<
29
26
  >(({ className, ...props }, ref) => (
30
27
  <NavigationMenuPrimitive.List
31
28
  ref={ref}
32
- className={cn(
33
- "group flex flex-1 list-none items-center justify-center space-x-1",
34
- className,
35
- )}
29
+ className={cn("navigation-menu-list", className)}
36
30
  {...props}
37
31
  />
38
32
  ));
@@ -40,9 +34,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;
40
34
 
41
35
  const NavigationMenuItem = NavigationMenuPrimitive.Item;
42
36
 
43
- const navigationMenuTriggerStyle = cva(
44
- "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50",
45
- );
37
+ const navigationMenuTriggerStyle = cva("navigation-menu-trigger");
46
38
 
47
39
  const NavigationMenuTrigger = React.forwardRef<
48
40
  React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,
@@ -50,12 +42,12 @@ const NavigationMenuTrigger = React.forwardRef<
50
42
  >(({ className, children, ...props }, ref) => (
51
43
  <NavigationMenuPrimitive.Trigger
52
44
  ref={ref}
53
- className={cn(navigationMenuTriggerStyle(), "group", className)}
45
+ className={cn(navigationMenuTriggerStyle(), className)}
54
46
  {...props}
55
47
  >
56
48
  {children}{" "}
57
49
  <ChevronDown
58
- className="relative top-px ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180"
50
+ className="navigation-menu-trigger-icon"
59
51
  aria-hidden="true"
60
52
  />
61
53
  </NavigationMenuPrimitive.Trigger>
@@ -68,10 +60,7 @@ const NavigationMenuContent = React.forwardRef<
68
60
  >(({ className, ...props }, ref) => (
69
61
  <NavigationMenuPrimitive.Content
70
62
  ref={ref}
71
- className={cn(
72
- "left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",
73
- className,
74
- )}
63
+ className={cn("navigation-menu-content", className)}
75
64
  {...props}
76
65
  />
77
66
  ));
@@ -83,12 +72,9 @@ const NavigationMenuViewport = React.forwardRef<
83
72
  React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,
84
73
  React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>
85
74
  >(({ className, ...props }, ref) => (
86
- <div className={cn("absolute left-0 top-full flex justify-center")}>
75
+ <div className="navigation-menu-viewport-wrapper">
87
76
  <NavigationMenuPrimitive.Viewport
88
- className={cn(
89
- "origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-(--radix-navigation-menu-viewport-width)",
90
- className,
91
- )}
77
+ className={cn("navigation-menu-viewport", className)}
92
78
  ref={ref}
93
79
  {...props}
94
80
  />
@@ -103,13 +89,10 @@ const NavigationMenuIndicator = React.forwardRef<
103
89
  >(({ className, ...props }, ref) => (
104
90
  <NavigationMenuPrimitive.Indicator
105
91
  ref={ref}
106
- className={cn(
107
- "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
108
- className,
109
- )}
92
+ className={cn("navigation-menu-indicator", className)}
110
93
  {...props}
111
94
  >
112
- <div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
95
+ {/* Indicator arrow is handled by CSS ::after pseudo-element */}
113
96
  </NavigationMenuPrimitive.Indicator>
114
97
  ));
115
98
  NavigationMenuIndicator.displayName =