@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 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["../../../src/ui/Avatar/avatar.tsx"],"sourcesContent":["import cn from 'clsx';\nimport * as React from 'react';\nimport s from './avatar.module.scss';\n\nexport type AvatarProps = React.HTMLAttributes<HTMLSpanElement>;\n\nconst Avatar = React.forwardRef<HTMLSpanElement, AvatarProps>(({ className, ...props }, ref) => (\n <span ref={ref} data-slot={'avatar'} className={cn(s.avatar, className)} {...props} />\n));\nAvatar.displayName = 'Avatar';\n\nexport type AvatarImageProps = React.ImgHTMLAttributes<HTMLImageElement>;\n\nconst AvatarImage = React.forwardRef<HTMLImageElement, AvatarImageProps>(\n ({ className, src, alt, onLoad, onError, ...props }, ref) => {\n const [status, setStatus] = React.useState<'loading' | 'loaded' | 'error'>('loading');\n\n React.useEffect(() => {\n setStatus(src ? 'loading' : 'error');\n }, [src]);\n\n if (!src || status === 'error') {\n return null;\n }\n\n return (\n <img\n ref={ref}\n data-slot={'avatar-image'}\n className={cn(\n s['avatar-image'],\n status === 'loading' && s['avatar-image--loading'],\n className,\n )}\n src={src}\n alt={alt}\n onLoad={e => {\n setStatus('loaded');\n onLoad?.(e);\n }}\n onError={e => {\n setStatus('error');\n onError?.(e);\n }}\n {...props}\n />\n );\n },\n);\nAvatarImage.displayName = 'AvatarImage';\n\nexport type AvatarFallbackProps = React.HTMLAttributes<HTMLSpanElement>;\n\nconst AvatarFallback = React.forwardRef<HTMLSpanElement, AvatarFallbackProps>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-slot={'avatar-fallback'}\n className={cn(s['avatar-fallback'], className)}\n {...props}\n />\n ),\n);\nAvatarFallback.displayName = 'AvatarFallback';\n\nexport { Avatar, AvatarFallback, AvatarImage };\n"],"names":["_jsx"],"mappings":";;;;;AAMA,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAA+B,CAAC,EAAE,SAA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ACG,KAAK,EAAA,CACT;AAEN,CAAC;AAEH,WAAW,CAAC,WAAW,GAAG,aAAa;AAIvC,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC3BA,GAAA,CAAA,MAAA,EAAA,EACE,GAAG,EAAE,GAAG,eACG,iBAAiB,EAC5B,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,EAAE,SAAS,CAAC,EAAA,GAC1C,KAAK,EAAA,CACT,CACH;AAEH,cAAc,CAAC,WAAW,GAAG,gBAAgB;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"avatar":"avatar-module_avatar__p5vGe","avatar-image":"avatar-module_avatar-image__yOGS6","avatar-image--loading":"avatar-module_avatar-image--loading__H77le","avatar-fallback":"avatar-module_avatar-fallback__fID1R"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=avatar.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Avatar/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const buttonVariants: (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=button-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-variants.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button-variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;8EAsCzB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import s from './button.module.scss.js';
|
|
3
|
+
|
|
4
|
+
const buttonVariants = cva(s.button, {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
contained: s['button--contained'],
|
|
8
|
+
outlined: s['button--outlined'],
|
|
9
|
+
ghost: s['button--ghost'],
|
|
10
|
+
},
|
|
11
|
+
theme: {
|
|
12
|
+
primary: s['button--primary'],
|
|
13
|
+
secondary: s['button--secondary'],
|
|
14
|
+
destructive: s['button--destructive'],
|
|
15
|
+
warning: s['button--warning'],
|
|
16
|
+
success: s['button--success'],
|
|
17
|
+
info: s['button--info'],
|
|
18
|
+
slate: s['button--slate'],
|
|
19
|
+
inherit: s['button--inherit'],
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
xs: s['button--xs'],
|
|
23
|
+
sm: s['button--sm'],
|
|
24
|
+
md: s['button--md'],
|
|
25
|
+
lg: s['button--lg'],
|
|
26
|
+
},
|
|
27
|
+
iconOnly: {
|
|
28
|
+
true: s['button--icon-only'],
|
|
29
|
+
},
|
|
30
|
+
rounded: {
|
|
31
|
+
true: s['button--rounded'],
|
|
32
|
+
false: undefined,
|
|
33
|
+
extra: s['button--extra-rounded'],
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: {
|
|
37
|
+
variant: 'contained',
|
|
38
|
+
theme: 'primary',
|
|
39
|
+
size: 'md',
|
|
40
|
+
rounded: 'extra',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export { buttonVariants };
|
|
45
|
+
//# sourceMappingURL=button-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-variants.js","sources":["../../../src/ui/Button/button-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport s from './button.module.scss';\n\nexport const buttonVariants = cva(s.button, {\n variants: {\n variant: {\n contained: s['button--contained'],\n outlined: s['button--outlined'],\n ghost: s['button--ghost'],\n },\n theme: {\n primary: s['button--primary'],\n secondary: s['button--secondary'],\n destructive: s['button--destructive'],\n warning: s['button--warning'],\n success: s['button--success'],\n info: s['button--info'],\n slate: s['button--slate'],\n inherit: s['button--inherit'],\n },\n size: {\n xs: s['button--xs'],\n sm: s['button--sm'],\n md: s['button--md'],\n lg: s['button--lg'],\n },\n iconOnly: {\n true: s['button--icon-only'],\n },\n rounded: {\n true: s['button--rounded'],\n false: undefined,\n extra: s['button--extra-rounded'],\n },\n },\n defaultVariants: {\n variant: 'contained',\n theme: 'primary',\n size: 'md',\n rounded: 'extra',\n },\n});\n"],"names":[],"mappings":";;;MAGa,cAAc,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE;AAC1C,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,SAAS,EAAE,CAAC,CAAC,mBAAmB,CAAC;AACjC,YAAA,QAAQ,EAAE,CAAC,CAAC,kBAAkB,CAAC;AAC/B,YAAA,KAAK,EAAE,CAAC,CAAC,eAAe,CAAC;AAC1B,SAAA;AACD,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;AACnB,YAAA,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC;AACpB,SAAA;AACD,QAAA,QAAQ,EAAE;AACR,YAAA,IAAI,EAAE,CAAC,CAAC,mBAAmB,CAAC;AAC7B,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC1B,YAAA,KAAK,EAAE,SAAS;AAChB,YAAA,KAAK,EAAE,CAAC,CAAC,uBAAuB,CAAC;AAClC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,OAAO,EAAE,OAAO;AACjB,KAAA;AACF,CAAA;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { buttonVariants } from './button-variants';
|
|
4
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
export { Button };
|
|
9
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAmCnD,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,QAAA,MAAM,MAAM,uFA4DX,CAAC;AAGF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { createRipple } from '../../internal/create-ripple.js';
|
|
5
|
+
import { Slot } from '../../internal/slot.js';
|
|
6
|
+
import { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children.js';
|
|
7
|
+
import { buttonVariants } from './button-variants.js';
|
|
8
|
+
import s from './button.module.scss.js';
|
|
9
|
+
|
|
10
|
+
const getChildHref = (children) => {
|
|
11
|
+
const childArray = React.Children.toArray(children ?? []);
|
|
12
|
+
if (childArray.length !== 1) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
const child = childArray[0];
|
|
16
|
+
if (!React.isValidElement(child)) {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
if (typeof child.props?.href === 'string') {
|
|
20
|
+
return child.props.href;
|
|
21
|
+
}
|
|
22
|
+
if (typeof child.props?.to === 'string') {
|
|
23
|
+
return child.props.to;
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
};
|
|
27
|
+
const normalizePathname = (href, origin) => {
|
|
28
|
+
try {
|
|
29
|
+
const url = new URL(href, origin);
|
|
30
|
+
const normalizedPath = url.pathname.replace(/\/+$/, '');
|
|
31
|
+
return normalizedPath || '/';
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const Button = React.forwardRef(({ variant = 'contained', theme = 'primary', size = 'md', rounded = 'extra', iconOnly, className, asChild = false, onClick, ...props }, ref) => {
|
|
38
|
+
const Comp = asChild ? Slot : 'button';
|
|
39
|
+
const childHref = asChild ? getChildHref(props.children) : null;
|
|
40
|
+
const isBrowser = typeof window !== 'undefined';
|
|
41
|
+
let currentPath = null;
|
|
42
|
+
let targetPath = null;
|
|
43
|
+
if (isBrowser) {
|
|
44
|
+
const { pathname, origin } = window.location;
|
|
45
|
+
currentPath = normalizePathname(pathname, origin);
|
|
46
|
+
if (childHref) {
|
|
47
|
+
targetPath = normalizePathname(childHref, origin);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const isActiveLink = Boolean(asChild && currentPath && targetPath && currentPath === targetPath);
|
|
51
|
+
const handleClick = (event) => {
|
|
52
|
+
createRipple(event, s['ripple']);
|
|
53
|
+
onClick?.(event);
|
|
54
|
+
};
|
|
55
|
+
// Treat element children as decorative by default (icons get
|
|
56
|
+
// aria-hidden automatically). Skip for `asChild` because Slot's child is
|
|
57
|
+
// a wrapper element whose own content needs its own a11y decisions.
|
|
58
|
+
const { children: rawChildren, ...restProps } = props;
|
|
59
|
+
const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);
|
|
60
|
+
return (jsx(Comp, { "data-slot": 'button', "data-active-link": isActiveLink ? 'true' : undefined, "aria-current": isActiveLink && asChild ? 'page' : undefined, className: cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className), ref: ref, onClick: handleClick, ...restProps, children: children }));
|
|
61
|
+
});
|
|
62
|
+
Button.displayName = 'Button';
|
|
63
|
+
|
|
64
|
+
export { Button };
|
|
65
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sources":["../../../src/ui/Button/button.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { createRipple } from '../../internal/create-ripple';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { buttonVariants } from './button-variants';\nimport s from './button.module.scss';\n\nconst getChildHref = (children: React.ReactNode): string | null => {\n const childArray = React.Children.toArray(children ?? []);\n if (childArray.length !== 1) {\n return null;\n }\n\n const child = childArray[0];\n if (!React.isValidElement<{ href?: string; to?: string }>(child)) {\n return null;\n }\n\n if (typeof child.props?.href === 'string') {\n return child.props.href;\n }\n\n if (typeof child.props?.to === 'string') {\n return child.props.to;\n }\n\n return null;\n};\n\nconst normalizePathname = (href: string, origin: string): string | null => {\n try {\n const url = new URL(href, origin);\n const normalizedPath = url.pathname.replace(/\\/+$/, '');\n return normalizedPath || '/';\n } catch {\n return null;\n }\n};\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n variant = 'contained',\n theme = 'primary',\n size = 'md',\n rounded = 'extra',\n iconOnly,\n className,\n asChild = false,\n onClick,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const childHref = asChild ? getChildHref(props.children) : null;\n const isBrowser = typeof window !== 'undefined';\n\n let currentPath: string | null = null;\n let targetPath: string | null = null;\n\n if (isBrowser) {\n const { pathname, origin } = window.location;\n currentPath = normalizePathname(pathname, origin);\n\n if (childHref) {\n targetPath = normalizePathname(childHref, origin);\n }\n }\n\n const isActiveLink = Boolean(\n asChild && currentPath && targetPath && currentPath === targetPath,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n createRipple(event, s['ripple']);\n onClick?.(event as React.MouseEvent<HTMLButtonElement>);\n };\n\n // Treat element children as decorative by default (icons get\n // aria-hidden automatically). Skip for `asChild` because Slot's child is\n // a wrapper element whose own content needs its own a11y decisions.\n const { children: rawChildren, ...restProps } = props;\n const children = asChild ? rawChildren : withAriaHiddenChildren(rawChildren);\n\n return (\n <Comp\n data-slot={'button'}\n data-active-link={isActiveLink ? 'true' : undefined}\n aria-current={isActiveLink && asChild ? 'page' : undefined}\n className={cn(buttonVariants({ variant, theme, iconOnly, size, rounded }), className)}\n ref={ref}\n onClick={handleClick}\n {...restProps}\n >\n {children}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"names":["_jsx"],"mappings":";;;;;;;;;AASA,MAAM,YAAY,GAAG,CAAC,QAAyB,KAAmB;AAChE,IAAA,MAAM,UAAU,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;AACzD,IAAA,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;AAC3B,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAiC,KAAK,CAAC,EAAE;AAChE,QAAA,OAAO,IAAI;IACb;IAEA,IAAI,OAAO,KAAK,CAAC,KAAK,EAAE,IAAI,KAAK,QAAQ,EAAE;AACzC,QAAA,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI;IACzB;IAEA,IAAI,OAAO,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,QAAQ,EAAE;AACvC,QAAA,OAAO,KAAK,CAAC,KAAK,CAAC,EAAE;IACvB;AAEA,IAAA,OAAO,IAAI;AACb,CAAC;AAED,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,MAAc,KAAmB;AACxE,IAAA,IAAI;QACF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC;AACjC,QAAA,MAAM,cAAc,GAAG,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACvD,OAAO,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G,WAAW,GAAG,sBAAsB,CAAC,WAAW,CAAC;AAE5E,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EACQ,QAAQ,EAAA,kBAAA,EACD,YAAY,GAAG,MAAM,GAAG,SAAS,EAAA,cAAA,EACrC,YAAY,IAAI,OAAO,GAAG,MAAM,GAAG,SAAS,EAC1D,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,EACrF,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,WAAW,EAAA,GAChB,SAAS,EAAA,QAAA,EAEZ,QAAQ,EAAA,CACJ;AAEX,CAAC;AAEH,MAAM,CAAC,WAAW,GAAG,QAAQ;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"button":"button-module_button__EjU7o","ripple":"button-module_ripple__j0tdq","button--rounded":"button-module_button--rounded__6IPaC","button--extra-rounded":"button-module_button--extra-rounded__6kAjO","button--contained":"button-module_button--contained__1s0RQ","button--primary":"button-module_button--primary__3D0Qe","button--secondary":"button-module_button--secondary__xbaEK","button--destructive":"button-module_button--destructive__sfH9g","button--warning":"button-module_button--warning__jynbu","button--success":"button-module_button--success__9BG1V","button--info":"button-module_button--info__145Jp","button--slate":"button-module_button--slate__YjsD2","button--inherit":"button-module_button--inherit__IlG-W","button--outlined":"button-module_button--outlined__iePg6","button--ghost":"button-module_button--ghost__t-WaS","button--xs":"button-module_button--xs__JYfOt","button--icon-only":"button-module_button--icon-only__2aWAe","button--sm":"button-module_button--sm__GWxsl","button--md":"button-module_button--md__wykOE","button--lg":"button-module_button--lg__UoGgu"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=button.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const chipVariants: (props?: ({
|
|
2
|
+
theme?: "inherit" | "primary" | "secondary" | "destructive" | "warning" | "success" | "info" | "slate" | null | undefined;
|
|
3
|
+
size?: "sm" | "md" | null | undefined;
|
|
4
|
+
wrap?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
//# sourceMappingURL=chip-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-variants.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip-variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;8EAyBvB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import s from './chip.module.scss.js';
|
|
3
|
+
|
|
4
|
+
const chipVariants = cva(s.chip, {
|
|
5
|
+
variants: {
|
|
6
|
+
theme: {
|
|
7
|
+
primary: s['chip--primary'],
|
|
8
|
+
secondary: s['chip--secondary'],
|
|
9
|
+
destructive: s['chip--destructive'],
|
|
10
|
+
warning: s['chip--warning'],
|
|
11
|
+
success: s['chip--success'],
|
|
12
|
+
info: s['chip--info'],
|
|
13
|
+
slate: s['chip--slate'],
|
|
14
|
+
inherit: s['chip--inherit'],
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: s['chip--sm'],
|
|
18
|
+
md: s['chip--md'],
|
|
19
|
+
},
|
|
20
|
+
wrap: {
|
|
21
|
+
true: s['chip--wrap'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
theme: 'primary',
|
|
26
|
+
size: 'md',
|
|
27
|
+
wrap: false,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export { chipVariants };
|
|
32
|
+
//# sourceMappingURL=chip-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip-variants.js","sources":["../../../src/ui/Chip/chip-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport s from './chip.module.scss';\n\nexport const chipVariants = cva(s.chip, {\n variants: {\n theme: {\n primary: s['chip--primary'],\n secondary: s['chip--secondary'],\n destructive: s['chip--destructive'],\n warning: s['chip--warning'],\n success: s['chip--success'],\n info: s['chip--info'],\n slate: s['chip--slate'],\n inherit: s['chip--inherit'],\n },\n size: {\n sm: s['chip--sm'],\n md: s['chip--md'],\n },\n wrap: {\n true: s['chip--wrap'],\n },\n },\n defaultVariants: {\n theme: 'primary',\n size: 'md',\n wrap: false,\n },\n});\n"],"names":[],"mappings":";;;MAGa,YAAY,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE;AACtC,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC;AAC3B,YAAA,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC;AAC/B,YAAA,WAAW,EAAE,CAAC,CAAC,mBAAmB,CAAC;AACnC,YAAA,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC;AAC3B,YAAA,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC;AAC3B,YAAA,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC;AACrB,YAAA,KAAK,EAAE,CAAC,CAAC,aAAa,CAAC;AACvB,YAAA,OAAO,EAAE,CAAC,CAAC,eAAe,CAAC;AAC5B,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC;AACjB,YAAA,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC;AAClB,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC;AACtB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { chipVariants } from './chip-variants';
|
|
4
|
+
export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {
|
|
5
|
+
}
|
|
6
|
+
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export { Chip };
|
|
8
|
+
//# sourceMappingURL=chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC;CAAG;AAErF,QAAA,MAAM,IAAI,mFAaT,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children.js';
|
|
5
|
+
import { chipVariants } from './chip-variants.js';
|
|
6
|
+
|
|
7
|
+
const Chip = React.forwardRef(({ className, size, theme, wrap, children, ...props }, ref) => {
|
|
8
|
+
return (jsx("span", { "data-slot": 'chip', ref: ref, className: cn(chipVariants({ size, theme, wrap }), className), ...props, children: withAriaHiddenChildren(children) }));
|
|
9
|
+
});
|
|
10
|
+
Chip.displayName = 'Chip';
|
|
11
|
+
|
|
12
|
+
export { Chip };
|
|
13
|
+
//# sourceMappingURL=chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../src/ui/Chip/chip.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { chipVariants } from './chip-variants';\n\nexport interface ChipProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {}\n\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(\n ({ className, size, theme, wrap, children, ...props }, ref) => {\n return (\n <span\n data-slot={'chip'}\n ref={ref}\n className={cn(chipVariants({ size, theme, wrap }), className)}\n {...props}\n >\n {withAriaHiddenChildren(children)}\n </span>\n );\n },\n);\nChip.displayName = 'Chip';\n\nexport { Chip };\n"],"names":["_jsx"],"mappings":";;;;;;AASA,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAI;AAC5D,IAAA,QACEA,GAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EACa,MAAM,EACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,EAAA,GACzD,KAAK,EAAA,QAAA,EAER,sBAAsB,CAAC,QAAQ,CAAC,EAAA,CAC5B;AAEX,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"chip":"chip-module_chip__34UqT","chip--wrap":"chip-module_chip--wrap__j1u6x","chip--sm":"chip-module_chip--sm__KpQBK","chip--md":"chip-module_chip--md__VKLci","chip--inherit":"chip-module_chip--inherit__SdUYH","chip--primary":"chip-module_chip--primary__jYgT0","chip--secondary":"chip-module_chip--secondary__KLeJe","chip--destructive":"chip-module_chip--destructive__kgqtH","chip--warning":"chip-module_chip--warning__cHfvN","chip--success":"chip-module_chip--success__Nr5L6","chip--info":"chip-module_chip--info__0ATsI","chip--slate":"chip-module_chip--slate__vl3hs"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=chip.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const codeBlockVariants: (props?: ({
|
|
2
|
+
theme?: "default" | "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=code-block-variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block-variants.d.ts","sourceRoot":"","sources":["../../../src/ui/CodeBlock/code-block-variants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;8EAsB5B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
import s from './code-block.module.scss.js';
|
|
3
|
+
|
|
4
|
+
const codeBlockVariants = cva(s['code-block'], {
|
|
5
|
+
variants: {
|
|
6
|
+
theme: {
|
|
7
|
+
default: s['code-block--default'],
|
|
8
|
+
primary: s['code-block--primary'],
|
|
9
|
+
secondary: s['code-block--secondary'],
|
|
10
|
+
destructive: s['code-block--destructive'],
|
|
11
|
+
warning: s['code-block--warning'],
|
|
12
|
+
success: s['code-block--success'],
|
|
13
|
+
info: s['code-block--info'],
|
|
14
|
+
slate: s['code-block--slate'],
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: s['code-block--sm'],
|
|
18
|
+
md: s['code-block--md'],
|
|
19
|
+
lg: s['code-block--lg'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
theme: 'default',
|
|
24
|
+
size: 'md',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export { codeBlockVariants };
|
|
29
|
+
//# sourceMappingURL=code-block-variants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block-variants.js","sources":["../../../src/ui/CodeBlock/code-block-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport s from './code-block.module.scss';\n\nexport const codeBlockVariants = cva(s['code-block'], {\n variants: {\n theme: {\n default: s['code-block--default'],\n primary: s['code-block--primary'],\n secondary: s['code-block--secondary'],\n destructive: s['code-block--destructive'],\n warning: s['code-block--warning'],\n success: s['code-block--success'],\n info: s['code-block--info'],\n slate: s['code-block--slate'],\n },\n size: {\n sm: s['code-block--sm'],\n md: s['code-block--md'],\n lg: s['code-block--lg'],\n },\n },\n defaultVariants: {\n theme: 'default',\n size: 'md',\n },\n});\n"],"names":[],"mappings":";;;AAGO,MAAM,iBAAiB,GAAG,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE;AACpD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,CAAC,CAAC,qBAAqB,CAAC;AACjC,YAAA,OAAO,EAAE,CAAC,CAAC,qBAAqB,CAAC;AACjC,YAAA,SAAS,EAAE,CAAC,CAAC,uBAAuB,CAAC;AACrC,YAAA,WAAW,EAAE,CAAC,CAAC,yBAAyB,CAAC;AACzC,YAAA,OAAO,EAAE,CAAC,CAAC,qBAAqB,CAAC;AACjC,YAAA,OAAO,EAAE,CAAC,CAAC,qBAAqB,CAAC;AACjC,YAAA,IAAI,EAAE,CAAC,CAAC,kBAAkB,CAAC;AAC3B,YAAA,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC;AAC9B,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC;AACvB,YAAA,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC;AACvB,YAAA,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC;AACxB,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,KAAK,EAAE,SAAS;AAChB,QAAA,IAAI,EAAE,IAAI;AACX,KAAA;AACF,CAAA;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { codeBlockVariants } from './code-block-variants';
|
|
4
|
+
export interface CodeBlockProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof codeBlockVariants> {
|
|
5
|
+
/** The code content to display. */
|
|
6
|
+
children: string;
|
|
7
|
+
/** Language label displayed in the header (e.g. "sql", "json", "typescript"). */
|
|
8
|
+
language?: string;
|
|
9
|
+
/** Show a copy-to-clipboard button. */
|
|
10
|
+
copyable?: boolean;
|
|
11
|
+
/** Enable collapse/expand behavior. When true, content is initially collapsed. */
|
|
12
|
+
collapsible?: boolean;
|
|
13
|
+
/** Max height in rem when collapsed. Defaults to 12. */
|
|
14
|
+
collapsedHeight?: number;
|
|
15
|
+
/** Whether the code block starts expanded when `collapsible` is true. */
|
|
16
|
+
defaultExpanded?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { CodeBlock };
|
|
20
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/ui/CodeBlock/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAG7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,MAAM,WAAW,cACf,SACE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,EACtD,YAAY,CAAC,OAAO,iBAAiB,CAAC;IACxC,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kFAAkF;IAClF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,wDAAwD;IACxD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,QAAA,MAAM,SAAS,uFAuJd,CAAC;AAGF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '../Button/button.js';
|
|
3
|
+
import { Icon } from '../Icon/icon.js';
|
|
4
|
+
import cn from 'clsx';
|
|
5
|
+
import { CheckIcon, CopyIcon, ChevronDownIcon } from 'lucide-react';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { codeBlockVariants } from './code-block-variants.js';
|
|
8
|
+
import s from './code-block.module.scss.js';
|
|
9
|
+
|
|
10
|
+
const CodeBlock = React.forwardRef(({ children, language, copyable = false, collapsible = false, collapsedHeight = 12, defaultExpanded = false, theme, size, className, ...props }, ref) => {
|
|
11
|
+
const [copied, setCopied] = React.useState(false);
|
|
12
|
+
const [expanded, setExpanded] = React.useState(defaultExpanded);
|
|
13
|
+
const preRef = React.useRef(null);
|
|
14
|
+
const copyTimeoutRef = React.useRef(undefined);
|
|
15
|
+
const hasMountedRef = React.useRef(false);
|
|
16
|
+
const isMountedRef = React.useRef(true);
|
|
17
|
+
React.useEffect(() => () => {
|
|
18
|
+
isMountedRef.current = false;
|
|
19
|
+
clearTimeout(copyTimeoutRef.current);
|
|
20
|
+
}, []);
|
|
21
|
+
const showHeader = language || copyable;
|
|
22
|
+
const isCollapsed = collapsible && !expanded;
|
|
23
|
+
const handleCopy = React.useCallback(() => {
|
|
24
|
+
void navigator.clipboard.writeText(children).then(() => {
|
|
25
|
+
if (!isMountedRef.current)
|
|
26
|
+
return;
|
|
27
|
+
setCopied(true);
|
|
28
|
+
clearTimeout(copyTimeoutRef.current);
|
|
29
|
+
copyTimeoutRef.current = setTimeout(() => setCopied(false), 2000);
|
|
30
|
+
});
|
|
31
|
+
}, [children]);
|
|
32
|
+
// Drive the height transition imperatively: animating to/from `auto` doesn't
|
|
33
|
+
// work in CSS, so we measure scrollHeight, lock it as a px value, then let
|
|
34
|
+
// CSS transition between that and the collapsed rem value.
|
|
35
|
+
React.useLayoutEffect(() => {
|
|
36
|
+
const pre = preRef.current;
|
|
37
|
+
if (!pre)
|
|
38
|
+
return;
|
|
39
|
+
if (!collapsible) {
|
|
40
|
+
pre.style.maxHeight = '';
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const collapsedValue = `${collapsedHeight}rem`;
|
|
44
|
+
if (!hasMountedRef.current) {
|
|
45
|
+
hasMountedRef.current = true;
|
|
46
|
+
pre.style.maxHeight = expanded ? '' : collapsedValue;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const fullHeight = pre.scrollHeight;
|
|
50
|
+
if (expanded) {
|
|
51
|
+
pre.style.maxHeight = `${fullHeight}px`;
|
|
52
|
+
const onEnd = (e) => {
|
|
53
|
+
if (e.propertyName !== 'max-height' || e.target !== pre)
|
|
54
|
+
return;
|
|
55
|
+
pre.style.maxHeight = '';
|
|
56
|
+
pre.removeEventListener('transitionend', onEnd);
|
|
57
|
+
};
|
|
58
|
+
pre.addEventListener('transitionend', onEnd);
|
|
59
|
+
return () => pre.removeEventListener('transitionend', onEnd);
|
|
60
|
+
}
|
|
61
|
+
pre.style.maxHeight = `${fullHeight}px`;
|
|
62
|
+
void pre.offsetHeight;
|
|
63
|
+
pre.style.maxHeight = collapsedValue;
|
|
64
|
+
}, [expanded, collapsible, collapsedHeight]);
|
|
65
|
+
return (jsxs("div", { ref: ref, "data-slot": 'code-block', className: cn(codeBlockVariants({ theme, size }), className), ...props, children: [showHeader ? (jsxs("div", { "data-slot": 'code-block-header', className: s['code-block-header'], children: [jsx("span", { "data-slot": 'code-block-language', className: s['code-block-language'], children: language ?? '' }), jsxs("span", { "data-slot": 'code-block-actions', className: s['code-block-actions'], children: [copied ? (jsxs("span", { "data-slot": 'code-block-copied', className: s['code-block-copied'], children: [jsx(Icon, { iconNode: CheckIcon, "aria-hidden": 'true', size: 14 }), " Copied"] })) : null, copyable ? (jsx(Button, { iconOnly: true, variant: 'ghost', size: 'xs', theme: 'inherit', onClick: handleCopy, "aria-label": 'Copy code', children: jsx(CopyIcon, {}) })) : null] })] })) : null, jsxs("div", { "data-slot": 'code-block-body', className: s['code-block-body'], children: [jsx("pre", { ref: preRef, "data-slot": 'code-block-content', className: cn(s['code-block-content'], collapsible && s['code-block-content--collapsible']), children: jsx("code", { children: children }) }), collapsible ? (jsx("div", { "data-slot": 'code-block-collapse-fade', className: cn(s['code-block-collapse-fade'], !isCollapsed && s['code-block-collapse-fade--hidden']), "aria-hidden": 'true' })) : null] }), collapsible ? (jsx("div", { "data-slot": 'code-block-toggle', className: s['code-block-toggle'], children: jsxs(Button, { variant: 'ghost', size: 'xs', theme: 'inherit', onClick: () => setExpanded(v => !v), children: [jsx(ChevronDownIcon, { className: cn(s['code-block-toggle-icon'], expanded && s['code-block-toggle-icon--up']) }), expanded ? 'Show less' : 'Show more'] }) })) : null] }));
|
|
66
|
+
});
|
|
67
|
+
CodeBlock.displayName = 'CodeBlock';
|
|
68
|
+
|
|
69
|
+
export { CodeBlock };
|
|
70
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.js","sources":["../../../src/ui/CodeBlock/code-block.tsx"],"sourcesContent":["import { Button } from '@constellation/ui/Button';\nimport { Icon } from '@constellation/ui/Icon';\nimport { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport { CheckIcon, ChevronDownIcon, CopyIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { codeBlockVariants } from './code-block-variants';\nimport s from './code-block.module.scss';\n\nexport interface CodeBlockProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>,\n VariantProps<typeof codeBlockVariants> {\n /** The code content to display. */\n children: string;\n /** Language label displayed in the header (e.g. \"sql\", \"json\", \"typescript\"). */\n language?: string;\n /** Show a copy-to-clipboard button. */\n copyable?: boolean;\n /** Enable collapse/expand behavior. When true, content is initially collapsed. */\n collapsible?: boolean;\n /** Max height in rem when collapsed. Defaults to 12. */\n collapsedHeight?: number;\n /** Whether the code block starts expanded when `collapsible` is true. */\n defaultExpanded?: boolean;\n}\n\nconst CodeBlock = React.forwardRef<HTMLDivElement, CodeBlockProps>(\n (\n {\n children,\n language,\n copyable = false,\n collapsible = false,\n collapsedHeight = 12,\n defaultExpanded = false,\n theme,\n size,\n className,\n ...props\n },\n ref,\n ) => {\n const [copied, setCopied] = React.useState(false);\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const preRef = React.useRef<HTMLPreElement>(null);\n const copyTimeoutRef = React.useRef<ReturnType<typeof setTimeout>>(undefined);\n const hasMountedRef = React.useRef(false);\n const isMountedRef = React.useRef(true);\n\n React.useEffect(\n () => () => {\n isMountedRef.current = false;\n clearTimeout(copyTimeoutRef.current);\n },\n [],\n );\n\n const showHeader = language || copyable;\n const isCollapsed = collapsible && !expanded;\n\n const handleCopy = React.useCallback(() => {\n void navigator.clipboard.writeText(children).then(() => {\n if (!isMountedRef.current) return;\n setCopied(true);\n clearTimeout(copyTimeoutRef.current);\n copyTimeoutRef.current = setTimeout(() => setCopied(false), 2000);\n });\n }, [children]);\n\n // Drive the height transition imperatively: animating to/from `auto` doesn't\n // work in CSS, so we measure scrollHeight, lock it as a px value, then let\n // CSS transition between that and the collapsed rem value.\n React.useLayoutEffect(() => {\n const pre = preRef.current;\n if (!pre) return;\n if (!collapsible) {\n pre.style.maxHeight = '';\n return;\n }\n const collapsedValue = `${collapsedHeight}rem`;\n if (!hasMountedRef.current) {\n hasMountedRef.current = true;\n pre.style.maxHeight = expanded ? '' : collapsedValue;\n return;\n }\n const fullHeight = pre.scrollHeight;\n if (expanded) {\n pre.style.maxHeight = `${fullHeight}px`;\n const onEnd = (e: TransitionEvent) => {\n if (e.propertyName !== 'max-height' || e.target !== pre) return;\n pre.style.maxHeight = '';\n pre.removeEventListener('transitionend', onEnd);\n };\n pre.addEventListener('transitionend', onEnd);\n return () => pre.removeEventListener('transitionend', onEnd);\n }\n pre.style.maxHeight = `${fullHeight}px`;\n void pre.offsetHeight;\n pre.style.maxHeight = collapsedValue;\n }, [expanded, collapsible, collapsedHeight]);\n\n return (\n <div\n ref={ref}\n data-slot={'code-block'}\n className={cn(codeBlockVariants({ theme, size }), className)}\n {...props}\n >\n {showHeader ? (\n <div data-slot={'code-block-header'} className={s['code-block-header']}>\n <span data-slot={'code-block-language'} className={s['code-block-language']}>\n {language ?? ''}\n </span>\n <span data-slot={'code-block-actions'} className={s['code-block-actions']}>\n {copied ? (\n <span data-slot={'code-block-copied'} className={s['code-block-copied']}>\n <Icon iconNode={CheckIcon} aria-hidden={'true'} size={14} /> Copied\n </span>\n ) : null}\n {copyable ? (\n <Button\n iconOnly\n variant={'ghost'}\n size={'xs'}\n theme={'inherit'}\n onClick={handleCopy}\n aria-label={'Copy code'}\n >\n <CopyIcon />\n </Button>\n ) : null}\n </span>\n </div>\n ) : null}\n <div data-slot={'code-block-body'} className={s['code-block-body']}>\n <pre\n ref={preRef}\n data-slot={'code-block-content'}\n className={cn(\n s['code-block-content'],\n collapsible && s['code-block-content--collapsible'],\n )}\n >\n <code>{children}</code>\n </pre>\n {collapsible ? (\n <div\n data-slot={'code-block-collapse-fade'}\n className={cn(\n s['code-block-collapse-fade'],\n !isCollapsed && s['code-block-collapse-fade--hidden'],\n )}\n aria-hidden={'true'}\n />\n ) : null}\n </div>\n {collapsible ? (\n <div data-slot={'code-block-toggle'} className={s['code-block-toggle']}>\n <Button\n variant={'ghost'}\n size={'xs'}\n theme={'inherit'}\n onClick={() => setExpanded(v => !v)}\n >\n <ChevronDownIcon\n className={cn(\n s['code-block-toggle-icon'],\n expanded && s['code-block-toggle-icon--up'],\n )}\n />\n {expanded ? 'Show less' : 'Show more'}\n </Button>\n </div>\n ) : null}\n </div>\n );\n },\n);\nCodeBlock.displayName = 'CodeBlock';\n\nexport { CodeBlock };\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AA2BA,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAChC,CACE,EACE,QAAQ,EACR,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,KAAK,EACnB,eAAe,GAAG,EAAE,EACpB,eAAe,GAAG,KAAK,EACvB,KAAK,EACL,IAAI,EACJ,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,KACD;AACF,IAAA,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,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AoB,EAC/B,SAAS,EAAE,EAAE,CACX,CAAC,CAAC,oBAAoB,CAAC,EACvB,WAAW,IAAI,CAAC,CAAC,iCAAiC,CAAC,CACpD,EAAA,QAAA,EAEDA,GAAA,CAAA,MAAA,EAAA,EAAA,QAAA,EAAO,QAAQ,GAAQ,EAAA,CACnB,EACL,WAAW,IACVA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACa,0BAA0B,EACrC,SAAS,EAAE,EAAE,CACX,CAAC,CAAC,0BAA0B,CAAC,EAC7B,CAAC,WAAW,IAAI,CAAC,CAAC,kCAAkC,CAAC,CACtD,EAAA,aAAA,EACY,MAAM,EAAA,CACnB,IACA,IAAI,CAAA,EAAA,CACJ,EACL,WAAW,IACVA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EAAgB,mBAAmB,EAAE,SAAS,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAA,QAAA,EACpED,KAAC,MAAM,EAAA,EACL,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,aAEnCC,GAAA,CAAC,eAAe,EAAA,EACd,SAAS,EAAE,EAAE,CACX,CAAC,CAAC,wBAAwB,CAAC,EAC3B,QAAQ,IAAI,CAAC,CAAC,4BAA4B,CAAC,CAC5C,EAAA,CACD,EACD,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAA,EAAA,CAC9B,EAAA,CACL,IACJ,IAAI,CAAA,EAAA,CACJ;AAEV,CAAC;AAEH,SAAS,CAAC,WAAW,GAAG,WAAW;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
var s = {"code-block":"code-block-module_code-block__Kf7bm","code-block-header":"code-block-module_code-block-header__siN-o","code-block-language":"code-block-module_code-block-language__Ej-Wl","code-block-actions":"code-block-module_code-block-actions__Pd-Db","code-block-body":"code-block-module_code-block-body__rKvF9","code-block-content":"code-block-module_code-block-content__BrvYD","code-block-content--collapsible":"code-block-module_code-block-content--collapsible__YZY6q","code-block-collapse-fade":"code-block-module_code-block-collapse-fade__rpNH3","code-block-collapse-fade--hidden":"code-block-module_code-block-collapse-fade--hidden__kXMfK","code-block-toggle":"code-block-module_code-block-toggle__ynepa","code-block-toggle-icon":"code-block-module_code-block-toggle-icon__l7jsx","code-block-toggle-icon--up":"code-block-module_code-block-toggle-icon--up__fFd6b","code-block-copied":"code-block-module_code-block-copied__n7ms8","code-block--sm":"code-block-module_code-block--sm__x2LE2","code-block--md":"code-block-module_code-block--md__vpdzA","code-block--lg":"code-block-module_code-block--lg__OdpVn","code-block--default":"code-block-module_code-block--default__Ql8BE","code-block--primary":"code-block-module_code-block--primary__D6lRH","code-block--secondary":"code-block-module_code-block--secondary__HHhbI","code-block--destructive":"code-block-module_code-block--destructive__J5-Y3","code-block--warning":"code-block-module_code-block--warning__bQZ03","code-block--success":"code-block-module_code-block--success__gqxrD","code-block--info":"code-block-module_code-block--info__YJcXb","code-block--slate":"code-block-module_code-block--slate__ANuoU"};
|
|
2
|
+
|
|
3
|
+
export { s as default };
|
|
4
|
+
//# sourceMappingURL=code-block.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/CodeBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-indicator.d.ts","sourceRoot":"","sources":["../../../src/ui/DevIndicator/dev-indicator.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAUD,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,EAAE,iBAAiB,sCAa5D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import cn from 'clsx';
|
|
3
|
+
import s from './dev-indicator.module.scss.js';
|
|
4
|
+
|
|
5
|
+
function isLocalDev() {
|
|
6
|
+
try {
|
|
7
|
+
return typeof __CONSTELLATION_LOCAL__ !== 'undefined' && __CONSTELLATION_LOCAL__ === true;
|
|
8
|
+
}
|
|
9
|
+
catch {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function DevIndicator({ className }) {
|
|
14
|
+
if (!isLocalDev())
|
|
15
|
+
return null;
|
|
16
|
+
return (jsx("div", { "data-slot": 'dev-indicator', className: cn(s['dev-indicator'], className), title: 'Constellation: local development build', "aria-hidden": 'true', children: jsx("span", { className: s['dev-indicator-label'], children: "C" }) }));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { DevIndicator };
|
|
20
|
+
//# sourceMappingURL=dev-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-indicator.js","sources":["../../../src/ui/DevIndicator/dev-indicator.tsx"],"sourcesContent":["import cn from 'clsx';\nimport s from './dev-indicator.module.scss';\n\ndeclare const __CONSTELLATION_LOCAL__: boolean | undefined;\n\nexport interface DevIndicatorProps {\n className?: string;\n}\n\nfunction isLocalDev(): boolean {\n try {\n return typeof __CONSTELLATION_LOCAL__ !== 'undefined' && __CONSTELLATION_LOCAL__ === true;\n } catch {\n return false;\n }\n}\n\nexport function DevIndicator({ className }: DevIndicatorProps) {\n if (!isLocalDev()) return null;\n\n return (\n <div\n data-slot={'dev-indicator'}\n className={cn(s['dev-indicator'], className)}\n title={'Constellation: local development build'}\n aria-hidden={'true'}\n >\n <span className={s['dev-indicator-label']}>C</span>\n </div>\n );\n}\n"],"names":["_jsx"],"mappings":";;;;AASA,SAAS,UAAU,GAAA;AACjB,IAAA,IAAI;QACF,OAAO,OAAO,uBAAuB,KAAK,WAAW,IAAI,uBAAuB,KAAK,IAAI;IAC3F;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,KAAK;IACd;AACF;AAEM,SAAU,YAAY,CAAC,EAAE,SAAS,EAAqB,EAAA;IAC3D,IAAI,CAAC,UAAU,EAAE;AAAE,QAAA,OAAO,IAAI;AAE9B,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACa,eAAe,EAC1B,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,EAC5C,KAAK,EAAE,wCAAwC,EAAA,aAAA,EAClC,MAAM,EAAA,QAAA,EAEnBA,cAAM,SAAS,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAA,QAAA,EAAA,GAAA,EAAA,CAAU,EAAA,CAC/C;AAEV;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev-indicator.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/DevIndicator/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|