@kismet-ux/constellation 1.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/LICENSE +21 -0
- package/README.md +170 -0
- package/dist/brand/Logo/index.d.ts +2 -0
- package/dist/brand/Logo/index.d.ts.map +1 -0
- package/dist/brand/Logo/logo.d.ts +23 -0
- package/dist/brand/Logo/logo.d.ts.map +1 -0
- package/dist/brand/Logo/logo.js +28 -0
- package/dist/brand/Logo/logo.js.map +1 -0
- package/dist/brand/Logo/logo.module.scss.js +4 -0
- package/dist/brand/Logo/logo.module.scss.js.map +1 -0
- package/dist/brand/index.d.ts +2 -0
- package/dist/brand/index.d.ts.map +1 -0
- package/dist/brand.d.ts +25 -0
- package/dist/brand.js +2 -0
- package/dist/brand.js.map +1 -0
- package/dist/form/Checkbox/checkbox.d.ts +20 -0
- package/dist/form/Checkbox/checkbox.d.ts.map +1 -0
- package/dist/form/Checkbox/checkbox.js +57 -0
- package/dist/form/Checkbox/checkbox.js.map +1 -0
- package/dist/form/Checkbox/checkbox.module.scss.js +4 -0
- package/dist/form/Checkbox/checkbox.module.scss.js.map +1 -0
- package/dist/form/Checkbox/index.d.ts +2 -0
- package/dist/form/Checkbox/index.d.ts.map +1 -0
- package/dist/form/DatePicker/date-picker.d.ts +5 -0
- package/dist/form/DatePicker/date-picker.d.ts.map +1 -0
- package/dist/form/DatePicker/date-picker.js +251 -0
- package/dist/form/DatePicker/date-picker.js.map +1 -0
- package/dist/form/DatePicker/date-picker.module.scss.js +4 -0
- package/dist/form/DatePicker/date-picker.module.scss.js.map +1 -0
- package/dist/form/DatePicker/index.d.ts +2 -0
- package/dist/form/DatePicker/index.d.ts.map +1 -0
- package/dist/form/DatePicker/use-calendar.d.ts +40 -0
- package/dist/form/DatePicker/use-calendar.d.ts.map +1 -0
- package/dist/form/DatePicker/use-calendar.js +202 -0
- package/dist/form/DatePicker/use-calendar.js.map +1 -0
- package/dist/form/Input/index.d.ts +2 -0
- package/dist/form/Input/index.d.ts.map +1 -0
- package/dist/form/Input/input.d.ts +23 -0
- package/dist/form/Input/input.d.ts.map +1 -0
- package/dist/form/Input/input.js +24 -0
- package/dist/form/Input/input.js.map +1 -0
- package/dist/form/Input/input.module.scss.js +4 -0
- package/dist/form/Input/input.module.scss.js.map +1 -0
- package/dist/form/Label/index.d.ts +2 -0
- package/dist/form/Label/index.d.ts.map +1 -0
- package/dist/form/Label/label-variants.d.ts +5 -0
- package/dist/form/Label/label-variants.d.ts.map +1 -0
- package/dist/form/Label/label-variants.js +29 -0
- package/dist/form/Label/label-variants.js.map +1 -0
- package/dist/form/Label/label.d.ts +10 -0
- package/dist/form/Label/label.d.ts.map +1 -0
- package/dist/form/Label/label.js +13 -0
- package/dist/form/Label/label.js.map +1 -0
- package/dist/form/Label/label.module.scss.js +4 -0
- package/dist/form/Label/label.module.scss.js.map +1 -0
- package/dist/form/Select/index.d.ts +2 -0
- package/dist/form/Select/index.d.ts.map +1 -0
- package/dist/form/Select/select.d.ts +16 -0
- package/dist/form/Select/select.d.ts.map +1 -0
- package/dist/form/Select/select.js +857 -0
- package/dist/form/Select/select.js.map +1 -0
- package/dist/form/Select/select.module.scss.js +4 -0
- package/dist/form/Select/select.module.scss.js.map +1 -0
- package/dist/form/index.d.ts +6 -0
- package/dist/form/index.d.ts.map +1 -0
- package/dist/form.d.ts +5 -0
- package/dist/form.js +6 -0
- package/dist/form.js.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/layout/index.d.ts +2 -0
- package/dist/hooks/layout/index.d.ts.map +1 -0
- package/dist/hooks/layout/use-sidebar.d.ts +3 -0
- package/dist/hooks/layout/use-sidebar.d.ts.map +1 -0
- package/dist/hooks/layout/use-sidebar.js +13 -0
- package/dist/hooks/layout/use-sidebar.js.map +1 -0
- package/dist/hooks/ui/index.d.ts +3 -0
- package/dist/hooks/ui/index.d.ts.map +1 -0
- package/dist/hooks/ui/use-alerts.d.ts +3 -0
- package/dist/hooks/ui/use-alerts.d.ts.map +1 -0
- package/dist/hooks/ui/use-alerts.js +13 -0
- package/dist/hooks/ui/use-alerts.js.map +1 -0
- package/dist/hooks/ui/use-table-sorting.d.ts +6 -0
- package/dist/hooks/ui/use-table-sorting.d.ts.map +1 -0
- package/dist/hooks/ui/use-table-sorting.js +37 -0
- package/dist/hooks/ui/use-table-sorting.js.map +1 -0
- package/dist/hooks/use-appearance.d.ts +10 -0
- package/dist/hooks/use-appearance.d.ts.map +1 -0
- package/dist/hooks/use-appearance.js +123 -0
- package/dist/hooks/use-appearance.js.map +1 -0
- package/dist/hooks/use-initials.d.ts +2 -0
- package/dist/hooks/use-initials.d.ts.map +1 -0
- package/dist/hooks/use-initials.js +17 -0
- package/dist/hooks/use-initials.js.map +1 -0
- package/dist/hooks/use-mobile-navigation.d.ts +2 -0
- package/dist/hooks/use-mobile-navigation.d.ts.map +1 -0
- package/dist/hooks/use-mobile-navigation.js +11 -0
- package/dist/hooks/use-mobile-navigation.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +6 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +73 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/index-Bzf20Rpc.d.ts +120 -0
- package/dist/index-DECPicJT.d.ts +450 -0
- package/dist/index-qbk6vH0X.d.ts +186 -0
- package/dist/index.css +7611 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/input-CWHXOpeH.d.ts +25 -0
- package/dist/internal/create-ripple.d.ts +8 -0
- package/dist/internal/create-ripple.d.ts.map +1 -0
- package/dist/internal/create-ripple.js +24 -0
- package/dist/internal/create-ripple.js.map +1 -0
- package/dist/internal/merge-refs.d.ts +3 -0
- package/dist/internal/merge-refs.d.ts.map +1 -0
- package/dist/internal/merge-refs.js +15 -0
- package/dist/internal/merge-refs.js.map +1 -0
- package/dist/internal/slot.d.ts +7 -0
- package/dist/internal/slot.d.ts.map +1 -0
- package/dist/internal/slot.js +42 -0
- package/dist/internal/slot.js.map +1 -0
- package/dist/internal/use-animation-state.d.ts +12 -0
- package/dist/internal/use-animation-state.d.ts.map +1 -0
- package/dist/internal/use-animation-state.js +36 -0
- package/dist/internal/use-animation-state.js.map +1 -0
- package/dist/internal/use-focus-trap.d.ts +3 -0
- package/dist/internal/use-focus-trap.d.ts.map +1 -0
- package/dist/internal/use-focus-trap.js +55 -0
- package/dist/internal/use-focus-trap.js.map +1 -0
- package/dist/internal/use-scroll-lock.d.ts +2 -0
- package/dist/internal/use-scroll-lock.d.ts.map +1 -0
- package/dist/internal/use-scroll-lock.js +22 -0
- package/dist/internal/use-scroll-lock.js.map +1 -0
- package/dist/internal/with-aria-hidden-children.d.ts +16 -0
- package/dist/internal/with-aria-hidden-children.d.ts.map +1 -0
- package/dist/internal/with-aria-hidden-children.js +29 -0
- package/dist/internal/with-aria-hidden-children.js.map +1 -0
- package/dist/layout/AppContent/app-content.d.ts +3 -0
- package/dist/layout/AppContent/app-content.d.ts.map +1 -0
- package/dist/layout/AppContent/app-content.js +11 -0
- package/dist/layout/AppContent/app-content.js.map +1 -0
- package/dist/layout/AppContent/app-content.module.scss.js +4 -0
- package/dist/layout/AppContent/app-content.module.scss.js.map +1 -0
- package/dist/layout/AppContent/index.d.ts +2 -0
- package/dist/layout/AppContent/index.d.ts.map +1 -0
- package/dist/layout/AppFooter/app-footer.d.ts +10 -0
- package/dist/layout/AppFooter/app-footer.d.ts.map +1 -0
- package/dist/layout/AppFooter/app-footer.js +19 -0
- package/dist/layout/AppFooter/app-footer.js.map +1 -0
- package/dist/layout/AppFooter/app-footer.module.scss.js +4 -0
- package/dist/layout/AppFooter/app-footer.module.scss.js.map +1 -0
- package/dist/layout/AppFooter/index.d.ts +2 -0
- package/dist/layout/AppFooter/index.d.ts.map +1 -0
- package/dist/layout/AppShell/app-shell.d.ts +11 -0
- package/dist/layout/AppShell/app-shell.d.ts.map +1 -0
- package/dist/layout/AppShell/app-shell.js +9 -0
- package/dist/layout/AppShell/app-shell.js.map +1 -0
- package/dist/layout/AppShell/index.d.ts +2 -0
- package/dist/layout/AppShell/index.d.ts.map +1 -0
- package/dist/layout/AppSidebar/app-sidebar.d.ts +14 -0
- package/dist/layout/AppSidebar/app-sidebar.d.ts.map +1 -0
- package/dist/layout/AppSidebar/app-sidebar.js +71 -0
- package/dist/layout/AppSidebar/app-sidebar.js.map +1 -0
- package/dist/layout/AppSidebar/index.d.ts +2 -0
- package/dist/layout/AppSidebar/index.d.ts.map +1 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts +13 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts.map +1 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.js +20 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.module.scss.js +4 -0
- package/dist/layout/AppSidebarHeader/app-sidebar-header.module.scss.js.map +1 -0
- package/dist/layout/AppSidebarHeader/index.d.ts +2 -0
- package/dist/layout/AppSidebarHeader/index.d.ts.map +1 -0
- package/dist/layout/Collapse/collapse.d.ts +8 -0
- package/dist/layout/Collapse/collapse.d.ts.map +1 -0
- package/dist/layout/Collapse/collapse.js +14 -0
- package/dist/layout/Collapse/collapse.js.map +1 -0
- package/dist/layout/Collapse/collapse.module.scss.js +4 -0
- package/dist/layout/Collapse/collapse.module.scss.js.map +1 -0
- package/dist/layout/Collapse/index.d.ts +2 -0
- package/dist/layout/Collapse/index.d.ts.map +1 -0
- package/dist/layout/Column/column.d.ts +4 -0
- package/dist/layout/Column/column.d.ts.map +1 -0
- package/dist/layout/Column/column.js +14 -0
- package/dist/layout/Column/column.js.map +1 -0
- package/dist/layout/Column/column.module.scss.js +4 -0
- package/dist/layout/Column/column.module.scss.js.map +1 -0
- package/dist/layout/Column/index.d.ts +3 -0
- package/dist/layout/Column/index.d.ts.map +1 -0
- package/dist/layout/Container/container.d.ts +4 -0
- package/dist/layout/Container/container.d.ts.map +1 -0
- package/dist/layout/Container/container.js +35 -0
- package/dist/layout/Container/container.js.map +1 -0
- package/dist/layout/Container/container.module.scss.js +4 -0
- package/dist/layout/Container/container.module.scss.js.map +1 -0
- package/dist/layout/Container/index.d.ts +2 -0
- package/dist/layout/Container/index.d.ts.map +1 -0
- package/dist/layout/Grid/grid.d.ts +5 -0
- package/dist/layout/Grid/grid.d.ts.map +1 -0
- package/dist/layout/Grid/grid.js +15 -0
- package/dist/layout/Grid/grid.js.map +1 -0
- package/dist/layout/Grid/grid.module.scss.js +4 -0
- package/dist/layout/Grid/grid.module.scss.js.map +1 -0
- package/dist/layout/Grid/index.d.ts +2 -0
- package/dist/layout/Grid/index.d.ts.map +1 -0
- package/dist/layout/Row/index.d.ts +3 -0
- package/dist/layout/Row/index.d.ts.map +1 -0
- package/dist/layout/Row/row.d.ts +4 -0
- package/dist/layout/Row/row.d.ts.map +1 -0
- package/dist/layout/Row/row.js +19 -0
- package/dist/layout/Row/row.js.map +1 -0
- package/dist/layout/Row/row.module.scss.js +4 -0
- package/dist/layout/Row/row.module.scss.js.map +1 -0
- package/dist/layout/Sidebar/index.d.ts +2 -0
- package/dist/layout/Sidebar/index.d.ts.map +1 -0
- package/dist/layout/Sidebar/sidebar-context.d.ts +4 -0
- package/dist/layout/Sidebar/sidebar-context.d.ts.map +1 -0
- package/dist/layout/Sidebar/sidebar-context.js +6 -0
- package/dist/layout/Sidebar/sidebar-context.js.map +1 -0
- package/dist/layout/Sidebar/sidebar-variants.d.ts +5 -0
- package/dist/layout/Sidebar/sidebar-variants.d.ts.map +1 -0
- package/dist/layout/Sidebar/sidebar-variants.js +23 -0
- package/dist/layout/Sidebar/sidebar-variants.js.map +1 -0
- package/dist/layout/Sidebar/sidebar.d.ts +57 -0
- package/dist/layout/Sidebar/sidebar.d.ts.map +1 -0
- package/dist/layout/Sidebar/sidebar.js +200 -0
- package/dist/layout/Sidebar/sidebar.js.map +1 -0
- package/dist/layout/Sidebar/sidebar.module.scss.js +4 -0
- package/dist/layout/Sidebar/sidebar.module.scss.js.map +1 -0
- package/dist/layout/Skeleton/index.d.ts +2 -0
- package/dist/layout/Skeleton/index.d.ts.map +1 -0
- package/dist/layout/Skeleton/skeleton.d.ts +3 -0
- package/dist/layout/Skeleton/skeleton.d.ts.map +1 -0
- package/dist/layout/Skeleton/skeleton.js +10 -0
- package/dist/layout/Skeleton/skeleton.js.map +1 -0
- package/dist/layout/Skeleton/skeleton.module.scss.js +4 -0
- package/dist/layout/Skeleton/skeleton.module.scss.js.map +1 -0
- package/dist/layout/index.d.ts +13 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout.d.ts +10 -0
- package/dist/layout.js +13 -0
- package/dist/layout.js.map +1 -0
- package/dist/nav-user-CJIcWKyY.d.ts +41 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.d.ts +7 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.js +19 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.module.scss.js +4 -0
- package/dist/navigation/Breadcrumbs/breadcrumbs.module.scss.js.map +1 -0
- package/dist/navigation/Breadcrumbs/index.d.ts +2 -0
- package/dist/navigation/Breadcrumbs/index.d.ts.map +1 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.d.ts +50 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.d.ts.map +1 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.js +193 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.js.map +1 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.module.scss.js +4 -0
- package/dist/navigation/DropdownMenu/dropdown-menu.module.scss.js.map +1 -0
- package/dist/navigation/DropdownMenu/index.d.ts +2 -0
- package/dist/navigation/DropdownMenu/index.d.ts.map +1 -0
- package/dist/navigation/Link/index.d.ts +2 -0
- package/dist/navigation/Link/index.d.ts.map +1 -0
- package/dist/navigation/Link/link-variants.d.ts +6 -0
- package/dist/navigation/Link/link-variants.d.ts.map +1 -0
- package/dist/navigation/Link/link-variants.js +33 -0
- package/dist/navigation/Link/link-variants.js.map +1 -0
- package/dist/navigation/Link/link.d.ts +24 -0
- package/dist/navigation/Link/link.d.ts.map +1 -0
- package/dist/navigation/Link/link.js +49 -0
- package/dist/navigation/Link/link.js.map +1 -0
- package/dist/navigation/Link/link.module.scss.js +4 -0
- package/dist/navigation/Link/link.module.scss.js.map +1 -0
- package/dist/navigation/NavUser/index.d.ts +2 -0
- package/dist/navigation/NavUser/index.d.ts.map +1 -0
- package/dist/navigation/NavUser/nav-user.d.ts +8 -0
- package/dist/navigation/NavUser/nav-user.d.ts.map +1 -0
- package/dist/navigation/NavUser/nav-user.js +15 -0
- package/dist/navigation/NavUser/nav-user.js.map +1 -0
- package/dist/navigation/NavUser/nav-user.module.scss.js +4 -0
- package/dist/navigation/NavUser/nav-user.module.scss.js.map +1 -0
- package/dist/navigation/Router/index.d.ts +2 -0
- package/dist/navigation/Router/index.d.ts.map +1 -0
- package/dist/navigation/Router/router-context.d.ts +38 -0
- package/dist/navigation/Router/router-context.d.ts.map +1 -0
- package/dist/navigation/Router/router-context.js +49 -0
- package/dist/navigation/Router/router-context.js.map +1 -0
- package/dist/navigation/Sheet/index.d.ts +2 -0
- package/dist/navigation/Sheet/index.d.ts.map +1 -0
- package/dist/navigation/Sheet/sheet.d.ts +36 -0
- package/dist/navigation/Sheet/sheet.d.ts.map +1 -0
- package/dist/navigation/Sheet/sheet.js +104 -0
- package/dist/navigation/Sheet/sheet.js.map +1 -0
- package/dist/navigation/Sheet/sheet.module.scss.js +4 -0
- package/dist/navigation/Sheet/sheet.module.scss.js.map +1 -0
- package/dist/navigation/index.d.ts +7 -0
- package/dist/navigation/index.d.ts.map +1 -0
- package/dist/navigation.d.ts +160 -0
- package/dist/navigation.js +7 -0
- package/dist/navigation.js.map +1 -0
- package/dist/row-CS9-talZ.d.ts +14 -0
- package/dist/settings/AppearanceDropdown/appearance-dropdown.d.ts +3 -0
- package/dist/settings/AppearanceDropdown/appearance-dropdown.d.ts.map +1 -0
- package/dist/settings/AppearanceDropdown/appearance-dropdown.js +27 -0
- package/dist/settings/AppearanceDropdown/appearance-dropdown.js.map +1 -0
- package/dist/settings/AppearanceDropdown/index.d.ts +2 -0
- package/dist/settings/AppearanceDropdown/index.d.ts.map +1 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.d.ts +7 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.d.ts.map +1 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.js +23 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.module.scss.js +4 -0
- package/dist/settings/AppearanceTabs/appearance-tabs.module.scss.js.map +1 -0
- package/dist/settings/AppearanceTabs/index.d.ts +2 -0
- package/dist/settings/AppearanceTabs/index.d.ts.map +1 -0
- package/dist/settings/index.d.ts +3 -0
- package/dist/settings/index.d.ts.map +1 -0
- package/dist/settings.d.ts +10 -0
- package/dist/settings.js +3 -0
- package/dist/settings.js.map +1 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/index.d.ts.map +1 -0
- package/dist/tooltip-XagXjWLB.d.ts +41 -0
- package/dist/types/app.d.ts +7 -0
- package/dist/types/app.d.ts.map +1 -0
- package/dist/types/form/date-picker.d.ts +19 -0
- package/dist/types/form/date-picker.d.ts.map +1 -0
- package/dist/types/form/select.d.ts +52 -0
- package/dist/types/form/select.d.ts.map +1 -0
- package/dist/types/form/theme.d.ts +2 -0
- package/dist/types/form/theme.d.ts.map +1 -0
- package/dist/types/form/upload.d.ts +4 -0
- package/dist/types/form/upload.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/layout/column.d.ts +11 -0
- package/dist/types/layout/column.d.ts.map +1 -0
- package/dist/types/layout/container.d.ts +18 -0
- package/dist/types/layout/container.d.ts.map +1 -0
- package/dist/types/layout/grid.d.ts +23 -0
- package/dist/types/layout/grid.d.ts.map +1 -0
- package/dist/types/layout/row.d.ts +12 -0
- package/dist/types/layout/row.d.ts.map +1 -0
- package/dist/types/layout/sidebar.d.ts +14 -0
- package/dist/types/layout/sidebar.d.ts.map +1 -0
- package/dist/types/navigation.d.ts +30 -0
- package/dist/types/navigation.d.ts.map +1 -0
- package/dist/types/ui/alerts.d.ts +20 -0
- package/dist/types/ui/alerts.d.ts.map +1 -0
- package/dist/types/ui/pagination.d.ts +10 -0
- package/dist/types/ui/pagination.d.ts.map +1 -0
- package/dist/types/ui/table.d.ts +11 -0
- package/dist/types/ui/table.d.ts.map +1 -0
- package/dist/typography/Heading/heading.d.ts +21 -0
- package/dist/typography/Heading/heading.d.ts.map +1 -0
- package/dist/typography/Heading/heading.js +21 -0
- package/dist/typography/Heading/heading.js.map +1 -0
- package/dist/typography/Heading/heading.module.scss.js +4 -0
- package/dist/typography/Heading/heading.module.scss.js.map +1 -0
- package/dist/typography/Heading/index.d.ts +2 -0
- package/dist/typography/Heading/index.d.ts.map +1 -0
- package/dist/typography/TruncatedText/index.d.ts +2 -0
- package/dist/typography/TruncatedText/index.d.ts.map +1 -0
- package/dist/typography/TruncatedText/truncated-text.d.ts +15 -0
- package/dist/typography/TruncatedText/truncated-text.d.ts.map +1 -0
- package/dist/typography/TruncatedText/truncated-text.js +61 -0
- package/dist/typography/TruncatedText/truncated-text.js.map +1 -0
- package/dist/typography/TruncatedText/truncated-text.module.scss.js +4 -0
- package/dist/typography/TruncatedText/truncated-text.module.scss.js.map +1 -0
- package/dist/typography/Typography/index.d.ts +2 -0
- package/dist/typography/Typography/index.d.ts.map +1 -0
- package/dist/typography/Typography/typography-variants.d.ts +9 -0
- package/dist/typography/Typography/typography-variants.d.ts.map +1 -0
- package/dist/typography/Typography/typography-variants.js +75 -0
- package/dist/typography/Typography/typography-variants.js.map +1 -0
- package/dist/typography/Typography/typography.d.ts +19 -0
- package/dist/typography/Typography/typography.d.ts.map +1 -0
- package/dist/typography/Typography/typography.js +43 -0
- package/dist/typography/Typography/typography.js.map +1 -0
- package/dist/typography/Typography/typography.module.scss.js +4 -0
- package/dist/typography/Typography/typography.module.scss.js.map +1 -0
- package/dist/typography/index.d.ts +4 -0
- package/dist/typography/index.d.ts.map +1 -0
- package/dist/typography-DOZHFR5A.d.ts +21 -0
- package/dist/typography.d.ts +37 -0
- package/dist/typography.js +4 -0
- package/dist/typography.js.map +1 -0
- package/dist/ui/Alert/alert-context.d.ts +3 -0
- package/dist/ui/Alert/alert-context.d.ts.map +1 -0
- package/dist/ui/Alert/alert-context.js +6 -0
- package/dist/ui/Alert/alert-context.js.map +1 -0
- package/dist/ui/Alert/alert-persist.d.ts +4 -0
- package/dist/ui/Alert/alert-persist.d.ts.map +1 -0
- package/dist/ui/Alert/alert-persist.js +27 -0
- package/dist/ui/Alert/alert-persist.js.map +1 -0
- package/dist/ui/Alert/alert-provider.d.ts +6 -0
- package/dist/ui/Alert/alert-provider.d.ts.map +1 -0
- package/dist/ui/Alert/alert-provider.js +57 -0
- package/dist/ui/Alert/alert-provider.js.map +1 -0
- package/dist/ui/Alert/alert-variants.d.ts +4 -0
- package/dist/ui/Alert/alert-variants.d.ts.map +1 -0
- package/dist/ui/Alert/alert-variants.js +23 -0
- package/dist/ui/Alert/alert-variants.js.map +1 -0
- package/dist/ui/Alert/alert.d.ts +24 -0
- package/dist/ui/Alert/alert.d.ts.map +1 -0
- package/dist/ui/Alert/alert.js +37 -0
- package/dist/ui/Alert/alert.js.map +1 -0
- package/dist/ui/Alert/alert.module.scss.js +4 -0
- package/dist/ui/Alert/alert.module.scss.js.map +1 -0
- package/dist/ui/Alert/index.d.ts +4 -0
- package/dist/ui/Alert/index.d.ts.map +1 -0
- package/dist/ui/Avatar/avatar.d.ts +9 -0
- package/dist/ui/Avatar/avatar.d.ts.map +1 -0
- package/dist/ui/Avatar/avatar.js +29 -0
- package/dist/ui/Avatar/avatar.js.map +1 -0
- package/dist/ui/Avatar/avatar.module.scss.js +4 -0
- package/dist/ui/Avatar/avatar.module.scss.js.map +1 -0
- package/dist/ui/Avatar/index.d.ts +2 -0
- package/dist/ui/Avatar/index.d.ts.map +1 -0
- package/dist/ui/Button/button-variants.d.ts +8 -0
- package/dist/ui/Button/button-variants.d.ts.map +1 -0
- package/dist/ui/Button/button-variants.js +45 -0
- package/dist/ui/Button/button-variants.js.map +1 -0
- package/dist/ui/Button/button.d.ts +9 -0
- package/dist/ui/Button/button.d.ts.map +1 -0
- package/dist/ui/Button/button.js +65 -0
- package/dist/ui/Button/button.js.map +1 -0
- package/dist/ui/Button/button.module.scss.js +4 -0
- package/dist/ui/Button/button.module.scss.js.map +1 -0
- package/dist/ui/Button/index.d.ts +2 -0
- package/dist/ui/Button/index.d.ts.map +1 -0
- package/dist/ui/Chip/chip-variants.d.ts +6 -0
- package/dist/ui/Chip/chip-variants.d.ts.map +1 -0
- package/dist/ui/Chip/chip-variants.js +32 -0
- package/dist/ui/Chip/chip-variants.js.map +1 -0
- package/dist/ui/Chip/chip.d.ts +8 -0
- package/dist/ui/Chip/chip.d.ts.map +1 -0
- package/dist/ui/Chip/chip.js +13 -0
- package/dist/ui/Chip/chip.js.map +1 -0
- package/dist/ui/Chip/chip.module.scss.js +4 -0
- package/dist/ui/Chip/chip.module.scss.js.map +1 -0
- package/dist/ui/Chip/index.d.ts +2 -0
- package/dist/ui/Chip/index.d.ts.map +1 -0
- package/dist/ui/CodeBlock/code-block-variants.d.ts +5 -0
- package/dist/ui/CodeBlock/code-block-variants.d.ts.map +1 -0
- package/dist/ui/CodeBlock/code-block-variants.js +29 -0
- package/dist/ui/CodeBlock/code-block-variants.js.map +1 -0
- package/dist/ui/CodeBlock/code-block.d.ts +20 -0
- package/dist/ui/CodeBlock/code-block.d.ts.map +1 -0
- package/dist/ui/CodeBlock/code-block.js +70 -0
- package/dist/ui/CodeBlock/code-block.js.map +1 -0
- package/dist/ui/CodeBlock/code-block.module.scss.js +4 -0
- package/dist/ui/CodeBlock/code-block.module.scss.js.map +1 -0
- package/dist/ui/CodeBlock/index.d.ts +2 -0
- package/dist/ui/CodeBlock/index.d.ts.map +1 -0
- package/dist/ui/DevIndicator/dev-indicator.d.ts +5 -0
- package/dist/ui/DevIndicator/dev-indicator.d.ts.map +1 -0
- package/dist/ui/DevIndicator/dev-indicator.js +20 -0
- package/dist/ui/DevIndicator/dev-indicator.js.map +1 -0
- package/dist/ui/DevIndicator/dev-indicator.module.scss.js +4 -0
- package/dist/ui/DevIndicator/dev-indicator.module.scss.js.map +1 -0
- package/dist/ui/DevIndicator/index.d.ts +2 -0
- package/dist/ui/DevIndicator/index.d.ts.map +1 -0
- package/dist/ui/Dialog/dialog.d.ts +50 -0
- package/dist/ui/Dialog/dialog.d.ts.map +1 -0
- package/dist/ui/Dialog/dialog.js +133 -0
- package/dist/ui/Dialog/dialog.js.map +1 -0
- package/dist/ui/Dialog/dialog.module.scss.js +4 -0
- package/dist/ui/Dialog/dialog.module.scss.js.map +1 -0
- package/dist/ui/Dialog/index.d.ts +2 -0
- package/dist/ui/Dialog/index.d.ts.map +1 -0
- package/dist/ui/EmptyState/empty-state-variants.d.ts +5 -0
- package/dist/ui/EmptyState/empty-state-variants.d.ts.map +1 -0
- package/dist/ui/EmptyState/empty-state-variants.js +29 -0
- package/dist/ui/EmptyState/empty-state-variants.js.map +1 -0
- package/dist/ui/EmptyState/empty-state.d.ts +16 -0
- package/dist/ui/EmptyState/empty-state.d.ts.map +1 -0
- package/dist/ui/EmptyState/empty-state.js +13 -0
- package/dist/ui/EmptyState/empty-state.js.map +1 -0
- package/dist/ui/EmptyState/empty-state.module.scss.js +4 -0
- package/dist/ui/EmptyState/empty-state.module.scss.js.map +1 -0
- package/dist/ui/EmptyState/index.d.ts +2 -0
- package/dist/ui/EmptyState/index.d.ts.map +1 -0
- package/dist/ui/Icon/icon-variants.d.ts +7 -0
- package/dist/ui/Icon/icon-variants.d.ts.map +1 -0
- package/dist/ui/Icon/icon-variants.js +43 -0
- package/dist/ui/Icon/icon-variants.js.map +1 -0
- package/dist/ui/Icon/icon.d.ts +44 -0
- package/dist/ui/Icon/icon.d.ts.map +1 -0
- package/dist/ui/Icon/icon.js +41 -0
- package/dist/ui/Icon/icon.js.map +1 -0
- package/dist/ui/Icon/icon.module.scss.js +4 -0
- package/dist/ui/Icon/icon.module.scss.js.map +1 -0
- package/dist/ui/Icon/index.d.ts +2 -0
- package/dist/ui/Icon/index.d.ts.map +1 -0
- package/dist/ui/List/index.d.ts +2 -0
- package/dist/ui/List/index.d.ts.map +1 -0
- package/dist/ui/List/list.d.ts +14 -0
- package/dist/ui/List/list.d.ts.map +1 -0
- package/dist/ui/List/list.js +20 -0
- package/dist/ui/List/list.js.map +1 -0
- package/dist/ui/List/list.module.scss.js +4 -0
- package/dist/ui/List/list.module.scss.js.map +1 -0
- package/dist/ui/Pagination/index.d.ts +2 -0
- package/dist/ui/Pagination/index.d.ts.map +1 -0
- package/dist/ui/Pagination/pagination.d.ts +5 -0
- package/dist/ui/Pagination/pagination.d.ts.map +1 -0
- package/dist/ui/Pagination/pagination.js +37 -0
- package/dist/ui/Pagination/pagination.js.map +1 -0
- package/dist/ui/Pagination/pagination.module.scss.js +4 -0
- package/dist/ui/Pagination/pagination.module.scss.js.map +1 -0
- package/dist/ui/ProgressBar/index.d.ts +2 -0
- package/dist/ui/ProgressBar/index.d.ts.map +1 -0
- package/dist/ui/ProgressBar/progress-bar-variants.d.ts +9 -0
- package/dist/ui/ProgressBar/progress-bar-variants.d.ts.map +1 -0
- package/dist/ui/ProgressBar/progress-bar-variants.js +46 -0
- package/dist/ui/ProgressBar/progress-bar-variants.js.map +1 -0
- package/dist/ui/ProgressBar/progress-bar.d.ts +12 -0
- package/dist/ui/ProgressBar/progress-bar.d.ts.map +1 -0
- package/dist/ui/ProgressBar/progress-bar.js +14 -0
- package/dist/ui/ProgressBar/progress-bar.js.map +1 -0
- package/dist/ui/ProgressBar/progress-bar.module.scss.js +4 -0
- package/dist/ui/ProgressBar/progress-bar.module.scss.js.map +1 -0
- package/dist/ui/Separator/index.d.ts +2 -0
- package/dist/ui/Separator/index.d.ts.map +1 -0
- package/dist/ui/Separator/separator.d.ts +8 -0
- package/dist/ui/Separator/separator.d.ts.map +1 -0
- package/dist/ui/Separator/separator.js +10 -0
- package/dist/ui/Separator/separator.js.map +1 -0
- package/dist/ui/Separator/separator.module.scss.js +4 -0
- package/dist/ui/Separator/separator.module.scss.js.map +1 -0
- package/dist/ui/StatCard/index.d.ts +2 -0
- package/dist/ui/StatCard/index.d.ts.map +1 -0
- package/dist/ui/StatCard/stat-card-variants.d.ts +6 -0
- package/dist/ui/StatCard/stat-card-variants.d.ts.map +1 -0
- package/dist/ui/StatCard/stat-card-variants.js +35 -0
- package/dist/ui/StatCard/stat-card-variants.js.map +1 -0
- package/dist/ui/StatCard/stat-card.d.ts +31 -0
- package/dist/ui/StatCard/stat-card.d.ts.map +1 -0
- package/dist/ui/StatCard/stat-card.js +56 -0
- package/dist/ui/StatCard/stat-card.js.map +1 -0
- package/dist/ui/StatCard/stat-card.module.scss.js +4 -0
- package/dist/ui/StatCard/stat-card.module.scss.js.map +1 -0
- package/dist/ui/StepProgress/index.d.ts +2 -0
- package/dist/ui/StepProgress/index.d.ts.map +1 -0
- package/dist/ui/StepProgress/step-progress-variants.d.ts +7 -0
- package/dist/ui/StepProgress/step-progress-variants.d.ts.map +1 -0
- package/dist/ui/StepProgress/step-progress-variants.js +39 -0
- package/dist/ui/StepProgress/step-progress-variants.js.map +1 -0
- package/dist/ui/StepProgress/step-progress.d.ts +20 -0
- package/dist/ui/StepProgress/step-progress.d.ts.map +1 -0
- package/dist/ui/StepProgress/step-progress.js +40 -0
- package/dist/ui/StepProgress/step-progress.js.map +1 -0
- package/dist/ui/StepProgress/step-progress.module.scss.js +4 -0
- package/dist/ui/StepProgress/step-progress.module.scss.js.map +1 -0
- package/dist/ui/Switch/index.d.ts +2 -0
- package/dist/ui/Switch/index.d.ts.map +1 -0
- package/dist/ui/Switch/switch-variants.d.ts +5 -0
- package/dist/ui/Switch/switch-variants.d.ts.map +1 -0
- package/dist/ui/Switch/switch-variants.js +29 -0
- package/dist/ui/Switch/switch-variants.js.map +1 -0
- package/dist/ui/Switch/switch.d.ts +10 -0
- package/dist/ui/Switch/switch.d.ts.map +1 -0
- package/dist/ui/Switch/switch.js +18 -0
- package/dist/ui/Switch/switch.js.map +1 -0
- package/dist/ui/Switch/switch.module.scss.js +4 -0
- package/dist/ui/Switch/switch.module.scss.js.map +1 -0
- package/dist/ui/Table/index.d.ts +2 -0
- package/dist/ui/Table/index.d.ts.map +1 -0
- package/dist/ui/Table/table-sort-context.d.ts +4 -0
- package/dist/ui/Table/table-sort-context.d.ts.map +1 -0
- package/dist/ui/Table/table-sort-context.js +6 -0
- package/dist/ui/Table/table-sort-context.js.map +1 -0
- package/dist/ui/Table/table.d.ts +32 -0
- package/dist/ui/Table/table.d.ts.map +1 -0
- package/dist/ui/Table/table.js +59 -0
- package/dist/ui/Table/table.js.map +1 -0
- package/dist/ui/Table/table.module.scss.js +4 -0
- package/dist/ui/Table/table.module.scss.js.map +1 -0
- package/dist/ui/TableActionCell/index.d.ts +2 -0
- package/dist/ui/TableActionCell/index.d.ts.map +1 -0
- package/dist/ui/TableActionCell/table-action-cell.d.ts +28 -0
- package/dist/ui/TableActionCell/table-action-cell.d.ts.map +1 -0
- package/dist/ui/TableActionCell/table-action-cell.js +27 -0
- package/dist/ui/TableActionCell/table-action-cell.js.map +1 -0
- package/dist/ui/TableActionCell/table-action-cell.module.scss.js +4 -0
- package/dist/ui/TableActionCell/table-action-cell.module.scss.js.map +1 -0
- package/dist/ui/TableToolbar/index.d.ts +2 -0
- package/dist/ui/TableToolbar/index.d.ts.map +1 -0
- package/dist/ui/TableToolbar/table-toolbar.d.ts +29 -0
- package/dist/ui/TableToolbar/table-toolbar.d.ts.map +1 -0
- package/dist/ui/TableToolbar/table-toolbar.js +18 -0
- package/dist/ui/TableToolbar/table-toolbar.js.map +1 -0
- package/dist/ui/TableToolbar/table-toolbar.module.scss.js +4 -0
- package/dist/ui/TableToolbar/table-toolbar.module.scss.js.map +1 -0
- package/dist/ui/Toggle/index.d.ts +2 -0
- package/dist/ui/Toggle/index.d.ts.map +1 -0
- package/dist/ui/Toggle/toggle-group-context.d.ts +9 -0
- package/dist/ui/Toggle/toggle-group-context.d.ts.map +1 -0
- package/dist/ui/Toggle/toggle-group-context.js +6 -0
- package/dist/ui/Toggle/toggle-group-context.js.map +1 -0
- package/dist/ui/Toggle/toggle-variants.d.ts +8 -0
- package/dist/ui/Toggle/toggle-variants.d.ts.map +1 -0
- package/dist/ui/Toggle/toggle-variants.js +45 -0
- package/dist/ui/Toggle/toggle-variants.js.map +1 -0
- package/dist/ui/Toggle/toggle.d.ts +12 -0
- package/dist/ui/Toggle/toggle.d.ts.map +1 -0
- package/dist/ui/Toggle/toggle.js +49 -0
- package/dist/ui/Toggle/toggle.js.map +1 -0
- package/dist/ui/Toggle/toggle.module.scss.js +4 -0
- package/dist/ui/Toggle/toggle.module.scss.js.map +1 -0
- package/dist/ui/ToggleGroup/index.d.ts +2 -0
- package/dist/ui/ToggleGroup/index.d.ts.map +1 -0
- package/dist/ui/ToggleGroup/toggle-group.d.ts +24 -0
- package/dist/ui/ToggleGroup/toggle-group.d.ts.map +1 -0
- package/dist/ui/ToggleGroup/toggle-group.js +80 -0
- package/dist/ui/ToggleGroup/toggle-group.js.map +1 -0
- package/dist/ui/ToggleGroup/toggle-group.module.scss.js +4 -0
- package/dist/ui/ToggleGroup/toggle-group.module.scss.js.map +1 -0
- package/dist/ui/Tooltip/index.d.ts +2 -0
- package/dist/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/ui/Tooltip/tooltip.d.ts +24 -0
- package/dist/ui/Tooltip/tooltip.d.ts.map +1 -0
- package/dist/ui/Tooltip/tooltip.js +192 -0
- package/dist/ui/Tooltip/tooltip.js.map +1 -0
- package/dist/ui/Tooltip/tooltip.module.scss.js +4 -0
- package/dist/ui/Tooltip/tooltip.module.scss.js.map +1 -0
- package/dist/ui/index.d.ts +23 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui.d.ts +6 -0
- package/dist/ui.js +25 -0
- package/dist/ui.js.map +1 -0
- package/dist/user/UserInfo/index.d.ts +2 -0
- package/dist/user/UserInfo/index.d.ts.map +1 -0
- package/dist/user/UserInfo/user-info.d.ts +6 -0
- package/dist/user/UserInfo/user-info.d.ts.map +1 -0
- package/dist/user/UserInfo/user-info.js +17 -0
- package/dist/user/UserInfo/user-info.js.map +1 -0
- package/dist/user/UserInfo/user-info.module.scss.js +4 -0
- package/dist/user/UserInfo/user-info.module.scss.js.map +1 -0
- package/dist/user/UserMenuContent/index.d.ts +2 -0
- package/dist/user/UserMenuContent/index.d.ts.map +1 -0
- package/dist/user/UserMenuContent/user-menu-content.d.ts +25 -0
- package/dist/user/UserMenuContent/user-menu-content.d.ts.map +1 -0
- package/dist/user/UserMenuContent/user-menu-content.js +23 -0
- package/dist/user/UserMenuContent/user-menu-content.js.map +1 -0
- package/dist/user/index.d.ts +3 -0
- package/dist/user/index.d.ts.map +1 -0
- package/dist/user-menu-content-D0Ldzigm.d.ts +34 -0
- package/dist/user.d.ts +10 -0
- package/dist/user.js +3 -0
- package/dist/user.js.map +1 -0
- package/dist/utils/csrf.d.ts +2 -0
- package/dist/utils/csrf.d.ts.map +1 -0
- package/dist/utils/csrf.js +13 -0
- package/dist/utils/csrf.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +2 -0
- package/dist/utils.js.map +1 -0
- package/package.json +208 -0
- package/src/styles/_mixins.scss +105 -0
- package/src/styles/_theme-context.scss +12 -0
- package/src/styles/mixins.scss +1 -0
- package/vite-plugin.d.ts +26 -0
- package/vite-plugin.mjs +95 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import { CheckIcon } from 'lucide-react';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { stepProgressVariants } from './step-progress-variants.js';
|
|
6
|
+
import s from './step-progress.module.scss.js';
|
|
7
|
+
|
|
8
|
+
const StepProgress = React.forwardRef(({ steps, currentStep, theme, size, orientation, stretch, className, ...props }, ref) => {
|
|
9
|
+
return (jsx("ol", { ref: ref, "data-slot": 'step-progress', "aria-label": 'Progress', className: cn(stepProgressVariants({ theme, size, orientation, stretch }), className), ...props, children: steps.map((step, index) => {
|
|
10
|
+
const isComplete = index < currentStep;
|
|
11
|
+
const isActive = index === currentStep;
|
|
12
|
+
const isLast = index === steps.length - 1;
|
|
13
|
+
const dotStatus = isComplete ? 'complete' : isActive ? 'active' : 'incomplete';
|
|
14
|
+
return (jsx("li", { className: s.step, "aria-current": isActive ? 'step' : undefined, children: orientation === 'vertical' ? (jsx(VerticalStep, { step: step, dotStatus: dotStatus, isComplete: isComplete, isActive: isActive, isLast: isLast, index: index, currentStep: currentStep })) : (jsx(HorizontalStep, { step: step, dotStatus: dotStatus, isComplete: isComplete, isActive: isActive, isLast: isLast, index: index, currentStep: currentStep })) }, step.label));
|
|
15
|
+
}) }));
|
|
16
|
+
});
|
|
17
|
+
StepProgress.displayName = 'StepProgress';
|
|
18
|
+
function StepDot({ step, dotStatus }) {
|
|
19
|
+
const icon = dotStatus === 'complete'
|
|
20
|
+
? (step.icon ?? jsx(CheckIcon, {}))
|
|
21
|
+
: dotStatus === 'active'
|
|
22
|
+
? step.icon
|
|
23
|
+
: null;
|
|
24
|
+
return (jsx("span", { "data-slot": 'step-dot', className: cn(s['step-dot'], s[`step-dot--${dotStatus}`]), "aria-hidden": 'true', children: icon }));
|
|
25
|
+
}
|
|
26
|
+
function StepConnector({ complete }) {
|
|
27
|
+
return (jsx("span", { "data-slot": 'step-connector', className: s['step-connector'], "aria-hidden": 'true', children: jsx("span", { className: s['step-connector-fill'], style: { '--connector-progress': complete ? '100%' : '0%' } }) }));
|
|
28
|
+
}
|
|
29
|
+
function StepLabels({ step, isActive, isComplete, }) {
|
|
30
|
+
return (jsxs("span", { "data-slot": 'step-content', className: s['step-content'], children: [jsx("span", { "data-slot": 'step-label', className: cn(s['step-label'], isActive && s['step-label--active'], isComplete && s['step-label--complete']), children: step.label }), step.description ? (jsx("span", { "data-slot": 'step-description', className: s['step-description'], children: step.description })) : null] }));
|
|
31
|
+
}
|
|
32
|
+
function HorizontalStep({ step, dotStatus, isComplete, isActive, index }) {
|
|
33
|
+
return (jsxs(Fragment, { children: [index > 0 ? jsx(StepConnector, { complete: isComplete }) : null, jsx(StepDot, { step: step, dotStatus: dotStatus }), jsx(StepLabels, { step: step, isActive: isActive, isComplete: isComplete })] }));
|
|
34
|
+
}
|
|
35
|
+
function VerticalStep({ step, dotStatus, isComplete, isActive, isLast }) {
|
|
36
|
+
return (jsxs(Fragment, { children: [jsxs("span", { className: s['step-indicator-col'], children: [jsx(StepDot, { step: step, dotStatus: dotStatus }), !isLast ? jsx(StepConnector, { complete: isComplete }) : null] }), jsx(StepLabels, { step: step, isActive: isActive, isComplete: isComplete })] }));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { StepProgress };
|
|
40
|
+
//# sourceMappingURL=step-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-progress.js","sources":["../../../src/ui/StepProgress/step-progress.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport { CheckIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { stepProgressVariants } from './step-progress-variants';\nimport s from './step-progress.module.scss';\n\nexport interface Step {\n /** Label displayed next to or below the step indicator. */\n label: string;\n /** Optional secondary description below the label. */\n description?: string;\n /** Optional icon rendered inside the dot. Defaults to a checkmark for completed steps. */\n icon?: React.ReactNode;\n}\n\nexport interface StepProgressProps\n extends\n Omit<React.HTMLAttributes<HTMLOListElement>, 'children'>,\n VariantProps<typeof stepProgressVariants> {\n /** Array of step definitions. */\n steps: Step[];\n /** Zero-based index of the currently active step. Steps before this are complete. */\n currentStep: number;\n}\n\nconst StepProgress = React.forwardRef<HTMLOListElement, StepProgressProps>(\n ({ steps, currentStep, theme, size, orientation, stretch, className, ...props }, ref) => {\n return (\n <ol\n ref={ref}\n data-slot={'step-progress'}\n aria-label={'Progress'}\n className={cn(stepProgressVariants({ theme, size, orientation, stretch }), className)}\n {...props}\n >\n {steps.map((step, index) => {\n const isComplete = index < currentStep;\n const isActive = index === currentStep;\n const isLast = index === steps.length - 1;\n\n const dotStatus = isComplete ? 'complete' : isActive ? 'active' : 'incomplete';\n\n return (\n <li key={step.label} className={s.step} aria-current={isActive ? 'step' : undefined}>\n {orientation === 'vertical' ? (\n <VerticalStep\n step={step}\n dotStatus={dotStatus}\n isComplete={isComplete}\n isActive={isActive}\n isLast={isLast}\n index={index}\n currentStep={currentStep}\n />\n ) : (\n <HorizontalStep\n step={step}\n dotStatus={dotStatus}\n isComplete={isComplete}\n isActive={isActive}\n isLast={isLast}\n index={index}\n currentStep={currentStep}\n />\n )}\n </li>\n );\n })}\n </ol>\n );\n },\n);\nStepProgress.displayName = 'StepProgress';\n\n// ── Internal sub-components ───────────────────────────────\n\ninterface StepInternalProps {\n step: Step;\n dotStatus: 'complete' | 'active' | 'incomplete';\n isComplete: boolean;\n isActive: boolean;\n isLast: boolean;\n index: number;\n currentStep: number;\n}\n\nfunction StepDot({ step, dotStatus }: Pick<StepInternalProps, 'step' | 'dotStatus'>) {\n const icon =\n dotStatus === 'complete'\n ? (step.icon ?? <CheckIcon />)\n : dotStatus === 'active'\n ? step.icon\n : null;\n\n return (\n <span\n data-slot={'step-dot'}\n className={cn(s['step-dot'], s[`step-dot--${dotStatus}`])}\n aria-hidden={'true'}\n >\n {icon}\n </span>\n );\n}\n\nfunction StepConnector({ complete }: { complete: boolean }) {\n return (\n <span data-slot={'step-connector'} className={s['step-connector']} aria-hidden={'true'}>\n <span\n className={s['step-connector-fill']}\n style={{ '--connector-progress': complete ? '100%' : '0%' } as React.CSSProperties}\n />\n </span>\n );\n}\n\nfunction StepLabels({\n step,\n isActive,\n isComplete,\n}: Pick<StepInternalProps, 'step' | 'isActive' | 'isComplete'>) {\n return (\n <span data-slot={'step-content'} className={s['step-content']}>\n <span\n data-slot={'step-label'}\n className={cn(\n s['step-label'],\n isActive && s['step-label--active'],\n isComplete && s['step-label--complete'],\n )}\n >\n {step.label}\n </span>\n {step.description ? (\n <span data-slot={'step-description'} className={s['step-description']}>\n {step.description}\n </span>\n ) : null}\n </span>\n );\n}\n\nfunction HorizontalStep({ step, dotStatus, isComplete, isActive, index }: StepInternalProps) {\n return (\n <>\n {index > 0 ? <StepConnector complete={isComplete} /> : null}\n <StepDot step={step} dotStatus={dotStatus} />\n <StepLabels step={step} isActive={isActive} isComplete={isComplete} />\n </>\n );\n}\n\nfunction VerticalStep({ step, dotStatus, isComplete, isActive, isLast }: StepInternalProps) {\n return (\n <>\n <span className={s['step-indicator-col']}>\n <StepDot step={step} dotStatus={dotStatus} />\n {!isLast ? <StepConnector complete={isComplete} /> : null}\n </span>\n <StepLabels step={step} isActive={isActive} isComplete={isComplete} />\n </>\n );\n}\n\nexport { StepProgress };\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;AA0BA,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AACtF,IAAA,QACEA,GAAA,CAAA,IAAA,EAAA,EACE,GAAG,EAAE,GAAG,EAAA,WAAA,EACG,eAAe,EAAA,YA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-progress--stretch":"step-progress-module_step-progress--stretch__MwEiA","step-progress--horizontal":"step-progress-module_step-progress--horizontal__FQurL","step":"step-progress-module_step__gP02h","step-content":"step-progress-module_step-content__2-a1-","step-connector":"step-progress-module_step-connector__mjxzj","step-connector-fill":"step-progress-module_step-connector-fill__ux0Q3","step-progress--vertical":"step-progress-module_step-progress--vertical__ByvKD","step-indicator-col":"step-progress-module_step-indicator-col__EBXON","step-dot":"step-progress-module_step-dot__6b3sD","step-dot--incomplete":"step-progress-module_step-dot--incomplete__f1Ap3","step-dot--active":"step-progress-module_step-dot--active__wWOrR","stepPulse":"step-progress-module_stepPulse__HOsd8","step-dot--complete":"step-progress-module_step-dot--complete__Y13z3","step-label":"step-progress-module_step-label__ZOxWi","step-label--active":"step-progress-module_step-label--active__sCjqE","step-label--complete":"step-progress-module_step-label--complete__yIJUc","step-description":"step-progress-module_step-description__kHO-r","step-progress--sm":"step-progress-module_step-progress--sm__ExxIB","step-progress--md":"step-progress-module_step-progress--md__FFR1v","step-progress--lg":"step-progress-module_step-progress--lg__rZVtD","step-progress--primary":"step-progress-module_step-progress--primary__tSjlZ","step-progress--secondary":"step-progress-module_step-progress--secondary__4d4Kl","step-progress--destructive":"step-progress-module_step-progress--destructive__GjpCI","step-progress--warning":"step-progress-module_step-progress--warning__-Bg8S","step-progress--success":"step-progress-module_step-progress--success__GlqRg","step-progress--info":"step-progress-module_step-progress--info__loMVK","step-progress--slate":"step-progress-module_step-progress--slate__JHASX","step-progress--inherit":"step-progress-module_step-progress--inherit__GwCoy"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=step-progress.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-progress.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Switch/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const switchVariants: (props?: ({
|
|
2
|
+
theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
//# sourceMappingURL=switch-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-variants.d.ts","sourceRoot":"","sources":["../../../src/ui/Switch/switch-variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;8EAsBzB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import s from './switch.module.scss.js';
|
|
3
|
+
|
|
4
|
+
const switchVariants = cva(s.switch, {
|
|
5
|
+
variants: {
|
|
6
|
+
theme: {
|
|
7
|
+
primary: s['switch--primary'],
|
|
8
|
+
secondary: s['switch--secondary'],
|
|
9
|
+
destructive: s['switch--destructive'],
|
|
10
|
+
warning: s['switch--warning'],
|
|
11
|
+
success: s['switch--success'],
|
|
12
|
+
info: s['switch--info'],
|
|
13
|
+
slate: s['switch--slate'],
|
|
14
|
+
inherit: s['switch--inherit'],
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: s['switch--sm'],
|
|
18
|
+
md: s['switch--md'],
|
|
19
|
+
lg: s['switch--lg'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
theme: 'primary',
|
|
24
|
+
size: 'md',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export { switchVariants };
|
|
29
|
+
//# sourceMappingURL=switch-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-variants.js","sources":["../../../src/ui/Switch/switch-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport s from './switch.module.scss';\n\nexport const switchVariants = cva(s.switch, {\n variants: {\n theme: {\n primary: s['switch--primary'],\n secondary: s['switch--secondary'],\n destructive: s['switch--destructive'],\n warning: s['switch--warning'],\n success: s['switch--success'],\n info: s['switch--info'],\n slate: s['switch--slate'],\n inherit: s['switch--inherit'],\n },\n size: {\n sm: s['switch--sm'],\n md: s['switch--md'],\n lg: s['switch--lg'],\n },\n },\n defaultVariants: {\n theme: 'primary',\n size: 'md',\n },\n});\n"],"names":[],"mappings":";;;MAGa,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE;AAC1C,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC7B,YAAA,SAAS,EAAE,CAAC,CAAC,mBAAmB,CAAC;AACjC,YAAA,WAAW,EAAE,CAAC,CAAC,qBAAqB,CAAC;AACrC,YAAA,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC7B,YAAA,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC7B,YAAA,IAAI,EAAE,CAAC,CAAC,cAAc,CAAC;AACvB,YAAA,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC;AACzB,YAAA,OAAO,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC9B,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC;AACnB,YAAA,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC;AACnB,YAAA,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC;AACpB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { switchVariants } from './switch-variants';
|
|
4
|
+
export interface SwitchProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'onClick'>, VariantProps<typeof switchVariants> {
|
|
5
|
+
pressed?: boolean;
|
|
6
|
+
onPressedChange?: (pressed: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { Switch };
|
|
10
|
+
//# sourceMappingURL=switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/ui/Switch/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,MAAM,WAAW,WACf,SACE,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,EAC3E,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED,QAAA,MAAM,MAAM,uFAyBX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { switchVariants } from './switch-variants.js';
|
|
5
|
+
import s from './switch.module.scss.js';
|
|
6
|
+
|
|
7
|
+
const Switch = React.forwardRef(({ pressed = false, onPressedChange, size, theme, disabled, className, ...props }, ref) => {
|
|
8
|
+
const handleClick = () => {
|
|
9
|
+
if (disabled)
|
|
10
|
+
return;
|
|
11
|
+
onPressedChange?.(!pressed);
|
|
12
|
+
};
|
|
13
|
+
return (jsxs("button", { ref: ref, type: 'button', role: 'switch', "aria-checked": pressed, "data-slot": 'switch', "data-state": pressed ? 'on' : 'off', disabled: disabled, className: cn(switchVariants({ size, theme }), pressed && s['switch--on'], className), onClick: handleClick, ...props, children: [jsx("span", { "data-slot": 'switch-track', className: s.track, "aria-hidden": 'true' }), jsx("span", { "data-slot": 'switch-thumb', className: s.thumb, "aria-hidden": 'true' })] }));
|
|
14
|
+
});
|
|
15
|
+
Switch.displayName = 'Switch';
|
|
16
|
+
|
|
17
|
+
export { Switch };
|
|
18
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["../../../src/ui/Switch/switch.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { switchVariants } from './switch-variants';\nimport s from './switch.module.scss';\n\nexport interface SwitchProps\n extends\n Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'onClick'>,\n VariantProps<typeof switchVariants> {\n pressed?: boolean;\n onPressedChange?: (pressed: boolean) => void;\n}\n\nconst Switch = React.forwardRef<HTMLButtonElement, SwitchProps>(\n ({ pressed = false, onPressedChange, size, theme, disabled, className, ...props }, ref) => {\n const handleClick = () => {\n if (disabled) return;\n onPressedChange?.(!pressed);\n };\n\n return (\n <button\n ref={ref}\n type={'button'}\n role={'switch'}\n aria-checked={pressed}\n data-slot={'switch'}\n data-state={pressed ? 'on' : 'off'}\n disabled={disabled}\n className={cn(switchVariants({ size, theme }), pressed && s['switch--on'], className)}\n onClick={handleClick}\n {...props}\n >\n <span data-slot={'switch-track'} className={s.track} aria-hidden={'true'} />\n <span data-slot={'switch-thumb'} className={s.thumb} aria-hidden={'true'} />\n </button>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;AAcA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAC7B,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACxF,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,IAAI,QAAQ;YAAE;AACd,QAAA,eAAe,GAAG,CAAC,OAAO,CAAC;AAC7B,IAAA,CAAC;AAED,IAAA,QACEA,IAAA,CAAA,QAAA,EAAA,EACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,QAAQ,EAAA,cAAA,EACA,OAAO,EAAA,WAAA,EACV,QAAQ,gBACP,OAAO,GAAG,IAAI,GAAG,KAAK,EAClC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,IAAI,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,EACrF,OAAO,EAAE,WAAW,EAAA,GAChB,KAAK,EAAA,QAAA,EAAA,CAETC,GAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EAAiB,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,EAAA,aAAA,EAAe,MAAM,EAAA,CAAI,EAC5EA,2BAAiB,cAAc,EAAE,SAAS,EAAE,CAAC,CAAC,KAAK,EAAA,aAAA,EAAe,MAAM,EAAA,CAAI,CAAA,EAAA,CACrE;AAEb,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"switch":"switch-module_switch__lBqrP","switch--sm":"switch-module_switch--sm__Zg1fD","switch--md":"switch-module_switch--md__WS6b8","switch--lg":"switch-module_switch--lg__HWmDA","switch--inherit":"switch-module_switch--inherit__OiZeN","switch--primary":"switch-module_switch--primary__Vz3tY","switch--secondary":"switch-module_switch--secondary__8P1Ly","switch--destructive":"switch-module_switch--destructive__-rIMX","switch--warning":"switch-module_switch--warning__hlch1","switch--success":"switch-module_switch--success__jUzOi","switch--info":"switch-module_switch--info__RivDa","switch--slate":"switch-module_switch--slate__ENxlf","switch--on":"switch-module_switch--on__LU2yX","track":"switch-module_track__l15ge","thumb":"switch-module_thumb__fSEBF"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=switch.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Table/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-sort-context.d.ts","sourceRoot":"","sources":["../../../src/ui/Table/table-sort-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,gBAAgB,wCAAqD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-sort-context.js","sources":["../../../src/ui/Table/table-sort-context.ts"],"sourcesContent":["import { type SortContextValue } from '@constellation/types';\nimport React from 'react';\n\nexport const TableSortContext = React.createContext<SortContextValue | null>(null);\n"],"names":["React"],"mappings":";;AAGO,MAAM,gBAAgB,GAAGA,cAAK,CAAC,aAAa,CAA0B,IAAI;;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type SortDirection, type SortState } from '@constellation/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const TableCard: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const Table: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLTableElement> & React.TableHTMLAttributes<HTMLTableElement> & {
|
|
5
|
+
defaultSort?: SortState;
|
|
6
|
+
}, "ref"> & React.RefAttributes<HTMLTableElement>>;
|
|
7
|
+
declare const TableHead: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
8
|
+
declare const TableFooter: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
9
|
+
export interface TableBodyProps extends React.ComponentProps<'tbody'> {
|
|
10
|
+
showEmptyState?: boolean;
|
|
11
|
+
emptyState?: React.ReactNode;
|
|
12
|
+
emptyStateColSpan?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const TableBody: React.ForwardRefExoticComponent<Omit<TableBodyProps, "ref"> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
15
|
+
declare const TableRow: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & React.RefAttributes<HTMLTableRowElement>>;
|
|
16
|
+
type TableHeaderProps = React.ComponentProps<'th'> & {
|
|
17
|
+
action?: 'sticky';
|
|
18
|
+
};
|
|
19
|
+
declare const TableHeader: React.ForwardRefExoticComponent<Omit<TableHeaderProps, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
20
|
+
type TableCellProps = React.ComponentProps<'td'> & {
|
|
21
|
+
action?: 'sticky';
|
|
22
|
+
};
|
|
23
|
+
declare const TableCell: React.ForwardRefExoticComponent<Omit<TableCellProps, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
|
|
24
|
+
export interface TableSortableHeaderProps<Key extends string = string> {
|
|
25
|
+
label: string;
|
|
26
|
+
sortKey: Key;
|
|
27
|
+
defaultSort?: true | SortDirection;
|
|
28
|
+
action?: 'sticky';
|
|
29
|
+
}
|
|
30
|
+
declare function TableSortableHeader<Key extends string = string>({ label, sortKey, defaultSort, action, }: TableSortableHeaderProps<Key>): React.JSX.Element;
|
|
31
|
+
export { Table, TableBody, TableCard, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSortableHeader, };
|
|
32
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/ui/Table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAI1E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,QAAA,MAAM,SAAS,mKAQd,CAAC;AAGF,QAAA,MAAM,KAAK;kBAEuC,SAAS;kDAYzD,CAAC;AAGH,QAAA,MAAM,SAAS,8LAId,CAAC;AAGF,QAAA,MAAM,WAAW,8LAIhB,CAAC;AAGF,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC;IACnE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,6GAkCd,CAAC;AAGF,QAAA,MAAM,QAAQ,kLAIb,CAAC;AAGF,KAAK,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACnD,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,WAAW,4GAShB,CAAC;AAGF,KAAK,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IACjD,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB,CAAC;AAEF,QAAA,MAAM,SAAS,0GASd,CAAC;AAGF,MAAM,WAAW,wBAAwB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,GAAG,CAAC;IACb,WAAW,CAAC,EAAE,IAAI,GAAG,aAAa,CAAC;IACnC,MAAM,CAAC,EAAE,QAAQ,CAAC;CACnB;AAED,iBAAS,mBAAmB,CAAC,GAAG,SAAS,MAAM,GAAG,MAAM,EAAE,EACxD,KAAK,EACL,OAAO,EACP,WAAW,EACX,MAAM,GACP,EAAE,wBAAwB,CAAC,GAAG,CAAC,qBAwC/B;AAED,OAAO,EACL,KAAK,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,QAAQ,EACR,mBAAmB,GACpB,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { EmptyState } from '../EmptyState/empty-state.js';
|
|
3
|
+
import { TableSortContext } from './table-sort-context.js';
|
|
4
|
+
import cn from 'clsx';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import s from './table.module.scss.js';
|
|
7
|
+
|
|
8
|
+
const TableCard = React.forwardRef(({ className, children, ...props }, ref) => (jsx("div", { ref: ref, "data-slot": 'table-card', className: cn(s['table-card'], className), ...props, children: jsx("div", { "data-slot": 'table-wrapper', className: s['table-wrapper'], children: children }) })));
|
|
9
|
+
TableCard.displayName = 'TableCard';
|
|
10
|
+
const Table = React.forwardRef(({ className, defaultSort, children, ...props }, ref) => {
|
|
11
|
+
const [sortState, setSortState] = React.useState(defaultSort ?? null);
|
|
12
|
+
const value = React.useMemo(() => ({ sortState, setSortState }), [sortState]);
|
|
13
|
+
return (jsx(TableSortContext.Provider, { value: value, children: jsx("table", { ref: ref, "data-slot": 'table', className: cn(s.table, className), ...props, children: children }) }));
|
|
14
|
+
});
|
|
15
|
+
Table.displayName = 'Table';
|
|
16
|
+
const TableHead = React.forwardRef(({ className, ...props }, ref) => (jsx("thead", { ref: ref, "data-slot": 'table-head', className: cn(s.thead, className), ...props })));
|
|
17
|
+
TableHead.displayName = 'TableHead';
|
|
18
|
+
const TableFooter = React.forwardRef(({ className, ...props }, ref) => (jsx("tfoot", { ref: ref, "data-slot": 'table-footer', className: cn(s.tfoot, className), ...props })));
|
|
19
|
+
TableFooter.displayName = 'TableFooter';
|
|
20
|
+
const TableBody = React.forwardRef(({ className, children, showEmptyState = false, emptyState = 'No results found', emptyStateColSpan = 1, ...props }, ref) => {
|
|
21
|
+
const emptyContent = React.isValidElement(emptyState) ? (emptyState) : (jsx(EmptyState, { size: 'sm', title: String(emptyState) }));
|
|
22
|
+
return (jsx("tbody", { ref: ref, "data-slot": 'table-body', className: cn(s.tbody, className), ...props, children: showEmptyState ? (jsx(TableRow, { children: jsx(TableCell, { colSpan: emptyStateColSpan, className: s['empty-state-cell'], children: jsx("div", { "data-slot": 'table-empty-state', className: s['empty-state'], children: emptyContent }) }) })) : (children) }));
|
|
23
|
+
});
|
|
24
|
+
TableBody.displayName = 'TableBody';
|
|
25
|
+
const TableRow = React.forwardRef(({ className, ...props }, ref) => (jsx("tr", { ref: ref, "data-slot": 'table-row', className: className, ...props })));
|
|
26
|
+
TableRow.displayName = 'TableRow';
|
|
27
|
+
const TableHeader = React.forwardRef(({ className, action, ...props }, ref) => (jsx("th", { ref: ref, "data-slot": 'table-header', className: cn(s.th, action === 'sticky' && s['sticky-action'], className), ...props })));
|
|
28
|
+
TableHeader.displayName = 'TableHeader';
|
|
29
|
+
const TableCell = React.forwardRef(({ className, action, ...props }, ref) => (jsx("td", { ref: ref, "data-slot": 'table-cell', className: cn(s.td, action === 'sticky' && s['sticky-action'], className), ...props })));
|
|
30
|
+
TableCell.displayName = 'TableCell';
|
|
31
|
+
function TableSortableHeader({ label, sortKey, defaultSort, action, }) {
|
|
32
|
+
const ctx = React.useContext(TableSortContext);
|
|
33
|
+
if (!ctx) {
|
|
34
|
+
throw new Error('TableSortableHeader must be used within a Table.');
|
|
35
|
+
}
|
|
36
|
+
const isActive = ctx.sortState?.key === sortKey;
|
|
37
|
+
const direction = isActive ? (ctx.sortState?.direction ?? 'asc') : 'asc';
|
|
38
|
+
const icon = !isActive ? '↕' : direction === 'asc' ? '↑' : '↓';
|
|
39
|
+
const toggleSort = () => {
|
|
40
|
+
if (isActive) {
|
|
41
|
+
ctx.setSortState({ key: sortKey, direction: direction === 'asc' ? 'desc' : 'asc' });
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
ctx.setSortState({ key: sortKey, direction: 'asc' });
|
|
45
|
+
};
|
|
46
|
+
React.useEffect(() => {
|
|
47
|
+
if (defaultSort && !ctx.sortState) {
|
|
48
|
+
ctx.setSortState({
|
|
49
|
+
key: sortKey,
|
|
50
|
+
direction: defaultSort === 'desc' ? 'desc' : 'asc',
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}, [ctx, defaultSort, sortKey]);
|
|
54
|
+
const ariaSort = !isActive ? 'none' : direction === 'asc' ? 'ascending' : 'descending';
|
|
55
|
+
return (jsx(TableHeader, { action: action, "aria-sort": ariaSort, children: jsxs("button", { type: 'button', className: s['sort-button'], onClick: toggleSort, children: [jsx("span", { className: 'text-left', children: label }), jsx("span", { className: s['sort-icon'], "aria-hidden": true, children: icon }), jsx("span", { className: 'srOnly', children: `Sort by ${label}` })] }) }));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { Table, TableBody, TableCard, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSortableHeader };
|
|
59
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../../src/ui/Table/table.tsx"],"sourcesContent":["import { type SortDirection, type SortState } from '@constellation/types';\nimport { EmptyState } from '@constellation/ui/EmptyState';\nimport { TableSortContext } from '@constellation/ui/Table/table-sort-context';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport s from './table.module.scss';\n\nconst TableCard = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'>>(\n ({ className, children, ...props }, ref) => (\n <div ref={ref} data-slot={'table-card'} className={cn(s['table-card'], className)} {...props}>\n <div data-slot={'table-wrapper'} className={s['table-wrapper']}>\n {children}\n </div>\n </div>\n ),\n);\nTableCard.displayName = 'TableCard';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.ComponentProps<'table'> & { defaultSort?: SortState }\n>(({ className, defaultSort, children, ...props }, ref) => {\n const [sortState, setSortState] = React.useState<SortState | null>(defaultSort ?? null);\n const value = React.useMemo(() => ({ sortState, setSortState }), [sortState]);\n\n return (\n <TableSortContext.Provider value={value}>\n <table ref={ref} data-slot={'table'} className={cn(s.table, className)} {...props}>\n {children}\n </table>\n </TableSortContext.Provider>\n );\n});\nTable.displayName = 'Table';\n\nconst TableHead = React.forwardRef<HTMLTableSectionElement, React.ComponentProps<'thead'>>(\n ({ className, ...props }, ref) => (\n <thead ref={ref} data-slot={'table-head'} className={cn(s.thead, className)} {...props} />\n ),\n);\nTableHead.displayName = 'TableHead';\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, React.ComponentProps<'tfoot'>>(\n ({ className, ...props }, ref) => (\n <tfoot ref={ref} data-slot={'table-footer'} className={cn(s.tfoot, className)} {...props} />\n ),\n);\nTableFooter.displayName = 'TableFooter';\n\nexport interface TableBodyProps extends React.ComponentProps<'tbody'> {\n showEmptyState?: boolean;\n emptyState?: React.ReactNode;\n emptyStateColSpan?: number;\n}\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n (\n {\n className,\n children,\n showEmptyState = false,\n emptyState = 'No results found',\n emptyStateColSpan = 1,\n ...props\n },\n ref,\n ) => {\n const emptyContent = React.isValidElement(emptyState) ? (\n emptyState\n ) : (\n <EmptyState size={'sm'} title={String(emptyState)} />\n );\n\n return (\n <tbody ref={ref} data-slot={'table-body'} className={cn(s.tbody, className)} {...props}>\n {showEmptyState ? (\n <TableRow>\n <TableCell colSpan={emptyStateColSpan} className={s['empty-state-cell']}>\n <div data-slot={'table-empty-state'} className={s['empty-state']}>\n {emptyContent}\n </div>\n </TableCell>\n </TableRow>\n ) : (\n children\n )}\n </tbody>\n );\n },\n);\nTableBody.displayName = 'TableBody';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.ComponentProps<'tr'>>(\n ({ className, ...props }, ref) => (\n <tr ref={ref} data-slot={'table-row'} className={className} {...props} />\n ),\n);\nTableRow.displayName = 'TableRow';\n\ntype TableHeaderProps = React.ComponentProps<'th'> & {\n action?: 'sticky';\n};\n\nconst TableHeader = React.forwardRef<HTMLTableCellElement, TableHeaderProps>(\n ({ className, action, ...props }, ref) => (\n <th\n ref={ref}\n data-slot={'table-header'}\n className={cn(s.th, action === 'sticky' && s['sticky-action'], className)}\n {...props}\n />\n ),\n);\nTableHeader.displayName = 'TableHeader';\n\ntype TableCellProps = React.ComponentProps<'td'> & {\n action?: 'sticky';\n};\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, action, ...props }, ref) => (\n <td\n ref={ref}\n data-slot={'table-cell'}\n className={cn(s.td, action === 'sticky' && s['sticky-action'], className)}\n {...props}\n />\n ),\n);\nTableCell.displayName = 'TableCell';\n\nexport interface TableSortableHeaderProps<Key extends string = string> {\n label: string;\n sortKey: Key;\n defaultSort?: true | SortDirection;\n action?: 'sticky';\n}\n\nfunction TableSortableHeader<Key extends string = string>({\n label,\n sortKey,\n defaultSort,\n action,\n}: TableSortableHeaderProps<Key>) {\n const ctx = React.useContext(TableSortContext);\n if (!ctx) {\n throw new Error('TableSortableHeader must be used within a Table.');\n }\n\n const isActive = ctx.sortState?.key === sortKey;\n const direction = isActive ? (ctx.sortState?.direction ?? 'asc') : 'asc';\n const icon = !isActive ? '↕' : direction === 'asc' ? '↑' : '↓';\n\n const toggleSort = () => {\n if (isActive) {\n ctx.setSortState({ key: sortKey, direction: direction === 'asc' ? 'desc' : 'asc' });\n return;\n }\n ctx.setSortState({ key: sortKey, direction: 'asc' });\n };\n\n React.useEffect(() => {\n if (defaultSort && !ctx.sortState) {\n ctx.setSortState({\n key: sortKey as string,\n direction: defaultSort === 'desc' ? 'desc' : 'asc',\n });\n }\n }, [ctx, defaultSort, sortKey]);\n\n const ariaSort = !isActive ? 'none' : direction === 'asc' ? 'ascending' : 'descending';\n\n return (\n <TableHeader action={action} aria-sort={ariaSort}>\n <button type={'button'} className={s['sort-button']} onClick={toggleSort}>\n <span className={'text-left'}>{label}</span>\n <span className={s['sort-icon']} aria-hidden>\n {icon}\n </span>\n <span className={'srOnly'}>{`Sort by ${label}`}</span>\n </button>\n </TableHeader>\n );\n}\n\nexport {\n Table,\n TableBody,\n TableCard,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow,\n TableSortableHeader,\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AAOA,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MACrCA,GAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA,WAAA,EAAa,YAAY,EAAE,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,EAAA,GAAM,KAAK,EAAA,QAAA,EAC1FA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EAAgB,eAAe,EAAE,SAAS,EAAE,CAAC,CAAC,eAAe,CAAC,EAAA,QAAA,EAC3D,QAAQ,EAAA,CACL,EAAA,CACF,CACP;AAEH,SAAS,CAAC,WAAW,GAAG,WAAW;AAEnC,MAAM,KAAK,GAAG,KAAK,CAA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,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAC5B,IAAI,EAAA,CACA,EACPA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,QAAQ,EAAA,QAAA,EAAG,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,EAAA,CAAQ,CAAA,EAAA,CAC/C,EAAA,CACG;AAElB;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"table-card":"table-module_table-card__L9K-M","table-wrapper":"table-module_table-wrapper__pJaEv","table":"table-module_table__swkCF","thead":"table-module_thead__nau5-","th":"table-module_th__VjBp4","td":"table-module_td__4HC5R","tbody":"table-module_tbody__33JwK","tfoot":"table-module_tfoot__bs4nN","empty-state-cell":"table-module_empty-state-cell__6VzDz","empty-state":"table-module_empty-state__IJXn7","sort-button":"table-module_sort-button__mOJqG","sort-icon":"table-module_sort-icon__o3kWa","sticky-action":"table-module_sticky-action__1StGz"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=table.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/TableActionCell/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TableActionItem {
|
|
3
|
+
/** Visible label for the action. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional icon rendered before the label. */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
/** Click handler for this action. */
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
/** Whether the action is disabled. */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Visual variant — `destructive` renders the item in the destructive theme. */
|
|
12
|
+
variant?: 'default' | 'destructive';
|
|
13
|
+
}
|
|
14
|
+
export interface TableActionCellProps extends React.ComponentProps<'div'> {
|
|
15
|
+
/** Array of actions to display. Renders a single button for one action, or a dropdown for multiple. */
|
|
16
|
+
actions: TableActionItem[];
|
|
17
|
+
/** Accessible label for the dropdown trigger button. */
|
|
18
|
+
dropdownLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Renders a right-aligned action cell for table rows.
|
|
22
|
+
*
|
|
23
|
+
* - **Single action**: renders a visible `<Button>` with the action label and optional icon.
|
|
24
|
+
* - **Multiple actions**: renders a `...` icon button that opens a `<DropdownMenu>`.
|
|
25
|
+
*/
|
|
26
|
+
declare const TableActionCell: React.ForwardRefExoticComponent<Omit<TableActionCellProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export { TableActionCell };
|
|
28
|
+
//# sourceMappingURL=table-action-cell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-action-cell.d.ts","sourceRoot":"","sources":["../../../src/ui/TableActionCell/table-action-cell.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,eAAe;IAC9B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACrC;AAED,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACvE,uGAAuG;IACvG,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,QAAA,MAAM,eAAe,0GAuDpB,CAAC;AAGF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from '../../navigation/DropdownMenu/dropdown-menu.js';
|
|
3
|
+
import { Button } from '../Button/button.js';
|
|
4
|
+
import cn from 'clsx';
|
|
5
|
+
import { MoreHorizontalIcon } from 'lucide-react';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import s from './table-action-cell.module.scss.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Renders a right-aligned action cell for table rows.
|
|
11
|
+
*
|
|
12
|
+
* - **Single action**: renders a visible `<Button>` with the action label and optional icon.
|
|
13
|
+
* - **Multiple actions**: renders a `...` icon button that opens a `<DropdownMenu>`.
|
|
14
|
+
*/
|
|
15
|
+
const TableActionCell = React.forwardRef(({ actions, className, dropdownLabel = 'Row actions', ...props }, ref) => {
|
|
16
|
+
if (!actions || actions.length === 0) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
const multi = actions.length > 1;
|
|
20
|
+
const primaryAction = actions[0];
|
|
21
|
+
const buttonTheme = primaryAction?.variant === 'destructive' ? 'destructive' : 'inherit';
|
|
22
|
+
return (jsx("div", { ref: ref, "data-slot": 'table-action-cell', className: cn(s['table-action-cell'], className), ...props, children: multi ? (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: 'ghost', theme: 'inherit', iconOnly: true, children: [jsx(MoreHorizontalIcon, {}), jsx("span", { className: 'srOnly', children: dropdownLabel })] }) }), jsx(DropdownMenuContent, { align: 'end', className: s['menu-content'], children: actions.map(action => (jsxs(DropdownMenuItem, { disabled: action.disabled, variant: action.variant, onClick: action.onClick, children: [action.icon ? action.icon : null, action.label] }, action.label))) })] })) : (jsxs(Button, { theme: buttonTheme, size: 'sm', onClick: primaryAction?.onClick, disabled: primaryAction?.disabled, children: [primaryAction?.icon ? (jsx("span", { className: s['single-action-icon'], children: primaryAction.icon })) : null, primaryAction?.label] })) }));
|
|
23
|
+
});
|
|
24
|
+
TableActionCell.displayName = 'TableActionCell';
|
|
25
|
+
|
|
26
|
+
export { TableActionCell };
|
|
27
|
+
//# sourceMappingURL=table-action-cell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-action-cell.js","sources":["../../../src/ui/TableActionCell/table-action-cell.tsx"],"sourcesContent":["import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@constellation/navigation/DropdownMenu';\nimport { Button } from '@constellation/ui/Button';\nimport cn from 'clsx';\nimport { MoreHorizontalIcon } from 'lucide-react';\nimport * as React from 'react';\nimport s from './table-action-cell.module.scss';\n\nexport interface TableActionItem {\n /** Visible label for the action. */\n label: string;\n /** Optional icon rendered before the label. */\n icon?: React.ReactNode;\n /** Click handler for this action. */\n onClick?: () => void;\n /** Whether the action is disabled. */\n disabled?: boolean;\n /** Visual variant — `destructive` renders the item in the destructive theme. */\n variant?: 'default' | 'destructive';\n}\n\nexport interface TableActionCellProps extends React.ComponentProps<'div'> {\n /** Array of actions to display. Renders a single button for one action, or a dropdown for multiple. */\n actions: TableActionItem[];\n /** Accessible label for the dropdown trigger button. */\n dropdownLabel?: string;\n}\n\n/**\n * Renders a right-aligned action cell for table rows.\n *\n * - **Single action**: renders a visible `<Button>` with the action label and optional icon.\n * - **Multiple actions**: renders a `...` icon button that opens a `<DropdownMenu>`.\n */\nconst TableActionCell = React.forwardRef<HTMLDivElement, TableActionCellProps>(\n ({ actions, className, dropdownLabel = 'Row actions', ...props }, ref) => {\n if (!actions || actions.length === 0) {\n return null;\n }\n\n const multi = actions.length > 1;\n const primaryAction = actions[0];\n const buttonTheme = primaryAction?.variant === 'destructive' ? 'destructive' : 'inherit';\n\n return (\n <div\n ref={ref}\n data-slot={'table-action-cell'}\n className={cn(s['table-action-cell'], className)}\n {...props}\n >\n {multi ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant={'ghost'} theme={'inherit'} iconOnly>\n <MoreHorizontalIcon />\n <span className={'srOnly'}>{dropdownLabel}</span>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align={'end'} className={s['menu-content']}>\n {actions.map(action => (\n <DropdownMenuItem\n key={action.label}\n disabled={action.disabled}\n variant={action.variant}\n onClick={action.onClick}\n >\n {action.icon ? action.icon : null}\n {action.label}\n </DropdownMenuItem>\n ))}\n </DropdownMenuContent>\n </DropdownMenu>\n ) : (\n <Button\n theme={buttonTheme}\n size={'sm'}\n onClick={primaryAction?.onClick}\n disabled={primaryAction?.disabled}\n >\n {primaryAction?.icon ? (\n <span className={s['single-action-icon']}>{primaryAction.icon}</span>\n ) : null}\n {primaryAction?.label}\n </Button>\n )}\n </div>\n );\n },\n);\nTableActionCell.displayName = 'TableActionCell';\n\nexport { TableActionCell };\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAgCA;;;;;AAKG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,GAAG,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;IACvE,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;AACpC,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC;AAChC,IAAA,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;AAChC,IAAA,MAAM,WAAW,GAAG,aAAa,EAAE,OAAO,KAAK,aAAa,GAAG,aAAa,GAAG,SAAS;IAExF,QACEA,aACE,GAAG,EAAE,GAAG,EAAA,WAAA,EACG,mBAAmB,EAC9B,SAAS,EAAE,EA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AAEV,CAAC;AAEH,eAAe,CAAC,WAAW,GAAG,iBAAiB;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"table-action-cell":"table-action-cell-module_table-action-cell__PHkZ2","menu-content":"table-action-cell-module_menu-content__I9PC9","single-action-icon":"table-action-cell-module_single-action-icon__jgF2t"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=table-action-cell.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-action-cell.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/TableToolbar/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TableToolbarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
3
|
+
/**
|
|
4
|
+
* Left-aligned controls — typically a search Input plus zero or more
|
|
5
|
+
* filter SelectFields / DatePickers / Toggles. Children flow horizontally
|
|
6
|
+
* with `gap` and wrap on narrow screens.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Right-aligned slot — for reset / clear / bulk-action buttons. Pushed to
|
|
11
|
+
* the end of the row via auto-margin; wraps to a new line on narrow
|
|
12
|
+
* screens if the controls grow too wide.
|
|
13
|
+
*/
|
|
14
|
+
actions?: React.ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Render a 1px subtle bottom border to separate the toolbar from the
|
|
17
|
+
* Table or content below. Default `true`.
|
|
18
|
+
*/
|
|
19
|
+
divider?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Container for the row of controls (search, filters, actions) that sits
|
|
23
|
+
* above a `Table` inside a `TableCard`. Presentational only — consumers
|
|
24
|
+
* own all filter state and search debouncing. The companion to
|
|
25
|
+
* `TableSearch` for the more common single-search case.
|
|
26
|
+
*/
|
|
27
|
+
declare const TableToolbar: React.ForwardRefExoticComponent<TableToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { TableToolbar };
|
|
29
|
+
//# sourceMappingURL=table-toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar.d.ts","sourceRoot":"","sources":["../../../src/ui/TableToolbar/table-toolbar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC/F;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,QAAA,MAAM,YAAY,0FAoBjB,CAAC;AAGF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import s from './table-toolbar.module.scss.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Container for the row of controls (search, filters, actions) that sits
|
|
8
|
+
* above a `Table` inside a `TableCard`. Presentational only — consumers
|
|
9
|
+
* own all filter state and search debouncing. The companion to
|
|
10
|
+
* `TableSearch` for the more common single-search case.
|
|
11
|
+
*/
|
|
12
|
+
const TableToolbar = React.forwardRef(({ children, actions, divider = true, className, ...props }, ref) => {
|
|
13
|
+
return (jsxs("div", { ref: ref, "data-slot": 'table-toolbar', className: cn(s.toolbar, divider && s['toolbar--divider'], className), ...props, children: [jsx("div", { "data-slot": 'table-toolbar-controls', className: s.controls, children: children }), actions ? (jsx("div", { "data-slot": 'table-toolbar-actions', className: s.actions, children: actions })) : null] }));
|
|
14
|
+
});
|
|
15
|
+
TableToolbar.displayName = 'TableToolbar';
|
|
16
|
+
|
|
17
|
+
export { TableToolbar };
|
|
18
|
+
//# sourceMappingURL=table-toolbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar.js","sources":["../../../src/ui/TableToolbar/table-toolbar.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\nimport s from './table-toolbar.module.scss';\n\nexport interface TableToolbarProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {\n /**\n * Left-aligned controls — typically a search Input plus zero or more\n * filter SelectFields / DatePickers / Toggles. Children flow horizontally\n * with `gap` and wrap on narrow screens.\n */\n children?: React.ReactNode;\n /**\n * Right-aligned slot — for reset / clear / bulk-action buttons. Pushed to\n * the end of the row via auto-margin; wraps to a new line on narrow\n * screens if the controls grow too wide.\n */\n actions?: React.ReactNode;\n /**\n * Render a 1px subtle bottom border to separate the toolbar from the\n * Table or content below. Default `true`.\n */\n divider?: boolean;\n}\n\n/**\n * Container for the row of controls (search, filters, actions) that sits\n * above a `Table` inside a `TableCard`. Presentational only — consumers\n * own all filter state and search debouncing. The companion to\n * `TableSearch` for the more common single-search case.\n */\nconst TableToolbar = React.forwardRef<HTMLDivElement, TableToolbarProps>(\n ({ children, actions, divider = true, className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-slot={'table-toolbar'}\n className={cn(s.toolbar, divider && s['toolbar--divider'], className)}\n {...props}\n >\n <div data-slot={'table-toolbar-controls'} className={s.controls}>\n {children}\n </div>\n {actions ? (\n <div data-slot={'table-toolbar-actions'} className={s.actions}>\n {actions}\n </div>\n ) : null}\n </div>\n );\n },\n);\nTableToolbar.displayName = 'TableToolbar';\n\nexport { TableToolbar };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;AAwBA;;;;;AAKG;AACH,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAClE,IAAA,QACEA,IAAA,CAAA,KAAA,EAAA,EACE,GAAG,EAAE,GAAG,EAAA,WAAA,EACG,eAAe,EAC1B,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,IAAI,CAAC,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAC,EAAA,GACjE,KAAK,EAAA,QAAA,EAAA,CAETC,0BAAgB,wBAAwB,EAAE,SAAS,EAAE,CAAC,CAAC,QAAQ,EAAA,QAAA,EAC5D,QAAQ,EAAA,CACL,EACL,OAAO,IACNA,0BAAgB,uBAAuB,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAA,QAAA,EAC1D,OAAO,EAAA,CACJ,IACJ,IAAI,CAAA,EAAA,CACJ;AAEV,CAAC;AAEH,YAAY,CAAC,WAAW,GAAG,cAAc;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"toolbar":"table-toolbar-module_toolbar__cbuux","toolbar--divider":"table-toolbar-module_toolbar--divider__Abf5V","controls":"table-toolbar-module_controls__djQX7","actions":"table-toolbar-module_actions__-VZja"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=table-toolbar.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-toolbar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Toggle/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { toggleVariants } from './toggle-variants';
|
|
4
|
+
export type ToggleGroupContextValue = VariantProps<typeof toggleVariants> & {
|
|
5
|
+
value?: string[];
|
|
6
|
+
onItemToggle?: (itemValue: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const ToggleGroupContext: React.Context<ToggleGroupContextValue | null>;
|
|
9
|
+
//# sourceMappingURL=toggle-group-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group-context.d.ts","sourceRoot":"","sources":["../../../src/ui/Toggle/toggle-group-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,uBAAuB,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IAC1E,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,+CAA4D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-group-context.js","sources":["../../../src/ui/Toggle/toggle-group-context.ts"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { toggleVariants } from './toggle-variants';\n\nexport type ToggleGroupContextValue = VariantProps<typeof toggleVariants> & {\n value?: string[];\n onItemToggle?: (itemValue: string) => void;\n};\n\nexport const ToggleGroupContext = React.createContext<ToggleGroupContextValue | null>(null);\n"],"names":[],"mappings":";;AASO,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAiC,IAAI;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const toggleVariants: (props?: ({
|
|
2
|
+
variant?: "contained" | "outlined" | "ghost" | null | undefined;
|
|
3
|
+
theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "xs" | null | undefined;
|
|
5
|
+
iconOnly?: boolean | null | undefined;
|
|
6
|
+
rounded?: boolean | "extra" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
//# sourceMappingURL=toggle-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-variants.d.ts","sourceRoot":"","sources":["../../../src/ui/Toggle/toggle-variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;8EAsCzB,CAAC"}
|