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,75 @@
|
|
|
1
|
+
# snice-date-picker
|
|
2
|
+
|
|
3
|
+
Calendar-based date input with format options and validation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
value: string = '';
|
|
9
|
+
format: 'YYYY-MM-DD'|'DD/MM/YYYY'|'MM/DD/YYYY'|'DD.MM.YYYY'|'YYYY/MM/DD'|'DD-MM-YYYY'|'MM-DD-YYYY' = 'YYYY-MM-DD';
|
|
10
|
+
placeholder: string = '';
|
|
11
|
+
disabled: boolean = false;
|
|
12
|
+
required: boolean = false;
|
|
13
|
+
invalid: boolean = false;
|
|
14
|
+
readonly: boolean = false;
|
|
15
|
+
clearable: boolean = true;
|
|
16
|
+
minDate: string = '';
|
|
17
|
+
maxDate: string = '';
|
|
18
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
19
|
+
name: string = '';
|
|
20
|
+
label: string = '';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
- `focus()` - Focus input
|
|
26
|
+
- `blur()` - Blur input
|
|
27
|
+
- `clear()` - Clear value
|
|
28
|
+
- `showCalendar()` - Open calendar
|
|
29
|
+
- `hideCalendar()` - Close calendar
|
|
30
|
+
|
|
31
|
+
## Events
|
|
32
|
+
|
|
33
|
+
- `change` - {value, datePicker}
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<!-- Basic -->
|
|
39
|
+
<snice-date-picker label="Select date"></snice-date-picker>
|
|
40
|
+
|
|
41
|
+
<!-- With format -->
|
|
42
|
+
<snice-date-picker format="DD/MM/YYYY"></snice-date-picker>
|
|
43
|
+
|
|
44
|
+
<!-- With min/max -->
|
|
45
|
+
<snice-date-picker min-date="2024-01-01" max-date="2024-12-31"></snice-date-picker>
|
|
46
|
+
|
|
47
|
+
<!-- Clearable -->
|
|
48
|
+
<snice-date-picker value="2024-03-15" clearable></snice-date-picker>
|
|
49
|
+
|
|
50
|
+
<!-- Disabled/readonly -->
|
|
51
|
+
<snice-date-picker disabled></snice-date-picker>
|
|
52
|
+
<snice-date-picker readonly></snice-date-picker>
|
|
53
|
+
|
|
54
|
+
<!-- Form integration -->
|
|
55
|
+
<snice-date-picker name="birthdate" required></snice-date-picker>
|
|
56
|
+
|
|
57
|
+
<!-- Event handling -->
|
|
58
|
+
<snice-date-picker id="dp"></snice-date-picker>
|
|
59
|
+
<script>
|
|
60
|
+
document.querySelector('#dp').addEventListener('change', (e) => {
|
|
61
|
+
console.log('Date:', e.detail.value);
|
|
62
|
+
});
|
|
63
|
+
</script>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- Form-associated custom element
|
|
69
|
+
- Calendar popup with month/year navigation
|
|
70
|
+
- 7 date format options
|
|
71
|
+
- Min/max date validation
|
|
72
|
+
- Clearable with X button
|
|
73
|
+
- 3 sizes
|
|
74
|
+
- Keyboard accessible
|
|
75
|
+
- Invalid state styling
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# snice-divider
|
|
2
|
+
|
|
3
|
+
Separator line with optional text.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
orientation: 'horizontal'|'vertical' = 'horizontal';
|
|
9
|
+
variant: 'solid'|'dashed'|'dotted' = 'solid';
|
|
10
|
+
spacing: 'none'|'small'|'medium'|'large' = 'medium';
|
|
11
|
+
align: 'start'|'center'|'end' = 'center';
|
|
12
|
+
text: string = '';
|
|
13
|
+
textBackground: string = '';
|
|
14
|
+
color: string = '';
|
|
15
|
+
capped: boolean = false;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```html
|
|
21
|
+
<!-- Basic -->
|
|
22
|
+
<snice-divider></snice-divider>
|
|
23
|
+
|
|
24
|
+
<!-- With text -->
|
|
25
|
+
<snice-divider text="OR"></snice-divider>
|
|
26
|
+
|
|
27
|
+
<!-- Text alignment -->
|
|
28
|
+
<snice-divider text="Start" align="start"></snice-divider>
|
|
29
|
+
<snice-divider text="Center" align="center"></snice-divider>
|
|
30
|
+
<snice-divider text="End" align="end"></snice-divider>
|
|
31
|
+
|
|
32
|
+
<!-- Variants -->
|
|
33
|
+
<snice-divider variant="solid"></snice-divider>
|
|
34
|
+
<snice-divider variant="dashed"></snice-divider>
|
|
35
|
+
<snice-divider variant="dotted"></snice-divider>
|
|
36
|
+
|
|
37
|
+
<!-- Spacing -->
|
|
38
|
+
<snice-divider spacing="none"></snice-divider>
|
|
39
|
+
<snice-divider spacing="small"></snice-divider>
|
|
40
|
+
<snice-divider spacing="medium"></snice-divider>
|
|
41
|
+
<snice-divider spacing="large"></snice-divider>
|
|
42
|
+
|
|
43
|
+
<!-- Vertical -->
|
|
44
|
+
<div style="display: flex; height: 50px;">
|
|
45
|
+
<span>Left</span>
|
|
46
|
+
<snice-divider orientation="vertical"></snice-divider>
|
|
47
|
+
<span>Right</span>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- Custom color -->
|
|
51
|
+
<snice-divider color="#3b82f6"></snice-divider>
|
|
52
|
+
|
|
53
|
+
<!-- Capped (rounded ends) -->
|
|
54
|
+
<snice-divider capped></snice-divider>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Features
|
|
58
|
+
|
|
59
|
+
- Horizontal or vertical
|
|
60
|
+
- 3 line styles (solid/dashed/dotted)
|
|
61
|
+
- Optional text label
|
|
62
|
+
- Text alignment (start/center/end)
|
|
63
|
+
- 4 spacing options
|
|
64
|
+
- Custom color
|
|
65
|
+
- Capped ends
|
|
66
|
+
- Custom text background
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# snice-drawer
|
|
2
|
+
|
|
3
|
+
Slide-out panel from any viewport side with focus trap and dismissal options.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
open: boolean = false; // Visibility state
|
|
9
|
+
position: 'left'|'right'|'top'|'bottom' = 'left';
|
|
10
|
+
size: 'small'|'medium'|'large'|'xl'|'xxl'|'xxxl'|'full' = 'medium';
|
|
11
|
+
noBackdrop: boolean = false; // Hide backdrop overlay
|
|
12
|
+
noBackdropDismiss: boolean = false; // Prevent backdrop click close
|
|
13
|
+
noEscapeDismiss: boolean = false; // Prevent Escape key close
|
|
14
|
+
noFocusTrap: boolean = false; // Disable focus trapping
|
|
15
|
+
persistent: boolean = false; // Hide close button, prevent all dismiss
|
|
16
|
+
pushContent: boolean = false; // Push main content instead of overlay
|
|
17
|
+
contained: boolean = false; // Position relative to parent
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
show() // Open drawer
|
|
24
|
+
hide() // Close drawer
|
|
25
|
+
toggle() // Toggle drawer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Events
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
'@snice/drawer-open' // { drawer }
|
|
32
|
+
'@snice/drawer-close' // { drawer }
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Slots
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<snice-drawer>
|
|
39
|
+
<h2 slot="title">Title</h2>
|
|
40
|
+
<div>Body content</div>
|
|
41
|
+
<div slot="footer">Actions</div>
|
|
42
|
+
</snice-drawer>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Usage
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<snice-drawer id="menu" position="left">
|
|
49
|
+
<h2 slot="title">Menu</h2>
|
|
50
|
+
<nav>
|
|
51
|
+
<a href="/">Home</a>
|
|
52
|
+
<a href="/about">About</a>
|
|
53
|
+
</nav>
|
|
54
|
+
</snice-drawer>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
const drawer = document.querySelector('snice-drawer');
|
|
59
|
+
drawer.show();
|
|
60
|
+
drawer.hide();
|
|
61
|
+
drawer.toggle();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
- Slides from any edge (left, right, top, bottom)
|
|
67
|
+
- Multiple size options
|
|
68
|
+
- Focus trap with Tab navigation
|
|
69
|
+
- Focus restoration on close
|
|
70
|
+
- Backdrop click to close
|
|
71
|
+
- Escape key to close
|
|
72
|
+
- Push content mode
|
|
73
|
+
- Persistent mode (no close button)
|
|
74
|
+
- ARIA attributes (role, aria-modal, aria-hidden)
|
|
75
|
+
|
|
76
|
+
## Notes
|
|
77
|
+
|
|
78
|
+
- Push content targets first `<main>` or `<body>`
|
|
79
|
+
- Contained mode positions relative to parent
|
|
80
|
+
- Default dismissal: close button, backdrop click, Escape key
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# snice-empty-state
|
|
2
|
+
|
|
3
|
+
Empty state placeholder for no data scenarios.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
9
|
+
icon: string = '📭';
|
|
10
|
+
title: string = 'No data';
|
|
11
|
+
description: string = '';
|
|
12
|
+
actionText: string = '';
|
|
13
|
+
actionHref: string = '';
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Events
|
|
17
|
+
|
|
18
|
+
- `action` - {emptyState}
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
23
|
+
<!-- Basic -->
|
|
24
|
+
<snice-empty-state></snice-empty-state>
|
|
25
|
+
|
|
26
|
+
<!-- Custom -->
|
|
27
|
+
<snice-empty-state
|
|
28
|
+
icon="🔍"
|
|
29
|
+
title="No results found"
|
|
30
|
+
description="Try adjusting your search"
|
|
31
|
+
></snice-empty-state>
|
|
32
|
+
|
|
33
|
+
<!-- With action -->
|
|
34
|
+
<snice-empty-state
|
|
35
|
+
title="No items yet"
|
|
36
|
+
description="Get started by creating your first item"
|
|
37
|
+
action-text="Create Item"
|
|
38
|
+
></snice-empty-state>
|
|
39
|
+
|
|
40
|
+
<!-- With link -->
|
|
41
|
+
<snice-empty-state
|
|
42
|
+
title="Page not found"
|
|
43
|
+
action-text="Go Home"
|
|
44
|
+
action-href="/"
|
|
45
|
+
></snice-empty-state>
|
|
46
|
+
|
|
47
|
+
<!-- Sizes -->
|
|
48
|
+
<snice-empty-state size="small"></snice-empty-state>
|
|
49
|
+
<snice-empty-state size="medium"></snice-empty-state>
|
|
50
|
+
<snice-empty-state size="large"></snice-empty-state>
|
|
51
|
+
|
|
52
|
+
<!-- Events -->
|
|
53
|
+
<snice-empty-state id="empty" action-text="Click"></snice-empty-state>
|
|
54
|
+
<script>
|
|
55
|
+
document.querySelector('#empty').addEventListener('@snice/empty-state-action', () => {
|
|
56
|
+
console.log('Action clicked');
|
|
57
|
+
});
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<!-- Custom content -->
|
|
61
|
+
<snice-empty-state title="No data">
|
|
62
|
+
<div>Custom HTML content here</div>
|
|
63
|
+
</snice-empty-state>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- Customizable icon, title, description
|
|
69
|
+
- Optional action button or link
|
|
70
|
+
- 3 sizes
|
|
71
|
+
- Slot for custom content
|
|
72
|
+
- Accessible
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# snice-file-upload
|
|
2
|
+
|
|
3
|
+
File upload with drag-and-drop and preview.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
variant: 'outlined'|'filled' = 'outlined';
|
|
9
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
10
|
+
accept: string = '';
|
|
11
|
+
multiple: boolean = false;
|
|
12
|
+
disabled: boolean = false;
|
|
13
|
+
required: boolean = false;
|
|
14
|
+
invalid: boolean = false;
|
|
15
|
+
label: string = '';
|
|
16
|
+
helperText: string = '';
|
|
17
|
+
errorText: string = '';
|
|
18
|
+
maxSize: number = -1; // bytes
|
|
19
|
+
maxFiles: number = -1;
|
|
20
|
+
name: string = '';
|
|
21
|
+
dragDrop: boolean = true;
|
|
22
|
+
showPreview: boolean = true;
|
|
23
|
+
files: FileList | null;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Methods
|
|
27
|
+
|
|
28
|
+
- `clear()` - Clear all files
|
|
29
|
+
- `removeFile(index)` - Remove file by index
|
|
30
|
+
|
|
31
|
+
## Events
|
|
32
|
+
|
|
33
|
+
- `change` - {files, fileUpload}
|
|
34
|
+
- `error` - {message, fileUpload}
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
```html
|
|
39
|
+
<!-- Basic -->
|
|
40
|
+
<snice-file-upload label="Upload File"></snice-file-upload>
|
|
41
|
+
|
|
42
|
+
<!-- Multiple files -->
|
|
43
|
+
<snice-file-upload multiple label="Upload Files"></snice-file-upload>
|
|
44
|
+
|
|
45
|
+
<!-- File type restrictions -->
|
|
46
|
+
<snice-file-upload accept="image/*" label="Images only"></snice-file-upload>
|
|
47
|
+
<snice-file-upload accept=".pdf,.doc,.docx"></snice-file-upload>
|
|
48
|
+
|
|
49
|
+
<!-- Size limit (5MB) -->
|
|
50
|
+
<snice-file-upload max-size="5242880"></snice-file-upload>
|
|
51
|
+
|
|
52
|
+
<!-- File count limit -->
|
|
53
|
+
<snice-file-upload multiple max-files="5"></snice-file-upload>
|
|
54
|
+
|
|
55
|
+
<!-- No drag-drop -->
|
|
56
|
+
<snice-file-upload drag-drop="false"></snice-file-upload>
|
|
57
|
+
|
|
58
|
+
<!-- No preview -->
|
|
59
|
+
<snice-file-upload show-preview="false"></snice-file-upload>
|
|
60
|
+
|
|
61
|
+
<!-- Variants -->
|
|
62
|
+
<snice-file-upload variant="outlined"></snice-file-upload>
|
|
63
|
+
<snice-file-upload variant="filled"></snice-file-upload>
|
|
64
|
+
|
|
65
|
+
<!-- Sizes -->
|
|
66
|
+
<snice-file-upload size="small"></snice-file-upload>
|
|
67
|
+
<snice-file-upload size="medium"></snice-file-upload>
|
|
68
|
+
<snice-file-upload size="large"></snice-file-upload>
|
|
69
|
+
|
|
70
|
+
<!-- Events -->
|
|
71
|
+
<snice-file-upload id="upload"></snice-file-upload>
|
|
72
|
+
<script>
|
|
73
|
+
const upload = document.querySelector('#upload');
|
|
74
|
+
upload.addEventListener('@snice/file-upload-change', (e) => {
|
|
75
|
+
console.log('Files:', e.detail.files);
|
|
76
|
+
});
|
|
77
|
+
upload.addEventListener('@snice/file-upload-error', (e) => {
|
|
78
|
+
console.error('Error:', e.detail.message);
|
|
79
|
+
});
|
|
80
|
+
</script>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Features
|
|
84
|
+
|
|
85
|
+
- Form-associated custom element
|
|
86
|
+
- Drag-and-drop support
|
|
87
|
+
- Image preview
|
|
88
|
+
- File type filtering
|
|
89
|
+
- Size validation
|
|
90
|
+
- File count limits
|
|
91
|
+
- Multiple file selection
|
|
92
|
+
- 2 variants, 3 sizes
|
|
93
|
+
- Accessible
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# snice-image
|
|
2
|
+
|
|
3
|
+
Flexible image component with variants and lazy loading.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
src: string = '';
|
|
9
|
+
alt: string = '';
|
|
10
|
+
fallback: string = '';
|
|
11
|
+
variant: 'rounded'|'square'|'circle' = 'rounded';
|
|
12
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
13
|
+
lazy: boolean = true;
|
|
14
|
+
fit: 'cover'|'contain'|'fill'|'none'|'scale-down' = 'cover';
|
|
15
|
+
width: string = '';
|
|
16
|
+
height: string = '';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<!-- Basic -->
|
|
23
|
+
<snice-image src="image.jpg" alt="Description"></snice-image>
|
|
24
|
+
|
|
25
|
+
<!-- Sizes -->
|
|
26
|
+
<snice-image src="image.jpg" size="small"></snice-image>
|
|
27
|
+
<snice-image src="image.jpg" size="medium"></snice-image>
|
|
28
|
+
<snice-image src="image.jpg" size="large"></snice-image>
|
|
29
|
+
|
|
30
|
+
<!-- Variants -->
|
|
31
|
+
<snice-image src="image.jpg" variant="rounded"></snice-image>
|
|
32
|
+
<snice-image src="image.jpg" variant="square"></snice-image>
|
|
33
|
+
<snice-image src="image.jpg" variant="circle"></snice-image>
|
|
34
|
+
|
|
35
|
+
<!-- Fit -->
|
|
36
|
+
<snice-image src="image.jpg" fit="cover" width="200px" height="200px"></snice-image>
|
|
37
|
+
<snice-image src="image.jpg" fit="contain" width="200px" height="200px"></snice-image>
|
|
38
|
+
|
|
39
|
+
<!-- Fallback -->
|
|
40
|
+
<snice-image src="image.jpg" fallback="placeholder.jpg"></snice-image>
|
|
41
|
+
|
|
42
|
+
<!-- Custom dimensions -->
|
|
43
|
+
<snice-image src="image.jpg" width="300px" height="200px"></snice-image>
|
|
44
|
+
|
|
45
|
+
<!-- Lazy loading -->
|
|
46
|
+
<snice-image src="image.jpg" lazy="false"></snice-image>
|
|
47
|
+
|
|
48
|
+
<!-- Placeholder -->
|
|
49
|
+
<snice-image size="medium" variant="circle"></snice-image>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Features
|
|
53
|
+
|
|
54
|
+
- 3 size presets (small: 48px, medium: 96px, large: 192px)
|
|
55
|
+
- 3 shape variants (rounded, square, circle)
|
|
56
|
+
- 5 object-fit options
|
|
57
|
+
- Lazy loading (default on)
|
|
58
|
+
- Fallback image support
|
|
59
|
+
- Placeholder for missing images
|
|
60
|
+
- Custom width/height
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# snice-input
|
|
2
|
+
|
|
3
|
+
Text input field with validation and icons.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
value: string = '';
|
|
9
|
+
type: 'text'|'password'|'email'|'number'|'tel'|'url'|'search'|'date'|'time'|'datetime-local' = 'text';
|
|
10
|
+
variant: 'outlined'|'filled'|'underlined' = 'outlined';
|
|
11
|
+
size: 'small'|'medium'|'large' = 'medium';
|
|
12
|
+
placeholder: string = '';
|
|
13
|
+
disabled: boolean = false;
|
|
14
|
+
required: boolean = false;
|
|
15
|
+
invalid: boolean = false;
|
|
16
|
+
readonly: boolean = false;
|
|
17
|
+
clearable: boolean = false;
|
|
18
|
+
label: string = '';
|
|
19
|
+
helperText: string = '';
|
|
20
|
+
errorText: string = '';
|
|
21
|
+
prefix: string = '';
|
|
22
|
+
suffix: string = '';
|
|
23
|
+
prefixIcon: string = '';
|
|
24
|
+
suffixIcon: string = '';
|
|
25
|
+
min: string = '';
|
|
26
|
+
max: string = '';
|
|
27
|
+
minlength: number = 0;
|
|
28
|
+
maxlength: number = 0;
|
|
29
|
+
pattern: string = '';
|
|
30
|
+
autocomplete: string = '';
|
|
31
|
+
name: string = '';
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Methods
|
|
35
|
+
|
|
36
|
+
- `focus()` - Focus input
|
|
37
|
+
- `blur()` - Blur input
|
|
38
|
+
- `select()` - Select text
|
|
39
|
+
- `clear()` - Clear value
|
|
40
|
+
|
|
41
|
+
## Events
|
|
42
|
+
|
|
43
|
+
- `input` - {value, input}
|
|
44
|
+
- `change` - {value, input}
|
|
45
|
+
- `focus` - {input}
|
|
46
|
+
- `blur` - {input}
|
|
47
|
+
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<!-- Basic -->
|
|
52
|
+
<snice-input label="Name" placeholder="Enter name"></snice-input>
|
|
53
|
+
|
|
54
|
+
<!-- Variants -->
|
|
55
|
+
<snice-input variant="outlined"></snice-input>
|
|
56
|
+
<snice-input variant="filled"></snice-input>
|
|
57
|
+
<snice-input variant="underlined"></snice-input>
|
|
58
|
+
|
|
59
|
+
<!-- Input types -->
|
|
60
|
+
<snice-input type="email" label="Email"></snice-input>
|
|
61
|
+
<snice-input type="password" label="Password"></snice-input>
|
|
62
|
+
<snice-input type="number" label="Age"></snice-input>
|
|
63
|
+
|
|
64
|
+
<!-- With icons -->
|
|
65
|
+
<snice-input prefix-icon="🔍" placeholder="Search"></snice-input>
|
|
66
|
+
<snice-input suffix-icon="✉️" type="email"></snice-input>
|
|
67
|
+
|
|
68
|
+
<!-- With prefix/suffix text -->
|
|
69
|
+
<snice-input prefix="$" type="number"></snice-input>
|
|
70
|
+
<snice-input suffix=".com" type="url"></snice-input>
|
|
71
|
+
|
|
72
|
+
<!-- Clearable -->
|
|
73
|
+
<snice-input value="Text" clearable></snice-input>
|
|
74
|
+
|
|
75
|
+
<!-- Helper text -->
|
|
76
|
+
<snice-input label="Username" helper-text="Must be unique"></snice-input>
|
|
77
|
+
|
|
78
|
+
<!-- Error state -->
|
|
79
|
+
<snice-input label="Email" invalid error-text="Invalid email"></snice-input>
|
|
80
|
+
|
|
81
|
+
<!-- Validation -->
|
|
82
|
+
<snice-input type="email" required minlength="5" maxlength="50"></snice-input>
|
|
83
|
+
|
|
84
|
+
<!-- Sizes -->
|
|
85
|
+
<snice-input size="small"></snice-input>
|
|
86
|
+
<snice-input size="medium"></snice-input>
|
|
87
|
+
<snice-input size="large"></snice-input>
|
|
88
|
+
|
|
89
|
+
<!-- Form integration -->
|
|
90
|
+
<snice-input name="username" required></snice-input>
|
|
91
|
+
|
|
92
|
+
<!-- Events -->
|
|
93
|
+
<snice-input id="inp"></snice-input>
|
|
94
|
+
<script>
|
|
95
|
+
const inp = document.querySelector('#inp');
|
|
96
|
+
inp.addEventListener('input', (e) => console.log('Input:', e.detail.value));
|
|
97
|
+
inp.addEventListener('change', (e) => console.log('Change:', e.detail.value));
|
|
98
|
+
</script>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Features
|
|
102
|
+
|
|
103
|
+
- Form-associated custom element
|
|
104
|
+
- 10 input types
|
|
105
|
+
- 3 visual variants
|
|
106
|
+
- Prefix/suffix icons or text
|
|
107
|
+
- Clearable with X button
|
|
108
|
+
- Helper and error text
|
|
109
|
+
- Validation (min/max/pattern/length)
|
|
110
|
+
- 3 sizes
|
|
111
|
+
- Keyboard accessible
|