@aquera/nile-elements 0.0.2 → 0.0.3-2
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/nile-button/nile-button.d.ts +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.css.js +5 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js +25 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.css.js +9 -11
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.d.ts +3 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.js +32 -8
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.js +178 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.d.ts +70 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js +494 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-date-picker/nile-date-picker.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.js +33 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.d.ts +31 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.js +44 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js +31 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.d.ts +31 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js +44 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js +7 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +18 -24
- 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-radio-group/nile-radio-group.css.js +8 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.d.ts +2 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js +24 -20
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js +17 -9
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.d.ts +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +24 -15
- 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 +7 -0
- 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.d.ts +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-slide-toggle/nile-slide-toggle.js +23 -0
- 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-tag/nile-tag.css.js +68 -41
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.d.ts +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js +9 -6
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js +8 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js +15 -18
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +567 -192
- package/dist/nile-button/nile-button.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +5 -1
- package/dist/nile-checkbox/nile-checkbox.esm.js +15 -5
- package/dist/nile-chip/nile-chip.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +9 -11
- package/dist/nile-chip/nile-chip.esm.js +17 -7
- package/dist/nile-date-picker/index.cjs.js +2 -0
- package/dist/nile-date-picker/index.cjs.js.map +1 -0
- package/dist/nile-date-picker/index.esm.js +1 -0
- package/dist/nile-date-picker/nile-date-picker.cjs.js +2 -0
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -0
- package/dist/nile-date-picker/nile-date-picker.css.cjs.js +2 -0
- package/dist/nile-date-picker/nile-date-picker.css.cjs.js.map +1 -0
- package/dist/nile-date-picker/nile-date-picker.css.esm.js +166 -0
- package/dist/nile-date-picker/nile-date-picker.esm.js +85 -0
- package/dist/nile-form-error-message/index.cjs.js +2 -0
- package/dist/nile-form-error-message/index.cjs.js.map +1 -0
- package/dist/nile-form-error-message/index.esm.js +1 -0
- package/dist/nile-form-error-message/nile-form-error-message.cjs.js +2 -0
- package/dist/nile-form-error-message/nile-form-error-message.cjs.js.map +1 -0
- package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js +2 -0
- package/dist/nile-form-error-message/nile-form-error-message.css.cjs.js.map +1 -0
- package/dist/nile-form-error-message/nile-form-error-message.css.esm.js +21 -0
- package/dist/nile-form-error-message/nile-form-error-message.esm.js +5 -0
- package/dist/nile-form-help-text/index.cjs.js +2 -0
- package/dist/nile-form-help-text/index.cjs.js.map +1 -0
- package/dist/nile-form-help-text/index.esm.js +1 -0
- package/dist/nile-form-help-text/nile-form-help-text.cjs.js +2 -0
- package/dist/nile-form-help-text/nile-form-help-text.cjs.js.map +1 -0
- package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js +2 -0
- package/dist/nile-form-help-text/nile-form-help-text.css.cjs.js.map +1 -0
- package/dist/nile-form-help-text/nile-form-help-text.css.esm.js +19 -0
- package/dist/nile-form-help-text/nile-form-help-text.esm.js +5 -0
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +1 -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.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +7 -0
- package/dist/nile-input/nile-input.esm.js +12 -23
- package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.css.cjs.js +1 -1
- package/dist/nile-radio-group/nile-radio-group.css.cjs.js.map +1 -1
- package/dist/nile-radio-group/nile-radio-group.css.esm.js +10 -2
- package/dist/nile-radio-group/nile-radio-group.esm.js +14 -14
- 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.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +17 -9
- package/dist/nile-select/nile-select.esm.js +18 -17
- 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 +7 -0
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +11 -2
- package/dist/nile-tag/nile-tag.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
- package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
- package/dist/nile-tag/nile-tag.css.esm.js +70 -43
- package/dist/nile-tag/nile-tag.esm.js +7 -4
- package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.esm.js +8 -2
- package/dist/nile-textarea/nile-textarea.esm.js +12 -20
- 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/nile-button/nile-button.d.ts +2 -2
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +5 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -0
- package/dist/src/nile-checkbox/nile-checkbox.js +25 -1
- package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.css.js +9 -11
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.d.ts +3 -2
- package/dist/src/nile-chip/nile-chip.js +32 -8
- package/dist/src/nile-chip/nile-chip.js.map +1 -1
- package/dist/src/nile-date-picker/index.d.ts +1 -0
- package/dist/src/nile-date-picker/index.js +2 -0
- package/dist/src/nile-date-picker/index.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.d.ts +12 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.js +178 -0
- package/dist/src/nile-date-picker/nile-date-picker.css.js.map +1 -0
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +70 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +494 -0
- package/dist/src/nile-date-picker/nile-date-picker.js.map +1 -0
- package/dist/src/nile-form-error-message/index.d.ts +1 -0
- package/dist/src/nile-form-error-message/index.js +2 -0
- package/dist/src/nile-form-error-message/index.js.map +1 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.css.d.ts +12 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.css.js +33 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.css.js.map +1 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.d.ts +31 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.js +44 -0
- package/dist/src/nile-form-error-message/nile-form-error-message.js.map +1 -0
- package/dist/src/nile-form-help-text/index.d.ts +1 -0
- package/dist/src/nile-form-help-text/index.js +2 -0
- package/dist/src/nile-form-help-text/index.js.map +1 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.css.d.ts +12 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.css.js +31 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.css.js.map +1 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.d.ts +31 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.js +44 -0
- package/dist/src/nile-form-help-text/nile-form-help-text.js.map +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +2 -1
- package/dist/src/nile-icon-button/nile-icon-button.js +1 -0
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +7 -0
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.js +18 -24
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.css.js +8 -0
- package/dist/src/nile-radio-group/nile-radio-group.css.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.d.ts +2 -3
- package/dist/src/nile-radio-group/nile-radio-group.js +24 -20
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +17 -9
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +2 -2
- package/dist/src/nile-select/nile-select.js +24 -15
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +7 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +2 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +23 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.css.js +68 -41
- package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
- package/dist/src/nile-tag/nile-tag.d.ts +1 -1
- package/dist/src/nile-tag/nile-tag.js +9 -6
- package/dist/src/nile-tag/nile-tag.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.css.js +8 -2
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.js +15 -18
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -0
- package/src/nile-button/nile-button.ts +2 -2
- package/src/nile-checkbox/nile-checkbox.css.ts +5 -1
- package/src/nile-checkbox/nile-checkbox.ts +26 -1
- package/src/nile-chip/nile-chip.css.ts +9 -11
- package/src/nile-chip/nile-chip.ts +32 -6
- package/src/nile-date-picker/index.ts +1 -0
- package/src/nile-date-picker/nile-date-picker.css.ts +180 -0
- package/src/nile-date-picker/nile-date-picker.ts +588 -0
- package/src/nile-form-error-message/index.ts +1 -0
- package/src/nile-form-error-message/nile-form-error-message.css.ts +35 -0
- package/src/nile-form-error-message/nile-form-error-message.ts +54 -0
- package/src/nile-form-help-text/index.ts +1 -0
- package/src/nile-form-help-text/nile-form-help-text.css.ts +33 -0
- package/src/nile-form-help-text/nile-form-help-text.ts +54 -0
- package/src/nile-icon-button/nile-icon-button.ts +2 -1
- package/src/nile-input/nile-input.css.ts +7 -0
- package/src/nile-input/nile-input.ts +71 -38
- package/src/nile-radio-group/nile-radio-group.css.ts +8 -0
- package/src/nile-radio-group/nile-radio-group.ts +25 -15
- package/src/nile-select/nile-select.css.ts +17 -9
- package/src/nile-select/nile-select.ts +24 -12
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +7 -0
- package/src/nile-slide-toggle/nile-slide-toggle.ts +24 -0
- package/src/nile-tag/nile-tag.css.ts +68 -41
- package/src/nile-tag/nile-tag.ts +11 -8
- package/src/nile-textarea/nile-textarea.css.ts +8 -2
- package/src/nile-textarea/nile-textarea.ts +20 -18
@@ -0,0 +1,33 @@
|
|
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
|
+
* FormHelpText CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
:host {
|
15
|
+
|
16
|
+
}
|
17
|
+
|
18
|
+
.nile-form-help-text {
|
19
|
+
display: flex;
|
20
|
+
align-items: center;
|
21
|
+
color: var(--nile-colors-dark-500);
|
22
|
+
font-family: Colfax-regular;
|
23
|
+
font-size: 12px;
|
24
|
+
font-style: normal;
|
25
|
+
font-weight: 400;
|
26
|
+
line-height: 12px;
|
27
|
+
letter-spacing: 0.2px;
|
28
|
+
margin-top: 6px;
|
29
|
+
}
|
30
|
+
|
31
|
+
`;
|
32
|
+
|
33
|
+
export default [styles];
|
@@ -0,0 +1,54 @@
|
|
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 {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';
|
9
|
+
import { customElement } from 'lit/decorators.js';
|
10
|
+
import {styles} from './nile-form-help-text.css';
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Nile icon component.
|
14
|
+
*
|
15
|
+
* @tag nile-form-help-text
|
16
|
+
*
|
17
|
+
*/
|
18
|
+
@customElement('nile-form-help-text')
|
19
|
+
export class NileFormHelpText extends LitElement {
|
20
|
+
|
21
|
+
/**
|
22
|
+
* The styles for FormHelpText
|
23
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
24
|
+
*/
|
25
|
+
public static get styles(): CSSResultArray {
|
26
|
+
return [styles];
|
27
|
+
}
|
28
|
+
|
29
|
+
/* #endregion */
|
30
|
+
|
31
|
+
/* #region Methods */
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Render method
|
35
|
+
* @slot This is a slot test
|
36
|
+
*/
|
37
|
+
public render(): TemplateResult {
|
38
|
+
return html`
|
39
|
+
<div class="nile-form-help-text">
|
40
|
+
<slot> </slot>
|
41
|
+
</div>
|
42
|
+
`;
|
43
|
+
}
|
44
|
+
|
45
|
+
/* #endregion */
|
46
|
+
}
|
47
|
+
|
48
|
+
export default NileFormHelpText;
|
49
|
+
|
50
|
+
declare global {
|
51
|
+
interface HTMLElementTagNameMap {
|
52
|
+
'nile-form-help-text': NileFormHelpText;
|
53
|
+
}
|
54
|
+
}
|
@@ -105,7 +105,7 @@ export class NileIconButton extends NileElement {
|
|
105
105
|
this.button.blur();
|
106
106
|
}
|
107
107
|
|
108
|
-
render() {
|
108
|
+
render(): TemplateResult {
|
109
109
|
const isLink = this.href ? true : false;
|
110
110
|
const tag = isLink ? literal`a` : literal`button`;
|
111
111
|
|
@@ -138,6 +138,7 @@ export class NileIconButton extends NileElement {
|
|
138
138
|
library=${ifDefined(this.library)}
|
139
139
|
src=${ifDefined(this.src)}
|
140
140
|
aria-hidden="true"
|
141
|
+
size="14"
|
141
142
|
></nile-icon>
|
142
143
|
</${tag}>
|
143
144
|
`;
|
@@ -28,6 +28,13 @@ export const styles = css`
|
|
28
28
|
display: inline-block;
|
29
29
|
color: inherit;
|
30
30
|
margin-bottom: 12px;
|
31
|
+
color: var(--nile-colors-dark-900);
|
32
|
+
font-family: Colfax-regular;
|
33
|
+
font-size: 14px;
|
34
|
+
font-style: normal;
|
35
|
+
font-weight: 400;
|
36
|
+
line-height: 14px;
|
37
|
+
letter-spacing: 0.2px;
|
31
38
|
}
|
32
39
|
|
33
40
|
.form-control--has-label.form-control--medium .form-control__label {
|
@@ -5,12 +5,18 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import {
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
html,
|
11
|
+
property,
|
12
|
+
CSSResultArray,
|
13
|
+
TemplateResult,
|
14
|
+
} from 'lit-element';
|
9
15
|
import { customElement } from 'lit/decorators.js';
|
10
|
-
import {styles} from './nile-input.css';
|
11
|
-
import '../nile-icon'
|
16
|
+
import { styles } from './nile-input.css';
|
17
|
+
import '../nile-icon';
|
12
18
|
import { classMap } from 'lit/directives/class-map.js';
|
13
|
-
import {
|
19
|
+
import { query, state } from 'lit/decorators.js';
|
14
20
|
import { defaultValue } from '../internal/default-value';
|
15
21
|
import { FormControlController } from '../internal/form';
|
16
22
|
import { HasSlotController } from '../internal/slot';
|
@@ -20,7 +26,6 @@ import { watch } from '../internal/watch';
|
|
20
26
|
import type { CSSResultGroup } from 'lit';
|
21
27
|
import NileElement, { NileFormControl } from '../internal/nile-element';
|
22
28
|
|
23
|
-
|
24
29
|
/**
|
25
30
|
* Nile icon component.
|
26
31
|
*
|
@@ -32,9 +37,13 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
32
37
|
static styles: CSSResultGroup = styles;
|
33
38
|
|
34
39
|
private readonly formControlController = new FormControlController(this, {
|
35
|
-
assumeInteractionOn: ['nile-blur', 'nile-input']
|
40
|
+
assumeInteractionOn: ['nile-blur', 'nile-input'],
|
36
41
|
});
|
37
|
-
private readonly hasSlotController = new HasSlotController(
|
42
|
+
private readonly hasSlotController = new HasSlotController(
|
43
|
+
this,
|
44
|
+
'help-text',
|
45
|
+
'label'
|
46
|
+
);
|
38
47
|
|
39
48
|
@query('.input__control') input: HTMLInputElement;
|
40
49
|
|
@@ -81,7 +90,6 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
81
90
|
/** Sets the input to a success state, changing its visual appearance. */
|
82
91
|
@property({ type: Boolean }) success = false;
|
83
92
|
|
84
|
-
|
85
93
|
/** Draws a pill-style input with rounded edges. */
|
86
94
|
@property({ type: Boolean, reflect: true }) pill = false;
|
87
95
|
|
@@ -107,13 +115,16 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
107
115
|
@property({ type: Boolean, reflect: true }) readonly = false;
|
108
116
|
|
109
117
|
/** Adds a button to toggle the password's visibility. Only applies to password types. */
|
110
|
-
@property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =
|
118
|
+
@property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =
|
119
|
+
false;
|
111
120
|
|
112
121
|
/** Determines whether or not the password is currently visible. Only applies to password input types. */
|
113
|
-
@property({ attribute: 'password-visible', type: Boolean }) passwordVisible =
|
122
|
+
@property({ attribute: 'password-visible', type: Boolean }) passwordVisible =
|
123
|
+
false;
|
114
124
|
|
115
125
|
/** Hides the browser's built-in increment/decrement spin buttons for number inputs. */
|
116
|
-
@property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =
|
126
|
+
@property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =
|
127
|
+
false;
|
117
128
|
|
118
129
|
/**
|
119
130
|
* By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
|
@@ -147,7 +158,13 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
147
158
|
@property() step: number | 'any';
|
148
159
|
|
149
160
|
/** Controls whether and how text input is automatically capitalized as it is entered by the user. */
|
150
|
-
@property() autocapitalize:
|
161
|
+
@property() autocapitalize:
|
162
|
+
| 'off'
|
163
|
+
| 'none'
|
164
|
+
| 'on'
|
165
|
+
| 'sentences'
|
166
|
+
| 'words'
|
167
|
+
| 'characters';
|
151
168
|
|
152
169
|
/** Indicates whether the browser's autocorrect feature is on or off. */
|
153
170
|
@property() autocorrect: 'off' | 'on';
|
@@ -162,7 +179,14 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
162
179
|
@property({ type: Boolean }) autofocus: boolean;
|
163
180
|
|
164
181
|
/** Used to customize the label or icon of the Enter key on virtual keyboards. */
|
165
|
-
@property() enterkeyhint:
|
182
|
+
@property() enterkeyhint:
|
183
|
+
| 'enter'
|
184
|
+
| 'done'
|
185
|
+
| 'go'
|
186
|
+
| 'next'
|
187
|
+
| 'previous'
|
188
|
+
| 'search'
|
189
|
+
| 'send';
|
166
190
|
|
167
191
|
/** Enables spell checking on the input. */
|
168
192
|
@property({
|
@@ -170,8 +194,8 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
170
194
|
converter: {
|
171
195
|
// Allow "true|false" attribute values but keep the property boolean
|
172
196
|
fromAttribute: value => (!value || value === 'false' ? false : true),
|
173
|
-
toAttribute: value => (value ? 'true' : 'false')
|
174
|
-
}
|
197
|
+
toAttribute: value => (value ? 'true' : 'false'),
|
198
|
+
},
|
175
199
|
})
|
176
200
|
spellcheck = true;
|
177
201
|
|
@@ -179,7 +203,15 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
179
203
|
* Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual
|
180
204
|
* keyboard on supportive devices.
|
181
205
|
*/
|
182
|
-
@property() inputmode:
|
206
|
+
@property() inputmode:
|
207
|
+
| 'none'
|
208
|
+
| 'text'
|
209
|
+
| 'decimal'
|
210
|
+
| 'numeric'
|
211
|
+
| 'tel'
|
212
|
+
| 'search'
|
213
|
+
| 'email'
|
214
|
+
| 'url';
|
183
215
|
|
184
216
|
//
|
185
217
|
// NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties
|
@@ -267,7 +299,8 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
267
299
|
}
|
268
300
|
|
269
301
|
private handleKeyDown(event: KeyboardEvent) {
|
270
|
-
const hasModifier =
|
302
|
+
const hasModifier =
|
303
|
+
event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
271
304
|
|
272
305
|
// Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before
|
273
306
|
// submitting to allow users to cancel the keydown event if they need to
|
@@ -331,7 +364,11 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
331
364
|
selectionEnd: number,
|
332
365
|
selectionDirection: 'forward' | 'backward' | 'none' = 'none'
|
333
366
|
) {
|
334
|
-
this.input.setSelectionRange(
|
367
|
+
this.input.setSelectionRange(
|
368
|
+
selectionStart,
|
369
|
+
selectionEnd,
|
370
|
+
selectionDirection
|
371
|
+
);
|
335
372
|
}
|
336
373
|
|
337
374
|
/** Replaces a range of text with a new string. */
|
@@ -397,10 +434,13 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
397
434
|
const hasLabelSlot = this.hasSlotController.test('label');
|
398
435
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
399
436
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
400
|
-
const hasHelpText = this.helpText ? true :
|
437
|
+
const hasHelpText = this.helpText ? true : false;
|
401
438
|
const hasErrorMessage = this.errorMessage ? true : false;
|
402
439
|
const hasClearIcon =
|
403
|
-
this.clearable &&
|
440
|
+
this.clearable &&
|
441
|
+
!this.disabled &&
|
442
|
+
!this.readonly &&
|
443
|
+
(typeof this.value === 'number' || this.value.length > 0);
|
404
444
|
|
405
445
|
return html`
|
406
446
|
<div
|
@@ -411,7 +451,7 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
411
451
|
'form-control--medium': this.size === 'medium',
|
412
452
|
'form-control--large': this.size === 'large',
|
413
453
|
'form-control--has-label': hasLabel,
|
414
|
-
'form-control--has-help-text': hasHelpText
|
454
|
+
'form-control--has-help-text': hasHelpText,
|
415
455
|
})}
|
416
456
|
>
|
417
457
|
<label
|
@@ -546,27 +586,20 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
546
586
|
</div>
|
547
587
|
</div>
|
548
588
|
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
</slot>
|
589
|
+
${
|
590
|
+
hasHelpText
|
591
|
+
? html`
|
592
|
+
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
593
|
+
`
|
594
|
+
: ``
|
595
|
+
}
|
596
|
+
|
558
597
|
${
|
559
598
|
hasErrorMessage
|
560
599
|
? html`
|
561
|
-
<
|
562
|
-
|
563
|
-
part="form-control-error-message"
|
564
|
-
id="error-message"
|
565
|
-
class="form-control__error-message"
|
566
|
-
aria-hidden=${hasErrorMessage ? 'false' : 'true'}
|
600
|
+
<nile-form-error-message
|
601
|
+
>${this.errorMessage}</nile-form-error-message
|
567
602
|
>
|
568
|
-
${this.errorMessage}
|
569
|
-
</slot>
|
570
603
|
`
|
571
604
|
: ``
|
572
605
|
}
|
@@ -19,6 +19,14 @@ export default css`
|
|
19
19
|
|
20
20
|
.form-control__label {
|
21
21
|
padding: 0;
|
22
|
+
font-size: 14px;
|
23
|
+
color: var(--nile-colors-dark-900);
|
24
|
+
font-family: Colfax-regular;
|
25
|
+
font-size: 14px;
|
26
|
+
font-style: normal;
|
27
|
+
font-weight: 400;
|
28
|
+
line-height: 14px;
|
29
|
+
letter-spacing: 0.2px;
|
22
30
|
}
|
23
31
|
|
24
32
|
.radio-group--required .radio-group__label::after {
|
@@ -34,7 +34,7 @@ export class NileRadioGroup extends NileElement {
|
|
34
34
|
@query('slot:not([name])') defaultSlot: HTMLSlotElement;
|
35
35
|
|
36
36
|
@state() private hasButtonGroup = false;
|
37
|
-
|
37
|
+
|
38
38
|
@state() defaultValue = '';
|
39
39
|
|
40
40
|
/**
|
@@ -43,9 +43,6 @@ export class NileRadioGroup extends NileElement {
|
|
43
43
|
*/
|
44
44
|
@property() label = '';
|
45
45
|
|
46
|
-
/** The radio groups's help text. If you need to display HTML, use the `help-text` slot instead. */
|
47
|
-
@property({ attribute: 'help-text' }) helpText = '';
|
48
|
-
|
49
46
|
/** The name of the radio group, submitted as a name/value pair with form data. */
|
50
47
|
@property() name = 'option';
|
51
48
|
|
@@ -69,6 +66,10 @@ export class NileRadioGroup extends NileElement {
|
|
69
66
|
/** Used to disabled or not */
|
70
67
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
71
68
|
|
69
|
+
@property({ attribute: 'help-text' }) helpText = '';
|
70
|
+
|
71
|
+
@property({ attribute: 'error-message' }) errorMessage = '';
|
72
|
+
|
72
73
|
connectedCallback() {
|
73
74
|
super.connectedCallback();
|
74
75
|
this.defaultValue = this.value;
|
@@ -203,7 +204,8 @@ export class NileRadioGroup extends NileElement {
|
|
203
204
|
const hasLabelSlot = this.hasSlotController.test('label');
|
204
205
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
205
206
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
206
|
-
const hasHelpText = this.helpText ? true :
|
207
|
+
const hasHelpText = this.helpText ? true : false;
|
208
|
+
const hasErrorMessage = this.errorMessage ? true : false;
|
207
209
|
|
208
210
|
const defaultSlot = html`
|
209
211
|
<slot
|
@@ -241,7 +243,6 @@ export class NileRadioGroup extends NileElement {
|
|
241
243
|
|
242
244
|
<div part="form-control-input" class="form-control-input">
|
243
245
|
<div class="visually-hidden">
|
244
|
-
<div id="error-message" aria-live="assertive">${this.errorMessage}</div>
|
245
246
|
<label class="radio-group__validation">
|
246
247
|
<input
|
247
248
|
type="text"
|
@@ -261,15 +262,24 @@ export class NileRadioGroup extends NileElement {
|
|
261
262
|
<div class="${this.labelInline ? `form-control--inline-radio`:``}"> ${defaultSlot}</div> `}
|
262
263
|
</div>
|
263
264
|
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
265
|
+
${
|
266
|
+
hasHelpText
|
267
|
+
? html`
|
268
|
+
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
269
|
+
`
|
270
|
+
: ``
|
271
|
+
}
|
272
|
+
|
273
|
+
${
|
274
|
+
hasErrorMessage
|
275
|
+
? html`
|
276
|
+
<nile-form-error-message
|
277
|
+
>${this.errorMessage}</nile-form-error-message
|
278
|
+
>
|
279
|
+
`
|
280
|
+
: ``
|
281
|
+
}
|
282
|
+
|
273
283
|
</fieldset>
|
274
284
|
`;
|
275
285
|
}
|
@@ -36,16 +36,20 @@ export const styles = css`
|
|
36
36
|
/* Label */
|
37
37
|
.form-control--has-label .form-control__label {
|
38
38
|
display: inline-block;
|
39
|
-
|
40
|
-
|
39
|
+
margin-bottom: 12px;
|
40
|
+
color: var(--nile-colors-dark-900);
|
41
|
+
font-family: Colfax-regular;
|
42
|
+
font-size: 14px;
|
43
|
+
font-style: normal;
|
44
|
+
font-weight: 400;
|
45
|
+
line-height: 14px;
|
46
|
+
letter-spacing: 0.2px;
|
41
47
|
}
|
42
48
|
|
43
|
-
|
44
49
|
.form-control--has-label.form-control--medium .form-control__label {
|
45
|
-
font-size:
|
50
|
+
font-size: 14px;
|
46
51
|
}
|
47
52
|
|
48
|
-
|
49
53
|
:host([required]) .form-control--has-label .form-control__label::after {
|
50
54
|
content: '*';
|
51
55
|
margin-inline-start: -2px;
|
@@ -63,7 +67,6 @@ export const styles = css`
|
|
63
67
|
font-size: 0.875rem;
|
64
68
|
}
|
65
69
|
|
66
|
-
|
67
70
|
.form-control--has-help-text.form-control--radio-group
|
68
71
|
.form-control__help-text {
|
69
72
|
margin-top: 0.25rem;
|
@@ -127,6 +130,11 @@ export const styles = css`
|
|
127
130
|
padding: 0;
|
128
131
|
margin: 0;
|
129
132
|
-webkit-appearance: none;
|
133
|
+
font-family: var(--nile-font-family-serif);
|
134
|
+
}
|
135
|
+
|
136
|
+
.select__display-input::placeholder {
|
137
|
+
font-family: var(--nile-font-family-serif);
|
130
138
|
}
|
131
139
|
|
132
140
|
.select:not(.select--disabled):hover .select__display-input {
|
@@ -284,7 +292,7 @@ export const styles = css`
|
|
284
292
|
align-items: center;
|
285
293
|
justify-content: center;
|
286
294
|
font-size: inherit;
|
287
|
-
color: #
|
295
|
+
color: #005ea6;
|
288
296
|
border: none;
|
289
297
|
background: none;
|
290
298
|
padding: 0;
|
@@ -333,11 +341,11 @@ export const styles = css`
|
|
333
341
|
max-height: var(--auto-size-available-height);
|
334
342
|
}
|
335
343
|
|
336
|
-
.select__options{
|
344
|
+
.select__options {
|
337
345
|
padding-top: 10px;
|
338
346
|
}
|
339
347
|
|
340
|
-
.select__options{
|
348
|
+
.select__options {
|
341
349
|
padding: 5px;
|
342
350
|
margin: 4px;
|
343
351
|
font-size: 14px;
|
@@ -150,6 +150,10 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
150
150
|
/** Allows more than one option to be selected. */
|
151
151
|
@property({ type: Boolean, reflect: true }) multiple = false;
|
152
152
|
|
153
|
+
@property({ attribute: 'help-text' }) helpText = '';
|
154
|
+
|
155
|
+
@property({ attribute: 'error-message' }) errorMessage = '';
|
156
|
+
|
153
157
|
/**
|
154
158
|
* The maximum number of selected options to show when `multiple` is true. After the maximum, "+n" will be shown to
|
155
159
|
* indicate the number of additional items that are selected. Set to 0 to remove the limit.
|
@@ -190,8 +194,6 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
190
194
|
*/
|
191
195
|
@property({ reflect: true }) placement: 'top' | 'bottom' = 'bottom';
|
192
196
|
|
193
|
-
/** The select's help text. If you need to display HTML, use the `help-text` slot instead. */
|
194
|
-
@property({ attribute: 'help-text' }) helpText = '';
|
195
197
|
|
196
198
|
/**
|
197
199
|
* By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
|
@@ -819,11 +821,12 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
819
821
|
const hasLabelSlot = this.hasSlotController.test('label');
|
820
822
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
821
823
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
822
|
-
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
823
824
|
const hasClearIcon =
|
824
825
|
this.clearable && !this.disabled && this.value.length > 0;
|
825
826
|
const isPlaceholderVisible = this.placeholder && this.value.length === 0;
|
826
827
|
const searchValue = this.searchValue || '';
|
828
|
+
const hasHelpText = this.helpText ? true : false;
|
829
|
+
const hasErrorMessage = this.errorMessage ? true : false;
|
827
830
|
|
828
831
|
return html`
|
829
832
|
<div
|
@@ -1057,15 +1060,24 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
1057
1060
|
</nile-popup>
|
1058
1061
|
</div>
|
1059
1062
|
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1063
|
+
${
|
1064
|
+
hasHelpText
|
1065
|
+
? html`
|
1066
|
+
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
1067
|
+
`
|
1068
|
+
: ``
|
1069
|
+
}
|
1070
|
+
|
1071
|
+
${
|
1072
|
+
hasErrorMessage
|
1073
|
+
? html`
|
1074
|
+
<nile-form-error-message
|
1075
|
+
>${this.errorMessage}</nile-form-error-message
|
1076
|
+
>
|
1077
|
+
`
|
1078
|
+
: ``
|
1079
|
+
}
|
1080
|
+
|
1069
1081
|
</div>
|
1070
1082
|
`;
|
1071
1083
|
}
|
@@ -19,6 +19,13 @@ export default css`
|
|
19
19
|
.nile-slide-toggle__label {
|
20
20
|
margin-left: 2px;
|
21
21
|
font-size: 14px;
|
22
|
+
color: var(--nile-colors-dark-900);
|
23
|
+
font-family: Colfax-regular;
|
24
|
+
font-size: 14px;
|
25
|
+
font-style: normal;
|
26
|
+
font-weight: 400;
|
27
|
+
line-height: 14px;
|
28
|
+
letter-spacing: 0.2px;
|
22
29
|
}
|
23
30
|
|
24
31
|
.nile-slide-toggle__switch input {
|
@@ -9,6 +9,10 @@ export class NileSlideToggle extends LitElement {
|
|
9
9
|
@property({ type: String }) label = '';
|
10
10
|
@property({ type: Boolean, reflect: true }) isChecked = false;
|
11
11
|
|
12
|
+
@property({ attribute: 'help-text' }) helpText = '';
|
13
|
+
|
14
|
+
@property({ attribute: 'error-message' }) errorMessage = '';
|
15
|
+
|
12
16
|
toggleValue() {
|
13
17
|
this.isChecked = !this.isChecked;
|
14
18
|
this.dispatchEvent(
|
@@ -17,6 +21,9 @@ export class NileSlideToggle extends LitElement {
|
|
17
21
|
}
|
18
22
|
|
19
23
|
public render() {
|
24
|
+
const hasHelpText = this.helpText ? true : false;
|
25
|
+
const hasErrorMessage = this.errorMessage ? true : false;
|
26
|
+
|
20
27
|
return html`
|
21
28
|
<div class="nile-slide-toggle">
|
22
29
|
<label class="nile-slide-toggle__switch">
|
@@ -31,6 +38,23 @@ export class NileSlideToggle extends LitElement {
|
|
31
38
|
<slot>${this.label}</slot>
|
32
39
|
</span>
|
33
40
|
</div>
|
41
|
+
${
|
42
|
+
hasHelpText
|
43
|
+
? html`
|
44
|
+
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
45
|
+
`
|
46
|
+
: ``
|
47
|
+
}
|
48
|
+
|
49
|
+
${
|
50
|
+
hasErrorMessage
|
51
|
+
? html`
|
52
|
+
<nile-form-error-message
|
53
|
+
>${this.errorMessage}</nile-form-error-message
|
54
|
+
>
|
55
|
+
`
|
56
|
+
: ``
|
57
|
+
}
|
34
58
|
`;
|
35
59
|
}
|
36
60
|
}
|