@codefast/ui 0.3.10 → 0.3.11-canary.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 (208) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +277 -167
  3. package/dist/components/accordion.cjs +5 -5
  4. package/dist/components/accordion.d.ts +4 -4
  5. package/dist/components/accordion.js +5 -5
  6. package/dist/components/alert-dialog.cjs +9 -9
  7. package/dist/components/alert-dialog.d.ts +11 -11
  8. package/dist/components/alert-dialog.js +9 -9
  9. package/dist/components/alert.cjs +5 -5
  10. package/dist/components/alert.d.ts +5 -5
  11. package/dist/components/alert.js +5 -5
  12. package/dist/components/aspect-ratio.d.ts +2 -2
  13. package/dist/components/avatar.cjs +3 -3
  14. package/dist/components/avatar.d.ts +2 -2
  15. package/dist/components/avatar.js +3 -3
  16. package/dist/components/badge.cjs +7 -7
  17. package/dist/components/badge.d.ts +3 -3
  18. package/dist/components/badge.js +7 -7
  19. package/dist/components/breadcrumb.cjs +6 -8
  20. package/dist/components/breadcrumb.d.ts +8 -8
  21. package/dist/components/breadcrumb.js +6 -8
  22. package/dist/components/button-group.cjs +8 -8
  23. package/dist/components/button-group.d.ts +5 -5
  24. package/dist/components/button-group.js +8 -8
  25. package/dist/components/button.cjs +17 -17
  26. package/dist/components/button.d.ts +6 -6
  27. package/dist/components/button.js +17 -17
  28. package/dist/components/calendar.cjs +35 -35
  29. package/dist/components/calendar.d.ts +5 -5
  30. package/dist/components/calendar.js +35 -35
  31. package/dist/components/card.cjs +7 -7
  32. package/dist/components/card.d.ts +8 -8
  33. package/dist/components/card.js +7 -7
  34. package/dist/components/carousel.cjs +20 -20
  35. package/dist/components/carousel.d.ts +10 -10
  36. package/dist/components/carousel.js +20 -20
  37. package/dist/components/chart.cjs +42 -42
  38. package/dist/components/chart.d.ts +12 -11
  39. package/dist/components/chart.js +42 -42
  40. package/dist/components/checkbox-cards.cjs +2 -2
  41. package/dist/components/checkbox-cards.d.ts +2 -2
  42. package/dist/components/checkbox-cards.js +2 -2
  43. package/dist/components/checkbox-group.cjs +2 -2
  44. package/dist/components/checkbox-group.d.ts +2 -2
  45. package/dist/components/checkbox-group.js +2 -2
  46. package/dist/components/checkbox.cjs +1 -1
  47. package/dist/components/checkbox.d.ts +2 -2
  48. package/dist/components/checkbox.js +1 -1
  49. package/dist/components/collapsible.d.ts +2 -2
  50. package/dist/components/command.cjs +10 -10
  51. package/dist/components/command.d.ts +4 -4
  52. package/dist/components/command.js +10 -10
  53. package/dist/components/context-menu.cjs +10 -10
  54. package/dist/components/context-menu.d.ts +4 -4
  55. package/dist/components/context-menu.js +10 -10
  56. package/dist/components/dialog.cjs +12 -12
  57. package/dist/components/dialog.d.ts +10 -10
  58. package/dist/components/dialog.js +12 -12
  59. package/dist/components/drawer.cjs +9 -9
  60. package/dist/components/drawer.d.ts +9 -9
  61. package/dist/components/drawer.js +9 -9
  62. package/dist/components/dropdown-menu.cjs +10 -10
  63. package/dist/components/dropdown-menu.d.ts +4 -4
  64. package/dist/components/dropdown-menu.js +10 -10
  65. package/dist/components/empty.cjs +10 -10
  66. package/dist/components/empty.d.ts +9 -9
  67. package/dist/components/empty.js +10 -10
  68. package/dist/components/field.cjs +17 -17
  69. package/dist/components/field.d.ts +14 -14
  70. package/dist/components/field.js +17 -17
  71. package/dist/components/form.cjs +8 -8
  72. package/dist/components/form.d.ts +10 -10
  73. package/dist/components/form.js +8 -8
  74. package/dist/components/hover-card.cjs +3 -3
  75. package/dist/components/hover-card.d.ts +2 -2
  76. package/dist/components/hover-card.js +3 -3
  77. package/dist/components/input-group.cjs +20 -20
  78. package/dist/components/input-group.d.ts +15 -15
  79. package/dist/components/input-group.js +20 -20
  80. package/dist/components/input-number.cjs +7 -7
  81. package/dist/components/input-number.d.ts +2 -2
  82. package/dist/components/input-number.js +7 -7
  83. package/dist/components/input-otp.cjs +4 -4
  84. package/dist/components/input-otp.d.ts +6 -6
  85. package/dist/components/input-otp.js +4 -4
  86. package/dist/components/input-password.cjs +6 -6
  87. package/dist/components/input-password.d.ts +3 -3
  88. package/dist/components/input-password.js +6 -6
  89. package/dist/components/input-search.cjs +4 -4
  90. package/dist/components/input-search.d.ts +3 -3
  91. package/dist/components/input-search.js +4 -4
  92. package/dist/components/input.cjs +1 -1
  93. package/dist/components/input.d.ts +2 -2
  94. package/dist/components/input.js +1 -1
  95. package/dist/components/item.cjs +23 -23
  96. package/dist/components/item.d.ts +12 -12
  97. package/dist/components/item.js +23 -23
  98. package/dist/components/kbd.cjs +2 -2
  99. package/dist/components/kbd.d.ts +3 -3
  100. package/dist/components/kbd.js +2 -2
  101. package/dist/components/label.cjs +1 -1
  102. package/dist/components/label.d.ts +2 -2
  103. package/dist/components/label.js +1 -1
  104. package/dist/components/menubar.cjs +13 -13
  105. package/dist/components/menubar.d.ts +4 -4
  106. package/dist/components/menubar.js +13 -13
  107. package/dist/components/native-select.cjs +2 -2
  108. package/dist/components/native-select.d.ts +4 -4
  109. package/dist/components/native-select.js +2 -2
  110. package/dist/components/navigation-menu.cjs +10 -10
  111. package/dist/components/navigation-menu.d.ts +2 -2
  112. package/dist/components/navigation-menu.js +10 -10
  113. package/dist/components/pagination.cjs +6 -6
  114. package/dist/components/pagination.d.ts +10 -10
  115. package/dist/components/pagination.js +6 -6
  116. package/dist/components/popover.cjs +3 -3
  117. package/dist/components/popover.d.ts +3 -3
  118. package/dist/components/popover.js +3 -3
  119. package/dist/components/progress-circle.cjs +22 -22
  120. package/dist/components/progress-circle.d.ts +5 -5
  121. package/dist/components/progress-circle.js +22 -22
  122. package/dist/components/progress.cjs +2 -2
  123. package/dist/components/progress.d.ts +2 -2
  124. package/dist/components/progress.js +2 -2
  125. package/dist/components/radio-cards.cjs +3 -3
  126. package/dist/components/radio-cards.d.ts +2 -2
  127. package/dist/components/radio-cards.js +3 -3
  128. package/dist/components/radio-group.cjs +3 -3
  129. package/dist/components/radio-group.d.ts +2 -2
  130. package/dist/components/radio-group.js +3 -3
  131. package/dist/components/radio.cjs +1 -1
  132. package/dist/components/radio.d.ts +2 -2
  133. package/dist/components/radio.js +1 -1
  134. package/dist/components/resizable.cjs +3 -3
  135. package/dist/components/resizable.d.ts +2 -2
  136. package/dist/components/resizable.js +3 -3
  137. package/dist/components/scroll-area.cjs +31 -31
  138. package/dist/components/scroll-area.d.ts +5 -5
  139. package/dist/components/scroll-area.js +31 -31
  140. package/dist/components/select.cjs +9 -9
  141. package/dist/components/select.d.ts +5 -5
  142. package/dist/components/select.js +9 -9
  143. package/dist/components/separator.cjs +9 -9
  144. package/dist/components/separator.d.ts +5 -5
  145. package/dist/components/separator.js +9 -9
  146. package/dist/components/sheet.cjs +17 -17
  147. package/dist/components/sheet.d.ts +9 -9
  148. package/dist/components/sheet.js +17 -17
  149. package/dist/components/sidebar.cjs +65 -65
  150. package/dist/components/sidebar.d.ts +31 -31
  151. package/dist/components/sidebar.js +65 -65
  152. package/dist/components/skeleton.cjs +1 -1
  153. package/dist/components/skeleton.d.ts +2 -2
  154. package/dist/components/skeleton.js +1 -1
  155. package/dist/components/slider.cjs +4 -4
  156. package/dist/components/slider.d.ts +2 -2
  157. package/dist/components/slider.js +4 -4
  158. package/dist/components/sonner.cjs +4 -4
  159. package/dist/components/sonner.d.ts +3 -3
  160. package/dist/components/sonner.js +4 -4
  161. package/dist/components/spinner.cjs +5 -5
  162. package/dist/components/spinner.d.ts +2 -2
  163. package/dist/components/spinner.js +5 -5
  164. package/dist/components/switch.cjs +2 -2
  165. package/dist/components/switch.d.ts +2 -2
  166. package/dist/components/switch.js +2 -2
  167. package/dist/components/table.cjs +8 -8
  168. package/dist/components/table.d.ts +9 -9
  169. package/dist/components/table.js +8 -8
  170. package/dist/components/tabs.cjs +4 -4
  171. package/dist/components/tabs.d.ts +2 -2
  172. package/dist/components/tabs.js +4 -4
  173. package/dist/components/textarea.cjs +1 -1
  174. package/dist/components/textarea.d.ts +2 -2
  175. package/dist/components/textarea.js +1 -1
  176. package/dist/components/toggle-group.cjs +5 -5
  177. package/dist/components/toggle-group.d.ts +4 -4
  178. package/dist/components/toggle-group.js +5 -5
  179. package/dist/components/toggle.cjs +8 -8
  180. package/dist/components/toggle.d.ts +3 -3
  181. package/dist/components/toggle.js +8 -8
  182. package/dist/components/tooltip.cjs +2 -2
  183. package/dist/components/tooltip.d.ts +3 -3
  184. package/dist/components/tooltip.js +2 -2
  185. package/dist/css/preset.css +4 -4
  186. package/dist/css/style.css +3 -3
  187. package/dist/hooks/use-copy-to-clipboard.cjs +1 -1
  188. package/dist/hooks/use-copy-to-clipboard.d.ts +1 -1
  189. package/dist/hooks/use-copy-to-clipboard.js +1 -1
  190. package/dist/hooks/use-media-query.cjs +3 -3
  191. package/dist/hooks/use-media-query.js +3 -3
  192. package/dist/hooks/use-mutation-observer.d.ts +1 -1
  193. package/dist/hooks/use-pagination.cjs +1 -1
  194. package/dist/hooks/use-pagination.js +1 -1
  195. package/dist/index.d.ts +130 -130
  196. package/dist/primitives/checkbox-group.cjs +3 -3
  197. package/dist/primitives/checkbox-group.d.ts +11 -11
  198. package/dist/primitives/checkbox-group.js +3 -3
  199. package/dist/primitives/input-number.cjs +46 -46
  200. package/dist/primitives/input-number.d.ts +8 -8
  201. package/dist/primitives/input-number.js +46 -46
  202. package/dist/primitives/input.cjs +7 -7
  203. package/dist/primitives/input.d.ts +4 -4
  204. package/dist/primitives/input.js +7 -7
  205. package/dist/primitives/progress-circle.cjs +8 -8
  206. package/dist/primitives/progress-circle.d.ts +7 -7
  207. package/dist/primitives/progress-circle.js +8 -8
  208. package/package.json +38 -42
@@ -5,10 +5,10 @@ import { createContextScope } from "@radix-ui/react-context";
5
5
  import { useId, useMemo } from "react";
6
6
  import { Legend, ResponsiveContainer, Tooltip } from "recharts";
7
7
  const THEMES = {
8
- dark: '.dark',
9
- light: ''
8
+ dark: ".dark",
9
+ light: ""
10
10
  };
11
- const CHART_PROVIDER_NAME = 'ChartProvider';
11
+ const CHART_PROVIDER_NAME = "ChartProvider";
12
12
  const [createChartContext, createChartScope] = createContextScope(CHART_PROVIDER_NAME);
13
13
  const [ChartContextProvider, useChartContext] = createChartContext(CHART_PROVIDER_NAME);
14
14
  function ChartContainer({ __scopeChart, children, className, config, id, ...props }) {
@@ -18,7 +18,7 @@ function ChartContainer({ __scopeChart, children, className, config, id, ...prop
18
18
  config: config,
19
19
  scope: __scopeChart,
20
20
  children: /*#__PURE__*/ jsxs("div", {
21
- className: cn("[&_.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-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 flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
21
+ className: cn("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]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden", className),
22
22
  "data-chart": chartId,
23
23
  "data-slot": "chart",
24
24
  ...props,
@@ -44,22 +44,22 @@ function ChartStyle({ config, id }) {
44
44
  });
45
45
  }
46
46
  const ChartTooltip = Tooltip;
47
- const CHART_TOOLTIP_CONTENT_NAME = 'ChartTooltipContent';
48
- function ChartTooltipContent({ __scopeChart, active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator = 'dot', label, labelClassName, labelFormatter, labelKey, nameKey, payload = [] }) {
47
+ const CHART_TOOLTIP_CONTENT_NAME = "ChartTooltipContent";
48
+ function ChartTooltipContent({ __scopeChart, active, className, color, formatter, hideIndicator = false, hideLabel = false, indicator = "dot", label, labelClassName, labelFormatter, labelKey, nameKey, payload = [] }) {
49
49
  const { config } = useChartContext(CHART_TOOLTIP_CONTENT_NAME, __scopeChart);
50
50
  const tooltipLabel = useMemo(()=>{
51
51
  if (hideLabel || 0 === payload.length) return null;
52
52
  const [item] = payload;
53
- const key = safeToString(labelKey ?? item.dataKey ?? item.name ?? 'value');
53
+ const key = safeToString(labelKey ?? item.dataKey ?? item.name ?? "value");
54
54
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
55
- const value = labelKey || 'string' != typeof label ? itemConfig?.label : label in config ? config[label].label ?? label : label;
55
+ const value = labelKey || "string" != typeof label ? itemConfig?.label : label in config ? config[label].label ?? label : label;
56
56
  if (labelFormatter) return /*#__PURE__*/ jsx("div", {
57
- className: cn('font-medium', labelClassName),
57
+ className: cn("font-medium", labelClassName),
58
58
  children: labelFormatter(value, payload)
59
59
  });
60
60
  if (!value) return null;
61
61
  return /*#__PURE__*/ jsx("div", {
62
- className: cn('font-medium', labelClassName),
62
+ className: cn("font-medium", labelClassName),
63
63
  children: value
64
64
  });
65
65
  }, [
@@ -72,37 +72,37 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
72
72
  labelKey
73
73
  ]);
74
74
  if (!active || 0 === payload.length) return null;
75
- const nestLabel = 1 === payload.length && 'dot' !== indicator;
75
+ const nestLabel = 1 === payload.length && "dot" !== indicator;
76
76
  return /*#__PURE__*/ jsxs("div", {
77
- className: cn('border-border/50 bg-background grid min-w-[8rem] items-start gap-1.5 rounded-lg border px-2.5 py-1.5 text-xs shadow-xl', className),
77
+ className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className),
78
78
  children: [
79
79
  nestLabel ? null : tooltipLabel,
80
80
  /*#__PURE__*/ jsx("div", {
81
81
  className: "grid gap-1.5",
82
82
  children: payload.map((item, index)=>{
83
- const key = safeToString(nameKey ?? item.name ?? item.dataKey ?? 'value');
83
+ const key = safeToString(nameKey ?? item.name ?? item.dataKey ?? "value");
84
84
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
85
- const indicatorColor = color ?? (isRecord(item.payload) && 'fill' in item.payload && 'string' == typeof item.payload.fill ? item.payload.fill : void 0) ?? item.color;
85
+ const indicatorColor = color ?? (isRecord(item.payload) && "fill" in item.payload && "string" == typeof item.payload.fill ? item.payload.fill : void 0) ?? item.color;
86
86
  return /*#__PURE__*/ jsx("div", {
87
- className: cn('[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5', 'dot' === indicator && 'items-center'),
87
+ className: cn("flex w-full flex-wrap items-stretch gap-2 [&>svg]:size-2.5 [&>svg]:text-muted-foreground", "dot" === indicator && "items-center"),
88
88
  children: formatter && void 0 !== item.value && item.name ? formatter(item.value, item.name, item, index, [
89
89
  item
90
90
  ]) : /*#__PURE__*/ jsxs(Fragment, {
91
91
  children: [
92
92
  itemConfig?.icon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : !hideIndicator && /*#__PURE__*/ jsx("div", {
93
- className: cn('shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)', {
94
- 'h-2.5 w-2.5': 'dot' === indicator,
95
- 'my-0.5': nestLabel && 'dashed' === indicator,
96
- 'border-1.5 w-0 border-dashed bg-transparent': 'dashed' === indicator,
97
- 'w-1': 'line' === indicator
93
+ className: cn("shrink-0 rounded-xs border-(--color-border) bg-(--color-bg)", {
94
+ "h-2.5 w-2.5": "dot" === indicator,
95
+ "my-0.5": nestLabel && "dashed" === indicator,
96
+ "border-1.5 w-0 border-dashed bg-transparent": "dashed" === indicator,
97
+ "w-1": "line" === indicator
98
98
  }),
99
99
  style: {
100
- '--color-bg': indicatorColor,
101
- '--color-border': indicatorColor
100
+ "--color-bg": indicatorColor,
101
+ "--color-border": indicatorColor
102
102
  }
103
103
  }),
104
104
  /*#__PURE__*/ jsxs("div", {
105
- className: cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center'),
105
+ className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"),
106
106
  children: [
107
107
  /*#__PURE__*/ jsxs("div", {
108
108
  className: "grid gap-1.5",
@@ -115,8 +115,8 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
115
115
  ]
116
116
  }),
117
117
  null != item.value && /*#__PURE__*/ jsx("span", {
118
- className: "text-foreground font-mono font-medium tabular-nums",
119
- children: 'number' == typeof item.value ? item.value.toLocaleString() : safeToString(item.value)
118
+ className: "font-mono font-medium text-foreground tabular-nums",
119
+ children: "number" == typeof item.value ? item.value.toLocaleString() : safeToString(item.value)
120
120
  })
121
121
  ]
122
122
  })
@@ -129,19 +129,19 @@ function ChartTooltipContent({ __scopeChart, active, className, color, formatter
129
129
  });
130
130
  }
131
131
  const ChartLegend = Legend;
132
- const CHART_LEGEND_CONTENT_NAME = 'ChartLegendContent';
133
- function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey, payload, verticalAlign = 'bottom' }) {
132
+ const CHART_LEGEND_CONTENT_NAME = "ChartLegendContent";
133
+ function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey, payload, verticalAlign = "bottom" }) {
134
134
  const { config } = useChartContext(CHART_LEGEND_CONTENT_NAME, __scopeChart);
135
135
  if (!payload?.length) return null;
136
136
  return /*#__PURE__*/ jsx("div", {
137
- className: cn('flex items-center justify-center gap-4', 'top' === verticalAlign ? 'pb-3' : 'pt-3', className),
137
+ className: cn("flex items-center justify-center gap-4", "top" === verticalAlign ? "pb-3" : "pt-3", className),
138
138
  children: payload.map((item)=>{
139
- let key = 'value';
139
+ let key = "value";
140
140
  if (nameKey) key = nameKey;
141
141
  else if (null != item.dataKey) key = safeToString(item.dataKey);
142
142
  const itemConfig = getPayloadConfigFromPayload(config, item, key);
143
143
  return /*#__PURE__*/ jsxs("div", {
144
- className: cn('[&>svg]:text-muted-foreground flex items-center gap-1.5 [&>svg]:size-3'),
144
+ className: cn("flex items-center gap-1.5 [&>svg]:size-3 [&>svg]:text-muted-foreground"),
145
145
  children: [
146
146
  itemConfig?.icon && !hideIcon ? /*#__PURE__*/ jsx(itemConfig.icon, {}) : /*#__PURE__*/ jsx("div", {
147
147
  className: "size-2 shrink-0 rounded-md",
@@ -151,27 +151,27 @@ function ChartLegendContent({ __scopeChart, className, hideIcon = false, nameKey
151
151
  }),
152
152
  itemConfig?.label
153
153
  ]
154
- }, nameKey ? safeToString(itemConfig?.color ?? '') : safeToString(item.value ?? ''));
154
+ }, nameKey ? safeToString(itemConfig?.color ?? "") : safeToString(item.value ?? ""));
155
155
  })
156
156
  });
157
157
  }
158
158
  function isRecord(value) {
159
- return 'object' == typeof value && null !== value;
159
+ return "object" == typeof value && null !== value;
160
160
  }
161
161
  function getStringValue(record, key) {
162
162
  if (key in record) {
163
163
  const value = record[key];
164
- return 'string' == typeof value ? value : void 0;
164
+ return "string" == typeof value ? value : void 0;
165
165
  }
166
166
  }
167
167
  function safeToString(value) {
168
- if ('string' == typeof value) return value;
169
- if ('number' == typeof value) return value.toString();
170
- if (null == value) return '';
171
- if ('boolean' == typeof value) return value.toString();
172
- if ('bigint' == typeof value) return value.toString();
173
- if ('symbol' == typeof value) return value.toString();
174
- return '';
168
+ if ("string" == typeof value) return value;
169
+ if ("number" == typeof value) return value.toString();
170
+ if (null == value) return "";
171
+ if ("boolean" == typeof value) return value.toString();
172
+ if ("bigint" == typeof value) return value.toString();
173
+ if ("symbol" == typeof value) return value.toString();
174
+ return "";
175
175
  }
176
176
  function getPayloadConfigFromPayload(config, payload, key) {
177
177
  if (!isRecord(payload)) return;
@@ -190,10 +190,10 @@ function generateCssVariable(key, itemConfig, theme) {
190
190
  return color ? ` --color-${key}: ${color};` : null;
191
191
  }
192
192
  function generateThemeStyles(theme, prefix, id, colorConfig) {
193
- const cssVariables = colorConfig.map(([key, itemConfig])=>generateCssVariable(key, itemConfig, theme)).filter(Boolean).join('\n');
193
+ const cssVariables = colorConfig.map(([key, itemConfig])=>generateCssVariable(key, itemConfig, theme)).filter(Boolean).join("\n");
194
194
  return `${prefix} [data-chart=${id}] {\n${cssVariables}\n}`;
195
195
  }
196
196
  function generateChartStyles(id, colorConfig) {
197
- return Object.entries(THEMES).map(([theme, prefix])=>generateThemeStyles(theme, prefix, id, colorConfig)).join('\n\n');
197
+ return Object.entries(THEMES).map(([theme, prefix])=>generateThemeStyles(theme, prefix, id, colorConfig)).join("\n\n");
198
198
  }
199
199
  export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, createChartScope };
@@ -41,11 +41,11 @@ function CheckboxCards(props) {
41
41
  }
42
42
  function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
43
43
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_label_cjs_namespaceObject.Label, {
44
- className: (0, tailwind_variants_namespaceObject.cn)('border-input hover:not-has-disabled:not-has-aria-checked:bg-secondary has-aria-checked:bg-primary/10 has-aria-checked:border-primary has-focus-visible:border-ring flex items-start gap-3 rounded-lg border p-3 transition has-disabled:opacity-50', className),
44
+ className: (0, tailwind_variants_namespaceObject.cn)("flex items-start gap-3 rounded-lg border border-input p-3 transition hover:not-has-disabled:not-has-aria-checked:bg-secondary has-focus-visible:border-ring has-disabled:opacity-50 has-aria-checked:border-primary has-aria-checked:bg-primary/10", className),
45
45
  "data-slot": "checkbox-card",
46
46
  children: [
47
47
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Item, {
48
- className: (0, tailwind_variants_namespaceObject.cn)('border-input text-primary-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary dark:bg-input/30 peer flex size-4 shrink-0 rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3', checkboxClassName),
48
+ className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40", checkboxClassName),
49
49
  "data-slot": "checkbox-card-item",
50
50
  ...props,
51
51
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.CheckboxGroupIndicator, {
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as CheckboxGroupPrimitive from '../primitives/checkbox-group';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as CheckboxGroupPrimitive from "../primitives/checkbox-group";
3
3
  type CheckboxCardsProps = ComponentProps<typeof CheckboxGroupPrimitive.Root>;
4
4
  declare function CheckboxCards(props: CheckboxCardsProps): JSX.Element;
5
5
  interface CheckboxCardsItemProps extends ComponentProps<typeof CheckboxGroupPrimitive.Item> {
@@ -12,11 +12,11 @@ function CheckboxCards(props) {
12
12
  }
13
13
  function CheckboxCardsItem({ checkboxClassName, children, className, ...props }) {
14
14
  return /*#__PURE__*/ jsxs(Label, {
15
- className: cn('border-input hover:not-has-disabled:not-has-aria-checked:bg-secondary has-aria-checked:bg-primary/10 has-aria-checked:border-primary has-focus-visible:border-ring flex items-start gap-3 rounded-lg border p-3 transition has-disabled:opacity-50', className),
15
+ className: cn("flex items-start gap-3 rounded-lg border border-input p-3 transition hover:not-has-disabled:not-has-aria-checked:bg-secondary has-focus-visible:border-ring has-disabled:opacity-50 has-aria-checked:border-primary has-aria-checked:bg-primary/10", className),
16
16
  "data-slot": "checkbox-card",
17
17
  children: [
18
18
  /*#__PURE__*/ jsx(Item, {
19
- className: cn('border-input text-primary-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary dark:bg-input/30 peer flex size-4 shrink-0 rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3', checkboxClassName),
19
+ className: cn("peer flex size-4 shrink-0 rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40", checkboxClassName),
20
20
  "data-slot": "checkbox-card-item",
21
21
  ...props,
22
22
  children: /*#__PURE__*/ jsx(CheckboxGroupIndicator, {
@@ -34,14 +34,14 @@ const external_lucide_react_namespaceObject = require("lucide-react");
34
34
  const checkbox_group_cjs_namespaceObject = require("../primitives/checkbox-group.cjs");
35
35
  function CheckboxGroup({ className, ...props }) {
36
36
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Root, {
37
- className: (0, tailwind_variants_namespaceObject.cn)('grid gap-2', className),
37
+ className: (0, tailwind_variants_namespaceObject.cn)("grid gap-2", className),
38
38
  "data-slot": "checkbox-group",
39
39
  ...props
40
40
  });
41
41
  }
42
42
  function CheckboxGroupItem({ className, ...props }) {
43
43
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.Item, {
44
- className: (0, tailwind_variants_namespaceObject.cn)('border-input text-primary-foreground hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-checked:aria-invalid:bg-destructive hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50', className),
44
+ className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
45
45
  "data-slot": "checkbox-group-item",
46
46
  ...props,
47
47
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(checkbox_group_cjs_namespaceObject.CheckboxGroupIndicator, {
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as CheckboxGroupPrimitive from '../primitives/checkbox-group';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as CheckboxGroupPrimitive from "../primitives/checkbox-group";
3
3
  type CheckboxGroupProps = ComponentProps<typeof CheckboxGroupPrimitive.Root>;
4
4
  declare function CheckboxGroup({ className, ...props }: CheckboxGroupProps): JSX.Element;
5
5
  type CheckboxGroupItemProps = ComponentProps<typeof CheckboxGroupPrimitive.Item>;
@@ -5,14 +5,14 @@ import { CheckIcon } from "lucide-react";
5
5
  import { CheckboxGroupIndicator, Item, Root } from "../primitives/checkbox-group.js";
6
6
  function CheckboxGroup({ className, ...props }) {
7
7
  return /*#__PURE__*/ jsx(Root, {
8
- className: cn('grid gap-2', className),
8
+ className: cn("grid gap-2", className),
9
9
  "data-slot": "checkbox-group",
10
10
  ...props
11
11
  });
12
12
  }
13
13
  function CheckboxGroupItem({ className, ...props }) {
14
14
  return /*#__PURE__*/ jsx(Item, {
15
- className: cn('border-input text-primary-foreground hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:aria-checked:ring-primary/20 dark:focus-visible:aria-checked:ring-primary/40 aria-checked:border-primary aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-checked:aria-invalid:bg-destructive hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50', className),
15
+ className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary focus-visible:aria-checked:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:focus-visible:aria-checked:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
16
16
  "data-slot": "checkbox-group-item",
17
17
  ...props,
18
18
  children: /*#__PURE__*/ jsx(CheckboxGroupIndicator, {
@@ -33,7 +33,7 @@ const react_checkbox_namespaceObject = require("@radix-ui/react-checkbox");
33
33
  const external_lucide_react_namespaceObject = require("lucide-react");
34
34
  function Checkbox({ className, ...props }) {
35
35
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Root, {
36
- className: (0, tailwind_variants_namespaceObject.cn)('border-input text-primary-foreground hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 aria-checked:focus-visible:ring-primary/20 dark:aria-checked:focus-visible:ring-primary/40 aria-checked:border-primary aria-checked:aria-invalid:bg-destructive aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50', className),
36
+ className: (0, tailwind_variants_namespaceObject.cn)("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary aria-checked:focus-visible:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:aria-checked:focus-visible:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
37
37
  "data-slot": "checkbox",
38
38
  ...props,
39
39
  children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_checkbox_namespaceObject.Indicator, {
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
3
  type CheckboxProps = ComponentProps<typeof CheckboxPrimitive.Root>;
4
4
  declare function Checkbox({ className, ...props }: CheckboxProps): JSX.Element;
5
5
  export { Checkbox };
@@ -5,7 +5,7 @@ import { Indicator, Root } from "@radix-ui/react-checkbox";
5
5
  import { CheckIcon } from "lucide-react";
6
6
  function Checkbox({ className, ...props }) {
7
7
  return /*#__PURE__*/ jsx(Root, {
8
- className: cn('border-input text-primary-foreground hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-ring/50 aria-checked:focus-visible:ring-primary/20 dark:aria-checked:focus-visible:ring-primary/40 aria-checked:border-primary aria-checked:aria-invalid:bg-destructive aria-checked:bg-primary aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 dark:bg-input/30 peer flex size-4 shrink-0 items-center justify-center rounded-sm border shadow-xs outline-hidden transition focus-visible:ring-3 disabled:opacity-50', className),
8
+ className: cn("peer flex size-4 shrink-0 items-center justify-center rounded-sm border border-input text-primary-foreground shadow-xs outline-hidden transition hover:not-disabled:not-aria-checked:border-ring/60 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50 aria-checked:border-primary aria-checked:bg-primary aria-checked:focus-visible:ring-primary/20 aria-invalid:border-destructive aria-invalid:ring-destructive/20 hover:not-disabled:not-aria-checked:aria-invalid:border-destructive/60 aria-checked:aria-invalid:bg-destructive dark:bg-input/30 dark:aria-checked:focus-visible:ring-primary/40 dark:aria-invalid:ring-destructive/40", className),
9
9
  "data-slot": "checkbox",
10
10
  ...props,
11
11
  children: /*#__PURE__*/ jsx(Indicator, {
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
3
3
  type CollapsibleProps = ComponentProps<typeof CollapsiblePrimitive.Root>;
4
4
  declare function Collapsible({ ...props }: CollapsibleProps): JSX.Element;
5
5
  type CollapsibleTriggerProps = ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>;
@@ -44,7 +44,7 @@ const external_lucide_react_namespaceObject = require("lucide-react");
44
44
  const external_dialog_cjs_namespaceObject = require("./dialog.cjs");
45
45
  function Command({ className, ...props }) {
46
46
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command, {
47
- className: (0, tailwind_variants_namespaceObject.cn)('bg-popover text-popover-foreground flex flex-col overflow-hidden rounded-[inherit] outline-hidden', className),
47
+ className: (0, tailwind_variants_namespaceObject.cn)("flex flex-col overflow-hidden rounded-[inherit] bg-popover text-popover-foreground outline-hidden", className),
48
48
  "data-slot": "command",
49
49
  ...props
50
50
  });
@@ -68,7 +68,7 @@ function CommandDialog({ children, ...props }) {
68
68
  ]
69
69
  }),
70
70
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Command, {
71
- className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
71
+ 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-input]]:h-12",
72
72
  children: children
73
73
  })
74
74
  ]
@@ -85,7 +85,7 @@ function CommandInput({ className, ...props }) {
85
85
  className: "size-4 shrink-0 opacity-50"
86
86
  }),
87
87
  /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Input, {
88
- className: (0, tailwind_variants_namespaceObject.cn)('placeholder:text-muted-foreground flex h-10 w-full text-base outline-hidden disabled:opacity-50 md:text-sm', className),
88
+ className: (0, tailwind_variants_namespaceObject.cn)("flex h-10 w-full text-base outline-hidden placeholder:text-muted-foreground disabled:opacity-50 md:text-sm", className),
89
89
  "data-slot": "command-input",
90
90
  ...props
91
91
  })
@@ -94,49 +94,49 @@ function CommandInput({ className, ...props }) {
94
94
  }
95
95
  function CommandList({ className, ...props }) {
96
96
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.List, {
97
- className: (0, tailwind_variants_namespaceObject.cn)('max-h-75 overflow-x-hidden overflow-y-auto', className),
97
+ className: (0, tailwind_variants_namespaceObject.cn)("max-h-75 overflow-x-hidden overflow-y-auto", className),
98
98
  "data-slot": "command-list",
99
99
  ...props
100
100
  });
101
101
  }
102
102
  function CommandEmpty({ className, ...props }) {
103
103
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Empty, {
104
- className: (0, tailwind_variants_namespaceObject.cn)('py-6 text-center text-sm', className),
104
+ className: (0, tailwind_variants_namespaceObject.cn)("py-6 text-center text-sm", className),
105
105
  "data-slot": "command-empty",
106
106
  ...props
107
107
  });
108
108
  }
109
109
  function CommandGroup({ className, ...props }) {
110
110
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Group, {
111
- className: (0, tailwind_variants_namespaceObject.cn)('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className),
111
+ className: (0, tailwind_variants_namespaceObject.cn)("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
112
112
  "data-slot": "command-group",
113
113
  ...props
114
114
  });
115
115
  }
116
116
  function CommandSeparator({ className, ...props }) {
117
117
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Separator, {
118
- className: (0, tailwind_variants_namespaceObject.cn)('bg-border -mx-1 h-px', className),
118
+ className: (0, tailwind_variants_namespaceObject.cn)("-mx-1 h-px bg-border", className),
119
119
  "data-slot": "command-separator",
120
120
  ...props
121
121
  });
122
122
  }
123
123
  function CommandItem({ className, ...props }) {
124
124
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Item, {
125
- className: (0, tailwind_variants_namespaceObject.cn)("aria-selected:bg-accent aria-selected:text-accent-foreground group/command-item [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
125
+ className: (0, tailwind_variants_namespaceObject.cn)("group/command-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className),
126
126
  "data-slot": "command-item",
127
127
  ...props
128
128
  });
129
129
  }
130
130
  function CommandLoading({ className, ...props }) {
131
131
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_cmdk_namespaceObject.Command.Loading, {
132
- className: (0, tailwind_variants_namespaceObject.cn)('flex justify-center p-2', className),
132
+ className: (0, tailwind_variants_namespaceObject.cn)("flex justify-center p-2", className),
133
133
  "data-slot": "command-loading",
134
134
  ...props
135
135
  });
136
136
  }
137
137
  function CommandShortcut({ className, ...props }) {
138
138
  return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
139
- className: (0, tailwind_variants_namespaceObject.cn)('text-muted-foreground ml-auto text-xs tracking-widest', className),
139
+ className: (0, tailwind_variants_namespaceObject.cn)("ml-auto text-xs tracking-widest text-muted-foreground", className),
140
140
  "data-slot": "command-shortcut",
141
141
  ...props
142
142
  });
@@ -1,6 +1,6 @@
1
- import type { ComponentProps, JSX } from 'react';
2
- import { Command as CommandPrimitive } from 'cmdk';
3
- import { Dialog } from './dialog';
1
+ import type { ComponentProps, JSX } from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "./dialog";
4
4
  type CommandProps = ComponentProps<typeof CommandPrimitive>;
5
5
  declare function Command({ className, ...props }: CommandProps): JSX.Element;
6
6
  type CommandDialogProps = ComponentProps<typeof Dialog>;
@@ -19,7 +19,7 @@ type CommandItemProps = ComponentProps<typeof CommandPrimitive.Item>;
19
19
  declare function CommandItem({ className, ...props }: CommandItemProps): JSX.Element;
20
20
  type CommandLoadingProps = ComponentProps<typeof CommandPrimitive.Loading>;
21
21
  declare function CommandLoading({ className, ...props }: CommandLoadingProps): JSX.Element;
22
- type CommandShortcutProps = ComponentProps<'span'>;
22
+ type CommandShortcutProps = ComponentProps<"span">;
23
23
  declare function CommandShortcut({ className, ...props }: CommandShortcutProps): JSX.Element;
24
24
  export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, };
25
25
  export type { CommandDialogProps, CommandEmptyProps, CommandGroupProps, CommandInputProps, CommandItemProps, CommandListProps, CommandLoadingProps, CommandProps, CommandSeparatorProps, CommandShortcutProps, };
@@ -7,7 +7,7 @@ import { SearchIcon } from "lucide-react";
7
7
  import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
8
8
  function command_Command({ className, ...props }) {
9
9
  return /*#__PURE__*/ jsx(Command, {
10
- className: cn('bg-popover text-popover-foreground flex flex-col overflow-hidden rounded-[inherit] outline-hidden', className),
10
+ className: cn("flex flex-col overflow-hidden rounded-[inherit] bg-popover text-popover-foreground outline-hidden", className),
11
11
  "data-slot": "command",
12
12
  ...props
13
13
  });
@@ -31,7 +31,7 @@ function CommandDialog({ children, ...props }) {
31
31
  ]
32
32
  }),
33
33
  /*#__PURE__*/ jsx(command_Command, {
34
- className: "[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input]]:h-12",
34
+ 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-input]]:h-12",
35
35
  children: children
36
36
  })
37
37
  ]
@@ -48,7 +48,7 @@ function CommandInput({ className, ...props }) {
48
48
  className: "size-4 shrink-0 opacity-50"
49
49
  }),
50
50
  /*#__PURE__*/ jsx(Command.Input, {
51
- className: cn('placeholder:text-muted-foreground flex h-10 w-full text-base outline-hidden disabled:opacity-50 md:text-sm', className),
51
+ className: cn("flex h-10 w-full text-base outline-hidden placeholder:text-muted-foreground disabled:opacity-50 md:text-sm", className),
52
52
  "data-slot": "command-input",
53
53
  ...props
54
54
  })
@@ -57,49 +57,49 @@ function CommandInput({ className, ...props }) {
57
57
  }
58
58
  function CommandList({ className, ...props }) {
59
59
  return /*#__PURE__*/ jsx(Command.List, {
60
- className: cn('max-h-75 overflow-x-hidden overflow-y-auto', className),
60
+ className: cn("max-h-75 overflow-x-hidden overflow-y-auto", className),
61
61
  "data-slot": "command-list",
62
62
  ...props
63
63
  });
64
64
  }
65
65
  function CommandEmpty({ className, ...props }) {
66
66
  return /*#__PURE__*/ jsx(Command.Empty, {
67
- className: cn('py-6 text-center text-sm', className),
67
+ className: cn("py-6 text-center text-sm", className),
68
68
  "data-slot": "command-empty",
69
69
  ...props
70
70
  });
71
71
  }
72
72
  function CommandGroup({ className, ...props }) {
73
73
  return /*#__PURE__*/ jsx(Command.Group, {
74
- className: cn('text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium', className),
74
+ className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className),
75
75
  "data-slot": "command-group",
76
76
  ...props
77
77
  });
78
78
  }
79
79
  function CommandSeparator({ className, ...props }) {
80
80
  return /*#__PURE__*/ jsx(Command.Separator, {
81
- className: cn('bg-border -mx-1 h-px', className),
81
+ className: cn("-mx-1 h-px bg-border", className),
82
82
  "data-slot": "command-separator",
83
83
  ...props
84
84
  });
85
85
  }
86
86
  function CommandItem({ className, ...props }) {
87
87
  return /*#__PURE__*/ jsx(Command.Item, {
88
- className: cn("aria-selected:bg-accent aria-selected:text-accent-foreground group/command-item [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
88
+ className: cn("group/command-item relative flex cursor-default items-center gap-x-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none aria-disabled:opacity-50 aria-selected:bg-accent aria-selected:text-accent-foreground [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className),
89
89
  "data-slot": "command-item",
90
90
  ...props
91
91
  });
92
92
  }
93
93
  function CommandLoading({ className, ...props }) {
94
94
  return /*#__PURE__*/ jsx(Command.Loading, {
95
- className: cn('flex justify-center p-2', className),
95
+ className: cn("flex justify-center p-2", className),
96
96
  "data-slot": "command-loading",
97
97
  ...props
98
98
  });
99
99
  }
100
100
  function CommandShortcut({ className, ...props }) {
101
101
  return /*#__PURE__*/ jsx("span", {
102
- className: cn('text-muted-foreground ml-auto text-xs tracking-widest', className),
102
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
103
103
  "data-slot": "command-shortcut",
104
104
  ...props
105
105
  });