@aquera/nile-elements 1.5.4 → 1.5.6
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/index.css +9 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +871 -255
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +13 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +89 -33
- package/dist/nile-button/nile-button.esm.js +2 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +59 -2
- package/dist/nile-calendar/nile-calendar.esm.js +16 -10
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +4 -5
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +37 -23
- 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.css.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.esm.js +7 -6
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -1
- 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 +4 -4
- package/dist/nile-detail/index.cjs.js +2 -0
- package/dist/nile-detail/index.cjs.js.map +1 -0
- package/dist/nile-detail/index.esm.js +1 -0
- package/dist/nile-detail/nile-detail.cjs.js +2 -0
- package/dist/nile-detail/nile-detail.cjs.js.map +1 -0
- package/dist/nile-detail/nile-detail.css.cjs.js +2 -0
- package/dist/nile-detail/nile-detail.css.cjs.js.map +1 -0
- package/dist/nile-detail/nile-detail.css.esm.js +149 -0
- package/dist/nile-detail/nile-detail.esm.js +45 -0
- package/dist/nile-detail/nile-detail.utils.cjs.js +2 -0
- package/dist/nile-detail/nile-detail.utils.cjs.js.map +1 -0
- package/dist/nile-detail/nile-detail.utils.esm.js +1 -0
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +2 -2
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +24 -2
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +2 -2
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.esm.js +15 -6
- package/dist/nile-inline-edit/nile-inline-edit.esm.js +2 -2
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar/nile-inline-sidebar.css.esm.js +19 -0
- package/dist/nile-inline-sidebar/nile-inline-sidebar.esm.js +16 -14
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.cjs.js.map +1 -1
- package/dist/nile-inline-sidebar-item/nile-inline-sidebar-item.esm.js +8 -3
- package/dist/nile-input/nile-input.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +4 -4
- 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.css.cjs.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.esm.js +3 -4
- package/dist/nile-link/nile-link.esm.js +2 -2
- package/dist/nile-pagination/nile-pagination.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js +1 -1
- package/dist/nile-pagination/nile-pagination.css.cjs.js.map +1 -1
- package/dist/nile-pagination/nile-pagination.css.esm.js +109 -5
- package/dist/nile-pagination/nile-pagination.esm.js +70 -3
- package/dist/nile-qr-code/index.cjs.js +2 -0
- package/dist/nile-qr-code/index.cjs.js.map +1 -0
- package/dist/nile-qr-code/index.esm.js +1 -0
- package/dist/nile-qr-code/nile-qr-code-utils.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code-utils.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code-utils.esm.js +1 -0
- package/dist/nile-qr-code/nile-qr-code.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code.css.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code.css.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code.css.esm.js +12 -0
- package/dist/nile-qr-code/nile-qr-code.esm.js +9 -0
- package/dist/nile-radio/nile-radio.css.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.css.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.css.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +25 -6
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.esm.js +4 -3
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +7 -4
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +5 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.esm.js +10 -5
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +5 -3
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +11 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +89 -33
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.js +5 -5
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +57 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +1 -0
- package/dist/src/nile-calendar/nile-calendar.js +24 -6
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +4 -5
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.css.js +35 -21
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.css.js +7 -6
- package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +7 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +3 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +22 -2
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-detail/index.d.ts +1 -0
- package/dist/src/nile-detail/index.js +2 -0
- package/dist/src/nile-detail/index.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.css.d.ts +3 -0
- package/dist/src/nile-detail/nile-detail.css.js +152 -0
- package/dist/src/nile-detail/nile-detail.css.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.d.ts +29 -0
- package/dist/src/nile-detail/nile-detail.js +143 -0
- package/dist/src/nile-detail/nile-detail.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.test.d.ts +1 -0
- package/dist/src/nile-detail/nile-detail.test.js +168 -0
- package/dist/src/nile-detail/nile-detail.test.js.map +1 -0
- package/dist/src/nile-detail/nile-detail.utils.d.ts +8 -0
- package/dist/src/nile-detail/nile-detail.utils.js +117 -0
- package/dist/src/nile-detail/nile-detail.utils.js.map +1 -0
- package/dist/src/nile-dropdown/nile-dropdown.d.ts +1 -0
- package/dist/src/nile-dropdown/nile-dropdown.js +11 -0
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.js +11 -6
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +22 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.js +6 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.js.map +1 -1
- package/dist/src/nile-inline-edit/nile-inline-edit.css.js +15 -6
- package/dist/src/nile-inline-edit/nile-inline-edit.css.js.map +1 -1
- package/dist/src/nile-inline-edit/nile-inline-edit.d.ts +2 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.js +7 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js +19 -0
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.css.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.d.ts +6 -0
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js +88 -4
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.js.map +1 -1
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.test.d.ts +3 -0
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.test.js +110 -0
- package/dist/src/nile-inline-sidebar/nile-inline-sidebar.test.js.map +1 -0
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.d.ts +2 -0
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.js +109 -0
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.js.map +1 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.d.ts +4 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js +30 -2
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.d.ts +2 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.js +109 -0
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.js.map +1 -0
- package/dist/src/nile-input/nile-input.css.js +4 -4
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.css.js +1 -2
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.js +1 -0
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.css.js +107 -3
- package/dist/src/nile-pagination/nile-pagination.css.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.d.ts +5 -1
- package/dist/src/nile-pagination/nile-pagination.js +84 -1
- package/dist/src/nile-pagination/nile-pagination.js.map +1 -1
- package/dist/src/nile-pagination/nile-pagination.test.js +1187 -103
- package/dist/src/nile-pagination/nile-pagination.test.js.map +1 -1
- package/dist/src/nile-qr-code/index.d.ts +1 -0
- package/dist/src/nile-qr-code/index.js +2 -0
- package/dist/src/nile-qr-code/index.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.d.ts +15 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.js +678 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.d.ts +12 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.js +24 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.d.ts +127 -0
- package/dist/src/nile-qr-code/nile-qr-code.js +381 -0
- package/dist/src/nile-qr-code/nile-qr-code.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.d.ts +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.js +719 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.js.map +1 -0
- package/dist/src/nile-radio/nile-radio.css.js +1 -1
- package/dist/src/nile-radio/nile-radio.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +25 -6
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +17 -6
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-select.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-select.js +7 -2
- package/dist/src/nile-rich-text-editor/nile-rte-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +7 -4
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +5 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.css.js +10 -5
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +5 -3
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/version.js +1 -1
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/src/index.ts +3 -2
- package/src/nile-auto-complete/nile-auto-complete.css.ts +11 -0
- package/src/nile-button/nile-button.css.ts +89 -33
- package/src/nile-button/nile-button.ts +6 -5
- package/src/nile-calendar/nile-calendar.css.ts +57 -0
- package/src/nile-calendar/nile-calendar.ts +17 -6
- package/src/nile-checkbox/nile-checkbox.css.ts +4 -5
- package/src/nile-chip/nile-chip.css.ts +35 -21
- package/src/nile-code-editor/nile-code-editor.css.ts +7 -6
- package/src/nile-code-editor/nile-code-editor.ts +7 -1
- package/src/nile-date-picker/nile-date-picker.ts +22 -2
- package/src/nile-detail/index.ts +1 -0
- package/src/nile-detail/nile-detail.css.ts +153 -0
- package/src/nile-detail/nile-detail.test.ts +215 -0
- package/src/nile-detail/nile-detail.ts +140 -0
- package/src/nile-detail/nile-detail.utils.ts +133 -0
- package/src/nile-dropdown/nile-dropdown.ts +11 -0
- package/src/nile-file-upload/utils/file-validation.util.ts +10 -5
- package/src/nile-filter-chip/nile-filter-chip.css.ts +22 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +2 -0
- package/src/nile-inline-edit/nile-inline-edit.css.ts +15 -6
- package/src/nile-inline-edit/nile-inline-edit.ts +4 -0
- package/src/nile-inline-sidebar/nile-inline-sidebar.css.ts +19 -0
- package/src/nile-inline-sidebar/nile-inline-sidebar.test.ts +108 -0
- package/src/nile-inline-sidebar/nile-inline-sidebar.ts +108 -5
- package/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.ts +107 -0
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.ts +107 -0
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.ts +34 -3
- package/src/nile-input/nile-input.css.ts +4 -4
- package/src/nile-link/nile-link.css.ts +1 -2
- package/src/nile-link/nile-link.ts +1 -0
- package/src/nile-pagination/nile-pagination.css.ts +107 -3
- package/src/nile-pagination/nile-pagination.test.ts +1388 -101
- package/src/nile-pagination/nile-pagination.ts +87 -2
- package/src/nile-qr-code/index.ts +1 -0
- package/src/nile-qr-code/nile-qr-code-utils.ts +733 -0
- package/src/nile-qr-code/nile-qr-code.css.ts +26 -0
- package/src/nile-qr-code/nile-qr-code.test.ts +879 -0
- package/src/nile-qr-code/nile-qr-code.ts +431 -0
- package/src/nile-radio/nile-radio.css.ts +1 -1
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +25 -6
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +14 -6
- package/src/nile-rich-text-editor/nile-rte-select.ts +5 -2
- package/src/nile-select/nile-select.css.ts +7 -4
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +5 -1
- package/src/nile-textarea/nile-textarea.css.ts +10 -5
- package/src/nile-virtual-select/nile-virtual-select.css.ts +5 -3
- package/vscode-html-custom-data.json +163 -10
- package/web-test-runner.config.mjs +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){o=_lit.css;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n *{\n box-sizing:border-box;\n }\n\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .code__editor__container {\n display: flex;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n position: relative;\n }\n\n .no-scroller .cm-scroller{\n scrollbar-width: none;\n }\n\n .error {\n border-color: var(--nile-colors-red-500, var(--ng-componentcolors-utility-error-600));\n }\n\n .disabled {\n
|
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){o=_lit.css;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n *{\n box-sizing:border-box;\n }\n\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .code__editor__container {\n display: flex;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n position: relative;\n }\n\n .no-scroller .cm-scroller{\n scrollbar-width: none;\n }\n\n .error {\n border-color: var(--nile-colors-red-500, var(--ng-componentcolors-utility-error-600));\n }\n\n .disabled {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n cursor: not-allowed;\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n}\n\n .disabled .cm-editor {\n cursor: not-allowed;\n }\n\n .noborder {\n border: none;\n }\n\n .cm-editor {\n flex: 1;\n min-width: 0;\n }\n\n .\u037C1.cm-focused {\n outline: none;\n }\n\n .cm-gutters{\n border-top-left-radius:var(--nile-spacing-spacing-none, var(--ng-radius-md));\n border-bottom-left-radius:var(--nile-spacing-spacing-none, var(--ng-radius-md));\n }\n\n .expand__icon__container{\n display: none;\n position: absolute;\n border-radius: var(--nile-radius-base-standard, var(--ng-radius-none));\n cursor: pointer;\n right: var(--nile-spacing-none, var(--ng-spacing-1-5));\n top: 5px;\n z-index: 1;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n \n .code__editor__container:hover > .expand__icon__container{\n display: flex;\n }\n\n .code__editor__container.disabled .expand__icon__container{\n display: none;\n }\n"]))));}};});
|
|
2
2
|
//# sourceMappingURL=nile-code-editor.css.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-code-editor.css.cjs.js","sources":["../../../src/nile-code-editor/nile-code-editor.css.ts"],"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 { css } from 'lit';\n\n/**\n * CodeEditor CSS\n */\nexport const styles = css`\n *{\n box-sizing:border-box;\n }\n\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .code__editor__container {\n display: flex;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n position: relative;\n }\n\n .no-scroller .cm-scroller{\n scrollbar-width: none;\n }\n\n .error {\n border-color: var(--nile-colors-red-500, var(--ng-componentcolors-utility-error-600));\n }\n\n .disabled {\n
|
|
1
|
+
{"version":3,"file":"nile-code-editor.css.cjs.js","sources":["../../../src/nile-code-editor/nile-code-editor.css.ts"],"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 { css } from 'lit';\n\n/**\n * CodeEditor CSS\n */\nexport const styles = css`\n *{\n box-sizing:border-box;\n }\n\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .code__editor__container {\n display: flex;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-neutral-500, var(--ng-colors-border-secondary));\n position: relative;\n }\n\n .no-scroller .cm-scroller{\n scrollbar-width: none;\n }\n\n .error {\n border-color: var(--nile-colors-red-500, var(--ng-componentcolors-utility-error-600));\n }\n\n .disabled {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n cursor: not-allowed;\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n}\n\n .disabled .cm-editor {\n cursor: not-allowed;\n }\n\n .noborder {\n border: none;\n }\n\n .cm-editor {\n flex: 1;\n min-width: 0;\n }\n\n .ͼ1.cm-focused {\n outline: none;\n }\n\n .cm-gutters{\n border-top-left-radius:var(--nile-spacing-spacing-none, var(--ng-radius-md));\n border-bottom-left-radius:var(--nile-spacing-spacing-none, var(--ng-radius-md));\n }\n\n .expand__icon__container{\n display: none;\n position: absolute;\n border-radius: var(--nile-radius-base-standard, var(--ng-radius-none));\n cursor: pointer;\n right: var(--nile-spacing-none, var(--ng-spacing-1-5));\n top: 5px;\n z-index: 1;\n padding: var(--nile-spacing-5px, var(--ng-spacing-none));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n \n .code__editor__container:hover > .expand__icon__container{\n display: flex;\n }\n\n .code__editor__container.disabled .expand__icon__container{\n display: none;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -27,11 +27,12 @@ import{css as o}from"lit";const r=o`
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.disabled {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
31
|
+
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));
|
|
32
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
33
|
+
cursor: not-allowed;
|
|
34
|
+
opacity: var(--nile-opacity-50, var(--ng-opacity-50));
|
|
35
|
+
}
|
|
35
36
|
|
|
36
37
|
.disabled .cm-editor {
|
|
37
38
|
cursor: not-allowed;
|
|
@@ -65,7 +66,7 @@ import{css as o}from"lit";const r=o`
|
|
|
65
66
|
z-index: 1;
|
|
66
67
|
padding: var(--nile-spacing-5px, var(--ng-spacing-none));
|
|
67
68
|
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
68
|
-
|
|
69
|
+
}
|
|
69
70
|
|
|
70
71
|
.code__editor__container:hover > .expand__icon__container{
|
|
71
72
|
display: flex;
|
|
@@ -16,4 +16,4 @@ import{__decorate as O}from"tslib";import{html as e}from"lit";import{query as t,
|
|
|
16
16
|
<nile-form-error-message
|
|
17
17
|
>${this.errorMessage}</nile-form-error-message
|
|
18
18
|
>
|
|
19
|
-
`:""}`}createNewView(O=!0){this.view&&this.view.destroy(),this.createState(),this.view=new y({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(O=>{this.checkForSpaceKey(O),this.handleEscapeKey(O)}),!0),O&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(O){"Space"!==O.code||O.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}closeCompletion(){this.view&&U(this.view)}handleEscapeKey(O){"Escape"===O.key&&this.view&&null!==G(this.view.state)&&(O.stopPropagation(),O.preventDefault(),U(this.view))}createState(){const O=this.lineNumbersComp.of(this.getLineNumbersExension()),e=this.readOnlyComp.of(this.getReadOnlyExtension()),t=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),a=this.themeComp.of(this.getCustomThemeExtension()),r=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),l=this.autoCompleteStyleComp.of(this.getAutoCompleteStyleExtension()),s=this.getLanguageExtension(),n=this.customCompletionComp.of(IO.data.of({autocomplete:this.customAutocomplete}));return this.viewState=z.create({doc:this.multiline?this.value:Ti(this.value),extensions:[E({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),O,e,t,n,i,r,this.autoCompletionComp.of(W({aboveCursor:this.aboveCursor})),s,a,l,this.getTabCompletionKeymap(),y.updateListener.of((O=>{O.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),y.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(O,e,t){if(!function(O){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(O)}(e)||![".","["].includes(e.at(-1)))return null;const i=function(O){const e=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,t=[...O.matchAll(e)];if(t.length>0){const e=[t[0][1]],i=O.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const O of i)O.startsWith("[")?e.push(O.slice(1,-1).replace(/['"]/g,"")):O.startsWith(".")&&e.push(O.slice(1));return e}return null}(e);if(!i)return null;const a=t.replace(/["'\[]/g,""),r=a!==t,l="["===e.at(-1);if("."===e.at(-1)&&r)return null;let s=(n=this.customAutoCompletions,i.reduce(((O,e)=>O&&"object"==typeof O?O[e]:null),n));var n;return s&&"object"==typeof s?(a&&(s=Object.fromEntries(Object.entries(s).filter((([O])=>O.toLowerCase().startsWith(a.toLowerCase()))))),{from:O.pos-a.length,options:Object.keys(s).map((O=>({label:O,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!l||r?O:`'${O}'`,boost:999})))}):null}getTopLevelSuggestions(O,e){const t=e.match(/([a-zA-Z_$][\w$]*)$/);if(!t){if(""===e.trim()&&!this.isSpacePressed){const e=Object.keys(this.customAutoCompletions).filter((O=>Object.keys(this.customAutoCompletions[O]).length)).map((O=>({label:O,type:"property",apply:O,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((O=>{e.push({label:""+O,type:"property",apply:""+O,boost:998})})),{from:O.pos,options:e}}return null}const i=Object.keys(this.customAutoCompletions).filter((O=>Object.keys(this.customAutoCompletions[O]).length&&O.toLowerCase().startsWith(e.toLowerCase()))).map((O=>({label:O,type:"property",apply:O,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((O=>O.toLocaleLowerCase().includes(e.toLocaleLowerCase()))).forEach((O=>{i.push({label:""+O,type:"property",apply:""+O,boost:998})})),{from:O.pos-t[1].length,options:i}}emitAfterTimeout(O){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",O,!1)),this.debounceTimeout)}focusAtPosition(O=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:O}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:Ti(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?M():[]}getLanguageExtension(){switch(this.language){case"sql":return function(O={}){let e=O.dialect||Ve;return new m(e.language,[je(O),Ye(e,!!O.upperCaseKeywords)])}();case"json":return new m(Ge);case"html":return function(O={}){let e,t="";!1===O.matchClosingTags&&(t="noMatch"),!0===O.selfClosingTags&&(t=(t?t+" ":"")+"selfClosing"),(O.nestedLanguages&&O.nestedLanguages.length||O.nestedAttributes&&O.nestedAttributes.length)&&(e=ht((O.nestedLanguages||[]).concat(xi),(O.nestedAttributes||[]).concat(ki)));let i=e?vi.configure({wrap:e,dialect:t}):t?qi.configure({dialect:t}):qi;return new m(i,[qi.data.of({autocomplete:yi(O)}),!1!==O.autoCloseTags?Ri:[],ii().support,new m(Wt,Wt.data.of({autocomplete:Vt})).support])}();default:return function(O={}){let e=O.jsx?O.typescript?FO:KO:O.typescript?NO:IO,t=O.typescript?UO.concat(ee):WO.concat(Oe);return new m(e,[IO.data.of({autocomplete:g(BO,X(t))}),IO.data.of({autocomplete:DO}),O.jsx?ae:[]])}()}}getReadOnlyExtension(){return this.readonly||this.disabled?z.readOnly.of(!0):[]}getSingleLineExtension(){return this.multiline?[]:z.transactionFilter.of((O=>O.newDoc.lines>1?[]:O))}getPlaceholderExtension(){return this.placeholder?C(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:A(B,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[y.theme(this.customThemeCSS),y.theme(J),y.theme(N)]:[y.theme(this.customThemeCSS),y.theme(J)]:this.defaultFont?[y.theme(J),y.theme(N)]:[y.theme(J)]}getAutoCompleteStyleExtension(O){if(this.autoCompleteStyle?.width){const e=(O||(this.codeEditor?this.codeEditor.getBoundingClientRect().width:300))*parseFloat(this.autoCompleteStyle.width.replace("%",""))/100,t=this.autoCompleteStyle.multiline?{overflow:"visible",textOverflow:"unset",whiteSpace:"normal",wordWrap:"break-word"}:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};return[L({position:"fixed",tooltipSpace:()=>{const O=this.codeEditor.getBoundingClientRect();return{left:O.left,top:0,right:O.right,bottom:1e3}}}),y.theme({".cm-tooltip.cm-tooltip-autocomplete":{maxWidth:e-15+"px !important"},".cm-tooltip.cm-tooltip-autocomplete > ul > li":{...t,maxWidth:"100%"},".cm-tooltip.cm-tooltip-autocomplete > ul":{minWidth:"unset !important"}})]}return[]}updateAutocompleteWidth(O){this.view&&this.view.dispatch({effects:this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension(O))})}restrictSingleLine(){return z.transactionFilter.of((O=>O.newDoc.lines>1?[]:O))}};function Ti(O){return O?O.replace(/\s+/g," ").trim():""}O([t(".code__editor__container")],Yi.prototype,"codeEditor",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"value",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"expandIcon",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"placeholder",void 0),O([i({type:Object,reflect:!0,attribute:!0})],Yi.prototype,"customAutoCompletions",void 0),O([i({type:Array,reflect:!0,attribute:!0})],Yi.prototype,"customCompletionsPaths",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"language",void 0),O([i({type:String,reflect:!0,attribute:"error-message"})],Yi.prototype,"errorMessage",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"error",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"enableSearch",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"noborder",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"multiline",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"enableFoldGutters",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"allowVariableInCustomSuggestion",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"lineNumbers",void 0),O([i({type:Boolean,reflect:!0,attribute:!1})],Yi.prototype,"disableSyntaxHighlighting",void 0),O([i({type:Object,attribute:!1})],Yi.prototype,"customThemeCSS",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"lineNumbersMultiline",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"hasScroller",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"expandable",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"readonly",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"disabled",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"debounce",void 0),O([i({type:Number,reflect:!0,attribute:!0})],Yi.prototype,"debounceTimeout",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"aboveCursor",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"tabCompletion",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"defaultFont",void 0),O([i({type:Object,attribute:!1})],Yi.prototype,"autoCompleteStyle",void 0),Yi=O([a("nile-code-editor")],Yi);export{Yi as N};
|
|
19
|
+
`:""}`}createNewView(O=!0){this.view&&this.view.destroy(),this.createState(),this.view=new y({state:this.viewState,parent:this.codeEditor}),this.view.dom.addEventListener("keydown",(O=>{this.checkForSpaceKey(O),this.handleEscapeKey(O)}),!0),O&&this.emit("nile-after-update",{createNewView:this.createNewView,codeMirrorInstance:this.view},!1)}checkForSpaceKey(O){"Space"!==O.code||O.ctrlKey?this.isSpacePressed=!1:this.isSpacePressed=!0}closeCompletion(){this.view&&U(this.view)}handleEscapeKey(O){"Escape"===O.key&&this.view&&null!==G(this.view.state)&&(O.stopPropagation(),O.preventDefault(),U(this.view))}createState(){const O=this.lineNumbersComp.of(this.getLineNumbersExension()),e=this.readOnlyComp.of(this.getReadOnlyExtension()),t=this.restrictSingleLineComp.of(this.getSingleLineExtension()),i=this.placeholderComp.of(this.getPlaceholderExtension()),a=this.themeComp.of(this.getCustomThemeExtension()),r=this.defaultSyntaxHighlightingComp.of(this.getDefaultSyntaxHighlightingExtension()),l=this.autoCompleteStyleComp.of(this.getAutoCompleteStyleExtension()),s=this.getLanguageExtension(),n=this.customCompletionComp.of(IO.data.of({autocomplete:this.customAutocomplete}));return this.viewState=z.create({doc:this.multiline?this.value:Ti(this.value),extensions:[E({highlightActiveLine:!1,foldGutter:this.enableFoldGutters,enableSearch:this.enableSearch}),O,e,t,n,i,r,this.autoCompletionComp.of(W({aboveCursor:this.aboveCursor})),s,a,l,this.getTabCompletionKeymap(),y.updateListener.of((O=>{O.docChanged&&(this.debounce?this.emitAfterTimeout({value:this.view.state.doc.toString()}):this.emit("nile-change",{value:this.view.state.doc.toString()}))})),y.domEventHandlers({focus:()=>this.dispatchEvent(new Event("nile-focus")),blur:()=>this.dispatchEvent(new Event("nile-blur"))})]}),this.viewState}getNestedSuggestions(O,e,t){if(!function(O){return/^([a-zA-Z_$][\w$]*)(\.[a-zA-Z_$][\w$]*|\[\s*(['"]?[a-zA-Z0-9_$]*['"]?)\s*\])*([\.\[])?$/.test(O)}(e)||![".","["].includes(e.at(-1)))return null;const i=function(O){const e=/([a-zA-Z_$][\w$]*)(\[(?:[^\]]+)\]|\.[a-zA-Z_$][\w$]*)*/g,t=[...O.matchAll(e)];if(t.length>0){const e=[t[0][1]],i=O.match(/\[(.*?)\]|\.(\w+)/g)||[];for(const O of i)O.startsWith("[")?e.push(O.slice(1,-1).replace(/['"]/g,"")):O.startsWith(".")&&e.push(O.slice(1));return e}return null}(e);if(!i)return null;const a=t.replace(/["'\[]/g,""),r=a!==t,l="["===e.at(-1);if("."===e.at(-1)&&r)return null;let s=(n=this.customAutoCompletions,i.reduce(((O,e)=>O&&"object"==typeof O?O[e]:null),n));var n;return s&&"object"==typeof s?(a&&(s=Object.fromEntries(Object.entries(s).filter((([O])=>O.toLowerCase().startsWith(a.toLowerCase()))))),{from:O.pos-a.length,options:Object.keys(s).map((O=>({label:O,type:"property",info:`Key of ${i[i.length-1]}`,apply:this.allowVariableInCustomSuggestion||!l||r?O:`'${O}'`,boost:999})))}):null}getTopLevelSuggestions(O,e){const t=e.match(/([a-zA-Z_$][\w$]*)$/);if(!t){if(""===e.trim()&&!this.isSpacePressed){const e=Object.keys(this.customAutoCompletions).filter((O=>Object.keys(this.customAutoCompletions[O]).length)).map((O=>({label:O,type:"property",apply:O,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.forEach((O=>{e.push({label:""+O,type:"property",apply:""+O,boost:998})})),{from:O.pos,options:e}}return null}const i=Object.keys(this.customAutoCompletions).filter((O=>Object.keys(this.customAutoCompletions[O]).length&&O.toLowerCase().startsWith(e.toLowerCase()))).map((O=>({label:O,type:"property",apply:O,boost:999})));return this.customCompletionsPaths.length&&this.customCompletionsPaths.filter((O=>O.toLocaleLowerCase().includes(e.toLocaleLowerCase()))).forEach((O=>{i.push({label:""+O,type:"property",apply:""+O,boost:998})})),{from:O.pos-t[1].length,options:i}}emitAfterTimeout(O){this.timeOut&&clearTimeout(this.timeOut),this.timeOut=setTimeout((()=>this.emit("nile-change",O,!1)),this.debounceTimeout)}focusAtPosition(O=this.view.state.doc.toString().length){this.view&&(this.view.dispatch({selection:{anchor:O}}),this.view.focus())}singleLineMultiLineToggle(){this.view.dispatch({changes:{from:0,to:this.view.state.doc.length,insert:this.multiline?this.value:Ti(this.value)}})}getLineNumbersExension(){return!this.multiline&&this.lineNumbers||this.multiline&&this.lineNumbersMultiline?M():[]}getLanguageExtension(){switch(this.language){case"sql":return function(O={}){let e=O.dialect||Ve;return new m(e.language,[je(O),Ye(e,!!O.upperCaseKeywords)])}();case"json":return new m(Ge);case"html":return function(O={}){let e,t="";!1===O.matchClosingTags&&(t="noMatch"),!0===O.selfClosingTags&&(t=(t?t+" ":"")+"selfClosing"),(O.nestedLanguages&&O.nestedLanguages.length||O.nestedAttributes&&O.nestedAttributes.length)&&(e=ht((O.nestedLanguages||[]).concat(xi),(O.nestedAttributes||[]).concat(ki)));let i=e?vi.configure({wrap:e,dialect:t}):t?qi.configure({dialect:t}):qi;return new m(i,[qi.data.of({autocomplete:yi(O)}),!1!==O.autoCloseTags?Ri:[],ii().support,new m(Wt,Wt.data.of({autocomplete:Vt})).support])}();default:return function(O={}){let e=O.jsx?O.typescript?FO:KO:O.typescript?NO:IO,t=O.typescript?UO.concat(ee):WO.concat(Oe);return new m(e,[IO.data.of({autocomplete:g(BO,X(t))}),IO.data.of({autocomplete:DO}),O.jsx?ae:[]])}()}}getReadOnlyExtension(){return this.readonly||this.disabled?[z.readOnly.of(!0),y.editable.of(!1)]:[]}getSingleLineExtension(){return this.multiline?[]:z.transactionFilter.of((O=>O.newDoc.lines>1?[]:O))}getPlaceholderExtension(){return this.placeholder?C(this.placeholder):[]}getDefaultSyntaxHighlightingExtension(){return this.disableSyntaxHighlighting?[]:A(B,{fallback:!0})}getCustomThemeExtension(){return this.customThemeCSS?this.defaultFont?[y.theme(this.customThemeCSS),y.theme(J),y.theme(N)]:[y.theme(this.customThemeCSS),y.theme(J)]:this.defaultFont?[y.theme(J),y.theme(N)]:[y.theme(J)]}getAutoCompleteStyleExtension(O){if(this.autoCompleteStyle?.width){const e=(O||(this.codeEditor?this.codeEditor.getBoundingClientRect().width:300))*parseFloat(this.autoCompleteStyle.width.replace("%",""))/100,t=this.autoCompleteStyle.multiline?{overflow:"visible",textOverflow:"unset",whiteSpace:"normal",wordWrap:"break-word"}:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};return[L({position:"fixed",tooltipSpace:()=>{const O=this.codeEditor.getBoundingClientRect();return{left:O.left,top:0,right:O.right,bottom:1e3}}}),y.theme({".cm-tooltip.cm-tooltip-autocomplete":{maxWidth:e-15+"px !important"},".cm-tooltip.cm-tooltip-autocomplete > ul > li":{...t,maxWidth:"100%"},".cm-tooltip.cm-tooltip-autocomplete > ul":{minWidth:"unset !important"}})]}return[]}updateAutocompleteWidth(O){this.view&&this.view.dispatch({effects:this.autoCompleteStyleComp.reconfigure(this.getAutoCompleteStyleExtension(O))})}restrictSingleLine(){return z.transactionFilter.of((O=>O.newDoc.lines>1?[]:O))}};function Ti(O){return O?O.replace(/\s+/g," ").trim():""}O([t(".code__editor__container")],Yi.prototype,"codeEditor",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"value",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"expandIcon",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"placeholder",void 0),O([i({type:Object,reflect:!0,attribute:!0})],Yi.prototype,"customAutoCompletions",void 0),O([i({type:Array,reflect:!0,attribute:!0})],Yi.prototype,"customCompletionsPaths",void 0),O([i({type:String,reflect:!0,attribute:!0})],Yi.prototype,"language",void 0),O([i({type:String,reflect:!0,attribute:"error-message"})],Yi.prototype,"errorMessage",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"error",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"enableSearch",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"noborder",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"multiline",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"enableFoldGutters",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"allowVariableInCustomSuggestion",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"lineNumbers",void 0),O([i({type:Boolean,reflect:!0,attribute:!1})],Yi.prototype,"disableSyntaxHighlighting",void 0),O([i({type:Object,attribute:!1})],Yi.prototype,"customThemeCSS",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"lineNumbersMultiline",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"hasScroller",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"expandable",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"readonly",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"disabled",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"debounce",void 0),O([i({type:Number,reflect:!0,attribute:!0})],Yi.prototype,"debounceTimeout",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"aboveCursor",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"tabCompletion",void 0),O([i({type:Boolean,reflect:!0,attribute:!0})],Yi.prototype,"defaultFont",void 0),O([i({type:Object,attribute:!1})],Yi.prototype,"autoCompleteStyle",void 0),Yi=O([a("nile-code-editor")],Yi);export{Yi as N};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-date-picker.css.cjs.js","../internal/nile-element.cjs.js","./nile-date-picker-utils.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,n,o,a,r,l,h,_templateObject,d;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.query;n=_litDecoratorsJs.customElement;},function(_nileDatePickerCssCjsJs){o=_nileDatePickerCssCjsJs.s;},function(_internalNileElementCjsJs){a=_internalNileElementCjsJs.N;},function(_nileDatePickerUtilsCjsJs){r=_nileDatePickerUtilsCjsJs.p;l=_nileDatePickerUtilsCjsJs.n;h=_nileDatePickerUtilsCjsJs.f;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_a){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.range=!1,_this.hideTypes=!1,_this.doubleClickUnselect=!1,_this.allowClear=!1,_this.open=!1,_this.hideTimeZone=!1,_this.type="absolute",_this.showManualInputs=!1,_this.hideDurationFields=[],_this.allowedDates="{}",_this.syncDatePicker=!1,_this.dateFormat="DD/MM/YYYY",_this.rangeSeparator=" - ",_this.showYearDropdown=!1,_this.showMonthDropdown=!1,_this.portal=!1;return _this;}_inherits(d,_a);return _createClass(d,[{key:"firstUpdated",value:function firstUpdated(){var _superPropGet2,_this2=this;if((_superPropGet2=_superPropGet(d,"firstUpdated",this,3))!==null&&_superPropGet2!==void 0&&_superPropGet2([new Map()]),!this.syncDatePicker)return;var t=this.querySelector("nile-input");t&&t.addEventListener("nile-input",function(t){var e=t.detail.value,_r=r(e,_this2.dateFormat,_this2.range,_this2.rangeSeparator),i=_r.first,s=_r.second;if(_this2.range){if(i&&!s&&(_this2.jumpTo(i),_this2.syncRangeCalendar(i,null)),i&&s){var _l=l(i,s),_l2=_slicedToArray(_l,2),_t=_l2[0],_e=_l2[1];_e&&_this2.jumpTo(_e),_this2.syncRangeCalendar(_t,_e);}}else i&&_this2.jumpTo(i);});}},{key:"jumpTo",value:function jumpTo(t){this.open=!0;var e=this.shadowRoot.querySelector("nile-calendar");e&&(e.currentYear=t.getFullYear(),e.currentMonth=t.getMonth(),e.value=t,e.valueAttribute=t.toISOString());}},{key:"syncRangeCalendar",value:function syncRangeCalendar(t,e){var i=this.shadowRoot.querySelector("nile-calendar");i&&this.range&&(t&&(i.startDate=t),e&&(i.endDate=e));}},{key:"render",value:function render(){var _this3=this;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-dropdown .open=\"","\" part=\"dd-base\" .hoist=\"","\" distance=\"6\" exportparts=\"base\" .portal=\"","\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot>\n\n <nile-calendar\n .hideTypes=\"","\"\n .type=\"","\"\n value=\"","\"\n .range=\"","\"\n @nile-init=\"","\"\n @nile-destroy=\"","\"\n @nile-changed=\"","\"\n\n @nile-change=\"","\"\n\n .allowedDates=\"","\"\n\n @nile-type-change=\"","\"\n @nile-clear=\"","\"\n .hideDurationFields=\"","\"\n .showManualInputs=\"","\"\n .doubleClickUnselect=\"","\"\n .allowClear=\"","\"\n .startYear=\"","\"\n .endYear=\"","\"\n ?showYearDropdown=\"","\"\n ?showMonthDropdown=\"","\"\n .dateFormat=\"","\"\n ></nile-calendar>\n </nile-dropdown>\n "])),this.open,!0,this.portal,this.hideTypes,this.type,this.value,this.range,function(t){return t.stopPropagation();},function(t){return t.stopPropagation();},function(t){return t.stopPropagation();},this.handleChanged,this.allowedDates,function(t){t.stopPropagation(),_this3.emit("nile-type-change",t.detail);},function(t){t.stopPropagation(),_this3.emit("nile-clear");},this.hideDurationFields,this.showManualInputs,this.doubleClickUnselect,this.allowClear,this.startYear,this.endYear,this.showYearDropdown,this.showMonthDropdown,this.dateFormat);}},{key:"handleChanged",value:function handleChanged(t){t.stopPropagation();var e=t.detail,i=this.querySelector("nile-input");if(!this.range){var _this$dropdown;var _s=e.value;return _s&&i&&(i.value=h(new Date(_s),this.dateFormat),i.emit("nile-input",{value:i.value})),this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),void((_this$dropdown=this.dropdown)===null||_this$dropdown===void 0?void 0:_this$dropdown.hide());}var s=e.startDate,n=e.endDate;if(i){var _t2="";s&&(_t2+=h(new Date(s),this.dateFormat)),s&&n&&(_t2+=" - "+h(new Date(n),this.dateFormat)),i.value=_t2,i.emit("nile-input",{value:_t2});}this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),this.dropdown&&this.dropdown.hide();}},{key:"connectedCallback",value:function connectedCallback(){_superPropGet(d,"connectedCallback",this,3)([]),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(d,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}}],[{key:"styles",get:function get(){return[o];}}]);}(a));t([i({type:Boolean})],d.prototype,"range",void 0),t([i({type:Boolean})],d.prototype,"hideTypes",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"doubleClickUnselect",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"allowClear",void 0),t([i({type:Boolean})],d.prototype,"open",void 0),t([i({type:Boolean,attribute:"hide-time-zone"})],d.prototype,"hideTimeZone",void 0),t([i({type:String,reflect:!0})],d.prototype,"type",void 0),t([i({type:Boolean,attribute:"showManualInputs"})],d.prototype,"showManualInputs",void 0),t([i()],d.prototype,"value",void 0),t([i({type:Array,attribute:"hide-duration-fields"})],d.prototype,"hideDurationFields",void 0),t([i({attribute:"allowedDates"})],d.prototype,"allowedDates",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"syncDatePicker",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"dateFormat",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"rangeSeparator",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"startYear",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"endYear",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showYearDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showMonthDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"portal",void 0),t([s("nile-dropdown")],d.prototype,"dropdown",void 0),_export("N",d=t([n("nile-date-picker")],d));}};});
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-date-picker.css.cjs.js","../internal/nile-element.cjs.js","./nile-date-picker-utils.cjs.js"],function(_export,_context){"use strict";var t,e,i,s,n,a,o,r,l,h,_templateObject,d;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1;}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r;}finally{try{if(!f&&null!=t["return"]&&(u=t["return"](),Object(u)!==u))return;}finally{if(o)throw n;}}return a;}}function _arrayWithHoles(r){if(Array.isArray(r))return r;}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;s=_litDecoratorsJs.query;n=_litDecoratorsJs.customElement;},function(_nileDatePickerCssCjsJs){a=_nileDatePickerCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_nileDatePickerUtilsCjsJs){r=_nileDatePickerUtilsCjsJs.p;l=_nileDatePickerUtilsCjsJs.n;h=_nileDatePickerUtilsCjsJs.f;}],execute:function execute(){_export("N",d=/*#__PURE__*/function(_o){function d(){var _this;_classCallCheck(this,d);_this=_callSuper(this,d,arguments),_this.range=!1,_this.hideTypes=!1,_this.doubleClickUnselect=!1,_this.allowClear=!1,_this.open=!1,_this.hideTimeZone=!1,_this.type="absolute",_this.showManualInputs=!1,_this.hideDurationFields=[],_this.allowedDates="{}",_this.syncDatePicker=!1,_this.dateFormat="DD/MM/YYYY",_this.rangeSeparator=" - ",_this.showYearDropdown=!1,_this.showMonthDropdown=!1,_this.portal=!1,_this.disabled=!1;return _this;}_inherits(d,_o);return _createClass(d,[{key:"firstUpdated",value:function firstUpdated(){var _superPropGet2,_this2=this;if((_superPropGet2=_superPropGet(d,"firstUpdated",this,3))!==null&&_superPropGet2!==void 0&&_superPropGet2([new Map()]),!this.syncDatePicker)return;var t=this.querySelector("nile-input");t&&t.addEventListener("nile-input",function(t){var e=t.detail.value,_r=r(e,_this2.dateFormat,_this2.range,_this2.rangeSeparator),i=_r.first,s=_r.second;if(_this2.range){if(i&&!s&&(_this2.jumpTo(i),_this2.syncRangeCalendar(i,null)),i&&s){var _l=l(i,s),_l2=_slicedToArray(_l,2),_t=_l2[0],_e=_l2[1];_e&&_this2.jumpTo(_e),_this2.syncRangeCalendar(_t,_e);}}else i&&_this2.jumpTo(i);});}},{key:"updated",value:function updated(t){_superPropGet(d,"updated",this,3)([t]),t.has("disabled")&&this.updateTriggerDisabledState();}},{key:"updateTriggerDisabledState",value:function updateTriggerDisabledState(){var t=this.querySelector('[slot="trigger"]');t&&"disabled"in t&&(t.disabled=this.disabled);}},{key:"jumpTo",value:function jumpTo(t){this.open=!0;var e=this.shadowRoot.querySelector("nile-calendar");e&&(e.currentYear=t.getFullYear(),e.currentMonth=t.getMonth(),e.value=t,e.valueAttribute=t.toISOString());}},{key:"syncRangeCalendar",value:function syncRangeCalendar(t,e){var i=this.shadowRoot.querySelector("nile-calendar");i&&this.range&&(t&&(i.startDate=t),e&&(i.endDate=e));}},{key:"render",value:function render(){var _this3=this;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-dropdown ?disabled=\"","\" .open=\"","\" part=\"dd-base\" .hoist=\"","\" distance=\"6\" exportparts=\"base\" .portal=\"","\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot> \n\n <nile-calendar\n .hideTypes=\"","\"\n .type=\"","\"\n value=\"","\"\n .range=\"","\"\n @nile-init=\"","\"\n @nile-destroy=\"","\"\n @nile-changed=\"","\"\n\n @nile-change=\"","\"\n\n .allowedDates=\"","\"\n\n @nile-type-change=\"","\"\n @nile-clear=\"","\"\n .hideDurationFields=\"","\"\n .showManualInputs=\"","\"\n .doubleClickUnselect=\"","\"\n .allowClear=\"","\"\n .startYear=\"","\"\n .endYear=\"","\"\n ?showYearDropdown=\"","\"\n ?showMonthDropdown=\"","\"\n .dateFormat=\"","\"\n ></nile-calendar>\n </nile-dropdown>\n "])),this.disabled,this.open,!0,this.portal,this.hideTypes,this.type,this.value,this.range,function(t){return t.stopPropagation();},function(t){return t.stopPropagation();},function(t){return t.stopPropagation();},this.handleChanged,this.allowedDates,function(t){t.stopPropagation(),_this3.emit("nile-type-change",t.detail);},function(t){t.stopPropagation(),_this3.emit("nile-clear");},this.hideDurationFields,this.showManualInputs,this.doubleClickUnselect,this.allowClear,this.startYear,this.endYear,this.showYearDropdown,this.showMonthDropdown,this.dateFormat);}},{key:"handleChanged",value:function handleChanged(t){t.stopPropagation();var e=t.detail,i=this.querySelector("nile-input");if(this.disabled)return;if(!this.range){var _this$dropdown;var _s=e.value;return _s&&i&&(i.value=h(new Date(_s),this.dateFormat),i.emit("nile-input",{value:i.value})),this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),void((_this$dropdown=this.dropdown)===null||_this$dropdown===void 0?void 0:_this$dropdown.hide());}var s=e.startDate,n=e.endDate;if(i){var _t2="";s&&(_t2+=h(new Date(s),this.dateFormat)),s&&n&&(_t2+=" - "+h(new Date(n),this.dateFormat)),i.value=_t2,i.emit("nile-input",{value:_t2});}this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),this.dropdown&&this.dropdown.hide();}},{key:"connectedCallback",value:function connectedCallback(){_superPropGet(d,"connectedCallback",this,3)([]),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_superPropGet(d,"disconnectedCallback",this,3)([]),this.emit("nile-destroy");}}],[{key:"styles",get:function get(){return[a];}}]);}(o));t([i({type:Boolean})],d.prototype,"range",void 0),t([i({type:Boolean})],d.prototype,"hideTypes",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"doubleClickUnselect",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"allowClear",void 0),t([i({type:Boolean})],d.prototype,"open",void 0),t([i({type:Boolean,attribute:"hide-time-zone"})],d.prototype,"hideTimeZone",void 0),t([i({type:String,reflect:!0})],d.prototype,"type",void 0),t([i({type:Boolean,attribute:"showManualInputs"})],d.prototype,"showManualInputs",void 0),t([i()],d.prototype,"value",void 0),t([i({type:Array,attribute:"hide-duration-fields"})],d.prototype,"hideDurationFields",void 0),t([i({attribute:"allowedDates"})],d.prototype,"allowedDates",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"syncDatePicker",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"dateFormat",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"rangeSeparator",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"startYear",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"endYear",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showYearDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showMonthDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"portal",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"disabled",void 0),t([s("nile-dropdown")],d.prototype,"dropdown",void 0),_export("N",d=t([n("nile-date-picker")],d));}};});
|
|
2
2
|
//# sourceMappingURL=nile-date-picker.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-date-picker.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"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 { \n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n\nimport {\n parseDateFromFormat,\n formatDateToFormat,\n parseRangeFromFormat,\n normalizeDateRange\n} from './nile-date-picker-utils';\n\n\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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({ type: Boolean }) range = false;\n\n @property({ type: Boolean }) hideTypes = false;\n\n @property({ type: Boolean, reflect: true }) doubleClickUnselect = false;\n\n @property({ type: Boolean, reflect: true }) allowClear = false;\n\n @property({ type: Boolean }) open = false;\n\n @property({ type: Boolean, attribute: 'hide-time-zone' }) hideTimeZone = false;\n\n @property({ type: String, reflect: true }) type: 'absolute' | 'relative' = 'absolute';\n\n @property({ type: Boolean, attribute: 'showManualInputs' }) \n showManualInputs = false;\n\n @property() value: any;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) \n hideDurationFields: any = [];\n\n @property({ attribute: 'allowedDates' }) allowedDates: any = '{}';\n\n @property({ type: Boolean, attribute: true, reflect: true }) syncDatePicker = false;\n\n @property({ type: String, attribute: true, reflect: true }) dateFormat = \"DD/MM/YYYY\"; \n\n @property({ type: String, attribute: true, reflect: true }) rangeSeparator = \" - \";\n\n @property({ type: Number, attribute: true, reflect: true }) startYear: number;\n\n @property({ type: Number, attribute: true, reflect: true }) endYear: number;\n\n @property({ type: Boolean, attribute: true, reflect: true }) showYearDropdown = false;\n\n @property({ type: Boolean, attribute: true, reflect: true }) showMonthDropdown = false;\n\n @property({ type: Boolean, attribute: true, reflect: true }) portal = false;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n /**\n * Render method\n * @slot This is a slot test\n */\n firstUpdated() {\n super.firstUpdated?.(new Map());\n\n if (!this.syncDatePicker) return;\n\n const input = this.querySelector(\"nile-input\");\n if (!input) return;\n\n input.addEventListener(\"nile-input\", (e: any) => {\n const text = e.detail.value;\n const { first, second } = parseRangeFromFormat(text, this.dateFormat, this.range, this.rangeSeparator);\n\n if (!this.range) {\n if (first) this.jumpTo(first);\n return;\n }\n\n if (first && !second) {\n this.jumpTo(first);\n this.syncRangeCalendar(first, null);\n }\n\n if (first && second) {\n const [start, end] = normalizeDateRange(first, second);\n if (end) this.jumpTo(end);\n this.syncRangeCalendar(start, end);\n }\n });\n }\n\n private jumpTo(date: Date) {\n this.open = true;\n const cal = this.shadowRoot!.querySelector(\"nile-calendar\") as any;\n if (!cal) return;\n\n cal.currentYear = date.getFullYear();\n cal.currentMonth = date.getMonth();\n cal.value = date;\n cal.valueAttribute = date.toISOString();\n }\n\n\n private syncRangeCalendar(first: Date | null, second: Date | null) {\n const cal = this.shadowRoot!.querySelector(\"nile-calendar\") as any;\n if (!cal) return;\n\n if (!this.range) return;\n\n if (first) cal.startDate = first;\n if (second) cal.endDate = second;\n }\n\n render(): TemplateResult {\n return html`\n <nile-dropdown .open=\"${this.open}\" part=\"dd-base\" .hoist=\"${true}\" distance=\"6\" exportparts=\"base\" .portal=\"${this.portal}\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot>\n\n <nile-calendar\n .hideTypes=\"${this.hideTypes}\"\n .type=\"${this.type}\"\n value=\"${this.value}\"\n .range=\"${this.range}\"\n @nile-init=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-destroy=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-changed=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n\n @nile-change=\"${this.handleChanged}\"\n\n .allowedDates=\"${this.allowedDates}\"\n\n @nile-type-change=\"${(e:CustomEvent)=>{e.stopPropagation();this.emit('nile-type-change',e.detail)}}\"\n @nile-clear=\"${(e:CustomEvent)=>{e.stopPropagation();this.emit('nile-clear')}}\"\n .hideDurationFields=\"${this.hideDurationFields}\"\n .showManualInputs=\"${this.showManualInputs}\"\n .doubleClickUnselect=\"${this.doubleClickUnselect}\"\n .allowClear=\"${this.allowClear}\"\n .startYear=\"${this.startYear}\"\n .endYear=\"${this.endYear}\"\n ?showYearDropdown=\"${this.showYearDropdown}\"\n ?showMonthDropdown=\"${this.showMonthDropdown}\"\n .dateFormat=\"${this.dateFormat}\"\n ></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n\n handleChanged(event: CustomEvent) {\n event.stopPropagation();\n\n const detail = event.detail;\n const triggerInput = this.querySelector(\"nile-input\");\n\n if (!this.range) {\n const picked = detail.value;\n\n if (picked && triggerInput) {\n triggerInput.value = formatDateToFormat(new Date(picked), this.dateFormat);\n triggerInput.emit(\"nile-input\", { value: triggerInput.value });\n }\n\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n\n this.dropdown?.hide();\n return;\n }\n\n const start = detail.startDate;\n const end = detail.endDate;\n\n if (triggerInput) {\n let text = \"\";\n if (start) text += formatDateToFormat(new Date(start), this.dateFormat);\n if (start && end) text += \" - \" + formatDateToFormat(new Date(end), this.dateFormat);\n\n triggerInput.value = text;\n triggerInput.emit(\"nile-input\", { value: text });\n }\n\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"],"names":["NileDatePicker","d","this","range","hideTypes","doubleClickUnselect","allowClear","open","hideTimeZone","type","showManualInputs","hideDurationFields","allowedDates","syncDatePicker","dateFormat","rangeSeparator","showYearDropdown","showMonthDropdown","portal","_this","_inherits","_a","_createClass","key","value","firstUpdated","super","Map","input","querySelector","addEventListener","e","text","detail","parseRangeFromFormat","first","second","jumpTo","syncRangeCalendar","_l","normalizeDateRange","end","start","date","cal","shadowRoot","currentYear","getFullYear","currentMonth","getMonth","valueAttribute","toISOString","startDate","endDate","render","_this3","html","_templateObject","_taggedTemplateLiteral","stopPropagation","handleChanged","emit","startYear","endYear","event","triggerInput","_this$dropdown","picked","formatDateToFormat","Date","dropdown","hide","connectedCallback","disconnectedCallback","get","styles","NileElement","__decorate","property","Boolean","prototype","reflect","attribute","String","Array","Number","query","customElement"],"mappings":"ukKAkCaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEASwBC,EAAAA,KAAAA,CAAKC,OAAG,CAERD,CAAAA,KAAAA,CAASE,WAAG,CAEGF,CAAAA,KAAAA,CAAmBG,qBAAG,CAEtBH,CAAAA,KAAAA,CAAUI,UAAG,CAAA,CAAA,CAAA,CAE5BJ,KAAAA,CAAIK,IAAAA,CAAAA,CAAG,EAEsBL,KAAAA,CAAYM,YAAAA,CAAAA,CAAG,EAE9BN,KAAAA,CAAIO,IAAAA,CAA4B,WAG3EP,KAAAA,CAAgBQ,g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AAwCtF,CAAAgF,CAAAA,SAAAA,CAAA,eAAA,EAjDpChF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAc6E,EAAA,CAD1BU,CAAAA,CAAc,qBACFvF"}
|
|
1
|
+
{"version":3,"file":"nile-date-picker.cjs.js","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"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 { \n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-date-picker.css';\nimport NileElement from '../internal/nile-element';\nimport { NileDropdown } from '../nile-dropdown';\n\n/**\n * Nile icon component.\n *\n * @tag nile-date-picker\n *\n */\n\nimport {\n parseDateFromFormat,\n formatDateToFormat,\n parseRangeFromFormat,\n normalizeDateRange\n} from './nile-date-picker-utils';\n\n\n@customElement('nile-date-picker')\nexport class NileDatePicker extends NileElement {\n /**\n * The styles for DatePicker\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({ type: Boolean }) range = false;\n\n @property({ type: Boolean }) hideTypes = false;\n\n @property({ type: Boolean, reflect: true }) doubleClickUnselect = false;\n\n @property({ type: Boolean, reflect: true }) allowClear = false;\n\n @property({ type: Boolean }) open = false;\n\n @property({ type: Boolean, attribute: 'hide-time-zone' }) hideTimeZone = false;\n\n @property({ type: String, reflect: true }) type: 'absolute' | 'relative' = 'absolute';\n\n @property({ type: Boolean, attribute: 'showManualInputs' }) \n showManualInputs = false;\n\n @property() value: any;\n\n @property({ type: Array, attribute: 'hide-duration-fields' }) \n hideDurationFields: any = [];\n\n @property({ attribute: 'allowedDates' }) allowedDates: any = '{}';\n\n @property({ type: Boolean, attribute: true, reflect: true }) syncDatePicker = false;\n\n @property({ type: String, attribute: true, reflect: true }) dateFormat = \"DD/MM/YYYY\"; \n\n @property({ type: String, attribute: true, reflect: true }) rangeSeparator = \" - \";\n\n @property({ type: Number, attribute: true, reflect: true }) startYear: number;\n\n @property({ type: Number, attribute: true, reflect: true }) endYear: number;\n\n @property({ type: Boolean, attribute: true, reflect: true }) showYearDropdown = false;\n\n @property({ type: Boolean, attribute: true, reflect: true }) showMonthDropdown = false;\n\n @property({ type: Boolean, attribute: true, reflect: true }) portal = false;\n\n @property({ type: Boolean, attribute: true, reflect: true }) disabled = false;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n /**\n * Render method\n * @slot This is a slot test\n */\n firstUpdated() {\n super.firstUpdated?.(new Map());\n\n if (!this.syncDatePicker) return;\n\n const input = this.querySelector(\"nile-input\");\n if (!input) return;\n\n input.addEventListener(\"nile-input\", (e: any) => {\n const text = e.detail.value;\n const { first, second } = parseRangeFromFormat(text, this.dateFormat, this.range, this.rangeSeparator);\n\n if (!this.range) {\n if (first) this.jumpTo(first);\n return;\n }\n\n if (first && !second) {\n this.jumpTo(first);\n this.syncRangeCalendar(first, null);\n }\n\n if (first && second) {\n const [start, end] = normalizeDateRange(first, second);\n if (end) this.jumpTo(end);\n this.syncRangeCalendar(start, end);\n }\n });\n }\n \n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled')) {\n this.updateTriggerDisabledState();\n }\n }\n \n\n private updateTriggerDisabledState() {\n const trigger = this.querySelector('[slot=\"trigger\"]') as HTMLElement | null;\n if (!trigger) return;\n if ('disabled' in trigger) {\n (trigger as any).disabled = this.disabled;\n }\n }\n \n\n private jumpTo(date: Date) {\n this.open = true;\n const cal = this.shadowRoot!.querySelector(\"nile-calendar\") as any;\n if (!cal) return;\n\n cal.currentYear = date.getFullYear();\n cal.currentMonth = date.getMonth();\n cal.value = date;\n cal.valueAttribute = date.toISOString();\n }\n\n\n private syncRangeCalendar(first: Date | null, second: Date | null) {\n const cal = this.shadowRoot!.querySelector(\"nile-calendar\") as any;\n if (!cal) return;\n\n if (!this.range) return;\n\n if (first) cal.startDate = first;\n if (second) cal.endDate = second;\n }\n\n render(): TemplateResult {\n return html`\n <nile-dropdown ?disabled=\"${this.disabled}\" .open=\"${this.open}\" part=\"dd-base\" .hoist=\"${true}\" distance=\"6\" exportparts=\"base\" .portal=\"${this.portal}\">\n <slot slot=\"trigger\" part=\"trigger\" name=\"trigger\"></slot> \n\n <nile-calendar\n .hideTypes=\"${this.hideTypes}\"\n .type=\"${this.type}\"\n value=\"${this.value}\"\n .range=\"${this.range}\"\n @nile-init=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-destroy=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n @nile-changed=\"${(e:CustomEvent)=>e.stopPropagation()}\"\n\n @nile-change=\"${this.handleChanged}\"\n\n .allowedDates=\"${this.allowedDates}\"\n\n @nile-type-change=\"${(e:CustomEvent)=>{e.stopPropagation();this.emit('nile-type-change',e.detail)}}\"\n @nile-clear=\"${(e:CustomEvent)=>{e.stopPropagation();this.emit('nile-clear')}}\"\n .hideDurationFields=\"${this.hideDurationFields}\"\n .showManualInputs=\"${this.showManualInputs}\"\n .doubleClickUnselect=\"${this.doubleClickUnselect}\"\n .allowClear=\"${this.allowClear}\"\n .startYear=\"${this.startYear}\"\n .endYear=\"${this.endYear}\"\n ?showYearDropdown=\"${this.showYearDropdown}\"\n ?showMonthDropdown=\"${this.showMonthDropdown}\"\n .dateFormat=\"${this.dateFormat}\"\n ></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n\n handleChanged(event: CustomEvent) {\n event.stopPropagation();\n\n const detail = event.detail;\n const triggerInput = this.querySelector(\"nile-input\");\n if (this.disabled) return;\n\n if (!this.range) {\n const picked = detail.value;\n\n if (picked && triggerInput) {\n triggerInput.value = formatDateToFormat(new Date(picked), this.dateFormat);\n triggerInput.emit(\"nile-input\", { value: triggerInput.value });\n }\n\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n\n this.dropdown?.hide();\n return;\n }\n\n const start = detail.startDate;\n const end = detail.endDate;\n\n if (triggerInput) {\n let text = \"\";\n if (start) text += formatDateToFormat(new Date(start), this.dateFormat);\n if (start && end) text += \" - \" + formatDateToFormat(new Date(end), this.dateFormat);\n\n triggerInput.value = text;\n triggerInput.emit(\"nile-input\", { value: text });\n }\n\n this.emit('nile-changed', event.detail);\n this.emit('nile-change', event.detail);\n\n if (this.dropdown) {\n this.dropdown.hide();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n}\n\nexport default NileDatePicker;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-date-picker': NileDatePicker;\n }\n}\n"],"names":["NileDatePicker","_o","d","this","range","hideTypes","doubleClickUnselect","allowClear","open","hideTimeZone","type","showManualInputs","hideDurationFields","allowedDates","syncDatePicker","dateFormat","rangeSeparator","showYearDropdown","showMonthDropdown","portal","disabled","_this","_inherits","_createClass","key","value","firstUpdated","_superPropGet2","_this2","super","Map","input","querySelector","addEventListener","e","text","detail","parseRangeFromFormat","first","second","jumpTo","syncRangeCalendar","_l","normalizeDateRange","start","end","updated","changedProperties","has","updateTriggerDisabledState","trigger","date","cal","shadowRoot","currentYear","getFullYear","currentMonth","getMonth","valueAttribute","toISOString","startDate","endDate","render","_this3","html","_templateObject","_taggedTemplateLiteral","stopPropagation","handleChanged","emit","startYear","endYear","event","triggerInput","_this$dropdown","picked","formatDateToFormat","Date","dropdown","hide","connectedCallback","disconnectedCallback","get","styles","NileElement","__decorate","property","Boolean","prototype","reflect","attribute","String","Array","Number","query","_export","customElement"],"mappings":"ukKAkCaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,qEASwBC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,CAAA,CAAA,CAERD,KAAAA,CAASE,SAAAA,CAAAA,CAAG,EAEGF,KAAAA,CAAmBG,mBAAAA,CAAAA,C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CAAAA,CAAAA,CAAAwF,UAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAAAO,OAAA,KAnDpC/F,EAAcqF,CAAA,CAAA,CAD1BW,CAAc,CAAA,kBAAA,CAAA,CAAA,CACFhG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,query as s,customElement as n}from"lit/decorators.js";import{s as
|
|
2
|
-
<nile-dropdown .open="${this.open}" part="dd-base" .hoist="${!0}" distance="6" exportparts="base" .portal="${this.portal}">
|
|
3
|
-
<slot slot="trigger" part="trigger" name="trigger"></slot>
|
|
1
|
+
import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as i,query as s,customElement as n}from"lit/decorators.js";import{s as a}from"./nile-date-picker.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";import{p as r,n as l,f as h}from"./nile-date-picker-utils.esm.js";let d=class extends o{constructor(){super(...arguments),this.range=!1,this.hideTypes=!1,this.doubleClickUnselect=!1,this.allowClear=!1,this.open=!1,this.hideTimeZone=!1,this.type="absolute",this.showManualInputs=!1,this.hideDurationFields=[],this.allowedDates="{}",this.syncDatePicker=!1,this.dateFormat="DD/MM/YYYY",this.rangeSeparator=" - ",this.showYearDropdown=!1,this.showMonthDropdown=!1,this.portal=!1,this.disabled=!1}static get styles(){return[a]}firstUpdated(){if(super.firstUpdated?.(new Map),!this.syncDatePicker)return;const t=this.querySelector("nile-input");t&&t.addEventListener("nile-input",(t=>{const e=t.detail.value,{first:i,second:s}=r(e,this.dateFormat,this.range,this.rangeSeparator);if(this.range){if(i&&!s&&(this.jumpTo(i),this.syncRangeCalendar(i,null)),i&&s){const[t,e]=l(i,s);e&&this.jumpTo(e),this.syncRangeCalendar(t,e)}}else i&&this.jumpTo(i)}))}updated(t){super.updated(t),t.has("disabled")&&this.updateTriggerDisabledState()}updateTriggerDisabledState(){const t=this.querySelector('[slot="trigger"]');t&&"disabled"in t&&(t.disabled=this.disabled)}jumpTo(t){this.open=!0;const e=this.shadowRoot.querySelector("nile-calendar");e&&(e.currentYear=t.getFullYear(),e.currentMonth=t.getMonth(),e.value=t,e.valueAttribute=t.toISOString())}syncRangeCalendar(t,e){const i=this.shadowRoot.querySelector("nile-calendar");i&&this.range&&(t&&(i.startDate=t),e&&(i.endDate=e))}render(){return e`
|
|
2
|
+
<nile-dropdown ?disabled="${this.disabled}" .open="${this.open}" part="dd-base" .hoist="${!0}" distance="6" exportparts="base" .portal="${this.portal}">
|
|
3
|
+
<slot slot="trigger" part="trigger" name="trigger"></slot>
|
|
4
4
|
|
|
5
5
|
<nile-calendar
|
|
6
6
|
.hideTypes="${this.hideTypes}"
|
|
@@ -28,4 +28,4 @@ import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as
|
|
|
28
28
|
.dateFormat="${this.dateFormat}"
|
|
29
29
|
></nile-calendar>
|
|
30
30
|
</nile-dropdown>
|
|
31
|
-
`}handleChanged(t){t.stopPropagation();const e=t.detail,i=this.querySelector("nile-input");if(!this.range){const s=e.value;return s&&i&&(i.value=h(new Date(s),this.dateFormat),i.emit("nile-input",{value:i.value})),this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),void this.dropdown?.hide()}const s=e.startDate,n=e.endDate;if(i){let t="";s&&(t+=h(new Date(s),this.dateFormat)),s&&n&&(t+=" - "+h(new Date(n),this.dateFormat)),i.value=t,i.emit("nile-input",{value:t})}this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),this.dropdown&&this.dropdown.hide()}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}};t([i({type:Boolean})],d.prototype,"range",void 0),t([i({type:Boolean})],d.prototype,"hideTypes",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"doubleClickUnselect",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"allowClear",void 0),t([i({type:Boolean})],d.prototype,"open",void 0),t([i({type:Boolean,attribute:"hide-time-zone"})],d.prototype,"hideTimeZone",void 0),t([i({type:String,reflect:!0})],d.prototype,"type",void 0),t([i({type:Boolean,attribute:"showManualInputs"})],d.prototype,"showManualInputs",void 0),t([i()],d.prototype,"value",void 0),t([i({type:Array,attribute:"hide-duration-fields"})],d.prototype,"hideDurationFields",void 0),t([i({attribute:"allowedDates"})],d.prototype,"allowedDates",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"syncDatePicker",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"dateFormat",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"rangeSeparator",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"startYear",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"endYear",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showYearDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showMonthDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"portal",void 0),t([s("nile-dropdown")],d.prototype,"dropdown",void 0),d=t([n("nile-date-picker")],d);export{d as N};
|
|
31
|
+
`}handleChanged(t){t.stopPropagation();const e=t.detail,i=this.querySelector("nile-input");if(this.disabled)return;if(!this.range){const s=e.value;return s&&i&&(i.value=h(new Date(s),this.dateFormat),i.emit("nile-input",{value:i.value})),this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),void this.dropdown?.hide()}const s=e.startDate,n=e.endDate;if(i){let t="";s&&(t+=h(new Date(s),this.dateFormat)),s&&n&&(t+=" - "+h(new Date(n),this.dateFormat)),i.value=t,i.emit("nile-input",{value:t})}this.emit("nile-changed",t.detail),this.emit("nile-change",t.detail),this.dropdown&&this.dropdown.hide()}connectedCallback(){super.connectedCallback(),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this.emit("nile-destroy")}};t([i({type:Boolean})],d.prototype,"range",void 0),t([i({type:Boolean})],d.prototype,"hideTypes",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"doubleClickUnselect",void 0),t([i({type:Boolean,reflect:!0})],d.prototype,"allowClear",void 0),t([i({type:Boolean})],d.prototype,"open",void 0),t([i({type:Boolean,attribute:"hide-time-zone"})],d.prototype,"hideTimeZone",void 0),t([i({type:String,reflect:!0})],d.prototype,"type",void 0),t([i({type:Boolean,attribute:"showManualInputs"})],d.prototype,"showManualInputs",void 0),t([i()],d.prototype,"value",void 0),t([i({type:Array,attribute:"hide-duration-fields"})],d.prototype,"hideDurationFields",void 0),t([i({attribute:"allowedDates"})],d.prototype,"allowedDates",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"syncDatePicker",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"dateFormat",void 0),t([i({type:String,attribute:!0,reflect:!0})],d.prototype,"rangeSeparator",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"startYear",void 0),t([i({type:Number,attribute:!0,reflect:!0})],d.prototype,"endYear",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showYearDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"showMonthDropdown",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"portal",void 0),t([i({type:Boolean,attribute:!0,reflect:!0})],d.prototype,"disabled",void 0),t([s("nile-dropdown")],d.prototype,"dropdown",void 0),d=t([n("nile-date-picker")],d);export{d as N};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["./nile-detail.cjs.js","tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-detail.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","./nile-detail.utils.cjs.js","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileDetailCjsJs){_export("NileDetail",_nileDetailCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileDetailCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalWatchCjsJs){},function(_nileDetailUtilsCjsJs){},function(_internalAnimateCjsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){}],execute:function execute(){}};});
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{N as NileDetail}from"./nile-detail.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-detail.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/watch.esm.js";import"./nile-detail.utils.esm.js";import"../internal/animate.esm.js";import"../utilities/animation-registry.esm.js";import"../internal/event.esm.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","lit/directives/class-map.js","./nile-detail.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","./nile-detail.utils.cjs.js","../internal/animate.cjs.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js"],function(_export,_context){"use strict";var t,e,i,a,s,r,l,n,o,d,h,c,p,m,u,f,_,_templateObject,_templateObject2,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;i=_lit.nothing;},function(_litDecoratorsJs){a=_litDecoratorsJs.query;s=_litDecoratorsJs.property;r=_litDecoratorsJs.state;l=_litDecoratorsJs.customElement;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_nileDetailCssCjsJs){o=_nileDetailCssCjsJs.s;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){h=_internalWatchCjsJs.w;},function(_nileDetailUtilsCjsJs){c=_nileDetailUtilsCjsJs.h;p=_nileDetailUtilsCjsJs.a;m=_nileDetailUtilsCjsJs.b;u=_nileDetailUtilsCjsJs.c;f=_nileDetailUtilsCjsJs.s;_=_nileDetailUtilsCjsJs.d;},function(_internalAnimateCjsJs){},function(_utilitiesAnimationRegistryCjsJs){},function(_internalEventCjsJs){}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_d){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.open=!1,_this.heading="",_this.description="",_this.expandIconPlacement="right",_this.disabled=!1,_this._detailOpen=!1;return _this;}_inherits(y,_d);return _createClass(y,[{key:"firstUpdated",value:function firstUpdated(){this._detailOpen=this.open,this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0";}},{key:"_handleSummaryClick",value:function _handleSummaryClick(t){t.preventDefault(),c(this);}},{key:"_handleSummaryKeyDown",value:function _handleSummaryKeyDown(t){p(t,this);}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!this.open){_context2.next=6;break;}this._detailOpen=!0;_context2.next=4;return m(this);case 4:_context2.next=9;break;case 6:_context2.next=8;return u(this);case 8:this._detailOpen=!1;case 9:case"end":return _context2.stop();}},_callee,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:return _context3.abrupt("return",f(this));case 1:case"end":return _context3.stop();}},_callee2,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:return _context4.abrupt("return",_(this));case 1:case"end":return _context4.stop();}},_callee3,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"_summaryLabel",get:function get(){return[this.heading,this.description].filter(Boolean).join(", ");}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <details\n part=\"base\"\n ?open=","\n class=","\n >\n <summary\n part=\"header\"\n id=\"header\"\n class=","\n aria-label=","\n aria-expanded=","\n aria-disabled=","\n tabindex=","\n @click=","\n @keydown=","\n >\n <slot name=\"label\" part=\"label\" class=\"detail__label\">\n <span part=\"label-text\" class=\"detail__heading-text\">","</span>\n ","\n </slot>\n\n <slot name=\"header-actions\" part=\"header-actions\" class=\"detail__header-actions\"></slot>\n\n <slot name=\"prefix\" part=\"prefix\" class=\"detail__prefix\"></slot>\n\n <span part=\"summary-icon\" class=\"detail__summary-icon\" aria-hidden=\"true\">\n <slot name=\"expand-icon\">\n <nile-icon\n name=\"var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n </span>\n\n <slot name=\"suffix\" part=\"suffix\" class=\"detail__suffix\"></slot>\n\n </summary>\n\n <div part=\"content\" class=\"detail__body\">\n <slot id=\"content\" class=\"detail__content\"></slot>\n </div>\n </details>\n "])),this._detailOpen,n({detail:!0,"detail--open":this.open,"detail--disabled":this.disabled}),n({detail__header:!0,"detail__header--icon-left":"left"===this.expandIconPlacement}),this._summaryLabel||i,this.open?"true":"false",this.disabled?"true":"false",this.disabled?"-1":"0",this._handleSummaryClick,this._handleSummaryKeyDown,this.heading,this.description?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<span part=\"description\" class=\"detail__description\">","</span>"])),this.description):"");}}]);}(d));y.styles=o,t([a("details")],y.prototype,"detail",void 0),t([a("summary")],y.prototype,"header",void 0),t([a(".detail__body")],y.prototype,"body",void 0),t([s({attribute:!0,type:Boolean,reflect:!0})],y.prototype,"open",void 0),t([s({attribute:!0,type:String,reflect:!0})],y.prototype,"heading",void 0),t([s({attribute:!0,type:String,reflect:!0})],y.prototype,"description",void 0),t([s({attribute:!0,reflect:!0})],y.prototype,"expandIconPlacement",void 0),t([s({attribute:!0,type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),t([r()],y.prototype,"_detailOpen",void 0),t([h("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),_export("N",y=t([l("nile-detail")],y));}};});
|
|
2
|
+
//# sourceMappingURL=nile-detail.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-detail.cjs.js","sources":["../../../src/nile-detail/nile-detail.ts"],"sourcesContent":["import { html, TemplateResult, nothing } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { styles } from './nile-detail.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport {\n animateShow,\n animateHide,\n showDetail,\n hideDetail,\n handleSummaryClick,\n handleSummaryKeyDown,\n} from './nile-detail.utils';\nimport type { CSSResultGroup } from 'lit';\n\n@customElement('nile-detail')\nexport class NileDetail extends NileElement {\n\n static styles: CSSResultGroup = styles;\n\n @query('details') detail: HTMLDetailsElement;\n @query('summary') header: HTMLElement;\n @query('.detail__body') body: HTMLElement;\n\n @property({ attribute: true, type: Boolean, reflect: true }) open = false;\n\n @property({ attribute: true, type: String, reflect: true }) heading = '';\n\n @property({ attribute: true, type: String, reflect: true }) description = '';\n\n @property({ attribute: true, reflect: true }) expandIconPlacement: 'left' | 'right' = 'right';\n\n @property({ attribute: true, type: Boolean, reflect: true }) disabled = false;\n\n @state() private _detailOpen = false;\n\n firstUpdated() {\n this._detailOpen = this.open;\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n }\n\n private _handleSummaryClick(event: Event) {\n event.preventDefault();\n handleSummaryClick(this);\n }\n\n private _handleSummaryKeyDown(event: KeyboardEvent) {\n handleSummaryKeyDown(event, this);\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n this._detailOpen = true;\n await animateShow(this);\n } else {\n await animateHide(this);\n this._detailOpen = false;\n }\n }\n\n async show() {\n return showDetail(this);\n }\n\n async hide() {\n return hideDetail(this);\n }\n\n private get _summaryLabel(): string {\n return [this.heading, this.description].filter(Boolean).join(', ');\n }\n\n render(): TemplateResult {\n return html`\n <details\n part=\"base\"\n ?open=${this._detailOpen}\n class=${classMap({\n 'detail': true,\n 'detail--open': this.open,\n 'detail--disabled': this.disabled,\n })}\n >\n <summary\n part=\"header\"\n id=\"header\"\n class=${classMap({\n 'detail__header': true,\n 'detail__header--icon-left': this.expandIconPlacement === 'left',\n })}\n aria-label=${this._summaryLabel || nothing}\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this._handleSummaryClick}\n @keydown=${this._handleSummaryKeyDown}\n >\n <slot name=\"label\" part=\"label\" class=\"detail__label\">\n <span part=\"label-text\" class=\"detail__heading-text\">${this.heading}</span>\n ${this.description\n ? html`<span part=\"description\" class=\"detail__description\">${this.description}</span>`\n : ''}\n </slot>\n\n <slot name=\"header-actions\" part=\"header-actions\" class=\"detail__header-actions\"></slot>\n\n <slot name=\"prefix\" part=\"prefix\" class=\"detail__prefix\"></slot>\n\n <span part=\"summary-icon\" class=\"detail__summary-icon\" aria-hidden=\"true\">\n <slot name=\"expand-icon\">\n <nile-icon\n name=\"var(--nile-icon-arrow-right, var(--ng-icon-chevron-right))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n </span>\n\n <slot name=\"suffix\" part=\"suffix\" class=\"detail__suffix\"></slot>\n\n </summary>\n\n <div part=\"content\" class=\"detail__body\">\n <slot id=\"content\" class=\"detail__content\"></slot>\n </div>\n </details>\n `;\n }\n}\n\nexport default NileDetail;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-detail': NileDetail;\n }\n}\n"],"names":["NileDetail","y","this","open","heading","description","expandIconPlacement","disabled","_detailOpen","_this","_inherits","_d","_createClass","key","value","firstUpdated","body","hidden","style","height","_handleSummaryClick","event","preventDefault","handleSummaryClick","_handleSummaryKeyDown","handleSummaryKeyDown","_handleOpenChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","animateShow","animateHide","stop","handleOpenChange","_callee2","_callee2$","_context3","abrupt","showDetail","show","_callee3","_callee3$","_context4","hideDetail","hide","get","filter","Boolean","join","render","html","_templateObject","_taggedTemplateLiteral","classMap","detail","detail__header","_summaryLabel","nothing","_templateObject2","NileElement","styles","__decorate","query","prototype","property","attribute","type","reflect","String","state","watch","waitUntilFirstUpdate","customElement"],"mappings":"o0XAiBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEAQwDC,EAAAA,KAAAA,CAAIC,IAAG,CAAA,CAAA,CAAA,CAERD,KAAAA,CAAOE,OAAAA,CAAG,EAEVF,CAAAA,KAAAA,CAAWG,WAAG,CAAA,EAAA,CAE5BH,KAAAA,CAAmBI,mBAAAA,CAAqB,QAEzBJ,KAAAA,CAAQK,QAAAA,CAAAA,CAAG,CAEvDL,CAAAA,KAAAA,CAAWM,WAAG,CAAA,CAAA,CAgGhC,QAAAC,KAAA,EA9FCC,SAAA,CAAAT,CAAA,CAAAU,EAAA,SAAAC,YAAA,CAAAX,CAAA,GAAAY,GAAA,gBAAAC,KAAA,UAAAC,Y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}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none;\n }\n\n :host {\n display: block;\n width: 100%;\n }\n\n .detail {\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-md, var(--ng-radius-xl));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-xs));\n overflow: hidden;\n width: 100%;\n line-height: var(--nile-line-height-inherit, var(--ng-line-height-text-sm));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n }\n\n .detail--disabled {\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n }\n\n .detail__header {\n display: flex;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n align-items: center;\n border-radius: inherit;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-neutral-900, var(--ng-colors-text-primary));\n user-select: none;\n cursor: pointer;\n list-style: none;\n }\n\n .detail__header::-webkit-details-marker {\n display: none;\n }\n\n .detail__header::marker {\n content: '';\n }\n\n .detail__header--icon-left {\n flex-direction: row-reverse;\n }\n\n .detail__header:focus {\n outline: none;\n }\n\n .detail__header:focus-visible {\n outline: solid 3px var(--nile-colors-blue-500, var(--ng-colors-fg-brand-primary-600));\n outline-offset: calc(1px + 1px);\n }\n\n .detail--disabled .detail__header {\n cursor: not-allowed;\n }\n\n .detail--disabled .detail__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .detail__label {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .detail__header-actions {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__heading-text {\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n font-family: var(--nile-font-family-medium, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n }\n\n .detail__description {\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n }\n\n .detail__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms transform ease;\n color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary));\n transform: rotate(90deg);\n }\n\n .detail--open .detail__summary-icon {\n transform: rotate(-90deg);\n }\n\n .detail__body {\n overflow: hidden;\n }\n\n .detail__body[hidden] {\n display: none;\n }\n\n .detail__content {\n display: block;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n"]))));}};});
|
|
2
|
+
//# sourceMappingURL=nile-detail.css.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-detail.css.cjs.js","sources":["../../../src/nile-detail/nile-detail.css.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none;\n }\n\n :host {\n display: block;\n width: 100%;\n }\n\n .detail {\n border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n border-radius: var(--nile-radius-md, var(--ng-radius-xl));\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-xs));\n overflow: hidden;\n width: 100%;\n line-height: var(--nile-line-height-inherit, var(--ng-line-height-text-sm));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n }\n\n .detail--disabled {\n opacity: var(--nile-opacity-50, var(--ng-opacity-50));\n }\n\n .detail__header {\n display: flex;\n gap: var(--nile-spacing-lg, var(--ng-spacing-lg));\n align-items: center;\n border-radius: inherit;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n color: var(--nile-colors-neutral-900, var(--ng-colors-text-primary));\n user-select: none;\n cursor: pointer;\n list-style: none;\n }\n\n .detail__header::-webkit-details-marker {\n display: none;\n }\n\n .detail__header::marker {\n content: '';\n }\n\n .detail__header--icon-left {\n flex-direction: row-reverse;\n }\n\n .detail__header:focus {\n outline: none;\n }\n\n .detail__header:focus-visible {\n outline: solid 3px var(--nile-colors-blue-500, var(--ng-colors-fg-brand-primary-600));\n outline-offset: calc(1px + 1px);\n }\n\n .detail--disabled .detail__header {\n cursor: not-allowed;\n }\n\n .detail--disabled .detail__header:focus-visible {\n outline: none;\n box-shadow: none;\n }\n\n .detail__label {\n width: 100%;\n display: flex;\n flex-direction: column;\n }\n\n .detail__header-actions {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__prefix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n gap: var(--nile-spacing-sm, var(--ng-spacing-sm));\n }\n\n .detail__heading-text {\n font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));\n font-family: var(--nile-font-family-medium, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));\n }\n\n .detail__description {\n font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));\n margin-top: 2px;\n }\n\n .detail__summary-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms transform ease;\n color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary));\n transform: rotate(90deg);\n }\n\n .detail--open .detail__summary-icon {\n transform: rotate(-90deg);\n }\n\n .detail__body {\n overflow: hidden;\n }\n\n .detail__body[hidden] {\n display: none;\n }\n\n .detail__content {\n display: block;\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAEaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import{css as e}from"lit";const i=e`
|
|
2
|
+
:host {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
-webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
|
|
5
|
+
-moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
|
|
6
|
+
text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host *,
|
|
10
|
+
:host *::before,
|
|
11
|
+
:host *::after {
|
|
12
|
+
box-sizing: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[hidden] {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host {
|
|
20
|
+
display: block;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.detail {
|
|
25
|
+
border: 1px solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
|
|
26
|
+
border-radius: var(--nile-radius-md, var(--ng-radius-xl));
|
|
27
|
+
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
28
|
+
box-shadow: var(--nile-box-shadow-3, var(--ng-shadow-xs));
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
width: 100%;
|
|
31
|
+
line-height: var(--nile-line-height-inherit, var(--ng-line-height-text-sm));
|
|
32
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.detail--disabled {
|
|
36
|
+
opacity: var(--nile-opacity-50, var(--ng-opacity-50));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.detail__header {
|
|
40
|
+
display: flex;
|
|
41
|
+
gap: var(--nile-spacing-lg, var(--ng-spacing-lg));
|
|
42
|
+
align-items: center;
|
|
43
|
+
border-radius: inherit;
|
|
44
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
45
|
+
background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-tertiary));
|
|
46
|
+
font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));
|
|
47
|
+
font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));
|
|
48
|
+
color: var(--nile-colors-neutral-900, var(--ng-colors-text-primary));
|
|
49
|
+
user-select: none;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
list-style: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.detail__header::-webkit-details-marker {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.detail__header::marker {
|
|
59
|
+
content: '';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.detail__header--icon-left {
|
|
63
|
+
flex-direction: row-reverse;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.detail__header:focus {
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.detail__header:focus-visible {
|
|
71
|
+
outline: solid 3px var(--nile-colors-blue-500, var(--ng-colors-fg-brand-primary-600));
|
|
72
|
+
outline-offset: calc(1px + 1px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.detail--disabled .detail__header {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.detail--disabled .detail__header:focus-visible {
|
|
80
|
+
outline: none;
|
|
81
|
+
box-shadow: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.detail__label {
|
|
85
|
+
width: 100%;
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.detail__header-actions {
|
|
91
|
+
flex: 0 0 auto;
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.detail__prefix {
|
|
98
|
+
flex: 0 0 auto;
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.detail__suffix {
|
|
105
|
+
flex: 0 0 auto;
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
gap: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.detail__heading-text {
|
|
112
|
+
font-weight: var(--nile-font-weight-semibold, var(--ng-font-weight-semibold));
|
|
113
|
+
font-family: var(--nile-font-family-medium, var(--ng-font-family-body));
|
|
114
|
+
font-size: var(--nile-type-scale-4, var(--ng-spacing-xl));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.detail__description {
|
|
118
|
+
font-size: var(--nile-type-scale-2, var(--ng-font-size-text-xs));
|
|
119
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
120
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-secondary));
|
|
121
|
+
margin-top: 2px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.detail__summary-icon {
|
|
125
|
+
flex: 0 0 auto;
|
|
126
|
+
display: flex;
|
|
127
|
+
align-items: center;
|
|
128
|
+
transition: 250ms transform ease;
|
|
129
|
+
color: var(--nile-colors-neutral-700, var(--ng-colors-text-secondary));
|
|
130
|
+
transform: rotate(90deg);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.detail--open .detail__summary-icon {
|
|
134
|
+
transform: rotate(-90deg);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.detail__body {
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.detail__body[hidden] {
|
|
142
|
+
display: none;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.detail__content {
|
|
146
|
+
display: block;
|
|
147
|
+
padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
|
|
148
|
+
}
|
|
149
|
+
`;export{i as s};
|