@aquera/nile-elements 0.0.111 → 0.0.113
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 +10 -0
- package/demo/filenames.txt +1 -1
- package/demo/variables.css +2 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
- package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
- package/dist/nile-accordion/nile-accordion.esm.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-avatar/nile-avatar.cjs.js +1 -1
- package/dist/nile-avatar/nile-avatar.cjs.js.map +1 -1
- package/dist/nile-avatar/nile-avatar.esm.js +1 -1
- package/dist/nile-badge/index.cjs.js +1 -1
- package/dist/nile-badge/index.esm.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.esm.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js +1 -1
- package/dist/nile-badge/nile-badge.test.cjs.js.map +1 -1
- package/dist/nile-badge/nile-badge.test.esm.js +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.cjs.js.map +1 -1
- package/dist/nile-breadcrumb/nile-breadcrumb.esm.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.cjs.js.map +1 -1
- package/dist/nile-breadcrumb-item/nile-breadcrumb-item.esm.js +2 -2
- package/dist/nile-button/index.cjs.js +1 -1
- package/dist/nile-button/index.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.esm.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js +1 -1
- package/dist/nile-button/nile-button.test.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.test.esm.js +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.esm.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -1
- package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.esm.js +7 -7
- package/dist/nile-card/nile-card.cjs.js +1 -1
- package/dist/nile-card/nile-card.cjs.js.map +1 -1
- package/dist/nile-card/nile-card.esm.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.esm.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.esm.js +5 -5
- package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
- package/dist/nile-date-picker/nile-date-picker.esm.js +5 -3
- package/dist/nile-dialog/index.cjs.js +1 -1
- package/dist/nile-dialog/index.esm.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js +1 -1
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-dialog/nile-dialog.esm.js +1 -1
- package/dist/nile-drawer/index.cjs.js +1 -1
- package/dist/nile-drawer/index.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.esm.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js +1 -1
- package/dist/nile-drawer/nile-drawer.test.cjs.js.map +1 -1
- package/dist/nile-drawer/nile-drawer.test.esm.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js +1 -1
- package/dist/nile-empty-state/nile-empty-state.cjs.js.map +1 -1
- package/dist/nile-empty-state/nile-empty-state.esm.js +1 -1
- package/dist/nile-highlighter/index.cjs.js +1 -1
- package/dist/nile-highlighter/index.esm.js +1 -1
- package/dist/nile-highlighter/nile-highlighter.cjs.js +1 -1
- package/dist/nile-highlighter/nile-highlighter.cjs.js.map +1 -1
- package/dist/nile-highlighter/nile-highlighter.esm.js +2 -2
- package/dist/nile-highlighter/theme-list.cjs.js +1 -1
- package/dist/nile-highlighter/theme-list.cjs.js.map +1 -1
- package/dist/nile-highlighter/theme-list.esm.js +1 -1
- package/dist/nile-icon/icons/svg/index.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/index.esm.js +1 -1
- package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/insert-at-cursor.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/insert-at-cursor.esm.js +1 -0
- package/dist/nile-icon/icons/svg/warning-01.cjs.js +2 -0
- package/dist/nile-icon/icons/svg/warning-01.cjs.js.map +1 -0
- package/dist/nile-icon/icons/svg/warning-01.esm.js +1 -0
- package/dist/nile-icon/index.cjs.js +1 -1
- package/dist/nile-icon/index.cjs.js.map +1 -1
- package/dist/nile-icon/index.esm.js +2 -2
- package/dist/nile-icon/nile-icon.test.cjs.js +1 -1
- package/dist/nile-icon/nile-icon.test.cjs.js.map +1 -1
- package/dist/nile-icon/nile-icon.test.esm.js +1 -1
- package/dist/nile-icon-button/index.cjs.js +1 -1
- package/dist/nile-icon-button/index.esm.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -1
- package/dist/nile-input/index.cjs.js +1 -1
- package/dist/nile-input/index.esm.js +1 -1
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js +1 -1
- package/dist/nile-input/nile-input.test.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.test.esm.js +1 -1
- package/dist/nile-link/nile-link.cjs.js +1 -1
- package/dist/nile-link/nile-link.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.esm.js +1 -1
- package/dist/nile-list/nile-list.cjs.js +1 -1
- package/dist/nile-list/nile-list.cjs.js.map +1 -1
- package/dist/nile-list/nile-list.esm.js +1 -1
- package/dist/nile-list-item/nile-list-item.cjs.js +1 -1
- package/dist/nile-list-item/nile-list-item.cjs.js.map +1 -1
- package/dist/nile-list-item/nile-list-item.esm.js +1 -1
- package/dist/nile-menu/nile-menu.cjs.js +1 -1
- package/dist/nile-menu/nile-menu.cjs.js.map +1 -1
- package/dist/nile-menu/nile-menu.esm.js +1 -1
- package/dist/nile-menu-item/index.cjs.js +1 -1
- package/dist/nile-menu-item/index.esm.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js +1 -1
- package/dist/nile-menu-item/nile-menu-item.cjs.js.map +1 -1
- package/dist/nile-menu-item/nile-menu-item.esm.js +1 -1
- package/dist/nile-option/index.cjs.js +1 -1
- package/dist/nile-option/index.esm.js +1 -1
- package/dist/nile-option/nile-option.cjs.js +1 -1
- package/dist/nile-option/nile-option.cjs.js.map +1 -1
- package/dist/nile-option/nile-option.esm.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js +1 -1
- package/dist/nile-popover/nile-popover.cjs.js.map +1 -1
- package/dist/nile-popover/nile-popover.esm.js +2 -2
- package/dist/nile-popup/nile-popup.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.cjs.js.map +1 -1
- package/dist/nile-popup/nile-popup.esm.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
- package/dist/nile-select/index.cjs.js +1 -1
- package/dist/nile-select/index.esm.js +1 -1
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +1 -1
- package/dist/nile-split-panel/nile-split-panel.cjs.js +1 -1
- package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -1
- package/dist/nile-split-panel/nile-split-panel.esm.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
- package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
- package/dist/nile-stepper/nile-stepper.esm.js +1 -1
- package/dist/nile-tab/index.cjs.js +1 -1
- package/dist/nile-tab/index.esm.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.esm.js +1 -1
- package/dist/nile-tab-group/index.cjs.js +1 -1
- package/dist/nile-tab-group/index.esm.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js +1 -1
- package/dist/nile-tab-group/nile-tab-group.cjs.js.map +1 -1
- package/dist/nile-tab-group/nile-tab-group.esm.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js +1 -1
- package/dist/nile-table-body/nile-table-body.cjs.js.map +1 -1
- package/dist/nile-table-body/nile-table-body.esm.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.cjs.js.map +1 -1
- package/dist/nile-table-header-item/nile-table-header-item.esm.js +1 -1
- package/dist/nile-tag/index.cjs.js +1 -1
- package/dist/nile-tag/index.esm.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.esm.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.esm.js +1 -1
- package/dist/nile-toast/index.cjs.js +1 -1
- package/dist/nile-toast/index.esm.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js +1 -1
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -1
- package/dist/nile-toast/nile-toast.esm.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js +1 -1
- package/dist/nile-tooltip/nile-tooltip.cjs.js.map +1 -1
- package/dist/nile-tooltip/nile-tooltip.esm.js +1 -1
- package/dist/nile-tree/index.cjs.js +1 -1
- package/dist/nile-tree/index.esm.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js +1 -1
- package/dist/nile-tree/nile-tree.cjs.js.map +1 -1
- package/dist/nile-tree/nile-tree.esm.js +1 -1
- package/dist/nile-tree-item/index.cjs.js +1 -1
- package/dist/nile-tree-item/index.esm.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js +1 -1
- package/dist/nile-tree-item/nile-tree-item.cjs.js.map +1 -1
- package/dist/nile-tree-item/nile-tree-item.esm.js +1 -1
- package/dist/src/nile-accordion/nile-accordion.d.ts +0 -1
- package/dist/src/nile-accordion/nile-accordion.js +0 -1
- package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.d.ts +0 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +0 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-avatar/nile-avatar.d.ts +0 -1
- package/dist/src/nile-avatar/nile-avatar.js +0 -1
- package/dist/src/nile-avatar/nile-avatar.js.map +1 -1
- package/dist/src/nile-badge/nile-badge.d.ts +0 -1
- package/dist/src/nile-badge/nile-badge.js +0 -1
- package/dist/src/nile-badge/nile-badge.js.map +1 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.d.ts +0 -1
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js +0 -5
- package/dist/src/nile-breadcrumb/nile-breadcrumb.js.map +1 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.d.ts +0 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js +0 -1
- package/dist/src/nile-breadcrumb-item/nile-breadcrumb-item.js.map +1 -1
- package/dist/src/nile-button/nile-button.d.ts +0 -1
- package/dist/src/nile-button/nile-button.js +0 -1
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +0 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.js +0 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +0 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +0 -1
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +4 -6
- package/dist/src/nile-calendar/nile-calendar.js +7 -18
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-card/nile-card.d.ts +0 -1
- package/dist/src/nile-card/nile-card.js +0 -1
- package/dist/src/nile-card/nile-card.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +0 -1
- package/dist/src/nile-checkbox/nile-checkbox.js +0 -1
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.d.ts +0 -1
- package/dist/src/nile-chip/nile-chip.js +0 -1
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +0 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +0 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.d.ts +0 -1
- package/dist/src/nile-content-editor/nile-content-editor.js +0 -1
- package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +0 -1
- package/dist/src/nile-date-picker/nile-date-picker.js +4 -2
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-dialog/nile-dialog.d.ts +0 -1
- package/dist/src/nile-dialog/nile-dialog.js +0 -1
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/dist/src/nile-drawer/nile-drawer.d.ts +0 -1
- package/dist/src/nile-drawer/nile-drawer.js +0 -1
- package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
- package/dist/src/nile-empty-state/nile-empty-state.d.ts +0 -1
- package/dist/src/nile-empty-state/nile-empty-state.js +0 -1
- package/dist/src/nile-empty-state/nile-empty-state.js.map +1 -1
- package/dist/src/nile-highlighter/nile-highlighter.d.ts +2 -1
- package/dist/src/nile-highlighter/nile-highlighter.js +16 -11
- package/dist/src/nile-highlighter/nile-highlighter.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/index.d.ts +2 -0
- package/dist/src/nile-icon/icons/svg/index.js +2 -0
- package/dist/src/nile-icon/icons/svg/index.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/insert-at-cursor.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/insert-at-cursor.js +5 -0
- package/dist/src/nile-icon/icons/svg/insert-at-cursor.js.map +1 -0
- package/dist/src/nile-icon/icons/svg/warning-01.d.ts +5 -0
- package/dist/src/nile-icon/icons/svg/warning-01.js +5 -0
- package/dist/src/nile-icon/icons/svg/warning-01.js.map +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +0 -1
- package/dist/src/nile-icon-button/nile-icon-button.js +0 -1
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-input/nile-input.d.ts +0 -1
- package/dist/src/nile-input/nile-input.js +0 -1
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-link/nile-link.d.ts +0 -1
- package/dist/src/nile-link/nile-link.js +0 -1
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-list/nile-list.d.ts +0 -1
- package/dist/src/nile-list/nile-list.js +0 -5
- package/dist/src/nile-list/nile-list.js.map +1 -1
- package/dist/src/nile-list-item/nile-list-item.d.ts +0 -1
- package/dist/src/nile-list-item/nile-list-item.js +0 -1
- package/dist/src/nile-list-item/nile-list-item.js.map +1 -1
- package/dist/src/nile-menu/nile-menu.d.ts +0 -1
- package/dist/src/nile-menu/nile-menu.js +0 -1
- package/dist/src/nile-menu/nile-menu.js.map +1 -1
- package/dist/src/nile-menu-item/nile-menu-item.d.ts +0 -2
- package/dist/src/nile-menu-item/nile-menu-item.js +0 -2
- package/dist/src/nile-menu-item/nile-menu-item.js.map +1 -1
- package/dist/src/nile-option/nile-option.d.ts +0 -2
- package/dist/src/nile-option/nile-option.js +0 -2
- package/dist/src/nile-option/nile-option.js.map +1 -1
- package/dist/src/nile-popover/nile-popover.d.ts +0 -1
- package/dist/src/nile-popover/nile-popover.js +0 -1
- package/dist/src/nile-popover/nile-popover.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.d.ts +0 -2
- package/dist/src/nile-popup/nile-popup.js +0 -2
- package/dist/src/nile-popup/nile-popup.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.d.ts +0 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +0 -1
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +0 -1
- package/dist/src/nile-select/nile-select.js +0 -1
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +0 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +0 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-split-panel/nile-split-panel.d.ts +0 -1
- package/dist/src/nile-split-panel/nile-split-panel.js +0 -1
- package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -1
- package/dist/src/nile-stepper/nile-stepper.d.ts +0 -1
- package/dist/src/nile-stepper/nile-stepper.js +0 -1
- package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
- package/dist/src/nile-tab/nile-tab.d.ts +0 -1
- package/dist/src/nile-tab/nile-tab.js +0 -1
- package/dist/src/nile-tab/nile-tab.js.map +1 -1
- package/dist/src/nile-tab-group/nile-tab-group.d.ts +0 -1
- package/dist/src/nile-tab-group/nile-tab-group.js +0 -1
- package/dist/src/nile-tab-group/nile-tab-group.js.map +1 -1
- package/dist/src/nile-table-body/nile-table-body.d.ts +0 -1
- package/dist/src/nile-table-body/nile-table-body.js +0 -1
- package/dist/src/nile-table-body/nile-table-body.js.map +1 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.d.ts +0 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.js +0 -1
- package/dist/src/nile-table-header-item/nile-table-header-item.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +0 -1
- package/dist/src/nile-tag/nile-tag.js +0 -1
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.d.ts +0 -1
- package/dist/src/nile-textarea/nile-textarea.js +0 -1
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/src/nile-toast/nile-toast.d.ts +0 -1
- package/dist/src/nile-toast/nile-toast.js +0 -1
- package/dist/src/nile-toast/nile-toast.js.map +1 -1
- package/dist/src/nile-tooltip/nile-tooltip.d.ts +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.js +0 -1
- package/dist/src/nile-tooltip/nile-tooltip.js.map +1 -1
- package/dist/src/nile-tree/nile-tree.d.ts +0 -1
- package/dist/src/nile-tree/nile-tree.js +0 -1
- package/dist/src/nile-tree/nile-tree.js.map +1 -1
- package/dist/src/nile-tree-item/nile-tree-item.d.ts +0 -1
- package/dist/src/nile-tree-item/nile-tree-item.js +0 -1
- package/dist/src/nile-tree-item/nile-tree-item.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-accordion/nile-accordion.ts +0 -1
- package/src/nile-auto-complete/nile-auto-complete.ts +0 -2
- package/src/nile-avatar/nile-avatar.ts +0 -2
- package/src/nile-badge/nile-badge.ts +0 -2
- package/src/nile-breadcrumb/nile-breadcrumb.ts +0 -2
- package/src/nile-breadcrumb-item/nile-breadcrumb-item.ts +0 -2
- package/src/nile-button/nile-button.ts +0 -2
- package/src/nile-button-toggle/nile-button-toggle.ts +0 -2
- package/src/nile-button-toggle-group/nile-button-toggle-group.ts +0 -2
- package/src/nile-calendar/nile-calendar.ts +10 -20
- package/src/nile-card/nile-card.ts +0 -2
- package/src/nile-checkbox/nile-checkbox.ts +0 -2
- package/src/nile-chip/nile-chip.ts +0 -2
- package/src/nile-code-editor/nile-code-editor.ts +0 -2
- package/src/nile-content-editor/nile-content-editor.ts +0 -2
- package/src/nile-date-picker/nile-date-picker.ts +4 -3
- package/src/nile-dialog/nile-dialog.ts +0 -2
- package/src/nile-drawer/nile-drawer.ts +0 -2
- package/src/nile-empty-state/nile-empty-state.ts +0 -2
- package/src/nile-highlighter/nile-highlighter.ts +20 -13
- package/src/nile-icon/icons/svg/index.ts +2 -0
- package/src/nile-icon/icons/svg/insert-at-cursor.ts +5 -0
- package/src/nile-icon/icons/svg/warning-01.ts +5 -0
- package/src/nile-icon-button/nile-icon-button.ts +0 -2
- package/src/nile-input/nile-input.ts +0 -2
- package/src/nile-link/nile-link.ts +0 -2
- package/src/nile-list/nile-list.ts +0 -2
- package/src/nile-list-item/nile-list-item.ts +0 -2
- package/src/nile-menu/nile-menu.ts +0 -3
- package/src/nile-menu-item/nile-menu-item.ts +0 -3
- package/src/nile-option/nile-option.ts +0 -3
- package/src/nile-popover/nile-popover.ts +0 -2
- package/src/nile-popup/nile-popup.ts +0 -3
- package/src/nile-radio-group/nile-radio-group.ts +0 -2
- package/src/nile-select/nile-select.ts +0 -2
- package/src/nile-slide-toggle/nile-slide-toggle.ts +0 -2
- package/src/nile-split-panel/nile-split-panel.ts +0 -2
- package/src/nile-stepper/nile-stepper.ts +0 -2
- package/src/nile-tab/nile-tab.ts +0 -2
- package/src/nile-tab-group/nile-tab-group.ts +0 -2
- package/src/nile-table-body/nile-table-body.ts +0 -2
- package/src/nile-table-header-item/nile-table-header-item.ts +0 -2
- package/src/nile-tag/nile-tag.ts +0 -2
- package/src/nile-textarea/nile-textarea.ts +0 -2
- package/src/nile-toast/nile-toast.ts +0 -2
- package/src/nile-tooltip/nile-tooltip.ts +0 -2
- package/src/nile-tree/nile-tree.ts +0 -2
- package/src/nile-tree-item/nile-tree-item.ts +0 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-dialog.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,O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LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-dialog.css';\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html,nothing } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-modal\n *\n */\n@customElement('nile-dialog')\nexport class NileDialog extends NileElement {\n static styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer','sublabel','label');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.dialog') dialog: HTMLElement;\n @query('.dialog__panel') panel: HTMLElement;\n @query('.dialog__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n \n @property({ reflect: true }) sublabel = '';\n\n /**\n * Disables the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the dialog.\n */\n @property({ type: Boolean, reflect: true }) noHeader = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n /**\n * Added to resolve conflicts between Angular Material's mat-drawer components.\n */\n private drawerStyle = `\n <style id=\"drawer-style\">\n .mat-drawer.mat-drawer-side { z-index: 1; }\n </style>\n `;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.dialog.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n this.modal.activate();\n lockBodyScrolling(this);\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const nileRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source },\n });\n\n if (source === 'close-button') {\n this.hide();\n return;\n }\n\n if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {\n const animation = getAnimation(this, 'dialog.denyClose', {\n dir: 'right',\n });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n this.modal.activate();\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n lockBodyScrolling(this);\n\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n this.dialog.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const nileInitialFocus = this.emit('nile-initial-focus', {\n cancelable: true,\n });\n\n if (!nileInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({\n preventScroll: true,\n });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, 'dialog.show', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {\n dir: 'right',\n });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ),\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n this.modal.deactivate();\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n const panelAnimation = getAnimation(this, 'dialog.hide', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {\n dir: 'right',\n });\n\n const styleTag = document.getElementById('drawer-style');\n if (styleTag) {\n document.head.removeChild(styleTag);\n }\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(\n this.panel,\n panelAnimation.keyframes,\n panelAnimation.options\n ).then(() => {\n this.panel.hidden = true;\n }),\n ]);\n\n this.dialog.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n unlockBodyScrolling(this);\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n /** Shows the dialog. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dialog */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"dialog__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"dialog__header\">\n <h2 part=\"title\" class=\"dialog__header__text\" id=\"title\">\n <slot name=\"label\">\n ${this.label?.length\n ? this.label\n : nothing}\n </slot>\n ${this.sublabel || this.hasSlotController.test('sublabel')?html`\n <slot name=\"sublabel\">\n ${this.sublabel?.length\n ? this.sublabel\n : nothing}\n </slot>\n `:''}\n </h2>\n <div part=\"header-actions\" class=\"dialog__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"dialog__close\"\n name=\"close\"\n label=\"close\"\n color=\"var(--nile-dialog-remove-icon-color)\"\n @click=\"${() => this.requestClose('close-button')}\"\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot\n part=\"body\"\n class=\"dialog__body ${this.noHeader\n ? 'dialog__body-noheader'\n : ''}\"\n ></slot>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('dialog.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.02 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default NileDialog;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dialog': NileDialog;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"nile-dialog.js","sourceRoot":"","sources":["../../../src/nile-dialog/nile-dialog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAEzC,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAC,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAo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EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE;CAC3C,CAAC,CAAC;AAEH,mBAAmB,CAAC,kBAAkB,EAAE;IACtC,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACxD,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-dialog.css';\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html,nothing } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-modal\n *\n */\n@customElement('nile-dialog')\nexport class NileDialog extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer','sublabel','label');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.dialog') dialog: HTMLElement;\n @query('.dialog__panel') panel: HTMLElement;\n @query('.dialog__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the dialog is open. You can toggle this attribute to show and hide the dialog, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the dialog's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The dialog's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n \n @property({ reflect: true }) sublabel = '';\n\n /**\n * Disables the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the dialog.\n */\n @property({ type: Boolean, reflect: true }) noHeader = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n /**\n * Added to resolve conflicts between Angular Material's mat-drawer components.\n */\n private drawerStyle = `\n <style id=\"drawer-style\">\n .mat-drawer.mat-drawer-side { z-index: 1; }\n </style>\n `;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.dialog.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n this.modal.activate();\n lockBodyScrolling(this);\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const nileRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source },\n });\n\n if (source === 'close-button') {\n this.hide();\n return;\n }\n\n if (nileRequestClose.defaultPrevented || this.preventOverlayClose) {\n const animation = getAnimation(this, 'dialog.denyClose', {\n dir: 'right',\n });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n this.modal.activate();\n document.head.insertAdjacentHTML('beforeend', this.drawerStyle);\n lockBodyScrolling(this);\n\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n this.dialog.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const nileInitialFocus = this.emit('nile-initial-focus', {\n cancelable: true,\n });\n\n if (!nileInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({\n preventScroll: true,\n });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, 'dialog.show', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.show', {\n dir: 'right',\n });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ),\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n this.modal.deactivate();\n\n await Promise.all([\n stopAnimations(this.dialog),\n stopAnimations(this.overlay),\n ]);\n const panelAnimation = getAnimation(this, 'dialog.hide', {\n dir: 'right',\n });\n const overlayAnimation = getAnimation(this, 'dialog.overlay.hide', {\n dir: 'right',\n });\n\n const styleTag = document.getElementById('drawer-style');\n if (styleTag) {\n document.head.removeChild(styleTag);\n }\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(\n this.overlay,\n overlayAnimation.keyframes,\n overlayAnimation.options\n ).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(\n this.panel,\n panelAnimation.keyframes,\n panelAnimation.options\n ).then(() => {\n this.panel.hidden = true;\n }),\n ]);\n\n this.dialog.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n unlockBodyScrolling(this);\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n /** Shows the dialog. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the dialog */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n dialog: true,\n 'dialog--open': this.open,\n 'dialog--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"dialog__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"dialog__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"dialog__header\">\n <h2 part=\"title\" class=\"dialog__header__text\" id=\"title\">\n <slot name=\"label\">\n ${this.label?.length\n ? this.label\n : nothing}\n </slot>\n ${this.sublabel || this.hasSlotController.test('sublabel')?html`\n <slot name=\"sublabel\">\n ${this.sublabel?.length\n ? this.sublabel\n : nothing}\n </slot>\n `:''}\n </h2>\n <div part=\"header-actions\" class=\"dialog__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"dialog__close\"\n name=\"close\"\n label=\"close\"\n color=\"var(--nile-dialog-remove-icon-color)\"\n @click=\"${() => this.requestClose('close-button')}\"\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot\n part=\"body\"\n class=\"dialog__body ${this.noHeader\n ? 'dialog__body-noheader'\n : ''}\"\n ></slot>\n\n <footer part=\"footer\" class=\"dialog__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\nsetDefaultAnimation('dialog.show', {\n keyframes: [\n { opacity: 0, scale: 0.8 },\n { opacity: 1, scale: 1 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.hide', {\n keyframes: [\n { opacity: 1, scale: 1 },\n { opacity: 0, scale: 0.8 }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('dialog.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.02 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('dialog.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\nexport default NileDialog;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-dialog': NileDialog;\n }\n}\n"]}
|
@@ -63,7 +63,6 @@ import type { CSSResultGroup, TemplateResult } from 'lit';
|
|
63
63
|
*/
|
64
64
|
export declare class NileDrawer extends NileElement {
|
65
65
|
static styles: CSSResultGroup;
|
66
|
-
protected BUBBLES: boolean;
|
67
66
|
private readonly hasSlotController;
|
68
67
|
private modal;
|
69
68
|
private originalTrigger;
|
@@ -77,7 +77,6 @@ import styles from './nile-drawer.css';
|
|
77
77
|
let NileDrawer = class NileDrawer extends NileElement {
|
78
78
|
constructor() {
|
79
79
|
super(...arguments);
|
80
|
-
this.BUBBLES = false;
|
81
80
|
this.hasSlotController = new HasSlotController(this, 'footer');
|
82
81
|
/**
|
83
82
|
* Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MA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era Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n protected override BUBBLES: boolean=false;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n */\n @property({ type: Boolean, reflect:true }) preventOverlayClose = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n if((source=='overlay' || source=='keyboard') && this.preventOverlayClose) return;\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EA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AAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC;AAEH,mBAAmB,CAAC,qBAAqB,EAAE;IACzC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Drawer doesnt close when clicled on overlay, the only way to close is to do by handling open property\n */\n @property({ type: Boolean, reflect:true }) preventOverlayClose = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n if((source=='overlay' || source=='keyboard') && this.preventOverlayClose) return;\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
|
@@ -18,7 +18,6 @@ export declare class NileEmptyState extends NileElement {
|
|
18
18
|
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
19
19
|
*/
|
20
20
|
static get styles(): CSSResultArray;
|
21
|
-
protected BUBBLES: boolean;
|
22
21
|
size: 'sm' | 'md' | 'lg';
|
23
22
|
variant: 'flat' | 'content' | 'tonal';
|
24
23
|
icon: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;
|
1
|
+
{"version":3,"file":"nile-empty-state.js","sourceRoot":"","sources":["../../../src/nile-empty-state/nile-empty-state.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAS,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAkC,MAAM,aAAa,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB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OACT;;OAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA;;wBAEb,IAAI,CAAC,IAAI;WACtB,CAAA,CAAC,CAAC,OACL;;OAED,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,CAAA;;;yBAGX,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;;WAEtF,CAAA,CAAC,CAAC,OACL;;;2CAGmC,IAAI,CAAC,IAAI;8CACN,IAAI,CAAC,OAAO;;;;;;;;GAQvD,CAAC;IACF,CAAC;CAGF,CAAA;AAxEa;IAAX,QAAQ,EAAE;4CAAiC;AAEhC;IAAX,QAAQ,EAAE;+CAGW;AAEV;IAAX,QAAQ,EAAE;4CAAwB;AACT;IAAzB,QAAQ,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,CAAC;iDAA4B;AAEzC;IAAX,QAAQ,EAAE;4CAA8B;AACP;IAAjC,QAAQ,CAAC,EAAC,SAAS,EAAC,UAAU,EAAC,CAAC;+CAA6B;AArBnD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAkF1B;SAlFY,cAAc;AAoF3B,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { state, html, nothing, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-empty-state.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile empty-state component.\n *\n * @tag nile-empty-state\n *\n */\n@customElement('nile-empty-state')\nexport class NileEmptyState extends NileElement {\n\n /**\n * The styles for nile-empty-state\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property() size: 'sm' | 'md' | 'lg' = 'md';\n\n @property() variant:\n | 'flat'\n | 'content'\n | 'tonal' = 'tonal';\n\n @property() icon: string = 'error';\n @property({type:Boolean}) grayscale: boolean = false;\n\n @property() text: String = 'Empty State';\n @property({attribute:'sub-text'}) subText: String = 'No Data';\n\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html`\n\t\t<div class=\"${classMap({\n 'empty-state': true,\n 'empty-state--sm': this.size == 'sm',\n 'empty-state--md': this.size == 'md',\n 'empty-state--lg': this.size == 'lg'\n })}\">\n <div class=\"${classMap({ 'empty-state__body': true })}\">\n\n ${this.variant == 'content' ? html`\n <div class=\"empty-state__body--content\">\n \n <div src=\"\" class=\"${classMap({ 'empty-state__image': true, 'empty-state__image--grayscale':this.grayscale })}\"></div>\n ${!this.icon ? nothing : html`\n <div class=\"empty-state__img__icon\">\n <nile-icon name=\"${this.icon}\" color=\"white\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\"></nile-icon>\n </div>`\n }\n </div>`: nothing\n }\n\t\t\t\t\n\t\t\t ${this.variant == 'tonal' ? html`\n\t\t\t\t<div class=\"empty-state__body--tonal\">\n\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"40\"></nile-icon>\n\t\t\t\t</div>`: nothing\n }\n\n\t\t\t ${this.variant == 'flat' ? html`\n\t\t\t\t<div class=\"empty-state__body--flat\">\n\t\t\t\t\t<span class=\"nile-flat-type-icon\">\n\t\t\t\t\t\t<nile-icon name=\"${this.icon}\" size=\"${this.size == 'sm' ? 24 : this.size == 'md' ? 24 : 28}\" variant=\"secondary\"></nile-icon>\n\t\t\t\t\t</span>\n\t\t\t\t</div>`: nothing\n }\n \n <div class=\"empty__state__text-section\">\n <div class=\"empty-state__text\">${this.text}</div>\n <div class=\"empty-state__subtext\">${this.subText}</div>\n </div>\n\t\t\t</div>\n\n\t\t\t<div class=\"empty-state-actions\">\n\t\t\t\t<slot></slot>\n\t\t\t</div>\n\t\t</div>\n\t\t`;\n }\n\n /* #endregion */\n}\n\nexport default NileEmptyState;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-empty-state': NileEmptyState;\n }\n}"]}
|
@@ -24,13 +24,14 @@ export declare class NileHighlighter extends NileElement {
|
|
24
24
|
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
25
25
|
*/
|
26
26
|
static get styles(): CSSResultArray;
|
27
|
-
connectedCallback(): Promise<void>;
|
28
27
|
protected updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>): Promise<void>;
|
29
28
|
/**
|
30
29
|
* Render method
|
31
30
|
* @slot This is a slot test
|
32
31
|
*/
|
33
32
|
render(): TemplateResult;
|
33
|
+
updateHighlighter(): Promise<void>;
|
34
|
+
updateHighlightedCode(): Promise<void>;
|
34
35
|
}
|
35
36
|
export default NileHighlighter;
|
36
37
|
declare global {
|
@@ -10,7 +10,6 @@ import { customElement, state } from 'lit/decorators.js';
|
|
10
10
|
import { styles } from './nile-highlighter.css';
|
11
11
|
import NileElement from '../internal/nile-element';
|
12
12
|
import { createHighlighter } from 'shiki';
|
13
|
-
import { themes, languages } from './theme-list';
|
14
13
|
/**
|
15
14
|
* Nile highlighter component.
|
16
15
|
*
|
@@ -34,18 +33,12 @@ let NileHighlighter = class NileHighlighter extends NileElement {
|
|
34
33
|
return [styles];
|
35
34
|
}
|
36
35
|
/* #endregion */
|
37
|
-
async connectedCallback() {
|
38
|
-
this.highlighter = await createHighlighter({
|
39
|
-
themes: [...themes],
|
40
|
-
langs: [...languages],
|
41
|
-
});
|
42
|
-
}
|
43
36
|
async updated(changedProperties) {
|
37
|
+
if (changedProperties.has('language') || changedProperties.has('theme')) {
|
38
|
+
await this.updateHighlighter();
|
39
|
+
}
|
44
40
|
if (changedProperties.has('code') || changedProperties.has('language') || changedProperties.has('theme')) {
|
45
|
-
|
46
|
-
lang: this.language,
|
47
|
-
theme: this.theme
|
48
|
-
});
|
41
|
+
await this.updateHighlightedCode();
|
49
42
|
}
|
50
43
|
}
|
51
44
|
/* #region Methods */
|
@@ -58,6 +51,18 @@ let NileHighlighter = class NileHighlighter extends NileElement {
|
|
58
51
|
<div class="code-container" .innerHTML=${this.highlightedCode}></div>
|
59
52
|
`;
|
60
53
|
}
|
54
|
+
async updateHighlighter() {
|
55
|
+
this.highlighter = await createHighlighter({
|
56
|
+
themes: [this.theme],
|
57
|
+
langs: [this.language],
|
58
|
+
});
|
59
|
+
}
|
60
|
+
async updateHighlightedCode() {
|
61
|
+
this.highlightedCode = await this.highlighter.codeToHtml(this.code, {
|
62
|
+
lang: this.language,
|
63
|
+
theme: this.theme,
|
64
|
+
});
|
65
|
+
}
|
61
66
|
};
|
62
67
|
__decorate([
|
63
68
|
property({ type: String })
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-highlighter.js","sourceRoot":"","sources":["../../../src/nile-highlighter/nile-highlighter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,
|
1
|
+
{"version":3,"file":"nile-highlighter.js","sourceRoot":"","sources":["../../../src/nile-highlighter/nile-highlighter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAoD,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIzC;;;;;GAKG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IAAzC;;QAEqB,SAA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IAAI,EAAE,MAAM,EAAC,CAAC;6CAAW;AAEK;IAAzC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAC,IAAI,EAAE,CAAC;iDAAyC;AAExC;IAAzC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAC,IAAI,EAAE,CAAC;8CAAiC;AAEjE;IAAR,KAAK,EAAE;wDAAsB;AARlB,eAAe;IAD3B,aAAa,CAAC,kBAAkB,CAAC;GACrB,eAAe,CAwD3B;SAxDY,eAAe;AA0D5B,eAAe,eAAe,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, CSSResultArray, TemplateResult, PropertyValueMap } from 'lit-element';\nimport { customElement, state } from 'lit/decorators.js';\nimport { styles } from './nile-highlighter.css';\nimport NileElement from '../internal/nile-element';\n\nimport { createHighlighter } from 'shiki'\nimport { ShikiTheme, ShikiLanguage } from './theme-list';\n\n\n/**\n * Nile highlighter component.\n *\n * @tag nile-highlighter\n *\n */\n@customElement('nile-highlighter')\nexport class NileHighlighter extends NileElement {\n\n\t@property({ type: String}) code = ``;\n\t\n\t@property({ type: String, reflect:true }) language : ShikiLanguage = 'javascript';\n\n\t@property({ type: String, reflect:true }) theme: ShikiTheme = 'min-light';\n\n\t@state() highlightedCode = '';\n\n\tprivate highlighter:any;\n\t\n\t/**\n\t * The styles for nile-highlighter\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\tprotected async updated(changedProperties: PropertyValueMap<any> | Map<PropertyKey, unknown>) {\n\t\tif (changedProperties.has('language') || changedProperties.has('theme')) {\n\t\t\tawait this.updateHighlighter()\n\t\t}\n\t\tif (changedProperties.has('code') || changedProperties.has('language') || changedProperties.has('theme')) {\n\t\t\tawait this.updateHighlightedCode()\n\t\t}\n\t}\n\t/* #region Methods */\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t\t<div class=\"code-container\" .innerHTML=${this.highlightedCode}></div>\n\t\t\t`;\n\t}\n\n\tasync updateHighlighter(){\n\t\tthis.highlighter = await createHighlighter({\n\t\t\tthemes: [this.theme],\n\t\t\tlangs: [this.language],\n\t\t})\n\t}\n\n\tasync updateHighlightedCode(){\n\t\tthis.highlightedCode = await this.highlighter.codeToHtml(this.code, {\n\t\t\tlang: this.language,\n\t\t\ttheme: this.theme,\n\t\t});\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileHighlighter;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-highlighter': NileHighlighter;\n\t}\n}"]}
|
@@ -273,6 +273,7 @@ export { default as info } from './info';
|
|
273
273
|
export { default as info2 } from './info2';
|
274
274
|
export { default as innerunion } from './inner-union';
|
275
275
|
export { default as inprogress } from './inprogress';
|
276
|
+
export { default as insertatcursor } from './insert-at-cursor';
|
276
277
|
export { default as integer } from './integer';
|
277
278
|
export { default as intersection } from './intersection';
|
278
279
|
export { default as itemplaceholder } from './itemplaceholder';
|
@@ -537,6 +538,7 @@ export { default as virtualservergroup } from './virtualservergroup';
|
|
537
538
|
export { default as visibility } from './visibility';
|
538
539
|
export { default as visibilityoff } from './visibilityoff';
|
539
540
|
export { default as wait } from './wait';
|
541
|
+
export { default as warning01 } from './warning-01';
|
540
542
|
export { default as warning } from './warning';
|
541
543
|
export { default as while } from './while';
|
542
544
|
export { default as whileloop } from './whileloop';
|
@@ -273,6 +273,7 @@ export { default as info } from './info';
|
|
273
273
|
export { default as info2 } from './info2';
|
274
274
|
export { default as innerunion } from './inner-union';
|
275
275
|
export { default as inprogress } from './inprogress';
|
276
|
+
export { default as insertatcursor } from './insert-at-cursor';
|
276
277
|
export { default as integer } from './integer';
|
277
278
|
export { default as intersection } from './intersection';
|
278
279
|
export { default as itemplaceholder } from './itemplaceholder';
|
@@ -537,6 +538,7 @@ export { default as virtualservergroup } from './virtualservergroup';
|
|
537
538
|
export { default as visibility } from './visibility';
|
538
539
|
export { default as visibilityoff } from './visibilityoff';
|
539
540
|
export { default as wait } from './wait';
|
541
|
+
export { default as warning01 } from './warning-01';
|
540
542
|
export { default as warning } from './warning';
|
541
543
|
export { default as while } from './while';
|
542
544
|
export { default as whileloop } from './whileloop';
|