@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
|
@@ -29,17 +29,29 @@ import { classMap } from 'lit/directives/class-map.js';
|
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
31
|
export interface switchconfig {
|
|
32
|
+
[key: string]: any;
|
|
32
33
|
toggleSwitch: boolean;
|
|
34
|
+
disable?: boolean;
|
|
33
35
|
defaultInput: switchInputType;
|
|
34
36
|
switchInput: switchInputType;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
export interface switchInputType {
|
|
38
|
-
inputType:
|
|
40
|
+
inputType:
|
|
41
|
+
| INPUT_TYPE_NAMES.DROPDOWN
|
|
42
|
+
| INPUT_TYPE_NAMES.TEXT
|
|
43
|
+
| INPUT_TYPE_NAMES.CHECKBOX
|
|
44
|
+
| INPUT_TYPE_NAMES.TEXTAREA
|
|
45
|
+
| INPUT_TYPE_NAMES.RADIO
|
|
46
|
+
| INPUT_TYPE_NAMES.CONTENTEDITOR;
|
|
39
47
|
value?: String | boolean;
|
|
40
48
|
label?: String;
|
|
49
|
+
type: string;
|
|
41
50
|
placeholder?: string;
|
|
42
51
|
disabled?: boolean;
|
|
52
|
+
required?: boolean;
|
|
53
|
+
error?: boolean;
|
|
54
|
+
errorMessage?: string;
|
|
43
55
|
options?: Array<any>;
|
|
44
56
|
multiple?: boolean;
|
|
45
57
|
}
|
|
@@ -49,6 +61,15 @@ export enum INPUT_TYPE {
|
|
|
49
61
|
SWITCH = 'switchInput',
|
|
50
62
|
}
|
|
51
63
|
|
|
64
|
+
export enum INPUT_TYPE_NAMES {
|
|
65
|
+
DROPDOWN = 'dropdown',
|
|
66
|
+
TEXT = 'text',
|
|
67
|
+
CHECKBOX = 'checkbox',
|
|
68
|
+
TEXTAREA = 'text-area',
|
|
69
|
+
RADIO = 'radio',
|
|
70
|
+
CONTENTEDITOR = 'content-editor',
|
|
71
|
+
}
|
|
72
|
+
|
|
52
73
|
@customElement('nile-switcher')
|
|
53
74
|
export class NileSwitcher extends NileElement {
|
|
54
75
|
/**
|
|
@@ -69,26 +90,43 @@ export class NileSwitcher extends NileElement {
|
|
|
69
90
|
}
|
|
70
91
|
|
|
71
92
|
renderNileText(Input: switchInputType, inputType: string) {
|
|
72
|
-
const {
|
|
93
|
+
const {
|
|
94
|
+
value,
|
|
95
|
+
label,
|
|
96
|
+
placeholder,
|
|
97
|
+
disabled,
|
|
98
|
+
required,
|
|
99
|
+
errorMessage,
|
|
100
|
+
inputType: inputTypeName,
|
|
101
|
+
} = Input;
|
|
73
102
|
return html`<nile-input
|
|
74
103
|
.value=${value}
|
|
75
104
|
.label=${label}
|
|
76
105
|
.disabled=${disabled}
|
|
106
|
+
.required=${required}
|
|
107
|
+
.errorMessage=${errorMessage}
|
|
77
108
|
.placeholder=${placeholder}
|
|
109
|
+
.error=${true}
|
|
78
110
|
@nile-input=${(e: CustomEvent) => {
|
|
79
|
-
this.handleChange(e, inputType);
|
|
111
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
80
112
|
}}
|
|
81
113
|
></nile-input>`;
|
|
82
114
|
}
|
|
83
115
|
|
|
84
116
|
renderDropdown(Input: switchInputType, inputType: string) {
|
|
85
|
-
const {
|
|
117
|
+
const {
|
|
118
|
+
options,
|
|
119
|
+
multiple,
|
|
120
|
+
placeholder,
|
|
121
|
+
disabled,
|
|
122
|
+
inputType: inputTypeName,
|
|
123
|
+
} = Input;
|
|
86
124
|
return html`<nile-select
|
|
87
125
|
.placeholder=${placeholder}
|
|
88
126
|
.disabled="${disabled}"
|
|
89
127
|
.multiple="${multiple}"
|
|
90
128
|
@nile-change=${(e: CustomEvent) => {
|
|
91
|
-
this.handleChange(e, inputType);
|
|
129
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
92
130
|
}}
|
|
93
131
|
>
|
|
94
132
|
${options?.map((option: any) => {
|
|
@@ -98,37 +136,37 @@ export class NileSwitcher extends NileElement {
|
|
|
98
136
|
}
|
|
99
137
|
|
|
100
138
|
renderNileTextArea(Input: switchInputType, inputType: string) {
|
|
101
|
-
const { value, disabled } = Input;
|
|
139
|
+
const { value, disabled, inputType: inputTypeName } = Input;
|
|
102
140
|
return html`<nile-textarea
|
|
103
141
|
.value=${value}
|
|
104
142
|
.disabled=${disabled}
|
|
105
143
|
@nile-input=${(e: CustomEvent) => {
|
|
106
|
-
this.handleChange(e, inputType);
|
|
144
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
107
145
|
}}
|
|
108
146
|
></nile-textarea>`;
|
|
109
147
|
}
|
|
110
148
|
|
|
111
149
|
renderNileCheckBox(Input: switchInputType, inputType: string) {
|
|
112
|
-
const { value, label, disabled } = Input;
|
|
150
|
+
const { value, label, disabled, inputType: inputTypeName } = Input;
|
|
113
151
|
|
|
114
152
|
return html`<nile-checkbox
|
|
115
153
|
.checked=${value}
|
|
116
154
|
.label=${label}
|
|
117
155
|
.disabled=${disabled}
|
|
118
156
|
@valueChange=${(e: CustomEvent) => {
|
|
119
|
-
this.
|
|
157
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
120
158
|
}}
|
|
121
159
|
></nile-checkbox>`;
|
|
122
160
|
}
|
|
123
161
|
|
|
124
162
|
renderNileRadio(Input: switchInputType, inputType: string) {
|
|
125
|
-
const { options, value, disabled } = Input;
|
|
163
|
+
const { options, value, disabled, inputType: inputTypeName } = Input;
|
|
126
164
|
|
|
127
165
|
return html`<nile-radio-group
|
|
128
166
|
.value=${value}
|
|
129
167
|
.disabled=${disabled}
|
|
130
168
|
@change=${(e: CustomEvent) => {
|
|
131
|
-
this.handleChange(e, inputType);
|
|
169
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
132
170
|
}}
|
|
133
171
|
>
|
|
134
172
|
${options &&
|
|
@@ -138,22 +176,35 @@ export class NileSwitcher extends NileElement {
|
|
|
138
176
|
</nile-radio-group>`;
|
|
139
177
|
}
|
|
140
178
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
179
|
+
renderContentEditor(Input: switchInputType, inputType: string) {
|
|
180
|
+
const {
|
|
181
|
+
value,
|
|
182
|
+
options,
|
|
183
|
+
inputType: inputTypeName,
|
|
184
|
+
errorMessage,
|
|
185
|
+
type,
|
|
186
|
+
} = Input;
|
|
187
|
+
return html`<nile-content-editor
|
|
188
|
+
.value=${value}
|
|
189
|
+
.options=${options}
|
|
190
|
+
.type =${type}
|
|
191
|
+
.errorMessage=${errorMessage}
|
|
192
|
+
@nile-change=${(e: CustomEvent) => {
|
|
193
|
+
this.handleChange(e, inputType, inputTypeName);
|
|
194
|
+
}}
|
|
195
|
+
>
|
|
196
|
+
</nile-radio-group>`;
|
|
149
197
|
}
|
|
150
198
|
|
|
151
|
-
|
|
152
|
-
if (
|
|
153
|
-
this.nileSwitchConfig.
|
|
199
|
+
handleChange(event: CustomEvent, inputType: string, inputTypeName: string) {
|
|
200
|
+
if (inputTypeName === INPUT_TYPE_NAMES.CHECKBOX) {
|
|
201
|
+
this.nileSwitchConfig[inputType as keyof switchconfig].value =
|
|
202
|
+
event.detail.checked;
|
|
154
203
|
} else {
|
|
155
|
-
this.nileSwitchConfig.
|
|
204
|
+
this.nileSwitchConfig[inputType as keyof switchconfig].value =
|
|
205
|
+
event.detail.value;
|
|
156
206
|
}
|
|
207
|
+
event.stopPropagation();
|
|
157
208
|
this.emit('nile-change', { config: this.nileSwitchConfig });
|
|
158
209
|
}
|
|
159
210
|
|
|
@@ -184,7 +235,8 @@ export class NileSwitcher extends NileElement {
|
|
|
184
235
|
singleFieldSwitcher(
|
|
185
236
|
defaultInput: switchInputType,
|
|
186
237
|
switchInput: switchInputType,
|
|
187
|
-
toggleField: boolean
|
|
238
|
+
toggleField: boolean,
|
|
239
|
+
disable: boolean
|
|
188
240
|
) {
|
|
189
241
|
const defaultInputType = defaultInput.inputType;
|
|
190
242
|
const switchInputType = switchInput.inputType;
|
|
@@ -194,29 +246,37 @@ export class NileSwitcher extends NileElement {
|
|
|
194
246
|
defaultInputType,
|
|
195
247
|
[
|
|
196
248
|
[
|
|
197
|
-
|
|
249
|
+
INPUT_TYPE_NAMES.TEXT,
|
|
198
250
|
() => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT),
|
|
199
251
|
],
|
|
200
252
|
[
|
|
201
|
-
|
|
253
|
+
INPUT_TYPE_NAMES.CHECKBOX,
|
|
202
254
|
() => this.renderNileCheckBox(defaultInput, INPUT_TYPE.DEFAULT),
|
|
203
255
|
],
|
|
204
256
|
[
|
|
205
|
-
|
|
257
|
+
INPUT_TYPE_NAMES.TEXTAREA,
|
|
206
258
|
() => this.renderNileTextArea(defaultInput, INPUT_TYPE.DEFAULT),
|
|
207
259
|
],
|
|
208
260
|
[
|
|
209
|
-
|
|
261
|
+
INPUT_TYPE_NAMES.RADIO,
|
|
210
262
|
() => this.renderNileRadio(defaultInput, INPUT_TYPE.DEFAULT),
|
|
211
263
|
],
|
|
212
264
|
[
|
|
213
|
-
|
|
265
|
+
INPUT_TYPE_NAMES.DROPDOWN,
|
|
214
266
|
() =>
|
|
215
267
|
this.renderDropdown(
|
|
216
268
|
this.nileSwitchConfig.defaultInput,
|
|
217
269
|
INPUT_TYPE.DEFAULT
|
|
218
270
|
),
|
|
219
271
|
],
|
|
272
|
+
[
|
|
273
|
+
INPUT_TYPE_NAMES.CONTENTEDITOR,
|
|
274
|
+
() =>
|
|
275
|
+
this.renderContentEditor(
|
|
276
|
+
this.nileSwitchConfig.defaultInput,
|
|
277
|
+
INPUT_TYPE.DEFAULT
|
|
278
|
+
),
|
|
279
|
+
],
|
|
220
280
|
],
|
|
221
281
|
() => this.renderNileText(defaultInput, INPUT_TYPE.DEFAULT)
|
|
222
282
|
)
|
|
@@ -224,18 +284,22 @@ export class NileSwitcher extends NileElement {
|
|
|
224
284
|
switchInputType,
|
|
225
285
|
[
|
|
226
286
|
[
|
|
227
|
-
|
|
287
|
+
INPUT_TYPE_NAMES.TEXTAREA,
|
|
228
288
|
() => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH),
|
|
229
289
|
],
|
|
230
290
|
[
|
|
231
|
-
|
|
291
|
+
INPUT_TYPE_NAMES.TEXT,
|
|
232
292
|
() => this.renderNileText(switchInput, INPUT_TYPE.SWITCH),
|
|
233
293
|
],
|
|
294
|
+
[
|
|
295
|
+
INPUT_TYPE_NAMES.CONTENTEDITOR,
|
|
296
|
+
() => this.renderContentEditor(switchInput, INPUT_TYPE.SWITCH),
|
|
297
|
+
],
|
|
234
298
|
],
|
|
235
299
|
|
|
236
300
|
() => this.renderNileTextArea(switchInput, INPUT_TYPE.SWITCH)
|
|
237
301
|
)}
|
|
238
|
-
${this.renderIcon()}
|
|
302
|
+
${!disable ? this.renderIcon() : ''}
|
|
239
303
|
`;
|
|
240
304
|
}
|
|
241
305
|
public render(): TemplateResult {
|
|
@@ -243,10 +307,16 @@ export class NileSwitcher extends NileElement {
|
|
|
243
307
|
toggleSwitch: toggleField,
|
|
244
308
|
defaultInput,
|
|
245
309
|
switchInput,
|
|
310
|
+
disable,
|
|
246
311
|
} = this.nileSwitchConfig;
|
|
247
312
|
|
|
248
313
|
return html`<div class="input-container">
|
|
249
|
-
${this.singleFieldSwitcher(
|
|
314
|
+
${this.singleFieldSwitcher(
|
|
315
|
+
defaultInput,
|
|
316
|
+
switchInput,
|
|
317
|
+
toggleField,
|
|
318
|
+
!!disable
|
|
319
|
+
)}
|
|
250
320
|
</div>`;
|
|
251
321
|
}
|
|
252
322
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NileRadioButton } from './nile-radio-button';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/nile-radio-button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC","sourcesContent":["export { NileRadioButton } from './nile-radio-button';\n"]}
|
|
@@ -1,173 +0,0 @@
|
|
|
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 { css } from 'lit-element';
|
|
8
|
-
/**
|
|
9
|
-
* RadioButton CSS
|
|
10
|
-
*/
|
|
11
|
-
export const styles = css `
|
|
12
|
-
:host {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.button {
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
width: 100%;
|
|
20
|
-
color: var(--color-text-default, #000);
|
|
21
|
-
text-align: center;
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
font-family: Colfax-regular;
|
|
24
|
-
font-size: 14px;
|
|
25
|
-
font-style: normal;
|
|
26
|
-
font-weight: 400;
|
|
27
|
-
line-height: 14px; /* 100% */
|
|
28
|
-
letter-spacing: 0.2px;
|
|
29
|
-
text-decoration: none;
|
|
30
|
-
user-select: none;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
vertical-align: middle;
|
|
33
|
-
padding: 12px;
|
|
34
|
-
cursor: pointer;
|
|
35
|
-
gap: 10px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.button::-moz-focus-inner {
|
|
39
|
-
border: 0;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.button:focus {
|
|
43
|
-
outline: none;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.button:focus-visible {
|
|
47
|
-
outline: var(--nile-focus-ring);
|
|
48
|
-
outline-offset: var(--nile-focus-ring-offset);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.button--disabled {
|
|
52
|
-
opacity: 0.5;
|
|
53
|
-
cursor: not-allowed;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/* When disabled, prevent mouse events from bubbling up from children */
|
|
57
|
-
.button--disabled * {
|
|
58
|
-
pointer-events: none;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.button__prefix,
|
|
62
|
-
.button__suffix {
|
|
63
|
-
flex: 0 0 auto;
|
|
64
|
-
display: flex;
|
|
65
|
-
align-items: center;
|
|
66
|
-
pointer-events: none;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.button__label {
|
|
70
|
-
display: inline-block;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.button__label::slotted(nile-icon) {
|
|
74
|
-
vertical-align: -2px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/* Default */
|
|
78
|
-
.button--default {
|
|
79
|
-
border: 1px solid #c7ced4;
|
|
80
|
-
background: #fff;
|
|
81
|
-
color: black;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.button--default:hover:not(.button--disabled) {
|
|
85
|
-
border: 1px solid #c7ced4;
|
|
86
|
-
background: #e5e9eb;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.button--default:active:not(.button--disabled) {
|
|
90
|
-
border: 1px solid #c7ced4;
|
|
91
|
-
background: #e5e9eb;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.button--checked {
|
|
95
|
-
border: 1px solid #c7ced4;
|
|
96
|
-
background: #e5e9eb;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.button--has-label.button--medium .button__label {
|
|
100
|
-
padding: 0 var(--nile-spacing-medium);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.button--has-prefix.button--medium {
|
|
104
|
-
padding-inline-start: var(--nile-spacing-small);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.button--has-prefix.button--medium .button__label {
|
|
108
|
-
padding-inline-start: var(--nile-spacing-small);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.button--has-suffix.button--medium,
|
|
112
|
-
.button--caret.button--medium {
|
|
113
|
-
padding-inline-end: var(--nile-spacing-small);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.button--has-suffix.button--medium .button__label,
|
|
117
|
-
.button--caret.button--medium .button__label {
|
|
118
|
-
padding-inline-end: var(--nile-spacing-small);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.nile-radio-button--first {
|
|
122
|
-
background-color: red;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
:host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {
|
|
126
|
-
border-start-end-radius: 0;
|
|
127
|
-
border-end-end-radius: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:host(.nile-group-button--inner) .button {
|
|
131
|
-
border-radius: 0;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
:host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {
|
|
135
|
-
border-start-start-radius: 0;
|
|
136
|
-
border-end-start-radius: 0;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/* All except the first */
|
|
140
|
-
:host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {
|
|
141
|
-
margin-inline-start: calc(-1 * var(--nile-input-border-width));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
:host(.nile-radio-button--inner) .button {
|
|
145
|
-
border-radius: 0;
|
|
146
|
-
border-left: 0;
|
|
147
|
-
border-right: 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.button__prefix,
|
|
151
|
-
.button__suffix,
|
|
152
|
-
.button__label {
|
|
153
|
-
display: inline-flex;
|
|
154
|
-
position: relative;
|
|
155
|
-
align-items: center;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.
|
|
159
|
-
We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */
|
|
160
|
-
.hidden-input {
|
|
161
|
-
all: unset;
|
|
162
|
-
position: absolute;
|
|
163
|
-
top: 0;
|
|
164
|
-
left: 0;
|
|
165
|
-
bottom: 0;
|
|
166
|
-
right: 0;
|
|
167
|
-
outline: dotted 1px red;
|
|
168
|
-
opacity: 0;
|
|
169
|
-
z-index: -1;
|
|
170
|
-
}
|
|
171
|
-
`;
|
|
172
|
-
export default [styles];
|
|
173
|
-
//# sourceMappingURL=nile-radio-button.css.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-radio-button.css.js","sourceRoot":"","sources":["../../../src/nile-radio-button/nile-radio-button.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKxB,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 * RadioButton CSS\n */\nexport const styles = css`\n :host {\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n color: var(--color-text-default, #000);\n text-align: center;\n border-radius: 4px;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px; /* 100% */\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 12px;\n cursor: pointer;\n gap: 10px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: var(--nile-focus-ring);\n outline-offset: var(--nile-focus-ring-offset);\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n /* When disabled, prevent mouse events from bubbling up from children */\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__prefix,\n .button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n pointer-events: none;\n }\n\n .button__label {\n display: inline-block;\n }\n\n .button__label::slotted(nile-icon) {\n vertical-align: -2px;\n }\n\n /* Default */\n .button--default {\n border: 1px solid #c7ced4;\n background: #fff;\n color: black;\n }\n\n .button--default:hover:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--default:active:not(.button--disabled) {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--checked {\n border: 1px solid #c7ced4;\n background: #e5e9eb;\n }\n\n .button--has-label.button--medium .button__label {\n padding: 0 var(--nile-spacing-medium);\n }\n\n .button--has-prefix.button--medium {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-prefix.button--medium .button__label {\n padding-inline-start: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium,\n .button--caret.button--medium {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .button--has-suffix.button--medium .button__label,\n .button--caret.button--medium .button__label {\n padding-inline-end: var(--nile-spacing-small);\n }\n\n .nile-radio-button--first {\n background-color: red;\n }\n\n :host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n }\n\n :host(.nile-group-button--inner) .button {\n border-radius: 0;\n }\n\n :host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n }\n\n /* All except the first */\n :host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {\n margin-inline-start: calc(-1 * var(--nile-input-border-width));\n }\n\n :host(.nile-radio-button--inner) .button {\n border-radius: 0;\n border-left: 0;\n border-right: 0;\n }\n\n .button__prefix,\n .button__suffix,\n .button__label {\n display: inline-flex;\n position: relative;\n align-items: center;\n }\n\n /* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.\n We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */\n .hidden-input {\n all: unset;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n outline: dotted 1px red;\n opacity: 0;\n z-index: -1;\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -1,57 +0,0 @@
|
|
|
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-radio-button
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
export declare class NileRadioButton extends NileElement {
|
|
16
|
-
/**
|
|
17
|
-
* The styles for RadioButton
|
|
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 readonly hasSlotController;
|
|
22
|
-
input: HTMLInputElement;
|
|
23
|
-
hiddenInput: HTMLInputElement;
|
|
24
|
-
protected hasFocus: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @internal The radio button's checked state. This is exposed as an "internal" attribute so we can reflect it, making
|
|
27
|
-
* it easier to style in button groups.
|
|
28
|
-
*/
|
|
29
|
-
checked: boolean;
|
|
30
|
-
/** The radio's value. When selected, the radio group will receive this value. */
|
|
31
|
-
value: string;
|
|
32
|
-
/** Disables the radio button. */
|
|
33
|
-
disabled: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so
|
|
36
|
-
* this attribute can typically be omitted.
|
|
37
|
-
*/
|
|
38
|
-
size: 'small' | 'medium' | 'large';
|
|
39
|
-
/** Draws a pill-style radio button with rounded edges. */
|
|
40
|
-
pill: boolean;
|
|
41
|
-
connectedCallback(): void;
|
|
42
|
-
private handleBlur;
|
|
43
|
-
private handleClick;
|
|
44
|
-
private handleFocus;
|
|
45
|
-
handleDisabledChange(): void;
|
|
46
|
-
/** Sets focus on the radio button. */
|
|
47
|
-
focus(options?: FocusOptions): void;
|
|
48
|
-
/** Removes focus from the radio button. */
|
|
49
|
-
blur(): void;
|
|
50
|
-
render(): TemplateResult<1>;
|
|
51
|
-
}
|
|
52
|
-
export default NileRadioButton;
|
|
53
|
-
declare global {
|
|
54
|
-
interface HTMLElementTagNameMap {
|
|
55
|
-
'nile-radio-button': NileRadioButton;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
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, state } from 'lit/decorators.js';
|
|
10
|
-
import { styles } from './nile-radio-button.css';
|
|
11
|
-
import NileElement from '../internal/nile-element';
|
|
12
|
-
import { HasSlotController } from '../slot';
|
|
13
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
14
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
15
|
-
import { watch } from '../internal/watch';
|
|
16
|
-
/**
|
|
17
|
-
* Nile icon component.
|
|
18
|
-
*
|
|
19
|
-
* @tag nile-radio-button
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
|
-
let NileRadioButton = class NileRadioButton extends NileElement {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.hasSlotController = new HasSlotController(this, '[default]', 'prefix', 'suffix');
|
|
26
|
-
this.hasFocus = false;
|
|
27
|
-
/**
|
|
28
|
-
* @internal The radio button's checked state. This is exposed as an "internal" attribute so we can reflect it, making
|
|
29
|
-
* it easier to style in button groups.
|
|
30
|
-
*/
|
|
31
|
-
this.checked = false;
|
|
32
|
-
/** Disables the radio button. */
|
|
33
|
-
this.disabled = false;
|
|
34
|
-
/**
|
|
35
|
-
* The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so
|
|
36
|
-
* this attribute can typically be omitted.
|
|
37
|
-
*/
|
|
38
|
-
this.size = 'medium';
|
|
39
|
-
/** Draws a pill-style radio button with rounded edges. */
|
|
40
|
-
this.pill = false;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* The styles for RadioButton
|
|
44
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
45
|
-
*/
|
|
46
|
-
static get styles() {
|
|
47
|
-
return [styles];
|
|
48
|
-
}
|
|
49
|
-
connectedCallback() {
|
|
50
|
-
super.connectedCallback();
|
|
51
|
-
this.setAttribute('role', 'presentation');
|
|
52
|
-
}
|
|
53
|
-
handleBlur() {
|
|
54
|
-
this.hasFocus = false;
|
|
55
|
-
this.emit('nile-blur');
|
|
56
|
-
}
|
|
57
|
-
handleClick(e) {
|
|
58
|
-
if (this.disabled) {
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
e.stopPropagation();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
this.checked = true;
|
|
64
|
-
}
|
|
65
|
-
handleFocus() {
|
|
66
|
-
this.hasFocus = true;
|
|
67
|
-
this.emit('nile-focus');
|
|
68
|
-
}
|
|
69
|
-
handleDisabledChange() {
|
|
70
|
-
this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
|
|
71
|
-
}
|
|
72
|
-
/** Sets focus on the radio button. */
|
|
73
|
-
focus(options) {
|
|
74
|
-
this.input.focus(options);
|
|
75
|
-
}
|
|
76
|
-
/** Removes focus from the radio button. */
|
|
77
|
-
blur() {
|
|
78
|
-
this.input.blur();
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
return html `
|
|
82
|
-
<div part="base" role="presentation">
|
|
83
|
-
<button
|
|
84
|
-
part="${`button${this.checked ? ' button--checked' : ''}`}"
|
|
85
|
-
role="radio"
|
|
86
|
-
aria-checked="${this.checked}"
|
|
87
|
-
class=${classMap({
|
|
88
|
-
button: true,
|
|
89
|
-
'button--default': true,
|
|
90
|
-
'button--checked': this.checked,
|
|
91
|
-
'button--disabled': this.disabled,
|
|
92
|
-
'button--focused': this.hasFocus,
|
|
93
|
-
'button--has-label': this.hasSlotController.test('[default]'),
|
|
94
|
-
'button--has-prefix': this.hasSlotController.test('prefix'),
|
|
95
|
-
'button--has-suffix': this.hasSlotController.test('suffix'),
|
|
96
|
-
})}
|
|
97
|
-
aria-disabled=${this.disabled}
|
|
98
|
-
type="button"
|
|
99
|
-
value=${ifDefined(this.value)}
|
|
100
|
-
tabindex="${this.checked ? '0' : '-1'}"
|
|
101
|
-
@blur=${this.handleBlur}
|
|
102
|
-
@focus=${this.handleFocus}
|
|
103
|
-
@click=${this.handleClick}
|
|
104
|
-
>
|
|
105
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
106
|
-
<slot part="label" class="button__label"></slot>
|
|
107
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
108
|
-
</button>
|
|
109
|
-
</div>
|
|
110
|
-
`;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
__decorate([
|
|
114
|
-
query('.button')
|
|
115
|
-
], NileRadioButton.prototype, "input", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
query('.hidden-input')
|
|
118
|
-
], NileRadioButton.prototype, "hiddenInput", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
state()
|
|
121
|
-
], NileRadioButton.prototype, "hasFocus", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
property({ type: Boolean, reflect: true })
|
|
124
|
-
], NileRadioButton.prototype, "checked", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
property()
|
|
127
|
-
], NileRadioButton.prototype, "value", void 0);
|
|
128
|
-
__decorate([
|
|
129
|
-
property({ type: Boolean, reflect: true })
|
|
130
|
-
], NileRadioButton.prototype, "disabled", void 0);
|
|
131
|
-
__decorate([
|
|
132
|
-
property({ reflect: true })
|
|
133
|
-
], NileRadioButton.prototype, "size", void 0);
|
|
134
|
-
__decorate([
|
|
135
|
-
property({ type: Boolean, reflect: true })
|
|
136
|
-
], NileRadioButton.prototype, "pill", void 0);
|
|
137
|
-
__decorate([
|
|
138
|
-
watch('disabled', { waitUntilFirstUpdate: true })
|
|
139
|
-
], NileRadioButton.prototype, "handleDisabledChange", null);
|
|
140
|
-
NileRadioButton = __decorate([
|
|
141
|
-
customElement('nile-radio-button')
|
|
142
|
-
], NileRadioButton);
|
|
143
|
-
export { NileRadioButton };
|
|
144
|
-
export default NileRadioButton;
|
|
145
|
-
//# sourceMappingURL=nile-radio-button.js.map
|