@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nile-radio-button-group.js","sourceRoot":"","sources":["../../../src/nile-radio-button-group/nile-radio-button-group.ts"],"names":[],"mappings":";AAAA,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,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sDAAkB;AAEvB;IAArC,QAAQ,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;sDAAe;AAEV;IAAzC,QAAQ,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;0DAAmB;AAiC5D;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;gEAKjD;AAqID;IADC,KAAK,CAAC,OAAO,CAAC;6DAKd;AA5NU,oBAAoB;IADhC,aAAa,CAAC,yBAAyB,CAAC;GAC5B,oBAAoB,CA8ShC;SA9SY,oBAAoB;AAgTjC,eAAe,oBAAoB,CAAC","sourcesContent":["import { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-radio-button-group.css';\nimport type { CSSResultGroup } from 'lit';\nimport type NileRadioButton from '../nile-radio-button/nile-radio-button';\n\n/**\n * @summary Radio groups are used to group multiple [radios](/components/radio) or [radio buttons](/components/radio-button) so they function as a single form control.\n *\n * @dependency nile-button-group\n *\n * @slot - The default slot where `<nile-radio>` or `<nile-radio-button>` elements are placed.\n * @slot label - The radio group's label. Required for proper accessibility. Alternatively, you can use the `label`\n * attribute.\n *\n * @event change - Emitted when the radio group's selected value changes.\n * @event input - Emitted when the radio group receives user input.\n * @event invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n * @csspart button-group - The button group that wraps radio buttons.\n * @csspart button-group__base - The button group's `base` part.\n */\n@customElement('nile-radio-button-group')\nexport class NileRadioButtonGroup extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n private customValidityMessage = '';\n\n @query('slot:not([name])') defaultSlot: HTMLSlotElement;\n\n @state() private hasButtonGroup = false;\n\n @state() defaultValue = '';\n\n /**\n * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\n * instead.\n */\n @property() label = '';\n\n /** The name of the radio group, submitted as a name/value pair with form data. */\n @property() name = 'option';\n\n /** The current value of the radio group, submitted as a name/value pair with form data. */\n @property({ reflect: true }) value = '';\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Ensures a child radio is checked before allowing the containing form to submit. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** Used to show radio in inline or not */\n @property({ type: Boolean, reflect: true }) labelInline = false;\n\n /** Used to disabled or not */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ attribute: 'help-text' }) helpText = '';\n\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.defaultValue = this.value;\n this.handleInitialDisabledState();\n }\n\n private getAllRadios() {\n return [...this.querySelectorAll<NileRadioButton>('nile-radio-button')];\n }\n\n private handleRadioClick(event: MouseEvent) {\n const target = (event.target as HTMLElement).closest<NileRadioButton>(\n 'nile-radio-button'\n )!;\n const radios = this.getAllRadios();\n const oldValue = this.value;\n\n if (target.disabled) {\n return;\n }\n\n this.value = target.value;\n radios.forEach(radio => (radio.checked = radio === target));\n\n if (this.value !== oldValue) {\n this.emit('nile-change', { value: this.value });\n this.emit('input');\n }\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n this.getAllRadios().forEach(radio => {\n radio.disabled = this.disabled;\n });\n }\n\n private handleInitialDisabledState() {\n this.getAllRadios().forEach(radio => {\n radio.disabled = radio.hasAttribute('disabled')\n ? radio.disabled\n : this.disabled;\n });\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (\n !['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(\n event.key\n )\n ) {\n return;\n }\n\n const radios = this.getAllRadios().filter(radio => !radio.disabled);\n const checkedRadio = radios.find(radio => radio.checked) ?? radios[0];\n const incr =\n event.key === ' '\n ? 0\n : ['ArrowUp', 'ArrowLeft'].includes(event.key)\n ? -1\n : 1;\n const oldValue = this.value;\n let index = radios.indexOf(checkedRadio) + incr;\n\n if (index < 0) {\n index = radios.length - 1;\n }\n\n if (index > radios.length - 1) {\n index = 0;\n }\n\n this.getAllRadios().forEach(radio => {\n radio.checked = false;\n\n if (!this.hasButtonGroup) {\n radio.tabIndex = -1;\n }\n });\n\n this.value = radios[index].value;\n radios[index].checked = true;\n\n if (!this.hasButtonGroup) {\n radios[index].tabIndex = 0;\n radios[index].focus();\n } else {\n radios[index].shadowRoot!.querySelector('button')!.focus();\n }\n\n if (this.value !== oldValue) {\n this.emit('change');\n this.emit('input');\n }\n\n event.preventDefault();\n }\n\n private handleLabelClick() {\n const radios = this.getAllRadios();\n const checked = radios.find(radio => radio.checked);\n const radioToFocus = checked || radios[0];\n\n // Move focus to the checked radio (or the first one if none are checked) when clicking the label\n if (radioToFocus) {\n radioToFocus.focus();\n }\n }\n\n private handleSlotChange() {\n const radios = this.getAllRadios();\n\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n\n this.hasButtonGroup = radios.some(\n radio => radio.tagName.toLowerCase() === 'nile-radio-button'\n );\n\n if (!radios.some(radio => radio.checked)) {\n if (this.hasButtonGroup) {\n const buttonRadio = radios[0].shadowRoot!.querySelector('button')!;\n buttonRadio.tabIndex = 0;\n } else {\n radios[0].tabIndex = 0;\n }\n }\n\n if (this.hasButtonGroup) {\n const buttonGroup = this.shadowRoot?.querySelector('nile-button-group');\n }\n\n const slottedElements = [\n ...this.defaultSlot.assignedElements({ flatten: true }),\n ] as HTMLElement[];\n\n // console.log(slottedElements);\n\n slottedElements.forEach(el => {\n const index = slottedElements.indexOf(el);\n const button = this.findButton(el);\n\n if (button !== null) {\n button.classList.toggle('nile-radio-button--first', index === 0);\n button.classList.toggle(\n 'nile-radio-button--inner',\n index > 0 && index < slottedElements.length - 1\n );\n button.classList.toggle(\n 'nile-radio-button--last',\n index === slottedElements.length - 1\n );\n }\n });\n }\n\n private findButton(el: HTMLElement) {\n const selector = 'nile-radio-button';\n\n return el.closest(selector) ?? el.querySelector(selector);\n }\n\n private updateCheckedRadio() {\n const radios = this.getAllRadios();\n radios.forEach(radio => (radio.checked = radio.value === this.value));\n }\n\n @watch('value')\n handleValueChange() {\n if (this.hasUpdated) {\n this.updateCheckedRadio();\n }\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n const defaultSlot = html`\n <slot\n @click=${this.handleRadioClick}\n @keydown=${this.handleKeyDown}\n @slotchange=${this.handleSlotChange}\n role=\"presentation\"\n ></slot>\n `;\n\n return html`\n <fieldset\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': true,\n 'form-control--radio-group': true,\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n role=\"radiogroup\"\n aria-labelledby=\"label\"\n aria-describedby=\"help-text\"\n aria-errormessage=\"error-message\"\n >\n <label\n part=\"form-control-label\"\n id=\"label\"\n class=\"form-control__label\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n @click=${this.handleLabelClick}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n <div class=\"visually-hidden\">\n <label class=\"radio-group__validation\">\n <input\n type=\"text\"\n class=\"radio-group__validation-input\"\n ?required=${this.required}\n tabindex=\"-1\"\n hidden\n />\n </label>\n </div>\n\n ${this.hasButtonGroup\n ? html` ${defaultSlot} `\n : html`\n <div\n class=\"${this.labelInline\n ? `form-control--inline-radio`\n : ``}\"\n >\n ${defaultSlot}\n </div>\n `}\n </div>\n\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n </fieldset>\n `;\n }\n}\n\nexport default NileRadioButtonGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-radio-button-group': NileRadioButtonGroup;\n }\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NileRadioButton } from './nile-radio-button';
|
|
@@ -1,175 +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
|
-
|
|
8
|
-
import { css } from 'lit-element';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* RadioButton CSS
|
|
12
|
-
*/
|
|
13
|
-
export const styles = css`
|
|
14
|
-
:host {
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.button {
|
|
18
|
-
display: inline-flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
width: 100%;
|
|
22
|
-
color: var(--color-text-default, #000);
|
|
23
|
-
text-align: center;
|
|
24
|
-
border-radius: 4px;
|
|
25
|
-
font-family: Colfax-regular;
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
font-style: normal;
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
line-height: 14px; /* 100% */
|
|
30
|
-
letter-spacing: 0.2px;
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
user-select: none;
|
|
33
|
-
white-space: nowrap;
|
|
34
|
-
vertical-align: middle;
|
|
35
|
-
padding: 12px;
|
|
36
|
-
cursor: pointer;
|
|
37
|
-
gap: 10px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.button::-moz-focus-inner {
|
|
41
|
-
border: 0;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.button:focus {
|
|
45
|
-
outline: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.button:focus-visible {
|
|
49
|
-
outline: var(--nile-focus-ring);
|
|
50
|
-
outline-offset: var(--nile-focus-ring-offset);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.button--disabled {
|
|
54
|
-
opacity: 0.5;
|
|
55
|
-
cursor: not-allowed;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* When disabled, prevent mouse events from bubbling up from children */
|
|
59
|
-
.button--disabled * {
|
|
60
|
-
pointer-events: none;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.button__prefix,
|
|
64
|
-
.button__suffix {
|
|
65
|
-
flex: 0 0 auto;
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
pointer-events: none;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.button__label {
|
|
72
|
-
display: inline-block;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.button__label::slotted(nile-icon) {
|
|
76
|
-
vertical-align: -2px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* Default */
|
|
80
|
-
.button--default {
|
|
81
|
-
border: 1px solid #c7ced4;
|
|
82
|
-
background: #fff;
|
|
83
|
-
color: black;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.button--default:hover:not(.button--disabled) {
|
|
87
|
-
border: 1px solid #c7ced4;
|
|
88
|
-
background: #e5e9eb;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.button--default:active:not(.button--disabled) {
|
|
92
|
-
border: 1px solid #c7ced4;
|
|
93
|
-
background: #e5e9eb;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.button--checked {
|
|
97
|
-
border: 1px solid #c7ced4;
|
|
98
|
-
background: #e5e9eb;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.button--has-label.button--medium .button__label {
|
|
102
|
-
padding: 0 var(--nile-spacing-medium);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.button--has-prefix.button--medium {
|
|
106
|
-
padding-inline-start: var(--nile-spacing-small);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.button--has-prefix.button--medium .button__label {
|
|
110
|
-
padding-inline-start: var(--nile-spacing-small);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.button--has-suffix.button--medium,
|
|
114
|
-
.button--caret.button--medium {
|
|
115
|
-
padding-inline-end: var(--nile-spacing-small);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.button--has-suffix.button--medium .button__label,
|
|
119
|
-
.button--caret.button--medium .button__label {
|
|
120
|
-
padding-inline-end: var(--nile-spacing-small);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.nile-radio-button--first {
|
|
124
|
-
background-color: red;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
:host(.nile-radio-button--first:not(.nile-radio-button--last)) .button {
|
|
128
|
-
border-start-end-radius: 0;
|
|
129
|
-
border-end-end-radius: 0;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
:host(.nile-group-button--inner) .button {
|
|
133
|
-
border-radius: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
:host(.nile-radio-button--last:not(.nile-radio-button--first)) .button {
|
|
137
|
-
border-start-start-radius: 0;
|
|
138
|
-
border-end-start-radius: 0;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/* All except the first */
|
|
142
|
-
:host(.nile-radio-button__button:not(.nile-radio-button__button--first)) {
|
|
143
|
-
margin-inline-start: calc(-1 * var(--nile-input-border-width));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
:host(.nile-radio-button--inner) .button {
|
|
147
|
-
border-radius: 0;
|
|
148
|
-
border-left: 0;
|
|
149
|
-
border-right: 0;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.button__prefix,
|
|
153
|
-
.button__suffix,
|
|
154
|
-
.button__label {
|
|
155
|
-
display: inline-flex;
|
|
156
|
-
position: relative;
|
|
157
|
-
align-items: center;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/* We use a hidden input so constraint validation errors work, since they don't appear to show when used with buttons.
|
|
161
|
-
We can't actually hide it, though, otherwise the messages will be suppressed by the browser. */
|
|
162
|
-
.hidden-input {
|
|
163
|
-
all: unset;
|
|
164
|
-
position: absolute;
|
|
165
|
-
top: 0;
|
|
166
|
-
left: 0;
|
|
167
|
-
bottom: 0;
|
|
168
|
-
right: 0;
|
|
169
|
-
outline: dotted 1px red;
|
|
170
|
-
opacity: 0;
|
|
171
|
-
z-index: -1;
|
|
172
|
-
}
|
|
173
|
-
`;
|
|
174
|
-
|
|
175
|
-
export default [styles];
|
|
@@ -1,151 +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
|
-
|
|
8
|
-
import {
|
|
9
|
-
LitElement,
|
|
10
|
-
html,
|
|
11
|
-
property,
|
|
12
|
-
CSSResultArray,
|
|
13
|
-
TemplateResult,
|
|
14
|
-
} from 'lit-element';
|
|
15
|
-
import { customElement, query, state } from 'lit/decorators.js';
|
|
16
|
-
import { styles } from './nile-radio-button.css';
|
|
17
|
-
import NileElement from '../internal/nile-element';
|
|
18
|
-
import { HasSlotController } from '../slot';
|
|
19
|
-
import { classMap } from 'lit/directives/class-map.js';
|
|
20
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
21
|
-
import { watch } from '../internal/watch';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Nile icon component.
|
|
25
|
-
*
|
|
26
|
-
* @tag nile-radio-button
|
|
27
|
-
*
|
|
28
|
-
*/
|
|
29
|
-
@customElement('nile-radio-button')
|
|
30
|
-
export class NileRadioButton extends NileElement {
|
|
31
|
-
/**
|
|
32
|
-
* The styles for RadioButton
|
|
33
|
-
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
|
34
|
-
*/
|
|
35
|
-
public static get styles(): CSSResultArray {
|
|
36
|
-
return [styles];
|
|
37
|
-
}
|
|
38
|
-
private readonly hasSlotController = new HasSlotController(
|
|
39
|
-
this,
|
|
40
|
-
'[default]',
|
|
41
|
-
'prefix',
|
|
42
|
-
'suffix'
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
@query('.button') input: HTMLInputElement;
|
|
46
|
-
@query('.hidden-input') hiddenInput: HTMLInputElement;
|
|
47
|
-
|
|
48
|
-
@state() protected hasFocus = false;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @internal The radio button's checked state. This is exposed as an "internal" attribute so we can reflect it, making
|
|
52
|
-
* it easier to style in button groups.
|
|
53
|
-
*/
|
|
54
|
-
@property({ type: Boolean, reflect: true }) checked = false;
|
|
55
|
-
|
|
56
|
-
/** The radio's value. When selected, the radio group will receive this value. */
|
|
57
|
-
@property() value: string;
|
|
58
|
-
|
|
59
|
-
/** Disables the radio button. */
|
|
60
|
-
@property({ type: Boolean, reflect: true }) disabled = false;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* The radio button's size. When used inside a radio group, the size will be determined by the radio group's size so
|
|
64
|
-
* this attribute can typically be omitted.
|
|
65
|
-
*/
|
|
66
|
-
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';
|
|
67
|
-
|
|
68
|
-
/** Draws a pill-style radio button with rounded edges. */
|
|
69
|
-
@property({ type: Boolean, reflect: true }) pill = false;
|
|
70
|
-
|
|
71
|
-
connectedCallback() {
|
|
72
|
-
super.connectedCallback();
|
|
73
|
-
this.setAttribute('role', 'presentation');
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
private handleBlur() {
|
|
77
|
-
this.hasFocus = false;
|
|
78
|
-
this.emit('nile-blur');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
private handleClick(e: MouseEvent) {
|
|
82
|
-
if (this.disabled) {
|
|
83
|
-
e.preventDefault();
|
|
84
|
-
e.stopPropagation();
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
this.checked = true;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
private handleFocus() {
|
|
92
|
-
this.hasFocus = true;
|
|
93
|
-
this.emit('nile-focus');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@watch('disabled', { waitUntilFirstUpdate: true })
|
|
97
|
-
handleDisabledChange() {
|
|
98
|
-
this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/** Sets focus on the radio button. */
|
|
102
|
-
focus(options?: FocusOptions) {
|
|
103
|
-
this.input.focus(options);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Removes focus from the radio button. */
|
|
107
|
-
blur() {
|
|
108
|
-
this.input.blur();
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
render() {
|
|
112
|
-
return html`
|
|
113
|
-
<div part="base" role="presentation">
|
|
114
|
-
<button
|
|
115
|
-
part="${`button${this.checked ? ' button--checked' : ''}`}"
|
|
116
|
-
role="radio"
|
|
117
|
-
aria-checked="${this.checked}"
|
|
118
|
-
class=${classMap({
|
|
119
|
-
button: true,
|
|
120
|
-
'button--default': true,
|
|
121
|
-
'button--checked': this.checked,
|
|
122
|
-
'button--disabled': this.disabled,
|
|
123
|
-
'button--focused': this.hasFocus,
|
|
124
|
-
'button--has-label': this.hasSlotController.test('[default]'),
|
|
125
|
-
'button--has-prefix': this.hasSlotController.test('prefix'),
|
|
126
|
-
'button--has-suffix': this.hasSlotController.test('suffix'),
|
|
127
|
-
})}
|
|
128
|
-
aria-disabled=${this.disabled}
|
|
129
|
-
type="button"
|
|
130
|
-
value=${ifDefined(this.value)}
|
|
131
|
-
tabindex="${this.checked ? '0' : '-1'}"
|
|
132
|
-
@blur=${this.handleBlur}
|
|
133
|
-
@focus=${this.handleFocus}
|
|
134
|
-
@click=${this.handleClick}
|
|
135
|
-
>
|
|
136
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
137
|
-
<slot part="label" class="button__label"></slot>
|
|
138
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
139
|
-
</button>
|
|
140
|
-
</div>
|
|
141
|
-
`;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export default NileRadioButton;
|
|
146
|
-
|
|
147
|
-
declare global {
|
|
148
|
-
interface HTMLElementTagNameMap {
|
|
149
|
-
'nile-radio-button': NileRadioButton;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NileRadioButtonGroup } from './nile-radio-button-group';
|
|
@@ -1,72 +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
|
-
|
|
8
|
-
import { css } from 'lit-element';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* RadioButtonGroup CSS
|
|
12
|
-
*/
|
|
13
|
-
export const styles = css`
|
|
14
|
-
:host {
|
|
15
|
-
display: block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.form-control {
|
|
19
|
-
border: none;
|
|
20
|
-
padding: 0;
|
|
21
|
-
margin: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.form-control__label {
|
|
25
|
-
padding: 0;
|
|
26
|
-
font-size: 14px;
|
|
27
|
-
color: var(--nile-colors-dark-900);
|
|
28
|
-
font-family: Colfax-regular;
|
|
29
|
-
font-size: 14px;
|
|
30
|
-
font-style: normal;
|
|
31
|
-
font-weight: 400;
|
|
32
|
-
line-height: 14px;
|
|
33
|
-
letter-spacing: 0.2px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.radio-group--required .radio-group__label::after {
|
|
37
|
-
content: '*';
|
|
38
|
-
margin-inline-start: -2px;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.visually-hidden {
|
|
42
|
-
position: absolute;
|
|
43
|
-
width: 1px;
|
|
44
|
-
height: 1px;
|
|
45
|
-
padding: 0;
|
|
46
|
-
margin: -1px;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
clip: rect(0, 0, 0, 0);
|
|
49
|
-
white-space: nowrap;
|
|
50
|
-
border: 0;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.form-control-input {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-wrap: nowrap;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.form-control--has-label .form-control__label {
|
|
59
|
-
display: inline-block;
|
|
60
|
-
color: inherit;
|
|
61
|
-
margin-bottom: 12px;
|
|
62
|
-
color: var(--nile-colors-dark-900);
|
|
63
|
-
font-family: Colfax-regular;
|
|
64
|
-
font-size: 14px;
|
|
65
|
-
font-style: normal;
|
|
66
|
-
font-weight: 400;
|
|
67
|
-
line-height: 14px;
|
|
68
|
-
letter-spacing: 0.2px;
|
|
69
|
-
}
|
|
70
|
-
`;
|
|
71
|
-
|
|
72
|
-
export default [styles];
|