snice 2.5.4 → 3.2.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/README.md +537 -869
- package/bin/templates/base/src/components/counter-button.ts +13 -26
- package/bin/templates/base/src/controllers/counter-controller.ts +3 -3
- package/dist/components/accordion/snice-accordion-item.d.ts +4 -5
- package/dist/components/accordion/snice-accordion-item.js +37 -39
- package/dist/components/accordion/snice-accordion-item.js.map +1 -1
- package/dist/components/accordion/snice-accordion.d.ts +5 -11
- package/dist/components/accordion/snice-accordion.js +51 -52
- package/dist/components/accordion/snice-accordion.js.map +1 -1
- package/dist/components/alert/snice-alert.d.ts +2 -6
- package/dist/components/alert/snice-alert.js +41 -56
- package/dist/components/alert/snice-alert.js.map +1 -1
- package/dist/components/avatar/snice-avatar.d.ts +2 -6
- package/dist/components/avatar/snice-avatar.js +64 -71
- package/dist/components/avatar/snice-avatar.js.map +1 -1
- package/dist/components/badge/snice-badge.d.ts +2 -3
- package/dist/components/badge/snice-badge.js +22 -23
- package/dist/components/badge/snice-badge.js.map +1 -1
- package/dist/components/banner/snice-banner.d.ts +22 -0
- package/dist/components/banner/snice-banner.js +180 -0
- package/dist/components/banner/snice-banner.js.map +1 -0
- package/dist/components/banner/snice-banner.types.d.ts +14 -0
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +5 -12
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +88 -89
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +1 -1
- package/dist/components/button/snice-button.d.ts +3 -7
- package/dist/components/button/snice-button.js +37 -58
- package/dist/components/button/snice-button.js.map +1 -1
- package/dist/components/card/snice-card.d.ts +5 -8
- package/dist/components/card/snice-card.js +71 -56
- package/dist/components/card/snice-card.js.map +1 -1
- package/dist/components/checkbox/snice-checkbox.d.ts +4 -13
- package/dist/components/checkbox/snice-checkbox.js +66 -137
- package/dist/components/checkbox/snice-checkbox.js.map +1 -1
- package/dist/components/chip/snice-chip.d.ts +5 -11
- package/dist/components/chip/snice-chip.js +44 -47
- package/dist/components/chip/snice-chip.js.map +1 -1
- package/dist/components/color-display/snice-color-display.d.ts +14 -0
- package/dist/components/color-display/snice-color-display.js +151 -0
- package/dist/components/color-display/snice-color-display.js.map +1 -0
- package/dist/components/color-display/snice-color-display.types.d.ts +10 -0
- package/dist/components/color-picker/snice-color-picker.d.ts +50 -0
- package/dist/components/color-picker/snice-color-picker.js +489 -0
- package/dist/components/color-picker/snice-color-picker.js.map +1 -0
- package/dist/components/color-picker/snice-color-picker.types.d.ts +19 -0
- package/dist/components/date-picker/snice-date-picker.d.ts +11 -11
- package/dist/components/date-picker/snice-date-picker.js +134 -133
- package/dist/components/date-picker/snice-date-picker.js.map +1 -1
- package/dist/components/divider/snice-divider.d.ts +2 -4
- package/dist/components/divider/snice-divider.js +14 -22
- package/dist/components/divider/snice-divider.js.map +1 -1
- package/dist/components/drawer/snice-drawer.d.ts +4 -4
- package/dist/components/drawer/snice-drawer.js +25 -19
- package/dist/components/drawer/snice-drawer.js.map +1 -1
- package/dist/components/empty-state/snice-empty-state.d.ts +13 -0
- package/dist/components/empty-state/snice-empty-state.js +121 -0
- package/dist/components/empty-state/snice-empty-state.js.map +1 -0
- package/dist/components/empty-state/snice-empty-state.types.d.ts +9 -0
- package/dist/components/file-upload/snice-file-upload.d.ts +45 -0
- package/dist/components/file-upload/snice-file-upload.js +394 -0
- package/dist/components/file-upload/snice-file-upload.js.map +1 -0
- package/dist/components/file-upload/snice-file-upload.types.d.ts +22 -0
- package/dist/components/image/snice-image.d.ts +22 -0
- package/dist/components/image/snice-image.js +201 -0
- package/dist/components/image/snice-image.js.map +1 -0
- package/dist/components/image/snice-image.types.d.ts +17 -0
- package/dist/components/input/snice-input.d.ts +8 -6
- package/dist/components/input/snice-input.js +122 -105
- package/dist/components/input/snice-input.js.map +1 -1
- package/dist/components/kpi/snice-kpi.d.ts +16 -0
- package/dist/components/kpi/snice-kpi.js +162 -0
- package/dist/components/kpi/snice-kpi.js.map +1 -0
- package/dist/components/kpi/snice-kpi.types.d.ts +12 -0
- package/dist/components/layout/snice-layout-blog.d.ts +4 -4
- package/dist/components/layout/snice-layout-blog.js +21 -19
- 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 +16 -9
- 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 +14 -7
- package/dist/components/layout/snice-layout-centered.js.map +1 -1
- package/dist/components/layout/snice-layout-dashboard.d.ts +5 -5
- package/dist/components/layout/snice-layout-dashboard.js +38 -30
- 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 +17 -10
- package/dist/components/layout/snice-layout-fullscreen.js.map +1 -1
- package/dist/components/layout/snice-layout-landing.d.ts +4 -4
- package/dist/components/layout/snice-layout-landing.js +21 -19
- 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 +17 -6
- package/dist/components/layout/snice-layout-minimal.js.map +1 -1
- package/dist/components/layout/snice-layout-sidebar.d.ts +5 -4
- package/dist/components/layout/snice-layout-sidebar.js +42 -20
- 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 +14 -7
- package/dist/components/layout/snice-layout-split.js.map +1 -1
- package/dist/components/layout/snice-layout.d.ts +4 -4
- package/dist/components/layout/snice-layout.js +16 -10
- package/dist/components/layout/snice-layout.js.map +1 -1
- package/dist/components/link/snice-link.d.ts +13 -0
- package/dist/components/link/snice-link.js +137 -0
- package/dist/components/link/snice-link.js.map +1 -0
- package/dist/components/link/snice-link.types.d.ts +11 -0
- package/dist/components/login/snice-login.d.ts +6 -11
- package/dist/components/login/snice-login.js +97 -71
- package/dist/components/login/snice-login.js.map +1 -1
- package/dist/components/modal/snice-modal.d.ts +5 -9
- package/dist/components/modal/snice-modal.js +47 -78
- package/dist/components/modal/snice-modal.js.map +1 -1
- package/dist/components/nav/snice-nav.d.ts +13 -7
- package/dist/components/nav/snice-nav.js +191 -100
- package/dist/components/nav/snice-nav.js.map +1 -1
- package/dist/components/nav/snice-nav.types.d.ts +3 -3
- package/dist/components/pagination/snice-pagination.d.ts +6 -7
- package/dist/components/pagination/snice-pagination.js +94 -81
- package/dist/components/pagination/snice-pagination.js.map +1 -1
- package/dist/components/progress/snice-progress.d.ts +2 -7
- package/dist/components/progress/snice-progress.js +41 -98
- package/dist/components/progress/snice-progress.js.map +1 -1
- package/dist/components/radio/snice-radio.d.ts +4 -4
- package/dist/components/radio/snice-radio.js +52 -44
- package/dist/components/radio/snice-radio.js.map +1 -1
- package/dist/components/select/snice-option.d.ts +2 -1
- package/dist/components/select/snice-option.js +12 -5
- package/dist/components/select/snice-option.js.map +1 -1
- package/dist/components/select/snice-select.d.ts +9 -21
- package/dist/components/select/snice-select.js +98 -170
- package/dist/components/select/snice-select.js.map +1 -1
- package/dist/components/skeleton/snice-skeleton.d.ts +2 -6
- package/dist/components/skeleton/snice-skeleton.js +18 -49
- package/dist/components/skeleton/snice-skeleton.js.map +1 -1
- package/dist/components/slider/snice-slider.d.ts +53 -0
- package/dist/components/slider/snice-slider.js +479 -0
- package/dist/components/slider/snice-slider.js.map +1 -0
- package/dist/components/slider/snice-slider.types.d.ts +26 -0
- package/dist/components/snice-cell-C0slgOpe.js +4 -0
- package/dist/components/snice-cell-C0slgOpe.js.map +1 -0
- package/dist/components/sparkline/snice-sparkline.d.ts +21 -0
- package/dist/components/sparkline/snice-sparkline.js +228 -0
- package/dist/components/sparkline/snice-sparkline.js.map +1 -0
- package/dist/components/sparkline/snice-sparkline.types.d.ts +16 -0
- package/dist/components/spinner/snice-spinner.d.ts +10 -0
- package/dist/components/spinner/snice-spinner.js +109 -0
- package/dist/components/spinner/snice-spinner.js.map +1 -0
- package/dist/components/spinner/snice-spinner.types.d.ts +8 -0
- package/dist/components/stepper/snice-stepper-panel.d.ts +8 -0
- package/dist/components/stepper/snice-stepper-panel.js +70 -0
- package/dist/components/stepper/snice-stepper-panel.js.map +1 -0
- package/dist/components/stepper/snice-stepper-panel.types.d.ts +4 -0
- package/dist/components/stepper/snice-stepper.d.ts +15 -0
- package/dist/components/stepper/snice-stepper.js +163 -0
- package/dist/components/stepper/snice-stepper.js.map +1 -0
- package/dist/components/stepper/snice-stepper.types.d.ts +13 -0
- package/dist/components/switch/snice-switch.d.ts +2 -2
- package/dist/components/switch/snice-switch.js +38 -26
- package/dist/components/switch/snice-switch.js.map +1 -1
- package/dist/components/table/snice-cell-actions.d.ts +24 -0
- package/dist/components/table/snice-cell-actions.js +149 -0
- package/dist/components/table/snice-cell-actions.js.map +1 -0
- package/dist/components/table/snice-cell-boolean.d.ts +2 -2
- package/dist/components/table/snice-cell-boolean.js +13 -7
- package/dist/components/table/snice-cell-boolean.js.map +1 -1
- package/dist/components/table/snice-cell-color.d.ts +18 -0
- package/dist/components/table/snice-cell-color.js +149 -0
- package/dist/components/table/snice-cell-color.js.map +1 -0
- package/dist/components/table/snice-cell-currency.d.ts +24 -0
- package/dist/components/table/snice-cell-currency.js +235 -0
- package/dist/components/table/snice-cell-currency.js.map +1 -0
- package/dist/components/table/snice-cell-date.d.ts +2 -2
- package/dist/components/table/snice-cell-date.js +14 -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 +12 -6
- package/dist/components/table/snice-cell-duration.js.map +1 -1
- package/dist/components/table/snice-cell-email.d.ts +15 -0
- package/dist/components/table/snice-cell-email.js +125 -0
- package/dist/components/table/snice-cell-email.js.map +1 -0
- package/dist/components/table/snice-cell-filesize.d.ts +2 -2
- package/dist/components/table/snice-cell-filesize.js +12 -6
- package/dist/components/table/snice-cell-filesize.js.map +1 -1
- package/dist/components/table/snice-cell-image.d.ts +20 -0
- package/dist/components/table/snice-cell-image.js +162 -0
- package/dist/components/table/snice-cell-image.js.map +1 -0
- package/dist/components/table/snice-cell-json.d.ts +20 -0
- package/dist/components/table/snice-cell-json.js +186 -0
- package/dist/components/table/snice-cell-json.js.map +1 -0
- package/dist/components/table/snice-cell-link.d.ts +17 -0
- package/dist/components/table/snice-cell-link.js +142 -0
- package/dist/components/table/snice-cell-link.js.map +1 -0
- package/dist/components/table/snice-cell-location.d.ts +19 -0
- package/dist/components/table/snice-cell-location.js +185 -0
- package/dist/components/table/snice-cell-location.js.map +1 -0
- package/dist/components/table/snice-cell-number.d.ts +2 -2
- package/dist/components/table/snice-cell-number.js +12 -6
- package/dist/components/table/snice-cell-number.js.map +1 -1
- package/dist/components/table/snice-cell-percentage.d.ts +22 -0
- package/dist/components/table/snice-cell-percentage.js +208 -0
- package/dist/components/table/snice-cell-percentage.js.map +1 -0
- package/dist/components/table/snice-cell-phone.d.ts +18 -0
- package/dist/components/table/snice-cell-phone.js +153 -0
- package/dist/components/table/snice-cell-phone.js.map +1 -0
- package/dist/components/table/snice-cell-progress.d.ts +2 -2
- package/dist/components/table/snice-cell-progress.js +12 -6
- 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 +12 -6
- 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 +13 -7
- package/dist/components/table/snice-cell-sparkline.js.map +1 -1
- package/dist/components/table/snice-cell-status.d.ts +17 -0
- package/dist/components/table/snice-cell-status.js +144 -0
- package/dist/components/table/snice-cell-status.js.map +1 -0
- package/dist/components/table/snice-cell-tag.d.ts +16 -0
- package/dist/components/table/snice-cell-tag.js +131 -0
- package/dist/components/table/snice-cell-tag.js.map +1 -0
- package/dist/components/table/snice-cell-text.d.ts +2 -2
- package/dist/components/table/snice-cell-text.js +14 -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 +12 -6
- 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 +6 -3
- package/dist/components/table/snice-column.js.map +1 -1
- package/dist/components/table/snice-header.d.ts +5 -5
- package/dist/components/table/snice-header.js +60 -50
- 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 +18 -11
- 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 +15 -8
- package/dist/components/table/snice-rating.js.map +1 -1
- package/dist/components/table/snice-row.d.ts +17 -6
- package/dist/components/table/snice-row.js +95 -44
- package/dist/components/table/snice-row.js.map +1 -1
- package/dist/components/table/snice-table.d.ts +18 -10
- package/dist/components/table/snice-table.js +355 -173
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/table/snice-table.types.d.ts +101 -2
- package/dist/components/tabs/snice-tab-panel.d.ts +2 -2
- package/dist/components/tabs/snice-tab-panel.js +12 -6
- package/dist/components/tabs/snice-tab-panel.js.map +1 -1
- package/dist/components/tabs/snice-tab.d.ts +6 -5
- package/dist/components/tabs/snice-tab.js +36 -19
- package/dist/components/tabs/snice-tab.js.map +1 -1
- package/dist/components/tabs/snice-tabs.d.ts +5 -5
- package/dist/components/tabs/snice-tabs.js +38 -28
- package/dist/components/tabs/snice-tabs.js.map +1 -1
- package/dist/components/textarea/snice-textarea.d.ts +52 -0
- package/dist/components/textarea/snice-textarea.js +407 -0
- package/dist/components/textarea/snice-textarea.js.map +1 -0
- package/dist/components/textarea/snice-textarea.types.d.ts +30 -0
- package/dist/components/timeline/snice-timeline.d.ts +11 -0
- package/dist/components/timeline/snice-timeline.js +112 -0
- package/dist/components/timeline/snice-timeline.js.map +1 -0
- package/dist/components/timeline/snice-timeline.types.d.ts +16 -0
- package/dist/components/toast/snice-toast-container.d.ts +7 -7
- package/dist/components/toast/snice-toast-container.js +19 -12
- package/dist/components/toast/snice-toast-container.js.map +1 -1
- package/dist/components/toast/snice-toast.d.ts +3 -15
- package/dist/components/toast/snice-toast.js +49 -108
- 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 +15 -8
- package/dist/components/tooltip/snice-tooltip.js.map +1 -1
- package/dist/context.d.ts +44 -0
- package/dist/element-ready.d.ts +40 -0
- package/dist/{types/element.d.ts → element.d.ts} +2 -8
- package/dist/{types/events.d.ts → events.d.ts} +0 -4
- package/dist/index.cjs +2556 -605
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.esm.js +2535 -604
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +2556 -605
- package/dist/index.iife.js.map +1 -1
- package/dist/method-decorators.d.ts +121 -0
- package/dist/on.d.ts +59 -0
- package/dist/parts.d.ts +156 -0
- package/dist/render-debug.d.ts +27 -0
- package/dist/render-tracker.d.ts +14 -0
- package/dist/render.d.ts +96 -0
- package/dist/symbols.cjs +163 -0
- package/dist/symbols.cjs.map +1 -1
- package/dist/{types/symbols.d.ts → symbols.d.ts} +22 -0
- package/dist/symbols.esm.js +27 -3
- package/dist/symbols.esm.js.map +1 -1
- package/dist/template.d.ts +99 -0
- package/dist/transitions.cjs +219 -0
- package/dist/transitions.esm.js +2 -2
- package/dist/types/context.d.ts +48 -0
- package/dist/types/element-options.d.ts +26 -0
- package/dist/types/index.d.ts +25 -9
- package/dist/types/nav-context.d.ts +19 -0
- package/dist/types/{types/on-options.d.ts → on-options.d.ts} +2 -0
- package/dist/types/{types/placard.d.ts → placard.d.ts} +0 -1
- package/docs/ai/README.md +26 -0
- package/docs/ai/api.md +175 -0
- package/docs/ai/architecture.md +160 -0
- package/docs/ai/components/accordion.md +174 -0
- package/docs/ai/components/alert.md +77 -0
- package/docs/ai/components/avatar.md +61 -0
- package/docs/ai/components/badge.md +69 -0
- package/docs/ai/components/banner.md +84 -0
- package/docs/ai/components/breadcrumbs.md +74 -0
- package/docs/ai/components/button.md +75 -0
- package/docs/ai/components/card.md +61 -0
- package/docs/ai/components/checkbox.md +74 -0
- package/docs/ai/components/chip.md +73 -0
- package/docs/ai/components/color-display.md +48 -0
- package/docs/ai/components/color-picker.md +75 -0
- package/docs/ai/components/date-picker.md +75 -0
- package/docs/ai/components/divider.md +66 -0
- package/docs/ai/components/drawer.md +80 -0
- package/docs/ai/components/empty-state.md +72 -0
- package/docs/ai/components/file-upload.md +93 -0
- package/docs/ai/components/image.md +60 -0
- package/docs/ai/components/input.md +111 -0
- package/docs/ai/components/kpi.md +158 -0
- package/docs/ai/components/link.md +77 -0
- package/docs/ai/components/login.md +109 -0
- package/docs/ai/components/modal.md +67 -0
- package/docs/ai/components/nav.md +76 -0
- package/docs/ai/components/pagination.md +55 -0
- package/docs/ai/components/progress.md +72 -0
- package/docs/ai/components/radio.md +79 -0
- package/docs/ai/components/select.md +92 -0
- package/docs/ai/components/skeleton.md +57 -0
- package/docs/ai/components/slider.md +87 -0
- package/docs/ai/components/sparkline.md +168 -0
- package/docs/ai/components/spinner.md +47 -0
- package/docs/ai/components/stepper.md +216 -0
- package/docs/ai/components/switch.md +53 -0
- package/docs/ai/components/table.md +227 -0
- package/docs/ai/components/tabs.md +83 -0
- package/docs/ai/components/textarea.md +87 -0
- package/docs/ai/components/timeline.md +77 -0
- package/docs/ai/components/toast.md +140 -0
- package/docs/ai/components/tooltip.md +146 -0
- package/docs/ai/patterns.md +244 -0
- package/docs/components/accordion.md +558 -0
- package/docs/components/banner.md +106 -0
- package/docs/components/color-display.md +96 -0
- package/docs/components/color-picker.md +81 -0
- package/docs/components/drawer.md +602 -0
- package/docs/components/empty-state.md +79 -0
- package/docs/components/file-upload.md +263 -0
- package/docs/components/image.md +110 -0
- package/docs/components/kpi.md +251 -0
- package/docs/components/link.md +229 -0
- package/docs/components/modal.md +558 -0
- package/docs/components/nav.md +239 -0
- package/docs/components/pagination.md +289 -0
- package/docs/components/select.md +599 -0
- package/docs/components/slider.md +297 -0
- package/docs/components/sparkline.md +293 -0
- package/docs/components/spinner.md +63 -0
- package/docs/components/stepper.md +410 -0
- package/docs/components/switch.md +354 -0
- package/docs/components/tabs.md +546 -0
- package/docs/components/textarea.md +235 -0
- package/docs/components/timeline.md +192 -0
- package/docs/components/toast.md +506 -0
- package/docs/components/tooltip.md +523 -0
- package/docs/controllers.md +744 -0
- package/docs/elements.md +855 -0
- package/docs/events.md +807 -0
- package/docs/migration-v2-to-v3.md +569 -0
- package/docs/observe.md +588 -0
- package/docs/placards.md +401 -0
- package/docs/request-response.md +852 -0
- package/docs/routing.md +1186 -0
- package/package.json +11 -11
- package/dist/components/snice-cell-C9N6yGxQ.js +0 -4
- package/dist/components/snice-cell-C9N6yGxQ.js.map +0 -1
- package/dist/types/types/index.d.ts +0 -23
- /package/dist/{types/controller.d.ts → controller.d.ts} +0 -0
- /package/dist/{types/global.d.ts → global.d.ts} +0 -0
- /package/dist/{types/observe.d.ts → observe.d.ts} +0 -0
- /package/dist/{types/request-response.d.ts → request-response.d.ts} +0 -0
- /package/dist/{types/router.d.ts → router.d.ts} +0 -0
- /package/dist/{types/testing.d.ts → testing.d.ts} +0 -0
- /package/dist/{types/transitions.d.ts → transitions.d.ts} +0 -0
- /package/dist/types/{types/adopted-options.d.ts → adopted-options.d.ts} +0 -0
- /package/dist/types/{types/app-context.d.ts → app-context.d.ts} +0 -0
- /package/dist/types/{types/dispatch-options.d.ts → dispatch-options.d.ts} +0 -0
- /package/dist/types/{types/guard.d.ts → guard.d.ts} +0 -0
- /package/dist/types/{types/i-controller.d.ts → i-controller.d.ts} +0 -0
- /package/dist/types/{types/moved-options.d.ts → moved-options.d.ts} +0 -0
- /package/dist/types/{types/observe-options.d.ts → observe-options.d.ts} +0 -0
- /package/dist/types/{types/page-options.d.ts → page-options.d.ts} +0 -0
- /package/dist/types/{types/part-options.d.ts → part-options.d.ts} +0 -0
- /package/dist/types/{types/property-converter.d.ts → property-converter.d.ts} +0 -0
- /package/dist/types/{types/property-options.d.ts → property-options.d.ts} +0 -0
- /package/dist/types/{types/query-options.d.ts → query-options.d.ts} +0 -0
- /package/dist/types/{types/request-options.d.ts → request-options.d.ts} +0 -0
- /package/dist/types/{types/respond-options.d.ts → respond-options.d.ts} +0 -0
- /package/dist/types/{types/route-params.d.ts → route-params.d.ts} +0 -0
- /package/dist/types/{types/router-instance.d.ts → router-instance.d.ts} +0 -0
- /package/dist/types/{types/router-options.d.ts → router-options.d.ts} +0 -0
- /package/dist/types/{types/simple-array.d.ts → simple-array.d.ts} +0 -0
- /package/dist/types/{types/snice-element.d.ts → snice-element.d.ts} +0 -0
- /package/dist/types/{types/snice-global.d.ts → snice-global.d.ts} +0 -0
- /package/dist/types/{types/transition.d.ts → transition.d.ts} +0 -0
- /package/dist/{types/utils.d.ts → utils.d.ts} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# snice-badge
|
|
2
|
+
|
|
3
|
+
Notification indicators and status markers.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
content: string = '';
|
|
9
|
+
count: number = 0;
|
|
10
|
+
max: number = 99;
|
|
11
|
+
dot: boolean = false;
|
|
12
|
+
variant: 'default'|'primary'|'success'|'warning'|'error'|'info' = 'default';
|
|
13
|
+
position: 'top-right'|'top-left'|'bottom-right'|'bottom-left' = 'top-right';
|
|
14
|
+
inline: boolean = false;
|
|
15
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
16
|
+
pulse: boolean = false;
|
|
17
|
+
offset: number = 0;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Basic -->
|
|
24
|
+
<snice-badge content="New"></snice-badge>
|
|
25
|
+
|
|
26
|
+
<!-- Count badge -->
|
|
27
|
+
<snice-badge count="5"></snice-badge>
|
|
28
|
+
|
|
29
|
+
<!-- Max count (99+) -->
|
|
30
|
+
<snice-badge count="150" max="99"></snice-badge>
|
|
31
|
+
|
|
32
|
+
<!-- Dot indicator -->
|
|
33
|
+
<snice-badge dot></snice-badge>
|
|
34
|
+
|
|
35
|
+
<!-- On element -->
|
|
36
|
+
<div style="position: relative; display: inline-block;">
|
|
37
|
+
<button>Messages</button>
|
|
38
|
+
<snice-badge count="3" variant="error"></snice-badge>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<!-- Variants -->
|
|
42
|
+
<snice-badge content="New" variant="primary"></snice-badge>
|
|
43
|
+
<snice-badge content="✓" variant="success"></snice-badge>
|
|
44
|
+
<snice-badge content="!" variant="warning"></snice-badge>
|
|
45
|
+
<snice-badge content="×" variant="error"></snice-badge>
|
|
46
|
+
<snice-badge content="i" variant="info"></snice-badge>
|
|
47
|
+
|
|
48
|
+
<!-- Positions -->
|
|
49
|
+
<snice-badge count="5" position="top-right"></snice-badge>
|
|
50
|
+
<snice-badge count="5" position="top-left"></snice-badge>
|
|
51
|
+
<snice-badge count="5" position="bottom-right"></snice-badge>
|
|
52
|
+
<snice-badge count="5" position="bottom-left"></snice-badge>
|
|
53
|
+
|
|
54
|
+
<!-- Inline -->
|
|
55
|
+
<p>Status <snice-badge inline content="Active"></snice-badge></p>
|
|
56
|
+
|
|
57
|
+
<!-- Pulse animation -->
|
|
58
|
+
<snice-badge dot pulse variant="error"></snice-badge>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- 6 color variants
|
|
64
|
+
- Count with max limit (shows 99+ style)
|
|
65
|
+
- Dot mode for indicators
|
|
66
|
+
- 4 positioning options
|
|
67
|
+
- Inline or positioned
|
|
68
|
+
- Pulse animation
|
|
69
|
+
- Custom offset
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# snice-banner
|
|
2
|
+
|
|
3
|
+
Fixed position notification banner.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
variant: 'info'|'success'|'warning'|'error' = 'info';
|
|
9
|
+
position: 'top'|'bottom' = 'top';
|
|
10
|
+
message: string = '';
|
|
11
|
+
dismissible: boolean = true;
|
|
12
|
+
icon: string = '';
|
|
13
|
+
actionText: string = '';
|
|
14
|
+
open: boolean = false;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Methods
|
|
18
|
+
|
|
19
|
+
- `show()` - Show banner
|
|
20
|
+
- `hide()` - Hide banner
|
|
21
|
+
- `toggle()` - Toggle banner
|
|
22
|
+
|
|
23
|
+
## Events
|
|
24
|
+
|
|
25
|
+
- `open` - {banner}
|
|
26
|
+
- `close` - {banner}
|
|
27
|
+
- `action` - {banner}
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<!-- Basic -->
|
|
33
|
+
<snice-banner message="This is an info message" open></snice-banner>
|
|
34
|
+
|
|
35
|
+
<!-- Variants -->
|
|
36
|
+
<snice-banner variant="info" message="Info"></snice-banner>
|
|
37
|
+
<snice-banner variant="success" message="Success"></snice-banner>
|
|
38
|
+
<snice-banner variant="warning" message="Warning"></snice-banner>
|
|
39
|
+
<snice-banner variant="error" message="Error"></snice-banner>
|
|
40
|
+
|
|
41
|
+
<!-- Position -->
|
|
42
|
+
<snice-banner position="top" message="Top banner" open></snice-banner>
|
|
43
|
+
<snice-banner position="bottom" message="Bottom banner" open></snice-banner>
|
|
44
|
+
|
|
45
|
+
<!-- With action -->
|
|
46
|
+
<snice-banner
|
|
47
|
+
message="Update available"
|
|
48
|
+
action-text="Update Now"
|
|
49
|
+
open
|
|
50
|
+
></snice-banner>
|
|
51
|
+
|
|
52
|
+
<!-- Not dismissible -->
|
|
53
|
+
<snice-banner
|
|
54
|
+
message="Important notice"
|
|
55
|
+
dismissible="false"
|
|
56
|
+
open
|
|
57
|
+
></snice-banner>
|
|
58
|
+
|
|
59
|
+
<!-- Custom icon -->
|
|
60
|
+
<snice-banner
|
|
61
|
+
icon="🎉"
|
|
62
|
+
message="Celebration!"
|
|
63
|
+
open
|
|
64
|
+
></snice-banner>
|
|
65
|
+
|
|
66
|
+
<!-- API -->
|
|
67
|
+
<snice-banner id="banner" message="Hello"></snice-banner>
|
|
68
|
+
<script>
|
|
69
|
+
const banner = document.querySelector('#banner');
|
|
70
|
+
banner.show();
|
|
71
|
+
banner.hide();
|
|
72
|
+
banner.toggle();
|
|
73
|
+
</script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Features
|
|
77
|
+
|
|
78
|
+
- 4 variants (info, success, warning, error)
|
|
79
|
+
- Top or bottom positioning
|
|
80
|
+
- Dismissible with close button
|
|
81
|
+
- Optional action button
|
|
82
|
+
- Smooth slide animation
|
|
83
|
+
- Fixed positioning
|
|
84
|
+
- Accessible (role=alert)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# snice-breadcrumbs & snice-crumb
|
|
2
|
+
|
|
3
|
+
Navigation breadcrumb trail.
|
|
4
|
+
|
|
5
|
+
## snice-breadcrumbs
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
items: BreadcrumbItem[] = [];
|
|
9
|
+
separator: '/'|'>'|'»'|'•'|'|' = '/';
|
|
10
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
11
|
+
maxItems: number = 0; // 0 = show all
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Methods:**
|
|
15
|
+
- `setItems(items)` - Update breadcrumb items
|
|
16
|
+
|
|
17
|
+
**BreadcrumbItem:**
|
|
18
|
+
```typescript
|
|
19
|
+
interface BreadcrumbItem {
|
|
20
|
+
label: string;
|
|
21
|
+
href?: string;
|
|
22
|
+
icon?: string;
|
|
23
|
+
iconImage?: string;
|
|
24
|
+
active?: boolean;
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<!-- Basic -->
|
|
32
|
+
<snice-breadcrumbs></snice-breadcrumbs>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
const breadcrumbs = document.querySelector('snice-breadcrumbs');
|
|
36
|
+
breadcrumbs.items = [
|
|
37
|
+
{ label: 'Home', href: '/' },
|
|
38
|
+
{ label: 'Products', href: '/products' },
|
|
39
|
+
{ label: 'Laptop', active: true }
|
|
40
|
+
];
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<!-- Or use crumb elements -->
|
|
44
|
+
<snice-breadcrumbs>
|
|
45
|
+
<snice-crumb href="/" label="Home"></snice-crumb>
|
|
46
|
+
<snice-crumb href="/products" label="Products"></snice-crumb>
|
|
47
|
+
<snice-crumb label="Laptop" active></snice-crumb>
|
|
48
|
+
</snice-breadcrumbs>
|
|
49
|
+
|
|
50
|
+
<!-- Custom separator -->
|
|
51
|
+
<snice-breadcrumbs separator=">"></snice-breadcrumbs>
|
|
52
|
+
|
|
53
|
+
<!-- With icons -->
|
|
54
|
+
<snice-breadcrumbs></snice-breadcrumbs>
|
|
55
|
+
<script>
|
|
56
|
+
breadcrumbs.items = [
|
|
57
|
+
{ label: 'Home', href: '/', icon: '🏠' },
|
|
58
|
+
{ label: 'Products', href: '/products', icon: '📦' }
|
|
59
|
+
];
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<!-- Max items (collapse middle) -->
|
|
63
|
+
<snice-breadcrumbs max-items="3"></snice-breadcrumbs>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- Item array or crumb elements
|
|
69
|
+
- 5 separator options
|
|
70
|
+
- 3 sizes
|
|
71
|
+
- Max items with collapse
|
|
72
|
+
- Icons support
|
|
73
|
+
- Active state
|
|
74
|
+
- Accessible: nav role, aria-label
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# snice-button
|
|
2
|
+
|
|
3
|
+
Interactive button with variants and states.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
variant: 'default'|'primary'|'success'|'warning'|'danger'|'text' = 'default';
|
|
9
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
10
|
+
disabled: boolean = false;
|
|
11
|
+
loading: boolean = false;
|
|
12
|
+
outline: boolean = false;
|
|
13
|
+
pill: boolean = false;
|
|
14
|
+
circle: boolean = false;
|
|
15
|
+
href: string = '';
|
|
16
|
+
target: string = '';
|
|
17
|
+
download: string = '';
|
|
18
|
+
icon: string = '';
|
|
19
|
+
iconPlacement: 'start'|'end' = 'start';
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
- `focus(options?)` - Focus button
|
|
25
|
+
- `blur()` - Blur button
|
|
26
|
+
- `click()` - Programmatic click
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```html
|
|
31
|
+
<!-- Basic -->
|
|
32
|
+
<snice-button>Click me</snice-button>
|
|
33
|
+
|
|
34
|
+
<!-- Variants -->
|
|
35
|
+
<snice-button variant="primary">Primary</snice-button>
|
|
36
|
+
<snice-button variant="success">Success</snice-button>
|
|
37
|
+
<snice-button variant="warning">Warning</snice-button>
|
|
38
|
+
<snice-button variant="danger">Danger</snice-button>
|
|
39
|
+
<snice-button variant="text">Text</snice-button>
|
|
40
|
+
|
|
41
|
+
<!-- Sizes -->
|
|
42
|
+
<snice-button size="small">Small</snice-button>
|
|
43
|
+
<snice-button size="medium">Medium</snice-button>
|
|
44
|
+
<snice-button size="large">Large</snice-button>
|
|
45
|
+
|
|
46
|
+
<!-- States -->
|
|
47
|
+
<snice-button disabled>Disabled</snice-button>
|
|
48
|
+
<snice-button loading>Loading...</snice-button>
|
|
49
|
+
|
|
50
|
+
<!-- Styles -->
|
|
51
|
+
<snice-button outline>Outline</snice-button>
|
|
52
|
+
<snice-button pill>Pill</snice-button>
|
|
53
|
+
<snice-button circle icon="×"></snice-button>
|
|
54
|
+
|
|
55
|
+
<!-- With icon -->
|
|
56
|
+
<snice-button icon="→">Next</snice-button>
|
|
57
|
+
<snice-button icon="←" icon-placement="start">Back</snice-button>
|
|
58
|
+
|
|
59
|
+
<!-- As link -->
|
|
60
|
+
<snice-button href="/page">Link</snice-button>
|
|
61
|
+
<snice-button href="/file.pdf" download>Download</snice-button>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- 6 color variants
|
|
67
|
+
- 3 sizes
|
|
68
|
+
- Outline style
|
|
69
|
+
- Pill (rounded) shape
|
|
70
|
+
- Circle (icon only) shape
|
|
71
|
+
- Loading state with spinner
|
|
72
|
+
- Disabled state
|
|
73
|
+
- Link mode (href)
|
|
74
|
+
- Icon support with placement
|
|
75
|
+
- Download attribute support
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# snice-card
|
|
2
|
+
|
|
3
|
+
Container for grouped content.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
variant: 'elevated'|'bordered'|'flat' = 'elevated';
|
|
9
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
10
|
+
clickable: boolean = false;
|
|
11
|
+
selected: boolean = false;
|
|
12
|
+
disabled: boolean = false;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Slots
|
|
16
|
+
|
|
17
|
+
- `header` - Card header
|
|
18
|
+
- `footer` - Card footer
|
|
19
|
+
- default - Card body content
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<!-- Basic -->
|
|
25
|
+
<snice-card>
|
|
26
|
+
<p>Card content</p>
|
|
27
|
+
</snice-card>
|
|
28
|
+
|
|
29
|
+
<!-- With header and footer -->
|
|
30
|
+
<snice-card>
|
|
31
|
+
<div slot="header">Card Title</div>
|
|
32
|
+
<p>Card body content</p>
|
|
33
|
+
<div slot="footer">
|
|
34
|
+
<button>Action</button>
|
|
35
|
+
</div>
|
|
36
|
+
</snice-card>
|
|
37
|
+
|
|
38
|
+
<!-- Variants -->
|
|
39
|
+
<snice-card variant="elevated">Elevated (shadow)</snice-card>
|
|
40
|
+
<snice-card variant="bordered">Bordered</snice-card>
|
|
41
|
+
<snice-card variant="flat">Flat</snice-card>
|
|
42
|
+
|
|
43
|
+
<!-- Sizes -->
|
|
44
|
+
<snice-card size="small">Small padding</snice-card>
|
|
45
|
+
<snice-card size="medium">Medium padding</snice-card>
|
|
46
|
+
<snice-card size="large">Large padding</snice-card>
|
|
47
|
+
|
|
48
|
+
<!-- Interactive -->
|
|
49
|
+
<snice-card clickable>Click me</snice-card>
|
|
50
|
+
<snice-card clickable selected>Selected</snice-card>
|
|
51
|
+
<snice-card clickable disabled>Disabled</snice-card>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Features
|
|
55
|
+
|
|
56
|
+
- 3 style variants (elevated/bordered/flat)
|
|
57
|
+
- 3 size options for padding
|
|
58
|
+
- Clickable with hover/focus states
|
|
59
|
+
- Selected state
|
|
60
|
+
- Disabled state
|
|
61
|
+
- Header/footer slots
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# snice-checkbox
|
|
2
|
+
|
|
3
|
+
Form checkbox input with indeterminate state.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
checked: boolean = false;
|
|
9
|
+
indeterminate: boolean = false;
|
|
10
|
+
disabled: boolean = false;
|
|
11
|
+
required: boolean = false;
|
|
12
|
+
invalid: boolean = false;
|
|
13
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
14
|
+
name: string = '';
|
|
15
|
+
value: string = 'on';
|
|
16
|
+
label: string = '';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
- `focus()` - Focus checkbox
|
|
22
|
+
- `blur()` - Blur checkbox
|
|
23
|
+
- `click()` - Programmatic click
|
|
24
|
+
|
|
25
|
+
## Events
|
|
26
|
+
|
|
27
|
+
- `change` - {checked, indeterminate, checkbox}
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<!-- Basic -->
|
|
33
|
+
<snice-checkbox label="Accept terms"></snice-checkbox>
|
|
34
|
+
|
|
35
|
+
<!-- Checked -->
|
|
36
|
+
<snice-checkbox label="Enabled" checked></snice-checkbox>
|
|
37
|
+
|
|
38
|
+
<!-- Indeterminate (partial selection) -->
|
|
39
|
+
<snice-checkbox label="Select all" indeterminate></snice-checkbox>
|
|
40
|
+
|
|
41
|
+
<!-- Disabled -->
|
|
42
|
+
<snice-checkbox label="Disabled" disabled></snice-checkbox>
|
|
43
|
+
|
|
44
|
+
<!-- Required -->
|
|
45
|
+
<snice-checkbox label="Required" required></snice-checkbox>
|
|
46
|
+
|
|
47
|
+
<!-- Invalid -->
|
|
48
|
+
<snice-checkbox label="Invalid" invalid></snice-checkbox>
|
|
49
|
+
|
|
50
|
+
<!-- Sizes -->
|
|
51
|
+
<snice-checkbox label="Small" size="small"></snice-checkbox>
|
|
52
|
+
<snice-checkbox label="Medium" size="medium"></snice-checkbox>
|
|
53
|
+
<snice-checkbox label="Large" size="large"></snice-checkbox>
|
|
54
|
+
|
|
55
|
+
<!-- Form integration -->
|
|
56
|
+
<snice-checkbox name="newsletter" value="yes" label="Subscribe"></snice-checkbox>
|
|
57
|
+
|
|
58
|
+
<!-- Event handling -->
|
|
59
|
+
<snice-checkbox id="cb"></snice-checkbox>
|
|
60
|
+
<script>
|
|
61
|
+
document.querySelector('#cb').addEventListener('change', (e) => {
|
|
62
|
+
console.log('Checked:', e.detail.checked);
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
- Form-associated custom element
|
|
70
|
+
- Indeterminate state
|
|
71
|
+
- 3 sizes
|
|
72
|
+
- Keyboard accessible
|
|
73
|
+
- Change events
|
|
74
|
+
- Invalid state styling
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# snice-chip
|
|
2
|
+
|
|
3
|
+
Compact element for tags, filters, or selections.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
label: string = '';
|
|
9
|
+
variant: 'default'|'primary'|'success'|'warning'|'error'|'info' = 'default';
|
|
10
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
11
|
+
removable: boolean = false;
|
|
12
|
+
selected: boolean = false;
|
|
13
|
+
disabled: boolean = false;
|
|
14
|
+
icon: string = '';
|
|
15
|
+
avatar: string = '';
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Events
|
|
19
|
+
|
|
20
|
+
- `click` - Chip clicked
|
|
21
|
+
- `remove` - Remove button clicked
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
```html
|
|
26
|
+
<!-- Basic -->
|
|
27
|
+
<snice-chip label="Tag"></snice-chip>
|
|
28
|
+
|
|
29
|
+
<!-- Variants -->
|
|
30
|
+
<snice-chip label="Default" variant="default"></snice-chip>
|
|
31
|
+
<snice-chip label="Primary" variant="primary"></snice-chip>
|
|
32
|
+
<snice-chip label="Success" variant="success"></snice-chip>
|
|
33
|
+
<snice-chip label="Warning" variant="warning"></snice-chip>
|
|
34
|
+
<snice-chip label="Error" variant="error"></snice-chip>
|
|
35
|
+
<snice-chip label="Info" variant="info"></snice-chip>
|
|
36
|
+
|
|
37
|
+
<!-- Removable -->
|
|
38
|
+
<snice-chip label="Removable" removable></snice-chip>
|
|
39
|
+
|
|
40
|
+
<!-- Selected state -->
|
|
41
|
+
<snice-chip label="Selected" selected></snice-chip>
|
|
42
|
+
|
|
43
|
+
<!-- Disabled -->
|
|
44
|
+
<snice-chip label="Disabled" disabled></snice-chip>
|
|
45
|
+
|
|
46
|
+
<!-- With icon -->
|
|
47
|
+
<snice-chip label="Favorite" icon="★"></snice-chip>
|
|
48
|
+
|
|
49
|
+
<!-- With avatar -->
|
|
50
|
+
<snice-chip label="John Doe" avatar="/user.jpg"></snice-chip>
|
|
51
|
+
|
|
52
|
+
<!-- Sizes -->
|
|
53
|
+
<snice-chip label="Small" size="small"></snice-chip>
|
|
54
|
+
<snice-chip label="Medium" size="medium"></snice-chip>
|
|
55
|
+
<snice-chip label="Large" size="large"></snice-chip>
|
|
56
|
+
|
|
57
|
+
<!-- Events -->
|
|
58
|
+
<snice-chip id="chip" label="Click me" removable></snice-chip>
|
|
59
|
+
<script>
|
|
60
|
+
const chip = document.querySelector('#chip');
|
|
61
|
+
chip.addEventListener('click', () => console.log('Clicked'));
|
|
62
|
+
chip.addEventListener('remove', () => chip.remove());
|
|
63
|
+
</script>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- 6 color variants
|
|
69
|
+
- 3 sizes
|
|
70
|
+
- Removable with X button
|
|
71
|
+
- Selected state
|
|
72
|
+
- Icon or avatar
|
|
73
|
+
- Click and remove events
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# snice-color-display
|
|
2
|
+
|
|
3
|
+
Displays colors with swatch and label.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
value: string = '';
|
|
9
|
+
format: 'hex'|'rgb'|'hsl' = 'hex';
|
|
10
|
+
showSwatch: boolean = true;
|
|
11
|
+
showLabel: boolean = true;
|
|
12
|
+
swatchSize: 'small'|'medium'|'large' = 'medium';
|
|
13
|
+
label: string = '';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<!-- Basic -->
|
|
20
|
+
<snice-color-display value="#3b82f6"></snice-color-display>
|
|
21
|
+
|
|
22
|
+
<!-- Formats -->
|
|
23
|
+
<snice-color-display value="#ff0000" format="hex"></snice-color-display>
|
|
24
|
+
<snice-color-display value="#ff0000" format="rgb"></snice-color-display>
|
|
25
|
+
<snice-color-display value="#ff0000" format="hsl"></snice-color-display>
|
|
26
|
+
|
|
27
|
+
<!-- Sizes -->
|
|
28
|
+
<snice-color-display value="#10b981" swatch-size="small"></snice-color-display>
|
|
29
|
+
<snice-color-display value="#10b981" swatch-size="medium"></snice-color-display>
|
|
30
|
+
<snice-color-display value="#10b981" swatch-size="large"></snice-color-display>
|
|
31
|
+
|
|
32
|
+
<!-- Custom label -->
|
|
33
|
+
<snice-color-display value="#ef4444" label="Error Red"></snice-color-display>
|
|
34
|
+
|
|
35
|
+
<!-- Swatch only -->
|
|
36
|
+
<snice-color-display value="#3b82f6" show-label="false"></snice-color-display>
|
|
37
|
+
|
|
38
|
+
<!-- Label only -->
|
|
39
|
+
<snice-color-display value="#3b82f6" show-swatch="false"></snice-color-display>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- Auto-converts hex to RGB/HSL
|
|
45
|
+
- 3 swatch sizes (16px, 24px, 32px)
|
|
46
|
+
- Custom labels supported
|
|
47
|
+
- Swatch and label toggle
|
|
48
|
+
- Monospace font for color values
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# snice-color-picker
|
|
2
|
+
|
|
3
|
+
Color picker with format conversion and presets.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
value: string = '#000000';
|
|
9
|
+
format: 'hex'|'rgb'|'hsl' = 'hex';
|
|
10
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
11
|
+
label: string = '';
|
|
12
|
+
helperText: string = '';
|
|
13
|
+
errorText: string = '';
|
|
14
|
+
disabled: boolean = false;
|
|
15
|
+
required: boolean = false;
|
|
16
|
+
invalid: boolean = false;
|
|
17
|
+
name: string = '';
|
|
18
|
+
showInput: boolean = true;
|
|
19
|
+
showPresets: boolean = false;
|
|
20
|
+
presets: string[] = [...];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
- `focus()` - Focus picker
|
|
26
|
+
- `blur()` - Blur picker
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
- `input` - {value, colorPicker}
|
|
31
|
+
- `change` - {value, colorPicker}
|
|
32
|
+
- `focus` - {colorPicker}
|
|
33
|
+
- `blur` - {colorPicker}
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<!-- Basic -->
|
|
39
|
+
<snice-color-picker label="Color" value="#ff0000"></snice-color-picker>
|
|
40
|
+
|
|
41
|
+
<!-- Formats -->
|
|
42
|
+
<snice-color-picker format="hex"></snice-color-picker>
|
|
43
|
+
<snice-color-picker format="rgb"></snice-color-picker>
|
|
44
|
+
<snice-color-picker format="hsl"></snice-color-picker>
|
|
45
|
+
|
|
46
|
+
<!-- With presets -->
|
|
47
|
+
<snice-color-picker show-presets></snice-color-picker>
|
|
48
|
+
|
|
49
|
+
<!-- No input -->
|
|
50
|
+
<snice-color-picker show-input="false"></snice-color-picker>
|
|
51
|
+
|
|
52
|
+
<!-- Sizes -->
|
|
53
|
+
<snice-color-picker size="small"></snice-color-picker>
|
|
54
|
+
<snice-color-picker size="medium"></snice-color-picker>
|
|
55
|
+
<snice-color-picker size="large"></snice-color-picker>
|
|
56
|
+
|
|
57
|
+
<!-- Events -->
|
|
58
|
+
<snice-color-picker id="picker"></snice-color-picker>
|
|
59
|
+
<script>
|
|
60
|
+
const picker = document.querySelector('#picker');
|
|
61
|
+
picker.addEventListener('@snice/color-picker-change', (e) => {
|
|
62
|
+
console.log('Color:', e.detail.value);
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Features
|
|
68
|
+
|
|
69
|
+
- Form-associated custom element
|
|
70
|
+
- Native color picker integration
|
|
71
|
+
- 3 color formats (hex, rgb, hsl)
|
|
72
|
+
- Format conversion
|
|
73
|
+
- Color presets
|
|
74
|
+
- 3 sizes
|
|
75
|
+
- Accessible
|