@fabio.caffarello/react-design-system 3.12.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.
- package/dist/granular/index.js +393 -389
- package/dist/granular/index.js.map +1 -1
- package/dist/granular/ui/components/Autocomplete/Autocomplete.js +103 -86
- package/dist/granular/ui/components/Autocomplete/Autocomplete.js.map +1 -1
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js +57 -47
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js.map +1 -1
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js +21 -20
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js.map +1 -1
- package/dist/granular/ui/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/granular/ui/components/ButtonGroup/ButtonGroup.js +68 -0
- package/dist/granular/ui/components/ButtonGroup/ButtonGroup.js.map +1 -0
- package/dist/granular/ui/components/ColorPicker/ColorPicker.js.map +1 -1
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js +187 -149
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js.map +1 -1
- package/dist/granular/ui/components/DataGrid/DataGrid.js +92 -92
- package/dist/granular/ui/components/DataGrid/DataGrid.js.map +1 -1
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js +154 -139
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js.map +1 -1
- package/dist/granular/ui/components/Dialog/AlertDialog.js +73 -40
- package/dist/granular/ui/components/Dialog/AlertDialog.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogContent.js +54 -48
- package/dist/granular/ui/components/Dialog/DialogContent.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogDescription.js +31 -31
- package/dist/granular/ui/components/Dialog/DialogDescription.js.map +1 -1
- package/dist/granular/ui/components/Dialog/DialogTitle.js +30 -30
- package/dist/granular/ui/components/Dialog/DialogTitle.js.map +1 -1
- package/dist/granular/ui/components/Drawer/Drawer.js.map +1 -1
- package/dist/granular/ui/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/granular/ui/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/granular/ui/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/granular/ui/components/Form/Form.js +38 -37
- package/dist/granular/ui/components/Form/Form.js.map +1 -1
- package/dist/granular/ui/components/Form/FormField.js +28 -26
- package/dist/granular/ui/components/Form/FormField.js.map +1 -1
- package/dist/granular/ui/components/Header/Header.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderActions.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderHamburger.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderLogo.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderMobileMenu.js.map +1 -1
- package/dist/granular/ui/components/Header/components/HeaderNavigation.js.map +1 -1
- package/dist/granular/ui/components/Header/contexts/HeaderContext.js.map +1 -1
- package/dist/granular/ui/components/Menu/Menu.js.map +1 -1
- package/dist/granular/ui/components/Modal/Modal.js +98 -86
- package/dist/granular/ui/components/Modal/Modal.js.map +1 -1
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js +122 -106
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js.map +1 -1
- package/dist/granular/ui/components/Navigation/Navigation.js.map +1 -1
- package/dist/granular/ui/components/PageHeader/PageHeader.js.map +1 -1
- package/dist/granular/ui/components/Pagination/Pagination.js.map +1 -1
- package/dist/granular/ui/components/Popover/Popover.js.map +1 -1
- package/dist/granular/ui/components/Rating/Rating.js.map +1 -1
- package/dist/granular/ui/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js +82 -64
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js +30 -29
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js +37 -35
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js.map +1 -1
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js +57 -57
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js.map +1 -1
- package/dist/granular/ui/components/Stepper/Stepper.js +102 -94
- package/dist/granular/ui/components/Stepper/Stepper.js.map +1 -1
- package/dist/granular/ui/components/Table/Table.js +41 -35
- package/dist/granular/ui/components/Table/Table.js.map +1 -1
- package/dist/granular/ui/components/Table/TableActions/TableActions.js.map +1 -1
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js +49 -46
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js.map +1 -1
- package/dist/granular/ui/components/Table/TablePagination/TablePagination.js.map +1 -1
- package/dist/granular/ui/components/Table/TableProvider.js +82 -80
- package/dist/granular/ui/components/Table/TableProvider.js.map +1 -1
- package/dist/granular/ui/components/Table/TableRow.js +57 -53
- package/dist/granular/ui/components/Table/TableRow.js.map +1 -1
- package/dist/granular/ui/components/Table/useColumnResizing.js +53 -53
- package/dist/granular/ui/components/Table/useColumnResizing.js.map +1 -1
- package/dist/granular/ui/components/TimePicker/TimePicker.js +149 -103
- package/dist/granular/ui/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/granular/ui/components/Timeline/Timeline.js.map +1 -1
- package/dist/granular/ui/hooks/useFocusRestore.js +14 -15
- package/dist/granular/ui/hooks/useFocusRestore.js.map +1 -1
- package/dist/granular/ui/primitives/Badge/Badge.js.map +1 -1
- package/dist/granular/ui/primitives/Checkbox/Checkbox.js.map +1 -1
- package/dist/granular/ui/primitives/Chip/Chip.js +91 -71
- package/dist/granular/ui/primitives/Chip/Chip.js.map +1 -1
- package/dist/granular/ui/primitives/Dot/Dot.js +99 -0
- package/dist/granular/ui/primitives/Dot/Dot.js.map +1 -0
- package/dist/granular/ui/primitives/ErrorMessage/ErrorMessage.js.map +1 -1
- package/dist/granular/ui/primitives/Input/Input.js.map +1 -1
- package/dist/granular/ui/primitives/Label/Label.js.map +1 -1
- package/dist/granular/ui/primitives/NavLink/NavLink.js.map +1 -1
- package/dist/granular/ui/primitives/Radio/Radio.js.map +1 -1
- package/dist/granular/ui/primitives/Select/Select.js.map +1 -1
- package/dist/granular/ui/primitives/Separator/Separator.js.map +1 -1
- package/dist/granular/ui/primitives/Skeleton/Skeleton.js.map +1 -1
- package/dist/granular/ui/primitives/Slider/Slider.js.map +1 -1
- package/dist/granular/ui/primitives/Spinner/Spinner.js.map +1 -1
- package/dist/granular/ui/primitives/Switch/Switch.js.map +1 -1
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js.map +1 -1
- package/dist/granular/ui/providers/DialogContext.js.map +1 -1
- package/dist/granular/ui/providers/DialogProvider.js +24 -20
- package/dist/granular/ui/providers/DialogProvider.js.map +1 -1
- package/dist/index.cjs +134 -134
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5945 -5542
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/server/index.cjs +7 -7
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +404 -384
- package/dist/server/index.js.map +1 -1
- package/dist/ui/components/Autocomplete/AutocompleteList.d.ts +4 -0
- package/dist/ui/components/Autocomplete/AutocompleteOption.d.ts +8 -0
- package/dist/ui/components/Breadcrumb/Breadcrumb.d.ts +0 -1
- package/dist/ui/components/ButtonGroup/ButtonGroup.d.ts +2 -2
- package/dist/ui/components/ColorPicker/ColorPicker.d.ts +0 -1
- package/dist/ui/components/CommandPalette/CommandPalette.d.ts +0 -1
- package/dist/ui/components/DataGrid/DataGrid.d.ts +0 -1
- package/dist/ui/components/Dialog/DialogContent.d.ts +20 -1
- package/dist/ui/components/Drawer/Drawer.d.ts +0 -1
- package/dist/ui/components/Dropdown/Dropdown.d.ts +0 -1
- package/dist/ui/components/EmptyState/EmptyState.d.ts +0 -1
- package/dist/ui/components/FileUpload/FileUpload.d.ts +0 -1
- package/dist/ui/components/Form/FormField.d.ts +7 -0
- package/dist/ui/components/Header/Header.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderActions.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderHamburger.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderLogo.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderMobileMenu.d.ts +1 -1
- package/dist/ui/components/Header/components/HeaderNavigation.d.ts +1 -1
- package/dist/ui/components/Header/contexts/HeaderContext.d.ts +1 -1
- package/dist/ui/components/Menu/Menu.d.ts +0 -1
- package/dist/ui/components/Modal/Modal.d.ts +1 -2
- package/dist/ui/components/Navigation/Navigation.d.ts +1 -1
- package/dist/ui/components/PageHeader/PageHeader.d.ts +1 -1
- package/dist/ui/components/Pagination/Pagination.d.ts +0 -1
- package/dist/ui/components/Popover/Popover.d.ts +0 -1
- package/dist/ui/components/Rating/Rating.d.ts +0 -1
- package/dist/ui/components/SearchInput/SearchInput.d.ts +0 -1
- package/dist/ui/components/Stepper/Stepper.d.ts +0 -1
- package/dist/ui/components/Table/TableActions/TableActions.d.ts +0 -1
- package/dist/ui/components/Table/TableFilters/TableFilters.d.ts +0 -1
- package/dist/ui/components/Table/TablePagination/TablePagination.d.ts +0 -1
- package/dist/ui/components/TimePicker/TimePicker.d.ts +0 -1
- package/dist/ui/components/Timeline/Timeline.d.ts +0 -1
- package/dist/ui/components/index.d.ts +2 -0
- package/dist/ui/primitives/Checkbox/Checkbox.d.ts +0 -1
- package/dist/ui/primitives/Chip/Chip.d.ts +21 -0
- package/dist/ui/primitives/ErrorMessage/ErrorMessage.d.ts +0 -1
- package/dist/ui/primitives/Input/Input.d.ts +0 -1
- package/dist/ui/primitives/Label/Label.d.ts +0 -1
- package/dist/ui/primitives/NavLink/NavLink.d.ts +1 -1
- package/dist/ui/primitives/Radio/Radio.d.ts +0 -1
- package/dist/ui/primitives/Select/Select.d.ts +0 -1
- package/dist/ui/primitives/Skeleton/Skeleton.d.ts +0 -1
- package/dist/ui/primitives/Slider/Slider.d.ts +0 -1
- package/dist/ui/primitives/Switch/Switch.d.ts +0 -1
- package/dist/ui/primitives/Tooltip/Tooltip.d.ts +0 -1
- package/dist/ui/primitives/index.d.ts +2 -0
- package/dist/ui/providers/DialogContext.d.ts +8 -0
- 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
|
|
@@ -8,8 +8,8 @@ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
8
8
|
/**
|
|
9
9
|
* ButtonGroup Component
|
|
10
10
|
*
|
|
11
|
-
* A group of buttons displayed together.
|
|
12
|
-
*
|
|
11
|
+
* A group of buttons displayed together. A component — composed from
|
|
12
|
+
* `Button` primitives.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```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;
|
|
@@ -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
|
|
@@ -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
|
|
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
|
|
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
|
|
7
|
+
* @see EPIC-002: Header Component
|
|
8
8
|
* @see TASK-014: Implementar HeaderContext Completo
|
|
9
9
|
*/
|
|
10
10
|
import { type ReactNode } from "react";
|
|
@@ -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
|
|
6
|
+
* @see EPIC-003: Navigation Component
|
|
7
7
|
* @see RFC-005: Navigation Composition Pattern (APPROVED)
|
|
8
8
|
*/
|
|
9
9
|
import type { NavigationProps } from "./types";
|
|
@@ -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
|
|
@@ -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
|
|
@@ -85,3 +85,5 @@ export { default as HeroSection } from "./HeroSection";
|
|
|
85
85
|
export type { HeroSectionProps, HeroSectionVariant, HeroSectionAlign, } from "./HeroSection";
|
|
86
86
|
export { default as TabsAsLinks } from "./TabsAsLinks";
|
|
87
87
|
export type { TabsAsLinksProps, TabAsLink, TabsAsLinksVariant, } from "./TabsAsLinks";
|
|
88
|
+
export { ButtonGroup } from "./ButtonGroup";
|
|
89
|
+
export type { ButtonGroupProps } from "./ButtonGroup";
|
|
@@ -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>>;
|
|
@@ -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
|
|
@@ -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
|
|
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
|
|
@@ -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
|
|
@@ -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
|
|
@@ -38,3 +38,5 @@ export type { SliderProps, SliderVariant, SliderSize } from "./Slider";
|
|
|
38
38
|
export * from "./Chip";
|
|
39
39
|
export type { ChipProps, ChipVariant, ChipSize } from "./Chip";
|
|
40
40
|
export * from "./Avatar";
|
|
41
|
+
export { Dot } from "./Dot";
|
|
42
|
+
export type { DotProps, DotVariant, DotSize } from "./Dot";
|
|
@@ -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": "
|
|
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.
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
138
|
+
"plop": "^4.0.5",
|
|
139
139
|
"postcss": "^8.5.6",
|
|
140
140
|
"prettier": "^3.8.3",
|
|
141
|
-
"react-hook-form": "^7.
|
|
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",
|