snice 4.9.0 → 4.10.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/adapters/react/app-tiles.d.ts +28 -0
- package/adapters/react/app-tiles.d.ts.map +1 -0
- package/adapters/react/app-tiles.js +24 -0
- package/adapters/react/app-tiles.js.map +1 -0
- package/adapters/react/app-tiles.tsx +36 -0
- package/adapters/react/book.d.ts +28 -0
- package/adapters/react/book.d.ts.map +1 -0
- package/adapters/react/book.js +24 -0
- package/adapters/react/book.js.map +1 -0
- package/adapters/react/book.tsx +36 -0
- package/adapters/react/comments.d.ts +29 -0
- package/adapters/react/comments.d.ts.map +1 -0
- package/adapters/react/comments.js +24 -0
- package/adapters/react/comments.js.map +1 -0
- package/adapters/react/comments.tsx +37 -0
- package/adapters/react/components.d.ts +52 -0
- package/adapters/react/components.d.ts.map +1 -1
- package/adapters/react/components.js +26 -0
- package/adapters/react/components.js.map +1 -1
- package/adapters/react/components.ts +52 -0
- package/adapters/react/countdown.d.ts +31 -0
- package/adapters/react/countdown.d.ts.map +1 -0
- package/adapters/react/countdown.js +24 -0
- package/adapters/react/countdown.js.map +1 -0
- package/adapters/react/countdown.tsx +39 -0
- package/adapters/react/cropper.d.ts +29 -0
- package/adapters/react/cropper.d.ts.map +1 -0
- package/adapters/react/cropper.js +24 -0
- package/adapters/react/cropper.js.map +1 -0
- package/adapters/react/cropper.tsx +37 -0
- package/adapters/react/diff.d.ts +31 -0
- package/adapters/react/diff.d.ts.map +1 -0
- package/adapters/react/diff.js +24 -0
- package/adapters/react/diff.js.map +1 -0
- package/adapters/react/diff.tsx +39 -0
- package/adapters/react/flip-card.d.ts +28 -0
- package/adapters/react/flip-card.d.ts.map +1 -0
- package/adapters/react/flip-card.js +24 -0
- package/adapters/react/flip-card.js.map +1 -0
- package/adapters/react/flip-card.tsx +36 -0
- package/adapters/react/flow.d.ts +32 -0
- package/adapters/react/flow.d.ts.map +1 -0
- package/adapters/react/flow.js +24 -0
- package/adapters/react/flow.js.map +1 -0
- package/adapters/react/flow.tsx +40 -0
- package/adapters/react/gantt.d.ts +27 -0
- package/adapters/react/gantt.d.ts.map +1 -0
- package/adapters/react/gantt.js +24 -0
- package/adapters/react/gantt.js.map +1 -0
- package/adapters/react/gantt.tsx +35 -0
- package/adapters/react/map.d.ts +30 -0
- package/adapters/react/map.d.ts.map +1 -0
- package/adapters/react/map.js +24 -0
- package/adapters/react/map.js.map +1 -0
- package/adapters/react/map.tsx +38 -0
- package/adapters/react/markdown.d.ts +26 -0
- package/adapters/react/markdown.d.ts.map +1 -0
- package/adapters/react/markdown.js +24 -0
- package/adapters/react/markdown.js.map +1 -0
- package/adapters/react/markdown.tsx +34 -0
- package/adapters/react/notification-center.d.ts +26 -0
- package/adapters/react/notification-center.d.ts.map +1 -0
- package/adapters/react/notification-center.js +24 -0
- package/adapters/react/notification-center.js.map +1 -0
- package/adapters/react/notification-center.tsx +34 -0
- package/adapters/react/org-chart.d.ts +28 -0
- package/adapters/react/org-chart.d.ts.map +1 -0
- package/adapters/react/org-chart.js +24 -0
- package/adapters/react/org-chart.js.map +1 -0
- package/adapters/react/org-chart.tsx +36 -0
- package/adapters/react/pdf-viewer.d.ts +28 -0
- package/adapters/react/pdf-viewer.d.ts.map +1 -0
- package/adapters/react/pdf-viewer.js +24 -0
- package/adapters/react/pdf-viewer.js.map +1 -0
- package/adapters/react/pdf-viewer.tsx +36 -0
- package/adapters/react/podcast-player.d.ts +40 -0
- package/adapters/react/podcast-player.d.ts.map +1 -0
- package/adapters/react/podcast-player.js +24 -0
- package/adapters/react/podcast-player.js.map +1 -0
- package/adapters/react/podcast-player.tsx +48 -0
- package/adapters/react/pricing-table.d.ts +27 -0
- package/adapters/react/pricing-table.d.ts.map +1 -0
- package/adapters/react/pricing-table.js +24 -0
- package/adapters/react/pricing-table.js.map +1 -0
- package/adapters/react/pricing-table.tsx +35 -0
- package/adapters/react/rating.d.ts +30 -0
- package/adapters/react/rating.d.ts.map +1 -0
- package/adapters/react/rating.js +24 -0
- package/adapters/react/rating.js.map +1 -0
- package/adapters/react/rating.tsx +38 -0
- package/adapters/react/recipe.d.ts +43 -0
- package/adapters/react/recipe.d.ts.map +1 -0
- package/adapters/react/recipe.js +24 -0
- package/adapters/react/recipe.js.map +1 -0
- package/adapters/react/recipe.tsx +51 -0
- package/adapters/react/sortable.d.ts +28 -0
- package/adapters/react/sortable.d.ts.map +1 -0
- package/adapters/react/sortable.js +24 -0
- package/adapters/react/sortable.js.map +1 -0
- package/adapters/react/sortable.tsx +36 -0
- package/adapters/react/spotlight.d.ts +27 -0
- package/adapters/react/spotlight.d.ts.map +1 -0
- package/adapters/react/spotlight.js +24 -0
- package/adapters/react/spotlight.js.map +1 -0
- package/adapters/react/spotlight.tsx +35 -0
- package/adapters/react/spreadsheet.d.ts +27 -0
- package/adapters/react/spreadsheet.d.ts.map +1 -0
- package/adapters/react/spreadsheet.js +24 -0
- package/adapters/react/spreadsheet.js.map +1 -0
- package/adapters/react/spreadsheet.tsx +35 -0
- package/adapters/react/tag-input.d.ts +33 -0
- package/adapters/react/tag-input.d.ts.map +1 -0
- package/adapters/react/tag-input.js +24 -0
- package/adapters/react/tag-input.js.map +1 -0
- package/adapters/react/tag-input.tsx +41 -0
- package/adapters/react/testimonial.d.ts +31 -0
- package/adapters/react/testimonial.d.ts.map +1 -0
- package/adapters/react/testimonial.js +24 -0
- package/adapters/react/testimonial.js.map +1 -0
- package/adapters/react/testimonial.tsx +39 -0
- package/adapters/react/video-player.d.ts +34 -0
- package/adapters/react/video-player.d.ts.map +1 -0
- package/adapters/react/video-player.js +24 -0
- package/adapters/react/video-player.js.map +1 -0
- package/adapters/react/video-player.tsx +42 -0
- package/adapters/react/waterfall.d.ts +29 -0
- package/adapters/react/waterfall.d.ts.map +1 -0
- package/adapters/react/waterfall.js +24 -0
- package/adapters/react/waterfall.js.map +1 -0
- package/adapters/react/waterfall.tsx +37 -0
- package/adapters/react/weather.d.ts +27 -0
- package/adapters/react/weather.d.ts.map +1 -0
- package/adapters/react/weather.js +24 -0
- package/adapters/react/weather.js.map +1 -0
- package/adapters/react/weather.tsx +35 -0
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/accordion/snice-accordion.min.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/alert/snice-alert.min.js +1 -1
- package/dist/cdn/app-tiles/README.md +27 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js +333 -0
- package/dist/cdn/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js +11 -0
- package/dist/cdn/app-tiles/snice-app-tiles.min.js.map +1 -0
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.min.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar/snice-avatar.min.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/badge/snice-badge.min.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/banner/snice-banner.min.js +1 -1
- package/dist/cdn/book/README.md +27 -0
- package/dist/cdn/book/snice-book.js +353 -0
- package/dist/cdn/book/snice-book.js.map +1 -0
- package/dist/cdn/book/snice-book.min.js +13 -0
- package/dist/cdn/book/snice-book.min.js.map +1 -0
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.min.js +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/button/snice-button.min.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/calendar/snice-calendar.min.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera/snice-camera.min.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.min.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.min.js +1 -1
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/card/snice-card.min.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chart/snice-chart.min.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/chat/snice-chat.min.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.min.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/chip/snice-chip.min.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +1 -1
- package/dist/cdn/code-block/snice-code-block.min.js +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-display/snice-color-display.min.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.min.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.min.js +1 -1
- package/dist/cdn/comments/README.md +27 -0
- package/dist/cdn/comments/snice-comments.js +544 -0
- package/dist/cdn/comments/snice-comments.js.map +1 -0
- package/dist/cdn/comments/snice-comments.min.js +100 -0
- package/dist/cdn/comments/snice-comments.min.js.map +1 -0
- package/dist/cdn/countdown/README.md +27 -0
- package/dist/cdn/countdown/snice-countdown.js +235 -0
- package/dist/cdn/countdown/snice-countdown.js.map +1 -0
- package/dist/cdn/countdown/snice-countdown.min.js +14 -0
- package/dist/cdn/countdown/snice-countdown.min.js.map +1 -0
- package/dist/cdn/cropper/README.md +27 -0
- package/dist/cdn/cropper/snice-cropper.js +352 -0
- package/dist/cdn/cropper/snice-cropper.js.map +1 -0
- package/dist/cdn/cropper/snice-cropper.min.js +25 -0
- package/dist/cdn/cropper/snice-cropper.min.js.map +1 -0
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.min.js +1 -1
- package/dist/cdn/diff/README.md +27 -0
- package/dist/cdn/diff/snice-diff.js +441 -0
- package/dist/cdn/diff/snice-diff.js.map +1 -0
- package/dist/cdn/diff/snice-diff.min.js +54 -0
- package/dist/cdn/diff/snice-diff.min.js.map +1 -0
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/divider/snice-divider.min.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/doc/snice-doc.min.js +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/draw/snice-draw.min.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/drawer/snice-drawer.min.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.min.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.min.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.min.js +1 -1
- package/dist/cdn/flip-card/README.md +27 -0
- package/dist/cdn/flip-card/snice-flip-card.js +183 -0
- package/dist/cdn/flip-card/snice-flip-card.js.map +1 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js +22 -0
- package/dist/cdn/flip-card/snice-flip-card.min.js.map +1 -0
- package/dist/cdn/flow/README.md +27 -0
- package/dist/cdn/flow/snice-flow.js +822 -0
- package/dist/cdn/flow/snice-flow.js.map +1 -0
- package/dist/cdn/flow/snice-flow.min.js +17 -0
- package/dist/cdn/flow/snice-flow.min.js.map +1 -0
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/funnel/snice-funnel.min.js +1 -1
- package/dist/cdn/gantt/README.md +27 -0
- package/dist/cdn/gantt/snice-gantt.js +436 -0
- package/dist/cdn/gantt/snice-gantt.js.map +1 -0
- package/dist/cdn/gantt/snice-gantt.min.js +60 -0
- package/dist/cdn/gantt/snice-gantt.min.js.map +1 -0
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/gauge/snice-gauge.min.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.min.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/image/snice-image.min.js +1 -1
- package/dist/cdn/input/snice-input.js +1 -1
- package/dist/cdn/input/snice-input.min.js +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/kanban/snice-kanban.min.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/kpi/snice-kpi.min.js +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/layout/snice-layout.min.js +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link/snice-link.min.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.min.js +1 -1
- package/dist/cdn/list/snice-list.js +1 -1
- package/dist/cdn/list/snice-list.min.js +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/location/snice-location.min.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/login/snice-login.min.js +1 -1
- package/dist/cdn/map/README.md +27 -0
- package/dist/cdn/map/snice-map.js +415 -0
- package/dist/cdn/map/snice-map.js.map +1 -0
- package/dist/cdn/map/snice-map.min.js +52 -0
- package/dist/cdn/map/snice-map.min.js.map +1 -0
- package/dist/cdn/markdown/README.md +27 -0
- package/dist/cdn/markdown/snice-markdown.js +317 -0
- package/dist/cdn/markdown/snice-markdown.js.map +1 -0
- package/dist/cdn/markdown/snice-markdown.min.js +11 -0
- package/dist/cdn/markdown/snice-markdown.min.js.map +1 -0
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/masonry/snice-masonry.min.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/menu/snice-menu.min.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/modal/snice-modal.min.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/music-player/snice-music-player.min.js +1 -1
- package/dist/cdn/nav/snice-nav.js +1 -1
- package/dist/cdn/nav/snice-nav.min.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.min.js +1 -1
- package/dist/cdn/notification-center/README.md +27 -0
- package/dist/cdn/notification-center/snice-notification-center.js +204 -0
- package/dist/cdn/notification-center/snice-notification-center.js.map +1 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js +33 -0
- package/dist/cdn/notification-center/snice-notification-center.min.js.map +1 -0
- package/dist/cdn/org-chart/README.md +27 -0
- package/dist/cdn/org-chart/snice-org-chart.js +294 -0
- package/dist/cdn/org-chart/snice-org-chart.js.map +1 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js +32 -0
- package/dist/cdn/org-chart/snice-org-chart.min.js.map +1 -0
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/pagination/snice-pagination.min.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/paint/snice-paint.min.js +1 -1
- package/dist/cdn/pdf-viewer/README.md +27 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +594 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js +88 -0
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.min.js.map +1 -0
- package/dist/cdn/podcast-player/README.md +27 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js +835 -0
- package/dist/cdn/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js +209 -0
- package/dist/cdn/podcast-player/snice-podcast-player.min.js.map +1 -0
- package/dist/cdn/pricing-table/README.md +27 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js +491 -0
- package/dist/cdn/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js +141 -0
- package/dist/cdn/pricing-table/snice-pricing-table.min.js.map +1 -0
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress/snice-progress.min.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.min.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.min.js +1 -1
- package/dist/cdn/radio/snice-radio.js +1 -1
- package/dist/cdn/radio/snice-radio.min.js +1 -1
- package/dist/cdn/rating/README.md +27 -0
- package/dist/cdn/rating/snice-rating.js +210 -0
- package/dist/cdn/rating/snice-rating.js.map +1 -0
- package/dist/cdn/rating/snice-rating.min.js +25 -0
- package/dist/cdn/rating/snice-rating.min.js.map +1 -0
- package/dist/cdn/recipe/README.md +27 -0
- package/dist/cdn/recipe/snice-recipe.js +619 -0
- package/dist/cdn/recipe/snice-recipe.js.map +1 -0
- package/dist/cdn/recipe/snice-recipe.min.js +185 -0
- package/dist/cdn/recipe/snice-recipe.min.js.map +1 -0
- package/dist/cdn/runtime/snice-runtime.esm.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +3 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +3 -3
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.js +1 -1
- package/dist/cdn/sankey/snice-sankey.min.js +1 -1
- package/dist/cdn/select/snice-select.js +1 -1
- package/dist/cdn/select/snice-select.min.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.min.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/slider/snice-slider.min.js +1 -1
- package/dist/cdn/sortable/README.md +27 -0
- package/dist/cdn/sortable/snice-sortable.js +254 -0
- package/dist/cdn/sortable/snice-sortable.js.map +1 -0
- package/dist/cdn/sortable/snice-sortable.min.js +12 -0
- package/dist/cdn/sortable/snice-sortable.min.js.map +1 -0
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.min.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/spinner/snice-spinner.min.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.min.js +1 -1
- package/dist/cdn/spotlight/README.md +27 -0
- package/dist/cdn/spotlight/snice-spotlight.js +397 -0
- package/dist/cdn/spotlight/snice-spotlight.js.map +1 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js +8 -0
- package/dist/cdn/spotlight/snice-spotlight.min.js.map +1 -0
- package/dist/cdn/spreadsheet/README.md +27 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js +1171 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js +30 -0
- package/dist/cdn/spreadsheet/snice-spreadsheet.min.js.map +1 -0
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/stepper/snice-stepper.min.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/switch/snice-switch.min.js +1 -1
- package/dist/cdn/table/snice-table.js +1 -1
- package/dist/cdn/table/snice-table.min.js +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tabs/snice-tabs.min.js +1 -1
- package/dist/cdn/tag-input/README.md +27 -0
- package/dist/cdn/tag-input/snice-tag-input.js +387 -0
- package/dist/cdn/tag-input/snice-tag-input.js.map +1 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js +65 -0
- package/dist/cdn/tag-input/snice-tag-input.min.js.map +1 -0
- package/dist/cdn/terminal/snice-terminal.js +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -1
- package/dist/cdn/testimonial/README.md +27 -0
- package/dist/cdn/testimonial/snice-testimonial.js +187 -0
- package/dist/cdn/testimonial/snice-testimonial.js.map +1 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js +21 -0
- package/dist/cdn/testimonial/snice-testimonial.min.js.map +1 -0
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/textarea/snice-textarea.min.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.min.js +1 -1
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timeline/snice-timeline.min.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/timer/snice-timer.min.js +1 -1
- package/dist/cdn/toast/snice-toast.js +1 -1
- package/dist/cdn/toast/snice-toast.min.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.min.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/tree/snice-tree.min.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/treemap/snice-treemap.min.js +1 -1
- package/dist/cdn/video-player/README.md +27 -0
- package/dist/cdn/video-player/snice-video-player.js +721 -0
- package/dist/cdn/video-player/snice-video-player.js.map +1 -0
- package/dist/cdn/video-player/snice-video-player.min.js +153 -0
- package/dist/cdn/video-player/snice-video-player.min.js.map +1 -0
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.min.js +1 -1
- package/dist/cdn/waterfall/README.md +27 -0
- package/dist/cdn/waterfall/snice-waterfall.js +292 -0
- package/dist/cdn/waterfall/snice-waterfall.js.map +1 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js +12 -0
- package/dist/cdn/waterfall/snice-waterfall.min.js.map +1 -0
- package/dist/cdn/weather/README.md +27 -0
- package/dist/cdn/weather/snice-weather.js +194 -0
- package/dist/cdn/weather/snice-weather.js.map +1 -0
- package/dist/cdn/weather/snice-weather.min.js +42 -0
- package/dist/cdn/weather/snice-weather.min.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.d.ts +36 -0
- package/dist/components/app-tiles/snice-app-tiles.js +265 -0
- package/dist/components/app-tiles/snice-app-tiles.js.map +1 -0
- package/dist/components/app-tiles/snice-app-tiles.types.d.ts +22 -0
- package/dist/components/book/snice-book.d.ts +46 -0
- package/dist/components/book/snice-book.js +285 -0
- package/dist/components/book/snice-book.js.map +1 -0
- package/dist/components/book/snice-book.types.d.ts +21 -0
- package/dist/components/comments/snice-comments.d.ts +62 -0
- package/dist/components/comments/snice-comments.js +476 -0
- package/dist/components/comments/snice-comments.js.map +1 -0
- package/dist/components/comments/snice-comments.types.d.ts +64 -0
- package/dist/components/countdown/snice-countdown.d.ts +21 -0
- package/dist/components/countdown/snice-countdown.js +168 -0
- package/dist/components/countdown/snice-countdown.js.map +1 -0
- package/dist/components/countdown/snice-countdown.types.d.ts +18 -0
- package/dist/components/cropper/snice-cropper.d.ts +32 -0
- package/dist/components/cropper/snice-cropper.js +285 -0
- package/dist/components/cropper/snice-cropper.js.map +1 -0
- package/dist/components/cropper/snice-cropper.types.d.ts +26 -0
- package/dist/components/diff/snice-diff.d.ts +32 -0
- package/dist/components/diff/snice-diff.js +374 -0
- package/dist/components/diff/snice-diff.js.map +1 -0
- package/dist/components/diff/snice-diff.types.d.ts +26 -0
- package/dist/components/flip-card/snice-flip-card.d.ts +15 -0
- package/dist/components/flip-card/snice-flip-card.js +116 -0
- package/dist/components/flip-card/snice-flip-card.js.map +1 -0
- package/dist/components/flip-card/snice-flip-card.types.d.ts +16 -0
- package/dist/components/flow/snice-flow.d.ts +91 -0
- package/dist/components/flow/snice-flow.js +755 -0
- package/dist/components/flow/snice-flow.js.map +1 -0
- package/dist/components/flow/snice-flow.types.d.ts +64 -0
- package/dist/components/gantt/snice-gantt.d.ts +34 -0
- package/dist/components/gantt/snice-gantt.js +369 -0
- package/dist/components/gantt/snice-gantt.js.map +1 -0
- package/dist/components/gantt/snice-gantt.types.d.ts +37 -0
- package/dist/components/map/snice-map.d.ts +44 -0
- package/dist/components/map/snice-map.js +348 -0
- package/dist/components/map/snice-map.js.map +1 -0
- package/dist/components/map/snice-map.types.d.ts +41 -0
- package/dist/components/markdown/snice-markdown.d.ts +24 -0
- package/dist/components/markdown/snice-markdown.js +250 -0
- package/dist/components/markdown/snice-markdown.js.map +1 -0
- package/dist/components/markdown/snice-markdown.types.d.ts +16 -0
- package/dist/components/notification-center/snice-notification-center.d.ts +18 -0
- package/dist/components/notification-center/snice-notification-center.js +137 -0
- package/dist/components/notification-center/snice-notification-center.js.map +1 -0
- package/dist/components/notification-center/snice-notification-center.types.d.ts +24 -0
- package/dist/components/org-chart/snice-org-chart.d.ts +28 -0
- package/dist/components/org-chart/snice-org-chart.js +227 -0
- package/dist/components/org-chart/snice-org-chart.js.map +1 -0
- package/dist/components/org-chart/snice-org-chart.types.d.ts +28 -0
- package/dist/components/pdf-viewer/pdf.min.mjs +21 -0
- package/dist/components/pdf-viewer/pdf.worker.min.mjs +21 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.d.ts +59 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js +527 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js.map +1 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.types.d.ts +25 -0
- package/dist/components/podcast-player/snice-podcast-player.d.ts +72 -0
- package/dist/components/podcast-player/snice-podcast-player.js +768 -0
- package/dist/components/podcast-player/snice-podcast-player.js.map +1 -0
- package/dist/components/podcast-player/snice-podcast-player.types.d.ts +79 -0
- package/dist/components/pricing-table/snice-pricing-table.d.ts +51 -0
- package/dist/components/pricing-table/snice-pricing-table.js +422 -0
- package/dist/components/pricing-table/snice-pricing-table.js.map +1 -0
- package/dist/components/pricing-table/snice-pricing-table.types.d.ts +49 -0
- package/dist/components/rating/snice-rating.d.ts +15 -0
- package/dist/components/rating/snice-rating.js +143 -0
- package/dist/components/rating/snice-rating.js.map +1 -0
- package/dist/components/rating/snice-rating.types.d.ts +15 -0
- package/dist/components/recipe/snice-recipe.d.ts +53 -0
- package/dist/components/recipe/snice-recipe.js +552 -0
- package/dist/components/recipe/snice-recipe.js.map +1 -0
- package/dist/components/recipe/snice-recipe.types.d.ts +56 -0
- package/dist/components/sortable/snice-sortable.d.ts +24 -0
- package/dist/components/sortable/snice-sortable.js +187 -0
- package/dist/components/sortable/snice-sortable.js.map +1 -0
- package/dist/components/sortable/snice-sortable.types.d.ts +20 -0
- package/dist/components/spotlight/snice-spotlight.d.ts +42 -0
- package/dist/components/spotlight/snice-spotlight.js +330 -0
- package/dist/components/spotlight/snice-spotlight.js.map +1 -0
- package/dist/components/spotlight/snice-spotlight.types.d.ts +26 -0
- package/dist/components/spreadsheet/snice-spreadsheet.d.ts +102 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js +1104 -0
- package/dist/components/spreadsheet/snice-spreadsheet.js.map +1 -0
- package/dist/components/spreadsheet/snice-spreadsheet.types.d.ts +54 -0
- package/dist/components/tag-input/snice-tag-input.d.ts +40 -0
- package/dist/components/tag-input/snice-tag-input.js +320 -0
- package/dist/components/tag-input/snice-tag-input.js.map +1 -0
- package/dist/components/tag-input/snice-tag-input.types.d.ts +29 -0
- package/dist/components/testimonial/snice-testimonial.d.ts +15 -0
- package/dist/components/testimonial/snice-testimonial.js +120 -0
- package/dist/components/testimonial/snice-testimonial.js.map +1 -0
- package/dist/components/testimonial/snice-testimonial.types.d.ts +10 -0
- package/dist/components/video-player/snice-video-player.d.ts +78 -0
- package/dist/components/video-player/snice-video-player.js +654 -0
- package/dist/components/video-player/snice-video-player.js.map +1 -0
- package/dist/components/video-player/snice-video-player.types.d.ts +47 -0
- package/dist/components/waterfall/snice-waterfall.d.ts +30 -0
- package/dist/components/waterfall/snice-waterfall.js +225 -0
- package/dist/components/waterfall/snice-waterfall.js.map +1 -0
- package/dist/components/waterfall/snice-waterfall.types.d.ts +23 -0
- package/dist/components/weather/snice-weather.d.ts +10 -0
- package/dist/components/weather/snice-weather.js +127 -0
- package/dist/components/weather/snice-weather.js.map +1 -0
- package/dist/components/weather/snice-weather.types.d.ts +22 -0
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/DEVELOPMENT.md +1 -1
- package/docs/ai/api.md +6 -3
- package/docs/ai/components/accordion.md +0 -34
- package/docs/ai/components/app-tiles.md +77 -0
- package/docs/ai/components/audio-recorder.md +2 -0
- package/docs/ai/components/badge.md +7 -0
- package/docs/ai/components/book.md +78 -0
- package/docs/ai/components/button.md +5 -0
- package/docs/ai/components/chart.md +0 -24
- package/docs/ai/components/chat.md +7 -95
- package/docs/ai/components/code-block.md +3 -82
- package/docs/ai/components/color-display.md +3 -3
- package/docs/ai/components/color-picker.md +4 -4
- package/docs/ai/components/comments.md +75 -0
- package/docs/ai/components/countdown.md +54 -0
- package/docs/ai/components/cropper.md +57 -0
- package/docs/ai/components/date-picker.md +15 -9
- package/docs/ai/components/diff.md +66 -0
- package/docs/ai/components/divider.md +1 -1
- package/docs/ai/components/draw.md +5 -5
- package/docs/ai/components/drawer.md +5 -5
- package/docs/ai/components/empty-state.md +2 -2
- package/docs/ai/components/file-gallery.md +16 -87
- package/docs/ai/components/file-upload.md +6 -6
- package/docs/ai/components/flip-card.md +52 -0
- package/docs/ai/components/flow.md +104 -0
- package/docs/ai/components/funnel.md +3 -3
- package/docs/ai/components/gantt.md +63 -0
- package/docs/ai/components/gauge.md +1 -1
- package/docs/ai/components/heatmap.md +5 -5
- package/docs/ai/components/input.md +20 -18
- package/docs/ai/components/kanban.md +2 -2
- package/docs/ai/components/kpi.md +4 -53
- package/docs/ai/components/layout.md +10 -235
- package/docs/ai/components/link-preview.md +20 -29
- package/docs/ai/components/link.md +27 -47
- package/docs/ai/components/list.md +51 -31
- package/docs/ai/components/location.md +15 -27
- package/docs/ai/components/login.md +43 -94
- package/docs/ai/components/map.md +72 -0
- package/docs/ai/components/markdown.md +63 -0
- package/docs/ai/components/masonry.md +10 -6
- package/docs/ai/components/menu.md +40 -72
- package/docs/ai/components/modal.md +25 -42
- package/docs/ai/components/music-player.md +37 -89
- package/docs/ai/components/nav.md +25 -39
- package/docs/ai/components/network-graph.md +39 -43
- package/docs/ai/components/notification-center.md +79 -0
- package/docs/ai/components/org-chart.md +62 -0
- package/docs/ai/components/pagination.md +16 -18
- package/docs/ai/components/pdf-viewer.md +57 -0
- package/docs/ai/components/podcast-player.md +94 -0
- package/docs/ai/components/pricing-table.md +87 -0
- package/docs/ai/components/progress.md +23 -39
- package/docs/ai/components/qr-code.md +37 -84
- package/docs/ai/components/qr-reader.md +51 -61
- package/docs/ai/components/radio.md +27 -39
- package/docs/ai/components/rating.md +56 -0
- package/docs/ai/components/recipe.md +90 -0
- package/docs/ai/components/skeleton.md +0 -8
- package/docs/ai/components/slider.md +10 -50
- package/docs/ai/components/sortable.md +57 -0
- package/docs/ai/components/sparkline.md +26 -152
- package/docs/ai/components/spinner.md +0 -21
- package/docs/ai/components/split-pane.md +16 -38
- package/docs/ai/components/spotlight.md +61 -0
- package/docs/ai/components/spreadsheet.md +138 -0
- package/docs/ai/components/stepper.md +37 -183
- package/docs/ai/components/switch.md +28 -35
- package/docs/ai/components/table.md +43 -172
- package/docs/ai/components/tabs.md +31 -52
- package/docs/ai/components/tag-input.md +70 -0
- package/docs/ai/components/terminal.md +34 -116
- package/docs/ai/components/testimonial.md +56 -0
- package/docs/ai/components/textarea.md +11 -43
- package/docs/ai/components/theme.md +120 -0
- package/docs/ai/components/time-range-picker.md +17 -49
- package/docs/ai/components/timeline.md +7 -46
- package/docs/ai/components/timer.md +41 -37
- package/docs/ai/components/toast.md +19 -90
- package/docs/ai/components/tooltip.md +17 -104
- package/docs/ai/components/tree.md +38 -162
- package/docs/ai/components/treemap.md +23 -44
- package/docs/ai/components/video-player.md +91 -0
- package/docs/ai/components/virtual-scroller.md +23 -46
- package/docs/ai/components/waterfall.md +56 -0
- package/docs/ai/components/weather.md +78 -0
- package/docs/ai/decorators.md +25 -3
- package/docs/ai/patterns.md +17 -1
- package/docs/components/accordion.md +8 -6
- package/docs/components/alert.md +2 -0
- package/docs/components/app-tiles.md +162 -0
- package/docs/components/audio-recorder.md +6 -0
- package/docs/components/avatar.md +225 -0
- package/docs/components/badge.md +2 -0
- package/docs/components/banner.md +2 -0
- package/docs/components/book.md +184 -0
- package/docs/components/breadcrumbs.md +2 -0
- package/docs/components/button.md +15 -0
- package/docs/components/calendar.md +2 -0
- package/docs/components/camera-annotate.md +2 -0
- package/docs/components/camera.md +2 -0
- package/docs/components/candlestick.md +2 -0
- package/docs/components/card.md +2 -0
- package/docs/components/carousel.md +205 -36
- package/docs/components/chart.md +2 -0
- package/docs/components/chat.md +2 -0
- package/docs/components/checkbox.md +2 -0
- package/docs/components/chip.md +2 -0
- package/docs/components/code-block.md +2 -0
- package/docs/components/color-display.md +2 -0
- package/docs/components/color-picker.md +6 -4
- package/docs/components/command-palette.md +2 -0
- package/docs/components/comments.md +235 -0
- package/docs/components/countdown.md +121 -0
- package/docs/components/cropper.md +152 -0
- package/docs/components/date-picker.md +201 -0
- package/docs/components/diff.md +177 -0
- package/docs/components/divider.md +132 -0
- package/docs/components/doc.md +2 -0
- package/docs/components/draw.md +2 -0
- package/docs/components/drawer.md +2 -0
- package/docs/components/empty-state.md +2 -0
- package/docs/components/file-gallery.md +2 -0
- package/docs/components/file-upload.md +2 -0
- package/docs/components/flip-card.md +169 -0
- package/docs/components/flow.md +208 -0
- package/docs/components/funnel.md +2 -0
- package/docs/components/gantt.md +187 -0
- package/docs/components/gauge.md +2 -0
- package/docs/components/heatmap.md +2 -0
- package/docs/components/image.md +2 -0
- package/docs/components/input.md +242 -0
- package/docs/components/kanban.md +2 -0
- package/docs/components/kpi.md +2 -0
- package/docs/components/layout.md +84 -0
- package/docs/components/link-preview.md +66 -92
- package/docs/components/link.md +73 -157
- package/docs/components/list.md +140 -44
- package/docs/components/location.md +96 -283
- package/docs/components/login.md +131 -498
- package/docs/components/map.md +203 -0
- package/docs/components/markdown.md +220 -0
- package/docs/components/masonry.md +57 -102
- package/docs/components/menu.md +87 -494
- package/docs/components/modal.md +83 -436
- package/docs/components/music-player.md +116 -221
- package/docs/components/nav.md +107 -170
- package/docs/components/network-graph.md +83 -111
- package/docs/components/notification-center.md +256 -0
- package/docs/components/org-chart.md +275 -0
- package/docs/components/pagination.md +75 -218
- package/docs/components/paint.md +108 -73
- package/docs/components/pdf-viewer.md +204 -0
- package/docs/components/podcast-player.md +277 -0
- package/docs/components/pricing-table.md +249 -0
- package/docs/components/progress.md +169 -0
- package/docs/components/qr-code.md +95 -378
- package/docs/components/qr-reader.md +83 -258
- package/docs/components/radio.md +151 -0
- package/docs/components/rating.md +154 -0
- package/docs/components/recipe.md +323 -0
- package/docs/components/sankey.md +84 -107
- package/docs/components/select.md +114 -485
- package/docs/components/skeleton.md +96 -0
- package/docs/components/slider.md +92 -235
- package/docs/components/sortable.md +267 -0
- package/docs/components/sparkline.md +76 -222
- package/docs/components/spinner.md +37 -18
- package/docs/components/split-pane.md +62 -226
- package/docs/components/spotlight.md +240 -0
- package/docs/components/spreadsheet.md +405 -0
- package/docs/components/stepper.md +72 -306
- package/docs/components/switch.md +69 -293
- package/docs/components/table.md +250 -0
- package/docs/components/tabs.md +92 -471
- package/docs/components/tag-input.md +257 -0
- package/docs/components/terminal.md +87 -391
- package/docs/components/testimonial.md +185 -0
- package/docs/components/textarea.md +96 -181
- package/docs/components/theme.md +216 -0
- package/docs/components/time-range-picker.md +99 -151
- package/docs/components/timeline.md +67 -115
- package/docs/components/timer.md +44 -86
- package/docs/components/toast.md +93 -432
- package/docs/components/tooltip.md +75 -419
- package/docs/components/tree.md +110 -436
- package/docs/components/treemap.md +86 -129
- package/docs/components/video-player.md +336 -0
- package/docs/components/virtual-scroller.md +86 -226
- package/docs/components/waterfall.md +217 -0
- package/docs/components/weather.md +239 -0
- package/package.json +1 -1
- package/docs/ai/components/popover.md +0 -70
- package/docs/components/popover.md +0 -333
|
@@ -1,26 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
[//]: # (AI: For a low-token version of this doc, use docs/ai/components/spinner.md instead)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Spinner
|
|
4
|
+
`<snice-spinner>`
|
|
5
|
+
|
|
6
|
+
An animated loading indicator.
|
|
4
7
|
|
|
5
8
|
## Basic Usage
|
|
6
9
|
|
|
10
|
+
```typescript
|
|
11
|
+
import 'snice/components/spinner/snice-spinner';
|
|
12
|
+
```
|
|
13
|
+
|
|
7
14
|
```html
|
|
8
15
|
<snice-spinner></snice-spinner>
|
|
9
16
|
```
|
|
10
17
|
|
|
11
|
-
##
|
|
18
|
+
## Importing
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
**ESM (bundler)**
|
|
21
|
+
```typescript
|
|
22
|
+
import 'snice/components/spinner/snice-spinner';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**CDN**
|
|
26
|
+
```html
|
|
27
|
+
<script src="snice-runtime.min.js"></script>
|
|
28
|
+
<script src="snice-spinner.min.js"></script>
|
|
29
|
+
```
|
|
19
30
|
|
|
20
31
|
## Examples
|
|
21
32
|
|
|
22
33
|
### Sizes
|
|
23
34
|
|
|
35
|
+
Use the `size` attribute to change the spinner's size.
|
|
36
|
+
|
|
24
37
|
```html
|
|
25
38
|
<snice-spinner size="small"></snice-spinner>
|
|
26
39
|
<snice-spinner size="medium"></snice-spinner>
|
|
@@ -30,6 +43,8 @@ The `<snice-spinner>` component provides an animated loading indicator.
|
|
|
30
43
|
|
|
31
44
|
### Colors
|
|
32
45
|
|
|
46
|
+
Use the `color` attribute to change the spinner's color.
|
|
47
|
+
|
|
33
48
|
```html
|
|
34
49
|
<snice-spinner color="primary"></snice-spinner>
|
|
35
50
|
<snice-spinner color="success"></snice-spinner>
|
|
@@ -40,20 +55,15 @@ The `<snice-spinner>` component provides an animated loading indicator.
|
|
|
40
55
|
|
|
41
56
|
### With Label
|
|
42
57
|
|
|
58
|
+
Set the `label` attribute for an accessible description.
|
|
59
|
+
|
|
43
60
|
```html
|
|
44
61
|
<snice-spinner label="Loading data..."></snice-spinner>
|
|
45
62
|
```
|
|
46
63
|
|
|
47
|
-
###
|
|
64
|
+
### Inline
|
|
48
65
|
|
|
49
|
-
|
|
50
|
-
<div style="text-align: center; padding: 2rem;">
|
|
51
|
-
<snice-spinner size="large" color="primary"></snice-spinner>
|
|
52
|
-
<p>Loading content...</p>
|
|
53
|
-
</div>
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Inline Spinner
|
|
66
|
+
Use a small spinner inline with text.
|
|
57
67
|
|
|
58
68
|
```html
|
|
59
69
|
<button disabled>
|
|
@@ -61,3 +71,12 @@ The `<snice-spinner>` component provides an animated loading indicator.
|
|
|
61
71
|
Processing...
|
|
62
72
|
</button>
|
|
63
73
|
```
|
|
74
|
+
|
|
75
|
+
## Properties
|
|
76
|
+
|
|
77
|
+
| Property | Type | Default | Description |
|
|
78
|
+
|----------|------|---------|-------------|
|
|
79
|
+
| `size` | `'small' \| 'medium' \| 'large' \| 'xl'` | `'medium'` | Spinner size |
|
|
80
|
+
| `color` | `'primary' \| 'success' \| 'warning' \| 'error' \| 'info'` | `'primary'` | Color variant |
|
|
81
|
+
| `label` | `string` | `''` | Accessible label |
|
|
82
|
+
| `thickness` | `number` | `4` | Stroke thickness |
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
[//]: # (AI: For a low-token version of this doc, use docs/ai/components/split-pane.md instead)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Split Pane
|
|
4
|
+
`<snice-split-pane>`
|
|
5
|
+
|
|
6
|
+
A resizable split pane layout with horizontal or vertical orientation.
|
|
4
7
|
|
|
5
8
|
## Basic Usage
|
|
6
9
|
|
|
10
|
+
```typescript
|
|
11
|
+
import 'snice/components/split-pane/snice-split-pane';
|
|
12
|
+
```
|
|
13
|
+
|
|
7
14
|
```html
|
|
8
15
|
<snice-split-pane style="height: 400px;">
|
|
9
16
|
<div slot="primary">Left pane content</div>
|
|
@@ -11,74 +18,25 @@ Resizable split pane layout with horizontal or vertical orientation.
|
|
|
11
18
|
</snice-split-pane>
|
|
12
19
|
```
|
|
13
20
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
| Property | Type | Default | Description |
|
|
17
|
-
|----------|------|---------|-------------|
|
|
18
|
-
| `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Split direction |
|
|
19
|
-
| `primarySize` | `number` | `50` | Primary pane size (%) |
|
|
20
|
-
| `minPrimarySize` | `number` | `10` | Min primary size (%) |
|
|
21
|
-
| `minSecondarySize` | `number` | `10` | Min secondary size (%) |
|
|
22
|
-
| `snapSize` | `number` | `0` | Snap interval (%, 0 = none) |
|
|
23
|
-
| `disabled` | `boolean` | `false` | Disable resizing |
|
|
24
|
-
|
|
25
|
-
## Methods
|
|
26
|
-
|
|
27
|
-
### `getPrimarySize(): number`
|
|
28
|
-
Get current primary pane size percentage.
|
|
29
|
-
|
|
30
|
-
```javascript
|
|
31
|
-
const size = splitPane.getPrimarySize(); // 50
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### `getSecondarySize(): number`
|
|
35
|
-
Get current secondary pane size percentage.
|
|
21
|
+
## Importing
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
**ESM (bundler)**
|
|
24
|
+
```typescript
|
|
25
|
+
import 'snice/components/split-pane/snice-split-pane';
|
|
39
26
|
```
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
splitPane.setPrimarySize(30); // Set to 30%
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
### `reset(): void`
|
|
49
|
-
Reset to 50/50 split.
|
|
50
|
-
|
|
51
|
-
```javascript
|
|
52
|
-
splitPane.reset();
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Events
|
|
56
|
-
|
|
57
|
-
### `pane-resize`
|
|
58
|
-
Dispatched when pane is resized.
|
|
59
|
-
|
|
60
|
-
```javascript
|
|
61
|
-
splitPane.addEventListener('pane-resize', (e) => {
|
|
62
|
-
console.log('Primary:', e.detail.primarySize);
|
|
63
|
-
console.log('Secondary:', e.detail.secondarySize);
|
|
64
|
-
});
|
|
28
|
+
**CDN**
|
|
29
|
+
```html
|
|
30
|
+
<script src="snice-runtime.min.js"></script>
|
|
31
|
+
<script src="snice-split-pane.min.js"></script>
|
|
65
32
|
```
|
|
66
33
|
|
|
67
|
-
**Detail:** `{ primarySize: number, secondarySize: number, splitPane: SniceResizeElement }`
|
|
68
|
-
|
|
69
34
|
## Examples
|
|
70
35
|
|
|
71
|
-
### Horizontal Split
|
|
72
|
-
|
|
73
|
-
```html
|
|
74
|
-
<snice-split-pane style="height: 400px;">
|
|
75
|
-
<div slot="primary">Left pane</div>
|
|
76
|
-
<div slot="secondary">Right pane</div>
|
|
77
|
-
</snice-split-pane>
|
|
78
|
-
```
|
|
79
|
-
|
|
80
36
|
### Vertical Split
|
|
81
37
|
|
|
38
|
+
Use the `direction` attribute to split vertically (top/bottom).
|
|
39
|
+
|
|
82
40
|
```html
|
|
83
41
|
<snice-split-pane direction="vertical" style="height: 400px;">
|
|
84
42
|
<div slot="primary">Top pane</div>
|
|
@@ -88,6 +46,8 @@ splitPane.addEventListener('pane-resize', (e) => {
|
|
|
88
46
|
|
|
89
47
|
### Custom Initial Size
|
|
90
48
|
|
|
49
|
+
Use the `primary-size` attribute to set the initial split ratio.
|
|
50
|
+
|
|
91
51
|
```html
|
|
92
52
|
<snice-split-pane primary-size="30" style="height: 400px;">
|
|
93
53
|
<div slot="primary">30% width</div>
|
|
@@ -95,30 +55,32 @@ splitPane.addEventListener('pane-resize', (e) => {
|
|
|
95
55
|
</snice-split-pane>
|
|
96
56
|
```
|
|
97
57
|
|
|
98
|
-
###
|
|
58
|
+
### Minimum Sizes
|
|
59
|
+
|
|
60
|
+
Use `min-primary-size` and `min-secondary-size` to constrain pane sizing.
|
|
99
61
|
|
|
100
62
|
```html
|
|
101
|
-
<snice-split-pane
|
|
102
|
-
min-primary-size="20"
|
|
103
|
-
min-secondary-size="30"
|
|
104
|
-
style="height: 400px;">
|
|
63
|
+
<snice-split-pane min-primary-size="20" min-secondary-size="30" style="height: 400px;">
|
|
105
64
|
<div slot="primary">Min 20%</div>
|
|
106
65
|
<div slot="secondary">Min 30%</div>
|
|
107
66
|
</snice-split-pane>
|
|
108
67
|
```
|
|
109
68
|
|
|
110
|
-
###
|
|
69
|
+
### Snap
|
|
70
|
+
|
|
71
|
+
Use the `snap-size` attribute to snap the divider to fixed increments.
|
|
111
72
|
|
|
112
73
|
```html
|
|
113
|
-
<!-- Snaps to 10% increments -->
|
|
114
74
|
<snice-split-pane snap-size="10" style="height: 400px;">
|
|
115
|
-
<div slot="primary">Snaps to 10
|
|
75
|
+
<div slot="primary">Snaps to 10% increments</div>
|
|
116
76
|
<div slot="secondary">Right pane</div>
|
|
117
77
|
</snice-split-pane>
|
|
118
78
|
```
|
|
119
79
|
|
|
120
80
|
### Disabled
|
|
121
81
|
|
|
82
|
+
Set the `disabled` attribute to prevent resizing.
|
|
83
|
+
|
|
122
84
|
```html
|
|
123
85
|
<snice-split-pane disabled primary-size="40" style="height: 400px;">
|
|
124
86
|
<div slot="primary">Fixed 40%</div>
|
|
@@ -126,35 +88,6 @@ splitPane.addEventListener('pane-resize', (e) => {
|
|
|
126
88
|
</snice-split-pane>
|
|
127
89
|
```
|
|
128
90
|
|
|
129
|
-
### Programmatic Control
|
|
130
|
-
|
|
131
|
-
```html
|
|
132
|
-
<button id="set-30">30%</button>
|
|
133
|
-
<button id="set-70">70%</button>
|
|
134
|
-
<button id="reset">Reset</button>
|
|
135
|
-
|
|
136
|
-
<snice-split-pane id="my-split" style="height: 400px;">
|
|
137
|
-
<div slot="primary">Primary</div>
|
|
138
|
-
<div slot="secondary">Secondary</div>
|
|
139
|
-
</snice-split-pane>
|
|
140
|
-
|
|
141
|
-
<script>
|
|
142
|
-
const split = document.getElementById('my-split');
|
|
143
|
-
|
|
144
|
-
document.getElementById('set-30').addEventListener('click', () => {
|
|
145
|
-
split.setPrimarySize(30);
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
document.getElementById('set-70').addEventListener('click', () => {
|
|
149
|
-
split.setPrimarySize(70);
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
document.getElementById('reset').addEventListener('click', () => {
|
|
153
|
-
split.reset();
|
|
154
|
-
});
|
|
155
|
-
</script>
|
|
156
|
-
```
|
|
157
|
-
|
|
158
91
|
### Nested Split Panes
|
|
159
92
|
|
|
160
93
|
```html
|
|
@@ -169,147 +102,50 @@ splitPane.addEventListener('pane-resize', (e) => {
|
|
|
169
102
|
</snice-split-pane>
|
|
170
103
|
```
|
|
171
104
|
|
|
172
|
-
###
|
|
173
|
-
|
|
174
|
-
```html
|
|
175
|
-
<snice-split-pane primary-size="25" style="height: 600px;">
|
|
176
|
-
<!-- Sidebar -->
|
|
177
|
-
<div slot="primary" style="padding: 10px; background: #f5f5f5;">
|
|
178
|
-
<h3>Files</h3>
|
|
179
|
-
<ul>
|
|
180
|
-
<li>index.html</li>
|
|
181
|
-
<li>styles.css</li>
|
|
182
|
-
<li>script.js</li>
|
|
183
|
-
</ul>
|
|
184
|
-
</div>
|
|
185
|
-
|
|
186
|
-
<!-- Main content -->
|
|
187
|
-
<div slot="secondary" style="padding: 20px;">
|
|
188
|
-
<h2>Content Area</h2>
|
|
189
|
-
<p>Main content goes here...</p>
|
|
190
|
-
</div>
|
|
191
|
-
</snice-split-pane>
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
### Code Editor Layout
|
|
195
|
-
|
|
196
|
-
```html
|
|
197
|
-
<snice-split-pane primary-size="20" style="height: 600px;">
|
|
198
|
-
<!-- File tree -->
|
|
199
|
-
<div slot="primary" style="background: #1e1e1e; color: #d4d4d4; padding: 10px;">
|
|
200
|
-
<div>📁 src</div>
|
|
201
|
-
<div style="margin-left: 15px;">📄 main.ts</div>
|
|
202
|
-
</div>
|
|
203
|
-
|
|
204
|
-
<!-- Editor + Console -->
|
|
205
|
-
<div slot="secondary" style="height: 100%;">
|
|
206
|
-
<snice-split-pane direction="vertical" primary-size="70">
|
|
207
|
-
<!-- Editor -->
|
|
208
|
-
<div slot="primary" style="background: #1e1e1e; color: #d4d4d4; padding: 10px; font-family: monospace;">
|
|
209
|
-
<code>console.log('Hello');</code>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<!-- Console -->
|
|
213
|
-
<div slot="secondary" style="background: #252526; color: #d4d4d4; padding: 10px; font-family: monospace;">
|
|
214
|
-
$ npm start
|
|
215
|
-
</div>
|
|
216
|
-
</snice-split-pane>
|
|
217
|
-
</div>
|
|
218
|
-
</snice-split-pane>
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Dashboard Layout
|
|
222
|
-
|
|
223
|
-
```html
|
|
224
|
-
<snice-split-pane direction="vertical" primary-size="60" style="height: 600px;">
|
|
225
|
-
<!-- Charts -->
|
|
226
|
-
<div slot="primary">
|
|
227
|
-
<snice-split-pane>
|
|
228
|
-
<div slot="primary">Chart 1</div>
|
|
229
|
-
<div slot="secondary">Chart 2</div>
|
|
230
|
-
</snice-split-pane>
|
|
231
|
-
</div>
|
|
232
|
-
|
|
233
|
-
<!-- Table -->
|
|
234
|
-
<div slot="secondary" style="padding: 20px;">
|
|
235
|
-
<table style="width: 100%;">
|
|
236
|
-
<tr><th>Name</th><th>Value</th></tr>
|
|
237
|
-
<tr><td>Item 1</td><td>100</td></tr>
|
|
238
|
-
</table>
|
|
239
|
-
</div>
|
|
240
|
-
</snice-split-pane>
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
### Email Client Layout
|
|
244
|
-
|
|
245
|
-
```html
|
|
246
|
-
<snice-split-pane primary-size="30" style="height: 600px;">
|
|
247
|
-
<!-- Email list -->
|
|
248
|
-
<div slot="primary" style="background: #f5f5f5; padding: 10px; overflow: auto;">
|
|
249
|
-
<div style="padding: 10px; background: white; margin-bottom: 5px; border-radius: 4px;">
|
|
250
|
-
<strong>Meeting Today</strong>
|
|
251
|
-
<div style="font-size: 12px; color: #666;">John Doe</div>
|
|
252
|
-
</div>
|
|
253
|
-
<div style="padding: 10px; background: white; margin-bottom: 5px; border-radius: 4px;">
|
|
254
|
-
<strong>Project Update</strong>
|
|
255
|
-
<div style="font-size: 12px; color: #666;">Jane Smith</div>
|
|
256
|
-
</div>
|
|
257
|
-
</div>
|
|
258
|
-
|
|
259
|
-
<!-- Email content -->
|
|
260
|
-
<div slot="secondary" style="padding: 20px; overflow: auto;">
|
|
261
|
-
<h2>Meeting Today</h2>
|
|
262
|
-
<div style="color: #666; margin-bottom: 10px;">From: John Doe</div>
|
|
263
|
-
<p>Let's meet at 2pm to discuss the project...</p>
|
|
264
|
-
</div>
|
|
265
|
-
</snice-split-pane>
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
### Responsive Sizes
|
|
105
|
+
### Programmatic Control
|
|
269
106
|
|
|
270
107
|
```html
|
|
271
|
-
<snice-split-pane id="
|
|
108
|
+
<snice-split-pane id="my-split" style="height: 400px;">
|
|
272
109
|
<div slot="primary">Primary</div>
|
|
273
110
|
<div slot="secondary">Secondary</div>
|
|
274
111
|
</snice-split-pane>
|
|
275
112
|
|
|
276
113
|
<script>
|
|
277
|
-
const split = document.getElementById('
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (window.innerWidth < 768) {
|
|
281
|
-
split.setPrimarySize(100); // Stack on mobile
|
|
282
|
-
} else {
|
|
283
|
-
split.setPrimarySize(50); // Side by side on desktop
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
window.addEventListener('resize', updateSize);
|
|
288
|
-
updateSize();
|
|
114
|
+
const split = document.getElementById('my-split');
|
|
115
|
+
split.setPrimarySize(30); // Set to 30%
|
|
116
|
+
split.reset(); // Reset to 50/50
|
|
289
117
|
</script>
|
|
290
118
|
```
|
|
291
119
|
|
|
292
|
-
##
|
|
120
|
+
## Slots
|
|
293
121
|
|
|
294
|
-
|
|
122
|
+
| Name | Description |
|
|
123
|
+
|------|-------------|
|
|
124
|
+
| `primary` | Primary pane content (left or top) |
|
|
125
|
+
| `secondary` | Secondary pane content (right or bottom) |
|
|
295
126
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
127
|
+
## Properties
|
|
128
|
+
|
|
129
|
+
| Property | Type | Default | Description |
|
|
130
|
+
|----------|------|---------|-------------|
|
|
131
|
+
| `direction` | `'horizontal' \| 'vertical'` | `'horizontal'` | Split direction |
|
|
132
|
+
| `primarySize` (attr: `primary-size`) | `number` | `50` | Primary pane size (%) |
|
|
133
|
+
| `minPrimarySize` (attr: `min-primary-size`) | `number` | `10` | Min primary size (%) |
|
|
134
|
+
| `minSecondarySize` (attr: `min-secondary-size`) | `number` | `10` | Min secondary size (%) |
|
|
135
|
+
| `snapSize` (attr: `snap-size`) | `number` | `0` | Snap interval (%, 0 = none) |
|
|
136
|
+
| `disabled` | `boolean` | `false` | Disable resizing |
|
|
303
137
|
|
|
304
|
-
##
|
|
138
|
+
## Events
|
|
305
139
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
-
|
|
309
|
-
- Visual feedback on hover and drag
|
|
140
|
+
| Event | Detail | Description |
|
|
141
|
+
|-------|--------|-------------|
|
|
142
|
+
| `pane-resize` | `{ primarySize: number, secondarySize: number, splitPane: SniceResizeElement }` | Fired when pane is resized |
|
|
310
143
|
|
|
311
|
-
##
|
|
144
|
+
## Methods
|
|
312
145
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
146
|
+
| Method | Arguments | Description |
|
|
147
|
+
|--------|-----------|-------------|
|
|
148
|
+
| `getPrimarySize()` | -- | Get primary pane size (%), returns `number` |
|
|
149
|
+
| `getSecondarySize()` | -- | Get secondary pane size (%), returns `number` |
|
|
150
|
+
| `setPrimarySize()` | `size: number` | Set primary pane size (respects min sizes) |
|
|
151
|
+
| `reset()` | -- | Reset to 50/50 split |
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
[//]: # (AI: For a low-token version of this doc, use docs/ai/components/spotlight.md instead)
|
|
2
|
+
|
|
3
|
+
# Spotlight Component
|
|
4
|
+
|
|
5
|
+
The spotlight component provides a guided tour and onboarding experience by highlighting elements on the page with a cutout overlay and step-by-step popover instructions. It supports step navigation, customizable positioning, and smooth transitions between steps.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
- [Basic Usage](#basic-usage)
|
|
9
|
+
- [Properties](#properties)
|
|
10
|
+
- [Methods](#methods)
|
|
11
|
+
- [Events](#events)
|
|
12
|
+
- [CSS Custom Properties](#css-custom-properties)
|
|
13
|
+
- [Examples](#examples)
|
|
14
|
+
- [Accessibility](#accessibility)
|
|
15
|
+
|
|
16
|
+
## Basic Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<snice-spotlight></snice-spotlight>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import 'snice/components/spotlight/snice-spotlight';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Property | Type | Default | Description |
|
|
29
|
+
|----------|------|---------|-------------|
|
|
30
|
+
| `steps` | `SpotlightStep[]` | `[]` | Array of step definitions for the tour |
|
|
31
|
+
|
|
32
|
+
### SpotlightStep
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
interface SpotlightStep {
|
|
36
|
+
target: string; // CSS selector for the element to highlight
|
|
37
|
+
title: string; // Step title displayed in the popover
|
|
38
|
+
description: string; // Step description text
|
|
39
|
+
position?: 'top' | 'bottom' | 'left' | 'right' | 'auto'; // Popover position relative to target
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Methods
|
|
44
|
+
|
|
45
|
+
#### `start(): void`
|
|
46
|
+
Begin the spotlight tour from step 0.
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
spotlight.start();
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
#### `next(): void`
|
|
53
|
+
Advance to the next step. Ends the tour if on the last step.
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
spotlight.next();
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### `prev(): void`
|
|
60
|
+
Go back to the previous step.
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
spotlight.prev();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### `goToStep(index: number): void`
|
|
67
|
+
Jump to a specific step by index.
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
spotlight.goToStep(2);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### `end(): void`
|
|
74
|
+
End the tour immediately.
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
spotlight.end();
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Events
|
|
81
|
+
|
|
82
|
+
### `spotlight-start`
|
|
83
|
+
Fired when the tour begins.
|
|
84
|
+
|
|
85
|
+
**Event Detail:** `void`
|
|
86
|
+
|
|
87
|
+
### `spotlight-step`
|
|
88
|
+
Fired when navigating to a new step.
|
|
89
|
+
|
|
90
|
+
**Event Detail:**
|
|
91
|
+
```typescript
|
|
92
|
+
{
|
|
93
|
+
index: number;
|
|
94
|
+
step: SpotlightStep;
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### `spotlight-end`
|
|
99
|
+
Fired when the tour ends (either completed or ended programmatically).
|
|
100
|
+
|
|
101
|
+
**Event Detail:** `void`
|
|
102
|
+
|
|
103
|
+
### `spotlight-skip`
|
|
104
|
+
Fired when the user skips the tour.
|
|
105
|
+
|
|
106
|
+
**Event Detail:**
|
|
107
|
+
```typescript
|
|
108
|
+
{
|
|
109
|
+
index: number; // The step index where the tour was skipped
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## CSS Custom Properties
|
|
114
|
+
|
|
115
|
+
| Property | Description | Default |
|
|
116
|
+
|----------|-------------|---------|
|
|
117
|
+
| `--snice-transition-medium` | Cutout transition speed | `250ms` |
|
|
118
|
+
| `--snice-color-background` | Popover background color | `rgb(255 255 255)` |
|
|
119
|
+
| `--snice-color-border` | Popover border color | `rgb(226 226 226)` |
|
|
120
|
+
| `--snice-color-text` | Popover text color | `rgb(23 23 23)` |
|
|
121
|
+
| `--snice-color-primary` | Primary button color | `rgb(37 99 235)` |
|
|
122
|
+
| `--snice-shadow-lg` | Popover box shadow | _(theme default)_ |
|
|
123
|
+
| `--snice-border-radius-lg` | Popover border radius | `0.5rem` |
|
|
124
|
+
|
|
125
|
+
## Examples
|
|
126
|
+
|
|
127
|
+
### Basic Tour
|
|
128
|
+
|
|
129
|
+
Set up a simple guided tour with three steps targeting elements on the page.
|
|
130
|
+
|
|
131
|
+
```html
|
|
132
|
+
<div id="search-bar">Search...</div>
|
|
133
|
+
<div id="nav-menu">Navigation</div>
|
|
134
|
+
<div id="profile-icon">Profile</div>
|
|
135
|
+
|
|
136
|
+
<snice-spotlight id="tour"></snice-spotlight>
|
|
137
|
+
|
|
138
|
+
<script type="module">
|
|
139
|
+
import 'snice/components/spotlight/snice-spotlight';
|
|
140
|
+
|
|
141
|
+
const spotlight = document.getElementById('tour');
|
|
142
|
+
spotlight.steps = [
|
|
143
|
+
{ target: '#search-bar', title: 'Search', description: 'Use the search bar to find content.', position: 'bottom' },
|
|
144
|
+
{ target: '#nav-menu', title: 'Navigation', description: 'Browse sections from the navigation menu.', position: 'right' },
|
|
145
|
+
{ target: '#profile-icon', title: 'Profile', description: 'View and edit your profile settings here.', position: 'left' }
|
|
146
|
+
];
|
|
147
|
+
spotlight.start();
|
|
148
|
+
</script>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Listening for Tour Events
|
|
152
|
+
|
|
153
|
+
React to tour lifecycle events to track progress or trigger side effects.
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<snice-spotlight id="onboarding"></snice-spotlight>
|
|
157
|
+
|
|
158
|
+
<script type="module">
|
|
159
|
+
import type { SniceSpotlightElement } from 'snice/components/spotlight/snice-spotlight.types';
|
|
160
|
+
|
|
161
|
+
const spotlight = document.getElementById('onboarding') as SniceSpotlightElement;
|
|
162
|
+
|
|
163
|
+
spotlight.steps = [
|
|
164
|
+
{ target: '#feature-a', title: 'Feature A', description: 'This is feature A.' },
|
|
165
|
+
{ target: '#feature-b', title: 'Feature B', description: 'This is feature B.' },
|
|
166
|
+
{ target: '#feature-c', title: 'Feature C', description: 'This is feature C.' }
|
|
167
|
+
];
|
|
168
|
+
|
|
169
|
+
spotlight.addEventListener('spotlight-step', (e) => {
|
|
170
|
+
console.log(`Now on step ${e.detail.index}: ${e.detail.step.title}`);
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
spotlight.addEventListener('spotlight-end', () => {
|
|
174
|
+
console.log('Tour completed');
|
|
175
|
+
localStorage.setItem('onboarding-done', 'true');
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
spotlight.addEventListener('spotlight-skip', (e) => {
|
|
179
|
+
console.log(`Tour skipped at step ${e.detail.index}`);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
// Only show tour for new users
|
|
183
|
+
if (!localStorage.getItem('onboarding-done')) {
|
|
184
|
+
spotlight.start();
|
|
185
|
+
}
|
|
186
|
+
</script>
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Auto-Positioned Steps
|
|
190
|
+
|
|
191
|
+
Use `position: 'auto'` or omit the position to let the component automatically determine the best popover placement.
|
|
192
|
+
|
|
193
|
+
```html
|
|
194
|
+
<snice-spotlight id="auto-tour"></snice-spotlight>
|
|
195
|
+
|
|
196
|
+
<script type="module">
|
|
197
|
+
const spotlight = document.getElementById('auto-tour');
|
|
198
|
+
spotlight.steps = [
|
|
199
|
+
{ target: '.sidebar', title: 'Sidebar', description: 'Access tools and settings here.' },
|
|
200
|
+
{ target: '.main-content', title: 'Content Area', description: 'Your main workspace.', position: 'auto' },
|
|
201
|
+
{ target: '.footer-help', title: 'Help', description: 'Need assistance? Click here.', position: 'top' }
|
|
202
|
+
];
|
|
203
|
+
spotlight.start();
|
|
204
|
+
</script>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Programmatic Step Navigation
|
|
208
|
+
|
|
209
|
+
Control the tour programmatically using methods, useful for custom navigation UI.
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<snice-spotlight id="controlled-tour"></snice-spotlight>
|
|
213
|
+
|
|
214
|
+
<button onclick="document.getElementById('controlled-tour').prev()">Previous</button>
|
|
215
|
+
<button onclick="document.getElementById('controlled-tour').next()">Next</button>
|
|
216
|
+
<button onclick="document.getElementById('controlled-tour').goToStep(0)">Restart</button>
|
|
217
|
+
<button onclick="document.getElementById('controlled-tour').end()">End Tour</button>
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Accessibility
|
|
221
|
+
|
|
222
|
+
- **Keyboard support**: The popover navigation buttons (Next, Previous, Skip) are fully keyboard accessible
|
|
223
|
+
- **Focus management**: Focus is moved to the popover when each step is shown
|
|
224
|
+
- **ARIA attributes**: The overlay and popover use appropriate ARIA roles for screen reader support
|
|
225
|
+
- **Escape key**: Pressing Escape ends the tour
|
|
226
|
+
- **Reduced motion**: Transitions respect `prefers-reduced-motion` for users sensitive to animations
|
|
227
|
+
|
|
228
|
+
## Browser Support
|
|
229
|
+
|
|
230
|
+
- Modern browsers (Chrome, Firefox, Safari, Edge)
|
|
231
|
+
- Requires Custom Elements v1 and Shadow DOM support
|
|
232
|
+
|
|
233
|
+
## Best Practices
|
|
234
|
+
|
|
235
|
+
1. **Keep tours short**: Limit to 3-5 steps to avoid user fatigue
|
|
236
|
+
2. **Write clear descriptions**: Each step should explain what the user can do, not just what the element is
|
|
237
|
+
3. **Target visible elements**: Ensure target elements are visible and in the viewport before starting the tour
|
|
238
|
+
4. **Persist completion state**: Use `localStorage` or a backend flag to avoid showing the tour to returning users
|
|
239
|
+
5. **Provide a skip option**: Always let users skip the tour if they prefer
|
|
240
|
+
6. **Use appropriate positions**: Choose positions that don't obscure important UI elements
|