@kinetixui/ui 0.6.4 → 0.7.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 (46) hide show
  1. package/dist/index.d.ts +11 -1
  2. package/dist/index.js +395 -380
  3. package/package.json +2 -2
  4. package/src/components/accordion.tsx +1 -1
  5. package/src/components/alert-dialog.tsx +2 -2
  6. package/src/components/app-bar.tsx +1 -1
  7. package/src/components/audio-player.tsx +3 -0
  8. package/src/components/badge.tsx +13 -4
  9. package/src/components/button.tsx +2 -2
  10. package/src/components/calendar.tsx +9 -5
  11. package/src/components/checkbox.tsx +1 -1
  12. package/src/components/circular-progress.tsx +1 -1
  13. package/src/components/command.tsx +4 -2
  14. package/src/components/context-menu.tsx +2 -2
  15. package/src/components/dialog.tsx +3 -3
  16. package/src/components/drawer.tsx +2 -2
  17. package/src/components/dropdown-menu.tsx +4 -2
  18. package/src/components/fab.tsx +1 -1
  19. package/src/components/file-upload.tsx +1 -1
  20. package/src/components/hover-card.tsx +1 -1
  21. package/src/components/image.tsx +2 -2
  22. package/src/components/inform.tsx +1 -1
  23. package/src/components/input-group.tsx +2 -2
  24. package/src/components/input-otp.tsx +3 -3
  25. package/src/components/input.tsx +2 -2
  26. package/src/components/label.tsx +1 -1
  27. package/src/components/list.tsx +1 -1
  28. package/src/components/menubar.tsx +2 -2
  29. package/src/components/modal.tsx +2 -2
  30. package/src/components/navigation-menu.tsx +4 -4
  31. package/src/components/number-input.tsx +3 -3
  32. package/src/components/popover.tsx +1 -1
  33. package/src/components/radio-group.tsx +1 -1
  34. package/src/components/resizable.tsx +1 -1
  35. package/src/components/select.tsx +5 -3
  36. package/src/components/sheet.tsx +3 -3
  37. package/src/components/sidebar.tsx +5 -5
  38. package/src/components/slider.tsx +1 -1
  39. package/src/components/switch.tsx +1 -1
  40. package/src/components/tabs.tsx +1 -1
  41. package/src/components/tag.tsx +27 -15
  42. package/src/components/textarea.tsx +2 -2
  43. package/src/components/toggle.tsx +1 -1
  44. package/src/components/tooltip.tsx +1 -1
  45. package/src/components-behavior.test.tsx +37 -0
  46. package/tailwind.config.ts +29 -0
package/dist/index.d.ts CHANGED
@@ -162,8 +162,11 @@ declare const badgeVariants: (props?: ({
162
162
  variant?: "default" | "destructive" | "secondary" | "outline" | "subtle" | null | undefined;
163
163
  } & class_variance_authority_types.ClassProp) | undefined) => string;
164
164
  interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
165
+ /** render as the single child element (Radix Slot) instead of <div> —
166
+ * e.g. `<Badge asChild><a href="/new">New</a></Badge>` for a linked badge */
167
+ asChild?: boolean;
165
168
  }
166
- declare function Badge({ className, variant, ...props }: BadgeProps): React$1.JSX.Element;
169
+ declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLDivElement>>;
167
170
 
168
171
  declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & React$1.RefAttributes<HTMLElement>>;
169
172
  declare const BreadcrumbList: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
@@ -390,6 +393,13 @@ declare const tagVariants: (props?: ({
390
393
  interface TagProps extends React$1.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof tagVariants> {
391
394
  /** show a dismiss button; called when it's clicked */
392
395
  onRemove?: () => void;
396
+ /** render as the single child element (Radix Slot) instead of <span> —
397
+ * e.g. `<Tag asChild><a href="/filter">Active</a></Tag>` for a linked tag.
398
+ * Combined with `onRemove`, the remove button nests inside the slotted
399
+ * element (Slot can only render one root node) — fine for a <div>/<span>,
400
+ * but avoid pairing asChild+onRemove with an <a>, since a nested <button>
401
+ * inside an anchor is invalid HTML. */
402
+ asChild?: boolean;
393
403
  }
394
404
  declare const Tag: React$1.ForwardRefExoticComponent<TagProps & React$1.RefAttributes<HTMLSpanElement>>;
395
405