snice 4.9.0 → 4.11.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/carousel.d.ts +1 -0
- package/adapters/react/carousel.d.ts.map +1 -1
- package/adapters/react/carousel.js +1 -1
- package/adapters/react/carousel.js.map +1 -1
- package/adapters/react/carousel.tsx +2 -1
- 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/bin/templates/CLAUDE.md +169 -113
- package/bin/templates/pwa/README.md +72 -94
- package/bin/templates/pwa/src/components/app-header.ts +218 -0
- package/bin/templates/pwa/src/components/notification-badge.ts +68 -0
- package/bin/templates/pwa/src/components/search-bar.ts +99 -0
- package/bin/templates/pwa/src/controllers/notification-controller.ts +42 -0
- package/bin/templates/pwa/src/guards/auth.ts +1 -1
- package/bin/templates/pwa/src/main.ts +19 -0
- package/bin/templates/pwa/src/pages/dashboard.ts +124 -23
- package/bin/templates/pwa/src/pages/data.ts +329 -0
- package/bin/templates/pwa/src/pages/notifications.ts +112 -30
- package/bin/templates/pwa/src/pages/profile.ts +86 -52
- package/bin/templates/pwa/src/pages/settings.ts +291 -0
- package/bin/templates/pwa/src/styles/global.css +12 -3
- 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/README.md +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/README.md +2 -2
- package/dist/cdn/carousel/snice-carousel.js +9 -3
- package/dist/cdn/carousel/snice-carousel.js.map +1 -1
- package/dist/cdn/carousel/snice-carousel.min.js +3 -3
- package/dist/cdn/carousel/snice-carousel.min.js.map +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 +588 -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/README.md +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.js +10 -3
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js +4 -4
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +10 -3
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js +4 -4
- 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/carousel/snice-carousel.js +8 -2
- package/dist/components/carousel/snice-carousel.js.map +1 -1
- 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 +60 -0
- package/dist/components/pdf-viewer/snice-pdf-viewer.js +521 -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 +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +8 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +8 -1
- package/dist/index.iife.js.map +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 +18 -2
- 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/docs/routing.md +2 -2
- package/package.json +1 -1
- package/docs/ai/components/popover.md +0 -70
- package/docs/components/popover.md +0 -333
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
#
|
|
1
|
+
[//]: # (AI: For a low-token version of this doc, use docs/ai/components/select.md instead)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Select
|
|
4
|
+
`<snice-select>`
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
- [Basic Usage](#basic-usage)
|
|
7
|
-
- [Components](#components)
|
|
8
|
-
- [snice-select](#snice-select)
|
|
9
|
-
- [snice-option](#snice-option)
|
|
10
|
-
- [Properties](#properties)
|
|
11
|
-
- [Methods](#methods)
|
|
12
|
-
- [Events](#events)
|
|
13
|
-
- [Features](#features)
|
|
14
|
-
- [Examples](#examples)
|
|
6
|
+
A customizable dropdown selection with single/multiple selection, search filtering, and composable options.
|
|
15
7
|
|
|
16
8
|
## Basic Usage
|
|
17
9
|
|
|
10
|
+
```typescript
|
|
11
|
+
import 'snice/components/select/snice-select';
|
|
12
|
+
import 'snice/components/select/snice-option';
|
|
13
|
+
```
|
|
14
|
+
|
|
18
15
|
```html
|
|
19
16
|
<snice-select label="Choose a color" name="color">
|
|
20
17
|
<snice-option value="red">Red</snice-option>
|
|
@@ -23,194 +20,69 @@ The select components provide a customizable dropdown selection interface. The s
|
|
|
23
20
|
</snice-select>
|
|
24
21
|
```
|
|
25
22
|
|
|
23
|
+
## Importing
|
|
24
|
+
|
|
25
|
+
**ESM (bundler)**
|
|
26
26
|
```typescript
|
|
27
27
|
import 'snice/components/select/snice-select';
|
|
28
28
|
import 'snice/components/select/snice-option';
|
|
29
|
-
|
|
30
|
-
const select = document.querySelector('snice-select');
|
|
31
|
-
select.addEventListener('select-change', (e) => {
|
|
32
|
-
console.log('Selected:', e.detail.value);
|
|
33
|
-
});
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Components
|
|
37
|
-
|
|
38
|
-
### snice-select
|
|
39
|
-
|
|
40
|
-
The main select component that manages the dropdown interface and selection state.
|
|
41
|
-
|
|
42
|
-
#### Properties
|
|
43
|
-
|
|
44
|
-
| Property | Type | Default | Description |
|
|
45
|
-
|----------|------|---------|-------------|
|
|
46
|
-
| `value` | `string` | `''` | The selected value (comma-separated for multiple) |
|
|
47
|
-
| `disabled` | `boolean` | `false` | Whether the select is disabled |
|
|
48
|
-
| `required` | `boolean` | `false` | Whether the select is required in a form |
|
|
49
|
-
| `invalid` | `boolean` | `false` | Whether to show invalid state styling |
|
|
50
|
-
| `readonly` | `boolean` | `false` | Whether the select is readonly |
|
|
51
|
-
| `multiple` | `boolean` | `false` | Whether multiple selection is allowed |
|
|
52
|
-
| `searchable` | `boolean` | `false` | Whether to show a search input |
|
|
53
|
-
| `clearable` | `boolean` | `false` | Whether to show a clear button |
|
|
54
|
-
| `open` | `boolean` | `false` | Whether the dropdown is open |
|
|
55
|
-
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Size variant |
|
|
56
|
-
| `name` | `string` | `''` | Form field name |
|
|
57
|
-
| `label` | `string` | `''` | Label text displayed above select |
|
|
58
|
-
| `placeholder` | `string` | `'Select an option'` | Placeholder text |
|
|
59
|
-
| `maxHeight` | `string` | `'200px'` | Maximum height of dropdown |
|
|
60
|
-
|
|
61
|
-
#### Methods
|
|
62
|
-
|
|
63
|
-
##### `selectOption(value: string): void`
|
|
64
|
-
Programmatically select an option by value.
|
|
65
|
-
|
|
66
|
-
```typescript
|
|
67
|
-
select.selectOption('red');
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
##### `clear(): void`
|
|
71
|
-
Clear the current selection.
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
select.clear();
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
##### `openDropdown(): void`
|
|
78
|
-
Open the dropdown.
|
|
79
|
-
|
|
80
|
-
```typescript
|
|
81
|
-
select.openDropdown();
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
##### `closeDropdown(): void`
|
|
85
|
-
Close the dropdown.
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
select.closeDropdown();
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
##### `toggleDropdown(): void`
|
|
92
|
-
Toggle the dropdown open/closed state.
|
|
93
|
-
|
|
94
|
-
```typescript
|
|
95
|
-
select.toggleDropdown();
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
##### `focus(): void`
|
|
99
|
-
Give focus to the select trigger.
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
select.focus();
|
|
103
29
|
```
|
|
104
30
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
select.blur();
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
#### Events
|
|
113
|
-
|
|
114
|
-
##### `select-change`
|
|
115
|
-
Fired when the selection changes.
|
|
116
|
-
|
|
117
|
-
**Event Detail:**
|
|
118
|
-
```typescript
|
|
119
|
-
{
|
|
120
|
-
value: string | string[]; // Selected value(s)
|
|
121
|
-
option?: SelectOption; // The selected option object
|
|
122
|
-
select: SniceSelectElement; // Reference to the select element
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Usage:**
|
|
127
|
-
```typescript
|
|
128
|
-
select.addEventListener('select-change', (e) => {
|
|
129
|
-
const { value, option } = e.detail;
|
|
130
|
-
console.log(`Selected ${option?.label} with value ${value}`);
|
|
131
|
-
});
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
##### `select-open`
|
|
135
|
-
Fired when the dropdown opens.
|
|
136
|
-
|
|
137
|
-
**Event Detail:**
|
|
138
|
-
```typescript
|
|
139
|
-
{
|
|
140
|
-
select: SniceSelectElement; // Reference to the select element
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
##### `select-close`
|
|
145
|
-
Fired when the dropdown closes.
|
|
146
|
-
|
|
147
|
-
**Event Detail:**
|
|
148
|
-
```typescript
|
|
149
|
-
{
|
|
150
|
-
select: SniceSelectElement; // Reference to the select element
|
|
151
|
-
}
|
|
31
|
+
**CDN**
|
|
32
|
+
```html
|
|
33
|
+
<script src="snice-runtime.min.js"></script>
|
|
34
|
+
<script src="snice-select.min.js"></script>
|
|
152
35
|
```
|
|
153
36
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
Individual option component. Must be placed inside `<snice-select>`.
|
|
157
|
-
|
|
158
|
-
#### Properties
|
|
159
|
-
|
|
160
|
-
| Property | Type | Default | Description |
|
|
161
|
-
|----------|------|---------|-------------|
|
|
162
|
-
| `value` | `string` | `''` | Option value (uses label if not specified) |
|
|
163
|
-
| `label` | `string` | `''` | Option label (uses text content if not specified) |
|
|
164
|
-
| `disabled` | `boolean` | `false` | Whether the option is disabled |
|
|
165
|
-
| `selected` | `boolean` | `false` | Whether the option is initially selected |
|
|
166
|
-
| `icon` | `string` | `''` | URL of an icon to display |
|
|
167
|
-
|
|
168
|
-
#### Getter
|
|
169
|
-
|
|
170
|
-
##### `optionData`
|
|
171
|
-
Returns an object containing the option's data.
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
const data = option.optionData;
|
|
175
|
-
// { value, label, disabled, selected, icon }
|
|
176
|
-
```
|
|
37
|
+
## Examples
|
|
177
38
|
|
|
178
|
-
|
|
39
|
+
### Sizes
|
|
179
40
|
|
|
180
|
-
|
|
41
|
+
Use the `size` attribute to change the select size.
|
|
181
42
|
|
|
182
43
|
```html
|
|
183
|
-
<snice-select
|
|
184
|
-
<snice-option value="
|
|
185
|
-
<snice-option value="
|
|
186
|
-
|
|
44
|
+
<snice-select size="small" label="Small">
|
|
45
|
+
<snice-option value="a">Option A</snice-option>
|
|
46
|
+
<snice-option value="b">Option B</snice-option>
|
|
47
|
+
</snice-select>
|
|
48
|
+
|
|
49
|
+
<snice-select size="large" label="Large">
|
|
50
|
+
<snice-option value="a">Option A</snice-option>
|
|
51
|
+
<snice-option value="b">Option B</snice-option>
|
|
187
52
|
</snice-select>
|
|
188
53
|
```
|
|
189
54
|
|
|
190
55
|
### Multiple Selection
|
|
191
56
|
|
|
57
|
+
Set the `multiple` attribute to allow selecting more than one option.
|
|
58
|
+
|
|
192
59
|
```html
|
|
193
|
-
<snice-select label="
|
|
194
|
-
<snice-option value="
|
|
195
|
-
<snice-option value="
|
|
196
|
-
<snice-option value="
|
|
60
|
+
<snice-select label="Select languages" multiple>
|
|
61
|
+
<snice-option value="js">JavaScript</snice-option>
|
|
62
|
+
<snice-option value="ts">TypeScript</snice-option>
|
|
63
|
+
<snice-option value="py">Python</snice-option>
|
|
64
|
+
<snice-option value="rs">Rust</snice-option>
|
|
197
65
|
</snice-select>
|
|
198
66
|
```
|
|
199
67
|
|
|
200
68
|
### Searchable
|
|
201
69
|
|
|
70
|
+
Set the `searchable` attribute to show a search input for filtering options.
|
|
71
|
+
|
|
202
72
|
```html
|
|
203
|
-
<snice-select label="
|
|
204
|
-
<snice-option value="
|
|
205
|
-
<snice-option value="
|
|
206
|
-
<snice-option value="
|
|
207
|
-
<snice-option value="
|
|
208
|
-
<snice-option value="
|
|
73
|
+
<snice-select label="Choose a country" searchable>
|
|
74
|
+
<snice-option value="us">United States</snice-option>
|
|
75
|
+
<snice-option value="uk">United Kingdom</snice-option>
|
|
76
|
+
<snice-option value="ca">Canada</snice-option>
|
|
77
|
+
<snice-option value="au">Australia</snice-option>
|
|
78
|
+
<snice-option value="de">Germany</snice-option>
|
|
209
79
|
</snice-select>
|
|
210
80
|
```
|
|
211
81
|
|
|
212
82
|
### Clearable
|
|
213
83
|
|
|
84
|
+
Set the `clearable` attribute to show a clear button.
|
|
85
|
+
|
|
214
86
|
```html
|
|
215
87
|
<snice-select label="Clearable select" clearable>
|
|
216
88
|
<snice-option value="1">Option 1</snice-option>
|
|
@@ -221,57 +93,21 @@ const data = option.optionData;
|
|
|
221
93
|
### Disabled Options
|
|
222
94
|
|
|
223
95
|
```html
|
|
224
|
-
<snice-select label="With disabled
|
|
225
|
-
<snice-option value="
|
|
226
|
-
<snice-option value="
|
|
227
|
-
<snice-option value="
|
|
96
|
+
<snice-select label="With disabled option">
|
|
97
|
+
<snice-option value="active">Active</snice-option>
|
|
98
|
+
<snice-option value="unavailable" disabled>Unavailable</snice-option>
|
|
99
|
+
<snice-option value="other">Other</snice-option>
|
|
228
100
|
</snice-select>
|
|
229
101
|
```
|
|
230
102
|
|
|
231
103
|
### With Icons
|
|
232
104
|
|
|
105
|
+
Use the `icon` attribute on options to display an image.
|
|
106
|
+
|
|
233
107
|
```html
|
|
234
|
-
<snice-select label="Select
|
|
108
|
+
<snice-select label="Select role">
|
|
235
109
|
<snice-option value="user" icon="/icons/user.svg">User</snice-option>
|
|
236
110
|
<snice-option value="admin" icon="/icons/admin.svg">Admin</snice-option>
|
|
237
|
-
<snice-option value="guest" icon="/icons/guest.svg">Guest</snice-option>
|
|
238
|
-
</snice-select>
|
|
239
|
-
```
|
|
240
|
-
|
|
241
|
-
## Examples
|
|
242
|
-
|
|
243
|
-
### Basic Select
|
|
244
|
-
|
|
245
|
-
```html
|
|
246
|
-
<snice-select
|
|
247
|
-
label="Favorite fruit"
|
|
248
|
-
name="fruit"
|
|
249
|
-
placeholder="Choose a fruit">
|
|
250
|
-
<snice-option value="apple">Apple</snice-option>
|
|
251
|
-
<snice-option value="banana">Banana</snice-option>
|
|
252
|
-
<snice-option value="orange">Orange</snice-option>
|
|
253
|
-
</snice-select>
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
### Size Variants
|
|
257
|
-
|
|
258
|
-
```html
|
|
259
|
-
<!-- Small -->
|
|
260
|
-
<snice-select size="small" label="Small select">
|
|
261
|
-
<snice-option value="1">Option 1</snice-option>
|
|
262
|
-
<snice-option value="2">Option 2</snice-option>
|
|
263
|
-
</snice-select>
|
|
264
|
-
|
|
265
|
-
<!-- Medium (default) -->
|
|
266
|
-
<snice-select size="medium" label="Medium select">
|
|
267
|
-
<snice-option value="1">Option 1</snice-option>
|
|
268
|
-
<snice-option value="2">Option 2</snice-option>
|
|
269
|
-
</snice-select>
|
|
270
|
-
|
|
271
|
-
<!-- Large -->
|
|
272
|
-
<snice-select size="large" label="Large select">
|
|
273
|
-
<snice-option value="1">Option 1</snice-option>
|
|
274
|
-
<snice-option value="2">Option 2</snice-option>
|
|
275
111
|
</snice-select>
|
|
276
112
|
```
|
|
277
113
|
|
|
@@ -279,24 +115,11 @@ const data = option.optionData;
|
|
|
279
115
|
|
|
280
116
|
```html
|
|
281
117
|
<form id="userForm">
|
|
282
|
-
<snice-select
|
|
283
|
-
name="role"
|
|
284
|
-
label="User role"
|
|
285
|
-
required>
|
|
118
|
+
<snice-select name="role" label="User role" required>
|
|
286
119
|
<snice-option value="user">User</snice-option>
|
|
287
120
|
<snice-option value="admin">Admin</snice-option>
|
|
288
121
|
<snice-option value="moderator">Moderator</snice-option>
|
|
289
122
|
</snice-select>
|
|
290
|
-
|
|
291
|
-
<snice-select
|
|
292
|
-
name="permissions"
|
|
293
|
-
label="Permissions"
|
|
294
|
-
multiple>
|
|
295
|
-
<snice-option value="read">Read</snice-option>
|
|
296
|
-
<snice-option value="write">Write</snice-option>
|
|
297
|
-
<snice-option value="delete">Delete</snice-option>
|
|
298
|
-
</snice-select>
|
|
299
|
-
|
|
300
123
|
<button type="submit">Submit</button>
|
|
301
124
|
</form>
|
|
302
125
|
|
|
@@ -304,16 +127,9 @@ const data = option.optionData;
|
|
|
304
127
|
import 'snice/components/select/snice-select';
|
|
305
128
|
import 'snice/components/select/snice-option';
|
|
306
129
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
form.addEventListener('submit', (e) => {
|
|
130
|
+
document.getElementById('userForm').addEventListener('submit', (e) => {
|
|
310
131
|
e.preventDefault();
|
|
311
|
-
|
|
312
|
-
const formData = new FormData(form);
|
|
313
|
-
const data = Object.fromEntries(formData);
|
|
314
|
-
|
|
315
|
-
console.log('Form data:', data);
|
|
316
|
-
// { role: 'admin', permissions: 'read,write' }
|
|
132
|
+
console.log(Object.fromEntries(new FormData(e.target)));
|
|
317
133
|
});
|
|
318
134
|
</script>
|
|
319
135
|
```
|
|
@@ -321,279 +137,92 @@ const data = option.optionData;
|
|
|
321
137
|
### Programmatic Control
|
|
322
138
|
|
|
323
139
|
```typescript
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
const select = document.querySelector<SniceSelectElement>('snice-select');
|
|
140
|
+
const select = document.querySelector('snice-select');
|
|
327
141
|
|
|
328
|
-
// Select an option
|
|
329
142
|
select.selectOption('apple');
|
|
330
|
-
|
|
331
|
-
// Clear selection
|
|
332
143
|
select.clear();
|
|
333
|
-
|
|
334
|
-
// Open/close dropdown
|
|
335
144
|
select.openDropdown();
|
|
336
145
|
select.closeDropdown();
|
|
337
146
|
select.toggleDropdown();
|
|
338
|
-
|
|
339
|
-
// Get current value
|
|
340
|
-
console.log(select.value);
|
|
341
|
-
|
|
342
|
-
// Set value
|
|
343
|
-
select.value = 'banana';
|
|
344
147
|
```
|
|
345
148
|
|
|
346
|
-
###
|
|
149
|
+
### Event Handling
|
|
347
150
|
|
|
348
151
|
```typescript
|
|
349
152
|
const select = document.querySelector('snice-select');
|
|
350
153
|
|
|
351
154
|
select.addEventListener('select-change', (e) => {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
if (option) {
|
|
355
|
-
console.log(`Selected: ${option.label} (${value})`);
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
// Trigger dependent logic
|
|
359
|
-
updateDependentFields(value);
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
select.addEventListener('select-open', () => {
|
|
363
|
-
console.log('Dropdown opened');
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
select.addEventListener('select-close', () => {
|
|
367
|
-
console.log('Dropdown closed');
|
|
155
|
+
console.log('Selected:', e.detail.value);
|
|
368
156
|
});
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Dynamic Options
|
|
372
|
-
|
|
373
|
-
```html
|
|
374
|
-
<snice-select id="dynamicSelect" label="Dynamic options"></snice-select>
|
|
375
|
-
|
|
376
|
-
<button id="loadOptions">Load Options</button>
|
|
377
|
-
|
|
378
|
-
<script type="module">
|
|
379
|
-
import 'snice/components/select/snice-select';
|
|
380
|
-
import 'snice/components/select/snice-option';
|
|
381
|
-
|
|
382
|
-
const select = document.querySelector('#dynamicSelect');
|
|
383
|
-
const loadBtn = document.querySelector('#loadOptions');
|
|
384
|
-
|
|
385
|
-
loadBtn.addEventListener('click', async () => {
|
|
386
|
-
// Fetch options from API
|
|
387
|
-
const response = await fetch('/api/options');
|
|
388
|
-
const options = await response.json();
|
|
389
|
-
|
|
390
|
-
// Clear existing options
|
|
391
|
-
select.innerHTML = '';
|
|
392
|
-
|
|
393
|
-
// Add new options
|
|
394
|
-
options.forEach(opt => {
|
|
395
|
-
const option = document.createElement('snice-option');
|
|
396
|
-
option.value = opt.id;
|
|
397
|
-
option.label = opt.name;
|
|
398
|
-
if (opt.icon) option.icon = opt.icon;
|
|
399
|
-
if (opt.disabled) option.disabled = true;
|
|
400
|
-
select.appendChild(option);
|
|
401
|
-
});
|
|
402
|
-
});
|
|
403
|
-
</script>
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
### Multiple Selection with Tags
|
|
407
157
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
label="Select tags"
|
|
411
|
-
name="tags"
|
|
412
|
-
multiple
|
|
413
|
-
clearable
|
|
414
|
-
placeholder="Choose tags">
|
|
415
|
-
<snice-option value="javascript">JavaScript</snice-option>
|
|
416
|
-
<snice-option value="typescript">TypeScript</snice-option>
|
|
417
|
-
<snice-option value="python">Python</snice-option>
|
|
418
|
-
<snice-option value="rust">Rust</snice-option>
|
|
419
|
-
<snice-option value="go">Go</snice-option>
|
|
420
|
-
</snice-select>
|
|
158
|
+
select.addEventListener('select-open', () => console.log('Opened'));
|
|
159
|
+
select.addEventListener('select-close', () => console.log('Closed'));
|
|
421
160
|
```
|
|
422
161
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
### Searchable with Many Options
|
|
162
|
+
### Validation
|
|
426
163
|
|
|
427
164
|
```html
|
|
428
|
-
<snice-select
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
searchable
|
|
432
|
-
max-height="300px">
|
|
433
|
-
<snice-option value="us">United States</snice-option>
|
|
434
|
-
<snice-option value="uk">United Kingdom</snice-option>
|
|
435
|
-
<snice-option value="ca">Canada</snice-option>
|
|
436
|
-
<snice-option value="au">Australia</snice-option>
|
|
437
|
-
<snice-option value="de">Germany</snice-option>
|
|
438
|
-
<snice-option value="fr">France</snice-option>
|
|
439
|
-
<!-- Many more options... -->
|
|
165
|
+
<snice-select id="category" name="category" label="Category" required>
|
|
166
|
+
<snice-option value="tech">Technology</snice-option>
|
|
167
|
+
<snice-option value="health">Health</snice-option>
|
|
440
168
|
</snice-select>
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
### Validation Example
|
|
444
|
-
|
|
445
|
-
```html
|
|
446
|
-
<form id="validationForm">
|
|
447
|
-
<snice-select
|
|
448
|
-
id="categorySelect"
|
|
449
|
-
name="category"
|
|
450
|
-
label="Category"
|
|
451
|
-
required
|
|
452
|
-
placeholder="Select a category">
|
|
453
|
-
<snice-option value="tech">Technology</snice-option>
|
|
454
|
-
<snice-option value="health">Health</snice-option>
|
|
455
|
-
<snice-option value="finance">Finance</snice-option>
|
|
456
|
-
</snice-select>
|
|
457
|
-
|
|
458
|
-
<button type="submit">Submit</button>
|
|
459
|
-
</form>
|
|
460
169
|
|
|
461
170
|
<script type="module">
|
|
462
|
-
|
|
463
|
-
import 'snice/components/select/snice-option';
|
|
464
|
-
|
|
465
|
-
const form = document.querySelector('#validationForm');
|
|
466
|
-
const select = document.querySelector('#categorySelect');
|
|
467
|
-
|
|
468
|
-
form.addEventListener('submit', (e) => {
|
|
469
|
-
e.preventDefault();
|
|
470
|
-
|
|
471
|
-
if (!select.value) {
|
|
472
|
-
select.invalid = true;
|
|
473
|
-
alert('Please select a category');
|
|
474
|
-
return;
|
|
475
|
-
}
|
|
171
|
+
const select = document.getElementById('category');
|
|
476
172
|
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
173
|
+
function validate() {
|
|
174
|
+
select.invalid = !select.value;
|
|
175
|
+
return !!select.value;
|
|
176
|
+
}
|
|
480
177
|
</script>
|
|
481
178
|
```
|
|
482
179
|
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
```html
|
|
486
|
-
<!DOCTYPE html>
|
|
487
|
-
<html>
|
|
488
|
-
<head>
|
|
489
|
-
<style>
|
|
490
|
-
.select-demo {
|
|
491
|
-
max-width: 400px;
|
|
492
|
-
margin: 2rem auto;
|
|
493
|
-
display: flex;
|
|
494
|
-
flex-direction: column;
|
|
495
|
-
gap: 1rem;
|
|
496
|
-
}
|
|
497
|
-
</style>
|
|
498
|
-
|
|
499
|
-
<script type="module">
|
|
500
|
-
import 'snice/components/select/snice-select';
|
|
501
|
-
import 'snice/components/select/snice-option';
|
|
502
|
-
|
|
503
|
-
// Handle select changes
|
|
504
|
-
document.addEventListener('select-change', (e) => {
|
|
505
|
-
console.log('Selection changed:', e.detail);
|
|
506
|
-
});
|
|
507
|
-
</script>
|
|
508
|
-
</head>
|
|
509
|
-
<body>
|
|
510
|
-
<div class="select-demo">
|
|
511
|
-
<snice-select
|
|
512
|
-
label="Single selection"
|
|
513
|
-
name="single"
|
|
514
|
-
clearable>
|
|
515
|
-
<snice-option value="1">Option 1</snice-option>
|
|
516
|
-
<snice-option value="2">Option 2</snice-option>
|
|
517
|
-
<snice-option value="3">Option 3</snice-option>
|
|
518
|
-
</snice-select>
|
|
519
|
-
|
|
520
|
-
<snice-select
|
|
521
|
-
label="Multiple selection"
|
|
522
|
-
name="multiple"
|
|
523
|
-
multiple
|
|
524
|
-
clearable>
|
|
525
|
-
<snice-option value="a">Choice A</snice-option>
|
|
526
|
-
<snice-option value="b">Choice B</snice-option>
|
|
527
|
-
<snice-option value="c">Choice C</snice-option>
|
|
528
|
-
<snice-option value="d">Choice D</snice-option>
|
|
529
|
-
</snice-select>
|
|
530
|
-
|
|
531
|
-
<snice-select
|
|
532
|
-
label="Searchable"
|
|
533
|
-
name="searchable"
|
|
534
|
-
searchable>
|
|
535
|
-
<snice-option value="apple">Apple</snice-option>
|
|
536
|
-
<snice-option value="banana">Banana</snice-option>
|
|
537
|
-
<snice-option value="cherry">Cherry</snice-option>
|
|
538
|
-
<snice-option value="date">Date</snice-option>
|
|
539
|
-
<snice-option value="elderberry">Elderberry</snice-option>
|
|
540
|
-
<snice-option value="fig">Fig</snice-option>
|
|
541
|
-
<snice-option value="grape">Grape</snice-option>
|
|
542
|
-
</snice-select>
|
|
543
|
-
|
|
544
|
-
<snice-select
|
|
545
|
-
label="With disabled option"
|
|
546
|
-
name="disabled">
|
|
547
|
-
<snice-option value="1">Enabled</snice-option>
|
|
548
|
-
<snice-option value="2" disabled>Disabled</snice-option>
|
|
549
|
-
<snice-option value="3">Enabled</snice-option>
|
|
550
|
-
</snice-select>
|
|
551
|
-
|
|
552
|
-
<snice-select
|
|
553
|
-
label="Disabled select"
|
|
554
|
-
name="disabledSelect"
|
|
555
|
-
disabled>
|
|
556
|
-
<snice-option value="1">Option 1</snice-option>
|
|
557
|
-
<snice-option value="2">Option 2</snice-option>
|
|
558
|
-
</snice-select>
|
|
559
|
-
</div>
|
|
560
|
-
</body>
|
|
561
|
-
</html>
|
|
562
|
-
```
|
|
563
|
-
|
|
564
|
-
## Accessibility
|
|
180
|
+
## Select Properties
|
|
565
181
|
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
-
|
|
583
|
-
- **Type to search**: When searchable, type to filter options
|
|
584
|
-
|
|
585
|
-
## Form Behavior
|
|
586
|
-
|
|
587
|
-
The select component works seamlessly with HTML forms:
|
|
588
|
-
|
|
589
|
-
- Acts like a native `<select>` element
|
|
590
|
-
- Supports `name` and `value` attributes
|
|
591
|
-
- Supports `required` attribute for validation
|
|
592
|
-
- Compatible with FormData API
|
|
593
|
-
- Hidden native `<select>` for form submission
|
|
594
|
-
- Multiple selection values are comma-separated
|
|
182
|
+
| Property | Type | Default | Description |
|
|
183
|
+
|----------|------|---------|-------------|
|
|
184
|
+
| `value` | `string` | `''` | Selected value (comma-separated for multiple) |
|
|
185
|
+
| `disabled` | `boolean` | `false` | Disables the select |
|
|
186
|
+
| `required` | `boolean` | `false` | Required for form validation |
|
|
187
|
+
| `invalid` | `boolean` | `false` | Shows invalid state styling |
|
|
188
|
+
| `readonly` | `boolean` | `false` | Readonly state |
|
|
189
|
+
| `loading` | `boolean` | `false` | Shows loading spinner |
|
|
190
|
+
| `multiple` | `boolean` | `false` | Allow multiple selection |
|
|
191
|
+
| `searchable` | `boolean` | `false` | Show search input |
|
|
192
|
+
| `clearable` | `boolean` | `false` | Show clear button |
|
|
193
|
+
| `open` | `boolean` | `false` | Whether dropdown is open |
|
|
194
|
+
| `size` | `'small' \| 'medium' \| 'large'` | `'medium'` | Select size |
|
|
195
|
+
| `name` | `string` | `''` | Form field name |
|
|
196
|
+
| `label` | `string` | `''` | Label text |
|
|
197
|
+
| `placeholder` | `string` | `'Select an option'` | Placeholder text |
|
|
198
|
+
| `maxHeight` (attr: `max-height`) | `string` | `'200px'` | Maximum dropdown height |
|
|
595
199
|
|
|
596
|
-
##
|
|
200
|
+
## Option Properties
|
|
597
201
|
|
|
598
|
-
|
|
599
|
-
|
|
202
|
+
| Property | Type | Default | Description |
|
|
203
|
+
|----------|------|---------|-------------|
|
|
204
|
+
| `value` | `string` | `''` | Option value (falls back to label) |
|
|
205
|
+
| `label` | `string` | `''` | Option label (falls back to text content) |
|
|
206
|
+
| `disabled` | `boolean` | `false` | Disables the option |
|
|
207
|
+
| `selected` | `boolean` | `false` | Initially selected |
|
|
208
|
+
| `icon` | `string` | `''` | Icon image URL |
|
|
209
|
+
|
|
210
|
+
## Events
|
|
211
|
+
|
|
212
|
+
| Event | Detail | Description |
|
|
213
|
+
|-------|--------|-------------|
|
|
214
|
+
| `select-change` | `{ value, option, select }` | Selection changed |
|
|
215
|
+
| `select-open` | `{ select }` | Dropdown opened |
|
|
216
|
+
| `select-close` | `{ select }` | Dropdown closed |
|
|
217
|
+
|
|
218
|
+
## Methods
|
|
219
|
+
|
|
220
|
+
| Method | Arguments | Description |
|
|
221
|
+
|--------|-----------|-------------|
|
|
222
|
+
| `selectOption()` | `value: string` | Select an option by value |
|
|
223
|
+
| `clear()` | -- | Clear the selection |
|
|
224
|
+
| `openDropdown()` | -- | Open the dropdown |
|
|
225
|
+
| `closeDropdown()` | -- | Close the dropdown |
|
|
226
|
+
| `toggleDropdown()` | -- | Toggle the dropdown |
|
|
227
|
+
| `focus()` | -- | Focus the select trigger |
|
|
228
|
+
| `blur()` | -- | Remove focus and close dropdown |
|