@fabio.caffarello/react-design-system 3.13.0 → 4.0.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 (150) hide show
  1. package/dist/granular/ui/components/Autocomplete/Autocomplete.js +103 -86
  2. package/dist/granular/ui/components/Autocomplete/Autocomplete.js.map +1 -1
  3. package/dist/granular/ui/components/Autocomplete/AutocompleteList.js +57 -47
  4. package/dist/granular/ui/components/Autocomplete/AutocompleteList.js.map +1 -1
  5. package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js +21 -20
  6. package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js.map +1 -1
  7. package/dist/granular/ui/components/Breadcrumb/Breadcrumb.js.map +1 -1
  8. package/dist/granular/ui/components/ColorPicker/ColorPicker.js.map +1 -1
  9. package/dist/granular/ui/components/CommandPalette/CommandPalette.js +187 -149
  10. package/dist/granular/ui/components/CommandPalette/CommandPalette.js.map +1 -1
  11. package/dist/granular/ui/components/DataGrid/DataGrid.js +92 -92
  12. package/dist/granular/ui/components/DataGrid/DataGrid.js.map +1 -1
  13. package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js +154 -139
  14. package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js.map +1 -1
  15. package/dist/granular/ui/components/Dialog/AlertDialog.js +73 -40
  16. package/dist/granular/ui/components/Dialog/AlertDialog.js.map +1 -1
  17. package/dist/granular/ui/components/Dialog/DialogContent.js +54 -48
  18. package/dist/granular/ui/components/Dialog/DialogContent.js.map +1 -1
  19. package/dist/granular/ui/components/Dialog/DialogDescription.js +31 -31
  20. package/dist/granular/ui/components/Dialog/DialogDescription.js.map +1 -1
  21. package/dist/granular/ui/components/Dialog/DialogTitle.js +30 -30
  22. package/dist/granular/ui/components/Dialog/DialogTitle.js.map +1 -1
  23. package/dist/granular/ui/components/Drawer/Drawer.js.map +1 -1
  24. package/dist/granular/ui/components/Dropdown/Dropdown.js.map +1 -1
  25. package/dist/granular/ui/components/EmptyState/EmptyState.js.map +1 -1
  26. package/dist/granular/ui/components/FileUpload/FileUpload.js.map +1 -1
  27. package/dist/granular/ui/components/Form/Form.js +38 -37
  28. package/dist/granular/ui/components/Form/Form.js.map +1 -1
  29. package/dist/granular/ui/components/Form/FormField.js +28 -26
  30. package/dist/granular/ui/components/Form/FormField.js.map +1 -1
  31. package/dist/granular/ui/components/Header/Header.js.map +1 -1
  32. package/dist/granular/ui/components/Header/components/HeaderActions.js.map +1 -1
  33. package/dist/granular/ui/components/Header/components/HeaderHamburger.js.map +1 -1
  34. package/dist/granular/ui/components/Header/components/HeaderLogo.js.map +1 -1
  35. package/dist/granular/ui/components/Header/components/HeaderMobileMenu.js.map +1 -1
  36. package/dist/granular/ui/components/Header/components/HeaderNavigation.js.map +1 -1
  37. package/dist/granular/ui/components/Header/contexts/HeaderContext.js.map +1 -1
  38. package/dist/granular/ui/components/Menu/Menu.js.map +1 -1
  39. package/dist/granular/ui/components/Modal/Modal.js +98 -86
  40. package/dist/granular/ui/components/Modal/Modal.js.map +1 -1
  41. package/dist/granular/ui/components/MultiSelect/MultiSelect.js +122 -106
  42. package/dist/granular/ui/components/MultiSelect/MultiSelect.js.map +1 -1
  43. package/dist/granular/ui/components/Navigation/Navigation.js.map +1 -1
  44. package/dist/granular/ui/components/PageHeader/PageHeader.js.map +1 -1
  45. package/dist/granular/ui/components/Pagination/Pagination.js.map +1 -1
  46. package/dist/granular/ui/components/Popover/Popover.js.map +1 -1
  47. package/dist/granular/ui/components/Rating/Rating.js.map +1 -1
  48. package/dist/granular/ui/components/SearchInput/SearchInput.js.map +1 -1
  49. package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js +82 -64
  50. package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js.map +1 -1
  51. package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js +30 -29
  52. package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js.map +1 -1
  53. package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js +37 -35
  54. package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js.map +1 -1
  55. package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js +57 -57
  56. package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js.map +1 -1
  57. package/dist/granular/ui/components/Stepper/Stepper.js +102 -94
  58. package/dist/granular/ui/components/Stepper/Stepper.js.map +1 -1
  59. package/dist/granular/ui/components/Table/Table.js +41 -35
  60. package/dist/granular/ui/components/Table/Table.js.map +1 -1
  61. package/dist/granular/ui/components/Table/TableActions/TableActions.js.map +1 -1
  62. package/dist/granular/ui/components/Table/TableFilters/TableFilters.js +49 -46
  63. package/dist/granular/ui/components/Table/TableFilters/TableFilters.js.map +1 -1
  64. package/dist/granular/ui/components/Table/TablePagination/TablePagination.js.map +1 -1
  65. package/dist/granular/ui/components/Table/TableProvider.js +82 -80
  66. package/dist/granular/ui/components/Table/TableProvider.js.map +1 -1
  67. package/dist/granular/ui/components/Table/TableRow.js +57 -53
  68. package/dist/granular/ui/components/Table/TableRow.js.map +1 -1
  69. package/dist/granular/ui/components/Table/useColumnResizing.js +53 -53
  70. package/dist/granular/ui/components/Table/useColumnResizing.js.map +1 -1
  71. package/dist/granular/ui/components/TimePicker/TimePicker.js +149 -103
  72. package/dist/granular/ui/components/TimePicker/TimePicker.js.map +1 -1
  73. package/dist/granular/ui/components/Timeline/Timeline.js.map +1 -1
  74. package/dist/granular/ui/hooks/useFocusRestore.js +14 -15
  75. package/dist/granular/ui/hooks/useFocusRestore.js.map +1 -1
  76. package/dist/granular/ui/primitives/Badge/Badge.js.map +1 -1
  77. package/dist/granular/ui/primitives/Checkbox/Checkbox.js.map +1 -1
  78. package/dist/granular/ui/primitives/Chip/Chip.js +91 -71
  79. package/dist/granular/ui/primitives/Chip/Chip.js.map +1 -1
  80. package/dist/granular/ui/primitives/ErrorMessage/ErrorMessage.js.map +1 -1
  81. package/dist/granular/ui/primitives/Input/Input.js.map +1 -1
  82. package/dist/granular/ui/primitives/Label/Label.js.map +1 -1
  83. package/dist/granular/ui/primitives/NavLink/NavLink.js.map +1 -1
  84. package/dist/granular/ui/primitives/Radio/Radio.js.map +1 -1
  85. package/dist/granular/ui/primitives/Select/Select.js.map +1 -1
  86. package/dist/granular/ui/primitives/Separator/Separator.js.map +1 -1
  87. package/dist/granular/ui/primitives/Skeleton/Skeleton.js.map +1 -1
  88. package/dist/granular/ui/primitives/Slider/Slider.js.map +1 -1
  89. package/dist/granular/ui/primitives/Spinner/Spinner.js.map +1 -1
  90. package/dist/granular/ui/primitives/Switch/Switch.js.map +1 -1
  91. package/dist/granular/ui/primitives/Tooltip/Tooltip.js.map +1 -1
  92. package/dist/granular/ui/providers/DialogContext.js.map +1 -1
  93. package/dist/granular/ui/providers/DialogProvider.js +24 -20
  94. package/dist/granular/ui/providers/DialogProvider.js.map +1 -1
  95. package/dist/index.cjs +144 -144
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.js +5780 -5486
  98. package/dist/index.js.map +1 -1
  99. package/dist/react-design-system.css +1 -1
  100. package/dist/server/index.cjs +7 -7
  101. package/dist/server/index.cjs.map +1 -1
  102. package/dist/server/index.js +404 -384
  103. package/dist/server/index.js.map +1 -1
  104. package/dist/ui/components/Autocomplete/AutocompleteList.d.ts +4 -0
  105. package/dist/ui/components/Autocomplete/AutocompleteOption.d.ts +8 -0
  106. package/dist/ui/components/Breadcrumb/Breadcrumb.d.ts +0 -1
  107. package/dist/ui/components/ColorPicker/ColorPicker.d.ts +0 -1
  108. package/dist/ui/components/CommandPalette/CommandPalette.d.ts +0 -1
  109. package/dist/ui/components/DataGrid/DataGrid.d.ts +0 -1
  110. package/dist/ui/components/Dialog/DialogContent.d.ts +20 -1
  111. package/dist/ui/components/Drawer/Drawer.d.ts +0 -1
  112. package/dist/ui/components/Dropdown/Dropdown.d.ts +0 -1
  113. package/dist/ui/components/EmptyState/EmptyState.d.ts +0 -1
  114. package/dist/ui/components/FileUpload/FileUpload.d.ts +0 -1
  115. package/dist/ui/components/Form/FormField.d.ts +7 -0
  116. package/dist/ui/components/Header/Header.d.ts +1 -1
  117. package/dist/ui/components/Header/components/HeaderActions.d.ts +1 -1
  118. package/dist/ui/components/Header/components/HeaderHamburger.d.ts +1 -1
  119. package/dist/ui/components/Header/components/HeaderLogo.d.ts +1 -1
  120. package/dist/ui/components/Header/components/HeaderMobileMenu.d.ts +1 -1
  121. package/dist/ui/components/Header/components/HeaderNavigation.d.ts +1 -1
  122. package/dist/ui/components/Header/contexts/HeaderContext.d.ts +1 -1
  123. package/dist/ui/components/Menu/Menu.d.ts +0 -1
  124. package/dist/ui/components/Modal/Modal.d.ts +1 -2
  125. package/dist/ui/components/Navigation/Navigation.d.ts +1 -1
  126. package/dist/ui/components/PageHeader/PageHeader.d.ts +1 -1
  127. package/dist/ui/components/Pagination/Pagination.d.ts +0 -1
  128. package/dist/ui/components/Popover/Popover.d.ts +0 -1
  129. package/dist/ui/components/Rating/Rating.d.ts +0 -1
  130. package/dist/ui/components/SearchInput/SearchInput.d.ts +0 -1
  131. package/dist/ui/components/Stepper/Stepper.d.ts +0 -1
  132. package/dist/ui/components/Table/TableActions/TableActions.d.ts +0 -1
  133. package/dist/ui/components/Table/TableFilters/TableFilters.d.ts +0 -1
  134. package/dist/ui/components/Table/TablePagination/TablePagination.d.ts +0 -1
  135. package/dist/ui/components/TimePicker/TimePicker.d.ts +0 -1
  136. package/dist/ui/components/Timeline/Timeline.d.ts +0 -1
  137. package/dist/ui/primitives/Checkbox/Checkbox.d.ts +0 -1
  138. package/dist/ui/primitives/Chip/Chip.d.ts +21 -0
  139. package/dist/ui/primitives/ErrorMessage/ErrorMessage.d.ts +0 -1
  140. package/dist/ui/primitives/Input/Input.d.ts +0 -1
  141. package/dist/ui/primitives/Label/Label.d.ts +0 -1
  142. package/dist/ui/primitives/NavLink/NavLink.d.ts +1 -1
  143. package/dist/ui/primitives/Radio/Radio.d.ts +0 -1
  144. package/dist/ui/primitives/Select/Select.d.ts +0 -1
  145. package/dist/ui/primitives/Skeleton/Skeleton.d.ts +0 -1
  146. package/dist/ui/primitives/Slider/Slider.d.ts +0 -1
  147. package/dist/ui/primitives/Switch/Switch.d.ts +0 -1
  148. package/dist/ui/primitives/Tooltip/Tooltip.d.ts +0 -1
  149. package/dist/ui/providers/DialogContext.d.ts +8 -0
  150. package/package.json +7 -7
@@ -10,6 +10,10 @@ export interface AutocompleteListProps {
10
10
  allSelected?: boolean;
11
11
  onSelectAll?: () => void;
12
12
  onDeselectAll?: () => void;
13
+ /** listbox id; option ids are derived as `${id}-option-${index}`. */
14
+ id?: string;
15
+ /** Multi-select: values currently selected, to drive aria-selected. */
16
+ selectedValues?: string[];
13
17
  /**
14
18
  * Accessible name for the listbox. axe `aria-input-field-name`
15
19
  * (serious) flags a `role="listbox"` portal without `aria-label` /
@@ -10,6 +10,14 @@ export interface AutocompleteOptionProps {
10
10
  option: AutocompleteOptionType;
11
11
  isHighlighted: boolean;
12
12
  onSelect: (option: AutocompleteOptionType) => void;
13
+ /** Stable id so the combobox input can point aria-activedescendant here. */
14
+ id?: string;
15
+ /**
16
+ * Selection state for multi-select usage. When provided it drives
17
+ * aria-selected; otherwise aria-selected reflects the highlight (the
18
+ * single-select activedescendant model).
19
+ */
20
+ selected?: boolean;
13
21
  }
14
22
  /**
15
23
  * AutocompleteOption Component
@@ -11,7 +11,6 @@ interface Props extends HTMLAttributes<HTMLElement> {
11
11
  * Breadcrumb Component
12
12
  *
13
13
  * A breadcrumb navigation component for hierarchical navigation.
14
- * Follows Atomic Design principles as a Molecule component.
15
14
  *
16
15
  * @example
17
16
  * ```tsx
@@ -15,7 +15,6 @@ export interface ColorPickerProps {
15
15
  *
16
16
  * A color picker component for selecting colors.
17
17
  * Supports hex, rgb, and hsl formats with presets.
18
- * Follows Atomic Design principles as a Molecule component.
19
18
  *
20
19
  * @example
21
20
  * ```tsx
@@ -22,7 +22,6 @@ export interface CommandPaletteProps {
22
22
  *
23
23
  * A command palette component for quick command search and execution.
24
24
  * Supports keyboard navigation, grouping, and filtering.
25
- * Follows Atomic Design principles as an Organism component.
26
25
  *
27
26
  * @example
28
27
  * ```tsx
@@ -91,7 +91,6 @@ export interface DataGridProps<T extends Record<string, unknown> = Record<string
91
91
  *
92
92
  * An advanced data grid component with sorting, filtering, grouping, column management, and export.
93
93
  * Extends the Table component with additional enterprise features.
94
- * Follows Atomic Design principles as an Organism component.
95
94
  *
96
95
  * @example
97
96
  * ```tsx
@@ -4,5 +4,24 @@ export interface DialogContentProps extends Omit<HTMLAttributes<HTMLDivElement>,
4
4
  size?: "sm" | "md" | "lg" | "xl" | "fullscreen";
5
5
  closeOnOverlayClick?: boolean;
6
6
  closeOnEscape?: boolean;
7
+ /**
8
+ * Render the built-in close (✕) button in the top-right corner.
9
+ *
10
+ * Defaults to `true`, matching `Modal` and the house overlay
11
+ * convention (`Drawer` / `Popover` expose the same prop). Set `false`
12
+ * for **non-dismissable** dialogs where the consumer owns dismissal —
13
+ * LGPD consent gates, destructive confirmations with escalating
14
+ * friction, or guided wizards where a stray ✕ would abandon the flow.
15
+ *
16
+ * When `true`, do NOT also place an explicit `<Dialog.Close />` inside
17
+ * the content: that compound is for *custom placement* (e.g. a close
18
+ * affordance inside the footer) and would render a duplicate ✕. Use
19
+ * one or the other.
20
+ *
21
+ * Suppressing the ✕ only removes the button — ESC and overlay-click
22
+ * still close. For a fully non-dismissable dialog, pair this with
23
+ * `closeOnEscape={false}` and `closeOnOverlayClick={false}`.
24
+ */
25
+ showCloseButton?: boolean;
7
26
  }
8
- export declare function DialogContent({ children, size, closeOnOverlayClick, closeOnEscape, className, ...props }: DialogContentProps): import("react").JSX.Element | null;
27
+ export declare function DialogContent({ children, size, closeOnOverlayClick, closeOnEscape, showCloseButton, className, ...props }: DialogContentProps): import("react").JSX.Element | null;
@@ -17,7 +17,6 @@ export interface DrawerProps {
17
17
  * Drawer Component
18
18
  *
19
19
  * A side drawer component that slides in from different positions.
20
- * Follows Atomic Design principles as an Atom component.
21
20
  * Uses Compound Component pattern.
22
21
  *
23
22
  * @example
@@ -17,7 +17,6 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
17
17
  * Dropdown Component
18
18
  *
19
19
  * A dropdown menu component for displaying actions and options.
20
- * Follows Atomic Design principles as a Molecule component.
21
20
  *
22
21
  * @example
23
22
  * ```tsx
@@ -11,7 +11,6 @@ export interface EmptyStateProps extends HTMLAttributes<HTMLDivElement> {
11
11
  * EmptyState Component
12
12
  *
13
13
  * A component for displaying empty states when there's no content to show.
14
- * Follows Atomic Design principles as a Molecule component.
15
14
  *
16
15
  * @example
17
16
  * ```tsx
@@ -23,7 +23,6 @@ export interface FileUploadProps {
23
23
  * FileUpload Component
24
24
  *
25
25
  * A file upload component with drag and drop, preview, validation, and progress.
26
- * Follows Atomic Design principles as a Molecule component.
27
26
  *
28
27
  * @example
29
28
  * ```tsx
@@ -6,6 +6,13 @@ export interface FormFieldProps<TFieldValues extends FieldValues = FieldValues>
6
6
  label?: string;
7
7
  children: (props: {
8
8
  name: string;
9
+ /**
10
+ * Stable id owned by FormField — equal to `name` and already wired to
11
+ * the label's `htmlFor`. Spread it onto the input so the label points
12
+ * at a real element (`<Input id={id} {...register(name)} />`) instead
13
+ * of relying on the consumer to remember to hardcode a matching id.
14
+ */
15
+ id: string;
9
16
  register: (fieldName: Path<TFieldValues>) => ReturnType<UseFormReturn<TFieldValues>["register"]>;
10
17
  error?: string;
11
18
  value?: unknown;
@@ -4,7 +4,7 @@
4
4
  * Horizontal header component with logo, navigation, and actions slots.
5
5
  * Uses compound components pattern for maximum flexibility.
6
6
  *
7
- * @see EPIC-002: Header Component (Molecule)
7
+ * @see EPIC-002: Header Component
8
8
  * @see RFC-003: Header Composition Pattern (APPROVED)
9
9
  * @see ADR-002: Header + SideNavbar Compatibility (ACCEPTED)
10
10
  */
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Actions slot component for Header (typically buttons, user menu, etc.).
5
5
  *
6
- * @see EPIC-002: Header Component (Molecule)
6
+ * @see EPIC-002: Header Component
7
7
  * @see RFC-003: Header Composition Pattern (APPROVED)
8
8
  */
9
9
  import { type ReactNode } from "react";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Hamburger button for toggling mobile menu.
5
5
  *
6
- * @see EPIC-002: Header Component (Molecule)
6
+ * @see EPIC-002: Header Component
7
7
  * @see TASK-027: Hamburger Button
8
8
  */
9
9
  import React from "react";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Logo slot component for Header.
5
5
  *
6
- * @see EPIC-002: Header Component (Molecule)
6
+ * @see EPIC-002: Header Component
7
7
  * @see RFC-003: Header Composition Pattern (APPROVED)
8
8
  */
9
9
  import { type ReactNode } from "react";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Mobile menu drawer for Header navigation.
5
5
  *
6
- * @see EPIC-002: Header Component (Molecule)
6
+ * @see EPIC-002: Header Component
7
7
  * @see TASK-028: Mobile Menu (Drawer)
8
8
  */
9
9
  import React from "react";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Navigation slot component for Header.
5
5
  *
6
- * @see EPIC-002: Header Component (Molecule)
6
+ * @see EPIC-002: Header Component
7
7
  * @see RFC-003: Header Composition Pattern (APPROVED)
8
8
  */
9
9
  import { type ReactNode } from "react";
@@ -4,7 +4,7 @@
4
4
  * Context for managing Header component state, particularly mobile menu state.
5
5
  *
6
6
  * @see ADR-002: Header + SideNavbar Compatibility (ACCEPTED)
7
- * @see EPIC-002: Header Component (Molecule)
7
+ * @see EPIC-002: Header Component
8
8
  * @see TASK-014: Implementar HeaderContext Completo
9
9
  */
10
10
  import { type ReactNode } from "react";
@@ -15,7 +15,6 @@ export interface MenuProps {
15
15
  * Menu Component
16
16
  *
17
17
  * A dropdown menu component with keyboard navigation and portal rendering.
18
- * Follows Atomic Design principles as an Atom component.
19
18
  * Uses Compound Component pattern.
20
19
  *
21
20
  * @example
@@ -12,7 +12,6 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
12
12
  * Modal Component
13
13
  *
14
14
  * A modal/dialog component with overlay, portal rendering, and accessibility.
15
- * Follows Atomic Design principles as an Organism component.
16
15
  *
17
16
  * @example
18
17
  * ```tsx
@@ -21,5 +20,5 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
21
20
  * </Modal>
22
21
  * ```
23
22
  */
24
- export default function Modal({ isOpen, onClose, title, children, variant, showCloseButton, footer, className, ...props }: Props): import("react").JSX.Element | null;
23
+ export default function Modal({ isOpen, onClose, title, children, variant, showCloseButton, footer, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }: Props): import("react").JSX.Element | null;
25
24
  export {};
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Horizontal or vertical navigation component using NavLink internally.
5
5
  *
6
- * @see EPIC-003: Navigation Component (Molecule)
6
+ * @see EPIC-003: Navigation Component
7
7
  * @see RFC-005: Navigation Composition Pattern (APPROVED)
8
8
  */
9
9
  import type { NavigationProps } from "./types";
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Page header component with title, description, breadcrumb, and actions.
5
5
  *
6
- * @see EPIC-004: PageHeader Component (Molecule)
6
+ * @see EPIC-004: PageHeader Component
7
7
  */
8
8
  import type { PageHeaderProps } from "./types";
9
9
  /**
@@ -11,7 +11,6 @@ interface Props extends HTMLAttributes<HTMLDivElement> {
11
11
  * Pagination Component
12
12
  *
13
13
  * A pagination component for navigating through pages of data.
14
- * Follows Atomic Design principles as a Molecule component.
15
14
  *
16
15
  * @example
17
16
  * ```tsx
@@ -20,7 +20,6 @@ export interface PopoverProps {
20
20
  *
21
21
  * A popover component that displays content in a floating panel.
22
22
  * Supports positioning, portal rendering, and keyboard navigation.
23
- * Follows Atomic Design principles as an Atom component.
24
23
  *
25
24
  * @example
26
25
  * ```tsx
@@ -21,7 +21,6 @@ export interface RatingProps {
21
21
  *
22
22
  * A rating component for displaying and selecting ratings.
23
23
  * Supports filled and outlined variants, half ratings, and read-only mode.
24
- * Follows Atomic Design principles as a Molecule component.
25
24
  *
26
25
  * @example
27
26
  * ```tsx
@@ -10,7 +10,6 @@ export interface SearchInputProps extends Omit<InputHTMLAttributes<HTMLInputElem
10
10
  * SearchInput Component
11
11
  *
12
12
  * A search input component with icon, clear button, and loading state.
13
- * Follows Atomic Design principles as a Molecule component.
14
13
  *
15
14
  * @example
16
15
  * ```tsx
@@ -24,7 +24,6 @@ export interface StepperProps {
24
24
  *
25
25
  * A multi-step wizard component for guided workflows.
26
26
  * Supports validation, navigation, and completion callbacks.
27
- * Follows Atomic Design principles as an Organism component.
28
27
  *
29
28
  * @example
30
29
  * ```tsx
@@ -15,7 +15,6 @@ export interface TableActionsProps<T extends Record<string, unknown> = Record<st
15
15
  * TableActions Component
16
16
  *
17
17
  * Dropdown menu for row actions in tables.
18
- * Follows Atomic Design principles as a Molecule component.
19
18
  *
20
19
  * @example
21
20
  * ```tsx
@@ -21,7 +21,6 @@ export interface TableFiltersProps extends HTMLAttributes<HTMLDivElement> {
21
21
  * TableFilters Component
22
22
  *
23
23
  * Filter controls for tables with support for text, select, and date filters.
24
- * Follows Atomic Design principles as a Molecule component.
25
24
  *
26
25
  * @example
27
26
  * ```tsx
@@ -13,7 +13,6 @@ export interface TablePaginationProps extends HTMLAttributes<HTMLDivElement> {
13
13
  * TablePagination Component
14
14
  *
15
15
  * Pagination controls for tables with page navigation and page size selection.
16
- * Follows Atomic Design principles as a Molecule component.
17
16
  *
18
17
  * @example
19
18
  * ```tsx
@@ -15,7 +15,6 @@ export interface TimePickerProps {
15
15
  *
16
16
  * A time picker component for selecting time values.
17
17
  * Supports 12h and 24h formats.
18
- * Follows Atomic Design principles as a Molecule component.
19
18
  *
20
19
  * @example
21
20
  * ```tsx
@@ -19,7 +19,6 @@ export interface TimelineProps {
19
19
  *
20
20
  * A timeline component for displaying events in chronological order.
21
21
  * Supports horizontal and vertical orientations.
22
- * Follows Atomic Design principles as an Organism component.
23
22
  *
24
23
  * @example
25
24
  * ```tsx
@@ -18,7 +18,6 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement
18
18
  * Checkbox Component
19
19
  *
20
20
  * A styled checkbox input component.
21
- * Follows Atomic Design principles as an Atom component.
22
21
  * Uses Composite Pattern when combined with Label and ErrorMessage.
23
22
  *
24
23
  * @example
@@ -15,6 +15,21 @@ interface ChipStandardProps extends ChipBaseProps {
15
15
  asChild?: false;
16
16
  onRemove?: () => void;
17
17
  onClick?: () => void;
18
+ /**
19
+ * Optional count sub-badge rendered at the end of the chip (before the
20
+ * remove ✕, if any) — e.g. `Casa 12`, `Tramitando 340` in a filter bar.
21
+ *
22
+ * The sub-badge inverts with the chip surface so it always contrasts:
23
+ * a brand pill on neutral chips, a light pill on brand chips
24
+ * (`selected` / `variant="filled"`). The number is folded into the
25
+ * interactive chip's accessible name (`"Casa, 12"`) so AT users hear
26
+ * it; pass an explicit `aria-label` to override that phrasing.
27
+ *
28
+ * Forbidden in the `asChild` form (the consumer composes the node).
29
+ * `0` is a legitimate value and renders `0`; omit the prop for "no
30
+ * count".
31
+ */
32
+ count?: number;
18
33
  }
19
34
  /**
20
35
  * `asChild` collapses the chip into a single node provided by the
@@ -47,6 +62,12 @@ interface ChipAsChildProps extends ChipBaseProps {
47
62
  * form when removal is required.
48
63
  */
49
64
  onRemove?: never;
65
+ /**
66
+ * `count` is forbidden when `asChild` is true — the collapsed node is
67
+ * a single consumer element with no slot for the sub-badge. Render the
68
+ * count inside the child yourself, or use the standard form.
69
+ */
70
+ count?: never;
50
71
  }
51
72
  export type ChipProps = ChipStandardProps | ChipAsChildProps;
52
73
  declare const Chip: import("react").ForwardRefExoticComponent<ChipProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -7,7 +7,6 @@ export interface ErrorMessageProps extends HTMLAttributes<HTMLDivElement> {
7
7
  * ErrorMessage Component
8
8
  *
9
9
  * A component for displaying validation error messages.
10
- * Follows Atomic Design principles as an Atom component.
11
10
  *
12
11
  * @example
13
12
  * ```tsx
@@ -18,7 +18,6 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
18
18
  * Input Component
19
19
  *
20
20
  * A styled text input component with label, error/success states, icons, and clear button.
21
- * Follows Atomic Design principles as an Atom component.
22
21
  * Uses Composite Pattern when combined with Label and ErrorMessage.
23
22
  *
24
23
  * @example
@@ -7,7 +7,6 @@ interface Props extends LabelHTMLAttributes<HTMLLabelElement> {
7
7
  * Label Component
8
8
  *
9
9
  * A styled label component for form inputs.
10
- * Follows Atomic Design principles as an Atom component.
11
10
  *
12
11
  * @example
13
12
  * ```tsx
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Navigation link component with active state detection and Next.js integration.
5
5
  *
6
- * @see EPIC-001: NavLink Component (Atom)
6
+ * @see EPIC-001: NavLink Component
7
7
  * @see RFC-001: NavLink Hook Strategy (APPROVED)
8
8
  * @see RFC-002: Next.js Integration Strategy (APPROVED)
9
9
  * @see ADR-001: Active State Detection (ACCEPTED)
@@ -17,7 +17,6 @@ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
17
17
  * Radio Component
18
18
  *
19
19
  * A styled radio input component.
20
- * Follows Atomic Design principles as an Atom component.
21
20
  * Uses Composite Pattern when combined with Label and ErrorMessage.
22
21
  *
23
22
  * @example
@@ -23,7 +23,6 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
23
23
  * Select Component
24
24
  *
25
25
  * A styled select dropdown component for forms.
26
- * Follows Atomic Design principles as an Atom component.
27
26
  * Supports both flat options and option groups.
28
27
  *
29
28
  * @example
@@ -9,7 +9,6 @@ export interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
9
9
  * Skeleton Component
10
10
  *
11
11
  * A skeleton loader component for displaying loading states.
12
- * Follows Atomic Design principles as an Atom component.
13
12
  *
14
13
  * @example
15
14
  * ```tsx
@@ -29,7 +29,6 @@ export interface SliderProps extends Omit<HTMLAttributes<HTMLDivElement>, "onCha
29
29
  *
30
30
  * A range input component for selecting numeric values.
31
31
  * Supports single and dual thumb (range) modes.
32
- * Follows Atomic Design principles as an Atom component.
33
32
  *
34
33
  * @example
35
34
  * ```tsx
@@ -24,7 +24,6 @@ export interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
24
24
  * Switch Component
25
25
  *
26
26
  * A toggle switch component for on/off states.
27
- * Follows Atomic Design principles as an Atom component.
28
27
  *
29
28
  * @example
30
29
  * ```tsx
@@ -15,7 +15,6 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
15
15
  * Tooltip Component
16
16
  *
17
17
  * A tooltip component for displaying additional information on hover.
18
- * Follows Atomic Design principles as an Atom component.
19
18
  *
20
19
  * @example
21
20
  * ```tsx
@@ -4,6 +4,14 @@ export interface DialogContextValue {
4
4
  onClose: () => void;
5
5
  titleId?: string;
6
6
  descriptionId?: string;
7
+ /** True while at least one Dialog.Title is mounted. */
8
+ hasTitle: boolean;
9
+ /** True while at least one Dialog.Description is mounted. */
10
+ hasDescription: boolean;
11
+ /** Register a mounted Title; returns an unregister cleanup. */
12
+ registerTitle: () => () => void;
13
+ /** Register a mounted Description; returns an unregister cleanup. */
14
+ registerDescription: () => () => void;
7
15
  }
8
16
  export declare const DialogContext: import("react").Context<DialogContextValue | undefined>;
9
17
  export declare function useDialogContext(): DialogContextValue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fabio.caffarello/react-design-system",
3
3
  "private": false,
4
- "version": "3.13.0",
4
+ "version": "4.0.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -62,7 +62,7 @@
62
62
  "lucide-react": "^0.552.0 || ^1.0.0",
63
63
  "react": ">=19",
64
64
  "react-dom": ">=19",
65
- "react-hook-form": "^7.78.0"
65
+ "react-hook-form": "^7.79.0"
66
66
  },
67
67
  "overrides": {
68
68
  "handlebars": "^4.7.9",
@@ -114,15 +114,15 @@
114
114
  "@testing-library/dom": "^10.4.1",
115
115
  "@testing-library/jest-dom": "^6.9.1",
116
116
  "@testing-library/react": "^16.3.2",
117
- "@types/bun": "^1.3.7",
117
+ "@types/bun": "^1.3.14",
118
118
  "@types/node": "^25.9.2",
119
119
  "@types/react": "^19.2.17",
120
120
  "@types/react-dom": "^19.2.3",
121
- "@vitejs/plugin-react": "^5.0.4",
121
+ "@vitejs/plugin-react": "^5.2.0",
122
122
  "@vitest/browser-playwright": "^4.1.8",
123
123
  "@vitest/coverage-v8": "^4.1.8",
124
124
  "autoprefixer": "^10.5.0",
125
- "baseline-browser-mapping": "^2.10.34",
125
+ "baseline-browser-mapping": "^2.10.37",
126
126
  "culori": "^4.0.2",
127
127
  "dependency-cruiser": "^17.3.6",
128
128
  "eslint": "^10.4.1",
@@ -135,10 +135,10 @@
135
135
  "lint-staged": "^16.2.7",
136
136
  "lucide-react": "^1.17.0",
137
137
  "madge": "^8.0.0",
138
- "plop": "^4.0.4",
138
+ "plop": "^4.0.5",
139
139
  "postcss": "^8.5.6",
140
140
  "prettier": "^3.8.3",
141
- "react-hook-form": "^7.78.0",
141
+ "react-hook-form": "^7.79.0",
142
142
  "remark-gfm": "^4.0.1",
143
143
  "storybook": "^10.4.2",
144
144
  "storybook-addon-performance": "^0.17.3",