@aquera/nile-elements 0.0.6-9 → 0.0.7-1
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +3 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.js +52 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/modal.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.d.ts +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/internal/nile-element.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/index.js.map +1 -0
- package/{dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts → .rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.d.ts} +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js +56 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.d.ts +41 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.js +104 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js +17 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +41 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +99 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +17 -6
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +6 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +79 -21
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/{nile-radio-button/nile-radio-button.css.d.ts → nile-dialog/nile-dialog.css.d.ts} +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js +145 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.d.ts +60 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js +297 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +5 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popup/nile-popup.css.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-popup/nile-popup.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-progress-bar/nile-progress-bar.js +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js +3 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +18 -4
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +60 -34
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/demo/index.html +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +469 -212
- package/dist/internal/modal.cjs.js +2 -0
- package/dist/internal/modal.cjs.js.map +1 -0
- package/dist/internal/modal.esm.js +1 -0
- package/dist/internal/nile-element.cjs.js +1 -1
- package/dist/internal/nile-element.cjs.js.map +1 -1
- package/dist/internal/nile-element.esm.js +1 -1
- package/dist/internal/scroll.cjs.js +1 -1
- package/dist/internal/scroll.cjs.js.map +1 -1
- package/dist/internal/scroll.esm.js +1 -1
- package/dist/nile-button-toggle/index.cjs.js +2 -0
- package/dist/nile-button-toggle/index.esm.js +1 -0
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js +2 -0
- package/dist/nile-button-toggle/nile-button-toggle.cjs.js.map +1 -0
- package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js +2 -0
- package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js.map +1 -0
- package/dist/nile-button-toggle/nile-button-toggle.css.esm.js +44 -0
- package/dist/nile-button-toggle/nile-button-toggle.esm.js +6 -0
- package/dist/nile-button-toggle-group/index.cjs.js +2 -0
- package/dist/nile-button-toggle-group/index.esm.js +1 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js +2 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.cjs.js.map +1 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js +2 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.css.cjs.js.map +1 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.css.esm.js +5 -0
- package/dist/nile-button-toggle-group/nile-button-toggle-group.esm.js +1 -0
- package/dist/nile-content-editor/index.cjs.js +1 -1
- package/dist/nile-content-editor/index.esm.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
- package/dist/nile-content-editor/nile-content-editor.css.esm.js +17 -6
- package/dist/nile-content-editor/nile-content-editor.esm.js +9 -7
- 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 +1 -1
- package/dist/nile-dialog/index.cjs.js +2 -0
- package/dist/nile-dialog/index.cjs.js.map +1 -0
- package/dist/nile-dialog/index.esm.js +1 -0
- package/dist/nile-dialog/nile-dialog.cjs.js +2 -0
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -0
- package/dist/nile-dialog/nile-dialog.css.cjs.js +2 -0
- package/dist/nile-dialog/nile-dialog.css.cjs.js.map +1 -0
- package/dist/nile-dialog/nile-dialog.css.esm.js +133 -0
- package/dist/nile-dialog/nile-dialog.esm.js +45 -0
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +1 -1
- package/dist/nile-popup/nile-popup.css.cjs.js +1 -1
- package/dist/nile-popup/nile-popup.css.cjs.js.map +1 -1
- package/dist/nile-popup/nile-popup.css.esm.js +1 -0
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
- package/dist/nile-progress-bar/nile-progress-bar.esm.js +2 -3
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +1 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.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 +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +3 -3
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.esm.js +39 -29
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.js +3 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/modal.d.ts +12 -0
- package/dist/src/internal/modal.js +52 -0
- package/dist/src/internal/modal.js.map +1 -0
- package/dist/src/internal/nile-element.d.ts +1 -1
- package/dist/src/internal/nile-element.js +1 -0
- package/dist/src/internal/nile-element.js.map +1 -1
- package/dist/src/nile-button-toggle/index.d.ts +1 -0
- package/dist/src/nile-button-toggle/index.js +2 -0
- package/dist/src/nile-button-toggle/index.js.map +1 -0
- package/{.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.d.ts → dist/src/nile-button-toggle/nile-button-toggle.css.d.ts} +1 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.css.js +56 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.d.ts +41 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.js +104 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.js.map +1 -0
- package/dist/src/nile-button-toggle-group/index.d.ts +1 -0
- package/dist/src/nile-button-toggle-group/index.js +2 -0
- package/dist/src/nile-button-toggle-group/index.js.map +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.d.ts +12 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js +17 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.css.js.map +1 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.d.ts +41 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js +99 -0
- package/dist/src/nile-button-toggle-group/nile-button-toggle-group.js.map +1 -0
- package/dist/src/nile-content-editor/nile-content-editor.css.js +17 -6
- package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
- package/dist/src/nile-content-editor/nile-content-editor.d.ts +6 -2
- package/dist/src/nile-content-editor/nile-content-editor.js +79 -21
- package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.js +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -1
- package/dist/src/nile-dialog/index.d.ts +1 -0
- package/dist/src/nile-dialog/index.js +2 -0
- package/dist/src/nile-dialog/index.js.map +1 -0
- package/dist/src/{nile-radio-button/nile-radio-button.css.d.ts → nile-dialog/nile-dialog.css.d.ts} +1 -1
- package/dist/src/nile-dialog/nile-dialog.css.js +145 -0
- package/dist/src/nile-dialog/nile-dialog.css.js.map +1 -0
- package/dist/src/nile-dialog/nile-dialog.d.ts +60 -0
- package/dist/src/nile-dialog/nile-dialog.js +297 -0
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -0
- package/dist/src/nile-input/nile-input.js +5 -0
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-popup/nile-popup.css.js +1 -0
- package/dist/src/nile-popup/nile-popup.css.js.map +1 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.js +0 -1
- package/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
- package/dist/src/nile-select/nile-select.js +1 -0
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +3 -3
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.d.ts +18 -4
- package/dist/src/nile-switcher/nile-switcher.js +60 -34
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +4 -1
- package/src/internal/modal.ts +64 -0
- package/src/internal/nile-element.ts +1 -0
- package/src/nile-button-toggle/index.ts +1 -0
- package/src/nile-button-toggle/nile-button-toggle.css.ts +58 -0
- package/src/nile-button-toggle/nile-button-toggle.ts +106 -0
- package/src/nile-button-toggle-group/index.ts +1 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.css.ts +19 -0
- package/src/nile-button-toggle-group/nile-button-toggle-group.ts +115 -0
- package/src/nile-content-editor/nile-content-editor.css.ts +17 -6
- package/src/nile-content-editor/nile-content-editor.ts +81 -27
- package/src/nile-date-picker/nile-date-picker.ts +1 -1
- package/src/nile-dialog/index.ts +1 -0
- package/src/nile-dialog/nile-dialog.css.ts +147 -0
- package/src/nile-dialog/nile-dialog.ts +325 -0
- package/src/nile-input/nile-input.ts +1 -1
- package/src/nile-popup/nile-popup.css.ts +1 -0
- package/src/nile-progress-bar/nile-progress-bar.ts +0 -1
- package/src/nile-select/nile-select.ts +1 -0
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +1 -1
- package/src/nile-slide-toggle/nile-slide-toggle.ts +3 -3
- package/src/nile-switcher/nile-switcher.ts +103 -33
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.d.ts +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js +0 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/index.js.map +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js +0 -173
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.css.js.map +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.d.ts +0 -57
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js +0 -145
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button/nile-radio-button.js.map +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.d.ts +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js +0 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/index.js.map +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +0 -70
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +0 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +0 -66
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js +0 -308
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +0 -1
- package/dist/nile-radio-button/index.cjs.js +0 -2
- package/dist/nile-radio-button/index.esm.js +0 -1
- package/dist/nile-radio-button/nile-radio-button.cjs.js +0 -2
- package/dist/nile-radio-button/nile-radio-button.cjs.js.map +0 -1
- package/dist/nile-radio-button/nile-radio-button.css.cjs.js +0 -2
- package/dist/nile-radio-button/nile-radio-button.css.cjs.js.map +0 -1
- package/dist/nile-radio-button/nile-radio-button.css.esm.js +0 -161
- package/dist/nile-radio-button/nile-radio-button.esm.js +0 -21
- package/dist/nile-radio-button-group/index.cjs.js +0 -2
- package/dist/nile-radio-button-group/index.esm.js +0 -1
- package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js +0 -2
- package/dist/nile-radio-button-group/nile-radio-button-group.cjs.js.map +0 -1
- package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js +0 -2
- package/dist/nile-radio-button-group/nile-radio-button-group.css.cjs.js.map +0 -1
- package/dist/nile-radio-button-group/nile-radio-button-group.css.esm.js +0 -58
- package/dist/nile-radio-button-group/nile-radio-button-group.esm.js +0 -56
- package/dist/src/nile-radio-button/index.d.ts +0 -1
- package/dist/src/nile-radio-button/index.js +0 -2
- package/dist/src/nile-radio-button/index.js.map +0 -1
- package/dist/src/nile-radio-button/nile-radio-button.css.js +0 -173
- package/dist/src/nile-radio-button/nile-radio-button.css.js.map +0 -1
- package/dist/src/nile-radio-button/nile-radio-button.d.ts +0 -57
- package/dist/src/nile-radio-button/nile-radio-button.js +0 -145
- package/dist/src/nile-radio-button/nile-radio-button.js.map +0 -1
- package/dist/src/nile-radio-button-group/index.d.ts +0 -1
- package/dist/src/nile-radio-button-group/index.js +0 -2
- package/dist/src/nile-radio-button-group/index.js.map +0 -1
- package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js +0 -70
- package/dist/src/nile-radio-button-group/nile-radio-button-group.css.js.map +0 -1
- package/dist/src/nile-radio-button-group/nile-radio-button-group.d.ts +0 -66
- package/dist/src/nile-radio-button-group/nile-radio-button-group.js +0 -308
- package/dist/src/nile-radio-button-group/nile-radio-button-group.js.map +0 -1
- package/src/nile-radio-button/index.ts +0 -1
- package/src/nile-radio-button/nile-radio-button.css.ts +0 -175
- package/src/nile-radio-button/nile-radio-button.ts +0 -151
- package/src/nile-radio-button-group/index.ts +0 -1
- package/src/nile-radio-button-group/nile-radio-button-group.css.ts +0 -72
- package/src/nile-radio-button-group/nile-radio-button-group.ts +0 -337
- /package/dist/{nile-radio-button → nile-button-toggle}/index.cjs.js.map +0 -0
- /package/dist/{nile-radio-button-group → nile-button-toggle-group}/index.cjs.js.map +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { CSSResultArray, TemplateResult } from 'lit-element';
|
|
8
|
+
import NileElement from '../internal/nile-element';
|
|
9
|
+
/**
|
|
10
|
+
* Nile icon component.
|
|
11
|
+
*
|
|
12
|
+
* @tag nile-button-toggle-group
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export declare class NileButtonToggleGroup extends NileElement {
|
|
16
|
+
/**
|
|
17
|
+
* The styles for ButtonToggleGroup
|
|
18
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
19
|
+
*/
|
|
20
|
+
static get styles(): CSSResultArray;
|
|
21
|
+
private toggles;
|
|
22
|
+
private defaultSlot;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
connectedCallback(): void;
|
|
25
|
+
firstUpdated(): void;
|
|
26
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
27
|
+
private updateDisabledState;
|
|
28
|
+
updateTogglePositions(): void;
|
|
29
|
+
handleToggle(event: CustomEvent): void;
|
|
30
|
+
/**
|
|
31
|
+
* Render method
|
|
32
|
+
* @slot This is a slot test
|
|
33
|
+
*/
|
|
34
|
+
render(): TemplateResult;
|
|
35
|
+
}
|
|
36
|
+
export default NileButtonToggleGroup;
|
|
37
|
+
declare global {
|
|
38
|
+
interface HTMLElementTagNameMap {
|
|
39
|
+
'nile-button-toggle-group': NileButtonToggleGroup;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright Aquera Inc 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import { __decorate } from "tslib";
|
|
8
|
+
import { html, property } from 'lit-element';
|
|
9
|
+
import { customElement, query, queryAll } from 'lit/decorators.js';
|
|
10
|
+
import { styles } from './nile-button-toggle-group.css';
|
|
11
|
+
import NileButtonToggle from '../nile-button-toggle/nile-button-toggle';
|
|
12
|
+
import NileElement from '../internal/nile-element';
|
|
13
|
+
/**
|
|
14
|
+
* Nile icon component.
|
|
15
|
+
*
|
|
16
|
+
* @tag nile-button-toggle-group
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
let NileButtonToggleGroup = class NileButtonToggleGroup extends NileElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.disabled = false;
|
|
23
|
+
/* #endregion */
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The styles for ButtonToggleGroup
|
|
27
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
28
|
+
*/
|
|
29
|
+
static get styles() {
|
|
30
|
+
return [styles];
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
}
|
|
35
|
+
firstUpdated() {
|
|
36
|
+
this.defaultSlot.addEventListener('slotchange', () => this.updateTogglePositions());
|
|
37
|
+
this.addEventListener('nile-toggle-changed', this.handleToggle);
|
|
38
|
+
this.updateTogglePositions();
|
|
39
|
+
}
|
|
40
|
+
updated(changedProperties) {
|
|
41
|
+
super.updated(changedProperties);
|
|
42
|
+
if (changedProperties.has('disabled')) {
|
|
43
|
+
this.updateDisabledState();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
updateDisabledState() {
|
|
47
|
+
const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });
|
|
48
|
+
const toggles = assignedNodes.filter(node => node instanceof NileButtonToggle);
|
|
49
|
+
toggles.forEach(toggle => {
|
|
50
|
+
if (!toggle.disabled) {
|
|
51
|
+
toggle.disabled = this.disabled;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
updateTogglePositions() {
|
|
56
|
+
const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });
|
|
57
|
+
const toggles = assignedNodes.filter(node => node instanceof NileButtonToggle);
|
|
58
|
+
toggles.forEach((toggle, index) => {
|
|
59
|
+
toggle.initial = index === 0;
|
|
60
|
+
toggle.middle = index > 0 && index < toggles.length - 1;
|
|
61
|
+
toggle.end = index === toggles.length - 1;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
handleToggle(event) {
|
|
65
|
+
if (this.disabled)
|
|
66
|
+
return;
|
|
67
|
+
const toggles = this.querySelectorAll('nile-button-toggle');
|
|
68
|
+
if (toggles && event.detail.active) {
|
|
69
|
+
toggles.forEach((toggle) => {
|
|
70
|
+
if (toggle !== event.target) {
|
|
71
|
+
toggle.active = false;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
this.emit('nile-change', { value: event.detail.value });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Render method
|
|
79
|
+
* @slot This is a slot test
|
|
80
|
+
*/
|
|
81
|
+
render() {
|
|
82
|
+
return html ` <slot> </slot> `;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
__decorate([
|
|
86
|
+
queryAll('nile-button-toggle')
|
|
87
|
+
], NileButtonToggleGroup.prototype, "toggles", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
query('slot:not([name])')
|
|
90
|
+
], NileButtonToggleGroup.prototype, "defaultSlot", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
property({ type: Boolean, reflect: true })
|
|
93
|
+
], NileButtonToggleGroup.prototype, "disabled", void 0);
|
|
94
|
+
NileButtonToggleGroup = __decorate([
|
|
95
|
+
customElement('nile-button-toggle-group')
|
|
96
|
+
], NileButtonToggleGroup);
|
|
97
|
+
export { NileButtonToggleGroup };
|
|
98
|
+
export default NileButtonToggleGroup;
|
|
99
|
+
//# sourceMappingURL=nile-button-toggle-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nile-button-toggle-group.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CAAC,aAAa,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC;SACzD;IACH,CAAC;IAED;;;OAGG;IACI,MAAM;QACX,OAAO,IAAI,CAAA,kBAAkB,CAAC;IAChC,CAAC;CAGF,CAAA;AA7EC;IADC,QAAQ,CAAC,oBAAoB,CAAC;sDACgB;AAG/C;IADC,KAAK,CAAC,kBAAkB,CAAC;0DACY;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACV;AAhBtB,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CAuFjC;SAvFY,qBAAqB;AAyFlC,eAAe,qBAAqB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement, query, queryAll } from 'lit/decorators.js';\nimport {styles} from './nile-button-toggle-group.css';\nimport NileButtonToggle from '../nile-button-toggle/nile-button-toggle';\nimport NileElement from '../internal/nile-element';\n/**\n * Nile icon component.\n *\n * @tag nile-button-toggle-group\n *\n */\n@customElement('nile-button-toggle-group')\nexport class NileButtonToggleGroup extends NileElement {\n /**\n * The styles for ButtonToggleGroup\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 @queryAll('nile-button-toggle')\n private toggles!: NodeListOf<NileButtonToggle>;\n\n @query('slot:not([name])')\n private defaultSlot!: HTMLSlotElement;\n\n @property({ type: Boolean, reflect: true })\n public disabled: boolean = false;\n\n connectedCallback() {\n super.connectedCallback();\n }\n\n firstUpdated() {\n this.defaultSlot.addEventListener('slotchange', () =>\n this.updateTogglePositions()\n );\n this.addEventListener('nile-toggle-changed', this.handleToggle);\n this.updateTogglePositions();\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('disabled')) {\n this.updateDisabledState();\n }\n }\n\n private updateDisabledState() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach(toggle => {\n if (!toggle.disabled) {\n toggle.disabled = this.disabled;\n }\n });\n }\n\n updateTogglePositions() {\n const assignedNodes = this.defaultSlot.assignedNodes({ flatten: true });\n const toggles = assignedNodes.filter(\n node => node instanceof NileButtonToggle\n ) as NileButtonToggle[];\n\n toggles.forEach((toggle, index) => {\n toggle.initial = index === 0;\n toggle.middle = index > 0 && index < toggles.length - 1;\n toggle.end = index === toggles.length - 1;\n });\n }\n\n handleToggle(event: CustomEvent) {\n if (this.disabled) return;\n const toggles = this.querySelectorAll('nile-button-toggle');\n\n if (toggles && event.detail.active) {\n toggles.forEach((toggle: any) => {\n if (toggle !== event.target) {\n toggle.active = false;\n }\n });\n\n this.emit('nile-change', { value: event.detail.value });\n }\n }\n\n /**\n * Render method\n * @slot This is a slot test\n */\n public render(): TemplateResult {\n return html` <slot> </slot> `;\n }\n\n /* #endregion */\n}\n\nexport default NileButtonToggleGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-button-toggle-group': NileButtonToggleGroup;\n }\n}\n"]}
|
|
@@ -19,6 +19,11 @@ export const styles = css `
|
|
|
19
19
|
width: 100%;
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
.dropdown-position {
|
|
24
|
+
position: relative;
|
|
25
|
+
bottom: 60px;
|
|
26
|
+
}
|
|
22
27
|
.content-editable-input {
|
|
23
28
|
box-sizing: border-box;
|
|
24
29
|
width: 100%;
|
|
@@ -38,8 +43,8 @@ export const styles = css `
|
|
|
38
43
|
outline: none;
|
|
39
44
|
}
|
|
40
45
|
|
|
41
|
-
.
|
|
42
|
-
|
|
46
|
+
.error {
|
|
47
|
+
border-color: #e5434d;
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
.chips {
|
|
@@ -52,6 +57,16 @@ export const styles = css `
|
|
|
52
57
|
letter-spacing: 0.2px;
|
|
53
58
|
}
|
|
54
59
|
|
|
60
|
+
.text-area {
|
|
61
|
+
height: 120px;
|
|
62
|
+
white-space: pre-wrap;
|
|
63
|
+
overflow: scroll;
|
|
64
|
+
line-height: 24px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.chip-error {
|
|
68
|
+
background: #f3a5aa;
|
|
69
|
+
}
|
|
55
70
|
.nile-options-container {
|
|
56
71
|
box-sizing: border-box;
|
|
57
72
|
background-color: #ffffff;
|
|
@@ -59,10 +74,6 @@ export const styles = css `
|
|
|
59
74
|
overflow: auto;
|
|
60
75
|
}
|
|
61
76
|
|
|
62
|
-
nile-popup::part(popup) {
|
|
63
|
-
top: 91px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
77
|
label {
|
|
67
78
|
display: inline-block;
|
|
68
79
|
margin-bottom: 6px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-content-editor.css.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ExB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * AttributeExpression CSS\n */\nexport const styles = css`\n :host {\n width: 100%;\n box-sizing: border-box;\n }\n\n .content-editable-wrapper {\n position: relative;\n width: 100%;\n box-sizing: border-box;\n }\n\n .dropdown-position {\n position: relative;\n bottom: 60px;\n }\n .content-editable-input {\n box-sizing: border-box;\n width: 100%;\n padding: 9px;\n border: 1px solid #c7ced4;\n border-radius: 4px;\n overflow-x: auto;\n overflow-anchor: none;\n scrollbar-width: none;\n -ms-overflow-style: none;\n cursor: text;\n white-space: nowrap;\n background-color: #ffffff;\n height: 38px;\n }\n .content-editable-input:focus {\n outline: none;\n }\n\n .error {\n border-color: #e5434d;\n }\n\n .chips {\n background: #e5e9eb;\n color: #000;\n border-radius: 4px;\n padding: 6px;\n margin-left: 3px;\n display: inline;\n letter-spacing: 0.2px;\n }\n\n .text-area {\n height: 120px;\n white-space: pre-wrap;\n overflow: scroll;\n line-height: 24px;\n }\n\n .chip-error {\n background: #f3a5aa;\n }\n .nile-options-container {\n box-sizing: border-box;\n background-color: #ffffff;\n border: 1px solid #c7ced4;\n overflow: auto;\n }\n\n label {\n display: inline-block;\n margin-bottom: 6px;\n font-family: 'colfax-medium';\n }\n\n .asterik {\n color: #e5434d;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -22,22 +22,26 @@ export declare class NileContentEditor extends NileElement {
|
|
|
22
22
|
* @event nile-change - Emitted when the control's value changes.
|
|
23
23
|
*/
|
|
24
24
|
value: string;
|
|
25
|
-
|
|
25
|
+
options: Array<any>;
|
|
26
26
|
showLabel: boolean;
|
|
27
27
|
labelText: string;
|
|
28
|
+
type: string;
|
|
28
29
|
required: boolean;
|
|
29
30
|
input: HTMLInputElement;
|
|
31
|
+
autoOptions: HTMLInputElement;
|
|
30
32
|
private openDropdown;
|
|
31
33
|
helpText: string;
|
|
32
34
|
errorMessage: string;
|
|
33
35
|
static styles: CSSResultGroup;
|
|
34
36
|
connectedCallback(): void;
|
|
37
|
+
handleTypeChange(): void;
|
|
35
38
|
disconnectedCallback(): void;
|
|
36
39
|
afterFirstRender(): Promise<boolean>;
|
|
37
|
-
private
|
|
40
|
+
private handlekeyDown;
|
|
38
41
|
generateValuesFromHTMLTags(string: any): string;
|
|
39
42
|
generateHTMLTagsWithValues(string: any): string;
|
|
40
43
|
emitInputChange(): void;
|
|
44
|
+
moveCursorToEnd: () => void;
|
|
41
45
|
handleOptions(option: any): void;
|
|
42
46
|
renderAutoOptions(): TemplateResult;
|
|
43
47
|
render(): TemplateResult;
|
|
@@ -10,6 +10,7 @@ import { customElement, query, state } from 'lit/decorators.js';
|
|
|
10
10
|
import { styles } from './nile-content-editor.css';
|
|
11
11
|
import { classMap } from 'lit/directives/class-map.js';
|
|
12
12
|
import NileElement from '../internal/nile-element';
|
|
13
|
+
import { watch } from '../internal/watch';
|
|
13
14
|
/**
|
|
14
15
|
* Nile icon component.
|
|
15
16
|
*
|
|
@@ -29,10 +30,20 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
29
30
|
this.value = '';
|
|
30
31
|
this.showLabel = true;
|
|
31
32
|
this.labelText = '';
|
|
33
|
+
this.type = 'text|text-area';
|
|
32
34
|
this.required = true;
|
|
33
35
|
this.openDropdown = false;
|
|
34
36
|
this.helpText = '';
|
|
35
37
|
this.errorMessage = '';
|
|
38
|
+
this.moveCursorToEnd = () => {
|
|
39
|
+
const range = document.createRange();
|
|
40
|
+
const selection = window.getSelection();
|
|
41
|
+
range.setStart(this.input, this.input.childNodes.length);
|
|
42
|
+
range.collapse(true);
|
|
43
|
+
selection?.removeAllRanges();
|
|
44
|
+
selection?.addRange(range);
|
|
45
|
+
this.input.focus();
|
|
46
|
+
};
|
|
36
47
|
}
|
|
37
48
|
connectedCallback() {
|
|
38
49
|
super.connectedCallback();
|
|
@@ -42,6 +53,9 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
42
53
|
this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);
|
|
43
54
|
});
|
|
44
55
|
}
|
|
56
|
+
handleTypeChange() {
|
|
57
|
+
this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);
|
|
58
|
+
}
|
|
45
59
|
disconnectedCallback() {
|
|
46
60
|
super.disconnectedCallback();
|
|
47
61
|
this.emit('nile-destroy');
|
|
@@ -49,12 +63,17 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
49
63
|
async afterFirstRender() {
|
|
50
64
|
return await this.updateComplete;
|
|
51
65
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (value.includes('$')) {
|
|
56
|
-
this.openDropdown = true;
|
|
66
|
+
handlekeyDown(event) {
|
|
67
|
+
if (event.code === 'Enter' && this.type === 'text') {
|
|
68
|
+
event.preventDefault();
|
|
57
69
|
}
|
|
70
|
+
setTimeout(() => {
|
|
71
|
+
const value = this.input.innerText;
|
|
72
|
+
this.emitInputChange();
|
|
73
|
+
if (value.includes('$')) {
|
|
74
|
+
this.openDropdown = true;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
58
77
|
}
|
|
59
78
|
generateValuesFromHTMLTags(string) {
|
|
60
79
|
var pattern = /<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g;
|
|
@@ -66,30 +85,54 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
66
85
|
generateHTMLTagsWithValues(string) {
|
|
67
86
|
var pattern = /{{(.*?)}}/g;
|
|
68
87
|
var result = string.replace(pattern, (match, option) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
88
|
+
return this.options.includes(option)
|
|
89
|
+
? '<span class="chips" contenteditable="false">' + option + '</span>'
|
|
90
|
+
: '<span class="chips chip-error" contenteditable="false">' +
|
|
91
|
+
option +
|
|
92
|
+
'</span>';
|
|
72
93
|
});
|
|
73
94
|
return result;
|
|
74
95
|
}
|
|
75
96
|
emitInputChange() {
|
|
76
|
-
|
|
97
|
+
let fieldValue = this.input.innerHTML;
|
|
98
|
+
if (this.input.innerText !== '') {
|
|
99
|
+
fieldValue = this.generateValuesFromHTMLTags(fieldValue);
|
|
100
|
+
}
|
|
101
|
+
fieldValue = fieldValue.replace(/ /g, ' ');
|
|
102
|
+
fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();
|
|
103
|
+
this.emit('nile-change', {
|
|
104
|
+
value: this.generateValuesFromHTMLTags(fieldValue),
|
|
105
|
+
});
|
|
77
106
|
}
|
|
78
107
|
handleOptions(option) {
|
|
79
108
|
this.openDropdown = !this.openDropdown;
|
|
80
109
|
// not appending Native element as it replaces all existing child nodes with new node
|
|
81
110
|
const autoOptionsTag = '<span class="chips" contenteditable="false">' + option + '</span>';
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
this.input.lastChild
|
|
86
|
-
this.input.lastChild.previousSibling.nodeValue
|
|
111
|
+
// text editor adds div when pressing enter , so before appending have to check if its parent node is div else append it to content editable parent
|
|
112
|
+
if (this.input?.lastElementChild?.tagName === 'DIV') {
|
|
113
|
+
this.input.lastElementChild.insertAdjacentHTML('beforeend', autoOptionsTag);
|
|
114
|
+
if (this.input.lastElementChild.lastChild?.previousSibling)
|
|
115
|
+
this.input.lastElementChild.lastChild.previousSibling.nodeValue =
|
|
116
|
+
this.input.lastElementChild.lastChild.previousSibling.nodeValue.replace('$', '');
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
this.input.insertAdjacentHTML('beforeend', autoOptionsTag);
|
|
120
|
+
if (this.input.lastChild?.previousSibling) {
|
|
121
|
+
this.input.lastChild.previousSibling.nodeValue =
|
|
122
|
+
this.input.lastChild.previousSibling.nodeValue.replace('$', '');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
87
125
|
this.emitInputChange();
|
|
88
126
|
}
|
|
89
127
|
renderAutoOptions() {
|
|
90
|
-
return html `<div
|
|
91
|
-
${
|
|
92
|
-
|
|
128
|
+
return html `<div
|
|
129
|
+
class="${classMap({
|
|
130
|
+
'nile-options-container': true,
|
|
131
|
+
'dropdown-position': this.type === 'text-area',
|
|
132
|
+
})}class"
|
|
133
|
+
>
|
|
134
|
+
${this.options &&
|
|
135
|
+
this.options.map((option) => {
|
|
93
136
|
return html ` <nile-option
|
|
94
137
|
.value="${option}"
|
|
95
138
|
@click="${(event) => {
|
|
@@ -102,7 +145,8 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
102
145
|
}
|
|
103
146
|
render() {
|
|
104
147
|
const hasHelpText = this.helpText ? true : false;
|
|
105
|
-
const hasErrorMessage = this.errorMessage
|
|
148
|
+
const hasErrorMessage = !!this.errorMessage;
|
|
149
|
+
const type = this.type;
|
|
106
150
|
return html `
|
|
107
151
|
<nile-popup
|
|
108
152
|
.active="${this.openDropdown}"
|
|
@@ -111,6 +155,7 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
111
155
|
class=${classMap({
|
|
112
156
|
dropdown: true,
|
|
113
157
|
'dropdown--open': true,
|
|
158
|
+
popup: true,
|
|
114
159
|
})}
|
|
115
160
|
>
|
|
116
161
|
<div class="content-editable-wrapper" slot="anchor">
|
|
@@ -121,9 +166,13 @@ let NileContentEditor = class NileContentEditor extends NileElement {
|
|
|
121
166
|
: ''}`
|
|
122
167
|
: ''}
|
|
123
168
|
<div
|
|
124
|
-
class="content-editable-input"
|
|
125
169
|
contenteditable="true"
|
|
126
|
-
|
|
170
|
+
class=${classMap({
|
|
171
|
+
'content-editable-input': true,
|
|
172
|
+
error: hasErrorMessage,
|
|
173
|
+
'text-area': type === 'text-area' ? true : false,
|
|
174
|
+
})}
|
|
175
|
+
@keydown=${this.handlekeyDown}
|
|
127
176
|
></div>
|
|
128
177
|
${hasHelpText
|
|
129
178
|
? html `
|
|
@@ -150,19 +199,25 @@ __decorate([
|
|
|
150
199
|
], NileContentEditor.prototype, "value", void 0);
|
|
151
200
|
__decorate([
|
|
152
201
|
property()
|
|
153
|
-
], NileContentEditor.prototype, "
|
|
202
|
+
], NileContentEditor.prototype, "options", void 0);
|
|
154
203
|
__decorate([
|
|
155
204
|
property()
|
|
156
205
|
], NileContentEditor.prototype, "showLabel", void 0);
|
|
157
206
|
__decorate([
|
|
158
207
|
property()
|
|
159
208
|
], NileContentEditor.prototype, "labelText", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property()
|
|
211
|
+
], NileContentEditor.prototype, "type", void 0);
|
|
160
212
|
__decorate([
|
|
161
213
|
property()
|
|
162
214
|
], NileContentEditor.prototype, "required", void 0);
|
|
163
215
|
__decorate([
|
|
164
216
|
query('.content-editable-input')
|
|
165
217
|
], NileContentEditor.prototype, "input", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
query('.nile-options-container')
|
|
220
|
+
], NileContentEditor.prototype, "autoOptions", void 0);
|
|
166
221
|
__decorate([
|
|
167
222
|
state()
|
|
168
223
|
], NileContentEditor.prototype, "openDropdown", void 0);
|
|
@@ -172,6 +227,9 @@ __decorate([
|
|
|
172
227
|
__decorate([
|
|
173
228
|
property({ attribute: 'error-message' })
|
|
174
229
|
], NileContentEditor.prototype, "errorMessage", void 0);
|
|
230
|
+
__decorate([
|
|
231
|
+
watch('type', { waitUntilFirstUpdate: true })
|
|
232
|
+
], NileContentEditor.prototype, "handleTypeChange", null);
|
|
175
233
|
NileContentEditor = __decorate([
|
|
176
234
|
customElement('nile-content-editor')
|
|
177
235
|
], NileContentEditor);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAA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eAEvB;YACH,CAAC,CAAC,EAAE;;;UAGN,IAAI,CAAC,iBAAiB,EAAE;;KAE7B,CAAC;IACJ,CAAC;;AAhIM,wBAAM,GAAmB,MAAM,CAAC;AAlB3B;IAAX,QAAQ,EAAE;gDAAoB;AAEnB;IAAX,QAAQ,EAAE;0DAA6B;AAE5B;IAAX,QAAQ,EAAE;oDAA2B;AAE1B;IAAX,QAAQ,EAAE;oDAAgB;AAEf;IAAX,QAAQ,EAAE;mDAA0B;AAEH;IAAjC,KAAK,CAAC,yBAAyB,CAAC;gDAAyB;AAEjD;IAAR,KAAK,EAAE;uDAAuC;AAET;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;mDAAe;AAEV;IAAzC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;uDAAmB;AAzBjD,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA4J7B;SA5JY,iBAAiB;AA8J9B,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() dropdownOptions: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') input: HTMLInputElement;\n\n @state() private openDropdown: boolean = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n this.afterFirstRender().then(res => {\n if (res && this.value !== '')\n this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);\n });\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n async afterFirstRender(): Promise<boolean> {\n return await this.updateComplete;\n }\n\n private handleChange(event: any) {\n const value = this.input.innerText;\n this.emitInputChange();\n if (value.includes('$')) {\n this.openDropdown = true;\n }\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n if (this.dropdownOptions.includes(option)) {\n return (\n '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n );\n }\n });\n return result;\n }\n\n emitInputChange(): void {\n this.emit(\n 'nile-change',\n this.generateValuesFromHTMLTags(this.input.innerHTML)\n );\n }\n\n handleOptions(option: any): void {\n this.openDropdown = !this.openDropdown;\n\n // not appending Native element as it replaces all existing child nodes with new node\n const autoOptionsTag =\n '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>';\n this.input.innerHTML = this.input.innerHTML + autoOptionsTag;\n\n // removing '$' from innerText after option is being selected\n if (this.input.lastChild?.previousSibling)\n this.input.lastChild.previousSibling.nodeValue =\n this.input.lastChild.previousSibling.nodeValue!.replace('$', '');\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div class=\"nile-options-container\">\n ${this.dropdownOptions &&\n this.dropdownOptions.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n return html`\n <nile-popup\n .active=\"${this.openDropdown}\"\n sync=\"width\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n class=\"content-editable-input\"\n contenteditable=\"true\"\n @input=${this.handleChange}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n\n ${this.renderAutoOptions()}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nile-content-editor.js","sourceRoot":"","sources":["../../../src/nile-content-editor/nile-content-editor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C;;;;;GAKG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,WAAW;IAA3C;QACL;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,eAAe,iBAAiB,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, property, TemplateResult } from 'lit-element';\nimport { customElement, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-content-editor.css';\nimport { CSSResultGroup } from 'lit';\nimport { classMap } from 'lit/directives/class-map.js';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\n\n/**\n * Nile icon component.\n *\n * @tag nile-attribute-expression\n *\n */\n@customElement('nile-content-editor')\nexport class NileContentEditor extends NileElement {\n /**\n * @summary Allows you to handle both input and dropdown selection\n\n * @dependency nile-option\n \n * @event nile-change - Emitted when the control's value changes. \n */\n\n @property() value: string = '';\n\n @property() options: Array<any>;\n\n @property() showLabel: boolean = true;\n\n @property() labelText = '';\n\n @property() type = 'text|text-area';\n\n @property() required: boolean = true;\n\n @query('.content-editable-input') input: HTMLInputElement;\n @query('.nile-options-container') autoOptions: HTMLInputElement;\n\n @state() private openDropdown: boolean = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n static styles: CSSResultGroup = styles;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n this.afterFirstRender().then(res => {\n if (res && this.value !== '')\n this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);\n });\n }\n\n @watch('type', { waitUntilFirstUpdate: true })\n handleTypeChange() {\n this.input.innerHTML = this.generateHTMLTagsWithValues(this.value);\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n async afterFirstRender(): Promise<boolean> {\n return await this.updateComplete;\n }\n\n private handlekeyDown(event: any) {\n if (event.code === 'Enter' && this.type === 'text') {\n event.preventDefault();\n }\n setTimeout(() => {\n const value = this.input.innerText;\n this.emitInputChange();\n if (value.includes('$')) {\n this.openDropdown = true;\n }\n });\n }\n\n generateValuesFromHTMLTags(string: any): string {\n var pattern =\n /<span class=\"chips(?: chip-error)?\" contenteditable=\"false\">(.*?)<\\/span>/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return '{{' + option + '}}';\n });\n return result;\n }\n\n generateHTMLTagsWithValues(string: any): string {\n var pattern = /{{(.*?)}}/g;\n var result = string.replace(pattern, (match: any, option: any) => {\n return this.options.includes(option)\n ? '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>'\n : '<span class=\"chips chip-error\" contenteditable=\"false\">' +\n option +\n '</span>';\n });\n return result;\n }\n\n emitInputChange(): void {\n let fieldValue = this.input.innerHTML;\n\n if (this.input.innerText !== '') {\n fieldValue = this.generateValuesFromHTMLTags(fieldValue);\n }\n fieldValue = fieldValue.replace(/ /g, ' ');\n fieldValue = fieldValue === '<br>' ? '' : fieldValue?.trim();\n this.emit('nile-change', {\n value: this.generateValuesFromHTMLTags(fieldValue),\n });\n }\n\n moveCursorToEnd = () => {\n const range = document.createRange();\n const selection = window.getSelection();\n range.setStart(this.input, this.input.childNodes.length);\n range.collapse(true);\n selection?.removeAllRanges();\n selection?.addRange(range);\n this.input.focus();\n };\n\n handleOptions(option: any): void {\n this.openDropdown = !this.openDropdown;\n\n // not appending Native element as it replaces all existing child nodes with new node\n const autoOptionsTag =\n '<span class=\"chips\" contenteditable=\"false\">' + option + '</span>';\n // text editor adds div when pressing enter , so before appending have to check if its parent node is div else append it to content editable parent\n if (this.input?.lastElementChild?.tagName === 'DIV') {\n this.input.lastElementChild.insertAdjacentHTML(\n 'beforeend',\n autoOptionsTag\n );\n if (this.input.lastElementChild.lastChild?.previousSibling)\n this.input.lastElementChild.lastChild.previousSibling.nodeValue =\n this.input.lastElementChild.lastChild.previousSibling.nodeValue!.replace(\n '$',\n ''\n );\n } else {\n this.input.insertAdjacentHTML('beforeend', autoOptionsTag);\n if (this.input.lastChild?.previousSibling) {\n this.input.lastChild.previousSibling.nodeValue =\n this.input.lastChild.previousSibling.nodeValue!.replace('$', '');\n }\n }\n this.emitInputChange();\n }\n\n public renderAutoOptions(): TemplateResult {\n return html`<div\n class=\"${classMap({\n 'nile-options-container': true,\n 'dropdown-position': this.type === 'text-area',\n })}class\"\n >\n ${this.options &&\n this.options.map((option: any) => {\n return html` <nile-option\n .value=\"${option}\"\n @click=\"${(event: Event) => {\n this.handleOptions(option);\n }}\"\n >${option}\n </nile-option>`;\n })}\n </div>`;\n }\n\n public render(): TemplateResult {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = !!this.errorMessage;\n const type = this.type;\n return html`\n <nile-popup\n .active=\"${this.openDropdown}\"\n sync=\"width\"\n placement=\"bottom\"\n class=${classMap({\n dropdown: true,\n 'dropdown--open': true,\n popup: true,\n })}\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ${this.showLabel && this.labelText\n ? html`<label class=\"ods-label\">${this.labelText} </label> ${this\n .required\n ? html`<span class=\"asterik\">*</span>`\n : ''}`\n : ''}\n <div\n contenteditable=\"true\"\n class=${classMap({\n 'content-editable-input': true,\n error: hasErrorMessage,\n 'text-area': type === 'text-area' ? true : false,\n })}\n @keydown=${this.handlekeyDown}\n ></div>\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </div>\n\n ${this.renderAutoOptions()}\n </nile-popup>\n `;\n }\n}\n\nexport default NileContentEditor;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-content-editor': NileContentEditor;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mB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license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query } 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@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() value: any;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n return html`\n <nile-dropdown .hoist=\"${true}\">\n <slot\n slot=\"trigger\"\n part=\"trigger\"\n name=\"trigger\"\n ></slot>\n <nile-calendar value=\"${this.value}\" .range=\"${this.range}\" @nile-changed=\"${this.handleChanged}\"></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: any) {\n this.emit('nile-changed', event.detail);\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"]}
|
|
1
|
+
{"version":3,"file":"nile-date-picker.js","sourceRoot":"","sources":["../../../src/nile-date-picker/nile-date-picker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAGnD;;;;;GAKG;AAEI,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,WAAW;IAAxC;;QASwB,UAAK,GAAG,KAAK,CAAC;IAwC7C,CAAC;IAhDC;;;OAGG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;IAClB,CAAC;IASD;;;OAGG;IACH,MAAM;QACJ,OAAO,IAAI,CAAA;+BACgB,IAAI;;;;;;8BAML,IAAI,CAAC,KAAK,aAAa,IAAI,CAAC,KAAK,oBAAoB,IAAI,CAAC,aAAa;;KAEhG,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,KAAU;QACtB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;SACtB;IACH,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACzB,CAAC;IAED,oBAAoB;QAClB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5B,CAAC;CACF,CAAA;AAxC8B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CAAe;AAE/B;IAAX,QAAQ,EAAE;6CAAY;AAEC;IAAvB,KAAK,CAAC,eAAe,CAAC;gDAAwB;AAbpC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAiD1B;SAjDY,cAAc;AAmD3B,eAAe,cAAc,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement, query } 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@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() value: any;\n\n @query('nile-dropdown') dropdown: NileDropdown;\n\n\n /**\n * Render method\n * @slot This is a slot test\n */\n render(): TemplateResult {\n return html`\n <nile-dropdown .hoist=\"${true}\" distance=\"6\">\n <slot\n slot=\"trigger\"\n part=\"trigger\"\n name=\"trigger\"\n ></slot>\n <nile-calendar value=\"${this.value}\" .range=\"${this.range}\" @nile-changed=\"${this.handleChanged}\"></nile-calendar>\n </nile-dropdown>\n `;\n }\n\n handleChanged(event: any) {\n this.emit('nile-changed', event.detail);\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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileDialog } from './nile-dialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-dialog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { NileDialog } from './nile-dialog';\n"]}
|