snice 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/snice-accordion-item.d.ts +2 -2
- package/dist/components/accordion/snice-accordion-item.js +8 -8
- package/dist/components/accordion/snice-accordion-item.js.map +1 -1
- package/dist/components/accordion/snice-accordion.d.ts +2 -2
- package/dist/components/accordion/snice-accordion.js +8 -8
- package/dist/components/accordion/snice-accordion.js.map +1 -1
- package/dist/components/actions/snice-actions.d.ts +28 -0
- package/dist/components/actions/snice-actions.js +220 -0
- package/dist/components/actions/snice-actions.js.map +1 -0
- package/dist/components/actions/snice-actions.types.d.ts +27 -0
- package/dist/components/alert/snice-alert.d.ts +2 -2
- package/dist/components/alert/snice-alert.js +8 -8
- package/dist/components/alert/snice-alert.js.map +1 -1
- package/dist/components/audio-recorder/snice-audio-recorder.d.ts +58 -0
- package/dist/components/audio-recorder/snice-audio-recorder.js +413 -0
- package/dist/components/audio-recorder/snice-audio-recorder.js.map +1 -0
- package/dist/components/audio-recorder/snice-audio-recorder.types.d.ts +28 -0
- package/dist/components/avatar/snice-avatar.d.ts +2 -2
- package/dist/components/avatar/snice-avatar.js +8 -8
- package/dist/components/avatar/snice-avatar.js.map +1 -1
- package/dist/components/badge/snice-badge.d.ts +2 -2
- package/dist/components/badge/snice-badge.js +9 -9
- package/dist/components/badge/snice-badge.js.map +1 -1
- package/dist/components/banner/snice-banner.d.ts +2 -2
- package/dist/components/banner/snice-banner.js +8 -8
- package/dist/components/banner/snice-banner.js.map +1 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +2 -2
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +8 -8
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/components/button/snice-button.d.ts +2 -2
- package/dist/components/button/snice-button.js +8 -8
- package/dist/components/button/snice-button.js.map +1 -1
- package/dist/components/calendar/snice-calendar.d.ts +46 -0
- package/dist/components/calendar/snice-calendar.js +294 -0
- package/dist/components/calendar/snice-calendar.js.map +1 -0
- package/dist/components/calendar/snice-calendar.types.d.ts +34 -0
- package/dist/components/camera/snice-camera.d.ts +39 -0
- package/dist/components/camera/snice-camera.js +286 -0
- package/dist/components/camera/snice-camera.js.map +1 -0
- package/dist/components/camera/snice-camera.types.d.ts +28 -0
- package/dist/components/card/snice-card.d.ts +2 -2
- package/dist/components/card/snice-card.js +8 -8
- package/dist/components/card/snice-card.js.map +1 -1
- package/dist/components/carousel/snice-carousel.d.ts +32 -0
- package/dist/components/carousel/snice-carousel.js +279 -0
- package/dist/components/carousel/snice-carousel.js.map +1 -0
- package/dist/components/carousel/snice-carousel.types.d.ts +22 -0
- package/dist/components/chart/snice-chart.d.ts +73 -0
- package/dist/components/chart/snice-chart.js +940 -0
- package/dist/components/chart/snice-chart.js.map +1 -0
- package/dist/components/chart/snice-chart.types.d.ts +71 -0
- package/dist/components/chat/snice-chat.d.ts +98 -0
- package/dist/components/chat/snice-chat.js +589 -0
- package/dist/components/chat/snice-chat.js.map +1 -0
- package/dist/components/chat/snice-chat.types.d.ts +141 -0
- package/dist/components/checkbox/snice-checkbox.d.ts +2 -2
- package/dist/components/checkbox/snice-checkbox.js +8 -8
- package/dist/components/checkbox/snice-checkbox.js.map +1 -1
- package/dist/components/chip/snice-chip.d.ts +2 -2
- package/dist/components/chip/snice-chip.js +8 -8
- package/dist/components/chip/snice-chip.js.map +1 -1
- package/dist/components/code-block/snice-code-block.d.ts +15 -0
- package/dist/components/code-block/snice-code-block.js +141 -0
- package/dist/components/code-block/snice-code-block.js.map +1 -0
- package/dist/components/code-block/snice-code-block.types.d.ts +15 -0
- package/dist/components/color-display/snice-color-display.d.ts +2 -2
- package/dist/components/color-display/snice-color-display.js +9 -9
- package/dist/components/color-display/snice-color-display.js.map +1 -1
- package/dist/components/color-picker/snice-color-picker.d.ts +2 -2
- package/dist/components/color-picker/snice-color-picker.js +8 -8
- package/dist/components/color-picker/snice-color-picker.js.map +1 -1
- package/dist/components/command-palette/snice-command-palette.d.ts +47 -0
- package/dist/components/command-palette/snice-command-palette.js +428 -0
- package/dist/components/command-palette/snice-command-palette.js.map +1 -0
- package/dist/components/command-palette/snice-command-palette.types.d.ts +49 -0
- package/dist/components/date-picker/snice-date-picker.d.ts +2 -2
- package/dist/components/date-picker/snice-date-picker.js +9 -9
- package/dist/components/date-picker/snice-date-picker.js.map +1 -1
- package/dist/components/divider/snice-divider.d.ts +2 -2
- package/dist/components/divider/snice-divider.js +8 -8
- package/dist/components/divider/snice-divider.js.map +1 -1
- package/dist/components/doc/snice-doc.d.ts +93 -0
- package/dist/components/doc/snice-doc.js +626 -0
- package/dist/components/doc/snice-doc.js.map +1 -0
- package/dist/components/doc/snice-doc.types.d.ts +118 -0
- package/dist/components/draw/snice-draw.d.ts +71 -0
- package/dist/components/draw/snice-draw.js +709 -0
- package/dist/components/draw/snice-draw.js.map +1 -0
- package/dist/components/draw/snice-draw.types.d.ts +41 -0
- package/dist/components/drawer/snice-drawer.d.ts +2 -2
- package/dist/components/drawer/snice-drawer.js +8 -8
- package/dist/components/drawer/snice-drawer.js.map +1 -1
- package/dist/components/empty-state/snice-empty-state.d.ts +2 -2
- package/dist/components/empty-state/snice-empty-state.js +8 -8
- package/dist/components/empty-state/snice-empty-state.js.map +1 -1
- package/dist/components/file-upload/snice-file-upload.d.ts +2 -3
- package/dist/components/file-upload/snice-file-upload.js +8 -15
- package/dist/components/file-upload/snice-file-upload.js.map +1 -1
- package/dist/components/gantt/snice-gantt.d.ts +29 -0
- package/dist/components/gantt/snice-gantt.js +268 -0
- package/dist/components/gantt/snice-gantt.js.map +1 -0
- package/dist/components/gantt/snice-gantt.types.d.ts +23 -0
- package/dist/components/image/snice-image.d.ts +2 -2
- package/dist/components/image/snice-image.js +9 -9
- package/dist/components/image/snice-image.js.map +1 -1
- package/dist/components/input/snice-input.d.ts +2 -2
- package/dist/components/input/snice-input.js +8 -8
- package/dist/components/input/snice-input.js.map +1 -1
- package/dist/components/kanban/snice-kanban.d.ts +31 -0
- package/dist/components/kanban/snice-kanban.js +243 -0
- package/dist/components/kanban/snice-kanban.js.map +1 -0
- package/dist/components/kanban/snice-kanban.types.d.ts +29 -0
- package/dist/components/kpi/snice-kpi.d.ts +2 -2
- package/dist/components/kpi/snice-kpi.js +10 -10
- package/dist/components/kpi/snice-kpi.js.map +1 -1
- package/dist/components/layout/snice-layout-blog.d.ts +2 -2
- package/dist/components/layout/snice-layout-blog.js +8 -8
- package/dist/components/layout/snice-layout-blog.js.map +1 -1
- package/dist/components/layout/snice-layout-card.d.ts +2 -2
- package/dist/components/layout/snice-layout-card.js +8 -8
- package/dist/components/layout/snice-layout-card.js.map +1 -1
- package/dist/components/layout/snice-layout-centered.d.ts +2 -2
- package/dist/components/layout/snice-layout-centered.js +8 -8
- package/dist/components/layout/snice-layout-centered.js.map +1 -1
- package/dist/components/layout/snice-layout-dashboard.d.ts +2 -2
- package/dist/components/layout/snice-layout-dashboard.js +8 -8
- package/dist/components/layout/snice-layout-dashboard.js.map +1 -1
- package/dist/components/layout/snice-layout-fullscreen.d.ts +2 -2
- package/dist/components/layout/snice-layout-fullscreen.js +8 -8
- package/dist/components/layout/snice-layout-fullscreen.js.map +1 -1
- package/dist/components/layout/snice-layout-landing.d.ts +2 -2
- package/dist/components/layout/snice-layout-landing.js +8 -8
- package/dist/components/layout/snice-layout-landing.js.map +1 -1
- package/dist/components/layout/snice-layout-minimal.d.ts +2 -2
- package/dist/components/layout/snice-layout-minimal.js +8 -8
- package/dist/components/layout/snice-layout-minimal.js.map +1 -1
- package/dist/components/layout/snice-layout-sidebar.d.ts +2 -2
- package/dist/components/layout/snice-layout-sidebar.js +8 -8
- package/dist/components/layout/snice-layout-sidebar.js.map +1 -1
- package/dist/components/layout/snice-layout-split.d.ts +2 -2
- package/dist/components/layout/snice-layout-split.js +8 -8
- package/dist/components/layout/snice-layout-split.js.map +1 -1
- package/dist/components/layout/snice-layout.d.ts +2 -2
- package/dist/components/layout/snice-layout.js +8 -8
- package/dist/components/layout/snice-layout.js.map +1 -1
- package/dist/components/link/snice-link.d.ts +2 -2
- package/dist/components/link/snice-link.js +9 -9
- package/dist/components/link/snice-link.js.map +1 -1
- package/dist/components/list/snice-list-item.d.ts +6 -0
- package/dist/components/list/snice-list-item.js +68 -0
- package/dist/components/list/snice-list-item.js.map +1 -0
- package/dist/components/list/snice-list.d.ts +23 -0
- package/dist/components/list/snice-list.js +270 -0
- package/dist/components/list/snice-list.js.map +1 -0
- package/dist/components/list/snice-list.types.d.ts +28 -0
- package/dist/components/location/snice-location.d.ts +35 -0
- package/dist/components/location/snice-location.js +238 -0
- package/dist/components/location/snice-location.js.map +1 -0
- package/dist/components/location/snice-location.types.d.ts +35 -0
- package/dist/components/login/snice-login.d.ts +2 -2
- package/dist/components/login/snice-login.js +8 -8
- package/dist/components/login/snice-login.js.map +1 -1
- package/dist/components/menu/snice-menu-divider.d.ts +4 -0
- package/dist/components/menu/snice-menu-divider.js +53 -0
- package/dist/components/menu/snice-menu-divider.js.map +1 -0
- package/dist/components/menu/snice-menu-item.d.ts +10 -0
- package/dist/components/menu/snice-menu-item.js +99 -0
- package/dist/components/menu/snice-menu-item.js.map +1 -0
- package/dist/components/menu/snice-menu-item.types.d.ts +9 -0
- package/dist/components/menu/snice-menu.d.ts +27 -0
- package/dist/components/menu/snice-menu.js +199 -0
- package/dist/components/menu/snice-menu.js.map +1 -0
- package/dist/components/menu/snice-menu.types.d.ts +18 -0
- package/dist/components/modal/snice-modal.d.ts +2 -2
- package/dist/components/modal/snice-modal.js +8 -8
- package/dist/components/modal/snice-modal.js.map +1 -1
- package/dist/components/nav/snice-nav.js.map +1 -1
- package/dist/components/pagination/snice-pagination.d.ts +2 -2
- package/dist/components/pagination/snice-pagination.js +8 -8
- package/dist/components/pagination/snice-pagination.js.map +1 -1
- package/dist/components/progress/snice-progress.d.ts +2 -2
- package/dist/components/progress/snice-progress.js +8 -8
- package/dist/components/progress/snice-progress.js.map +1 -1
- package/dist/components/qr-code/qrcode.d.ts +28 -0
- package/dist/components/qr-code/qrcode.js +906 -0
- package/dist/components/qr-code/qrcode.js.map +1 -0
- package/dist/components/qr-code/snice-qr-code.d.ts +35 -0
- package/dist/components/qr-code/snice-qr-code.js +256 -0
- package/dist/components/qr-code/snice-qr-code.js.map +1 -0
- package/dist/components/qr-code/snice-qr-code.types.d.ts +33 -0
- package/dist/components/radio/snice-radio.d.ts +2 -2
- package/dist/components/radio/snice-radio.js +8 -8
- package/dist/components/radio/snice-radio.js.map +1 -1
- package/dist/components/select/snice-option.d.ts +2 -2
- package/dist/components/select/snice-option.js +8 -8
- package/dist/components/select/snice-option.js.map +1 -1
- package/dist/components/select/snice-select.d.ts +2 -2
- package/dist/components/select/snice-select.js +8 -8
- package/dist/components/select/snice-select.js.map +1 -1
- package/dist/components/skeleton/snice-skeleton.d.ts +2 -2
- package/dist/components/skeleton/snice-skeleton.js +8 -8
- package/dist/components/skeleton/snice-skeleton.js.map +1 -1
- package/dist/components/slider/snice-slider.d.ts +2 -2
- package/dist/components/slider/snice-slider.js +8 -8
- package/dist/components/slider/snice-slider.js.map +1 -1
- package/dist/components/sparkline/snice-sparkline.d.ts +2 -2
- package/dist/components/sparkline/snice-sparkline.js +9 -9
- package/dist/components/sparkline/snice-sparkline.js.map +1 -1
- package/dist/components/spinner/snice-spinner.d.ts +2 -2
- package/dist/components/spinner/snice-spinner.js +9 -9
- package/dist/components/spinner/snice-spinner.js.map +1 -1
- package/dist/components/split-pane/snice-split-pane.d.ts +32 -0
- package/dist/components/split-pane/snice-split-pane.js +191 -0
- package/dist/components/split-pane/snice-split-pane.js.map +1 -0
- package/dist/components/split-pane/snice-split-pane.types.d.ts +19 -0
- package/dist/components/stat/snice-stat.d.ts +14 -0
- package/dist/components/stat/snice-stat.js +140 -0
- package/dist/components/stat/snice-stat.js.map +1 -0
- package/dist/components/stat/snice-stat.types.d.ts +12 -0
- package/dist/components/stepper/snice-stepper-panel.d.ts +2 -2
- package/dist/components/stepper/snice-stepper-panel.js +9 -9
- package/dist/components/stepper/snice-stepper-panel.js.map +1 -1
- package/dist/components/stepper/snice-stepper.d.ts +2 -2
- package/dist/components/stepper/snice-stepper.js +9 -9
- package/dist/components/stepper/snice-stepper.js.map +1 -1
- package/dist/components/switch/snice-switch.d.ts +2 -2
- package/dist/components/switch/snice-switch.js +8 -8
- package/dist/components/switch/snice-switch.js.map +1 -1
- package/dist/components/table/snice-cell-actions.d.ts +2 -2
- package/dist/components/table/snice-cell-actions.js +8 -8
- package/dist/components/table/snice-cell-actions.js.map +1 -1
- package/dist/components/table/snice-cell-boolean.d.ts +2 -2
- package/dist/components/table/snice-cell-boolean.js +8 -8
- package/dist/components/table/snice-cell-boolean.js.map +1 -1
- package/dist/components/table/snice-cell-color.d.ts +2 -2
- package/dist/components/table/snice-cell-color.js +8 -8
- package/dist/components/table/snice-cell-color.js.map +1 -1
- package/dist/components/table/snice-cell-currency.d.ts +2 -2
- package/dist/components/table/snice-cell-currency.js +8 -8
- package/dist/components/table/snice-cell-currency.js.map +1 -1
- package/dist/components/table/snice-cell-date.d.ts +2 -2
- package/dist/components/table/snice-cell-date.js +8 -8
- package/dist/components/table/snice-cell-date.js.map +1 -1
- package/dist/components/table/snice-cell-duration.d.ts +2 -2
- package/dist/components/table/snice-cell-duration.js +8 -8
- package/dist/components/table/snice-cell-duration.js.map +1 -1
- package/dist/components/table/snice-cell-email.d.ts +2 -2
- package/dist/components/table/snice-cell-email.js +8 -8
- package/dist/components/table/snice-cell-email.js.map +1 -1
- package/dist/components/table/snice-cell-filesize.d.ts +2 -2
- package/dist/components/table/snice-cell-filesize.js +8 -8
- package/dist/components/table/snice-cell-filesize.js.map +1 -1
- package/dist/components/table/snice-cell-image.d.ts +2 -2
- package/dist/components/table/snice-cell-image.js +8 -8
- package/dist/components/table/snice-cell-image.js.map +1 -1
- package/dist/components/table/snice-cell-json.d.ts +2 -2
- package/dist/components/table/snice-cell-json.js +8 -8
- package/dist/components/table/snice-cell-json.js.map +1 -1
- package/dist/components/table/snice-cell-link.d.ts +2 -2
- package/dist/components/table/snice-cell-link.js +8 -8
- package/dist/components/table/snice-cell-link.js.map +1 -1
- package/dist/components/table/snice-cell-location.d.ts +2 -2
- package/dist/components/table/snice-cell-location.js +8 -8
- package/dist/components/table/snice-cell-location.js.map +1 -1
- package/dist/components/table/snice-cell-number.d.ts +2 -2
- package/dist/components/table/snice-cell-number.js +8 -8
- package/dist/components/table/snice-cell-number.js.map +1 -1
- package/dist/components/table/snice-cell-percentage.d.ts +2 -2
- package/dist/components/table/snice-cell-percentage.js +8 -8
- package/dist/components/table/snice-cell-percentage.js.map +1 -1
- package/dist/components/table/snice-cell-phone.d.ts +2 -2
- package/dist/components/table/snice-cell-phone.js +8 -8
- package/dist/components/table/snice-cell-phone.js.map +1 -1
- package/dist/components/table/snice-cell-progress.d.ts +2 -2
- package/dist/components/table/snice-cell-progress.js +8 -8
- package/dist/components/table/snice-cell-progress.js.map +1 -1
- package/dist/components/table/snice-cell-rating.d.ts +2 -2
- package/dist/components/table/snice-cell-rating.js +8 -8
- package/dist/components/table/snice-cell-rating.js.map +1 -1
- package/dist/components/table/snice-cell-sparkline.d.ts +2 -2
- package/dist/components/table/snice-cell-sparkline.js +8 -8
- package/dist/components/table/snice-cell-sparkline.js.map +1 -1
- package/dist/components/table/snice-cell-status.d.ts +2 -2
- package/dist/components/table/snice-cell-status.js +8 -8
- package/dist/components/table/snice-cell-status.js.map +1 -1
- package/dist/components/table/snice-cell-tag.d.ts +2 -2
- package/dist/components/table/snice-cell-tag.js +8 -8
- package/dist/components/table/snice-cell-tag.js.map +1 -1
- package/dist/components/table/snice-cell-text.d.ts +2 -2
- package/dist/components/table/snice-cell-text.js +8 -8
- package/dist/components/table/snice-cell-text.js.map +1 -1
- package/dist/components/table/snice-cell.d.ts +2 -2
- package/dist/components/table/snice-cell.js +8 -8
- package/dist/components/table/snice-cell.js.map +1 -1
- package/dist/components/table/snice-column.d.ts +1 -1
- package/dist/components/table/snice-column.js +4 -4
- package/dist/components/table/snice-column.js.map +1 -1
- package/dist/components/table/snice-header.d.ts +2 -2
- package/dist/components/table/snice-header.js +8 -8
- package/dist/components/table/snice-header.js.map +1 -1
- package/dist/components/table/snice-progress.d.ts +2 -2
- package/dist/components/table/snice-progress.js +8 -8
- package/dist/components/table/snice-progress.js.map +1 -1
- package/dist/components/table/snice-rating.d.ts +2 -2
- package/dist/components/table/snice-rating.js +8 -8
- package/dist/components/table/snice-rating.js.map +1 -1
- package/dist/components/table/snice-row.d.ts +2 -2
- package/dist/components/table/snice-row.js +8 -8
- package/dist/components/table/snice-row.js.map +1 -1
- package/dist/components/table/snice-table.d.ts +2 -3
- package/dist/components/table/snice-table.js +8 -13
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/tabs/snice-tab-panel.d.ts +2 -2
- package/dist/components/tabs/snice-tab-panel.js +8 -8
- package/dist/components/tabs/snice-tab-panel.js.map +1 -1
- package/dist/components/tabs/snice-tab.d.ts +2 -2
- package/dist/components/tabs/snice-tab.js +8 -8
- package/dist/components/tabs/snice-tab.js.map +1 -1
- package/dist/components/tabs/snice-tabs.d.ts +2 -2
- package/dist/components/tabs/snice-tabs.js +8 -8
- package/dist/components/tabs/snice-tabs.js.map +1 -1
- package/dist/components/terminal/snice-terminal.types.d.ts +133 -0
- package/dist/components/textarea/snice-textarea.d.ts +2 -2
- package/dist/components/textarea/snice-textarea.js +8 -8
- package/dist/components/textarea/snice-textarea.js.map +1 -1
- package/dist/components/timeline/snice-timeline.d.ts +1 -1
- package/dist/components/timeline/snice-timeline.js +5 -5
- package/dist/components/timeline/snice-timeline.js.map +1 -1
- package/dist/components/toast/snice-toast-container.d.ts +2 -2
- package/dist/components/toast/snice-toast-container.js +8 -8
- package/dist/components/toast/snice-toast-container.js.map +1 -1
- package/dist/components/toast/snice-toast.d.ts +2 -2
- package/dist/components/toast/snice-toast.js +8 -8
- package/dist/components/toast/snice-toast.js.map +1 -1
- package/dist/components/tooltip/snice-tooltip.d.ts +2 -2
- package/dist/components/tooltip/snice-tooltip.js +8 -8
- package/dist/components/tooltip/snice-tooltip.js.map +1 -1
- package/dist/components/tree/snice-tree-item.d.ts +35 -0
- package/dist/components/tree/snice-tree-item.js +301 -0
- package/dist/components/tree/snice-tree-item.js.map +1 -0
- package/dist/components/tree/snice-tree-item.types.d.ts +30 -0
- package/dist/components/tree/snice-tree.d.ts +45 -0
- package/dist/components/tree/snice-tree.js +390 -0
- package/dist/components/tree/snice-tree.js.map +1 -0
- package/dist/components/tree/snice-tree.types.d.ts +65 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.d.ts +31 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.js +160 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.js.map +1 -0
- package/dist/components/virtual-scroller/snice-virtual-scroller.types.d.ts +19 -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/components/actions.md +81 -0
- package/docs/ai/components/audio-recorder.md +97 -0
- package/docs/ai/components/calendar.md +95 -0
- package/docs/ai/components/camera.md +130 -0
- package/docs/ai/components/carousel.md +49 -0
- package/docs/ai/components/chart.md +160 -0
- package/docs/ai/components/chat.md +189 -0
- package/docs/ai/components/code-block.md +32 -0
- package/docs/ai/components/command-palette.md +117 -0
- package/docs/ai/components/doc.md +154 -0
- package/docs/ai/components/draw.md +140 -0
- package/docs/ai/components/gantt.md +95 -0
- package/docs/ai/components/kanban.md +102 -0
- package/docs/ai/components/layout.md +261 -0
- package/docs/ai/components/list.md +50 -0
- package/docs/ai/components/location.md +75 -0
- package/docs/ai/components/menu.md +114 -0
- package/docs/ai/components/popover.md +70 -0
- package/docs/ai/components/qr-code.md +106 -0
- package/docs/ai/components/split-pane.md +71 -0
- package/docs/ai/components/stat.md +29 -0
- package/docs/ai/components/tree.md +191 -0
- package/docs/ai/components/virtual-scroller.md +71 -0
- package/docs/components/actions.md +317 -0
- package/docs/components/alert.md +540 -0
- package/docs/components/audio-recorder.md +152 -0
- package/docs/components/badge.md +593 -0
- package/docs/components/breadcrumbs.md +568 -0
- package/docs/components/button.md +648 -0
- package/docs/components/calendar.md +397 -0
- package/docs/components/camera.md +383 -0
- package/docs/components/card.md +778 -0
- package/docs/components/carousel.md +63 -0
- package/docs/components/chart.md +526 -0
- package/docs/components/chat.md +482 -0
- package/docs/components/checkbox.md +714 -0
- package/docs/components/chip.md +670 -0
- package/docs/components/code-block.md +49 -0
- package/docs/components/command-palette.md +159 -0
- package/docs/components/doc.md +357 -0
- package/docs/components/draw.md +307 -0
- package/docs/components/gantt.md +347 -0
- package/docs/components/kanban.md +410 -0
- package/docs/components/list.md +65 -0
- package/docs/components/location.md +369 -0
- package/docs/components/menu.md +633 -0
- package/docs/components/popover.md +333 -0
- package/docs/components/qr-code.md +464 -0
- package/docs/components/split-pane.md +315 -0
- package/docs/components/stat.md +45 -0
- package/docs/components/tree.md +536 -0
- package/docs/components/virtual-scroller.md +298 -0
- package/package.json +1 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Draw Component
|
|
2
|
+
|
|
3
|
+
Canvas drawing with smooth lazy-brush technology.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<snice-draw id="draw" width="800" height="600"></snice-draw>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
const draw = document.getElementById('draw');
|
|
12
|
+
|
|
13
|
+
// Clear canvas
|
|
14
|
+
draw.clear();
|
|
15
|
+
|
|
16
|
+
// Undo/redo
|
|
17
|
+
draw.undo();
|
|
18
|
+
draw.redo();
|
|
19
|
+
|
|
20
|
+
// Download
|
|
21
|
+
draw.download('my-drawing.png');
|
|
22
|
+
</script>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Properties
|
|
26
|
+
|
|
27
|
+
| Property | Type | Default | Description |
|
|
28
|
+
|----------|------|---------|-------------|
|
|
29
|
+
| `width` | `number` | `800` | Canvas width |
|
|
30
|
+
| `height` | `number` | `600` | Canvas height |
|
|
31
|
+
| `tool` | `DrawTool` | `'pen'` | Drawing tool |
|
|
32
|
+
| `color` | `string` | `'#000000'` | Brush color |
|
|
33
|
+
| `strokeWidth` | `number` | `2` | Brush width |
|
|
34
|
+
| `backgroundColor` | `string` | `'#ffffff'` | Canvas background |
|
|
35
|
+
| `lazy` | `boolean` | `false` | Enable lazy brush |
|
|
36
|
+
| `lazyRadius` | `number` | `60` | Lazy brush radius |
|
|
37
|
+
| `friction` | `number` | `0.1` | Lazy brush friction |
|
|
38
|
+
| `smoothing` | `number` | `0.5` | Line smoothing (0-1) |
|
|
39
|
+
| `autoPolygon` | `boolean` | `false` | Enable auto-polygon |
|
|
40
|
+
| `polygonCurvePoints` | `number` | `10` | Polygon curve smoothness (2-30) |
|
|
41
|
+
| `disabled` | `boolean` | `false` | Disable drawing |
|
|
42
|
+
|
|
43
|
+
## Tools
|
|
44
|
+
|
|
45
|
+
- `'pen'` - Draw with brush
|
|
46
|
+
- `'eraser'` - Erase strokes
|
|
47
|
+
- `'line'` - Draw straight lines
|
|
48
|
+
- `'rectangle'` - Draw rectangles
|
|
49
|
+
- `'circle'` - Draw circles
|
|
50
|
+
- `'text'` - Add text
|
|
51
|
+
|
|
52
|
+
## Methods
|
|
53
|
+
|
|
54
|
+
### `clear(): void`
|
|
55
|
+
Clear the entire canvas.
|
|
56
|
+
|
|
57
|
+
### `undo(): void`
|
|
58
|
+
Undo last stroke.
|
|
59
|
+
|
|
60
|
+
### `redo(): void`
|
|
61
|
+
Redo previously undone stroke.
|
|
62
|
+
|
|
63
|
+
### `toDataURL(type?, quality?): string`
|
|
64
|
+
Export as data URL.
|
|
65
|
+
|
|
66
|
+
### `toBlob(type?, quality?): Promise<Blob>`
|
|
67
|
+
Export as Blob.
|
|
68
|
+
|
|
69
|
+
### `download(filename?): void`
|
|
70
|
+
Download drawing.
|
|
71
|
+
|
|
72
|
+
### `loadImage(url): Promise<void>`
|
|
73
|
+
Load image onto canvas.
|
|
74
|
+
|
|
75
|
+
### `getStrokes(): DrawStroke[]`
|
|
76
|
+
Get all strokes.
|
|
77
|
+
|
|
78
|
+
### `setStrokes(strokes): void`
|
|
79
|
+
Set strokes (for loading saved drawings).
|
|
80
|
+
|
|
81
|
+
## Events
|
|
82
|
+
|
|
83
|
+
- `@snice/draw-start` - Drawing started
|
|
84
|
+
- `@snice/draw-end` - Drawing ended (stroke complete)
|
|
85
|
+
- `@snice/draw-clear` - Canvas cleared
|
|
86
|
+
- `@snice/draw-undo` - Undo performed
|
|
87
|
+
- `@snice/draw-redo` - Redo performed
|
|
88
|
+
|
|
89
|
+
## Examples
|
|
90
|
+
|
|
91
|
+
### Basic Drawing
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<snice-draw width="800" height="600"></snice-draw>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Custom Colors
|
|
98
|
+
|
|
99
|
+
```javascript
|
|
100
|
+
const draw = document.querySelector('snice-draw');
|
|
101
|
+
draw.color = '#ff0000';
|
|
102
|
+
draw.strokeWidth = 5;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Toolbar Integration
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<div>
|
|
109
|
+
<button onclick="draw.tool = 'pen'">Pen</button>
|
|
110
|
+
<button onclick="draw.tool = 'eraser'">Eraser</button>
|
|
111
|
+
<input type="color" oninput="draw.color = this.value">
|
|
112
|
+
<button onclick="draw.clear()">Clear</button>
|
|
113
|
+
<button onclick="draw.undo()">Undo</button>
|
|
114
|
+
<button onclick="draw.redo()">Redo</button>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
<snice-draw id="draw"></snice-draw>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Lazy Brush Settings
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
// More responsive (smaller radius)
|
|
124
|
+
draw.lazyRadius = 10;
|
|
125
|
+
|
|
126
|
+
// Very smooth (larger radius)
|
|
127
|
+
draw.lazyRadius = 60;
|
|
128
|
+
|
|
129
|
+
// Disable lazy brush
|
|
130
|
+
draw.lazy = false;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Export Drawing
|
|
134
|
+
|
|
135
|
+
```javascript
|
|
136
|
+
// As data URL
|
|
137
|
+
const dataURL = draw.toDataURL('image/png');
|
|
138
|
+
|
|
139
|
+
// As blob
|
|
140
|
+
const blob = await draw.toBlob('image/png', 0.9);
|
|
141
|
+
|
|
142
|
+
// Download
|
|
143
|
+
draw.download('my-artwork.png');
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Save and Load
|
|
147
|
+
|
|
148
|
+
Each stroke has a unique ID for tracking and manipulation:
|
|
149
|
+
|
|
150
|
+
```javascript
|
|
151
|
+
// Save drawing
|
|
152
|
+
const strokes = draw.getStrokes();
|
|
153
|
+
localStorage.setItem('drawing', JSON.stringify(strokes));
|
|
154
|
+
|
|
155
|
+
// Load drawing
|
|
156
|
+
const saved = JSON.parse(localStorage.getItem('drawing'));
|
|
157
|
+
draw.setStrokes(saved);
|
|
158
|
+
|
|
159
|
+
// Access individual strokes by ID
|
|
160
|
+
const strokes = draw.getStrokes();
|
|
161
|
+
console.log(strokes[0].id); // e.g., "stroke-1735216842123-x7k9m2p"
|
|
162
|
+
|
|
163
|
+
// Filter strokes
|
|
164
|
+
const penStrokes = strokes.filter(s => s.tool === 'pen');
|
|
165
|
+
|
|
166
|
+
// Remove specific stroke
|
|
167
|
+
const filtered = strokes.filter(s => s.id !== 'stroke-id-to-remove');
|
|
168
|
+
draw.setStrokes(filtered);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Stroke Structure:**
|
|
172
|
+
|
|
173
|
+
```typescript
|
|
174
|
+
interface DrawStroke {
|
|
175
|
+
id: string; // Unique identifier
|
|
176
|
+
tool: DrawTool; // 'pen' | 'eraser' | etc
|
|
177
|
+
color: string; // Hex color
|
|
178
|
+
width: number; // Stroke width
|
|
179
|
+
points: Point[]; // Array of {x, y, pressure?}
|
|
180
|
+
timestamp: number; // Creation time (ms)
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Load Background Image
|
|
185
|
+
|
|
186
|
+
```javascript
|
|
187
|
+
await draw.loadImage('background.jpg');
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Event Handling
|
|
191
|
+
|
|
192
|
+
```javascript
|
|
193
|
+
draw.addEventListener('@snice/draw-end', (e) => {
|
|
194
|
+
const stroke = e.detail.stroke;
|
|
195
|
+
console.log(`Drew ${stroke.points.length} points`);
|
|
196
|
+
|
|
197
|
+
// Auto-save
|
|
198
|
+
saveDrawing();
|
|
199
|
+
});
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Keyboard Shortcuts
|
|
203
|
+
|
|
204
|
+
```javascript
|
|
205
|
+
document.addEventListener('keydown', (e) => {
|
|
206
|
+
if (e.ctrlKey || e.metaKey) {
|
|
207
|
+
if (e.key === 'z') {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
if (e.shiftKey) {
|
|
210
|
+
draw.redo();
|
|
211
|
+
} else {
|
|
212
|
+
draw.undo();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Lazy Brush
|
|
220
|
+
|
|
221
|
+
The lazy brush creates smooth, organic lines by making the brush lag behind your cursor within a configurable radius. This eliminates jitter and produces professional-looking strokes.
|
|
222
|
+
|
|
223
|
+
**How it works:**
|
|
224
|
+
1. Cursor moves freely
|
|
225
|
+
2. Brush follows within `lazyRadius`
|
|
226
|
+
3. Creates smooth curves
|
|
227
|
+
4. Reduces hand tremor effects
|
|
228
|
+
|
|
229
|
+
**Tips:**
|
|
230
|
+
- Larger radius = smoother, slower response
|
|
231
|
+
- Smaller radius = more control, less smoothing
|
|
232
|
+
- Disable for pixel-perfect control
|
|
233
|
+
|
|
234
|
+
## Auto-Polygon
|
|
235
|
+
|
|
236
|
+
Auto-polygon automatically processes completed strokes into closed shapes. When you finish drawing (release the mouse/pointer), it analyzes the stroke and applies smart shape completion.
|
|
237
|
+
|
|
238
|
+
**Features:**
|
|
239
|
+
|
|
240
|
+
1. **Self-Intersection Detection**
|
|
241
|
+
- Detects when your stroke crosses itself
|
|
242
|
+
- Automatically trims at the first intersection point
|
|
243
|
+
- Creates a clean closed shape without excess
|
|
244
|
+
|
|
245
|
+
2. **Auto-Close Open Shapes**
|
|
246
|
+
- If start and end points are far apart (>20px)
|
|
247
|
+
- Connects them with a smooth quadratic curve
|
|
248
|
+
- Curve adapts to the gap distance
|
|
249
|
+
|
|
250
|
+
**Properties:**
|
|
251
|
+
|
|
252
|
+
- `autoPolygon` - Enable/disable the feature (default: `false`)
|
|
253
|
+
- `polygonCurvePoints` - Curve smoothness, 2-30 (default: `10`)
|
|
254
|
+
- Lower values (2-5): Sharp, direct connection
|
|
255
|
+
- Medium values (10-15): Balanced smooth curve
|
|
256
|
+
- Higher values (20-30): Very smooth, organic curve
|
|
257
|
+
|
|
258
|
+
**Example:**
|
|
259
|
+
|
|
260
|
+
```javascript
|
|
261
|
+
const draw = document.querySelector('snice-draw');
|
|
262
|
+
|
|
263
|
+
// Enable auto-polygon
|
|
264
|
+
draw.autoPolygon = true;
|
|
265
|
+
|
|
266
|
+
// Adjust curve smoothness
|
|
267
|
+
draw.polygonCurvePoints = 15; // Smoother curves
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
```html
|
|
271
|
+
<snice-draw
|
|
272
|
+
auto-polygon
|
|
273
|
+
polygon-curve-points="15">
|
|
274
|
+
</snice-draw>
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Use Cases:**
|
|
278
|
+
|
|
279
|
+
- Sketching closed shapes quickly
|
|
280
|
+
- Drawing polygons without precision
|
|
281
|
+
- Creating organic forms that auto-complete
|
|
282
|
+
- UI wireframing and mockups
|
|
283
|
+
- Diagram creation
|
|
284
|
+
|
|
285
|
+
**How It Works:**
|
|
286
|
+
|
|
287
|
+
The algorithm processes strokes on `pointerup`:
|
|
288
|
+
|
|
289
|
+
1. Simplify points (sample every 5th point for performance)
|
|
290
|
+
2. Check for self-intersections using line-line intersection
|
|
291
|
+
3. If intersection found: trim and close at that point
|
|
292
|
+
4. If no intersection and gap >20px: generate curve points
|
|
293
|
+
5. Use quadratic Bezier with perpendicular control point
|
|
294
|
+
6. Insert interpolated points for smooth rendering
|
|
295
|
+
|
|
296
|
+
## Browser Support
|
|
297
|
+
|
|
298
|
+
- Modern browsers with Canvas API
|
|
299
|
+
- Pointer Events API for touch support
|
|
300
|
+
- Works on desktop and mobile
|
|
301
|
+
|
|
302
|
+
## Performance
|
|
303
|
+
|
|
304
|
+
- Optimized canvas rendering
|
|
305
|
+
- Efficient stroke storage
|
|
306
|
+
- Smooth 60fps drawing
|
|
307
|
+
- Touch and stylus pressure support
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
# Gantt Chart Component
|
|
2
|
+
|
|
3
|
+
Visual project timeline with task bars and progress tracking.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```javascript
|
|
8
|
+
const gantt = document.querySelector('snice-gantt');
|
|
9
|
+
|
|
10
|
+
gantt.tasks = [
|
|
11
|
+
{
|
|
12
|
+
id: 1,
|
|
13
|
+
name: 'Planning',
|
|
14
|
+
start: new Date(2024, 0, 1),
|
|
15
|
+
end: new Date(2024, 0, 7),
|
|
16
|
+
progress: 100
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: 2,
|
|
20
|
+
name: 'Development',
|
|
21
|
+
start: new Date(2024, 0, 8),
|
|
22
|
+
end: new Date(2024, 0, 31),
|
|
23
|
+
progress: 45
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Description |
|
|
31
|
+
|----------|------|---------|-------------|
|
|
32
|
+
| `tasks` | `GanttTask[]` | `[]` | Project tasks |
|
|
33
|
+
| `viewMode` | `'day' \| 'week' \| 'month' \| 'year'` | `'day'` | Timeline granularity |
|
|
34
|
+
| `showToday` | `boolean` | `true` | Highlight today |
|
|
35
|
+
| `showProgress` | `boolean` | `true` | Show progress bars |
|
|
36
|
+
| `showDependencies` | `boolean` | `false` | Show task dependencies |
|
|
37
|
+
| `minDate` | `Date \| string` | `''` | Timeline start date |
|
|
38
|
+
| `maxDate` | `Date \| string` | `''` | Timeline end date |
|
|
39
|
+
|
|
40
|
+
## GanttTask Interface
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
interface GanttTask {
|
|
44
|
+
id: string | number;
|
|
45
|
+
name: string;
|
|
46
|
+
start: Date | string;
|
|
47
|
+
end: Date | string;
|
|
48
|
+
progress?: number; // 0-100
|
|
49
|
+
dependencies?: (string | number)[];
|
|
50
|
+
color?: string;
|
|
51
|
+
data?: any;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Methods
|
|
56
|
+
|
|
57
|
+
### `getTask(id: string | number): GanttTask | undefined`
|
|
58
|
+
Get task by ID.
|
|
59
|
+
|
|
60
|
+
```javascript
|
|
61
|
+
const task = gantt.getTask(1);
|
|
62
|
+
console.log(task.name, task.progress);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### `scrollToToday(): void`
|
|
66
|
+
Scroll viewport to today's date.
|
|
67
|
+
|
|
68
|
+
```javascript
|
|
69
|
+
gantt.scrollToToday();
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### `scrollToTask(id: string | number): void`
|
|
73
|
+
Scroll to specific task.
|
|
74
|
+
|
|
75
|
+
```javascript
|
|
76
|
+
gantt.scrollToTask(5);
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Events
|
|
80
|
+
|
|
81
|
+
### `@snice/gantt-task-click`
|
|
82
|
+
Dispatched when task bar is clicked.
|
|
83
|
+
|
|
84
|
+
```javascript
|
|
85
|
+
gantt.addEventListener('@snice/gantt-task-click', (e) => {
|
|
86
|
+
console.log('Task:', e.detail.task);
|
|
87
|
+
showTaskDetails(e.detail.task);
|
|
88
|
+
});
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Detail:** `{ task: GanttTask, gantt: SniceGanttElement }`
|
|
92
|
+
|
|
93
|
+
## Examples
|
|
94
|
+
|
|
95
|
+
### Basic Timeline
|
|
96
|
+
|
|
97
|
+
```javascript
|
|
98
|
+
gantt.tasks = [
|
|
99
|
+
{
|
|
100
|
+
id: 1,
|
|
101
|
+
name: 'Task 1',
|
|
102
|
+
start: new Date(2024, 0, 1),
|
|
103
|
+
end: new Date(2024, 0, 10)
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 2,
|
|
107
|
+
name: 'Task 2',
|
|
108
|
+
start: new Date(2024, 0, 11),
|
|
109
|
+
end: new Date(2024, 0, 20)
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### With Progress
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
gantt.tasks = [
|
|
118
|
+
{
|
|
119
|
+
id: 1,
|
|
120
|
+
name: 'Design',
|
|
121
|
+
start: new Date(2024, 0, 1),
|
|
122
|
+
end: new Date(2024, 0, 14),
|
|
123
|
+
progress: 80
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 2,
|
|
127
|
+
name: 'Development',
|
|
128
|
+
start: new Date(2024, 0, 8),
|
|
129
|
+
end: new Date(2024, 0, 31),
|
|
130
|
+
progress: 35
|
|
131
|
+
}
|
|
132
|
+
];
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Color-Coded Tasks
|
|
136
|
+
|
|
137
|
+
```javascript
|
|
138
|
+
gantt.tasks = [
|
|
139
|
+
{
|
|
140
|
+
id: 1,
|
|
141
|
+
name: 'Planning',
|
|
142
|
+
start: new Date(2024, 0, 1),
|
|
143
|
+
end: new Date(2024, 0, 7),
|
|
144
|
+
color: '#4caf50',
|
|
145
|
+
progress: 100
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 2,
|
|
149
|
+
name: 'In Progress',
|
|
150
|
+
start: new Date(2024, 0, 8),
|
|
151
|
+
end: new Date(2024, 0, 21),
|
|
152
|
+
color: '#ff9800',
|
|
153
|
+
progress: 40
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 3,
|
|
157
|
+
name: 'Not Started',
|
|
158
|
+
start: new Date(2024, 0, 22),
|
|
159
|
+
end: new Date(2024, 0, 31),
|
|
160
|
+
color: '#f44336',
|
|
161
|
+
progress: 0
|
|
162
|
+
}
|
|
163
|
+
];
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Different View Modes
|
|
167
|
+
|
|
168
|
+
```html
|
|
169
|
+
<button onclick="gantt.viewMode = 'day'">Day</button>
|
|
170
|
+
<button onclick="gantt.viewMode = 'week'">Week</button>
|
|
171
|
+
<button onclick="gantt.viewMode = 'month'">Month</button>
|
|
172
|
+
<button onclick="gantt.viewMode = 'year'">Year</button>
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### With Dependencies
|
|
176
|
+
|
|
177
|
+
```javascript
|
|
178
|
+
gantt.showDependencies = true;
|
|
179
|
+
|
|
180
|
+
gantt.tasks = [
|
|
181
|
+
{
|
|
182
|
+
id: 1,
|
|
183
|
+
name: 'Task A',
|
|
184
|
+
start: new Date(2024, 0, 1),
|
|
185
|
+
end: new Date(2024, 0, 5)
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
id: 2,
|
|
189
|
+
name: 'Task B',
|
|
190
|
+
start: new Date(2024, 0, 6),
|
|
191
|
+
end: new Date(2024, 0, 12),
|
|
192
|
+
dependencies: [1] // Depends on Task A
|
|
193
|
+
}
|
|
194
|
+
];
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Date Range
|
|
198
|
+
|
|
199
|
+
```html
|
|
200
|
+
<snice-gantt
|
|
201
|
+
min-date="2024-01-01"
|
|
202
|
+
max-date="2024-12-31">
|
|
203
|
+
</snice-gantt>
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Event Handling
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
gantt.addEventListener('@snice/gantt-task-click', (e) => {
|
|
210
|
+
const task = e.detail.task;
|
|
211
|
+
|
|
212
|
+
// Show task modal
|
|
213
|
+
showModal({
|
|
214
|
+
title: task.name,
|
|
215
|
+
content: `
|
|
216
|
+
Start: ${task.start.toLocaleDateString()}
|
|
217
|
+
End: ${task.end.toLocaleDateString()}
|
|
218
|
+
Progress: ${task.progress}%
|
|
219
|
+
`
|
|
220
|
+
});
|
|
221
|
+
});
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Software Project
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
gantt.tasks = [
|
|
228
|
+
{
|
|
229
|
+
id: 1,
|
|
230
|
+
name: 'Requirements Gathering',
|
|
231
|
+
start: new Date(2024, 0, 1),
|
|
232
|
+
end: new Date(2024, 0, 14),
|
|
233
|
+
progress: 100,
|
|
234
|
+
color: '#4caf50'
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: 2,
|
|
238
|
+
name: 'Design',
|
|
239
|
+
start: new Date(2024, 0, 15),
|
|
240
|
+
end: new Date(2024, 0, 31),
|
|
241
|
+
progress: 75,
|
|
242
|
+
color: '#2196f3',
|
|
243
|
+
dependencies: [1]
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: 3,
|
|
247
|
+
name: 'Development',
|
|
248
|
+
start: new Date(2024, 1, 1),
|
|
249
|
+
end: new Date(2024, 2, 31),
|
|
250
|
+
progress: 40,
|
|
251
|
+
color: '#ff9800',
|
|
252
|
+
dependencies: [2]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: 4,
|
|
256
|
+
name: 'Testing',
|
|
257
|
+
start: new Date(2024, 3, 1),
|
|
258
|
+
end: new Date(2024, 3, 30),
|
|
259
|
+
progress: 0,
|
|
260
|
+
color: '#9c27b0',
|
|
261
|
+
dependencies: [3]
|
|
262
|
+
}
|
|
263
|
+
];
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Construction Project
|
|
267
|
+
|
|
268
|
+
```javascript
|
|
269
|
+
gantt.viewMode = 'week';
|
|
270
|
+
|
|
271
|
+
gantt.tasks = [
|
|
272
|
+
{ id: 1, name: 'Site Preparation', start: '2024-01-01', end: '2024-01-14', progress: 100 },
|
|
273
|
+
{ id: 2, name: 'Foundation', start: '2024-01-15', end: '2024-02-15', progress: 60 },
|
|
274
|
+
{ id: 3, name: 'Framing', start: '2024-02-16', end: '2024-03-30', progress: 20 },
|
|
275
|
+
{ id: 4, name: 'Roofing', start: '2024-04-01', end: '2024-04-21', progress: 0 },
|
|
276
|
+
{ id: 5, name: 'Interior', start: '2024-04-22', end: '2024-06-30', progress: 0 }
|
|
277
|
+
];
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Marketing Campaign
|
|
281
|
+
|
|
282
|
+
```javascript
|
|
283
|
+
gantt.tasks = [
|
|
284
|
+
{
|
|
285
|
+
id: 1,
|
|
286
|
+
name: 'Campaign Planning',
|
|
287
|
+
start: new Date(2024, 0, 1),
|
|
288
|
+
end: new Date(2024, 0, 7),
|
|
289
|
+
progress: 100
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: 2,
|
|
293
|
+
name: 'Content Creation',
|
|
294
|
+
start: new Date(2024, 0, 8),
|
|
295
|
+
end: new Date(2024, 0, 21),
|
|
296
|
+
progress: 70
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: 3,
|
|
300
|
+
name: 'Social Media',
|
|
301
|
+
start: new Date(2024, 0, 15),
|
|
302
|
+
end: new Date(2024, 1, 15),
|
|
303
|
+
progress: 30
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: 4,
|
|
307
|
+
name: 'Email Campaign',
|
|
308
|
+
start: new Date(2024, 0, 22),
|
|
309
|
+
end: new Date(2024, 1, 10),
|
|
310
|
+
progress: 10
|
|
311
|
+
}
|
|
312
|
+
];
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
### Dynamic Updates
|
|
316
|
+
|
|
317
|
+
```javascript
|
|
318
|
+
// Update progress
|
|
319
|
+
function updateProgress(taskId, progress) {
|
|
320
|
+
gantt.tasks = gantt.tasks.map(task =>
|
|
321
|
+
task.id === taskId ? { ...task, progress } : task
|
|
322
|
+
);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Add task
|
|
326
|
+
function addTask(task) {
|
|
327
|
+
gantt.tasks = [...gantt.tasks, task];
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// Remove task
|
|
331
|
+
function removeTask(taskId) {
|
|
332
|
+
gantt.tasks = gantt.tasks.filter(t => t.id !== taskId);
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Accessibility
|
|
337
|
+
|
|
338
|
+
- Keyboard navigation
|
|
339
|
+
- ARIA labels for tasks
|
|
340
|
+
- Screen reader friendly
|
|
341
|
+
- High contrast support
|
|
342
|
+
|
|
343
|
+
## Browser Support
|
|
344
|
+
|
|
345
|
+
- Modern browsers with Custom Elements v1 support
|
|
346
|
+
- Date calculations via Date API
|
|
347
|
+
- Responsive timeline scaling
|