@aquera/nile-elements 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.js +110 -31
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.cjs.js.map +1 -1
- package/dist/nile-auto-complete/nile-auto-complete.css.esm.js +4 -2
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +7 -3
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +7 -0
- package/dist/nile-calendar/nile-calendar.esm.js +6 -5
- package/dist/nile-chip/nile-chip.css.cjs.js +1 -1
- package/dist/nile-chip/nile-chip.css.cjs.js.map +1 -1
- package/dist/nile-chip/nile-chip.css.esm.js +1 -0
- package/dist/nile-code-editor/nile-code-editor.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -1
- package/dist/nile-code-editor/nile-code-editor.css.esm.js +3 -0
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -0
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.cjs.js.map +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.css.esm.js +8 -2
- package/dist/nile-icon/icons/svg/close.cjs.js +1 -1
- package/dist/nile-icon/icons/svg/close.cjs.js.map +1 -1
- package/dist/nile-icon/icons/svg/close.esm.js +1 -1
- 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 +11 -1
- package/dist/nile-input/nile-input.esm.js +2 -0
- package/dist/nile-link/nile-link.css.cjs.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.esm.js +5 -3
- package/dist/nile-radio/nile-radio.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.css.cjs.js +1 -1
- package/dist/nile-radio/nile-radio.css.cjs.js.map +1 -1
- package/dist/nile-radio/nile-radio.css.esm.js +2 -2
- package/dist/nile-radio/nile-radio.esm.js +2 -2
- 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.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +6 -0
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- 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 +21 -5
- package/dist/nile-select/nile-select.esm.js +6 -6
- 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.esm.js +4 -3
- 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 +9 -2
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js +3 -3
- package/dist/nile-virtual-select/nile-virtual-select.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.cjs.js.map +1 -1
- package/dist/nile-virtual-select/nile-virtual-select.css.esm.js +13 -3
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +5 -5
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +2 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +7 -3
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +7 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +6 -5
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.css.js +1 -0
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.css.js +3 -0
- package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-detail/nile-detail.test.js +6 -6
- package/dist/src/nile-detail/nile-detail.test.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +6 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-icon/icons/svg/close.d.ts +1 -1
- package/dist/src/nile-icon/icons/svg/close.js +1 -1
- package/dist/src/nile-icon/icons/svg/close.js.map +1 -1
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.js +1 -1
- package/dist/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.js.map +1 -1
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.js +5 -5
- package/dist/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +11 -1
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.js +2 -0
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-link/nile-link.css.js +3 -1
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.css.js +2 -2
- package/dist/src/nile-radio/nile-radio.css.js.map +1 -1
- package/dist/src/nile-radio/nile-radio.js +15 -1
- package/dist/src/nile-radio/nile-radio.js.map +1 -1
- package/dist/src/nile-radio-group/nile-radio-group.js +8 -0
- package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +6 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +8 -3
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +21 -5
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-select/nile-select.js +2 -2
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.css.js +9 -2
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +13 -3
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.js +2 -2
- package/dist/src/nile-virtual-select/nile-virtual-select.js.map +1 -1
- package/dist/src/version.js +2 -2
- package/dist/src/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-auto-complete/nile-auto-complete.css.ts +2 -0
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-button/nile-button.css.ts +7 -3
- package/src/nile-calendar/nile-calendar.css.ts +7 -0
- package/src/nile-calendar/nile-calendar.ts +6 -5
- package/src/nile-chip/nile-chip.css.ts +1 -0
- package/src/nile-code-editor/nile-code-editor.css.ts +3 -0
- package/src/nile-code-editor/nile-code-editor.ts +1 -0
- package/src/nile-detail/nile-detail.test.ts +6 -6
- package/src/nile-filter-chip/nile-filter-chip.css.ts +6 -0
- package/src/nile-icon/icons/svg/close.ts +1 -1
- package/src/nile-inline-sidebar-group/nile-inline-sidebar-group.test.ts +1 -1
- package/src/nile-inline-sidebar-item/nile-inline-sidebar-item.test.ts +5 -5
- package/src/nile-input/nile-input.css.ts +11 -1
- package/src/nile-input/nile-input.ts +2 -0
- package/src/nile-link/nile-link.css.ts +3 -1
- package/src/nile-radio/nile-radio.css.ts +2 -2
- package/src/nile-radio/nile-radio.ts +17 -3
- package/src/nile-radio-group/nile-radio-group.ts +6 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +6 -0
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +8 -3
- package/src/nile-select/nile-select.css.ts +21 -5
- package/src/nile-select/nile-select.ts +2 -2
- package/src/nile-slide-toggle/nile-slide-toggle.ts +1 -0
- package/src/nile-textarea/nile-textarea.css.ts +9 -2
- package/src/nile-virtual-select/nile-virtual-select.css.ts +13 -3
- package/src/nile-virtual-select/nile-virtual-select.ts +2 -2
- package/web-test-runner.config.mjs +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-input.css.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAykBxB,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';\n\n/**\n * Input CSS\n */\nexport const styles = css`\n :host {\n display: block;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow-1: 0px 1px 2px 0px var(--ng-colors-effects-shadow-xs);\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: var(--nile-spacing-none);\n padding: var(--nile-spacing-none);\n }\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: 0;\n padding: 0;\n }\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: 0;\n padding: 0;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n line-height: var(--nile-type-scale-6, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500);\n margin-top: var(--nile-spacing-sm);\n }\n\n /* Error message */\n .form-control__error-message {\n display: block;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-sm));\n font-size: var(--nile-type-scale-2);\n font-style: normal;\n line-height: var( --nile-form-error-text-line-height, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-1);\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xxxsmall);\n }\n\n .input {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: stretch;\n justify-content: start;\n position: relative;\n width: 100%;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n vertical-align: middle;\n overflow: hidden;\n cursor: text;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color, 150ms outline;\n box-sizing: border-box;\n color: var(--nile-colors-dark-900);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3);\n font-style: normal;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n\n /* Standard inputs */\n .input--standard {\n background-color: var(--nile-input-standard-background-color, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-input-standard-border-color, var(--ng-colors-border-primary));\n box-shadow: var(--nile-input-shadow-standard, var(--ng-shadow-xs));\n outline:var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .input--standard:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n }\n\n .input--standard.input--error:hover:not(.input--disabled) {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-error));\n }\n\n .input--standard.input--focused:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n }\n .input--standard.input--focused:not(.input--disabled) {\n position: relative; \n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));\n /* border-width: var(--nile-border-width-1, var(--ng-border-width-2)); */\n}\n\n/* Added to apply the hover effect in nxtgen */\n.input--standard.input--focused:not(.input--disabled)::before {\n content: \"\";\n position: absolute;\n inset: 0; \n pointer-events: none; \n border-radius: 6.5px;\n box-shadow: inset 0 0 0 1px var(--ng-colors-border-brand);\n}\n\n .input--standard.input--focused.input--warning:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-warning));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-warning));\n }\n\n .input--standard.input--focused.input--success:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-success));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-success));\n }\n \n .input--standard.input--focused.input--error:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-error));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .input--standard.input--focused:not(.input--disabled) .input__control {\n color: var(--nile-colors-primary-900);\n }\n\n .input--standard.input--disabled {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500,var(--ng-colors-border-disabled));\n /* opacity: 0.5; */\n cursor: not-allowed;\n }\n\n .input--standard.input--disabled .input__control {\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-disabled));\n }\n\n .input--standard.input--disabled .input__control::placeholder {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n background:var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n }\n\n .input--standard.input--warning {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning-subtle));\n }\n\n .input--standard.input--warning:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-warning));\n }\n\n .input--standard.input--error {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error-subtle));\n }\n\n .input--standard.input--success {\n border-color: var(--nile-colors-green-500, var(--ng-colors-border-success-subtle));\n }\n\n .input--standard.input--success:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-success));\n }\n\n .input--standard.input--destructive {\n border-color: var(--nile-colors-red-400);\n }\n\n .input--standard.input--focused.input--destructive:not(.input--disabled) {\n border: 1px solid var(--nile-colors-red-400);\n box-shadow: var(--nile-input-shadow-destructive-active);\n }\n\n .input--destructive:active {\n border: 1px solid var(--nile-colors-red-400);\n box-shadow: var(--nile-input-shadow-destructive-active);\n }\n\n /* Filled inputs */\n .input--filled {\n border: none;\n background-color: var(--nile-colors-dark-100);\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled:hover:not(.input--disabled) {\n background-color: var(--nile-colors-dark-100);\n }\n\n .input--filled.input--focused:not(.input--disabled) {\n background-color: var(--nile-colors-dark-100);\n outline: solid 3px hsl(200.4 98% 39.4%);\n outline-offset: 1px;\n }\n\n .input--filled.input--disabled {\n background-color: var(--nile-colors-dark-100);\n cursor: not-allowed;\n }\n\n .input__control {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n border: none;\n background: none;\n box-shadow: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-md)) var(--nile-spacing-none, var(--ng-spacing-lg));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n cursor: inherit;\n -webkit-appearance: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n line-height: var(--nile-type-scale-4, var(--ng-line-height-text-md));\n letter-spacing: 0.2px;\n }\n\n .input__control::-webkit-search-decoration,\n .input__control::-webkit-search-cancel-button,\n .input__control::-webkit-search-results-button,\n .input__control::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input__control::placeholder {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-placeholder));\n user-select: none;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .input:hover:not(.input--disabled) .input__control {\n color: var(--nile-colors-dark-900);\n }\n\n .input__control:focus {\n outline: none;\n }\n\n .input__prefix,\n .input__suffix {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n cursor: default;\n }\n\n .input__prefix::slotted(nile-icon) {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__suffix::slotted(nile-icon) {\n color: var(--nile-colors-neutral-700);\n }\n\n .input--standard:focus {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-primary-500);\n box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));\n }\n\n /*\n * Size modifiers\n */\n\n .input--small {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-input-font-size-small);\n height: 1.875rem;\n }\n\n .input--small .input__control {\n height: calc(1.875rem);\n padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--small .input__clear {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__password-toggle {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--small .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--medium {\n font-size: var(--nile-font-size-rem-large);\n height: var(--nile-height-40px, var(--ng-height-auto));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n }\n\n .input--medium .input__control {\n height: var(--nile-type-scale-3, var(--ng-height-auto));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--medium .input__clear {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__password-toggle {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--medium .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--large {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-6);\n height: 3.125rem;\n }\n\n .input--large .input__control {\n height: calc(3.125rem - 1px * 2);\n padding: var(--nile-spacing-none) var(--nile-spacing-xl);\n }\n\n .input--large .input__clear {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__password-toggle {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-small, var(--ng-spacing-lg));\n }\n\n .input--large .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-small, var(--ng-spacing-lg));\n }\n\n /*\n * Pill modifier\n */\n\n .input--pill.input--small {\n border-radius:var(--nile-radius-3xl, var(--ng-spacing-lg));\n }\n\n .input--pill.input--medium {\n border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));\n }\n\n .input--pill.input--large {\n border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));\n }\n\n /*\n * Clearable + Password Toggle\n */\n\n .input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: var(--nile-colors-neutral-700);\n border: none;\n background: none;\n padding: var(--nile-spacing-none);\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__password-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: var(--nile-colors-neutral-700);\n border: none;\n background: none;\n padding: var(--nile-spacing-none);\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__clear:hover {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__password-toggle:hover {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__clear:focus,\n .input__password-toggle:focus {\n outline: none;\n }\n\n .input--empty .input__clear {\n visibility: hidden;\n }\n\n /* Don't show the browser's password toggle in Edge */\n ::-ms-reveal {\n display: none;\n }\n\n /* Hide the built-in number spinner */\n .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,\n .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n display: none;\n }\n\n .input--no-spin-buttons input[type='number'] {\n -moz-appearance: textfield;\n }\n\n :host([no-border]) .input--standard {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-outline]) .input--standard {\n outline: var(--nile-outline-unset, var(--ng-outline-none));\n }\n\n :host([no-border]) .input--standard:hover:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n .input__password {\n font-family: var(--nile-font-family-disc, var(--ng-font-family-body));\n letter-spacing: var(--nile-spacing-xxs, var(--ng-spacing-none));\n }\n\n .input__non-printable {\n border-radius: var(--nile-radius-sm);\n max-width: 400px;\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: 1px solid var(--nile-colors-red-500);\n color: var(--nile-colors-red-500);\n padding: var(--nile-spacing-10px);\n font-size: var(--nile-type-scale-2);\n max-height: 300px;\n overflow-y: scroll;\n line-height: var(--nile-type-scale-4);\n }\n\n .input__remove-non-printable {\n color: var(--nile-colors-red-500);\n margin-left: var(--nile-spacing-10px);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n }\n\n .input__srtiked-text-container {\n margin-top: var(--nile-spacing-xs);\n color: var(--nile-colors-dark-900);\n word-break: break-all;\n line-height: var(--nile-type-scale-4);\n }\n\n .input__srtiked-text {\n text-decoration: line-through;\n text-decoration-color: var(--nile-colors-white-base);\n color: var(--nile-colors-white-base);\n background-color: var(--nile-colors-red-500);\n }\n`;\n\nexport default [styles];\n"]}
|
|
1
|
+
{"version":3,"file":"nile-input.css.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmlBxB,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';\n\n/**\n * Input CSS\n */\nexport const styles = css`\n :host {\n display: block;\n --ng-nxt-gen-outline: var(--ng-border-width-1) solid var(--ng-colors-border-brand);\n --ng-nxt-gen-outline-error: var(--ng-border-width-1) solid var(--ng-colors-border-error);\n --ng-private-outline-transparent: var(--ng-border-width-1) solid transparent;\n --ng-box-shadow-1: 0px 1px 2px 0px var(--ng-colors-effects-shadow-xs);\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: var(--nile-spacing-none);\n padding: var(--nile-spacing-none);\n }\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: 0;\n padding: 0;\n }\n\n /* To Hide Safari's AutoFill icon */\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n width: 0;\n margin: 0;\n padding: 0;\n }\n\n .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: inline-block;\n color: inherit;\n margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-700));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n line-height: var(--nile-type-scale-6, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n }\n :host([disabled]) .form-control--has-label .form-control__label {\n user-select: none;\n -webkit-user-select: none;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: var(--nile-colors-dark-500);\n margin-top: var(--nile-spacing-sm);\n }\n\n /* Error message */\n .form-control__error-message {\n display: block;\n color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));\n margin-top: var(--nile-spacing-lg, var(--ng-spacing-sm));\n font-size: var(--nile-type-scale-2);\n font-style: normal;\n line-height: var( --nile-form-error-text-line-height, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: var(--nile-type-scale-1);\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: var(--nile-spacing-xxxsmall);\n }\n\n .input {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: stretch;\n justify-content: start;\n position: relative;\n width: 100%;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n vertical-align: middle;\n overflow: hidden;\n cursor: text;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color, 150ms outline;\n box-sizing: border-box;\n color: var(--nile-colors-dark-900);\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3);\n font-style: normal;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n\n /* Standard inputs */\n .input--standard {\n background-color: var(--nile-input-standard-background-color, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-input-standard-border-color, var(--ng-colors-border-primary));\n box-shadow: var(--nile-input-shadow-standard, var(--ng-shadow-xs));\n outline:var(--nile-outline-none, var(--ng-private-outline-transparent));\n }\n\n .input--standard:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-neutral));\n }\n\n .input--standard.input--error:hover:not(.input--disabled) {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-error));\n }\n\n .input--standard.input--focused:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n }\n .input--standard.input--focused:not(.input--disabled) {\n position: relative; \n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-brand));\n /* border-width: var(--nile-border-width-1, var(--ng-border-width-2)); */\n}\n\n/* Added to apply the hover effect in nxtgen */\n.input--standard.input--focused:not(.input--disabled)::before {\n content: \"\";\n position: absolute;\n inset: 0; \n pointer-events: none; \n border-radius: 6.5px;\n box-shadow: inset 0 0 0 1px var(--ng-colors-border-brand);\n}\n\n .input--standard.input--focused.input--warning:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-warning));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-warning));\n }\n\n .input--standard.input--focused.input--success:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-success));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-success));\n }\n \n .input--standard.input--focused.input--error:not(.input--disabled) {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border-color: var(--nile-colors-primary-500, var(--ng-colors-border-error));\n box-shadow: var(--nile-input-shadow-standard-focused-not-disabled, var(--ng-box-shadow-2));\n outline: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-outline-none, var(--ng-colors-border-error));\n }\n\n .input--standard.input--focused:not(.input--disabled) .input__control {\n color: var(--nile-colors-primary-900);\n }\n\n .input--standard.input--disabled {\n background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n border-color: var(--nile-colors-neutral-500,var(--ng-colors-border-disabled));\n /* opacity: 0.5; */\n cursor: not-allowed;\n user-select: none;\n -webkit-user-select: none;\n }\n\n .input--standard.input--disabled .input__control {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n user-select: none;\n -webkit-user-select: none;\n pointer-events: none;\n \n }\n\n .input--standard.input--disabled .input__control::placeholder {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));\n background:var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));\n }\n\n .input--standard.input--warning {\n border-color: var(--nile-colors-yellow-500, var(--ng-colors-border-warning-subtle));\n }\n\n .input--standard.input--warning:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-warning));\n }\n\n .input--standard.input--error {\n border-color: var(--nile-colors-red-500, var(--ng-colors-border-error-subtle));\n }\n\n .input--standard.input--success {\n border-color: var(--nile-colors-green-500, var(--ng-colors-border-success-subtle));\n }\n\n .input--standard.input--success:hover {\n border-color: var(--nile-colors-dark-900, var(--ng-colors-border-success));\n }\n\n .input--standard.input--destructive {\n border-color: var(--nile-colors-red-400);\n }\n\n .input--standard.input--focused.input--destructive:not(.input--disabled) {\n border: 1px solid var(--nile-colors-red-400);\n box-shadow: var(--nile-input-shadow-destructive-active);\n }\n\n .input--destructive:active {\n border: 1px solid var(--nile-colors-red-400);\n box-shadow: var(--nile-input-shadow-destructive-active);\n }\n\n /* Filled inputs */\n .input--filled {\n border: none;\n background-color: var(--nile-colors-dark-100);\n color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled:hover:not(.input--disabled) {\n background-color: var(--nile-colors-dark-100);\n }\n\n .input--filled.input--focused:not(.input--disabled) {\n background-color: var(--nile-colors-dark-100);\n outline: solid 3px hsl(200.4 98% 39.4%);\n outline-offset: 1px;\n }\n\n .input--filled.input--disabled {\n background-color: var(--nile-colors-dark-100);\n cursor: not-allowed;\n }\n\n .input__control {\n flex: 1 1 auto;\n min-width: 0;\n height: 100%;\n border: none;\n background: none;\n box-shadow: none;\n padding: var(--nile-spacing-none, var(--ng-spacing-md)) var(--nile-spacing-none, var(--ng-spacing-lg));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n cursor: inherit;\n -webkit-appearance: none;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n line-height: var(--nile-type-scale-4, var(--ng-line-height-text-md));\n letter-spacing: 0.2px;\n }\n\n .input__control::-webkit-search-decoration,\n .input__control::-webkit-search-cancel-button,\n .input__control::-webkit-search-results-button,\n .input__control::-webkit-search-results-decoration {\n -webkit-appearance: none;\n }\n\n .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-white-base, var(--ng-colors-bg-primary)) inset !important;\n /* -webkit-text-fill-color: hsl(198.6 88.7% 48.4%); */\n caret-color: hsl(240 5.3% 26.1%);\n }\n\n .input--filled .input__control:-webkit-autofill {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:hover {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:focus {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input--filled .input__control:-webkit-autofill:active {\n box-shadow: 0 0 0 3.125rem var(--nile-colors-dark-100) inset !important;\n }\n\n .input__control::placeholder {\n color: var(--nile-colors-dark-500, var(--ng-colors-text-placeholder));\n user-select: none;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));\n }\n\n .input:hover:not(.input--disabled) .input__control {\n color: var(--nile-colors-dark-900);\n }\n\n .input__control:focus {\n outline: none;\n }\n\n .input__prefix,\n .input__suffix {\n display: inline-flex;\n flex: 0 0 auto;\n align-items: center;\n cursor: default;\n }\n\n .input__prefix::slotted(nile-icon) {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__suffix::slotted(nile-icon) {\n color: var(--nile-colors-neutral-700);\n }\n\n .input--standard:focus {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n border: 1px solid var(--nile-colors-primary-500);\n box-shadow: var(--nile-box-shadow-1, var(--ng-shadow-xs));\n }\n\n /*\n * Size modifiers\n */\n\n .input--small {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-input-font-size-small);\n height: 1.875rem;\n }\n\n .input--small .input__control {\n height: calc(1.875rem);\n padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--small .input__clear {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__password-toggle {\n width: calc(1em + 0.75rem * 2);\n }\n\n .input--small .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--small .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-xsmall, var(--ng-spacing-lg));\n }\n\n .input--medium {\n font-size: var(--nile-font-size-rem-large);\n height: var(--nile-height-40px, var(--ng-height-auto));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n }\n\n .input--medium .input__control {\n height: var(--nile-type-scale-3, var(--ng-height-auto));\n padding: var(--nile-spacing-lg, var(--ng-spacing-md)) var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--medium .input__clear {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__password-toggle {\n width: calc(1em + 1rem * 2);\n }\n\n .input--medium .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--medium .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-lg, var(--ng-spacing-lg));\n }\n\n .input--large {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n font-size: var(--nile-type-scale-6);\n height: 3.125rem;\n }\n\n .input--large .input__control {\n height: calc(3.125rem - 1px * 2);\n padding: var(--nile-spacing-none) var(--nile-spacing-xl);\n }\n\n .input--large .input__clear {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__password-toggle {\n width: calc(1em + 1.25rem * 2);\n }\n\n .input--large .input__prefix::slotted(*) {\n margin-inline-start: var(--nile-spacing-small, var(--ng-spacing-lg));\n }\n\n .input--large .input__suffix::slotted(*) {\n margin-inline-end: var(--nile-spacing-small, var(--ng-spacing-lg));\n }\n\n /*\n * Pill modifier\n */\n\n .input--pill.input--small {\n border-radius:var(--nile-radius-3xl, var(--ng-spacing-lg));\n }\n\n .input--pill.input--medium {\n border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));\n }\n\n .input--pill.input--large {\n border-radius: var(--nile-radius-4xl, var(--ng-spacing-lg));\n }\n\n /*\n * Clearable + Password Toggle\n */\n\n .input__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: var(--nile-colors-neutral-700);\n border: none;\n background: none;\n padding: var(--nile-spacing-none);\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__password-toggle {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: var(--nile-colors-neutral-700);\n border: none;\n background: none;\n padding: var(--nile-spacing-none);\n transition: 150ms color;\n cursor: pointer;\n }\n\n .input__clear:hover {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__password-toggle:hover {\n color: var(--nile-colors-neutral-700);\n }\n\n .input__clear:focus,\n .input__password-toggle:focus {\n outline: none;\n }\n\n .input--empty .input__clear {\n visibility: hidden;\n }\n\n /* Don't show the browser's password toggle in Edge */\n ::-ms-reveal {\n display: none;\n }\n\n /* Hide the built-in number spinner */\n .input--no-spin-buttons input[type='number']::-webkit-outer-spin-button,\n .input--no-spin-buttons input[type='number']::-webkit-inner-spin-button {\n -webkit-appearance: none;\n display: none;\n }\n\n .input--no-spin-buttons input[type='number'] {\n -moz-appearance: textfield;\n }\n\n :host([no-border]) .input--standard {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-outline]) .input--standard {\n outline: var(--nile-outline-unset, var(--ng-outline-none));\n }\n\n :host([no-border]) .input--standard:hover:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n :host([no-border]) .input--standard.input--focused:not(.input--disabled) {\n border: none;\n box-shadow: 0 0 0 0;\n }\n\n .input__password {\n font-family: var(--nile-font-family-disc, var(--ng-font-family-body));\n letter-spacing: var(--nile-spacing-xxs, var(--ng-spacing-none));\n }\n\n .input__non-printable {\n border-radius: var(--nile-radius-sm);\n max-width: 400px;\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: 1px solid var(--nile-colors-red-500);\n color: var(--nile-colors-red-500);\n padding: var(--nile-spacing-10px);\n font-size: var(--nile-type-scale-2);\n max-height: 300px;\n overflow-y: scroll;\n line-height: var(--nile-type-scale-4);\n }\n\n .input__remove-non-printable {\n color: var(--nile-colors-red-500);\n margin-left: var(--nile-spacing-10px);\n font-size: var(--nile-type-scale-3);\n color: var(--nile-colors-dark-900);\n cursor: pointer;\n }\n\n .input__srtiked-text-container {\n margin-top: var(--nile-spacing-xs);\n color: var(--nile-colors-dark-900);\n word-break: break-all;\n line-height: var(--nile-type-scale-4);\n }\n\n .input__srtiked-text {\n text-decoration: line-through;\n text-decoration-color: var(--nile-colors-white-base);\n color: var(--nile-colors-white-base);\n background-color: var(--nile-colors-red-500);\n }\n`;\n\nexport default [styles];\n"]}
|
|
@@ -402,6 +402,7 @@ let NileInput = class NileInput extends NileElement {
|
|
|
402
402
|
title=${this.title /* An empty title prevents browser validation tooltips from appearing on hover */}
|
|
403
403
|
name=${ifDefined(this.name)}
|
|
404
404
|
?disabled=${this.disabled}
|
|
405
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
405
406
|
?readonly=${this.readonly}
|
|
406
407
|
?required=${this.required}
|
|
407
408
|
placeholder=${ifDefined(this.placeholder)}
|
|
@@ -530,6 +531,7 @@ let NileInput = class NileInput extends NileElement {
|
|
|
530
531
|
title=${this.title}
|
|
531
532
|
name=${ifDefined(this.name)}
|
|
532
533
|
?disabled=${this.disabled}
|
|
534
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
533
535
|
?readonly=${this.readonly}
|
|
534
536
|
?required=${this.required}
|
|
535
537
|
placeholder=${ifDefined(this.placeholder)}
|
|
@@ -1 +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,EAAE;4CAAwB;AA+HnC;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAIjD;AAGD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;iDAK7C;AAGK;IADL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAO9C;AAtVU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAszBrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-input.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input'],\n });\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n @property({ type: Boolean }) checkNonPrintableChar: boolean = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Sets the input to a Destructive state, changing its visual appearance. */\n @property({ type: Boolean }) destructive = false;\n\n /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =\n false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible =\n false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =\n false;\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 /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string = 'off';\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean, attribute: true, reflect: true }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false'),\n },\n })\n spellcheck = true;\n\n @property({ type: Boolean, reflect: true }) canSavePassword = false;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n @property() noOutline: any = false;\n\n @property() noPadding: any = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.emit('nile-after-init');\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n if(this.value && this.type === 'number') {\n this.emit('nile-input', { value: Number(this.value) });\n } else {\n this.emit('nile-input', { value: this.value });\n }\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier =\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if (charCode > 127) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(\n i\n )}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', {\n value: this.markedValue,\n hasNonPrintableCharacters: this.hasPrintableCharacters,\n });\n }\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (charCode < 128) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n public inputFocus() {\n this.input.focus();\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 hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable &&\n !this.disabled &&\n !this.readonly &&\n (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n ${hasLabelSuffixSlot ? html` <slot name=\"label-suffix\"></slot> ` : ``}\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n ${this.checkNonPrintableChar\n ? html`\n <nile-popup ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n exportparts=\"input\"\n strategy=\"fixed\"\n >\n <div\n slot=\"anchor\"\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password'\n ? this.passwordVisible\n ? 'text'\n : 'password'\n : this.type}\n title=${\n this.title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"var(--nile-icon-error, var(--ng-icon-x-circle))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge variant=\"error\" @click=${\n this.removeAllNonPrintableCharacters\n }class=\"input__remove-non-printable\">\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">${unsafeHTML(\n this.markedValue\n )} </div>\n </div>\n </nile-popup>\n `\n : html`\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password'\n ? this.passwordVisible\n ? 'text'\n : 'password'\n : this.type}\n title=${this.title}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon\n name=\"var(--nile-icon-error, var(--ng-icon-x-circle))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n `}\n\n </div>\n\n ${\n hasHelpText\n ? html`\n <nile-form-help-text exportparts=\"container:help__text\">${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"nile-input.js","sourceRoot":"","sources":["../../../src/nile-input/nile-input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,GAGL,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,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IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAoB;AAGpE;IAAX,QAAQ,EAAE;+CAOA;AAWX;IARC,QAAQ,CAAC;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE;YACT,oEAAoE;YACpE,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;YACpE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;SACjD;KACF,CAAC;6CACgB;AAE0B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;kDAAyB;AAMxD;IAAX,QAAQ,EAAE;4CAQD;AAOD;IAAR,KAAK,EAAE;yDAAyC;AAExC;IAAR,KAAK,EAAE;8CAAqB;AAEjB;IAAX,QAAQ,EAAE;4CAAwB;AAEvB;IAAX,QAAQ,EAAE;4CAAwB;AA+HnC;IADC,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAIjD;AAGD;IADC,KAAK,CAAC,MAAM,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;iDAK7C;AAGK;IADL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAO9C;AAtVU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAwzBrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-input.css';\nimport '../nile-icon';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { FormControlController } from '../internal/form';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\nimport NileElement, { NileFormControl } from '../internal/nile-element';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * Nile icon component.\n *\n * @tag nile-input\n *\n */\n@customElement('nile-input')\nexport class NileInput extends NileElement implements NileFormControl {\n static styles: CSSResultGroup = styles;\n\n private readonly formControlController = new FormControlController(this, {\n assumeInteractionOn: ['nile-blur', 'nile-input'],\n });\n private readonly hasSlotController = new HasSlotController(\n this,\n 'help-text',\n 'label'\n );\n\n @query('.input__control') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /**\n * The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\n * to `text`.\n */\n @property({ reflect: true }) type:\n | 'date'\n | 'datetime-local'\n | 'email'\n | 'number'\n | 'password'\n | 'search'\n | 'tel'\n | 'text'\n | 'time'\n | 'url' = 'text';\n\n /** The name of the input, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the input, submitted as a name/value pair with form data. */\n @property() value = '';\n\n @property({ type: Boolean }) checkNonPrintableChar: boolean = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n /** The input's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a filled input. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Sets the input to a Destructive state, changing its visual appearance. */\n @property({ type: Boolean }) destructive = false;\n\n /** Draws a pill-style input with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** The input's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n /** Adds a clear button when the input is not empty. */\n @property({ type: Boolean }) clearable = false;\n\n /** Disables the input. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** Makes the input readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /** Adds a button to toggle the password's visibility. Only applies to password types. */\n @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle =\n false;\n\n /** Determines whether or not the password is currently visible. Only applies to password input types. */\n @property({ attribute: 'password-visible', type: Boolean }) passwordVisible =\n false;\n\n /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */\n @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons =\n false;\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 /** Makes the input a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n /** A regular expression pattern to validate input against. */\n @property() pattern: string;\n\n /** The minimum length of input that will be considered valid. */\n @property({ type: Number }) minlength: number;\n\n /** The maximum length of input that will be considered valid. */\n @property({ type: Number }) maxlength: number;\n\n /** The input's minimum value. Only applies to date and number input types. */\n @property() min: number | string;\n\n /** The input's maximum value. Only applies to date and number input types. */\n @property() max: number | string;\n\n /**\n * Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\n * implied, allowing any numeric value. Only applies to date and number input types.\n */\n @property() step: number | 'any';\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize:\n | 'off'\n | 'none'\n | 'on'\n | 'sentences'\n | 'words'\n | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: 'off' | 'on';\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string = 'off';\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean, attribute: true, reflect: true }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint:\n | 'enter'\n | 'done'\n | 'go'\n | 'next'\n | 'previous'\n | 'search'\n | 'send';\n\n /** Enables spell checking on the input. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false'),\n },\n })\n spellcheck = true;\n\n @property({ type: Boolean, reflect: true }) canSavePassword = false;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode:\n | 'none'\n | 'text'\n | 'decimal'\n | 'numeric'\n | 'tel'\n | 'search'\n | 'email'\n | 'url';\n\n //\n // NOTE: We use an in-memory input for these getters/setters instead of the one in the template because the properties\n // can be set before the component is rendered.\n //\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n @property() noOutline: any = false;\n\n @property() noPadding: any = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n /** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */\n get valueAsDate() {\n const input = document.createElement('input');\n input.type = 'date';\n input.value = this.value;\n return input.valueAsDate;\n }\n\n set valueAsDate(newValue: Date | null) {\n const input = document.createElement('input');\n input.type = 'date';\n input.valueAsDate = newValue;\n this.value = input.value;\n }\n\n /** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */\n get valueAsNumber() {\n const input = document.createElement('input');\n input.type = 'number';\n input.value = this.value;\n return input.valueAsNumber;\n }\n\n set valueAsNumber(newValue: number) {\n const input = document.createElement('input');\n input.type = 'number';\n input.valueAsNumber = newValue;\n this.value = input.value;\n }\n\n /** Gets the validity state object */\n get validity() {\n return this.input.validity;\n }\n\n /** Gets the validation message */\n get validationMessage() {\n return this.input.validationMessage;\n }\n\n firstUpdated() {\n this.emit('nile-after-init');\n this.formControlController.updateValidity();\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.emit('nile-change', { value: this.value });\n }\n\n private handleClearClick(event: MouseEvent) {\n this.value = '';\n this.emit('nile-clear', { value: this.value });\n this.emit('nile-input', { value: this.value });\n this.emit('nile-change', { value: this.value });\n this.input.focus();\n\n event.stopPropagation();\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.formControlController.updateValidity();\n if(this.value && this.type === 'number') {\n this.emit('nile-input', { value: Number(this.value) });\n } else {\n this.emit('nile-input', { value: this.value });\n }\n }\n\n private handleInvalid(event: Event) {\n this.formControlController.setValidity(false);\n this.formControlController.emitInvalidEvent(event);\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n const hasModifier =\n event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;\n\n // Pressing enter when focused on an input should submit the form like a native input, but we wait a tick before\n // submitting to allow users to cancel the keydown event if they need to\n if (event.key === 'Enter' && !hasModifier) {\n setTimeout(() => {\n //\n // When using an Input Method Editor (IME), pressing enter will cause the form to submit unexpectedly. One way\n // to check for this is to look at event.isComposing, which will be true when the IME is open.\n //\n\n //\n if (!event.defaultPrevented && !event.isComposing) {\n this.formControlController.submit();\n }\n });\n }\n }\n\n private handlePasswordToggle() {\n this.passwordVisible = !this.passwordVisible;\n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\n handleDisabledChange() {\n // Disabled form controls are always valid\n this.formControlController.setValidity(this.disabled);\n }\n\n @watch('step', { waitUntilFirstUpdate: true })\n handleStepChange() {\n // If step changes, the value may become invalid so we need to recheck after the update. We set the new step\n // imperatively so we don't have to wait for the next render to report the updated validity.\n this.input.step = String(this.step);\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n\n if (this.checkNonPrintableChar) {\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if (charCode > 127) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(\n i\n )}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', {\n value: this.markedValue,\n hasNonPrintableCharacters: this.hasPrintableCharacters,\n });\n }\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (charCode < 128) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n }\n\n /** Sets focus on the input. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the input. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the input. */\n select() {\n this.input.select();\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(\n selectionStart,\n selectionEnd,\n selectionDirection\n );\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n // /** Displays the browser picker for an input element (only works if the browser supports it for the input type). */\n // showPicker() {\n // if ('showPicker' in HTMLInputElement.prototype) {\n // this.input.showPicker();\n // }\n // }\n\n /** Increments the value of a numeric input type by the value of the step attribute. */\n stepUp() {\n this.input.stepUp();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Decrements the value of a numeric input type by the value of the step attribute. */\n stepDown() {\n this.input.stepDown();\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n }\n\n /** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */\n checkValidity() {\n return this.input.checkValidity();\n }\n\n /** Gets the associated form, if one exists. */\n getForm(): HTMLFormElement | null {\n return this.formControlController.getForm();\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n reportValidity() {\n return this.input.reportValidity();\n }\n\n /** Sets a custom validation message. Pass an empty string to restore validity. */\n setCustomValidity(message: string) {\n this.input.setCustomValidity(message);\n this.formControlController.updateValidity();\n }\n\n public inputFocus() {\n this.input.focus();\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 hasLabelSuffixSlot = this.hasSlotController.test('label-suffix');\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n const hasClearIcon =\n this.clearable &&\n !this.disabled &&\n !this.readonly &&\n (typeof this.value === 'number' || this.value.length > 0);\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--small': this.size === 'small',\n 'form-control--medium': this.size === 'medium',\n 'form-control--large': this.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n ${hasLabelSuffixSlot ? html` <slot name=\"label-suffix\"></slot> ` : ``}\n\n <div part=\"form-control-input\" class=\"form-control-input\">\n ${this.checkNonPrintableChar\n ? html`\n <nile-popup ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n exportparts=\"input\"\n strategy=\"fixed\"\n >\n <div\n slot=\"anchor\"\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password'\n ? this.passwordVisible\n ? 'text'\n : 'password'\n : this.type}\n title=${\n this.title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n tabindex=${this.disabled ? '-1' : '0'}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon name=\"var(--nile-icon-error, var(--ng-icon-x-circle))\" method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\" library=\"system\"></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge variant=\"error\" @click=${\n this.removeAllNonPrintableCharacters\n }class=\"input__remove-non-printable\">\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">${unsafeHTML(\n this.markedValue\n )} </div>\n </div>\n </nile-popup>\n `\n : html`\n <div\n part=\"base\"\n class=${classMap({\n input: true,\n\n // Sizes\n 'input--small': this.size === 'small',\n 'input--medium': this.size === 'medium',\n 'input--large': this.size === 'large',\n\n // States\n 'input--pill': this.pill,\n 'input--standard': !this.filled,\n 'input--warning': this.warning,\n 'input--error': this.error,\n 'input--success': this.success,\n 'input--destructive': this.destructive,\n 'input--filled': this.filled,\n 'input--disabled': this.disabled,\n 'input--focused': this.hasFocus,\n 'input--empty': !this.value,\n 'input--no-spin-buttons': this.noSpinButtons,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"input__prefix\"></slot>\n <input\n part=\"input\"\n id=\"input\"\n class=\"input__control ${\n this.type === 'password' && !this.passwordVisible\n ? 'input__password'\n : ''\n }\"\n type=${this.type === 'password'\n ? this.passwordVisible\n ? 'text'\n : 'password'\n : this.type}\n title=${this.title}\n name=${ifDefined(this.name)}\n ?disabled=${this.disabled}\n tabindex=${this.disabled ? '-1' : '0'}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n min=${ifDefined(this.min)}\n max=${ifDefined(this.max)}\n step=${ifDefined(this.step as number)}\n .value=${live(this.value)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocomplete=${ifDefined(this.autocomplete as any)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${this.spellcheck}\n pattern=${ifDefined(this.pattern)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @invalid=${this.handleInvalid}\n @keydown=${this.handleKeyDown}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n />\n\n ${\n hasClearIcon\n ? html`\n <button\n part=\"clear-button\"\n class=\"input__clear\"\n type=\"button\"\n aria-label=\"clearEntry\"\n @click=${this.handleClearClick}\n tabindex=\"-1\"\n >\n <slot name=\"clear-icon\">\n <nile-icon\n name=\"var(--nile-icon-error, var(--ng-icon-x-circle))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n </button>\n `\n : ''\n }\n\n ${\n this.passwordToggle && !this.disabled\n ? html`\n <button\n part=\"password-toggle-button\"\n class=\"input__password-toggle\"\n type=\"button\"\n aria-label=${this.passwordVisible\n ? 'hidePassword'\n : 'showPassword'}\n @click=${this.handlePasswordToggle}\n tabindex=\"-1\"\n >\n ${this.passwordVisible\n ? html`\n <slot name=\"show-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `\n : html`\n <slot name=\"hide-password-icon\">\n <nile-icon\n name=\"var(--nile-icon-eye, var(--ng-icon-eye))\"\n method=\"var(--nile-svg-method-fill, var(--ng-svg-method-stroke))\"\n library=\"system\"\n ></nile-icon>\n </slot>\n `}\n </button>\n `\n : ''\n }\n\n <slot name=\"suffix\" part=\"suffix\" class=\"input__suffix\"></slot>\n </div>\n `}\n\n </div>\n\n ${\n hasHelpText\n ? html`\n <nile-form-help-text exportparts=\"container:help__text\">${this.helpText}</nile-form-help-text>\n `\n : ``\n }\n\n ${\n hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``\n }\n </div>\n </div>\n `;\n }\n}\n\nexport default NileInput;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-input': NileInput;\n }\n}\n"]}
|
|
@@ -43,8 +43,10 @@ export const styles = css `
|
|
|
43
43
|
|
|
44
44
|
.link--disabled {
|
|
45
45
|
color: var(--nile-colors-primary-500, var(--ng-colors-text-tertiary-600));
|
|
46
|
+
pointer-events: none;
|
|
47
|
+
}
|
|
48
|
+
:host([disabled]) {
|
|
46
49
|
cursor: not-allowed;
|
|
47
|
-
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.link.link--disabled:not(.link__button) .link__label {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-link.css.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"nile-link.css.js","sourceRoot":"","sources":["../../../src/nile-link/nile-link.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuFxB,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';\n\n/**\n * Link CSS\n */\nexport const styles = css`\n :host {\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n .link {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n user-select: none;\n white-space: nowrap;\n padding: var(--nile-spacing-lg, var(--ng-spacing-lg));\n gap: var(--nile-spacing-md, var(--ng-spacing-xs));\n height: 38px;\n box-sizing: border-box;\n cursor: pointer;\n text-decoration:none;\n }\n\n .link__label {\n color: var(--nile-colors-primary-600, var(--ng-colors-text-brand-secondary-700));\n text-align: center;\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: 0.2px;\n }\n\n .link--disabled {\n color: var(--nile-colors-primary-500, var(--ng-colors-text-tertiary-600));\n pointer-events: none;\n }\n :host([disabled]) {\n cursor: not-allowed;\n }\n\n .link.link--disabled:not(.link__button) .link__label {\n color: var(--nile-colors-primary-500, var(--ng-colors-fg-disabled));\n }\n\n \n .link:not(.link--disabled):not(.link__button):hover ,\n .link:not(.link--disabled):not(.link__button):hover .link__label {\n color: var(--nile-colors-primary-700, var(--ng-colors-text-brand-secondary-hover));\n text-decoration: var(--nile-text-decoration-none, var(--ng-text-decoration-underline));\n }\n\n .link:not(.link--disabled):not(.link__button):active,\n .link:not(.link--disabled):not(.link__button):active .link__label {\n color: var(--nile-colors-primary-900, var(--ng-colors-text-brand-secondary-hover));\n }\n\n .link__button:hover {\n color: var(--nile-colors-primary-700, var(--ng-colors-text-brand-tertiary-600));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n background: var(--nile-colors-dark-200, var(--ng-colors-bg-primary-hover));\n }\n\n .link__button.link--disabled .link__label {\n color: var(--nile-colors-primary-700, var(--ng-colors-fg-disabled));\n }\n\n .link__button.link--disabled:hover,\n .link__button.link--disabled:focus {\n color: var(--nile-colors-primary-500, var(--ng-colors-fg-disabled));\n box-shadow: var(--nile-box-shadow-none, var(--ng-shadow-none));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n background: var(--nile-colors-dark-200, var(--ng-colors-bg-primary));\n }\n\n .link__button:active {\n color: var(--nile-colors-primary-100, var(--ng-colors-text-brand-tertiary-600));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n background: var(--nile-colors-primary-100, var(--ng-colors-bg-primary));\n box-shadow: var(--nile-box-shadow-none, var(--ng-focus-ring));\n }\n\n .link__button:focus {\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-none, var(--ng-focus-ring));\n }\n\n`;\n\nexport default [styles];\n"]}
|
|
@@ -118,12 +118,12 @@ export const styles = css `
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.radio--disabled .radio__checked-icon {
|
|
121
|
-
background-color:var(--nile-colors-
|
|
121
|
+
background-color:var(--nile-colors-dark-100, var(--ng-colors-fg-disabled-subtle)); // for v2
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
.radio--disabled .radio__control {
|
|
125
125
|
background-color:var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));
|
|
126
|
-
border: 1px solid var(--nile-colors-
|
|
126
|
+
border: 1px solid var(--nile-colors-dark-100, var(--ng-colors-border-disabled));
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
/* When the control isn't checked, hide the circle for Windows High Contrast mode a11y */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-radio.css.js","sourceRoot":"","sources":["../../../src/nile-radio/nile-radio.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIxB,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';\n\n/**\n * Radio CSS\n */\nexport const styles = css`\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host(:focus-visible) {\n outline: 0px;\n }\n\n .radio {\n display: inline-flex;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));\n vertical-align: middle;\n cursor: pointer;\n margin: var(--nile-spacing-10px, var(--ng-spacing-lg)) var(--nile-spacing-none, var(--ng-spacing-none));\n align-items: center;\n }\n\n .radio--medium {\n --toggle-size: 14px;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md))\n }\n\n .radio__checked-icon {\n display: var(--nile-display-inline-flex, var(--ng-display-block));\n width: var(--nile-radio-inner-width, var(--ng-width-2));\n height: var(--nile-radio-inner-width, var(--ng-height-8px));\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n background: var(--nile-radio-checked-icon-background, var(--ng-colors-bg-primary));\n }\n\n .radio__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-radio-outer-width, var(--ng-width-4));\n height: var(--nile-radio-outer-height, var(--ng-height-16px));\n border: solid 1px var(--nile-radio-outer-border-color, var(--ng-colors-border-primary));\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n background-color: var(--nile-radio-outer-background-color, var(--ng-colors-bg-primary));\n color: transparent;\n transition: var(--nile-transition-duration-default, var(--ng-transition-duration-default)) border-color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) background-color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) box-shadow;\n }\n\n .radio__input {\n position: absolute;\n opacity: 0;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n pointer-events: none;\n }\n\n /* Hover */\n .radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover {\n border: 1px solid var(--nile-radio-hover-border-color, var(--ng-colors-border-neutral));\n background: var(--nile-radio-hover-background-color, var(--ng-colors-bg-primary));\n }\n\n /* Checked */\n .radio--checked .radio__control {\n color: var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));\n border: 1px solid var(--nile-radio-checked-border-color, var(--ng-colors-bg-brand-solid));\n background-color: var(--nile-radio-checked-background-color,var(--ng-colors-bg-brand-solid));\n }\n\n /* Checked + hover */\n .radio.radio--checked:not(.radio--disabled) .radio__control:hover {\n border: 1px solid var(--nile-radio-checked-hover-border-color, var(--ng-colors-bg-brand-solid-hover));\n background-color: var(--nile-radio-checked-hover-background-color, var(--ng-colors-bg-brand-solid-hover));\n }\n\n /* Checked + hover */\n .radio__checked-icon:hover {\n background-color: var(--nile-radio-checked-hover-icon-background-color, var(--ng-colors-bg-primary));\n }\n\n /* Checked + focus */\n :host(:focus-visible) .radio__control {\n outline: solid var(--nile-outline-3px, var(--ng-outline-2px)) var(--nile-box-shadow-12, var(--ng-colors-bg-brand-solid));\n outline-offset: 1px;\n }\n\n .radio__control:focus-visible {\n outline: solid var(--nile-outline-3px, var(--ng-outline-2px)) var(--nile-box-shadow-12, var(--ng-colors-bg-brand-solid));\n outline-offset: 2px;\n }\n\n /* Focused, but not disabled */\n.radio--focused:not(.radio--disabled) .radio__control {\n outline: solid var(--nile-outline-none, var(--ng-outline-2px)) var(--nile-outline-none, var(--ng-colors-bg-brand-solid));\n outline-offset: 1px;\n}\n\n /* Disabled */\n .radio--disabled {\n \n cursor: not-allowed;\n }\n\n .radio--disabled .radio__checked-icon {\n background-color:var(--nile-colors-
|
|
1
|
+
{"version":3,"file":"nile-radio.css.js","sourceRoot":"","sources":["../../../src/nile-radio/nile-radio.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIxB,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';\n\n/**\n * Radio CSS\n */\nexport const styles = css`\n :host {\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host(:focus-visible) {\n outline: 0px;\n }\n\n .radio {\n display: inline-flex;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));\n vertical-align: middle;\n cursor: pointer;\n margin: var(--nile-spacing-10px, var(--ng-spacing-lg)) var(--nile-spacing-none, var(--ng-spacing-none));\n align-items: center;\n }\n\n .radio--medium {\n --toggle-size: 14px;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md))\n }\n\n .radio__checked-icon {\n display: var(--nile-display-inline-flex, var(--ng-display-block));\n width: var(--nile-radio-inner-width, var(--ng-width-2));\n height: var(--nile-radio-inner-width, var(--ng-height-8px));\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n background: var(--nile-radio-checked-icon-background, var(--ng-colors-bg-primary));\n }\n\n .radio__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-radio-outer-width, var(--ng-width-4));\n height: var(--nile-radio-outer-height, var(--ng-height-16px));\n border: solid 1px var(--nile-radio-outer-border-color, var(--ng-colors-border-primary));\n border-radius: var(--nile-radius-full, var(--ng-radius-full));\n background-color: var(--nile-radio-outer-background-color, var(--ng-colors-bg-primary));\n color: transparent;\n transition: var(--nile-transition-duration-default, var(--ng-transition-duration-default)) border-color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) background-color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) color,\n var(--nile-transition-duration-default, var(--ng-transition-duration-default)) box-shadow;\n }\n\n .radio__input {\n position: absolute;\n opacity: 0;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n pointer-events: none;\n }\n\n /* Hover */\n .radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover {\n border: 1px solid var(--nile-radio-hover-border-color, var(--ng-colors-border-neutral));\n background: var(--nile-radio-hover-background-color, var(--ng-colors-bg-primary));\n }\n\n /* Checked */\n .radio--checked .radio__control {\n color: var(--nile-colors-primary-600, var(--ng-colors-fg-brand-primary-600));\n border: 1px solid var(--nile-radio-checked-border-color, var(--ng-colors-bg-brand-solid));\n background-color: var(--nile-radio-checked-background-color,var(--ng-colors-bg-brand-solid));\n }\n\n /* Checked + hover */\n .radio.radio--checked:not(.radio--disabled) .radio__control:hover {\n border: 1px solid var(--nile-radio-checked-hover-border-color, var(--ng-colors-bg-brand-solid-hover));\n background-color: var(--nile-radio-checked-hover-background-color, var(--ng-colors-bg-brand-solid-hover));\n }\n\n /* Checked + hover */\n .radio__checked-icon:hover {\n background-color: var(--nile-radio-checked-hover-icon-background-color, var(--ng-colors-bg-primary));\n }\n\n /* Checked + focus */\n :host(:focus-visible) .radio__control {\n outline: solid var(--nile-outline-3px, var(--ng-outline-2px)) var(--nile-box-shadow-12, var(--ng-colors-bg-brand-solid));\n outline-offset: 1px;\n }\n\n .radio__control:focus-visible {\n outline: solid var(--nile-outline-3px, var(--ng-outline-2px)) var(--nile-box-shadow-12, var(--ng-colors-bg-brand-solid));\n outline-offset: 2px;\n }\n\n /* Focused, but not disabled */\n.radio--focused:not(.radio--disabled) .radio__control {\n outline: solid var(--nile-outline-none, var(--ng-outline-2px)) var(--nile-outline-none, var(--ng-colors-bg-brand-solid));\n outline-offset: 1px;\n}\n\n /* Disabled */\n .radio--disabled {\n \n cursor: not-allowed;\n }\n\n .radio--disabled .radio__checked-icon {\n background-color:var(--nile-colors-dark-100, var(--ng-colors-fg-disabled-subtle)); // for v2\n }\n\n .radio--disabled .radio__control {\n background-color:var(--nile-colors-neutral-100, var(--ng-colors-bg-disabled-subtle));\n border: 1px solid var(--nile-colors-dark-100, var(--ng-colors-border-disabled));\n }\n\n /* When the control isn't checked, hide the circle for Windows High Contrast mode a11y */\n .radio:not(.radio--checked) svg circle {\n opacity: 0;\n }\n\n .radio__label {\n display: inline-block;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-tertiary-600));\n line-height: var(--nile-type-scale-3, var(--ng-line-height-text-sm));\n margin-inline-start: var(--nile-spacing-7px, var(--ng-spacing-md));\n user-select: none;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));\n margin-top: var(--nile-spacing-xxs, var(--ng-spacing-xxs));\n }\n .radio__label_border {\n padding: var(--nile-spacing-lg, var(--ng-spacing-xl));\n border-radius: var(--nile-radius-sm, var(--ng-radius-xl));\n border: var(--nile-border-width-1, var(--ng-border-width-1)) solid var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n`;\n"]}
|
|
@@ -92,10 +92,24 @@ let NileRadio = class NileRadio extends NileElement {
|
|
|
92
92
|
}
|
|
93
93
|
handleCheckedChange() {
|
|
94
94
|
this.setAttribute('aria-checked', this.checked ? 'true' : 'false');
|
|
95
|
-
|
|
95
|
+
if (this.disabled) {
|
|
96
|
+
this.setAttribute('tabindex', '-1');
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
this.setAttribute('tabindex', this.checked ? '0' : '-1');
|
|
100
|
+
}
|
|
96
101
|
}
|
|
97
102
|
handleDisabledChange() {
|
|
98
103
|
this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');
|
|
104
|
+
if (this.disabled) {
|
|
105
|
+
this.setAttribute('tabindex', '-1');
|
|
106
|
+
if (this.matches(':focus')) {
|
|
107
|
+
this.blur();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
this.setAttribute('tabindex', this.checked ? '0' : '-1');
|
|
112
|
+
}
|
|
99
113
|
}
|
|
100
114
|
render() {
|
|
101
115
|
return html `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nile-radio.js","sourceRoot":"","sources":["../../../src/nile-radio/nile-radio.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAAa,IAAI,EAAiC,MAAM,KAAK,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,WAAW;IAAnC;;QAGqB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E,CAAC;+CAAsB;AAwDjE;IADC,KAAK,CAAC,SAAS,CAAC;oDAShB;AAGH;IADG,KAAK,CAAC,UAAU,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;qDAYnD;AAjGY,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA0HrB;;AAED,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, CSSResultArray, TemplateResult} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport {styles} from './nile-radio.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { state } from 'lit/decorators.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n/**\n * Nile icon component.\n *\n * @tag nile-radio\n *\n *\n* @dependency nile-icon\n *\n * @slot - The radio's label.\n *\n * @event blur - Emitted when the control loses focus.\n * @event focus - Emitted when the control gains focus.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The circular container that wraps the radio's checked state.\n * @csspart control--checked - The radio control when the radio is checked.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the radio's label.\n */\n@customElement('nile-radio')\nexport class NileRadio extends NileElement {\n static styles: CSSResultGroup = styles;\n\n @property({type:Boolean}) checked = false;\n @state() protected hasFocus = false;\n\n /** The radio's value. When selected, the radio group will receive this value. */\n @property() value: string = '';\n\n /** The radio's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the radio. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** The radio's labelborder. */\n @property({ type: Boolean, reflect: true }) islabelborder = false;\n\n \n @property({ type: Boolean, reflect: true }) allowUncheck = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleBlur = this.handleBlur.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n\n this.setInitialAttributes();\n this.addEventListeners();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n this.removeEventListeners();\n this.emit('nile-destroy');\n }\n\n private addEventListeners() {\n this.addEventListener('blur', this.handleBlur);\n this.addEventListener('click', this.handleClick);\n this.addEventListener('focus', this.handleFocus);\n }\n\n private removeEventListeners() {\n this.removeEventListener('blur', this.handleBlur);\n this.removeEventListener('click', this.handleClick);\n this.removeEventListener('focus', this.handleFocus);\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur')\n }\n\n private handleClick() {\n\n if(this.allowUncheck && !this.disabled) {\n this.checked = !this.checked;\n } else if (!this.disabled) {\n this.checked = true;\n }\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus')\n }\n\n private setInitialAttributes() {\n this.setAttribute('role', 'radio');\n this.setAttribute('tabindex', '-1');\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n }\n\n @watch('checked')\n handleCheckedChange() {\n this.setAttribute('aria-checked', this.checked ? 'true' : 'false');\n if (this.disabled) {\n this.setAttribute('tabindex', '-1');\n } else {\n this.setAttribute('tabindex', this.checked ? '0' : '-1');\n }\n \n }\n\n @watch('disabled', { waitUntilFirstUpdate: true })\nhandleDisabledChange() {\n this.setAttribute('aria-disabled', this.disabled ? 'true' : 'false');\n if (this.disabled) {\n this.setAttribute('tabindex', '-1');\n \n if (this.matches(':focus')) {\n (this as HTMLElement).blur();\n }\n } else {\n this.setAttribute('tabindex', this.checked ? '0' : '-1');\n }\n}\n\n render() {\n return html`\n <span\n part=\"base\"\n class=${classMap({\n radio: true,\n 'radio--checked': this.checked,\n 'radio--disabled': this.disabled,\n 'radio--focused': this.hasFocus,\n 'radio--medium': this.size === 'medium',\n 'radio__label_border':this.islabelborder\n })}\n >\n <span part=\"${`control${this.checked ? ' control--checked' : ''}`}\" class=\"radio__control\">\n ${this.checked\n ? html` <span class=\"radio__checked-icon\"></span> `\n : ''}\n </span>\n\n <slot part=\"label\" class=\"radio__label\"></slot>\n </span>\n `;\n }\n}\n\nexport default NileRadio;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-radio': NileRadio;\n }\n}\n"]}
|
|
@@ -112,6 +112,8 @@ let NileRadioGroup = class NileRadioGroup extends NileElement {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
handleKeyDown(event) {
|
|
115
|
+
if (this.disabled)
|
|
116
|
+
return;
|
|
115
117
|
if (!['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', ' '].includes(event.key)) {
|
|
116
118
|
return;
|
|
117
119
|
}
|
|
@@ -148,6 +150,8 @@ let NileRadioGroup = class NileRadioGroup extends NileElement {
|
|
|
148
150
|
event.preventDefault();
|
|
149
151
|
}
|
|
150
152
|
handleLabelClick() {
|
|
153
|
+
if (this.disabled)
|
|
154
|
+
return;
|
|
151
155
|
const radios = this.getAllRadios();
|
|
152
156
|
const checked = radios.find(radio => radio.checked);
|
|
153
157
|
const radioToFocus = checked || radios[0];
|
|
@@ -164,6 +168,10 @@ let NileRadioGroup = class NileRadioGroup extends NileElement {
|
|
|
164
168
|
radio.islabelborder = true;
|
|
165
169
|
}
|
|
166
170
|
});
|
|
171
|
+
if (this.disabled) {
|
|
172
|
+
radios.forEach(r => (r.tabIndex = -1));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
167
175
|
const nile_radio_check = 'nile-radio-button';
|
|
168
176
|
this.hasButtonGroup = radios.some(radio => radio.tagName.toLowerCase() === nile_radio_check);
|
|
169
177
|
if (radios.length > 0 && !radios.some(radio => radio.checked)) {
|