@slipstream-ui/core 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +470 -30
- package/dist/index.d.ts +470 -30
- package/dist/index.js +1455 -750
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1442 -744
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +7 -1
- package/dist/manifests/alert.manifest.json +1 -1
- package/dist/manifests/announcement-bar.manifest.json +1 -1
- package/dist/manifests/app-shell.manifest.json +1 -1
- package/dist/manifests/applied-filters.manifest.json +1 -1
- package/dist/manifests/article-card.manifest.json +1 -1
- package/dist/manifests/auth-layout.manifest.json +19 -1
- package/dist/manifests/autocomplete.manifest.json +1 -1
- package/dist/manifests/avatar.manifest.json +1 -1
- package/dist/manifests/badge.manifest.json +13 -1
- package/dist/manifests/block.manifest.json +1 -1
- package/dist/manifests/bottom-nav.manifest.json +130 -0
- package/dist/manifests/breadcrumb.manifest.json +1 -1
- package/dist/manifests/button-group.manifest.json +1 -1
- package/dist/manifests/button.manifest.json +1 -1
- package/dist/manifests/card.manifest.json +1 -1
- package/dist/manifests/checkbox.manifest.json +1 -1
- package/dist/manifests/comparison-table.manifest.json +1 -1
- package/dist/manifests/confirm-dialog.manifest.json +1 -1
- package/dist/manifests/contact-strip.manifest.json +1 -1
- package/dist/manifests/container.manifest.json +1 -1
- package/dist/manifests/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.manifest.json +1 -1
- package/dist/manifests/date-picker.manifest.json +1 -1
- package/dist/manifests/date-range-picker.manifest.json +1 -1
- package/dist/manifests/deal-card.manifest.json +158 -0
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +108 -0
- package/dist/manifests/drawer.manifest.json +48 -2
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +114 -0
- package/dist/manifests/feature-grid.manifest.json +1 -1
- package/dist/manifests/feature-row.manifest.json +1 -1
- package/dist/manifests/fieldset.manifest.json +1 -1
- package/dist/manifests/file-upload.manifest.json +1 -1
- package/dist/manifests/filter-bar.manifest.json +1 -1
- package/dist/manifests/filter-chips.manifest.json +1 -1
- package/dist/manifests/filter-panel.manifest.json +1 -1
- package/dist/manifests/flex.manifest.json +1 -1
- package/dist/manifests/form-field.manifest.json +1 -1
- package/dist/manifests/form-layout.manifest.json +1 -1
- package/dist/manifests/form.manifest.json +1 -1
- package/dist/manifests/grid.manifest.json +1 -1
- package/dist/manifests/heading.manifest.json +1 -1
- package/dist/manifests/hero.manifest.json +40 -8
- package/dist/manifests/input-group.manifest.json +1 -1
- package/dist/manifests/input.manifest.json +1 -1
- package/dist/manifests/label.manifest.json +1 -1
- package/dist/manifests/link-tabs.manifest.json +1 -1
- package/dist/manifests/link.manifest.json +1 -1
- package/dist/manifests/list.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +88 -0
- package/dist/manifests/logo-cloud.manifest.json +1 -1
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +36 -4
- package/dist/manifests/multi-select.manifest.json +1 -1
- package/dist/manifests/newsletter.manifest.json +1 -1
- package/dist/manifests/page-header.manifest.json +7 -1
- package/dist/manifests/pagination.manifest.json +1 -1
- package/dist/manifests/password-input.manifest.json +1 -1
- package/dist/manifests/popover.manifest.json +1 -1
- package/dist/manifests/process-steps.manifest.json +1 -1
- package/dist/manifests/progress.manifest.json +1 -1
- package/dist/manifests/prose.manifest.json +1 -1
- package/dist/manifests/radio.manifest.json +1 -1
- package/dist/manifests/range-slider.manifest.json +1 -1
- package/dist/manifests/search.manifest.json +1 -1
- package/dist/manifests/section-heading.manifest.json +1 -1
- package/dist/manifests/section.manifest.json +1 -1
- package/dist/manifests/segmented-control.manifest.json +1 -1
- package/dist/manifests/select-menu.manifest.json +2 -2
- package/dist/manifests/select.manifest.json +1 -1
- package/dist/manifests/separator.manifest.json +1 -1
- package/dist/manifests/site-footer.manifest.json +1 -1
- package/dist/manifests/site-header.manifest.json +1 -1
- package/dist/manifests/skeleton.manifest.json +1 -1
- package/dist/manifests/spinner.manifest.json +1 -1
- package/dist/manifests/stat-band.manifest.json +1 -1
- package/dist/manifests/stepper.manifest.json +69 -5
- package/dist/manifests/switch.manifest.json +1 -1
- package/dist/manifests/table-card.manifest.json +1 -1
- package/dist/manifests/table-of-contents.manifest.json +26 -5
- package/dist/manifests/table.manifest.json +1 -1
- package/dist/manifests/tabs.manifest.json +1 -1
- package/dist/manifests/testimonial.manifest.json +1 -1
- package/dist/manifests/text.manifest.json +1 -1
- package/dist/manifests/textarea.manifest.json +1 -1
- package/dist/manifests/theme-toggle.manifest.json +1 -1
- package/dist/manifests/time-picker.manifest.json +1 -1
- package/dist/manifests/timeline.manifest.json +1 -1
- package/dist/manifests/toast.manifest.json +1 -1
- package/dist/manifests/tombstone-card.manifest.json +97 -0
- package/dist/manifests/tooltip.manifest.json +1 -1
- package/dist/src/components/accordion/Accordion.d.ts +17 -1
- package/dist/src/components/accordion/Accordion.js +5 -1
- package/dist/src/components/accordion/Accordion.js.map +1 -1
- package/dist/src/components/accordion/Accordion.mjs +5 -1
- package/dist/src/components/accordion/Accordion.mjs.map +1 -1
- package/dist/src/components/auth-layout/AuthLayout.d.ts +14 -2
- package/dist/src/components/auth-layout/AuthLayout.js +10 -2
- package/dist/src/components/auth-layout/AuthLayout.js.map +1 -1
- package/dist/src/components/auth-layout/AuthLayout.mjs +10 -2
- package/dist/src/components/auth-layout/AuthLayout.mjs.map +1 -1
- package/dist/src/components/badge/Badge.d.ts +2 -0
- package/dist/src/components/badge/Badge.js +9 -3
- package/dist/src/components/badge/Badge.js.map +1 -1
- package/dist/src/components/badge/Badge.mjs +9 -3
- package/dist/src/components/badge/Badge.mjs.map +1 -1
- package/dist/src/components/bottom-nav/BottomNav.d.ts +36 -0
- package/dist/src/components/bottom-nav/BottomNav.js +90 -0
- package/dist/src/components/bottom-nav/BottomNav.js.map +1 -0
- package/dist/src/components/bottom-nav/BottomNav.mjs +66 -0
- package/dist/src/components/bottom-nav/BottomNav.mjs.map +1 -0
- package/dist/src/components/bottom-nav/index.d.ts +1 -0
- package/dist/src/components/bottom-nav/index.js +23 -0
- package/dist/src/components/bottom-nav/index.js.map +1 -0
- package/dist/src/components/bottom-nav/index.mjs +2 -0
- package/dist/src/components/bottom-nav/index.mjs.map +1 -0
- package/dist/src/components/date-picker/DatePicker.js +1 -1
- package/dist/src/components/date-picker/DatePicker.js.map +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs +1 -1
- package/dist/src/components/date-picker/DatePicker.mjs.map +1 -1
- package/dist/src/components/deal-card/DealCard.d.ts +72 -0
- package/dist/src/components/deal-card/DealCard.js +108 -0
- package/dist/src/components/deal-card/DealCard.js.map +1 -0
- package/dist/src/components/deal-card/DealCard.mjs +74 -0
- package/dist/src/components/deal-card/DealCard.mjs.map +1 -0
- package/dist/src/components/deal-card/index.d.ts +2 -0
- package/dist/src/components/deal-card/index.js +29 -0
- package/dist/src/components/deal-card/index.js.map +1 -0
- package/dist/src/components/deal-card/index.mjs +5 -0
- package/dist/src/components/deal-card/index.mjs.map +1 -0
- package/dist/src/components/document-card/DocumentCard.d.ts +42 -0
- package/dist/src/components/document-card/DocumentCard.js +84 -0
- package/dist/src/components/document-card/DocumentCard.js.map +1 -0
- package/dist/src/components/document-card/DocumentCard.mjs +50 -0
- package/dist/src/components/document-card/DocumentCard.mjs.map +1 -0
- package/dist/src/components/document-card/index.d.ts +2 -0
- package/dist/src/components/document-card/index.js +29 -0
- package/dist/src/components/document-card/index.js.map +1 -0
- package/dist/src/components/document-card/index.mjs +5 -0
- package/dist/src/components/document-card/index.mjs.map +1 -0
- package/dist/src/components/drawer/Drawer.d.ts +25 -2
- package/dist/src/components/drawer/Drawer.js +97 -6
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/drawer/Drawer.mjs +97 -6
- package/dist/src/components/drawer/Drawer.mjs.map +1 -1
- package/dist/src/components/empty-state/EmptyState.d.ts +13 -4
- package/dist/src/components/empty-state/EmptyState.js +13 -1
- package/dist/src/components/empty-state/EmptyState.js.map +1 -1
- package/dist/src/components/empty-state/EmptyState.mjs +13 -1
- package/dist/src/components/empty-state/EmptyState.mjs.map +1 -1
- package/dist/src/components/entity-card/EntityCard.d.ts +78 -0
- package/dist/src/components/entity-card/EntityCard.js +95 -0
- package/dist/src/components/entity-card/EntityCard.js.map +1 -0
- package/dist/src/components/entity-card/EntityCard.mjs +60 -0
- package/dist/src/components/entity-card/EntityCard.mjs.map +1 -0
- package/dist/src/components/entity-card/index.d.ts +2 -0
- package/dist/src/components/entity-card/index.js +31 -0
- package/dist/src/components/entity-card/index.js.map +1 -0
- package/dist/src/components/entity-card/index.mjs +6 -0
- package/dist/src/components/entity-card/index.mjs.map +1 -0
- package/dist/src/components/hero/Hero.d.ts +25 -13
- package/dist/src/components/hero/Hero.js +116 -12
- package/dist/src/components/hero/Hero.js.map +1 -1
- package/dist/src/components/hero/Hero.mjs +116 -12
- package/dist/src/components/hero/Hero.mjs.map +1 -1
- package/dist/src/components/load-more/LoadMore.d.ts +34 -0
- package/dist/src/components/load-more/LoadMore.js +55 -0
- package/dist/src/components/load-more/LoadMore.js.map +1 -0
- package/dist/src/components/load-more/LoadMore.mjs +21 -0
- package/dist/src/components/load-more/LoadMore.mjs.map +1 -0
- package/dist/src/components/load-more/index.d.ts +2 -0
- package/dist/src/components/load-more/index.js +29 -0
- package/dist/src/components/load-more/index.js.map +1 -0
- package/dist/src/components/load-more/index.mjs +5 -0
- package/dist/src/components/load-more/index.mjs.map +1 -0
- package/dist/src/components/metric-card/MetricCard.d.ts +23 -4
- package/dist/src/components/metric-card/MetricCard.js +32 -5
- package/dist/src/components/metric-card/MetricCard.js.map +1 -1
- package/dist/src/components/metric-card/MetricCard.mjs +32 -5
- package/dist/src/components/metric-card/MetricCard.mjs.map +1 -1
- package/dist/src/components/page-header/PageHeader.d.ts +4 -0
- package/dist/src/components/page-header/PageHeader.js +3 -2
- package/dist/src/components/page-header/PageHeader.js.map +1 -1
- package/dist/src/components/page-header/PageHeader.mjs +3 -2
- package/dist/src/components/page-header/PageHeader.mjs.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.js +6 -6
- package/dist/src/components/range-slider/RangeSlider.js.map +1 -1
- package/dist/src/components/range-slider/RangeSlider.mjs +6 -6
- package/dist/src/components/range-slider/RangeSlider.mjs.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.js +2 -0
- package/dist/src/components/select-menu/SelectMenu.js.map +1 -1
- package/dist/src/components/select-menu/SelectMenu.mjs +2 -0
- package/dist/src/components/select-menu/SelectMenu.mjs.map +1 -1
- package/dist/src/components/separator/Separator.d.ts +3 -3
- package/dist/src/components/separator/Separator.js +1 -1
- package/dist/src/components/separator/Separator.js.map +1 -1
- package/dist/src/components/separator/Separator.mjs +1 -1
- package/dist/src/components/separator/Separator.mjs.map +1 -1
- package/dist/src/components/stepper/Stepper.d.ts +35 -0
- package/dist/src/components/stepper/Stepper.js +118 -25
- package/dist/src/components/stepper/Stepper.js.map +1 -1
- package/dist/src/components/stepper/Stepper.mjs +118 -25
- package/dist/src/components/stepper/Stepper.mjs.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.d.ts +10 -2
- package/dist/src/components/table-of-contents/TableOfContents.js +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.js.map +1 -1
- package/dist/src/components/table-of-contents/TableOfContents.mjs +13 -0
- package/dist/src/components/table-of-contents/TableOfContents.mjs.map +1 -1
- package/dist/src/components/tabs/Tabs.js +43 -3
- package/dist/src/components/tabs/Tabs.js.map +1 -1
- package/dist/src/components/tabs/Tabs.mjs +43 -3
- package/dist/src/components/tabs/Tabs.mjs.map +1 -1
- package/dist/src/components/time-picker/TimePicker.js +1 -1
- package/dist/src/components/time-picker/TimePicker.js.map +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs +1 -1
- package/dist/src/components/time-picker/TimePicker.mjs.map +1 -1
- package/dist/src/components/timeline/Timeline.js +2 -2
- package/dist/src/components/timeline/Timeline.js.map +1 -1
- package/dist/src/components/timeline/Timeline.mjs +2 -2
- package/dist/src/components/timeline/Timeline.mjs.map +1 -1
- package/dist/src/components/tombstone-card/TombstoneCard.d.ts +39 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js +86 -0
- package/dist/src/components/tombstone-card/TombstoneCard.js.map +1 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs +52 -0
- package/dist/src/components/tombstone-card/TombstoneCard.mjs.map +1 -0
- package/dist/src/components/tombstone-card/index.d.ts +2 -0
- package/dist/src/components/tombstone-card/index.js +29 -0
- package/dist/src/components/tombstone-card/index.js.map +1 -0
- package/dist/src/components/tombstone-card/index.mjs +5 -0
- package/dist/src/components/tombstone-card/index.mjs.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/styles-full.css +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/src/components/accordion/Accordion.test.tsx +31 -0
- package/src/components/accordion/Accordion.tsx +27 -2
- package/src/components/auth-layout/AuthLayout.test.tsx +36 -0
- package/src/components/auth-layout/AuthLayout.tsx +20 -3
- package/src/components/badge/Badge.test.tsx +7 -0
- package/src/components/badge/Badge.tsx +8 -2
- package/src/components/bottom-nav/BottomNav.test.tsx +48 -0
- package/src/components/bottom-nav/BottomNav.tsx +117 -0
- package/src/components/bottom-nav/index.ts +1 -0
- package/src/components/date-picker/DatePicker.tsx +1 -1
- package/src/components/deal-card/DealCard.test.tsx +54 -0
- package/src/components/deal-card/DealCard.tsx +138 -0
- package/src/components/deal-card/index.ts +2 -0
- package/src/components/document-card/DocumentCard.test.tsx +41 -0
- package/src/components/document-card/DocumentCard.tsx +82 -0
- package/src/components/document-card/index.ts +2 -0
- package/src/components/drawer/Drawer.test.tsx +86 -1
- package/src/components/drawer/Drawer.tsx +135 -7
- package/src/components/empty-state/EmptyState.test.tsx +26 -1
- package/src/components/empty-state/EmptyState.tsx +40 -3
- package/src/components/entity-card/EntityCard.test.tsx +38 -0
- package/src/components/entity-card/EntityCard.tsx +133 -0
- package/src/components/entity-card/index.ts +2 -0
- package/src/components/hero/Hero.test.tsx +14 -0
- package/src/components/hero/Hero.tsx +111 -19
- package/src/components/load-more/LoadMore.test.tsx +28 -0
- package/src/components/load-more/LoadMore.tsx +53 -0
- package/src/components/load-more/index.ts +2 -0
- package/src/components/metric-card/MetricCard.test.tsx +32 -0
- package/src/components/metric-card/MetricCard.tsx +45 -7
- package/src/components/page-header/PageHeader.test.tsx +13 -0
- package/src/components/page-header/PageHeader.tsx +5 -2
- package/src/components/range-slider/RangeSlider.test.tsx +8 -0
- package/src/components/range-slider/RangeSlider.tsx +10 -6
- package/src/components/select-menu/SelectMenu.test.tsx +20 -10
- package/src/components/select-menu/SelectMenu.tsx +2 -0
- package/src/components/separator/Separator.test.tsx +9 -1
- package/src/components/separator/Separator.tsx +1 -1
- package/src/components/stepper/Stepper.test.tsx +19 -0
- package/src/components/stepper/Stepper.tsx +169 -37
- package/src/components/table-of-contents/TableOfContents.test.tsx +12 -1
- package/src/components/table-of-contents/TableOfContents.tsx +25 -1
- package/src/components/tabs/Tabs.test.tsx +12 -0
- package/src/components/tabs/Tabs.tsx +48 -4
- package/src/components/time-picker/TimePicker.tsx +1 -1
- package/src/components/timeline/Timeline.tsx +2 -2
- package/src/components/tombstone-card/TombstoneCard.test.tsx +26 -0
- package/src/components/tombstone-card/TombstoneCard.tsx +77 -0
- package/src/components/tombstone-card/index.ts +2 -0
- package/src/index.ts +6 -0
- package/src/manifests/accordion.manifest.json +7 -1
- package/src/manifests/alert.manifest.json +1 -1
- package/src/manifests/announcement-bar.manifest.json +1 -1
- package/src/manifests/app-shell.manifest.json +1 -1
- package/src/manifests/applied-filters.manifest.json +1 -1
- package/src/manifests/article-card.manifest.json +1 -1
- package/src/manifests/auth-layout.manifest.json +19 -1
- package/src/manifests/autocomplete.manifest.json +1 -1
- package/src/manifests/avatar.manifest.json +1 -1
- package/src/manifests/badge.manifest.json +13 -1
- package/src/manifests/block.manifest.json +1 -1
- package/src/manifests/bottom-nav.manifest.json +130 -0
- package/src/manifests/breadcrumb.manifest.json +1 -1
- package/src/manifests/button-group.manifest.json +1 -1
- package/src/manifests/button.manifest.json +1 -1
- package/src/manifests/card.manifest.json +1 -1
- package/src/manifests/checkbox.manifest.json +1 -1
- package/src/manifests/comparison-table.manifest.json +1 -1
- package/src/manifests/confirm-dialog.manifest.json +1 -1
- package/src/manifests/contact-strip.manifest.json +1 -1
- package/src/manifests/container.manifest.json +1 -1
- package/src/manifests/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.manifest.json +1 -1
- package/src/manifests/date-picker.manifest.json +1 -1
- package/src/manifests/date-range-picker.manifest.json +1 -1
- package/src/manifests/deal-card.manifest.json +158 -0
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +108 -0
- package/src/manifests/drawer.manifest.json +48 -2
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +114 -0
- package/src/manifests/feature-grid.manifest.json +1 -1
- package/src/manifests/feature-row.manifest.json +1 -1
- package/src/manifests/fieldset.manifest.json +1 -1
- package/src/manifests/file-upload.manifest.json +1 -1
- package/src/manifests/filter-bar.manifest.json +1 -1
- package/src/manifests/filter-chips.manifest.json +1 -1
- package/src/manifests/filter-panel.manifest.json +1 -1
- package/src/manifests/flex.manifest.json +1 -1
- package/src/manifests/form-field.manifest.json +1 -1
- package/src/manifests/form-layout.manifest.json +1 -1
- package/src/manifests/form.manifest.json +1 -1
- package/src/manifests/grid.manifest.json +1 -1
- package/src/manifests/heading.manifest.json +1 -1
- package/src/manifests/hero.manifest.json +40 -8
- package/src/manifests/input-group.manifest.json +1 -1
- package/src/manifests/input.manifest.json +1 -1
- package/src/manifests/label.manifest.json +1 -1
- package/src/manifests/link-tabs.manifest.json +1 -1
- package/src/manifests/link.manifest.json +1 -1
- package/src/manifests/list.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +88 -0
- package/src/manifests/logo-cloud.manifest.json +1 -1
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +36 -4
- package/src/manifests/multi-select.manifest.json +1 -1
- package/src/manifests/newsletter.manifest.json +1 -1
- package/src/manifests/page-header.manifest.json +7 -1
- package/src/manifests/pagination.manifest.json +1 -1
- package/src/manifests/password-input.manifest.json +1 -1
- package/src/manifests/popover.manifest.json +1 -1
- package/src/manifests/process-steps.manifest.json +1 -1
- package/src/manifests/progress.manifest.json +1 -1
- package/src/manifests/prose.manifest.json +1 -1
- package/src/manifests/radio.manifest.json +1 -1
- package/src/manifests/range-slider.manifest.json +1 -1
- package/src/manifests/search.manifest.json +1 -1
- package/src/manifests/section-heading.manifest.json +1 -1
- package/src/manifests/section.manifest.json +1 -1
- package/src/manifests/segmented-control.manifest.json +1 -1
- package/src/manifests/select-menu.manifest.json +2 -2
- package/src/manifests/select.manifest.json +1 -1
- package/src/manifests/separator.manifest.json +1 -1
- package/src/manifests/site-footer.manifest.json +1 -1
- package/src/manifests/site-header.manifest.json +1 -1
- package/src/manifests/skeleton.manifest.json +1 -1
- package/src/manifests/spinner.manifest.json +1 -1
- package/src/manifests/stat-band.manifest.json +1 -1
- package/src/manifests/stepper.manifest.json +69 -5
- package/src/manifests/switch.manifest.json +1 -1
- package/src/manifests/table-card.manifest.json +1 -1
- package/src/manifests/table-of-contents.manifest.json +26 -5
- package/src/manifests/table.manifest.json +1 -1
- package/src/manifests/tabs.manifest.json +1 -1
- package/src/manifests/testimonial.manifest.json +1 -1
- package/src/manifests/text.manifest.json +1 -1
- package/src/manifests/textarea.manifest.json +1 -1
- package/src/manifests/theme-toggle.manifest.json +1 -1
- package/src/manifests/time-picker.manifest.json +1 -1
- package/src/manifests/timeline.manifest.json +1 -1
- package/src/manifests/toast.manifest.json +1 -1
- package/src/manifests/tombstone-card.manifest.json +97 -0
- package/src/manifests/tooltip.manifest.json +1 -1
- package/src/test/jest-axe.d.ts +6 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "load-more",
|
|
3
|
+
"name": "LoadMore",
|
|
4
|
+
"tier": "molecule",
|
|
5
|
+
"package": "@slipstream-ui/core",
|
|
6
|
+
"importPath": "@slipstream-ui/core",
|
|
7
|
+
"version": "0.8.0",
|
|
8
|
+
"sourceDir": "load-more",
|
|
9
|
+
"exportName": "LoadMore",
|
|
10
|
+
"description": "Load-more control with pending and end-of-list states.",
|
|
11
|
+
"designIntent": "Paginated lists without page numbers need one consistent load-more control that announces loading and the end of the list. LoadMore keeps the row layout and state copy in one place.",
|
|
12
|
+
"props": [
|
|
13
|
+
{
|
|
14
|
+
"name": "hasMore",
|
|
15
|
+
"type": "boolean",
|
|
16
|
+
"required": true,
|
|
17
|
+
"description": "Whether another page is available."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "onLoadMore",
|
|
21
|
+
"type": "() => void",
|
|
22
|
+
"required": true,
|
|
23
|
+
"description": "Request the next page."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "loading",
|
|
27
|
+
"type": "boolean",
|
|
28
|
+
"required": false,
|
|
29
|
+
"defaultValue": "false",
|
|
30
|
+
"description": "Loading state."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "loadLabel",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"required": false,
|
|
36
|
+
"defaultValue": "Load more",
|
|
37
|
+
"description": "Button label."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "loadingLabel",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"required": false,
|
|
43
|
+
"defaultValue": "Loading...",
|
|
44
|
+
"description": "Loading label."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "endLabel",
|
|
48
|
+
"type": "string",
|
|
49
|
+
"required": false,
|
|
50
|
+
"defaultValue": "You're all caught up.",
|
|
51
|
+
"description": "End-of-list message."
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"examples": [
|
|
55
|
+
{
|
|
56
|
+
"title": "Deal grid pagination",
|
|
57
|
+
"code": "<LoadMore hasMore={hasMore} loading={loading} onLoadMore={loadNextPage} />",
|
|
58
|
+
"description": "A load-more control below a card grid."
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"antiPatterns": [
|
|
62
|
+
{
|
|
63
|
+
"title": "Don't keep the button when the list is complete",
|
|
64
|
+
"explanation": "Replace the button with the end message so there is no dead action.",
|
|
65
|
+
"example": "<LoadMore hasMore={false} onLoadMore={load} />"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"accessibility": [
|
|
69
|
+
{
|
|
70
|
+
"feature": "Live state",
|
|
71
|
+
"implementation": "The wrapper uses aria-live polite; loading disables the button and sets aria-busy",
|
|
72
|
+
"userRequirements": "Keep loading and end labels short"
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"compositionRules": [
|
|
76
|
+
{
|
|
77
|
+
"component": "Grid",
|
|
78
|
+
"relationship": "Place LoadMore below the card grid",
|
|
79
|
+
"example": "<Grid>...</Grid><LoadMore ... />"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"relatedComponents": [
|
|
83
|
+
"Pagination",
|
|
84
|
+
"DataTable",
|
|
85
|
+
"DealCard",
|
|
86
|
+
"EntityCard"
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "logo-cloud",
|
|
9
9
|
"exportName": "LogoCloud",
|
|
10
10
|
"description": "Trust strip for member, customer or partner logos with captions, columns and optional links.",
|
|
@@ -8,8 +8,14 @@
|
|
|
8
8
|
{
|
|
9
9
|
"name": "label",
|
|
10
10
|
"type": "string",
|
|
11
|
-
"required":
|
|
12
|
-
"description": "Metric name."
|
|
11
|
+
"required": false,
|
|
12
|
+
"description": "Metric name. Alias: title."
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "title",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": false,
|
|
18
|
+
"description": "Alias for label (migration-friendly)."
|
|
13
19
|
},
|
|
14
20
|
{
|
|
15
21
|
"name": "value",
|
|
@@ -39,13 +45,39 @@
|
|
|
39
45
|
"name": "hint",
|
|
40
46
|
"type": "React.ReactNode",
|
|
41
47
|
"required": false,
|
|
42
|
-
"description": "Comparison context (vs last month)."
|
|
48
|
+
"description": "Comparison context (vs last month). Alias: description."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "description",
|
|
52
|
+
"type": "React.ReactNode",
|
|
53
|
+
"required": false,
|
|
54
|
+
"description": "Alias for hint (migration-friendly)."
|
|
43
55
|
},
|
|
44
56
|
{
|
|
45
57
|
"name": "icon",
|
|
46
58
|
"type": "ReactNode",
|
|
47
59
|
"required": false,
|
|
48
60
|
"description": "Decorative icon."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "tone",
|
|
64
|
+
"type": "'default' | 'success' | 'warning' | 'destructive'",
|
|
65
|
+
"required": false,
|
|
66
|
+
"defaultValue": "default",
|
|
67
|
+
"description": "Semantic color for the value (not the delta).",
|
|
68
|
+
"enum": [
|
|
69
|
+
"default",
|
|
70
|
+
"success",
|
|
71
|
+
"warning",
|
|
72
|
+
"destructive"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "loading",
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"required": false,
|
|
79
|
+
"defaultValue": "false",
|
|
80
|
+
"description": "Renders a skeleton instead of the value and sets aria-busy."
|
|
49
81
|
}
|
|
50
82
|
],
|
|
51
83
|
"examples": [
|
|
@@ -99,7 +131,7 @@
|
|
|
99
131
|
],
|
|
100
132
|
"package": "@slipstream-ui/core",
|
|
101
133
|
"importPath": "@slipstream-ui/core",
|
|
102
|
-
"version": "0.
|
|
134
|
+
"version": "0.8.0",
|
|
103
135
|
"sourceDir": "metric-card",
|
|
104
136
|
"exportName": "MetricCard"
|
|
105
137
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "multi-select",
|
|
9
9
|
"exportName": "MultiSelect",
|
|
10
10
|
"description": "Searchable multi-select filter with visible removable chips and a checkbox panel.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "newsletter",
|
|
9
9
|
"exportName": "Newsletter",
|
|
10
10
|
"description": "Email capture block with inline or stacked layout, pending state, success and failure feedback.",
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"required": false,
|
|
18
18
|
"description": "Supporting summary under the title."
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
"name": "subtitle",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"required": false,
|
|
24
|
+
"description": "Alias for description (migration-friendly)."
|
|
25
|
+
},
|
|
20
26
|
{
|
|
21
27
|
"name": "breadcrumbs",
|
|
22
28
|
"type": "ReactNode",
|
|
@@ -141,7 +147,7 @@
|
|
|
141
147
|
],
|
|
142
148
|
"package": "@slipstream-ui/core",
|
|
143
149
|
"importPath": "@slipstream-ui/core",
|
|
144
|
-
"version": "0.
|
|
150
|
+
"version": "0.8.0",
|
|
145
151
|
"sourceDir": "page-header",
|
|
146
152
|
"exportName": "PageHeader"
|
|
147
153
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "process-steps",
|
|
9
9
|
"exportName": "ProcessSteps",
|
|
10
10
|
"description": "Ordered process cards with derived step numbers or custom icons.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "prose",
|
|
9
9
|
"exportName": "Prose",
|
|
10
10
|
"description": "Self-contained long-form typography for rendered markdown/MDX: headings, links, lists, code, tables, quotes and figures.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "range-slider",
|
|
9
9
|
"exportName": "RangeSlider",
|
|
10
10
|
"description": "Dual-thumb numeric range slider with labeled native inputs and formatted values.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "section-heading",
|
|
9
9
|
"exportName": "SectionHeading",
|
|
10
10
|
"description": "Section heading block: eyebrow, title (level 2-4), description and actions, with left/center alignment and three sizes.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "section",
|
|
9
9
|
"exportName": "Section",
|
|
10
10
|
"description": "Full-width page section with a surface tone, vertical rhythm and an optional centered container.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "segmented-control",
|
|
9
9
|
"exportName": "SegmentedControl",
|
|
10
10
|
"description": "Single- or multi-select segmented control for view and filter switches.",
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "select-menu",
|
|
9
9
|
"exportName": "SelectMenu",
|
|
10
10
|
"description": "Custom listbox select for rich options: descriptions, icons, groups, multi-select, custom rows and hidden inputs for forms.",
|
|
11
|
-
"designIntent": "Native <select> cannot render rich option content. SelectMenu supplies a real listbox with the
|
|
11
|
+
"designIntent": "Native <select> cannot render rich option content. SelectMenu supplies a real listbox behind a select-only combobox trigger with the combobox/listbox keyboard model while keeping the same value/onValueChange contract as Select, so teams can move between the two without rewriting state.",
|
|
12
12
|
"props": [
|
|
13
13
|
{
|
|
14
14
|
"name": "items",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "site-footer",
|
|
9
9
|
"exportName": "SiteFooter",
|
|
10
10
|
"description": "Marketing footer: brand + tagline column, link columns and a legal bar; router-agnostic via linkComponent.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "site-header",
|
|
9
9
|
"exportName": "SiteHeader",
|
|
10
10
|
"description": "Marketing/site header: sticky bar with brand, horizontal navigation with prefix-aware active states, right-aligned actions and a mobile drawer.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "stat-band",
|
|
9
9
|
"exportName": "StatBand",
|
|
10
10
|
"description": "Semantic description list of headline stats with labels, optional hints and column presets.",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"id": "stepper",
|
|
3
3
|
"name": "Stepper",
|
|
4
4
|
"tier": "molecule",
|
|
5
|
-
"description": "Multi-step flow indicator: ordered list, aria-current step, text state for complete/current/upcoming.",
|
|
6
|
-
"designIntent": "Wizards need orientation: where am I, what is done, what is next. A stepper built on an ordered list keeps the sequence structural and announces state in text, not just color.",
|
|
5
|
+
"description": "Multi-step flow indicator: ordered list, aria-current step, text state for complete/current/upcoming, horizontal or vertical, numbered or dots.",
|
|
6
|
+
"designIntent": "Wizards need orientation: where am I, what is done, what is next. A stepper built on an ordered list keeps the sequence structural and announces state in text, not just color. Four responsive shapes (inline labels, labels below, vertical timeline, compact dots) cover onboarding, checkout, and narrow sidebars.",
|
|
7
7
|
"props": [
|
|
8
8
|
{
|
|
9
9
|
"name": "steps",
|
|
@@ -28,6 +28,50 @@
|
|
|
28
28
|
"vertical"
|
|
29
29
|
]
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"name": "variant",
|
|
33
|
+
"type": "'numbered' | 'dots'",
|
|
34
|
+
"required": false,
|
|
35
|
+
"defaultValue": "numbered",
|
|
36
|
+
"description": "Marker style. numbered shows the step number and a check when complete; dots is the compact progress variant with no numbers.",
|
|
37
|
+
"enum": [
|
|
38
|
+
"numbered",
|
|
39
|
+
"dots"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "size",
|
|
44
|
+
"type": "'sm' | 'md'",
|
|
45
|
+
"required": false,
|
|
46
|
+
"defaultValue": "md",
|
|
47
|
+
"description": "Marker and label scale.",
|
|
48
|
+
"enum": [
|
|
49
|
+
"sm",
|
|
50
|
+
"md"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "labelPlacement",
|
|
55
|
+
"type": "'inline' | 'below'",
|
|
56
|
+
"required": false,
|
|
57
|
+
"defaultValue": "inline",
|
|
58
|
+
"description": "Horizontal only: place the label beside the marker or beneath it.",
|
|
59
|
+
"enum": [
|
|
60
|
+
"inline",
|
|
61
|
+
"below"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "alignTitles",
|
|
66
|
+
"type": "'start' | 'center'",
|
|
67
|
+
"required": false,
|
|
68
|
+
"defaultValue": "center",
|
|
69
|
+
"description": "Center a title vertically against its marker when that step has no description. Titles with a description stay top aligned.",
|
|
70
|
+
"enum": [
|
|
71
|
+
"start",
|
|
72
|
+
"center"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
31
75
|
{
|
|
32
76
|
"name": "onStepClick",
|
|
33
77
|
"type": "(index: number) => void",
|
|
@@ -37,9 +81,24 @@
|
|
|
37
81
|
],
|
|
38
82
|
"examples": [
|
|
39
83
|
{
|
|
40
|
-
"title": "
|
|
41
|
-
"code": "<Stepper\n current={step}\n steps={[{ label: 'Account' }, { label: 'Studio details' }, { label: 'Invite team' }, { label: 'Review' }]}\n/>",
|
|
84
|
+
"title": "Horizontal onboarding wizard",
|
|
85
|
+
"code": "<Stepper\n current={step}\n steps={[{ label: 'Account' }, { label: 'Studio details' }, { label: 'Invite team' }, { label: 'Review' }]}\n onStepClick={setStep}\n/>",
|
|
42
86
|
"description": "Current step is announced; completed steps show a check."
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"title": "Labels below the markers",
|
|
90
|
+
"code": "<Stepper\n current={2}\n labelPlacement=\"below\"\n steps={[{ label: 'Account' }, { label: 'Studio' }, { label: 'Review' }]}\n/>",
|
|
91
|
+
"description": "A wider, marketing-friendly horizontal shape."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"title": "Vertical timeline",
|
|
95
|
+
"code": "<Stepper\n current={1}\n orientation=\"vertical\"\n steps={[\n { label: 'Submitted', description: 'Mar 2' },\n { label: 'Under review', description: 'Mar 4' },\n { label: 'Decision', description: 'Mar 9' },\n ]}\n/>",
|
|
96
|
+
"description": "A vertical connector joins the markers, suited to sidebars and activity feeds."
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"title": "Compact dots",
|
|
100
|
+
"code": "<Stepper current={1} variant=\"dots\" size=\"sm\" steps={[{ label: 'Plan' }, { label: 'Build' }, { label: 'Ship' }]} />",
|
|
101
|
+
"description": "No numbers, small markers, for tight toolbars or mobile."
|
|
43
102
|
}
|
|
44
103
|
],
|
|
45
104
|
"antiPatterns": [
|
|
@@ -80,6 +139,11 @@
|
|
|
80
139
|
"component": "Form",
|
|
81
140
|
"relationship": "One Form (or Form step) per Stepper stage",
|
|
82
141
|
"example": "<Stepper current={1} steps={steps} />"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"component": "Drawer",
|
|
145
|
+
"relationship": "A vertical dots Stepper fits a narrow drawer or settings sidebar",
|
|
146
|
+
"example": "<Drawer><Stepper current={1} orientation=\"vertical\" variant=\"dots\" steps={steps} /></Drawer>"
|
|
83
147
|
}
|
|
84
148
|
],
|
|
85
149
|
"relatedComponents": [
|
|
@@ -89,7 +153,7 @@
|
|
|
89
153
|
],
|
|
90
154
|
"package": "@slipstream-ui/core",
|
|
91
155
|
"importPath": "@slipstream-ui/core",
|
|
92
|
-
"version": "0.
|
|
156
|
+
"version": "0.8.0",
|
|
93
157
|
"sourceDir": "stepper",
|
|
94
158
|
"exportName": "Stepper"
|
|
95
159
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "table-card",
|
|
9
9
|
"exportName": "TableCard",
|
|
10
10
|
"description": "Table shell with title/description, header actions, optional toolbar, edge-to-edge body and a footer row.",
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.8.0",
|
|
8
8
|
"sourceDir": "table-of-contents",
|
|
9
9
|
"exportName": "TableOfContents",
|
|
10
|
-
"description": "Sticky 'On this page' navigation with nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
|
|
11
|
-
"designIntent": "Long-form pages drift into bespoke TOC implementations. TableOfContents fixes the nested list, active styling and landmark name; useScrollSpy supplies the active id from real scroll position.",
|
|
10
|
+
"description": "Sticky 'On this page' navigation with real anchor links, nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
|
|
11
|
+
"designIntent": "Long-form pages drift into bespoke TOC implementations. TableOfContents fixes the nested list, native anchor navigation, active styling and landmark name; useScrollSpy supplies the active id from real scroll position.",
|
|
12
12
|
"props": [
|
|
13
13
|
{
|
|
14
14
|
"name": "headings",
|
|
@@ -47,13 +47,24 @@
|
|
|
47
47
|
"type": "string",
|
|
48
48
|
"required": false,
|
|
49
49
|
"description": "Extra classes for the visible label."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"name": "onNavigate",
|
|
53
|
+
"type": "(id: string) => void",
|
|
54
|
+
"required": false,
|
|
55
|
+
"description": "Called with the heading id when a link is activated. The browser still performs the native anchor jump; use it to sync a controlled activeId, analytics, or close a mobile TOC."
|
|
50
56
|
}
|
|
51
57
|
],
|
|
52
58
|
"examples": [
|
|
53
59
|
{
|
|
54
60
|
"title": "Article TOC",
|
|
55
|
-
"code": "const
|
|
56
|
-
"description": "Scroll-spy driven active state."
|
|
61
|
+
"code": "const ids = headings.map((h) => h.id);\nconst activeId = useScrollSpy(ids);\n\n<TableOfContents headings={headings} activeId={activeId} />",
|
|
62
|
+
"description": "Scroll-spy driven active state; links are native anchors."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"title": "Controlled TOC with navigation callback",
|
|
66
|
+
"code": "<TableOfContents\n headings={headings}\n activeId={activeId}\n onNavigate={(id) => {\n setActiveId(id);\n setMobileOpen(false);\n }}\n/>",
|
|
67
|
+
"description": "Update local state when a heading is chosen; the anchor still scrolls and updates the hash."
|
|
57
68
|
}
|
|
58
69
|
],
|
|
59
70
|
"antiPatterns": [
|
|
@@ -61,6 +72,11 @@
|
|
|
61
72
|
"title": "Don't hardcode the active id",
|
|
62
73
|
"explanation": "Compute it from scroll position so the highlight follows the reader.",
|
|
63
74
|
"example": "// Avoid\n<TableOfContents headings={h} activeId=\"intro\" />"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"title": "Don't replace the anchors with buttons",
|
|
78
|
+
"explanation": "Buttons only run a highlight callback and break deep links, middle-click, and open-in-new-tab. The component renders real anchors; keep them.",
|
|
79
|
+
"example": "// Avoid\n<button onClick={() => setActiveId(h.id)}>{h.text}</button>\n\n// Prefer\n<TableOfContents headings={h} activeId={activeId} onNavigate={setActiveId} />"
|
|
64
80
|
}
|
|
65
81
|
],
|
|
66
82
|
"accessibility": [
|
|
@@ -68,6 +84,11 @@
|
|
|
68
84
|
"feature": "Landmark + current item",
|
|
69
85
|
"implementation": "nav aria-label plus aria-current=location on the active link",
|
|
70
86
|
"userRequirements": "Keep heading levels sequential"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"feature": "Native anchor navigation",
|
|
90
|
+
"implementation": "Each item is an a[href='#id'], so Enter, middle-click and deep links work",
|
|
91
|
+
"userRequirements": "Render an element with the matching id, and add scroll-mt-* when a sticky header overlaps the target"
|
|
71
92
|
}
|
|
72
93
|
],
|
|
73
94
|
"contentGuidelines": [
|