@fabio.caffarello/react-design-system 3.7.0 → 3.9.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/README.md +4 -2
- package/dist/granular/index.js +445 -0
- package/dist/granular/index.js.map +1 -0
- package/dist/granular/ui/components/Accordion/Accordion.js +105 -0
- package/dist/granular/ui/components/Accordion/Accordion.js.map +1 -0
- package/dist/granular/ui/components/Autocomplete/Autocomplete.js +133 -0
- package/dist/granular/ui/components/Autocomplete/Autocomplete.js.map +1 -0
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js +119 -0
- package/dist/granular/ui/components/Autocomplete/AutocompleteList.js.map +1 -0
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js +42 -0
- package/dist/granular/ui/components/Autocomplete/AutocompleteOption.js.map +1 -0
- package/dist/granular/ui/components/Breadcrumb/Breadcrumb.js +100 -0
- package/dist/granular/ui/components/Breadcrumb/Breadcrumb.js.map +1 -0
- package/dist/granular/ui/components/Card/Card.js +113 -0
- package/dist/granular/ui/components/Card/Card.js.map +1 -0
- package/dist/granular/ui/components/Card/CardActions.js +51 -0
- package/dist/granular/ui/components/Card/CardActions.js.map +1 -0
- package/dist/granular/ui/components/Card/CardBody.js +32 -0
- package/dist/granular/ui/components/Card/CardBody.js.map +1 -0
- package/dist/granular/ui/components/Card/CardHeader.js +47 -0
- package/dist/granular/ui/components/Card/CardHeader.js.map +1 -0
- package/dist/granular/ui/components/Card/CardSubtitle.js +38 -0
- package/dist/granular/ui/components/Card/CardSubtitle.js.map +1 -0
- package/dist/granular/ui/components/Card/CardTitle.js +61 -0
- package/dist/granular/ui/components/Card/CardTitle.js.map +1 -0
- package/dist/granular/ui/components/ColorPicker/ColorPicker.js +250 -0
- package/dist/granular/ui/components/ColorPicker/ColorPicker.js.map +1 -0
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js +274 -0
- package/dist/granular/ui/components/CommandPalette/CommandPalette.js.map +1 -0
- package/dist/granular/ui/components/DashboardLayout/DashboardLayout.js +37 -0
- package/dist/granular/ui/components/DashboardLayout/DashboardLayout.js.map +1 -0
- package/dist/granular/ui/components/DataGrid/DataGrid.js +155 -0
- package/dist/granular/ui/components/DataGrid/DataGrid.js.map +1 -0
- package/dist/granular/ui/components/DataTablePattern/DataTablePattern.js +113 -0
- package/dist/granular/ui/components/DataTablePattern/DataTablePattern.js.map +1 -0
- package/dist/granular/ui/components/DatePicker/DatePicker.js +126 -0
- package/dist/granular/ui/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js +294 -0
- package/dist/granular/ui/components/DatePicker/DatePickerCalendar.js.map +1 -0
- package/dist/granular/ui/components/DatePicker/DatePickerContext.js +16 -0
- package/dist/granular/ui/components/DatePicker/DatePickerContext.js.map +1 -0
- package/dist/granular/ui/components/DatePicker/DatePickerInput.js +119 -0
- package/dist/granular/ui/components/DatePicker/DatePickerInput.js.map +1 -0
- package/dist/granular/ui/components/DatePicker/DatePickerProvider.js +47 -0
- package/dist/granular/ui/components/DatePicker/DatePickerProvider.js.map +1 -0
- package/dist/granular/ui/components/Dialog/AlertDialog.js +48 -0
- package/dist/granular/ui/components/Dialog/AlertDialog.js.map +1 -0
- package/dist/granular/ui/components/Dialog/Dialog.js +36 -0
- package/dist/granular/ui/components/Dialog/Dialog.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogClose.js +34 -0
- package/dist/granular/ui/components/Dialog/DialogClose.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogContent.js +114 -0
- package/dist/granular/ui/components/Dialog/DialogContent.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogDescription.js +51 -0
- package/dist/granular/ui/components/Dialog/DialogDescription.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogFooter.js +45 -0
- package/dist/granular/ui/components/Dialog/DialogFooter.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogHeader.js +45 -0
- package/dist/granular/ui/components/Dialog/DialogHeader.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogTitle.js +53 -0
- package/dist/granular/ui/components/Dialog/DialogTitle.js.map +1 -0
- package/dist/granular/ui/components/Dialog/DialogTrigger.js +28 -0
- package/dist/granular/ui/components/Dialog/DialogTrigger.js.map +1 -0
- package/dist/granular/ui/components/Drawer/Drawer.js +47 -0
- package/dist/granular/ui/components/Drawer/Drawer.js.map +1 -0
- package/dist/granular/ui/components/Drawer/DrawerContent.js +140 -0
- package/dist/granular/ui/components/Drawer/DrawerContent.js.map +1 -0
- package/dist/granular/ui/components/Drawer/DrawerContext.js +21 -0
- package/dist/granular/ui/components/Drawer/DrawerContext.js.map +1 -0
- package/dist/granular/ui/components/Drawer/DrawerFooter.js +53 -0
- package/dist/granular/ui/components/Drawer/DrawerFooter.js.map +1 -0
- package/dist/granular/ui/components/Drawer/DrawerHeader.js +50 -0
- package/dist/granular/ui/components/Drawer/DrawerHeader.js.map +1 -0
- package/dist/granular/ui/components/Dropdown/Dropdown.js +243 -0
- package/dist/granular/ui/components/Dropdown/Dropdown.js.map +1 -0
- package/dist/granular/ui/components/EmptyState/EmptyState.js +102 -0
- package/dist/granular/ui/components/EmptyState/EmptyState.js.map +1 -0
- package/dist/granular/ui/components/FileUpload/FileUpload.js +342 -0
- package/dist/granular/ui/components/FileUpload/FileUpload.js.map +1 -0
- package/dist/granular/ui/components/Form/Form.js +184 -0
- package/dist/granular/ui/components/Form/Form.js.map +1 -0
- package/dist/granular/ui/components/Form/FormContext.js +19 -0
- package/dist/granular/ui/components/Form/FormContext.js.map +1 -0
- package/dist/granular/ui/components/Form/FormField.js +66 -0
- package/dist/granular/ui/components/Form/FormField.js.map +1 -0
- package/dist/granular/ui/components/Form/FormProvider.js +17 -0
- package/dist/granular/ui/components/Form/FormProvider.js.map +1 -0
- package/dist/granular/ui/components/Form/useFormFieldArray.js +29 -0
- package/dist/granular/ui/components/Form/useFormFieldArray.js.map +1 -0
- package/dist/granular/ui/components/FormWizardPattern/FormWizardPattern.js +121 -0
- package/dist/granular/ui/components/FormWizardPattern/FormWizardPattern.js.map +1 -0
- package/dist/granular/ui/components/Header/Header.js +98 -0
- package/dist/granular/ui/components/Header/Header.js.map +1 -0
- package/dist/granular/ui/components/Header/components/HeaderActions.js +21 -0
- package/dist/granular/ui/components/Header/components/HeaderActions.js.map +1 -0
- package/dist/granular/ui/components/Header/components/HeaderHamburger.js +31 -0
- package/dist/granular/ui/components/Header/components/HeaderHamburger.js.map +1 -0
- package/dist/granular/ui/components/Header/components/HeaderLogo.js +50 -0
- package/dist/granular/ui/components/Header/components/HeaderLogo.js.map +1 -0
- package/dist/granular/ui/components/Header/components/HeaderMobileMenu.js +38 -0
- package/dist/granular/ui/components/Header/components/HeaderMobileMenu.js.map +1 -0
- package/dist/granular/ui/components/Header/components/HeaderNavigation.js +27 -0
- package/dist/granular/ui/components/Header/components/HeaderNavigation.js.map +1 -0
- package/dist/granular/ui/components/Header/contexts/HeaderContext.js +49 -0
- package/dist/granular/ui/components/Header/contexts/HeaderContext.js.map +1 -0
- package/dist/granular/ui/components/LoginBox/LoginBox.js +84 -0
- package/dist/granular/ui/components/LoginBox/LoginBox.js.map +1 -0
- package/dist/granular/ui/components/Menu/Menu.js +45 -0
- package/dist/granular/ui/components/Menu/Menu.js.map +1 -0
- package/dist/granular/ui/components/Menu/MenuContent.js +94 -0
- package/dist/granular/ui/components/Menu/MenuContent.js.map +1 -0
- package/dist/granular/ui/components/Menu/MenuContext.js +21 -0
- package/dist/granular/ui/components/Menu/MenuContext.js.map +1 -0
- package/dist/granular/ui/components/Menu/MenuItem.js +93 -0
- package/dist/granular/ui/components/Menu/MenuItem.js.map +1 -0
- package/dist/granular/ui/components/Menu/MenuSeparator.js +46 -0
- package/dist/granular/ui/components/Menu/MenuSeparator.js.map +1 -0
- package/dist/granular/ui/components/Menu/MenuTrigger.js +71 -0
- package/dist/granular/ui/components/Menu/MenuTrigger.js.map +1 -0
- package/dist/granular/ui/components/Modal/Modal.js +171 -0
- package/dist/granular/ui/components/Modal/Modal.js.map +1 -0
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js +193 -0
- package/dist/granular/ui/components/MultiSelect/MultiSelect.js.map +1 -0
- package/dist/granular/ui/components/Navigation/Navigation.js +141 -0
- package/dist/granular/ui/components/Navigation/Navigation.js.map +1 -0
- package/dist/granular/ui/components/PageHeader/PageHeader.js +95 -0
- package/dist/granular/ui/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/granular/ui/components/Pagination/Pagination.js +156 -0
- package/dist/granular/ui/components/Pagination/Pagination.js.map +1 -0
- package/dist/granular/ui/components/Popover/Popover.js +171 -0
- package/dist/granular/ui/components/Popover/Popover.js.map +1 -0
- package/dist/granular/ui/components/Rating/Rating.js +110 -0
- package/dist/granular/ui/components/Rating/Rating.js.map +1 -0
- package/dist/granular/ui/components/SearchAndFilterPattern/SearchAndFilterPattern.js +120 -0
- package/dist/granular/ui/components/SearchAndFilterPattern/SearchAndFilterPattern.js.map +1 -0
- package/dist/granular/ui/components/SearchInput/SearchInput.js +103 -0
- package/dist/granular/ui/components/SearchInput/SearchInput.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/SideNavbar.js +143 -0
- package/dist/granular/ui/components/SideNavbar/SideNavbar.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/Navbar.js +173 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/Navbar.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js +87 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarGroup.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js +242 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarItem.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarSeparator.js +66 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarSeparator.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarToggle.js +108 -0
- package/dist/granular/ui/components/SideNavbar/components/Navbar/NavbarToggle.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarBackdrop.js +63 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarBackdrop.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js +113 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarResizeHandle.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarRoot.js +150 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarRoot.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarToggle.js +197 -0
- package/dist/granular/ui/components/SideNavbar/components/SideNavbarToggle.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/Sidebar.js +108 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/Sidebar.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarContent.js +71 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarContent.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarFooter.js +64 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarFooter.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarGroup.js +141 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarGroup.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarHeader.js +90 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarHeader.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarSlot.js +12 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarSlot.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarSlotContent.js +13 -0
- package/dist/granular/ui/components/SideNavbar/components/Sidebar/SidebarSlotContent.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/NavbarContext.js +20 -0
- package/dist/granular/ui/components/SideNavbar/contexts/NavbarContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarConfigContext.js +37 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarConfigContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarStateContext.js +20 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarStateContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarThemeContext.js +28 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarThemeContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarToggleContext.js +19 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SideNavbarToggleContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SidebarContext.js +20 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SidebarContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SidebarSlotContext.js +22 -0
- package/dist/granular/ui/components/SideNavbar/contexts/SidebarSlotContext.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useFocusManagement.js +43 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useFocusManagement.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useGroupState.js +59 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useGroupState.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useKeyboardShortcut.js +34 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useKeyboardShortcut.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useResize.js +58 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useResize.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useResponsiveSidebar.js +35 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useResponsiveSidebar.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbar.js +21 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbar.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbarContent.js +19 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbarContent.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbarNavigation.js +21 -0
- package/dist/granular/ui/components/SideNavbar/hooks/useSideNavbarNavigation.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarConfigProvider.js +61 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarConfigProvider.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarProvider.js +82 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarProvider.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js +165 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarStateProvider.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarThemeProvider.js +34 -0
- package/dist/granular/ui/components/SideNavbar/providers/SideNavbarThemeProvider.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/providers/SidebarSlotProvider.js +28 -0
- package/dist/granular/ui/components/SideNavbar/providers/SidebarSlotProvider.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/utils/parseKeyboardShortcut.js +60 -0
- package/dist/granular/ui/components/SideNavbar/utils/parseKeyboardShortcut.js.map +1 -0
- package/dist/granular/ui/components/SideNavbar/utils/parseWidth.js +19 -0
- package/dist/granular/ui/components/SideNavbar/utils/parseWidth.js.map +1 -0
- package/dist/granular/ui/components/Stat/Stat.js +84 -0
- package/dist/granular/ui/components/Stat/Stat.js.map +1 -0
- package/dist/granular/ui/components/Stat/StatGroup.js +61 -0
- package/dist/granular/ui/components/Stat/StatGroup.js.map +1 -0
- package/dist/granular/ui/components/Stepper/Stepper.js +248 -0
- package/dist/granular/ui/components/Stepper/Stepper.js.map +1 -0
- package/dist/granular/ui/components/Table/Table.js +162 -0
- package/dist/granular/ui/components/Table/Table.js.map +1 -0
- package/dist/granular/ui/components/Table/TableActions/TableActions.js +67 -0
- package/dist/granular/ui/components/Table/TableActions/TableActions.js.map +1 -0
- package/dist/granular/ui/components/Table/TableActions.js +44 -0
- package/dist/granular/ui/components/Table/TableActions.js.map +1 -0
- package/dist/granular/ui/components/Table/TableBody.js +134 -0
- package/dist/granular/ui/components/Table/TableBody.js.map +1 -0
- package/dist/granular/ui/components/Table/TableCell.js +40 -0
- package/dist/granular/ui/components/Table/TableCell.js.map +1 -0
- package/dist/granular/ui/components/Table/TableContext.js +19 -0
- package/dist/granular/ui/components/Table/TableContext.js.map +1 -0
- package/dist/granular/ui/components/Table/TableEmptyState.js +62 -0
- package/dist/granular/ui/components/Table/TableEmptyState.js.map +1 -0
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js +189 -0
- package/dist/granular/ui/components/Table/TableFilters/TableFilters.js.map +1 -0
- package/dist/granular/ui/components/Table/TableFilters.js +48 -0
- package/dist/granular/ui/components/Table/TableFilters.js.map +1 -0
- package/dist/granular/ui/components/Table/TableHeader.js +45 -0
- package/dist/granular/ui/components/Table/TableHeader.js.map +1 -0
- package/dist/granular/ui/components/Table/TableHeaderCell.js +117 -0
- package/dist/granular/ui/components/Table/TableHeaderCell.js.map +1 -0
- package/dist/granular/ui/components/Table/TableHeaderRow.js +89 -0
- package/dist/granular/ui/components/Table/TableHeaderRow.js.map +1 -0
- package/dist/granular/ui/components/Table/TablePagination/TablePagination.js +216 -0
- package/dist/granular/ui/components/Table/TablePagination/TablePagination.js.map +1 -0
- package/dist/granular/ui/components/Table/TablePagination.js +56 -0
- package/dist/granular/ui/components/Table/TablePagination.js.map +1 -0
- package/dist/granular/ui/components/Table/TableProvider.js +244 -0
- package/dist/granular/ui/components/Table/TableProvider.js.map +1 -0
- package/dist/granular/ui/components/Table/TableRow.js +95 -0
- package/dist/granular/ui/components/Table/TableRow.js.map +1 -0
- package/dist/granular/ui/components/Table/useColumnResizing.js +71 -0
- package/dist/granular/ui/components/Table/useColumnResizing.js.map +1 -0
- package/dist/granular/ui/components/Table/useVirtualScrolling.js +50 -0
- package/dist/granular/ui/components/Table/useVirtualScrolling.js.map +1 -0
- package/dist/granular/ui/components/Tabs/Tabs.js +39 -0
- package/dist/granular/ui/components/Tabs/Tabs.js.map +1 -0
- package/dist/granular/ui/components/Tabs/TabsContent.js +59 -0
- package/dist/granular/ui/components/Tabs/TabsContent.js.map +1 -0
- package/dist/granular/ui/components/Tabs/TabsContext.js +18 -0
- package/dist/granular/ui/components/Tabs/TabsContext.js.map +1 -0
- package/dist/granular/ui/components/Tabs/TabsList.js +84 -0
- package/dist/granular/ui/components/Tabs/TabsList.js.map +1 -0
- package/dist/granular/ui/components/Tabs/TabsProvider.js +31 -0
- package/dist/granular/ui/components/Tabs/TabsProvider.js.map +1 -0
- package/dist/granular/ui/components/Tabs/TabsTrigger.js +103 -0
- package/dist/granular/ui/components/Tabs/TabsTrigger.js.map +1 -0
- package/dist/granular/ui/components/TimePicker/TimePicker.js +216 -0
- package/dist/granular/ui/components/TimePicker/TimePicker.js.map +1 -0
- package/dist/granular/ui/components/Timeline/Timeline.js +152 -0
- package/dist/granular/ui/components/Timeline/Timeline.js.map +1 -0
- package/dist/granular/ui/components/Toast/Toast.js +159 -0
- package/dist/granular/ui/components/Toast/Toast.js.map +1 -0
- package/dist/granular/ui/components/Toast/ToastContainer.js +41 -0
- package/dist/granular/ui/components/Toast/ToastContainer.js.map +1 -0
- package/dist/granular/ui/components/Toast/useToast.js +64 -0
- package/dist/granular/ui/components/Toast/useToast.js.map +1 -0
- package/dist/granular/ui/hooks/createGenericContext.js +27 -0
- package/dist/granular/ui/hooks/createGenericContext.js.map +1 -0
- package/dist/granular/ui/hooks/focusable.js +14 -0
- package/dist/granular/ui/hooks/focusable.js.map +1 -0
- package/dist/granular/ui/hooks/useAutoFocus.js +23 -0
- package/dist/granular/ui/hooks/useAutoFocus.js.map +1 -0
- package/dist/granular/ui/hooks/useCollapsible.js +37 -0
- package/dist/granular/ui/hooks/useCollapsible.js.map +1 -0
- package/dist/granular/ui/hooks/useFocusRestore.js +20 -0
- package/dist/granular/ui/hooks/useFocusRestore.js.map +1 -0
- package/dist/granular/ui/hooks/useFocusTrap.js +31 -0
- package/dist/granular/ui/hooks/useFocusTrap.js.map +1 -0
- package/dist/granular/ui/hooks/useScrollSpy.js +23 -0
- package/dist/granular/ui/hooks/useScrollSpy.js.map +1 -0
- package/dist/granular/ui/layouts/Container/Container.js +73 -0
- package/dist/granular/ui/layouts/Container/Container.js.map +1 -0
- package/dist/granular/ui/layouts/Stack/Stack.js +79 -0
- package/dist/granular/ui/layouts/Stack/Stack.js.map +1 -0
- package/dist/granular/ui/primitives/Avatar/Avatar.js +122 -0
- package/dist/granular/ui/primitives/Avatar/Avatar.js.map +1 -0
- package/dist/granular/ui/primitives/Avatar/AvatarGroup.js +97 -0
- package/dist/granular/ui/primitives/Avatar/AvatarGroup.js.map +1 -0
- package/dist/granular/ui/primitives/Badge/Badge.js +212 -0
- package/dist/granular/ui/primitives/Badge/Badge.js.map +1 -0
- package/dist/granular/ui/primitives/Button/Button.js +288 -0
- package/dist/granular/ui/primitives/Button/Button.js.map +1 -0
- package/dist/granular/ui/primitives/Checkbox/Checkbox.js +129 -0
- package/dist/granular/ui/primitives/Checkbox/Checkbox.js.map +1 -0
- package/dist/granular/ui/primitives/Chip/Chip.js +206 -0
- package/dist/granular/ui/primitives/Chip/Chip.js.map +1 -0
- package/dist/granular/ui/primitives/Collapsible/Collapsible.js +115 -0
- package/dist/granular/ui/primitives/Collapsible/Collapsible.js.map +1 -0
- package/dist/granular/ui/primitives/ErrorMessage/ErrorMessage.js +54 -0
- package/dist/granular/ui/primitives/ErrorMessage/ErrorMessage.js.map +1 -0
- package/dist/granular/ui/primitives/Info/Info.js +57 -0
- package/dist/granular/ui/primitives/Info/Info.js.map +1 -0
- package/dist/granular/ui/primitives/Input/Input.js +351 -0
- package/dist/granular/ui/primitives/Input/Input.js.map +1 -0
- package/dist/granular/ui/primitives/Label/Label.js +61 -0
- package/dist/granular/ui/primitives/Label/Label.js.map +1 -0
- package/dist/granular/ui/primitives/NavLink/NavLink.js +229 -0
- package/dist/granular/ui/primitives/NavLink/NavLink.js.map +1 -0
- package/dist/granular/ui/primitives/NavLink/hooks/useNavLink.js +15 -0
- package/dist/granular/ui/primitives/NavLink/hooks/useNavLink.js.map +1 -0
- package/dist/granular/ui/primitives/Progress/Progress.js +182 -0
- package/dist/granular/ui/primitives/Progress/Progress.js.map +1 -0
- package/dist/granular/ui/primitives/Radio/Radio.js +118 -0
- package/dist/granular/ui/primitives/Radio/Radio.js.map +1 -0
- package/dist/granular/ui/primitives/Select/Select.js +210 -0
- package/dist/granular/ui/primitives/Select/Select.js.map +1 -0
- package/dist/granular/ui/primitives/Separator/Separator.js +69 -0
- package/dist/granular/ui/primitives/Separator/Separator.js.map +1 -0
- package/dist/granular/ui/primitives/Skeleton/Skeleton.js +87 -0
- package/dist/granular/ui/primitives/Skeleton/Skeleton.js.map +1 -0
- package/dist/granular/ui/primitives/Slider/Slider.js +291 -0
- package/dist/granular/ui/primitives/Slider/Slider.js.map +1 -0
- package/dist/granular/ui/primitives/Spinner/Spinner.js +95 -0
- package/dist/granular/ui/primitives/Spinner/Spinner.js.map +1 -0
- package/dist/granular/ui/primitives/Switch/Switch.js +212 -0
- package/dist/granular/ui/primitives/Switch/Switch.js.map +1 -0
- package/dist/granular/ui/primitives/Text/Text.js +118 -0
- package/dist/granular/ui/primitives/Text/Text.js.map +1 -0
- package/dist/granular/ui/primitives/Textarea/Textarea.js +129 -0
- package/dist/granular/ui/primitives/Textarea/Textarea.js.map +1 -0
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js +227 -0
- package/dist/granular/ui/primitives/Tooltip/Tooltip.js.map +1 -0
- package/dist/granular/ui/providers/AppProvider.js +50 -0
- package/dist/granular/ui/providers/AppProvider.js.map +1 -0
- package/dist/granular/ui/providers/ConfigProvider.js +95 -0
- package/dist/granular/ui/providers/ConfigProvider.js.map +1 -0
- package/dist/granular/ui/providers/DialogContext.js +20 -0
- package/dist/granular/ui/providers/DialogContext.js.map +1 -0
- package/dist/granular/ui/providers/DialogProvider.js +32 -0
- package/dist/granular/ui/providers/DialogProvider.js.map +1 -0
- package/dist/granular/ui/providers/ThemeProvider.js +56 -0
- package/dist/granular/ui/providers/ThemeProvider.js.map +1 -0
- package/dist/granular/ui/providers/ToastContext.js +20 -0
- package/dist/granular/ui/providers/ToastContext.js.map +1 -0
- package/dist/granular/ui/providers/ToastProvider.js +47 -0
- package/dist/granular/ui/providers/ToastProvider.js.map +1 -0
- package/dist/granular/ui/providers/providers-bundle.js +23 -0
- package/dist/granular/ui/providers/providers-bundle.js.map +1 -0
- package/dist/granular/ui/tokens/animations.js +106 -0
- package/dist/granular/ui/tokens/animations.js.map +1 -0
- package/dist/granular/ui/tokens/borders.js +54 -0
- package/dist/granular/ui/tokens/borders.js.map +1 -0
- package/dist/granular/ui/tokens/breakpoints.js +43 -0
- package/dist/granular/ui/tokens/breakpoints.js.map +1 -0
- package/dist/granular/ui/tokens/colors/brand.js +67 -0
- package/dist/granular/ui/tokens/colors/brand.js.map +1 -0
- package/dist/granular/ui/tokens/colors/index.js +25 -0
- package/dist/granular/ui/tokens/colors/index.js.map +1 -0
- package/dist/granular/ui/tokens/colors/primitives.js +320 -0
- package/dist/granular/ui/tokens/colors/primitives.js.map +1 -0
- package/dist/granular/ui/tokens/colors/semantic.js +212 -0
- package/dist/granular/ui/tokens/colors/semantic.js.map +1 -0
- package/dist/granular/ui/tokens/colors/types.js +18 -0
- package/dist/granular/ui/tokens/colors/types.js.map +1 -0
- package/dist/granular/ui/tokens/colors/utils.js +131 -0
- package/dist/granular/ui/tokens/colors/utils.js.map +1 -0
- package/dist/granular/ui/tokens/opacity.js +59 -0
- package/dist/granular/ui/tokens/opacity.js.map +1 -0
- package/dist/granular/ui/tokens/radius.js +76 -0
- package/dist/granular/ui/tokens/radius.js.map +1 -0
- package/dist/granular/ui/tokens/shadows.js +63 -0
- package/dist/granular/ui/tokens/shadows.js.map +1 -0
- package/dist/granular/ui/tokens/sidebar.js +92 -0
- package/dist/granular/ui/tokens/sidebar.js.map +1 -0
- package/dist/granular/ui/tokens/spacing.js +143 -0
- package/dist/granular/ui/tokens/spacing.js.map +1 -0
- package/dist/granular/ui/tokens/switch.js +51 -0
- package/dist/granular/ui/tokens/switch.js.map +1 -0
- package/dist/granular/ui/tokens/typography.js +146 -0
- package/dist/granular/ui/tokens/typography.js.map +1 -0
- package/dist/granular/ui/tokens/z-index.js +79 -0
- package/dist/granular/ui/tokens/z-index.js.map +1 -0
- package/dist/granular/ui/utils/cn.js +10 -0
- package/dist/granular/ui/utils/cn.js.map +1 -0
- package/dist/granular/ui/utils/cva.js +14 -0
- package/dist/granular/ui/utils/cva.js.map +1 -0
- package/dist/granular/ui/utils/mergeRefs.js +11 -0
- package/dist/granular/ui/utils/mergeRefs.js.map +1 -0
- package/dist/granular/vite.svg +1 -0
- package/dist/hooks/index.cjs +2 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.js +23 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.cjs +44 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1900 -1885
- package/dist/index.js.map +1 -1
- package/dist/react-design-system.css +1 -1
- package/dist/server/index.cjs +23 -23
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.js +863 -1180
- package/dist/server/index.js.map +1 -1
- package/dist/ui/components/Accordion/Accordion.d.ts +9 -1
- package/dist/ui/hooks-entry.d.ts +2 -0
- package/dist/ui/utils/tailwind-safelist.d.ts +3 -1
- package/package.json +24 -13
package/README.md
CHANGED
|
@@ -118,9 +118,11 @@ Consumers can import from:
|
|
|
118
118
|
|
|
119
119
|
- `@fabio.caffarello/react-design-system` — the default entry. Everything: providers, hooks, all primitives, components, layouts, tokens. The emitted bundle carries `"use client";` so RSC frameworks (Next App Router 15+/16, etc.) accept it from a Server Component without crashing on `React.createContext`. The whole module is treated as a client boundary by the consumer's bundler.
|
|
120
120
|
- `@fabio.caffarello/react-design-system/server` — the opt-in server entry (issue #150). Re-exports only the components whose render tree is safe to evaluate inside a React Server Component: presentational primitives (`Text`, `Skeleton`, `Spinner`, `Progress`, `Chip`, `ErrorMessage`, `Info`), layout (`Container`, `Stack`), and structural / informational components (`Breadcrumb`, `Timeline`, `AutocompleteOption`, `DialogHeader`, `DialogFooter`, `DrawerHeader`, `DrawerFooter`, `HeaderActions`, `HeaderNavigation`, `MenuSeparator`, `NavbarSeparator`, `TableCell`). The bundle carries NO `"use client"` directive, so importing from it in a Server Component does NOT cross a client boundary — useful for SEO-critical / first-paint-critical routes where the shell shouldn't ship JS to the client.
|
|
121
|
+
- `@fabio.caffarello/react-design-system/hooks` — the granular public-hooks entry (issue #203). Re-exports only the public hooks (today: `useScrollSpy`) as a tiny standalone client bundle (<1KB) with every dependency external. Use it when a route's client component needs a hook but nothing else from RDS: importing a hook from the main entry pulls the whole pre-bundled barrel into the route's client JS (+277KB minified measured on a Next 16 route), because the single-file `"use client"` bundle is opaque to the consumer bundler's tree-shaking. The same hooks remain available from the main entry for back-compat.
|
|
122
|
+
- `@fabio.caffarello/react-design-system/granular` — the granular client entry (issue #208). The SAME public surface as the default entry, emitted as a `preserveModules` tree (one module per source file, `"use client"` on every module, all deps external). Use it for leaf component imports on size-critical routes: importing one component from the default entry pulls the whole pre-bundled barrel (+264KB minified measured for `Accordion` on a Next 16 route); the same import from `./granular` ships only that component's module graph (~36KB, 13% of the barrel payload — gated in CI). Keep app-wide setup (`AppProvider`/providers) on the default entry: the single bundle preserves provider initialization order by construction.
|
|
121
123
|
- `@fabio.caffarello/react-design-system/styles` — the bundled CSS. Same stylesheet regardless of which JS entry you import.
|
|
122
124
|
|
|
123
|
-
The
|
|
125
|
+
The JS entries can be mixed in one Server Component — `import { Text } from "…/server"; import { Button } from "…"` is the normal pattern. The server entry is purely additive; consumers who never use it see no behavioural change.
|
|
124
126
|
|
|
125
127
|
```tsx
|
|
126
128
|
// app/profile/page.tsx — a Next 16 App Router Server Component.
|
|
@@ -141,7 +143,7 @@ export default function Profile() {
|
|
|
141
143
|
}
|
|
142
144
|
```
|
|
143
145
|
|
|
144
|
-
Sub-entries (`/primitives`, `/components`, `/tokens`, `/providers`) were removed in Phase 13d — they had been silently broken for external consumers since v1.0.0 because cross-chunk references to `cva` and other shared utilities failed at runtime. A single main entry collapses that class of bug structurally; tree-shaking still works at the named-export level via any modern bundler. The `./server`
|
|
146
|
+
Sub-entries (`/primitives`, `/components`, `/tokens`, `/providers`) were removed in Phase 13d — they had been silently broken for external consumers since v1.0.0 because cross-chunk references to `cva` and other shared utilities failed at runtime. A single main entry collapses that class of bug structurally; tree-shaking still works at the named-export level via any modern bundler. The `./server`, `./hooks`, and `./granular` entries sidestep the same regression by each being their OWN independent Vite build with all third-party deps externalised — no chunks are shared between entries, and `./granular`'s preserveModules layout has no extracted chunks at all (source modules map 1:1 to output files).
|
|
145
147
|
|
|
146
148
|
## Working with Claude Code
|
|
147
149
|
|
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SIDEBAR_TOKENS as r, getNestedIndentClass as t } from "./ui/tokens/sidebar.js";
|
|
3
|
+
import { SPACING_TOKENS as f, SpacingTokenFactory as p, getSpacing as m, getSpacingClass as x } from "./ui/tokens/spacing.js";
|
|
4
|
+
import { FONT_FAMILY_TOKENS as d, FONT_WEIGHT_TOKENS as s, TYPOGRAPHY_TOKENS as i, TypographyTokenFactory as u, getTypography as n, getTypographyClasses as g, getTypographyLineHeight as S, getTypographySize as C, getTypographySizeFromFontSize as T, getTypographyWeight as b, getTypographyWeightFromFontWeight as v } from "./ui/tokens/typography.js";
|
|
5
|
+
import { BRAND_COLORS as c } from "./ui/tokens/colors/index.js";
|
|
6
|
+
import { BREAKPOINT_TOKENS as R, BreakpointTokenFactory as A, getBreakpoint as O, getMediaQuery as D } from "./ui/tokens/breakpoints.js";
|
|
7
|
+
import { getAnimation as E, getAnimationClass as y, getTransitionClass as F } from "./ui/tokens/animations.js";
|
|
8
|
+
import { getZIndex as L, getZIndexClass as H } from "./ui/tokens/z-index.js";
|
|
9
|
+
import { getOpacity as _, getOpacityClass as k } from "./ui/tokens/opacity.js";
|
|
10
|
+
import { AppProvider as G, useApp as K } from "./ui/providers/AppProvider.js";
|
|
11
|
+
import { useScrollSpy as W } from "./ui/hooks/useScrollSpy.js";
|
|
12
|
+
import { default as q } from "./ui/components/Accordion/Accordion.js";
|
|
13
|
+
import { AlertDialog as V } from "./ui/components/Dialog/AlertDialog.js";
|
|
14
|
+
import { default as Z } from "./ui/components/Autocomplete/Autocomplete.js";
|
|
15
|
+
import { default as j } from "./ui/components/Autocomplete/AutocompleteList.js";
|
|
16
|
+
import { default as X } from "./ui/components/Autocomplete/AutocompleteOption.js";
|
|
17
|
+
import { default as ee } from "./ui/primitives/Avatar/Avatar.js";
|
|
18
|
+
import { default as re } from "./ui/primitives/Badge/Badge.js";
|
|
19
|
+
import { default as ae } from "./ui/components/Breadcrumb/Breadcrumb.js";
|
|
20
|
+
import { Button as pe } from "./ui/primitives/Button/Button.js";
|
|
21
|
+
import { default as xe } from "./ui/components/Card/Card.js";
|
|
22
|
+
import { default as de } from "./ui/primitives/Checkbox/Checkbox.js";
|
|
23
|
+
import { default as ie } from "./ui/primitives/Chip/Chip.js";
|
|
24
|
+
import { default as ne } from "./ui/primitives/Collapsible/Collapsible.js";
|
|
25
|
+
import { default as Se } from "./ui/components/ColorPicker/ColorPicker.js";
|
|
26
|
+
import { default as Te } from "./ui/components/CommandPalette/CommandPalette.js";
|
|
27
|
+
import { default as ve } from "./ui/components/DataGrid/DataGrid.js";
|
|
28
|
+
import { default as ce } from "./ui/components/DatePicker/DatePicker.js";
|
|
29
|
+
import { default as Re } from "./ui/components/Dialog/Dialog.js";
|
|
30
|
+
import { default as Oe } from "./ui/components/Drawer/Drawer.js";
|
|
31
|
+
import { default as he } from "./ui/components/Drawer/DrawerContent.js";
|
|
32
|
+
import { default as ye } from "./ui/components/Drawer/DrawerFooter.js";
|
|
33
|
+
import { default as Ie } from "./ui/components/Drawer/DrawerHeader.js";
|
|
34
|
+
import { default as He } from "./ui/components/Dropdown/Dropdown.js";
|
|
35
|
+
import { default as _e } from "./ui/components/EmptyState/EmptyState.js";
|
|
36
|
+
import { default as Be } from "./ui/primitives/ErrorMessage/ErrorMessage.js";
|
|
37
|
+
import { default as Ke } from "./ui/components/FileUpload/FileUpload.js";
|
|
38
|
+
import { default as We } from "./ui/components/Form/Form.js";
|
|
39
|
+
import { Header as qe, Header as ze } from "./ui/components/Header/Header.js";
|
|
40
|
+
import { default as Ue } from "./ui/primitives/Info/Info.js";
|
|
41
|
+
import { default as Qe } from "./ui/primitives/Input/Input.js";
|
|
42
|
+
import { default as Je } from "./ui/primitives/Label/Label.js";
|
|
43
|
+
import { default as $e } from "./ui/components/LoginBox/LoginBox.js";
|
|
44
|
+
import { default as oo } from "./ui/components/Menu/Menu.js";
|
|
45
|
+
import { default as to } from "./ui/components/Menu/MenuContent.js";
|
|
46
|
+
import { default as fo } from "./ui/components/Menu/MenuItem.js";
|
|
47
|
+
import { default as mo } from "./ui/components/Menu/MenuSeparator.js";
|
|
48
|
+
import { default as lo } from "./ui/components/Menu/MenuTrigger.js";
|
|
49
|
+
import { default as io } from "./ui/components/Modal/Modal.js";
|
|
50
|
+
import { default as no } from "./ui/components/MultiSelect/MultiSelect.js";
|
|
51
|
+
import { NavLink as So } from "./ui/primitives/NavLink/NavLink.js";
|
|
52
|
+
import { default as To } from "./ui/components/SideNavbar/components/Navbar/Navbar.js";
|
|
53
|
+
import { default as vo } from "./ui/components/SideNavbar/components/Navbar/NavbarItem.js";
|
|
54
|
+
import { default as co } from "./ui/components/SideNavbar/components/Navbar/NavbarSeparator.js";
|
|
55
|
+
import { default as Ro } from "./ui/components/SideNavbar/components/Navbar/NavbarToggle.js";
|
|
56
|
+
import { Navigation as Oo, Navigation as Do } from "./ui/components/Navigation/Navigation.js";
|
|
57
|
+
import { PageHeader as Eo, PageHeader as yo } from "./ui/components/PageHeader/PageHeader.js";
|
|
58
|
+
import { default as Io } from "./ui/components/Pagination/Pagination.js";
|
|
59
|
+
import { default as Ho } from "./ui/components/Popover/Popover.js";
|
|
60
|
+
import { default as _o } from "./ui/primitives/Progress/Progress.js";
|
|
61
|
+
import { default as Bo } from "./ui/primitives/Radio/Radio.js";
|
|
62
|
+
import { default as Ko } from "./ui/components/Rating/Rating.js";
|
|
63
|
+
import { default as Wo } from "./ui/components/SearchInput/SearchInput.js";
|
|
64
|
+
import { default as qo } from "./ui/primitives/Select/Select.js";
|
|
65
|
+
import { default as Vo } from "./ui/primitives/Separator/Separator.js";
|
|
66
|
+
import { default as Zo } from "./ui/components/SideNavbar/SideNavbar.js";
|
|
67
|
+
import { default as jo } from "./ui/components/SideNavbar/components/SideNavbarBackdrop.js";
|
|
68
|
+
import { default as Xo } from "./ui/components/SideNavbar/components/SideNavbarResizeHandle.js";
|
|
69
|
+
import { default as er } from "./ui/components/SideNavbar/components/SideNavbarRoot.js";
|
|
70
|
+
import { default as rr } from "./ui/components/SideNavbar/components/SideNavbarToggle.js";
|
|
71
|
+
import { default as ar } from "./ui/components/SideNavbar/components/Sidebar/Sidebar.js";
|
|
72
|
+
import { default as pr } from "./ui/components/SideNavbar/components/Sidebar/SidebarContent.js";
|
|
73
|
+
import { default as xr } from "./ui/components/SideNavbar/components/Sidebar/SidebarFooter.js";
|
|
74
|
+
import { default as dr } from "./ui/components/SideNavbar/components/Sidebar/SidebarGroup.js";
|
|
75
|
+
import { default as ir } from "./ui/components/SideNavbar/components/Sidebar/SidebarHeader.js";
|
|
76
|
+
import { default as nr } from "./ui/primitives/Skeleton/Skeleton.js";
|
|
77
|
+
import { default as Sr } from "./ui/primitives/Slider/Slider.js";
|
|
78
|
+
import { default as Tr } from "./ui/primitives/Spinner/Spinner.js";
|
|
79
|
+
import { default as vr } from "./ui/components/Stepper/Stepper.js";
|
|
80
|
+
import { default as cr } from "./ui/primitives/Switch/Switch.js";
|
|
81
|
+
import { default as Rr } from "./ui/components/Table/Table.js";
|
|
82
|
+
import { default as Or } from "./ui/components/Table/TableActions.js";
|
|
83
|
+
import { default as hr } from "./ui/components/Table/TableBody.js";
|
|
84
|
+
import { default as yr } from "./ui/components/Table/TableCell.js";
|
|
85
|
+
import { default as Ir } from "./ui/components/Table/TableEmptyState.js";
|
|
86
|
+
import { default as Hr } from "./ui/components/Table/TableFilters.js";
|
|
87
|
+
import { default as _r } from "./ui/components/Table/TableHeader.js";
|
|
88
|
+
import { default as Br } from "./ui/components/Table/TableHeaderCell.js";
|
|
89
|
+
import { default as Kr } from "./ui/components/Table/TableHeaderRow.js";
|
|
90
|
+
import { default as Wr } from "./ui/components/Table/TablePagination.js";
|
|
91
|
+
import { default as qr } from "./ui/components/Table/TableRow.js";
|
|
92
|
+
import { default as Vr } from "./ui/components/Tabs/Tabs.js";
|
|
93
|
+
import { default as Zr } from "./ui/primitives/Text/Text.js";
|
|
94
|
+
import { default as jr } from "./ui/primitives/Textarea/Textarea.js";
|
|
95
|
+
import { default as Xr } from "./ui/components/TimePicker/TimePicker.js";
|
|
96
|
+
import { default as et } from "./ui/components/Timeline/Timeline.js";
|
|
97
|
+
import { default as rt } from "./ui/primitives/Tooltip/Tooltip.js";
|
|
98
|
+
import { AMBER as at, BLUE as ft, CYAN as pt, EMERALD as mt, FUCHSIA as xt, GRAY as lt, GREEN as dt, INDIGO as st, LIME as it, ORANGE as ut, PINK as nt, PRIMITIVE_COLORS as gt, PURPLE as St, RED as Ct, ROSE as Tt, SKY as bt, SLATE as vt, TEAL as Nt, VIOLET as ct, YELLOW as Pt, getPrimitiveColor as Rt, getPrimitiveColorPalette as At } from "./ui/tokens/colors/primitives.js";
|
|
99
|
+
import { AvatarGroup as Dt } from "./ui/primitives/Avatar/AvatarGroup.js";
|
|
100
|
+
import { BRAND_PRIMARY as Et, BRAND_SECONDARY as yt } from "./ui/tokens/colors/brand.js";
|
|
101
|
+
import { COLOR_SCALES as It } from "./ui/tokens/colors/types.js";
|
|
102
|
+
import { ConfigProvider as Ht, useConfig as Mt } from "./ui/providers/ConfigProvider.js";
|
|
103
|
+
import { DashboardLayout as kt } from "./ui/components/DashboardLayout/DashboardLayout.js";
|
|
104
|
+
import { DataTablePattern as Gt } from "./ui/components/DataTablePattern/DataTablePattern.js";
|
|
105
|
+
import { DatePickerCalendar as wt } from "./ui/components/DatePicker/DatePickerCalendar.js";
|
|
106
|
+
import { DatePickerInput as Yt } from "./ui/components/DatePicker/DatePickerInput.js";
|
|
107
|
+
import { DatePickerProvider as zt } from "./ui/components/DatePicker/DatePickerProvider.js";
|
|
108
|
+
import { DialogClose as Ut } from "./ui/components/Dialog/DialogClose.js";
|
|
109
|
+
import { DialogContent as Qt } from "./ui/components/Dialog/DialogContent.js";
|
|
110
|
+
import { DialogContext as Jt, useDialogContext as Xt, useDialogContextOptional as $t } from "./ui/providers/DialogContext.js";
|
|
111
|
+
import { DialogDescription as oa } from "./ui/components/Dialog/DialogDescription.js";
|
|
112
|
+
import { DialogFooter as ta } from "./ui/components/Dialog/DialogFooter.js";
|
|
113
|
+
import { DialogHeader as fa } from "./ui/components/Dialog/DialogHeader.js";
|
|
114
|
+
import { DialogProvider as ma } from "./ui/providers/DialogProvider.js";
|
|
115
|
+
import { DialogTitle as la } from "./ui/components/Dialog/DialogTitle.js";
|
|
116
|
+
import { DialogTrigger as sa } from "./ui/components/Dialog/DialogTrigger.js";
|
|
117
|
+
import { FormContext as ua, useFormContext as na, useFormContextOptional as ga } from "./ui/components/Form/FormContext.js";
|
|
118
|
+
import { FormField as Ca } from "./ui/components/Form/FormField.js";
|
|
119
|
+
import { FormProvider as ba } from "./ui/components/Form/FormProvider.js";
|
|
120
|
+
import { FormWizardPattern as Na } from "./ui/components/FormWizardPattern/FormWizardPattern.js";
|
|
121
|
+
import { HeaderActions as Pa } from "./ui/components/Header/components/HeaderActions.js";
|
|
122
|
+
import { HeaderHamburger as Aa } from "./ui/components/Header/components/HeaderHamburger.js";
|
|
123
|
+
import { HeaderLogo as Da } from "./ui/components/Header/components/HeaderLogo.js";
|
|
124
|
+
import { HeaderMobileMenu as Ea } from "./ui/components/Header/components/HeaderMobileMenu.js";
|
|
125
|
+
import { HeaderNavigation as Fa } from "./ui/components/Header/components/HeaderNavigation.js";
|
|
126
|
+
import { HeaderProvider as La, useHeaderContext as Ha } from "./ui/components/Header/contexts/HeaderContext.js";
|
|
127
|
+
import { NavbarContext as _a, useNavbar as ka, useNavbarRequired as Ba } from "./ui/components/SideNavbar/contexts/NavbarContext.js";
|
|
128
|
+
import { NavbarGroup as Ka } from "./ui/components/SideNavbar/components/Navbar/NavbarGroup.js";
|
|
129
|
+
import { SEMANTIC_COLORS as Wa, SEMANTIC_COLORS_DARK as Ya, SEMANTIC_COLORS_LIGHT as qa, getSemanticColor as za, getSemanticColorRole as Va } from "./ui/tokens/colors/semantic.js";
|
|
130
|
+
import { SearchAndFilterPattern as Za } from "./ui/components/SearchAndFilterPattern/SearchAndFilterPattern.js";
|
|
131
|
+
import { SideNavbarConfigContext as ja, defaultConfigValues as Ja, useSideNavbarConfig as Xa, useSideNavbarConfigRequired as $a } from "./ui/components/SideNavbar/contexts/SideNavbarConfigContext.js";
|
|
132
|
+
import { SideNavbarConfigProvider as of } from "./ui/components/SideNavbar/providers/SideNavbarConfigProvider.js";
|
|
133
|
+
import { SideNavbarProvider as tf } from "./ui/components/SideNavbar/providers/SideNavbarProvider.js";
|
|
134
|
+
import { SideNavbarStateContext as ff, useSideNavbarState as pf, useSideNavbarStateRequired as mf } from "./ui/components/SideNavbar/contexts/SideNavbarStateContext.js";
|
|
135
|
+
import { SideNavbarStateProvider as lf } from "./ui/components/SideNavbar/providers/SideNavbarStateProvider.js";
|
|
136
|
+
import { SideNavbarThemeContext as sf, defaultThemeValues as uf, useSideNavbarTheme as nf, useSideNavbarThemeRequired as gf } from "./ui/components/SideNavbar/contexts/SideNavbarThemeContext.js";
|
|
137
|
+
import { SideNavbarThemeProvider as Cf } from "./ui/components/SideNavbar/providers/SideNavbarThemeProvider.js";
|
|
138
|
+
import { SideNavbarToggleContext as bf, useSideNavbarToggleContext as vf, useSideNavbarToggleContextRequired as Nf } from "./ui/components/SideNavbar/contexts/SideNavbarToggleContext.js";
|
|
139
|
+
import { SidebarContext as Pf, useSidebar as Rf, useSidebarRequired as Af } from "./ui/components/SideNavbar/contexts/SidebarContext.js";
|
|
140
|
+
import { SidebarSlot as Df } from "./ui/components/SideNavbar/components/Sidebar/SidebarSlot.js";
|
|
141
|
+
import { SidebarSlotContent as Ef } from "./ui/components/SideNavbar/components/Sidebar/SidebarSlotContent.js";
|
|
142
|
+
import { SidebarSlotContext as Ff, useSidebarSlot as If, useSidebarSlotRequired as Lf } from "./ui/components/SideNavbar/contexts/SidebarSlotContext.js";
|
|
143
|
+
import { SidebarSlotProvider as Mf } from "./ui/components/SideNavbar/providers/SidebarSlotProvider.js";
|
|
144
|
+
import { Stat as kf } from "./ui/components/Stat/Stat.js";
|
|
145
|
+
import { StatGroup as Gf } from "./ui/components/Stat/StatGroup.js";
|
|
146
|
+
import { TableContext as wf, useTableContext as Wf, useTableContextOptional as Yf } from "./ui/components/Table/TableContext.js";
|
|
147
|
+
import { TableProvider as zf } from "./ui/components/Table/TableProvider.js";
|
|
148
|
+
import { TabsContent as Uf } from "./ui/components/Tabs/TabsContent.js";
|
|
149
|
+
import { TabsContext as Qf, useTabsContext as jf, useTabsContextOptional as Jf } from "./ui/components/Tabs/TabsContext.js";
|
|
150
|
+
import { TabsList as $f } from "./ui/components/Tabs/TabsList.js";
|
|
151
|
+
import { TabsProvider as op } from "./ui/components/Tabs/TabsProvider.js";
|
|
152
|
+
import { TabsTrigger as tp } from "./ui/components/Tabs/TabsTrigger.js";
|
|
153
|
+
import { ThemeProvider as fp, useTheme as pp } from "./ui/providers/ThemeProvider.js";
|
|
154
|
+
import { Toast as xp } from "./ui/components/Toast/Toast.js";
|
|
155
|
+
import { ToastContainer as dp } from "./ui/components/Toast/ToastContainer.js";
|
|
156
|
+
import { ToastContext as ip, useToastContext as up, useToastContextOptional as np } from "./ui/providers/ToastContext.js";
|
|
157
|
+
import { ToastProvider as Sp } from "./ui/providers/ToastProvider.js";
|
|
158
|
+
import { blendColors as Tp, darken as bp, getColor as vp, getColorClass as Np, getContrastColor as cp, getFocusColorClass as Pp, getFocusRingClass as Rp, getHoverColorClass as Ap, getSemanticColorClass as Op, getSemanticColorValue as Dp, isLightColor as hp, lighten as Ep, withOpacity as yp } from "./ui/tokens/colors/utils.js";
|
|
159
|
+
import { clampWidth as Ip, parseWidthToPixels as Lp, validateWidthBounds as Hp } from "./ui/components/SideNavbar/utils/parseWidth.js";
|
|
160
|
+
import { cn as _p } from "./ui/utils/cn.js";
|
|
161
|
+
import { formatKeyboardShortcut as Bp, parseKeyboardShortcut as Gp } from "./ui/components/SideNavbar/utils/parseKeyboardShortcut.js";
|
|
162
|
+
import { useColumnResizing as wp } from "./ui/components/Table/useColumnResizing.js";
|
|
163
|
+
import { useFocusManagement as Yp } from "./ui/components/SideNavbar/hooks/useFocusManagement.js";
|
|
164
|
+
import { useFormFieldArray as zp } from "./ui/components/Form/useFormFieldArray.js";
|
|
165
|
+
import { useGroupState as Up } from "./ui/components/SideNavbar/hooks/useGroupState.js";
|
|
166
|
+
import { useKeyboardShortcut as Qp } from "./ui/components/SideNavbar/hooks/useKeyboardShortcut.js";
|
|
167
|
+
import { useNavLink as Jp } from "./ui/primitives/NavLink/hooks/useNavLink.js";
|
|
168
|
+
import { useResize as $p } from "./ui/components/SideNavbar/hooks/useResize.js";
|
|
169
|
+
import { useResponsiveSidebar as om } from "./ui/components/SideNavbar/hooks/useResponsiveSidebar.js";
|
|
170
|
+
import { useSideNavbarCombined as tm } from "./ui/components/SideNavbar/hooks/useSideNavbar.js";
|
|
171
|
+
import { useSideNavbarContent as fm } from "./ui/components/SideNavbar/hooks/useSideNavbarContent.js";
|
|
172
|
+
import { useSideNavbarNavigation as mm } from "./ui/components/SideNavbar/hooks/useSideNavbarNavigation.js";
|
|
173
|
+
import { useToast as lm } from "./ui/components/Toast/useToast.js";
|
|
174
|
+
import { useVirtualScrolling as sm } from "./ui/components/Table/useVirtualScrolling.js";
|
|
175
|
+
export {
|
|
176
|
+
at as AMBER,
|
|
177
|
+
q as Accordion,
|
|
178
|
+
V as AlertDialog,
|
|
179
|
+
G as AppProvider,
|
|
180
|
+
Z as Autocomplete,
|
|
181
|
+
j as AutocompleteList,
|
|
182
|
+
X as AutocompleteOption,
|
|
183
|
+
ee as Avatar,
|
|
184
|
+
Dt as AvatarGroup,
|
|
185
|
+
ft as BLUE,
|
|
186
|
+
c as BRAND_COLORS,
|
|
187
|
+
Et as BRAND_PRIMARY,
|
|
188
|
+
yt as BRAND_SECONDARY,
|
|
189
|
+
R as BREAKPOINT_TOKENS,
|
|
190
|
+
re as Badge,
|
|
191
|
+
ae as Breadcrumb,
|
|
192
|
+
A as BreakpointTokenFactory,
|
|
193
|
+
pe as Button,
|
|
194
|
+
It as COLOR_SCALES,
|
|
195
|
+
pt as CYAN,
|
|
196
|
+
xe as Card,
|
|
197
|
+
de as Checkbox,
|
|
198
|
+
ie as Chip,
|
|
199
|
+
ne as Collapsible,
|
|
200
|
+
Se as ColorPicker,
|
|
201
|
+
Te as CommandPalette,
|
|
202
|
+
Ht as ConfigProvider,
|
|
203
|
+
kt as DashboardLayout,
|
|
204
|
+
ve as DataGrid,
|
|
205
|
+
Gt as DataTablePattern,
|
|
206
|
+
ce as DatePicker,
|
|
207
|
+
wt as DatePickerCalendar,
|
|
208
|
+
Yt as DatePickerInput,
|
|
209
|
+
zt as DatePickerProvider,
|
|
210
|
+
Re as Dialog,
|
|
211
|
+
Ut as DialogClose,
|
|
212
|
+
Qt as DialogContent,
|
|
213
|
+
Jt as DialogContext,
|
|
214
|
+
oa as DialogDescription,
|
|
215
|
+
ta as DialogFooter,
|
|
216
|
+
fa as DialogHeader,
|
|
217
|
+
ma as DialogProvider,
|
|
218
|
+
la as DialogTitle,
|
|
219
|
+
sa as DialogTrigger,
|
|
220
|
+
Oe as Drawer,
|
|
221
|
+
he as DrawerContent,
|
|
222
|
+
ye as DrawerFooter,
|
|
223
|
+
Ie as DrawerHeader,
|
|
224
|
+
He as Dropdown,
|
|
225
|
+
mt as EMERALD,
|
|
226
|
+
_e as EmptyState,
|
|
227
|
+
Be as ErrorMessage,
|
|
228
|
+
d as FONT_FAMILY_TOKENS,
|
|
229
|
+
s as FONT_WEIGHT_TOKENS,
|
|
230
|
+
xt as FUCHSIA,
|
|
231
|
+
Ke as FileUpload,
|
|
232
|
+
We as Form,
|
|
233
|
+
ua as FormContext,
|
|
234
|
+
Ca as FormField,
|
|
235
|
+
ba as FormProvider,
|
|
236
|
+
Na as FormWizardPattern,
|
|
237
|
+
lt as GRAY,
|
|
238
|
+
dt as GREEN,
|
|
239
|
+
qe as Header,
|
|
240
|
+
Pa as HeaderActions,
|
|
241
|
+
ze as HeaderComponent,
|
|
242
|
+
Aa as HeaderHamburger,
|
|
243
|
+
Da as HeaderLogo,
|
|
244
|
+
Ea as HeaderMobileMenu,
|
|
245
|
+
Fa as HeaderNavigation,
|
|
246
|
+
La as HeaderProvider,
|
|
247
|
+
st as INDIGO,
|
|
248
|
+
Ue as Info,
|
|
249
|
+
Qe as Input,
|
|
250
|
+
it as LIME,
|
|
251
|
+
Je as Label,
|
|
252
|
+
$e as LoginBox,
|
|
253
|
+
oo as Menu,
|
|
254
|
+
to as MenuContent,
|
|
255
|
+
fo as MenuItem,
|
|
256
|
+
mo as MenuSeparator,
|
|
257
|
+
lo as MenuTrigger,
|
|
258
|
+
io as Modal,
|
|
259
|
+
no as MultiSelect,
|
|
260
|
+
So as NavLink,
|
|
261
|
+
To as Navbar,
|
|
262
|
+
_a as NavbarContext,
|
|
263
|
+
Ka as NavbarGroup,
|
|
264
|
+
vo as NavbarItem,
|
|
265
|
+
co as NavbarSeparator,
|
|
266
|
+
Ro as NavbarToggle,
|
|
267
|
+
Oo as Navigation,
|
|
268
|
+
Do as NavigationComponent,
|
|
269
|
+
ut as ORANGE,
|
|
270
|
+
nt as PINK,
|
|
271
|
+
gt as PRIMITIVE_COLORS,
|
|
272
|
+
St as PURPLE,
|
|
273
|
+
Eo as PageHeader,
|
|
274
|
+
yo as PageHeaderComponent,
|
|
275
|
+
Io as Pagination,
|
|
276
|
+
Ho as Popover,
|
|
277
|
+
_o as Progress,
|
|
278
|
+
Ct as RED,
|
|
279
|
+
Tt as ROSE,
|
|
280
|
+
Bo as Radio,
|
|
281
|
+
Ko as Rating,
|
|
282
|
+
Wa as SEMANTIC_COLORS,
|
|
283
|
+
Ya as SEMANTIC_COLORS_DARK,
|
|
284
|
+
qa as SEMANTIC_COLORS_LIGHT,
|
|
285
|
+
r as SIDEBAR_TOKENS,
|
|
286
|
+
bt as SKY,
|
|
287
|
+
vt as SLATE,
|
|
288
|
+
f as SPACING_TOKENS,
|
|
289
|
+
Za as SearchAndFilterPattern,
|
|
290
|
+
Wo as SearchInput,
|
|
291
|
+
qo as Select,
|
|
292
|
+
Vo as Separator,
|
|
293
|
+
Zo as SideNavbar,
|
|
294
|
+
jo as SideNavbarBackdrop,
|
|
295
|
+
ja as SideNavbarConfigContext,
|
|
296
|
+
of as SideNavbarConfigProvider,
|
|
297
|
+
tf as SideNavbarProvider,
|
|
298
|
+
Xo as SideNavbarResizeHandle,
|
|
299
|
+
er as SideNavbarRoot,
|
|
300
|
+
ff as SideNavbarStateContext,
|
|
301
|
+
lf as SideNavbarStateProvider,
|
|
302
|
+
sf as SideNavbarThemeContext,
|
|
303
|
+
Cf as SideNavbarThemeProvider,
|
|
304
|
+
rr as SideNavbarToggle,
|
|
305
|
+
bf as SideNavbarToggleContext,
|
|
306
|
+
ar as Sidebar,
|
|
307
|
+
pr as SidebarContent,
|
|
308
|
+
Pf as SidebarContext,
|
|
309
|
+
xr as SidebarFooter,
|
|
310
|
+
dr as SidebarGroup,
|
|
311
|
+
ir as SidebarHeader,
|
|
312
|
+
Df as SidebarSlot,
|
|
313
|
+
Ef as SidebarSlotContent,
|
|
314
|
+
Ff as SidebarSlotContext,
|
|
315
|
+
Mf as SidebarSlotProvider,
|
|
316
|
+
nr as Skeleton,
|
|
317
|
+
Sr as Slider,
|
|
318
|
+
p as SpacingTokenFactory,
|
|
319
|
+
Tr as Spinner,
|
|
320
|
+
kf as Stat,
|
|
321
|
+
Gf as StatGroup,
|
|
322
|
+
vr as Stepper,
|
|
323
|
+
cr as Switch,
|
|
324
|
+
Nt as TEAL,
|
|
325
|
+
i as TYPOGRAPHY_TOKENS,
|
|
326
|
+
Rr as Table,
|
|
327
|
+
Or as TableActions,
|
|
328
|
+
hr as TableBody,
|
|
329
|
+
yr as TableCell,
|
|
330
|
+
wf as TableContext,
|
|
331
|
+
Ir as TableEmptyState,
|
|
332
|
+
Hr as TableFilters,
|
|
333
|
+
_r as TableHeader,
|
|
334
|
+
Br as TableHeaderCell,
|
|
335
|
+
Kr as TableHeaderRow,
|
|
336
|
+
Wr as TablePagination,
|
|
337
|
+
zf as TableProvider,
|
|
338
|
+
qr as TableRow,
|
|
339
|
+
Vr as Tabs,
|
|
340
|
+
Uf as TabsContent,
|
|
341
|
+
Qf as TabsContext,
|
|
342
|
+
$f as TabsList,
|
|
343
|
+
op as TabsProvider,
|
|
344
|
+
tp as TabsTrigger,
|
|
345
|
+
Zr as Text,
|
|
346
|
+
jr as Textarea,
|
|
347
|
+
fp as ThemeProvider,
|
|
348
|
+
Xr as TimePicker,
|
|
349
|
+
et as Timeline,
|
|
350
|
+
xp as Toast,
|
|
351
|
+
dp as ToastContainer,
|
|
352
|
+
ip as ToastContext,
|
|
353
|
+
Sp as ToastProvider,
|
|
354
|
+
rt as Tooltip,
|
|
355
|
+
u as TypographyTokenFactory,
|
|
356
|
+
ct as VIOLET,
|
|
357
|
+
Pt as YELLOW,
|
|
358
|
+
Tp as blendColors,
|
|
359
|
+
Ip as clampWidth,
|
|
360
|
+
_p as cn,
|
|
361
|
+
bp as darken,
|
|
362
|
+
Ja as defaultConfigValues,
|
|
363
|
+
uf as defaultThemeValues,
|
|
364
|
+
Bp as formatKeyboardShortcut,
|
|
365
|
+
E as getAnimation,
|
|
366
|
+
y as getAnimationClass,
|
|
367
|
+
O as getBreakpoint,
|
|
368
|
+
vp as getColor,
|
|
369
|
+
Np as getColorClass,
|
|
370
|
+
cp as getContrastColor,
|
|
371
|
+
Pp as getFocusColorClass,
|
|
372
|
+
Rp as getFocusRingClass,
|
|
373
|
+
Ap as getHoverColorClass,
|
|
374
|
+
D as getMediaQuery,
|
|
375
|
+
t as getNestedIndentClass,
|
|
376
|
+
_ as getOpacity,
|
|
377
|
+
k as getOpacityClass,
|
|
378
|
+
Rt as getPrimitiveColor,
|
|
379
|
+
At as getPrimitiveColorPalette,
|
|
380
|
+
za as getSemanticColor,
|
|
381
|
+
Op as getSemanticColorClass,
|
|
382
|
+
Va as getSemanticColorRole,
|
|
383
|
+
Dp as getSemanticColorValue,
|
|
384
|
+
m as getSpacing,
|
|
385
|
+
x as getSpacingClass,
|
|
386
|
+
F as getTransitionClass,
|
|
387
|
+
n as getTypography,
|
|
388
|
+
g as getTypographyClasses,
|
|
389
|
+
S as getTypographyLineHeight,
|
|
390
|
+
C as getTypographySize,
|
|
391
|
+
T as getTypographySizeFromFontSize,
|
|
392
|
+
b as getTypographyWeight,
|
|
393
|
+
v as getTypographyWeightFromFontWeight,
|
|
394
|
+
L as getZIndex,
|
|
395
|
+
H as getZIndexClass,
|
|
396
|
+
hp as isLightColor,
|
|
397
|
+
Ep as lighten,
|
|
398
|
+
Gp as parseKeyboardShortcut,
|
|
399
|
+
Lp as parseWidthToPixels,
|
|
400
|
+
K as useApp,
|
|
401
|
+
wp as useColumnResizing,
|
|
402
|
+
Mt as useConfig,
|
|
403
|
+
Xt as useDialogContext,
|
|
404
|
+
$t as useDialogContextOptional,
|
|
405
|
+
Yp as useFocusManagement,
|
|
406
|
+
na as useFormContext,
|
|
407
|
+
ga as useFormContextOptional,
|
|
408
|
+
zp as useFormFieldArray,
|
|
409
|
+
Up as useGroupState,
|
|
410
|
+
Ha as useHeaderContext,
|
|
411
|
+
Qp as useKeyboardShortcut,
|
|
412
|
+
Jp as useNavLink,
|
|
413
|
+
ka as useNavbar,
|
|
414
|
+
Ba as useNavbarRequired,
|
|
415
|
+
$p as useResize,
|
|
416
|
+
om as useResponsiveSidebar,
|
|
417
|
+
W as useScrollSpy,
|
|
418
|
+
tm as useSideNavbarCombined,
|
|
419
|
+
Xa as useSideNavbarConfig,
|
|
420
|
+
$a as useSideNavbarConfigRequired,
|
|
421
|
+
fm as useSideNavbarContent,
|
|
422
|
+
mm as useSideNavbarNavigation,
|
|
423
|
+
pf as useSideNavbarState,
|
|
424
|
+
mf as useSideNavbarStateRequired,
|
|
425
|
+
nf as useSideNavbarTheme,
|
|
426
|
+
gf as useSideNavbarThemeRequired,
|
|
427
|
+
vf as useSideNavbarToggleContext,
|
|
428
|
+
Nf as useSideNavbarToggleContextRequired,
|
|
429
|
+
Rf as useSidebar,
|
|
430
|
+
Af as useSidebarRequired,
|
|
431
|
+
If as useSidebarSlot,
|
|
432
|
+
Lf as useSidebarSlotRequired,
|
|
433
|
+
Wf as useTableContext,
|
|
434
|
+
Yf as useTableContextOptional,
|
|
435
|
+
jf as useTabsContext,
|
|
436
|
+
Jf as useTabsContextOptional,
|
|
437
|
+
pp as useTheme,
|
|
438
|
+
lm as useToast,
|
|
439
|
+
up as useToastContext,
|
|
440
|
+
np as useToastContextOptional,
|
|
441
|
+
sm as useVirtualScrolling,
|
|
442
|
+
Hp as validateWidthBounds,
|
|
443
|
+
yp as withOpacity
|
|
444
|
+
};
|
|
445
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import { useState as h } from "react";
|
|
4
|
+
import { ChevronDown as v } from "lucide-react";
|
|
5
|
+
import { getSpacingClass as o } from "../../tokens/spacing.js";
|
|
6
|
+
import { getAnimationClass as l } from "../../tokens/animations.js";
|
|
7
|
+
import { getTypographyClasses as x } from "../../tokens/typography.js";
|
|
8
|
+
import { getRadiusClass as N } from "../../tokens/radius.js";
|
|
9
|
+
import { cn as t } from "../../utils/cn.js";
|
|
10
|
+
function k({
|
|
11
|
+
items: f,
|
|
12
|
+
type: p = "single",
|
|
13
|
+
defaultOpen: a,
|
|
14
|
+
onValueChange: c,
|
|
15
|
+
className: u = ""
|
|
16
|
+
}) {
|
|
17
|
+
const g = () => a === void 0 ? [] : Array.isArray(a) ? a : [a], [n, b] = h(g), y = (s) => {
|
|
18
|
+
var e;
|
|
19
|
+
if ((e = f.find((d) => d.id === s)) != null && e.disabled) return;
|
|
20
|
+
let r;
|
|
21
|
+
p === "single" ? r = n.includes(s) ? [] : [s] : r = n.includes(s) ? n.filter((d) => d !== s) : [...n, s], b(r), c == null || c(p === "single" ? r[0] || "" : r);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ i("div", { className: `${o("xs", "space-y")} ${u}`, children: f.map((s) => {
|
|
24
|
+
const r = n.includes(s.id), e = s.disabled;
|
|
25
|
+
return /* @__PURE__ */ m(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: t(
|
|
29
|
+
"border border-line-default",
|
|
30
|
+
N("md"),
|
|
31
|
+
"overflow-hidden",
|
|
32
|
+
s.className
|
|
33
|
+
),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ m(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: () => y(s.id),
|
|
40
|
+
disabled: e,
|
|
41
|
+
className: t(
|
|
42
|
+
"w-full flex items-center justify-between",
|
|
43
|
+
o("base", "px"),
|
|
44
|
+
o("md", "py"),
|
|
45
|
+
x("label"),
|
|
46
|
+
"text-left text-fg-primary bg-surface-base hover:bg-surface-hover",
|
|
47
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-line-focus",
|
|
48
|
+
l("base"),
|
|
49
|
+
e ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
|
|
50
|
+
s.triggerClassName
|
|
51
|
+
),
|
|
52
|
+
"aria-expanded": r,
|
|
53
|
+
"aria-controls": `accordion-content-${s.id}`,
|
|
54
|
+
"aria-disabled": e,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ i("span", { children: s.title }),
|
|
57
|
+
/* @__PURE__ */ i(
|
|
58
|
+
v,
|
|
59
|
+
{
|
|
60
|
+
className: `
|
|
61
|
+
${o("sm", "ml")}
|
|
62
|
+
${l("base")}
|
|
63
|
+
${r ? "transform rotate-180" : ""}
|
|
64
|
+
${e ? "opacity-50" : ""}
|
|
65
|
+
`,
|
|
66
|
+
"aria-hidden": "true"
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ i(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
id: `accordion-content-${s.id}`,
|
|
76
|
+
className: t(
|
|
77
|
+
"grid",
|
|
78
|
+
l("base"),
|
|
79
|
+
r ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
80
|
+
),
|
|
81
|
+
"aria-hidden": !r,
|
|
82
|
+
children: /* @__PURE__ */ i("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ i(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
className: t(
|
|
86
|
+
o("base", "px"),
|
|
87
|
+
o("md", "py"),
|
|
88
|
+
"text-fg-secondary",
|
|
89
|
+
s.contentClassName
|
|
90
|
+
),
|
|
91
|
+
children: s.content
|
|
92
|
+
}
|
|
93
|
+
) })
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
s.id
|
|
99
|
+
);
|
|
100
|
+
}) });
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
k as default
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../../../../src/ui/components/Accordion/Accordion.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport { getSpacingClass } from \"../../tokens/spacing\";\nimport { getAnimationClass } from \"../../tokens/animations\";\nimport { getTypographyClasses } from \"../../tokens/typography\";\nimport { getRadiusClass } from \"../../tokens/radius\";\nimport { cn } from \"../../utils/cn\";\n\nexport type AccordionType = \"single\" | \"multiple\";\n\nexport interface AccordionItem {\n id: string;\n title: string;\n content: ReactNode;\n disabled?: boolean;\n /** Extra classes for the item wrapper (the bordered card). Merged after the defaults, so conflicting Tailwind classes win. */\n className?: string;\n /** Extra classes for the header button — overrides the default `label` typography (e.g. `font-semibold text-base`). */\n triggerClassName?: string;\n /** Extra classes for the content padding wrapper inside the panel. */\n contentClassName?: string;\n}\n\nexport interface AccordionProps {\n items: AccordionItem[];\n type?: AccordionType;\n defaultOpen?: string | string[];\n onValueChange?: (value: string | string[]) => void;\n className?: string;\n}\n\n/**\n * Accordion Component\n *\n * A collapsible content component that can display multiple items.\n * Supports single and multiple selection modes.\n *\n * Open panels animate via `grid-template-rows: 0fr → 1fr`, so content of\n * any height expands fully — there is no max-height clamp (issue #202).\n *\n * @example\n * ```tsx\n * <Accordion\n * type=\"single\"\n * items={[\n * { id: '1', title: 'Item 1', content: 'Content 1' },\n * { id: '2', title: 'Item 2', content: 'Content 2' },\n * ]}\n * />\n * ```\n */\nexport default function Accordion({\n items,\n type = \"single\",\n defaultOpen,\n onValueChange,\n className = \"\",\n}: AccordionProps) {\n const getInitialOpen = (): string[] => {\n if (defaultOpen === undefined) return [];\n return Array.isArray(defaultOpen) ? defaultOpen : [defaultOpen];\n };\n\n const [openItems, setOpenItems] = useState<string[]>(getInitialOpen);\n\n const handleToggle = (itemId: string) => {\n if (items.find((item) => item.id === itemId)?.disabled) return;\n\n let newOpenItems: string[];\n\n if (type === \"single\") {\n newOpenItems = openItems.includes(itemId) ? [] : [itemId];\n } else {\n newOpenItems = openItems.includes(itemId)\n ? openItems.filter((id) => id !== itemId)\n : [...openItems, itemId];\n }\n\n setOpenItems(newOpenItems);\n onValueChange?.(type === \"single\" ? newOpenItems[0] || \"\" : newOpenItems);\n };\n\n return (\n <div className={`${getSpacingClass(\"xs\", \"space-y\")} ${className}`}>\n {items.map((item) => {\n const isOpen = openItems.includes(item.id);\n const isDisabled = item.disabled;\n\n return (\n <div\n key={item.id}\n className={cn(\n \"border border-line-default\",\n getRadiusClass(\"md\"),\n \"overflow-hidden\",\n item.className,\n )}\n >\n <button\n type=\"button\"\n onClick={() => handleToggle(item.id)}\n disabled={isDisabled}\n className={cn(\n \"w-full flex items-center justify-between\",\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"md\", \"py\"),\n getTypographyClasses(\"label\"),\n \"text-left text-fg-primary bg-surface-base hover:bg-surface-hover\",\n \"focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-line-focus\",\n getAnimationClass(\"base\"),\n isDisabled ? \"opacity-50 cursor-not-allowed\" : \"cursor-pointer\",\n item.triggerClassName,\n )}\n aria-expanded={isOpen}\n aria-controls={`accordion-content-${item.id}`}\n aria-disabled={isDisabled}\n >\n <span>{item.title}</span>\n <ChevronDown\n className={`\n ${getSpacingClass(\"sm\", \"ml\")}\n ${getAnimationClass(\"base\")}\n ${isOpen ? \"transform rotate-180\" : \"\"}\n ${isDisabled ? \"opacity-50\" : \"\"}\n `}\n aria-hidden=\"true\"\n />\n </button>\n {/* grid-rows 0fr→1fr animates open/close at any content height\n (no max-height clamp — issue #202). The inner min-h-0 +\n overflow-hidden row is what lets the fraction collapse. */}\n <div\n id={`accordion-content-${item.id}`}\n className={cn(\n \"grid\",\n getAnimationClass(\"base\"),\n isOpen\n ? \"grid-rows-[1fr] opacity-100\"\n : \"grid-rows-[0fr] opacity-0\",\n )}\n aria-hidden={!isOpen}\n >\n <div className=\"min-h-0 overflow-hidden\">\n <div\n className={cn(\n getSpacingClass(\"base\", \"px\"),\n getSpacingClass(\"md\", \"py\"),\n \"text-fg-secondary\",\n item.contentClassName,\n )}\n >\n {item.content}\n </div>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n );\n}\n"],"names":["Accordion","items","type","defaultOpen","onValueChange","className","getInitialOpen","openItems","setOpenItems","useState","handleToggle","itemId","_a","item","newOpenItems","id","jsx","getSpacingClass","isOpen","isDisabled","jsxs","cn","getRadiusClass","getTypographyClasses","getAnimationClass","ChevronDown"],"mappings":";;;;;;;;;AAqDA,SAAwBA,EAAU;AAAA,EAChC,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAAmB;AACjB,QAAMC,IAAiB,MACjBH,MAAgB,SAAkB,CAAA,IAC/B,MAAM,QAAQA,CAAW,IAAIA,IAAc,CAACA,CAAW,GAG1D,CAACI,GAAWC,CAAY,IAAIC,EAAmBH,CAAc,GAE7DI,IAAe,CAACC,MAAmB;;AACvC,SAAIC,IAAAX,EAAM,KAAK,CAACY,MAASA,EAAK,OAAOF,CAAM,MAAvC,QAAAC,EAA0C,SAAU;AAExD,QAAIE;AAEJ,IAAIZ,MAAS,WACXY,IAAeP,EAAU,SAASI,CAAM,IAAI,CAAA,IAAK,CAACA,CAAM,IAExDG,IAAeP,EAAU,SAASI,CAAM,IACpCJ,EAAU,OAAO,CAACQ,MAAOA,MAAOJ,CAAM,IACtC,CAAC,GAAGJ,GAAWI,CAAM,GAG3BH,EAAaM,CAAY,GACzBV,KAAA,QAAAA,EAAgBF,MAAS,WAAWY,EAAa,CAAC,KAAK,KAAKA;AAAA,EAC9D;AAEA,SACE,gBAAAE,EAAC,OAAA,EAAI,WAAW,GAAGC,EAAgB,MAAM,SAAS,CAAC,IAAIZ,CAAS,IAC7D,UAAAJ,EAAM,IAAI,CAACY,MAAS;AACnB,UAAMK,IAASX,EAAU,SAASM,EAAK,EAAE,GACnCM,IAAaN,EAAK;AAExB,WACE,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWC;AAAA,UACT;AAAA,UACAC,EAAe,IAAI;AAAA,UACnB;AAAA,UACAT,EAAK;AAAA,QAAA;AAAA,QAGP,UAAA;AAAA,UAAA,gBAAAO;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAAS,MAAMV,EAAaG,EAAK,EAAE;AAAA,cACnC,UAAUM;AAAA,cACV,WAAWE;AAAA,gBACT;AAAA,gBACAJ,EAAgB,QAAQ,IAAI;AAAA,gBAC5BA,EAAgB,MAAM,IAAI;AAAA,gBAC1BM,EAAqB,OAAO;AAAA,gBAC5B;AAAA,gBACA;AAAA,gBACAC,EAAkB,MAAM;AAAA,gBACxBL,IAAa,kCAAkC;AAAA,gBAC/CN,EAAK;AAAA,cAAA;AAAA,cAEP,iBAAeK;AAAA,cACf,iBAAe,qBAAqBL,EAAK,EAAE;AAAA,cAC3C,iBAAeM;AAAA,cAEf,UAAA;AAAA,gBAAA,gBAAAH,EAAC,QAAA,EAAM,YAAK,MAAA,CAAM;AAAA,gBAClB,gBAAAA;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,WAAW;AAAA,oBACPR,EAAgB,MAAM,IAAI,CAAC;AAAA,oBAC3BO,EAAkB,MAAM,CAAC;AAAA,oBACzBN,IAAS,yBAAyB,EAAE;AAAA,oBACpCC,IAAa,eAAe,EAAE;AAAA;AAAA,oBAElC,eAAY;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACd;AAAA,YAAA;AAAA,UAAA;AAAA,UAKF,gBAAAH;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,IAAI,qBAAqBH,EAAK,EAAE;AAAA,cAChC,WAAWQ;AAAA,gBACT;AAAA,gBACAG,EAAkB,MAAM;AAAA,gBACxBN,IACI,gCACA;AAAA,cAAA;AAAA,cAEN,eAAa,CAACA;AAAA,cAEd,UAAA,gBAAAF,EAAC,OAAA,EAAI,WAAU,2BACb,UAAA,gBAAAA;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAWK;AAAA,oBACTJ,EAAgB,QAAQ,IAAI;AAAA,oBAC5BA,EAAgB,MAAM,IAAI;AAAA,oBAC1B;AAAA,oBACAJ,EAAK;AAAA,kBAAA;AAAA,kBAGN,UAAAA,EAAK;AAAA,gBAAA;AAAA,cAAA,EACR,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,MAhEKA,EAAK;AAAA,IAAA;AAAA,EAmEhB,CAAC,EAAA,CACH;AAEJ;"}
|