@brightlocal/ui-components 3.0.0 → 3.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 (235) hide show
  1. package/README.md +7 -1
  2. package/component-meta.json +749 -53
  3. package/deprecations.json +114 -4
  4. package/dist/accordion.cjs +1 -1
  5. package/dist/accordion.d.ts +36 -0
  6. package/dist/accordion.d.ts.map +1 -1
  7. package/dist/accordion.js +74 -61
  8. package/dist/alert-dialog.cjs +1 -1
  9. package/dist/alert-dialog.d.ts +32 -3
  10. package/dist/alert-dialog.d.ts.map +1 -1
  11. package/dist/alert-dialog.js +61 -58
  12. package/dist/alert.cjs +1 -1
  13. package/dist/alert.d.ts.map +1 -1
  14. package/dist/alert.js +58 -57
  15. package/dist/badge.cjs +1 -1
  16. package/dist/badge.d.ts +9 -0
  17. package/dist/badge.d.ts.map +1 -1
  18. package/dist/badge.js +50 -30
  19. package/dist/banner.cjs +1 -0
  20. package/dist/banner.d.ts +81 -0
  21. package/dist/banner.d.ts.map +1 -0
  22. package/dist/banner.js +176 -0
  23. package/dist/blocks/empty-state.cjs +1 -1
  24. package/dist/blocks/empty-state.d.ts +4 -3
  25. package/dist/blocks/empty-state.d.ts.map +1 -1
  26. package/dist/blocks/empty-state.js +50 -57
  27. package/dist/blocks/progress-state.d.ts +2 -2
  28. package/dist/blocks/sidebar.cjs +1 -1
  29. package/dist/blocks/sidebar.d.ts +17 -0
  30. package/dist/blocks/sidebar.d.ts.map +1 -1
  31. package/dist/blocks/sidebar.js +8 -2
  32. package/dist/brand-illustration-motif.d.ts +1 -1
  33. package/dist/button-group.cjs +1 -0
  34. package/dist/button-group.d.ts +36 -0
  35. package/dist/button-group.d.ts.map +1 -0
  36. package/dist/button-group.js +47 -0
  37. package/dist/button.cjs +1 -1
  38. package/dist/button.js +1 -1
  39. package/dist/card.cjs +1 -1
  40. package/dist/card.d.ts +105 -7
  41. package/dist/card.d.ts.map +1 -1
  42. package/dist/card.js +198 -101
  43. package/dist/chart.cjs +3 -3
  44. package/dist/chart.d.ts +270 -24
  45. package/dist/chart.d.ts.map +1 -1
  46. package/dist/chart.js +497 -322
  47. package/dist/checkbox.cjs +1 -1
  48. package/dist/checkbox.d.ts +1 -1
  49. package/dist/checkbox.d.ts.map +1 -1
  50. package/dist/checkbox.js +2 -1
  51. package/dist/chip.cjs +1 -1
  52. package/dist/chip.d.ts +38 -4
  53. package/dist/chip.d.ts.map +1 -1
  54. package/dist/chip.js +95 -81
  55. package/dist/combobox.cjs +1 -1
  56. package/dist/combobox.js +2 -2
  57. package/dist/command.cjs +1 -1
  58. package/dist/command.d.ts +23 -1
  59. package/dist/command.d.ts.map +1 -1
  60. package/dist/command.js +251 -225
  61. package/dist/data-table.cjs +1 -1
  62. package/dist/data-table.d.ts +201 -23
  63. package/dist/data-table.d.ts.map +1 -1
  64. package/dist/data-table.js +712 -568
  65. package/dist/date-picker.cjs +1 -1
  66. package/dist/date-picker.d.ts +13 -5
  67. package/dist/date-picker.d.ts.map +1 -1
  68. package/dist/date-picker.js +54 -53
  69. package/dist/field.cjs +1 -1
  70. package/dist/field.d.ts +8 -1
  71. package/dist/field.d.ts.map +1 -1
  72. package/dist/field.js +79 -52
  73. package/dist/global-layout.cjs +1 -1
  74. package/dist/global-layout.d.ts +105 -13
  75. package/dist/global-layout.d.ts.map +1 -1
  76. package/dist/global-layout.js +146 -129
  77. package/dist/grid.d.ts +26 -3
  78. package/dist/grid.d.ts.map +1 -1
  79. package/dist/hooks/use-breakpoint.cjs +1 -1
  80. package/dist/hooks/use-breakpoint.d.ts +1 -1
  81. package/dist/hooks/use-breakpoint.d.ts.map +1 -1
  82. package/dist/hooks/use-breakpoint.js +1 -0
  83. package/dist/hooks/use-mobile.cjs +1 -0
  84. package/dist/hooks/use-mobile.js +8 -0
  85. package/dist/index.cjs +1 -1
  86. package/dist/index.d.ts +6 -0
  87. package/dist/index.d.ts.map +1 -1
  88. package/dist/index.js +594 -553
  89. package/dist/info-tooltip.cjs +1 -0
  90. package/dist/info-tooltip.d.ts +39 -0
  91. package/dist/info-tooltip.d.ts.map +1 -0
  92. package/dist/info-tooltip.js +41 -0
  93. package/dist/input-chip.cjs +1 -1
  94. package/dist/input-chip.js +1 -1
  95. package/dist/input-group.cjs +1 -1
  96. package/dist/input-group.d.ts +33 -2
  97. package/dist/input-group.d.ts.map +1 -1
  98. package/dist/input-group.js +167 -54
  99. package/dist/input-otp.cjs +1 -1
  100. package/dist/input-otp.js +9 -9
  101. package/dist/input-password.cjs +1 -1
  102. package/dist/input-password.d.ts +45 -15
  103. package/dist/input-password.d.ts.map +1 -1
  104. package/dist/input-password.js +31 -30
  105. package/dist/input.cjs +1 -1
  106. package/dist/input.js +10 -10
  107. package/dist/lib/block-illustration.cjs +1 -1
  108. package/dist/lib/block-illustration.d.ts +4 -1
  109. package/dist/lib/block-illustration.d.ts.map +1 -1
  110. package/dist/lib/block-illustration.js +12 -11
  111. package/dist/lib/empty-chip.cjs +1 -0
  112. package/dist/lib/empty-chip.d.ts +4 -0
  113. package/dist/lib/empty-chip.d.ts.map +1 -0
  114. package/dist/lib/empty-chip.js +13 -0
  115. package/dist/lib/utils.cjs +1 -1
  116. package/dist/lib/utils.d.ts.map +1 -1
  117. package/dist/lib/utils.js +4 -3
  118. package/dist/list.cjs +1 -1
  119. package/dist/list.js +1 -1
  120. package/dist/multi-select-filter.cjs +1 -0
  121. package/dist/multi-select-filter.d.ts +178 -0
  122. package/dist/multi-select-filter.d.ts.map +1 -0
  123. package/dist/multi-select-filter.js +463 -0
  124. package/dist/pagination.cjs +1 -1
  125. package/dist/pagination.d.ts +3 -0
  126. package/dist/pagination.d.ts.map +1 -1
  127. package/dist/pagination.js +57 -57
  128. package/dist/progress.cjs +1 -1
  129. package/dist/progress.d.ts +123 -16
  130. package/dist/progress.d.ts.map +1 -1
  131. package/dist/progress.js +89 -75
  132. package/dist/rating.cjs +1 -1
  133. package/dist/rating.js +18 -18
  134. package/dist/relative-date.cjs +1 -0
  135. package/dist/relative-date.d.ts +65 -0
  136. package/dist/relative-date.d.ts.map +1 -0
  137. package/dist/relative-date.js +128 -0
  138. package/dist/scroll-area.cjs +1 -1
  139. package/dist/scroll-area.d.ts +15 -6
  140. package/dist/scroll-area.d.ts.map +1 -1
  141. package/dist/scroll-area.js +38 -36
  142. package/dist/select.cjs +2 -2
  143. package/dist/select.d.ts +24 -3
  144. package/dist/select.d.ts.map +1 -1
  145. package/dist/select.js +130 -110
  146. package/dist/sheet.cjs +1 -1
  147. package/dist/sheet.d.ts +78 -2
  148. package/dist/sheet.d.ts.map +1 -1
  149. package/dist/sheet.js +192 -85
  150. package/dist/single-select-filter.cjs +1 -0
  151. package/dist/single-select-filter.d.ts +81 -0
  152. package/dist/single-select-filter.d.ts.map +1 -0
  153. package/dist/single-select-filter.js +226 -0
  154. package/dist/sonner.cjs +1 -1
  155. package/dist/sonner.d.ts.map +1 -1
  156. package/dist/sonner.js +22 -22
  157. package/dist/split-layout.cjs +1 -1
  158. package/dist/split-layout.d.ts +1 -1
  159. package/dist/split-layout.js +13 -13
  160. package/dist/table.cjs +1 -1
  161. package/dist/table.d.ts +45 -4
  162. package/dist/table.d.ts.map +1 -1
  163. package/dist/table.js +90 -73
  164. package/dist/tabs.cjs +1 -1
  165. package/dist/tabs.d.ts +12 -1
  166. package/dist/tabs.d.ts.map +1 -1
  167. package/dist/tabs.js +148 -126
  168. package/dist/textarea.cjs +1 -1
  169. package/dist/textarea.js +1 -1
  170. package/dist/tooltip.cjs +1 -1
  171. package/dist/tooltip.d.ts +38 -36
  172. package/dist/tooltip.d.ts.map +1 -1
  173. package/dist/tooltip.js +262 -73
  174. package/dist/typography-heading.cjs +1 -1
  175. package/dist/typography-heading.d.ts +13 -0
  176. package/dist/typography-heading.d.ts.map +1 -1
  177. package/dist/typography-heading.js +32 -21
  178. package/dist/typography-text.cjs +1 -1
  179. package/dist/typography-text.d.ts +15 -2
  180. package/dist/typography-text.d.ts.map +1 -1
  181. package/dist/typography-text.js +35 -24
  182. package/dist/typography.d.ts +1 -1
  183. package/package.json +5 -6
  184. package/src/blocks/empty-state.tsx +17 -24
  185. package/src/blocks/progress-state.tsx +2 -2
  186. package/src/blocks/sidebar.tsx +26 -2
  187. package/src/components/accordion.tsx +82 -27
  188. package/src/components/alert-dialog.tsx +50 -5
  189. package/src/components/alert.tsx +16 -8
  190. package/src/components/badge.tsx +40 -3
  191. package/src/components/banner.tsx +288 -0
  192. package/src/components/brand-illustration-motif.tsx +1 -1
  193. package/src/components/button-group.tsx +112 -0
  194. package/src/components/button.tsx +1 -1
  195. package/src/components/card.tsx +249 -27
  196. package/src/components/chart.tsx +586 -53
  197. package/src/components/checkbox.tsx +1 -1
  198. package/src/components/chip.tsx +83 -10
  199. package/src/components/combobox.tsx +2 -2
  200. package/src/components/command.tsx +56 -4
  201. package/src/components/data-table.tsx +842 -199
  202. package/src/components/date-picker.tsx +18 -7
  203. package/src/components/field.tsx +81 -12
  204. package/src/components/global-layout.tsx +176 -38
  205. package/src/components/grid.tsx +34 -3
  206. package/src/components/info-tooltip.tsx +94 -0
  207. package/src/components/input-chip.tsx +1 -1
  208. package/src/components/input-group.tsx +246 -11
  209. package/src/components/input-otp.tsx +1 -1
  210. package/src/components/input-password.tsx +56 -22
  211. package/src/components/input.tsx +1 -1
  212. package/src/components/list.tsx +1 -1
  213. package/src/components/multi-select-filter.tsx +912 -0
  214. package/src/components/pagination.tsx +10 -3
  215. package/src/components/progress.tsx +190 -31
  216. package/src/components/rating.tsx +1 -1
  217. package/src/components/relative-date.tsx +230 -0
  218. package/src/components/scroll-area.tsx +23 -10
  219. package/src/components/select.tsx +65 -11
  220. package/src/components/sheet.tsx +240 -4
  221. package/src/components/single-select-filter.tsx +443 -0
  222. package/src/components/sonner.tsx +16 -5
  223. package/src/components/split-layout.tsx +2 -2
  224. package/src/components/table.tsx +71 -11
  225. package/src/components/tabs.tsx +93 -46
  226. package/src/components/textarea.tsx +1 -1
  227. package/src/components/tooltip.tsx +440 -68
  228. package/src/components/typography-heading.tsx +24 -0
  229. package/src/components/typography-text.tsx +27 -3
  230. package/src/components/typography.tsx +1 -1
  231. package/src/hooks/use-breakpoint.ts +2 -1
  232. package/src/index.ts +6 -0
  233. package/src/lib/block-illustration.tsx +5 -1
  234. package/src/lib/empty-chip.ts +24 -0
  235. package/src/lib/utils.ts +1 -0
@@ -90,4 +90,4 @@ const Checkbox = React.forwardRef<HTMLButtonElement, CheckboxProps>(
90
90
 
91
91
  Checkbox.displayName = "Checkbox";
92
92
 
93
- export { Checkbox };
93
+ export { Checkbox, checkboxVariants };
@@ -18,6 +18,25 @@ import {
18
18
  */
19
19
  type ChipSize = "md" | "lg";
20
20
 
21
+ /**
22
+ * The event a chip removal hands to `onRemove`: a mouse event from the
23
+ * delete button, or a keyboard event from Backspace/Delete on the chip root.
24
+ */
25
+ type ChipRemoveEvent =
26
+ | React.MouseEvent<HTMLButtonElement>
27
+ | React.KeyboardEvent<HTMLDivElement>;
28
+
29
+ /**
30
+ * Removal callback. Declared with the bivariance hack — the same shape React
31
+ * uses for its own event handlers — so handlers annotated against the
32
+ * pre-keyboard, mouse-only contract
33
+ * (`(event: React.MouseEvent<HTMLButtonElement>) => void`) stay assignable
34
+ * under strict function-parameter checking (DS-949).
35
+ */
36
+ type ChipRemoveHandler = {
37
+ bivarianceHack(event: ChipRemoveEvent): void;
38
+ }["bivarianceHack"];
39
+
21
40
  const chipVariants = cva(
22
41
  [
23
42
  // Base styles
@@ -39,7 +58,7 @@ const chipVariants = cva(
39
58
  // Hover state
40
59
  "hover:bg-secondary/80",
41
60
  // Focus state - direct focus on chip (for keyboard navigation)
42
- "focus:outline-none",
61
+ "outline-none",
43
62
  "focus-visible:shadow-default",
44
63
  // Disabled state
45
64
  "disabled:pointer-events-none",
@@ -119,9 +138,10 @@ interface ChipProps extends Omit<React.ComponentProps<"div">, "children"> {
119
138
  */
120
139
  disabled?: boolean;
121
140
  /**
122
- * Callback when delete button is clicked
141
+ * Callback when the chip is removed — via the delete button (click) or
142
+ * the keyboard (Backspace/Delete while the chip is focused).
123
143
  */
124
- onRemove?: (event: React.MouseEvent<HTMLButtonElement>) => void;
144
+ onRemove?: ChipRemoveHandler;
125
145
  /**
126
146
  * Data hook for automated testing (required)
127
147
  */
@@ -146,15 +166,33 @@ interface ChipProps extends Omit<React.ComponentProps<"div">, "children"> {
146
166
  loadingLabel?: string;
147
167
  /**
148
168
  * Accessible label for the remove button.
149
- * Supports `{name}` placeholder for interpolation.
169
+ * Supports `{name}` placeholder for interpolation. The default `{name}` is
170
+ * derived from string or number children; for a JSX label, pass this prop
171
+ * with the resolved name.
150
172
  * @default "Remove {name}"
151
173
  */
152
174
  removeAriaLabel?: string;
175
+ /**
176
+ * Accessible label for the chip itself while it is keyboard-removable
177
+ * (focusable, with the Backspace/Delete removal hint).
178
+ * Supports `{name}` placeholder for interpolation. The default `{name}` is
179
+ * derived from string or number children; for a JSX label, pass this prop
180
+ * with the resolved name.
181
+ * @default "{name}, press Delete to remove"
182
+ */
183
+ removableAriaLabel?: string;
153
184
  }
154
185
 
155
186
  /**
156
187
  * Chip component for displaying removable tags or selections.
157
188
  * Used for filter selections, tag lists, and multi-select values.
189
+ *
190
+ * A removable chip is a single tab stop: the chip itself takes focus and
191
+ * Backspace/Delete removes it (DS-949). The delete button stays mouse-only
192
+ * (`tabIndex={-1}`) so each chip costs one tab stop, not two. When a removal
193
+ * unmounts the focused chip, the consumer hands focus onward per the
194
+ * Filtering pattern's cascade: source control → filter trigger → results
195
+ * region — never `<body>`.
158
196
  */
159
197
  const Chip = React.forwardRef<HTMLDivElement, ChipProps>(
160
198
  (
@@ -171,12 +209,32 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(
171
209
  maxWidth = 200,
172
210
  loadingLabel,
173
211
  removeAriaLabel,
212
+ removableAriaLabel,
213
+ onKeyDown,
174
214
  ...props
175
215
  },
176
216
  ref
177
217
  ) => {
178
218
  const isDisabled = disabled || loading;
179
219
  const iconSize = size === "lg" ? 16 : 14;
220
+ // The {name} fallback is derived from plain-text children only; a JSX
221
+ // label must supply removeAriaLabel/removableAriaLabel itself.
222
+ const chipName =
223
+ typeof children === "string" || typeof children === "number"
224
+ ? String(children)
225
+ : "chip";
226
+ const removable = onRemove !== undefined && !isDisabled;
227
+
228
+ const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {
229
+ onKeyDown?.(event);
230
+ // A composing parent (InputChip's roving focus) that already handled
231
+ // the key marks it consumed via preventDefault.
232
+ if (event.defaultPrevented || !removable) return;
233
+ if (event.key === "Backspace" || event.key === "Delete") {
234
+ event.preventDefault();
235
+ onRemove(event);
236
+ }
237
+ };
180
238
  const labelRef = React.useRef<HTMLSpanElement>(null);
181
239
  const [isTruncated, setIsTruncated] = React.useState(false);
182
240
 
@@ -206,14 +264,32 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(
206
264
  );
207
265
 
208
266
  return (
267
+ /* Keyboard removal lives on the chip root: when removable it carries
268
+ role="group" and tabIndex=0 below — the rule can't see the
269
+ conditional role. */
270
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
209
271
  <div
210
272
  ref={ref}
211
273
  aria-disabled={isDisabled ? "true" : undefined}
274
+ // Keyboard-removable chips are focusable and announce the removal
275
+ // hint. A composing parent (InputChip) overrides all three via
276
+ // props — the spread below wins.
277
+ aria-label={
278
+ removable
279
+ ? (removableAriaLabel ?? "{name}, press Delete to remove").replace(
280
+ "{name}",
281
+ chipName
282
+ )
283
+ : undefined
284
+ }
212
285
  className={cn(chipVariants({ size }), className)}
213
286
  data-hook={dataHook}
214
287
  data-slot="chip"
215
288
  data-tracking-el={trackingEl}
216
289
  data-tracking-label={trackingLabel}
290
+ role={removable ? "group" : undefined}
291
+ tabIndex={removable ? 0 : undefined}
292
+ onKeyDown={handleKeyDown}
217
293
  {...props}
218
294
  >
219
295
  {isTruncated ? (
@@ -241,11 +317,8 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(
241
317
  <button
242
318
  aria-label={
243
319
  removeAriaLabel
244
- ? removeAriaLabel.replace(
245
- "{name}",
246
- typeof children === "string" ? children : "chip"
247
- )
248
- : `Remove ${typeof children === "string" ? children : "chip"}`
320
+ ? removeAriaLabel.replace("{name}", chipName)
321
+ : `Remove ${chipName}`
249
322
  }
250
323
  className={cn(chipDeleteButtonVariants({ size }))}
251
324
  data-slot="chip-delete"
@@ -266,4 +339,4 @@ const Chip = React.forwardRef<HTMLDivElement, ChipProps>(
266
339
  Chip.displayName = "Chip";
267
340
 
268
341
  export { Chip, chipVariants };
269
- export type { ChipProps, ChipSize };
342
+ export type { ChipProps, ChipRemoveEvent, ChipRemoveHandler, ChipSize };
@@ -384,7 +384,7 @@ const comboboxTriggerVariants = cva([
384
384
  "dark:bg-white/5 dark:border-white/15",
385
385
 
386
386
  // Typography
387
- "text-body text-foreground",
387
+ "text-field text-foreground",
388
388
 
389
389
  // Placeholder state
390
390
  "data-[placeholder=true]:text-muted-foreground",
@@ -620,7 +620,7 @@ function ComboboxValue<T>({
620
620
  return (
621
621
  <span
622
622
  className={cn(
623
- "text-body overflow-hidden text-ellipsis whitespace-nowrap",
623
+ "text-field overflow-hidden text-ellipsis whitespace-nowrap",
624
624
  className
625
625
  )}
626
626
  data-slot="combobox-value"
@@ -10,6 +10,8 @@ import { Button } from "@brightlocal/ui-components/button";
10
10
  import { cn } from "@brightlocal/ui-components/lib/utils";
11
11
  import { useDevWarning } from "@brightlocal/ui-components/lib/use-dev-warning";
12
12
 
13
+ import { emptyChipStyles } from "../lib/empty-chip";
14
+
13
15
  /* -------------------------------------------------------------------------------------------------
14
16
  * Command Context — shared state between CommandInput and CommandVirtualList
15
17
  * -----------------------------------------------------------------------------------------------*/
@@ -249,7 +251,7 @@ const CommandInput = React.forwardRef<
249
251
  <CommandPrimitive.Input
250
252
  ref={inputRef}
251
253
  className={cn(
252
- "placeholder:text-muted-foreground text-body flex w-full bg-transparent outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
254
+ "placeholder:text-muted-foreground text-field flex w-full bg-transparent outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
253
255
  className
254
256
  )}
255
257
  data-slot="command-input"
@@ -328,15 +330,37 @@ export interface CommandEmptyProps extends React.ComponentProps<
328
330
  * Data hook for automated testing
329
331
  */
330
332
  dataHook?: string;
333
+ /**
334
+ * Icon shown in the muted chip above the message — the same chip as
335
+ * EmptyState, so the popover form matches the card and page forms
336
+ * (Patterns/Empty States). Decorative; the message carries the state.
337
+ */
338
+ icon?: React.ReactNode;
339
+ /**
340
+ * One quiet muted line under the message, e.g. "Try a different search."
341
+ */
342
+ description?: React.ReactNode;
331
343
  }
332
344
 
333
345
  /**
334
- * Empty state displayed when no results are found.
346
+ * Empty state displayed when no results are found. Plain `children` render
347
+ * the one-line form; pass `icon` and/or `description` for the compact form
348
+ * the Empty States pattern uses at popover scope — never hand-roll it.
349
+ *
350
+ * @example
351
+ * ```tsx
352
+ * <CommandEmpty
353
+ * description="Try a different search."
354
+ * icon={<SearchX />}
355
+ * >
356
+ * No locations match “{search}”
357
+ * </CommandEmpty>
358
+ * ```
335
359
  */
336
360
  const CommandEmpty = React.forwardRef<
337
361
  React.ComponentRef<typeof CommandPrimitive.Empty>,
338
362
  CommandEmptyProps
339
- >(({ dataHook, ...props }, ref) => {
363
+ >(({ children, dataHook, description, icon, ...props }, ref) => {
340
364
  // cmdk hardcodes role="presentation" after spreading props, so we
341
365
  // override it via a callback ref to satisfy the listbox a11y contract
342
366
  // (role="listbox" requires option or group children).
@@ -358,7 +382,35 @@ const CommandEmpty = React.forwardRef<
358
382
  data-hook={dataHook}
359
383
  data-slot="command-empty"
360
384
  {...props}
361
- />
385
+ >
386
+ {icon || description ? (
387
+ /* The compact form. Inside role="option" the content is
388
+ presentational, so the message stays a plain line — never a
389
+ heading — and the chip is aria-hidden. */
390
+ <div className="flex flex-col items-center gap-1 px-4">
391
+ {icon ? (
392
+ <span
393
+ aria-hidden="true"
394
+ className={cn(emptyChipStyles(), "mb-1")}
395
+ data-slot="command-empty-icon"
396
+ >
397
+ {icon}
398
+ </span>
399
+ ) : null}
400
+ <p data-slot="command-empty-message">{children}</p>
401
+ {description ? (
402
+ <p
403
+ className="text-muted-foreground"
404
+ data-slot="command-empty-description"
405
+ >
406
+ {description}
407
+ </p>
408
+ ) : null}
409
+ </div>
410
+ ) : (
411
+ children
412
+ )}
413
+ </CommandPrimitive.Empty>
362
414
  );
363
415
  });
364
416
  CommandEmpty.displayName = "CommandEmpty";