@syscore/ui-library 1.1.13 → 1.2.1

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 (87) hide show
  1. package/client/components/ui/accordion.tsx +6 -9
  2. package/client/components/ui/alert-dialog.tsx +6 -19
  3. package/client/components/ui/alert.tsx +5 -6
  4. package/client/components/ui/avatar.tsx +3 -9
  5. package/client/components/ui/badge.tsx +5 -8
  6. package/client/components/ui/breadcrumb.tsx +7 -16
  7. package/client/components/ui/button.tsx +17 -45
  8. package/client/components/ui/calendar.tsx +24 -28
  9. package/client/components/ui/card.tsx +6 -9
  10. package/client/components/ui/carousel.tsx +14 -14
  11. package/client/components/ui/chart.tsx +25 -28
  12. package/client/components/ui/checkbox.tsx +3 -8
  13. package/client/components/ui/code-badge.tsx +1 -4
  14. package/client/components/ui/command.tsx +12 -48
  15. package/client/components/ui/context-menu.tsx +17 -32
  16. package/client/components/ui/dialog.tsx +9 -18
  17. package/client/components/ui/drawer.tsx +7 -13
  18. package/client/components/ui/dropdown-menu.tsx +17 -29
  19. package/client/components/ui/form.tsx +4 -4
  20. package/client/components/ui/hover-card.tsx +1 -4
  21. package/client/components/ui/input-otp.tsx +7 -10
  22. package/client/components/ui/input.tsx +4 -23
  23. package/client/components/ui/label.tsx +1 -3
  24. package/client/components/ui/menubar.tsx +19 -40
  25. package/client/components/ui/navigation-menu.tsx +10 -27
  26. package/client/components/ui/navigation.tsx +193 -331
  27. package/client/components/ui/pagination.tsx +8 -8
  28. package/client/components/ui/popover.tsx +1 -4
  29. package/client/components/ui/progress.tsx +2 -5
  30. package/client/components/ui/radio-group.tsx +4 -7
  31. package/client/components/ui/resizable.tsx +4 -10
  32. package/client/components/ui/scroll-area.tsx +5 -8
  33. package/client/components/ui/search.tsx +7 -10
  34. package/client/components/ui/select.tsx +11 -36
  35. package/client/components/ui/separator.tsx +2 -2
  36. package/client/components/ui/sheet.tsx +12 -23
  37. package/client/components/ui/sidebar.tsx +55 -82
  38. package/client/components/ui/skeleton.tsx +1 -1
  39. package/client/components/ui/slider.tsx +4 -7
  40. package/client/components/ui/sonner.tsx +5 -8
  41. package/client/components/ui/switch.tsx +2 -9
  42. package/client/components/ui/table.tsx +9 -18
  43. package/client/components/ui/tabs.tsx +19 -28
  44. package/client/components/ui/tag.tsx +6 -66
  45. package/client/components/ui/textarea.tsx +1 -4
  46. package/client/components/ui/toast.tsx +9 -19
  47. package/client/components/ui/toaster.tsx +1 -1
  48. package/client/components/ui/toggle-group.tsx +4 -4
  49. package/client/components/ui/toggle.tsx +13 -13
  50. package/client/components/ui/tooltip.tsx +12 -15
  51. package/client/global.css +5419 -1054
  52. package/client/storybook.css +1164 -0
  53. package/dist/index.cjs.js +1 -0
  54. package/dist/{ui/index.d.ts → index.d.ts} +0 -1
  55. package/dist/index.es.js +4552 -0
  56. package/dist/ui-library.css +1 -0
  57. package/package.json +9 -12
  58. package/client/ui/WELLDashboard/WELLDashboard.stories.tsx +0 -115
  59. package/client/ui/WELLDashboard/index.tsx +0 -317
  60. package/dist/ui/index.cjs.js +0 -1
  61. package/dist/ui/index.es.js +0 -5502
  62. package/tailwind.preset.ts +0 -151
  63. /package/dist/{ui/favicon.ico → favicon.ico} +0 -0
  64. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.otf +0 -0
  65. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.ttf +0 -0
  66. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff +0 -0
  67. /package/dist/{ui/fonts → fonts}/FT-Made/FTMade-Regular.woff2 +0 -0
  68. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-black.otf +0 -0
  69. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-blackitalic.otf +0 -0
  70. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bold.otf +0 -0
  71. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-bolditalic.otf +0 -0
  72. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabold.otf +0 -0
  73. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extrabolditalic.otf +0 -0
  74. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralight.otf +0 -0
  75. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-extralightitalic.otf +0 -0
  76. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-italic.otf +0 -0
  77. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-light.otf +0 -0
  78. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-lightitalic.otf +0 -0
  79. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-medium.otf +0 -0
  80. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-mediumitalic.otf +0 -0
  81. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-regular.otf +0 -0
  82. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibold.otf +0 -0
  83. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-semibolditalic.otf +0 -0
  84. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thin.otf +0 -0
  85. /package/dist/{ui/fonts → fonts}/Mazzard-M/mazzardsoftm-thinitalic.otf +0 -0
  86. /package/dist/{ui/placeholder.svg → placeholder.svg} +0 -0
  87. /package/dist/{ui/robots.txt → robots.txt} +0 -0
@@ -50,7 +50,7 @@ const ChartContainer = React.forwardRef<
50
50
  data-chart={chartId}
51
51
  ref={ref}
52
52
  className={cn(
53
- "flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-hidden [&_.recharts-surface]:outline-hidden",
53
+ "chart-container",
54
54
  className,
55
55
  )}
56
56
  {...props}
@@ -145,18 +145,18 @@ const ChartTooltipContent = React.forwardRef<
145
145
  : itemConfig?.label;
146
146
 
147
147
  if (labelFormatter) {
148
- return (
149
- <div className={cn("font-medium", labelClassName)}>
150
- {labelFormatter(value, payload)}
151
- </div>
152
- );
148
+ return (
149
+ <div className={cn("chart-tooltip-label", labelClassName)}>
150
+ {labelFormatter(value, payload)}
151
+ </div>
152
+ );
153
153
  }
154
154
 
155
155
  if (!value) {
156
156
  return null;
157
157
  }
158
158
 
159
- return <div className={cn("font-medium", labelClassName)}>{value}</div>;
159
+ return <div className={cn("chart-tooltip-label", labelClassName)}>{value}</div>;
160
160
  }, [
161
161
  label,
162
162
  labelFormatter,
@@ -177,12 +177,12 @@ const ChartTooltipContent = React.forwardRef<
177
177
  <div
178
178
  ref={ref}
179
179
  className={cn(
180
- "grid min-w-32 items-start gap-1.5 rounded-lg border bg-background px-2.5 py-1.5 text-xs shadow-xl",
180
+ "chart-tooltip",
181
181
  className,
182
182
  )}
183
183
  >
184
184
  {!nestLabel ? tooltipLabel : null}
185
- <div className="grid gap-1.5">
185
+ <div className="chart-tooltip-content">
186
186
  {payload.map((item, index) => {
187
187
  const key = `${nameKey || item.name || item.dataKey || "value"}`;
188
188
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
@@ -192,8 +192,8 @@ const ChartTooltipContent = React.forwardRef<
192
192
  <div
193
193
  key={item.dataKey}
194
194
  className={cn(
195
- "flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
196
- indicator === "dot" && "items-center",
195
+ "chart-tooltip-item",
196
+ indicator === "dot" && "chart-tooltip-item--dot",
197
197
  )}
198
198
  >
199
199
  {formatter && item?.value !== undefined && item.name ? (
@@ -206,13 +206,12 @@ const ChartTooltipContent = React.forwardRef<
206
206
  !hideIndicator && (
207
207
  <div
208
208
  className={cn(
209
- "shrink-0 rounded-[2px] border-border bg-(--color-bg)",
209
+ "chart-tooltip-indicator",
210
210
  {
211
- "h-2.5 w-2.5": indicator === "dot",
212
- "w-1": indicator === "line",
213
- "w-0 border-[1.5px] border-dashed bg-transparent":
214
- indicator === "dashed",
215
- "my-0.5": nestLabel && indicator === "dashed",
211
+ "chart-tooltip-indicator--dot": indicator === "dot",
212
+ "chart-tooltip-indicator--line": indicator === "line",
213
+ "chart-tooltip-indicator--dashed": indicator === "dashed",
214
+ "chart-tooltip-indicator--dashed-nested": nestLabel && indicator === "dashed",
216
215
  },
217
216
  )}
218
217
  style={
@@ -226,18 +225,18 @@ const ChartTooltipContent = React.forwardRef<
226
225
  )}
227
226
  <div
228
227
  className={cn(
229
- "flex flex-1 justify-between leading-none",
230
- nestLabel ? "items-end" : "items-center",
228
+ "chart-tooltip-item-content",
229
+ nestLabel ? "chart-tooltip-item-content--nested" : "",
231
230
  )}
232
231
  >
233
- <div className="grid gap-1.5">
232
+ <div className="chart-tooltip-item-details">
234
233
  {nestLabel ? tooltipLabel : null}
235
- <span className="text-muted-foreground">
234
+ <span className="chart-tooltip-item-label">
236
235
  {itemConfig?.label || item.name}
237
236
  </span>
238
237
  </div>
239
238
  {item.value && (
240
- <span className="font-mono font-medium tabular-nums text-foreground">
239
+ <span className="chart-tooltip-item-value">
241
240
  {item.value.toLocaleString()}
242
241
  </span>
243
242
  )}
@@ -278,8 +277,8 @@ const ChartLegendContent = React.forwardRef<
278
277
  <div
279
278
  ref={ref}
280
279
  className={cn(
281
- "flex items-center justify-center gap-4",
282
- verticalAlign === "top" ? "pb-3" : "pt-3",
280
+ "chart-legend",
281
+ verticalAlign === "top" ? "chart-legend--top" : "chart-legend--bottom",
283
282
  className,
284
283
  )}
285
284
  >
@@ -290,15 +289,13 @@ const ChartLegendContent = React.forwardRef<
290
289
  return (
291
290
  <div
292
291
  key={item.value}
293
- className={cn(
294
- "flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground",
295
- )}
292
+ className="chart-legend-item"
296
293
  >
297
294
  {itemConfig?.icon && !hideIcon ? (
298
295
  <itemConfig.icon />
299
296
  ) : (
300
297
  <div
301
- className="h-2 w-2 shrink-0 rounded-[2px]"
298
+ className="chart-legend-indicator"
302
299
  style={{
303
300
  backgroundColor: item.color,
304
301
  }}
@@ -10,16 +10,11 @@ const Checkbox = React.forwardRef<
10
10
  >(({ className, ...props }, ref) => (
11
11
  <CheckboxPrimitive.Root
12
12
  ref={ref}
13
- className={cn(
14
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
15
- className,
16
- )}
13
+ className={cn("checkbox", className)}
17
14
  {...props}
18
15
  >
19
- <CheckboxPrimitive.Indicator
20
- className={cn("flex items-center justify-center text-current")}
21
- >
22
- <Check className="h-4 w-4" />
16
+ <CheckboxPrimitive.Indicator className="checkbox-indicator">
17
+ <Check className="icon-4" />
23
18
  </CheckboxPrimitive.Indicator>
24
19
  </CheckboxPrimitive.Root>
25
20
  ));
@@ -9,10 +9,7 @@ interface CodeBadgeProps {
9
9
  export const CodeBadge = ({ code, className, style }: CodeBadgeProps) => {
10
10
  return (
11
11
  <div
12
- className={cn(
13
- "flex items-center justify-center h-8 w-12 rounded-sm shrink-0 border-[1.5px] px-px",
14
- className
15
- )}
12
+ className={cn("code-badge", className)}
16
13
  style={{
17
14
  ...style,
18
15
  }}
@@ -12,21 +12,15 @@ const Command = React.forwardRef<
12
12
  React.ElementRef<typeof CommandPrimitive>,
13
13
  React.ComponentPropsWithoutRef<typeof CommandPrimitive>
14
14
  >(({ className, ...props }, ref) => (
15
- <CommandPrimitive
16
- ref={ref}
17
- className={cn("flex h-full w-full flex-col overflow-hidden", className)}
18
- {...props}
19
- />
15
+ <CommandPrimitive ref={ref} className={cn("command", className)} {...props} />
20
16
  ));
21
17
  Command.displayName = CommandPrimitive.displayName;
22
18
 
23
19
  const CommandDialog = ({ children, ...props }: DialogProps) => {
24
20
  return (
25
21
  <Dialog {...props}>
26
- <DialogContent className="overflow-hidden p-0 shadow-lg">
27
- <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">
28
- {children}
29
- </Command>
22
+ <DialogContent className="command-dialog-content">
23
+ <Command>{children}</Command>
30
24
  </DialogContent>
31
25
  </Dialog>
32
26
  );
@@ -41,20 +35,11 @@ const CommandInput = React.forwardRef<
41
35
  React.ElementRef<typeof CommandPrimitive.Input>,
42
36
  CommandInputProps
43
37
  >(({ className, icon: Icon = Search, ...props }, ref) => (
44
- <div
45
- className={cn(
46
- "group relative flex h-14 w-full sm:min-w-[344px] items-center gap-4 rounded-lg border border-gray-200 bg-white p-4 focus:ring-0 focus:outline-none",
47
- className,
48
- )}
49
- cmdk-input-wrapper=""
50
- >
51
- <Icon className=" h-4 w-4 shrink-0 group-focus-within:-translate-x-4 group-focus-within:opacity-0 ease-in-out duration-200" />
38
+ <div className={cn("command-input-wrapper", className)} cmdk-input-wrapper="">
39
+ <Icon className="icon-4 icon-shrink-0" />
52
40
  <CommandPrimitive.Input
53
41
  ref={ref}
54
- className={cn(
55
- "text-base w-full ring-0 outline-none group-focus-within:-translate-x-8 ease-in-out duration-200",
56
- className,
57
- )}
42
+ className={cn("command-input", className)}
58
43
  {...props}
59
44
  />
60
45
  </div>
@@ -68,10 +53,7 @@ const CommandList = React.forwardRef<
68
53
  >(({ className, ...props }, ref) => (
69
54
  <CommandPrimitive.List
70
55
  ref={ref}
71
- className={cn(
72
- "max-h-[300px] overflow-y-auto overflow-x-hidden bg-gray-700 rounded-b-lg",
73
- className,
74
- )}
56
+ className={cn("command-list", className)}
75
57
  {...props}
76
58
  />
77
59
  ));
@@ -82,11 +64,7 @@ const CommandEmpty = React.forwardRef<
82
64
  React.ElementRef<typeof CommandPrimitive.Empty>,
83
65
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
84
66
  >((props, ref) => (
85
- <CommandPrimitive.Empty
86
- ref={ref}
87
- className="py-6 text-center text-sm"
88
- {...props}
89
- />
67
+ <CommandPrimitive.Empty ref={ref} className="command-empty" {...props} />
90
68
  ));
91
69
 
92
70
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
@@ -97,10 +75,7 @@ const CommandGroup = React.forwardRef<
97
75
  >(({ className, ...props }, ref) => (
98
76
  <CommandPrimitive.Group
99
77
  ref={ref}
100
- className={cn(
101
- "group overflow-hidden [&_[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 ",
102
- className,
103
- )}
78
+ className={cn("command-group", className)}
104
79
  {...props}
105
80
  />
106
81
  ));
@@ -113,7 +88,7 @@ const CommandSeparator = React.forwardRef<
113
88
  >(({ className, ...props }, ref) => (
114
89
  <CommandPrimitive.Separator
115
90
  ref={ref}
116
- className={cn("-mx-1 h-px bg-border", className)}
91
+ className={cn("command-separator", className)}
117
92
  {...props}
118
93
  />
119
94
  ));
@@ -125,10 +100,7 @@ const CommandItem = React.forwardRef<
125
100
  >(({ className, ...props }, ref) => (
126
101
  <CommandPrimitive.Item
127
102
  ref={ref}
128
- className={cn(
129
- "relative flex w-full items-center gap-2 cursor-default select-none p-4 text-sm outline-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-gray-700 hover:bg-[rgba(0,0,0,0.2)] text-gray-200",
130
- className,
131
- )}
103
+ className={cn("command-item", className)}
132
104
  {...props}
133
105
  />
134
106
  ));
@@ -139,15 +111,7 @@ const CommandShortcut = ({
139
111
  className,
140
112
  ...props
141
113
  }: React.HTMLAttributes<HTMLSpanElement>) => {
142
- return (
143
- <span
144
- className={cn(
145
- "ml-auto text-xs tracking-widest text-muted-foreground",
146
- className,
147
- )}
148
- {...props}
149
- />
150
- );
114
+ return <span className={cn("command-shortcut", className)} {...props} />;
151
115
  };
152
116
  CommandShortcut.displayName = "CommandShortcut";
153
117
 
@@ -25,14 +25,14 @@ const ContextMenuSubTrigger = React.forwardRef<
25
25
  <ContextMenuPrimitive.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 focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
29
- inset && "pl-8",
28
+ "context-menu-sub-trigger",
29
+ inset && "context-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="icon-4" />
36
36
  </ContextMenuPrimitive.SubTrigger>
37
37
  ));
38
38
  ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;
@@ -43,10 +43,7 @@ const ContextMenuSubContent = React.forwardRef<
43
43
  >(({ className, ...props }, ref) => (
44
44
  <ContextMenuPrimitive.SubContent
45
45
  ref={ref}
46
- className={cn(
47
- "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",
48
- className,
49
- )}
46
+ className={cn("context-menu-sub-content", className)}
50
47
  {...props}
51
48
  />
52
49
  ));
@@ -59,10 +56,7 @@ const ContextMenuContent = React.forwardRef<
59
56
  <ContextMenuPrimitive.Portal>
60
57
  <ContextMenuPrimitive.Content
61
58
  ref={ref}
62
- className={cn(
63
- "z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 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",
64
- className,
65
- )}
59
+ className={cn("context-menu-content", className)}
66
60
  {...props}
67
61
  />
68
62
  </ContextMenuPrimitive.Portal>
@@ -78,8 +72,8 @@ const ContextMenuItem = React.forwardRef<
78
72
  <ContextMenuPrimitive.Item
79
73
  ref={ref}
80
74
  className={cn(
81
- "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",
82
- inset && "pl-8",
75
+ "context-menu-item",
76
+ inset && "context-menu-item--inset",
83
77
  className,
84
78
  )}
85
79
  {...props}
@@ -93,16 +87,13 @@ const ContextMenuCheckboxItem = React.forwardRef<
93
87
  >(({ className, children, checked, ...props }, ref) => (
94
88
  <ContextMenuPrimitive.CheckboxItem
95
89
  ref={ref}
96
- className={cn(
97
- "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",
98
- className,
99
- )}
90
+ className={cn("context-menu-checkbox-item", className)}
100
91
  checked={checked}
101
92
  {...props}
102
93
  >
103
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
94
+ <span className="context-menu-item-indicator">
104
95
  <ContextMenuPrimitive.ItemIndicator>
105
- <Check className="h-4 w-4" />
96
+ <Check className="icon-4" />
106
97
  </ContextMenuPrimitive.ItemIndicator>
107
98
  </span>
108
99
  {children}
@@ -117,15 +108,12 @@ const ContextMenuRadioItem = React.forwardRef<
117
108
  >(({ className, children, ...props }, ref) => (
118
109
  <ContextMenuPrimitive.RadioItem
119
110
  ref={ref}
120
- className={cn(
121
- "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",
122
- className,
123
- )}
111
+ className={cn("context-menu-radio-item", className)}
124
112
  {...props}
125
113
  >
126
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
114
+ <span className="context-menu-item-indicator">
127
115
  <ContextMenuPrimitive.ItemIndicator>
128
- <Circle className="h-2 w-2 fill-current" />
116
+ <Circle className="icon-2 fill-current" />
129
117
  </ContextMenuPrimitive.ItemIndicator>
130
118
  </span>
131
119
  {children}
@@ -142,8 +130,8 @@ const ContextMenuLabel = React.forwardRef<
142
130
  <ContextMenuPrimitive.Label
143
131
  ref={ref}
144
132
  className={cn(
145
- "px-2 py-1.5 text-sm font-semibold text-foreground",
146
- inset && "pl-8",
133
+ "context-menu-label",
134
+ inset && "context-menu-label--inset",
147
135
  className,
148
136
  )}
149
137
  {...props}
@@ -157,7 +145,7 @@ const ContextMenuSeparator = React.forwardRef<
157
145
  >(({ className, ...props }, ref) => (
158
146
  <ContextMenuPrimitive.Separator
159
147
  ref={ref}
160
- className={cn("-mx-1 my-1 h-px bg-border", className)}
148
+ className={cn("context-menu-separator", className)}
161
149
  {...props}
162
150
  />
163
151
  ));
@@ -169,10 +157,7 @@ const ContextMenuShortcut = ({
169
157
  }: React.HTMLAttributes<HTMLSpanElement>) => {
170
158
  return (
171
159
  <span
172
- className={cn(
173
- "ml-auto text-xs tracking-widest text-muted-foreground",
174
- className,
175
- )}
160
+ className={cn("context-menu-shortcut", className)}
176
161
  {...props}
177
162
  />
178
163
  );
@@ -33,12 +33,9 @@ function DialogOverlay({
33
33
  ...props
34
34
  }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
35
35
  return (
36
- <DialogPrimitive.Overlay
36
+ <DialogPrimitive.Overlay
37
37
  data-slot="dialog-overlay"
38
- className={cn(
39
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
40
- className
41
- )}
38
+ className={cn("dialog-overlay", className)}
42
39
  {...props}
43
40
  />
44
41
  );
@@ -57,17 +54,14 @@ function DialogContent({
57
54
  <DialogOverlay />
58
55
  <DialogPrimitive.Content
59
56
  data-slot="dialog-content"
60
- className={cn(
61
- "DialogContent overflow-hidden rounded-[40px] gap-4 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 fixed top-1/2 left-1/2 z-50 grid -translate-x-1/2 -translate-y-1/2 border-12 border-[rgba(255,255,255,0.20)] duration-200 ",
62
- className
63
- )}
57
+ className={cn("dialog-content", className)}
64
58
  {...props}
65
59
  >
66
- <div className="p-6 bg-gray-50">{children}</div>
60
+ <div className="dialog-content-inner">{children}</div>
67
61
  {showCloseButton && (
68
62
  <DialogPrimitive.Close
69
63
  data-slot="dialog-close"
70
- className="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
64
+ className="dialog-close"
71
65
  >
72
66
  <XIcon />
73
67
  <span className="sr-only">Close</span>
@@ -82,7 +76,7 @@ function DialogHeader({ className, ...props }: React.ComponentProps<"div">) {
82
76
  return (
83
77
  <div
84
78
  data-slot="dialog-header"
85
- className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
79
+ className={cn("dialog-header", className)}
86
80
  {...props}
87
81
  />
88
82
  );
@@ -92,10 +86,7 @@ function DialogFooter({ className, ...props }: React.ComponentProps<"div">) {
92
86
  return (
93
87
  <div
94
88
  data-slot="dialog-footer"
95
- className={cn(
96
- "flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
97
- className
98
- )}
89
+ className={cn("dialog-footer", className)}
99
90
  {...props}
100
91
  />
101
92
  );
@@ -108,7 +99,7 @@ function DialogTitle({
108
99
  return (
109
100
  <DialogPrimitive.Title
110
101
  data-slot="dialog-title"
111
- className={cn("heading-xxsmall ", className)}
102
+ className={cn("dialog-title heading-xxsmall", className)}
112
103
  {...props}
113
104
  />
114
105
  );
@@ -121,7 +112,7 @@ function DialogDescription({
121
112
  return (
122
113
  <DialogPrimitive.Description
123
114
  data-slot="dialog-description"
124
- className={cn("text-muted-foreground text-sm", className)}
115
+ className={cn("dialog-description", className)}
125
116
  {...props}
126
117
  />
127
118
  );
@@ -26,7 +26,7 @@ const DrawerOverlay = React.forwardRef<
26
26
  >(({ className, ...props }, ref) => (
27
27
  <DrawerPrimitive.Overlay
28
28
  ref={ref}
29
- className={cn("fixed inset-0 z-50 bg-black/80", className)}
29
+ className={cn("drawer-overlay", className)}
30
30
  {...props}
31
31
  />
32
32
  ));
@@ -40,13 +40,10 @@ const DrawerContent = React.forwardRef<
40
40
  <DrawerOverlay />
41
41
  <DrawerPrimitive.Content
42
42
  ref={ref}
43
- className={cn(
44
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
45
- className,
46
- )}
43
+ className={cn("drawer-content", className)}
47
44
  {...props}
48
45
  >
49
- <div className="mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" />
46
+ <div className="drawer-handle" />
50
47
  {children}
51
48
  </DrawerPrimitive.Content>
52
49
  </DrawerPortal>
@@ -58,7 +55,7 @@ const DrawerHeader = ({
58
55
  ...props
59
56
  }: React.HTMLAttributes<HTMLDivElement>) => (
60
57
  <div
61
- className={cn("grid gap-1.5 p-4 text-center sm:text-left", className)}
58
+ className={cn("drawer-header", className)}
62
59
  {...props}
63
60
  />
64
61
  );
@@ -69,7 +66,7 @@ const DrawerFooter = ({
69
66
  ...props
70
67
  }: React.HTMLAttributes<HTMLDivElement>) => (
71
68
  <div
72
- className={cn("mt-auto flex flex-col gap-2 p-4", className)}
69
+ className={cn("drawer-footer", className)}
73
70
  {...props}
74
71
  />
75
72
  );
@@ -81,10 +78,7 @@ const DrawerTitle = React.forwardRef<
81
78
  >(({ className, ...props }, ref) => (
82
79
  <DrawerPrimitive.Title
83
80
  ref={ref}
84
- className={cn(
85
- "text-lg font-semibold leading-none tracking-tight",
86
- className,
87
- )}
81
+ className={cn("drawer-title", className)}
88
82
  {...props}
89
83
  />
90
84
  ));
@@ -96,7 +90,7 @@ const DrawerDescription = React.forwardRef<
96
90
  >(({ className, ...props }, ref) => (
97
91
  <DrawerPrimitive.Description
98
92
  ref={ref}
99
- className={cn("text-sm text-muted-foreground", className)}
93
+ className={cn("drawer-description", className)}
100
94
  {...props}
101
95
  />
102
96
  ));
@@ -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
  );