snice 1.14.2 → 2.1.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/bin/templates/base/tsconfig.json +5 -4
- package/components/accordion/demo.html +403 -0
- package/components/alert/demo.html +445 -0
- package/components/avatar/demo.html +598 -0
- package/components/badge/demo.html +523 -0
- package/components/breadcrumbs/demo.html +404 -0
- package/components/button/demo.html +42 -0
- package/components/card/demo.html +525 -0
- package/components/checkbox/demo.html +253 -0
- package/components/chip/demo.html +383 -0
- package/components/date-picker/demo.html +191 -0
- package/components/divider/demo.html +233 -0
- package/components/drawer/demo.html +328 -0
- package/components/input/demo.html +303 -0
- package/components/input/test.html +77 -0
- package/components/layout/demo.html +538 -0
- package/components/login/demo-auth-controller.ts +185 -0
- package/components/login/demo.html +470 -0
- package/components/login/snice-login.ts +2 -2
- package/components/modal/demo.html +291 -0
- package/components/pagination/demo.html +395 -0
- package/components/progress/demo.html +510 -0
- package/components/radio/demo.html +287 -0
- package/components/select/demo.html +511 -0
- package/components/skeleton/demo.html +514 -0
- package/components/switch/demo.html +284 -0
- package/components/table/demo-table-controller.ts +100 -0
- package/components/table/demo.html +480 -0
- package/components/table/snice-table.ts +2 -2
- package/components/tabs/demo.html +487 -0
- package/components/toast/demo.html +329 -0
- package/components/tooltip/demo.html +350 -0
- package/dist/index.cjs +441 -329
- package/dist/index.cjs.map +1 -1
- package/dist/index.cjs.min.map +1 -1
- package/dist/index.esm.js +441 -329
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +3 -3
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +441 -329
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +3 -3
- package/dist/index.iife.min.js.map +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.esm.js +1 -1
- package/dist/types/controller.d.ts +1 -1
- package/dist/types/element.d.ts +10 -10
- package/dist/types/events.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/observe.d.ts +1 -1
- package/dist/types/request-response.d.ts +2 -3
- package/dist/types/router.d.ts +1 -1
- package/package.json +9 -10
- package/dist/components/accordion/snice-accordion-item.d.ts +0 -25
- package/dist/components/accordion/snice-accordion-item.js +0 -260
- package/dist/components/accordion/snice-accordion-item.js.map +0 -1
- package/dist/components/accordion/snice-accordion.d.ts +0 -28
- package/dist/components/accordion/snice-accordion.js +0 -221
- package/dist/components/accordion/snice-accordion.js.map +0 -1
- package/dist/components/accordion/snice-accordion.types.d.ts +0 -29
- package/dist/components/accordion/snice-accordion.types.js +0 -2
- package/dist/components/accordion/snice-accordion.types.js.map +0 -1
- package/dist/components/alert/snice-alert.d.ts +0 -26
- package/dist/components/alert/snice-alert.js +0 -191
- package/dist/components/alert/snice-alert.js.map +0 -1
- package/dist/components/alert/snice-alert.types.d.ts +0 -11
- package/dist/components/alert/snice-alert.types.js +0 -2
- package/dist/components/alert/snice-alert.types.js.map +0 -1
- package/dist/components/avatar/snice-avatar.d.ts +0 -24
- package/dist/components/avatar/snice-avatar.js +0 -177
- package/dist/components/avatar/snice-avatar.js.map +0 -1
- package/dist/components/avatar/snice-avatar.types.d.ts +0 -12
- package/dist/components/avatar/snice-avatar.types.js +0 -2
- package/dist/components/avatar/snice-avatar.types.js.map +0 -1
- package/dist/components/badge/snice-badge.d.ts +0 -25
- package/dist/components/badge/snice-badge.js +0 -157
- package/dist/components/badge/snice-badge.js.map +0 -1
- package/dist/components/badge/snice-badge.types.d.ts +0 -15
- package/dist/components/badge/snice-badge.types.js +0 -2
- package/dist/components/badge/snice-badge.types.js.map +0 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.d.ts +0 -27
- package/dist/components/breadcrumbs/snice-breadcrumbs.js +0 -212
- package/dist/components/breadcrumbs/snice-breadcrumbs.js.map +0 -1
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.d.ts +0 -23
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js +0 -2
- package/dist/components/breadcrumbs/snice-breadcrumbs.types.js.map +0 -1
- package/dist/components/breadcrumbs/snice-crumb.d.ts +0 -9
- package/dist/components/breadcrumbs/snice-crumb.js +0 -50
- package/dist/components/breadcrumbs/snice-crumb.js.map +0 -1
- package/dist/components/button/snice-button.d.ts +0 -32
- package/dist/components/button/snice-button.js +0 -212
- package/dist/components/button/snice-button.js.map +0 -1
- package/dist/components/button/snice-button.types.d.ts +0 -23
- package/dist/components/button/snice-button.types.js +0 -2
- package/dist/components/button/snice-button.types.js.map +0 -1
- package/dist/components/card/snice-card.d.ts +0 -19
- package/dist/components/card/snice-card.js +0 -132
- package/dist/components/card/snice-card.js.map +0 -1
- package/dist/components/card/snice-card.types.d.ts +0 -9
- package/dist/components/card/snice-card.types.js +0 -2
- package/dist/components/card/snice-card.types.js.map +0 -1
- package/dist/components/checkbox/snice-checkbox.d.ts +0 -34
- package/dist/components/checkbox/snice-checkbox.js +0 -289
- package/dist/components/checkbox/snice-checkbox.js.map +0 -1
- package/dist/components/checkbox/snice-checkbox.types.d.ts +0 -20
- package/dist/components/checkbox/snice-checkbox.types.js +0 -2
- package/dist/components/checkbox/snice-checkbox.types.js.map +0 -1
- package/dist/components/chip/snice-chip.d.ts +0 -28
- package/dist/components/chip/snice-chip.js +0 -203
- package/dist/components/chip/snice-chip.js.map +0 -1
- package/dist/components/chip/snice-chip.types.d.ts +0 -14
- package/dist/components/chip/snice-chip.types.js +0 -2
- package/dist/components/chip/snice-chip.types.js.map +0 -1
- package/dist/components/date-picker/snice-date-picker.d.ts +0 -82
- package/dist/components/date-picker/snice-date-picker.js +0 -880
- package/dist/components/date-picker/snice-date-picker.js.map +0 -1
- package/dist/components/date-picker/snice-date-picker.types.d.ts +0 -71
- package/dist/components/date-picker/snice-date-picker.types.js +0 -2
- package/dist/components/date-picker/snice-date-picker.types.js.map +0 -1
- package/dist/components/divider/snice-divider.d.ts +0 -17
- package/dist/components/divider/snice-divider.js +0 -111
- package/dist/components/divider/snice-divider.js.map +0 -1
- package/dist/components/divider/snice-divider.types.d.ts +0 -14
- package/dist/components/divider/snice-divider.types.js +0 -2
- package/dist/components/divider/snice-divider.types.js.map +0 -1
- package/dist/components/drawer/snice-drawer.d.ts +0 -37
- package/dist/components/drawer/snice-drawer.js +0 -335
- package/dist/components/drawer/snice-drawer.js.map +0 -1
- package/dist/components/drawer/snice-drawer.types.d.ts +0 -16
- package/dist/components/drawer/snice-drawer.types.js +0 -2
- package/dist/components/drawer/snice-drawer.types.js.map +0 -1
- package/dist/components/input/snice-input.d.ts +0 -65
- package/dist/components/input/snice-input.js +0 -603
- package/dist/components/input/snice-input.js.map +0 -1
- package/dist/components/input/snice-input.types.d.ts +0 -53
- package/dist/components/input/snice-input.types.js +0 -2
- package/dist/components/input/snice-input.types.js.map +0 -1
- package/dist/components/layout/snice-layout-blog.d.ts +0 -4
- package/dist/components/layout/snice-layout-blog.js +0 -56
- package/dist/components/layout/snice-layout-blog.js.map +0 -1
- package/dist/components/layout/snice-layout-card.d.ts +0 -6
- package/dist/components/layout/snice-layout-card.js +0 -53
- package/dist/components/layout/snice-layout-card.js.map +0 -1
- package/dist/components/layout/snice-layout-centered.d.ts +0 -5
- package/dist/components/layout/snice-layout-centered.js +0 -38
- package/dist/components/layout/snice-layout-centered.js.map +0 -1
- package/dist/components/layout/snice-layout-dashboard.d.ts +0 -4
- package/dist/components/layout/snice-layout-dashboard.js +0 -53
- package/dist/components/layout/snice-layout-dashboard.js.map +0 -1
- package/dist/components/layout/snice-layout-fullscreen.d.ts +0 -5
- package/dist/components/layout/snice-layout-fullscreen.js +0 -50
- package/dist/components/layout/snice-layout-fullscreen.js.map +0 -1
- package/dist/components/layout/snice-layout-landing.d.ts +0 -4
- package/dist/components/layout/snice-layout-landing.js +0 -55
- package/dist/components/layout/snice-layout-landing.js.map +0 -1
- package/dist/components/layout/snice-layout-minimal.d.ts +0 -4
- package/dist/components/layout/snice-layout-minimal.js +0 -27
- package/dist/components/layout/snice-layout-minimal.js.map +0 -1
- package/dist/components/layout/snice-layout-sidebar.d.ts +0 -5
- package/dist/components/layout/snice-layout-sidebar.js +0 -64
- package/dist/components/layout/snice-layout-sidebar.js.map +0 -1
- package/dist/components/layout/snice-layout-split.d.ts +0 -6
- package/dist/components/layout/snice-layout-split.js +0 -47
- package/dist/components/layout/snice-layout-split.js.map +0 -1
- package/dist/components/layout/snice-layout.d.ts +0 -4
- package/dist/components/layout/snice-layout.js +0 -43
- package/dist/components/layout/snice-layout.js.map +0 -1
- package/dist/components/layout/snice-layout.types.d.ts +0 -3
- package/dist/components/layout/snice-layout.types.js +0 -2
- package/dist/components/layout/snice-layout.types.js.map +0 -1
- package/dist/components/login/snice-login.d.ts +0 -45
- package/dist/components/login/snice-login.js +0 -385
- package/dist/components/login/snice-login.js.map +0 -1
- package/dist/components/login/snice-login.types.d.ts +0 -31
- package/dist/components/login/snice-login.types.js +0 -2
- package/dist/components/login/snice-login.types.js.map +0 -1
- package/dist/components/modal/snice-modal.d.ts +0 -32
- package/dist/components/modal/snice-modal.js +0 -288
- package/dist/components/modal/snice-modal.js.map +0 -1
- package/dist/components/modal/snice-modal.types.d.ts +0 -18
- package/dist/components/modal/snice-modal.types.js +0 -2
- package/dist/components/modal/snice-modal.types.js.map +0 -1
- package/dist/components/pagination/snice-pagination.d.ts +0 -26
- package/dist/components/pagination/snice-pagination.js +0 -373
- package/dist/components/pagination/snice-pagination.js.map +0 -1
- package/dist/components/pagination/snice-pagination.types.d.ts +0 -18
- package/dist/components/pagination/snice-pagination.types.js +0 -2
- package/dist/components/pagination/snice-pagination.types.js.map +0 -1
- package/dist/components/progress/snice-progress.d.ts +0 -35
- package/dist/components/progress/snice-progress.js +0 -295
- package/dist/components/progress/snice-progress.js.map +0 -1
- package/dist/components/progress/snice-progress.types.d.ts +0 -18
- package/dist/components/progress/snice-progress.types.js +0 -2
- package/dist/components/progress/snice-progress.types.js.map +0 -1
- package/dist/components/radio/snice-radio.d.ts +0 -33
- package/dist/components/radio/snice-radio.js +0 -286
- package/dist/components/radio/snice-radio.js.map +0 -1
- package/dist/components/radio/snice-radio.types.d.ts +0 -19
- package/dist/components/radio/snice-radio.types.js +0 -2
- package/dist/components/radio/snice-radio.types.js.map +0 -1
- package/dist/components/select/snice-option.d.ts +0 -17
- package/dist/components/select/snice-option.js +0 -77
- package/dist/components/select/snice-option.js.map +0 -1
- package/dist/components/select/snice-option.types.d.ts +0 -14
- package/dist/components/select/snice-option.types.js +0 -2
- package/dist/components/select/snice-option.types.js.map +0 -1
- package/dist/components/select/snice-select.d.ts +0 -89
- package/dist/components/select/snice-select.js +0 -900
- package/dist/components/select/snice-select.js.map +0 -1
- package/dist/components/select/snice-select.types.d.ts +0 -49
- package/dist/components/select/snice-select.types.js +0 -2
- package/dist/components/select/snice-select.types.js.map +0 -1
- package/dist/components/skeleton/snice-skeleton.d.ts +0 -16
- package/dist/components/skeleton/snice-skeleton.js +0 -159
- package/dist/components/skeleton/snice-skeleton.js.map +0 -1
- package/dist/components/skeleton/snice-skeleton.types.d.ts +0 -10
- package/dist/components/skeleton/snice-skeleton.types.js +0 -2
- package/dist/components/skeleton/snice-skeleton.types.js.map +0 -1
- package/dist/components/switch/snice-switch.d.ts +0 -38
- package/dist/components/switch/snice-switch.js +0 -309
- package/dist/components/switch/snice-switch.js.map +0 -1
- package/dist/components/switch/snice-switch.types.d.ts +0 -21
- package/dist/components/switch/snice-switch.types.js +0 -2
- package/dist/components/switch/snice-switch.types.js.map +0 -1
- package/dist/components/symbols.d.ts +0 -1
- package/dist/components/symbols.js +0 -20
- package/dist/components/symbols.js.map +0 -1
- package/dist/components/table/snice-cell-boolean.d.ts +0 -21
- package/dist/components/table/snice-cell-boolean.js +0 -152
- package/dist/components/table/snice-cell-boolean.js.map +0 -1
- package/dist/components/table/snice-cell-date.d.ts +0 -24
- package/dist/components/table/snice-cell-date.js +0 -240
- package/dist/components/table/snice-cell-date.js.map +0 -1
- package/dist/components/table/snice-cell-duration.d.ts +0 -16
- package/dist/components/table/snice-cell-duration.js +0 -123
- package/dist/components/table/snice-cell-duration.js.map +0 -1
- package/dist/components/table/snice-cell-filesize.d.ts +0 -16
- package/dist/components/table/snice-cell-filesize.js +0 -119
- package/dist/components/table/snice-cell-filesize.js.map +0 -1
- package/dist/components/table/snice-cell-number.d.ts +0 -23
- package/dist/components/table/snice-cell-number.js +0 -202
- package/dist/components/table/snice-cell-number.js.map +0 -1
- package/dist/components/table/snice-cell-progress.d.ts +0 -17
- package/dist/components/table/snice-cell-progress.js +0 -114
- package/dist/components/table/snice-cell-progress.js.map +0 -1
- package/dist/components/table/snice-cell-rating.d.ts +0 -17
- package/dist/components/table/snice-cell-rating.js +0 -113
- package/dist/components/table/snice-cell-rating.js.map +0 -1
- package/dist/components/table/snice-cell-sparkline.d.ts +0 -29
- package/dist/components/table/snice-cell-sparkline.js +0 -290
- package/dist/components/table/snice-cell-sparkline.js.map +0 -1
- package/dist/components/table/snice-cell-text.d.ts +0 -19
- package/dist/components/table/snice-cell-text.js +0 -153
- package/dist/components/table/snice-cell-text.js.map +0 -1
- package/dist/components/table/snice-cell.d.ts +0 -32
- package/dist/components/table/snice-cell.js +0 -451
- package/dist/components/table/snice-cell.js.map +0 -1
- package/dist/components/table/snice-column.d.ts +0 -62
- package/dist/components/table/snice-column.js +0 -440
- package/dist/components/table/snice-column.js.map +0 -1
- package/dist/components/table/snice-header.d.ts +0 -33
- package/dist/components/table/snice-header.js +0 -303
- package/dist/components/table/snice-header.js.map +0 -1
- package/dist/components/table/snice-progress.d.ts +0 -10
- package/dist/components/table/snice-progress.js +0 -91
- package/dist/components/table/snice-progress.js.map +0 -1
- package/dist/components/table/snice-rating.d.ts +0 -9
- package/dist/components/table/snice-rating.js +0 -68
- package/dist/components/table/snice-rating.js.map +0 -1
- package/dist/components/table/snice-row.d.ts +0 -43
- package/dist/components/table/snice-row.js +0 -365
- package/dist/components/table/snice-row.js.map +0 -1
- package/dist/components/table/snice-table.d.ts +0 -69
- package/dist/components/table/snice-table.js +0 -814
- package/dist/components/table/snice-table.js.map +0 -1
- package/dist/components/table/snice-table.types.d.ts +0 -137
- package/dist/components/table/snice-table.types.js +0 -2
- package/dist/components/table/snice-table.types.js.map +0 -1
- package/dist/components/tabs/snice-tab-panel.d.ts +0 -12
- package/dist/components/tabs/snice-tab-panel.js +0 -78
- package/dist/components/tabs/snice-tab-panel.js.map +0 -1
- package/dist/components/tabs/snice-tab.d.ts +0 -13
- package/dist/components/tabs/snice-tab.js +0 -90
- package/dist/components/tabs/snice-tab.js.map +0 -1
- package/dist/components/tabs/snice-tabs.d.ts +0 -34
- package/dist/components/tabs/snice-tabs.js +0 -367
- package/dist/components/tabs/snice-tabs.js.map +0 -1
- package/dist/components/tabs/snice-tabs.types.d.ts +0 -23
- package/dist/components/tabs/snice-tabs.types.js +0 -2
- package/dist/components/tabs/snice-tabs.types.js.map +0 -1
- package/dist/components/toast/snice-toast-container.d.ts +0 -25
- package/dist/components/toast/snice-toast-container.js +0 -251
- package/dist/components/toast/snice-toast-container.js.map +0 -1
- package/dist/components/toast/snice-toast.d.ts +0 -23
- package/dist/components/toast/snice-toast.js +0 -316
- package/dist/components/toast/snice-toast.js.map +0 -1
- package/dist/components/toast/snice-toast.types.d.ts +0 -30
- package/dist/components/toast/snice-toast.types.js +0 -2
- package/dist/components/toast/snice-toast.types.js.map +0 -1
- package/dist/components/tooltip/snice-tooltip.d.ts +0 -50
- package/dist/components/tooltip/snice-tooltip.js +0 -656
- package/dist/components/tooltip/snice-tooltip.js.map +0 -1
- package/dist/components/tooltip/snice-tooltip.types.d.ts +0 -18
- package/dist/components/tooltip/snice-tooltip.types.js +0 -2
- package/dist/components/tooltip/snice-tooltip.types.js.map +0 -1
- package/dist/components/transitions.d.ts +0 -11
- package/dist/components/transitions.js +0 -69
- package/dist/components/transitions.js.map +0 -1
- package/dist/index.cjs.min +0 -15
- package/dist/symbols.cjs +0 -103
- package/dist/transitions.cjs +0 -219
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { element, property, query, on, watch, ready, dispatch } from 'snice';
|
|
11
|
-
import css from './snice-modal.css?inline';
|
|
12
|
-
let SniceModal = class SniceModal extends HTMLElement {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.open = false;
|
|
16
|
-
this.size = 'medium';
|
|
17
|
-
this.previousSize = 'medium';
|
|
18
|
-
this.noBackdropDismiss = false;
|
|
19
|
-
this.noEscapeDismiss = false;
|
|
20
|
-
this.noFocusTrap = false;
|
|
21
|
-
this.noCloseButton = false;
|
|
22
|
-
this.label = '';
|
|
23
|
-
this.previousFocus = null;
|
|
24
|
-
}
|
|
25
|
-
html() {
|
|
26
|
-
// Renders once - initial state
|
|
27
|
-
return /*html*/ `
|
|
28
|
-
<div class="modal"
|
|
29
|
-
role="dialog"
|
|
30
|
-
aria-modal="true"
|
|
31
|
-
aria-label="${this.label}"
|
|
32
|
-
aria-hidden="true">
|
|
33
|
-
<div class="modal__backdrop" part="backdrop"></div>
|
|
34
|
-
<div class="modal__panel modal__panel--${this.size}" part="panel">
|
|
35
|
-
<div class="modal__header" part="header">
|
|
36
|
-
<slot name="header"></slot>
|
|
37
|
-
<button class="modal__close" part="close" aria-label="Close modal">
|
|
38
|
-
<svg viewBox="0 0 24 24" width="20" height="20">
|
|
39
|
-
<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" fill="currentColor"/>
|
|
40
|
-
</svg>
|
|
41
|
-
</button>
|
|
42
|
-
</div>
|
|
43
|
-
<div class="modal__body" part="body">
|
|
44
|
-
<slot></slot>
|
|
45
|
-
</div>
|
|
46
|
-
<div class="modal__footer" part="footer">
|
|
47
|
-
<slot name="footer"></slot>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
`;
|
|
52
|
-
}
|
|
53
|
-
css() {
|
|
54
|
-
return css;
|
|
55
|
-
}
|
|
56
|
-
init() {
|
|
57
|
-
// Make sure modal state is properly initialized
|
|
58
|
-
if (this.open) {
|
|
59
|
-
this.showModal();
|
|
60
|
-
}
|
|
61
|
-
// Apply initial close button state
|
|
62
|
-
if (this.noCloseButton) {
|
|
63
|
-
const closeButton = this.shadowRoot?.querySelector('.modal__close');
|
|
64
|
-
if (closeButton) {
|
|
65
|
-
closeButton.style.display = 'none';
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
handleOpenChange() {
|
|
70
|
-
// Imperatively update the modal DOM
|
|
71
|
-
if (this.modal) {
|
|
72
|
-
if (this.open) {
|
|
73
|
-
this.modal.classList.add('modal--open');
|
|
74
|
-
this.modal.setAttribute('aria-hidden', 'false');
|
|
75
|
-
this.showModal();
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
this.modal.classList.remove('modal--open');
|
|
79
|
-
this.modal.setAttribute('aria-hidden', 'true');
|
|
80
|
-
this.hideModal();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
handleSizeChange() {
|
|
85
|
-
// Imperatively update the panel size class
|
|
86
|
-
if (this.panel) {
|
|
87
|
-
this.panel.classList.remove(`modal__panel--${this.previousSize}`);
|
|
88
|
-
this.panel.classList.add(`modal__panel--${this.size}`);
|
|
89
|
-
this.previousSize = this.size;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
handleCloseButtonChange() {
|
|
93
|
-
// Imperatively show/hide the close button
|
|
94
|
-
const closeButton = this.shadowRoot?.querySelector('.modal__close');
|
|
95
|
-
if (closeButton) {
|
|
96
|
-
closeButton.style.display = this.noCloseButton ? 'none' : '';
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
handleBackdropClick() {
|
|
100
|
-
if (!this.noBackdropDismiss) {
|
|
101
|
-
this.close();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
handleCloseClick() {
|
|
105
|
-
this.close();
|
|
106
|
-
}
|
|
107
|
-
handleEscape() {
|
|
108
|
-
if (!this.open)
|
|
109
|
-
return;
|
|
110
|
-
if (!this.noEscapeDismiss) {
|
|
111
|
-
this.close();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
handleTab(e) {
|
|
115
|
-
if (!this.open)
|
|
116
|
-
return;
|
|
117
|
-
if (!this.noFocusTrap) {
|
|
118
|
-
this.trapFocus(e);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
showModal() {
|
|
122
|
-
// Store current focus
|
|
123
|
-
this.previousFocus = document.activeElement;
|
|
124
|
-
// Lock body scroll
|
|
125
|
-
document.body.style.overflow = 'hidden';
|
|
126
|
-
// Focus first focusable element or modal itself
|
|
127
|
-
requestAnimationFrame(() => {
|
|
128
|
-
const firstFocusable = this.panel?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
129
|
-
if (firstFocusable) {
|
|
130
|
-
firstFocusable.focus();
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
this.panel?.focus();
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
this.dispatchOpenEvent();
|
|
137
|
-
}
|
|
138
|
-
hideModal() {
|
|
139
|
-
// Restore body scroll
|
|
140
|
-
document.body.style.overflow = '';
|
|
141
|
-
// Restore previous focus
|
|
142
|
-
if (this.previousFocus) {
|
|
143
|
-
this.previousFocus.focus();
|
|
144
|
-
this.previousFocus = null;
|
|
145
|
-
}
|
|
146
|
-
this.dispatchCloseEvent();
|
|
147
|
-
}
|
|
148
|
-
trapFocus(e) {
|
|
149
|
-
if (!this.panel)
|
|
150
|
-
return;
|
|
151
|
-
const focusableElements = this.panel.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
152
|
-
const focusable = Array.from(focusableElements);
|
|
153
|
-
const firstFocusable = focusable[0];
|
|
154
|
-
const lastFocusable = focusable[focusable.length - 1];
|
|
155
|
-
if (e.shiftKey) {
|
|
156
|
-
// Shift + Tab
|
|
157
|
-
if (document.activeElement === firstFocusable) {
|
|
158
|
-
lastFocusable?.focus();
|
|
159
|
-
e.preventDefault();
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
// Tab
|
|
164
|
-
if (document.activeElement === lastFocusable) {
|
|
165
|
-
firstFocusable?.focus();
|
|
166
|
-
e.preventDefault();
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
dispatchOpenEvent() {
|
|
171
|
-
return { modal: this };
|
|
172
|
-
}
|
|
173
|
-
dispatchCloseEvent() {
|
|
174
|
-
return { modal: this };
|
|
175
|
-
}
|
|
176
|
-
// Public API
|
|
177
|
-
show() {
|
|
178
|
-
this.open = true;
|
|
179
|
-
}
|
|
180
|
-
close() {
|
|
181
|
-
this.open = false;
|
|
182
|
-
}
|
|
183
|
-
};
|
|
184
|
-
__decorate([
|
|
185
|
-
property({ type: Boolean, reflect: true }),
|
|
186
|
-
__metadata("design:type", Object)
|
|
187
|
-
], SniceModal.prototype, "open", void 0);
|
|
188
|
-
__decorate([
|
|
189
|
-
property({ reflect: true }),
|
|
190
|
-
__metadata("design:type", String)
|
|
191
|
-
], SniceModal.prototype, "size", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
property({ type: Boolean, attribute: 'no-backdrop-dismiss', reflect: true }),
|
|
194
|
-
__metadata("design:type", Object)
|
|
195
|
-
], SniceModal.prototype, "noBackdropDismiss", void 0);
|
|
196
|
-
__decorate([
|
|
197
|
-
property({ type: Boolean, attribute: 'no-escape-dismiss', reflect: true }),
|
|
198
|
-
__metadata("design:type", Object)
|
|
199
|
-
], SniceModal.prototype, "noEscapeDismiss", void 0);
|
|
200
|
-
__decorate([
|
|
201
|
-
property({ type: Boolean, attribute: 'no-focus-trap', reflect: true }),
|
|
202
|
-
__metadata("design:type", Object)
|
|
203
|
-
], SniceModal.prototype, "noFocusTrap", void 0);
|
|
204
|
-
__decorate([
|
|
205
|
-
property({ type: Boolean, attribute: 'no-close-button', reflect: true }),
|
|
206
|
-
__metadata("design:type", Object)
|
|
207
|
-
], SniceModal.prototype, "noCloseButton", void 0);
|
|
208
|
-
__decorate([
|
|
209
|
-
property({ reflect: true }),
|
|
210
|
-
__metadata("design:type", Object)
|
|
211
|
-
], SniceModal.prototype, "label", void 0);
|
|
212
|
-
__decorate([
|
|
213
|
-
query('.modal'),
|
|
214
|
-
__metadata("design:type", HTMLElement)
|
|
215
|
-
], SniceModal.prototype, "modal", void 0);
|
|
216
|
-
__decorate([
|
|
217
|
-
query('.modal__panel'),
|
|
218
|
-
__metadata("design:type", HTMLElement)
|
|
219
|
-
], SniceModal.prototype, "panel", void 0);
|
|
220
|
-
__decorate([
|
|
221
|
-
query('.modal__backdrop'),
|
|
222
|
-
__metadata("design:type", HTMLElement)
|
|
223
|
-
], SniceModal.prototype, "backdrop", void 0);
|
|
224
|
-
__decorate([
|
|
225
|
-
ready(),
|
|
226
|
-
__metadata("design:type", Function),
|
|
227
|
-
__metadata("design:paramtypes", []),
|
|
228
|
-
__metadata("design:returntype", void 0)
|
|
229
|
-
], SniceModal.prototype, "init", null);
|
|
230
|
-
__decorate([
|
|
231
|
-
watch('open'),
|
|
232
|
-
__metadata("design:type", Function),
|
|
233
|
-
__metadata("design:paramtypes", []),
|
|
234
|
-
__metadata("design:returntype", void 0)
|
|
235
|
-
], SniceModal.prototype, "handleOpenChange", null);
|
|
236
|
-
__decorate([
|
|
237
|
-
watch('size'),
|
|
238
|
-
__metadata("design:type", Function),
|
|
239
|
-
__metadata("design:paramtypes", []),
|
|
240
|
-
__metadata("design:returntype", void 0)
|
|
241
|
-
], SniceModal.prototype, "handleSizeChange", null);
|
|
242
|
-
__decorate([
|
|
243
|
-
watch('noCloseButton'),
|
|
244
|
-
__metadata("design:type", Function),
|
|
245
|
-
__metadata("design:paramtypes", []),
|
|
246
|
-
__metadata("design:returntype", void 0)
|
|
247
|
-
], SniceModal.prototype, "handleCloseButtonChange", null);
|
|
248
|
-
__decorate([
|
|
249
|
-
on('click', '.modal__backdrop'),
|
|
250
|
-
__metadata("design:type", Function),
|
|
251
|
-
__metadata("design:paramtypes", []),
|
|
252
|
-
__metadata("design:returntype", void 0)
|
|
253
|
-
], SniceModal.prototype, "handleBackdropClick", null);
|
|
254
|
-
__decorate([
|
|
255
|
-
on('click', '.modal__close'),
|
|
256
|
-
__metadata("design:type", Function),
|
|
257
|
-
__metadata("design:paramtypes", []),
|
|
258
|
-
__metadata("design:returntype", void 0)
|
|
259
|
-
], SniceModal.prototype, "handleCloseClick", null);
|
|
260
|
-
__decorate([
|
|
261
|
-
on('keydown:Escape', { stopPropagation: true }),
|
|
262
|
-
__metadata("design:type", Function),
|
|
263
|
-
__metadata("design:paramtypes", []),
|
|
264
|
-
__metadata("design:returntype", void 0)
|
|
265
|
-
], SniceModal.prototype, "handleEscape", null);
|
|
266
|
-
__decorate([
|
|
267
|
-
on('keydown:Tab'),
|
|
268
|
-
__metadata("design:type", Function),
|
|
269
|
-
__metadata("design:paramtypes", [KeyboardEvent]),
|
|
270
|
-
__metadata("design:returntype", void 0)
|
|
271
|
-
], SniceModal.prototype, "handleTab", null);
|
|
272
|
-
__decorate([
|
|
273
|
-
dispatch('@snice/modal-open', { bubbles: true, composed: true }),
|
|
274
|
-
__metadata("design:type", Function),
|
|
275
|
-
__metadata("design:paramtypes", []),
|
|
276
|
-
__metadata("design:returntype", void 0)
|
|
277
|
-
], SniceModal.prototype, "dispatchOpenEvent", null);
|
|
278
|
-
__decorate([
|
|
279
|
-
dispatch('@snice/modal-close', { bubbles: true, composed: true }),
|
|
280
|
-
__metadata("design:type", Function),
|
|
281
|
-
__metadata("design:paramtypes", []),
|
|
282
|
-
__metadata("design:returntype", void 0)
|
|
283
|
-
], SniceModal.prototype, "dispatchCloseEvent", null);
|
|
284
|
-
SniceModal = __decorate([
|
|
285
|
-
element('snice-modal')
|
|
286
|
-
], SniceModal);
|
|
287
|
-
export { SniceModal };
|
|
288
|
-
//# sourceMappingURL=snice-modal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snice-modal.js","sourceRoot":"","sources":["../../../components/modal/snice-modal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7E,OAAO,GAAG,MAAM,0BAA0B,CAAC;AAIpC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,WAAW;IAApC;;QAEL,SAAI,GAAG,KAAK,CAAC;QAGb,SAAI,GAAc,QAAQ,CAAC;QAEnB,iBAAY,GAAG,QAAQ,CAAC;QAGhC,sBAAiB,GAAG,KAAK,CAAC;QAG1B,oBAAe,GAAG,KAAK,CAAC;QAGxB,gBAAW,GAAG,KAAK,CAAC;QAGpB,kBAAa,GAAG,KAAK,CAAC;QAGtB,UAAK,GAAG,EAAE,CAAC;QAWH,kBAAa,GAAuB,IAAI,CAAC;IAkMnD,CAAC;IAhMC,IAAI;QACF,+BAA+B;QAC/B,OAAO,QAAQ,CAAA;;;;yBAIM,IAAI,CAAC,KAAK;;;iDAGc,IAAI,CAAC,IA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AAsCvB;IADC,KAAK,EAAE;;;;sCAaP;AAGD;IADC,KAAK,CAAC,MAAM,CAAC;;;;kDAcb;AAGD;IADC,KAAK,CAAC,MAAM,CAAC;;;;kDAQb;AAGD;IADC,KAAK,CAAC,eAAe,CAAC;;;;yDAOtB;AAGD;IADC,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC;;;;qDAK/B;AAGD;IADC,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC;;;;kDAG5B;AAGD;IADC,EAAE,CAAC,gBAAgB,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;;;;8CAM/C;AAGD;IADC,EAAE,CAAC,aAAa,CAAC;;qCACL,aAAa;;2CAKzB;AAiEO;IADP,QAAQ,CAAC,mBAAmB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;mDAGhE;AAGO;IADP,QAAQ,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;oDAGjE;AAxNU,UAAU;IADtB,OAAO,CAAC,aAAa,CAAC;GACV,UAAU,CAmOtB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type ModalSize = 'small' | 'medium' | 'large' | 'fullscreen';
|
|
2
|
-
export interface SniceModalElement extends HTMLElement {
|
|
3
|
-
open: boolean;
|
|
4
|
-
size: ModalSize;
|
|
5
|
-
noBackdropDismiss: boolean;
|
|
6
|
-
noEscapeDismiss: boolean;
|
|
7
|
-
noFocusTrap: boolean;
|
|
8
|
-
noCloseButton: boolean;
|
|
9
|
-
label: string;
|
|
10
|
-
show(): void;
|
|
11
|
-
close(): void;
|
|
12
|
-
}
|
|
13
|
-
export interface ModalOpenDetail {
|
|
14
|
-
modal: SniceModalElement;
|
|
15
|
-
}
|
|
16
|
-
export interface ModalCloseDetail {
|
|
17
|
-
modal: SniceModalElement;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snice-modal.types.js","sourceRoot":"","sources":["../../../components/modal/snice-modal.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare class SnicePagination extends HTMLElement {
|
|
2
|
-
current: number;
|
|
3
|
-
total: number;
|
|
4
|
-
siblings: number;
|
|
5
|
-
showFirst: boolean;
|
|
6
|
-
showLast: boolean;
|
|
7
|
-
showPrev: boolean;
|
|
8
|
-
showNext: boolean;
|
|
9
|
-
size: 'small' | 'medium' | 'large';
|
|
10
|
-
variant: 'default' | 'rounded' | 'text';
|
|
11
|
-
html(): string;
|
|
12
|
-
css(): string;
|
|
13
|
-
private getPageNumbers;
|
|
14
|
-
handleFirst(): void;
|
|
15
|
-
handlePrev(): void;
|
|
16
|
-
handleNext(): void;
|
|
17
|
-
handleLast(): void;
|
|
18
|
-
handlePageClick(event: Event): void;
|
|
19
|
-
private changePage;
|
|
20
|
-
private updateView;
|
|
21
|
-
goToPage(page: number): void;
|
|
22
|
-
nextPage(): void;
|
|
23
|
-
previousPage(): void;
|
|
24
|
-
firstPage(): void;
|
|
25
|
-
lastPage(): void;
|
|
26
|
-
}
|