@aquera/nile-elements 1.5.5 → 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 +10 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +569 -263
- 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 +15 -2
- package/dist/nile-auto-complete/nile-auto-complete.esm.js +1 -1
- package/dist/nile-button/nile-button.cjs.js +1 -1
- package/dist/nile-button/nile-button.cjs.js.map +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 +96 -36
- package/dist/nile-button/nile-button.esm.js +2 -2
- 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 +66 -2
- package/dist/nile-calendar/nile-calendar.esm.js +22 -15
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
- package/dist/nile-checkbox/nile-checkbox.css.esm.js +4 -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 +38 -23
- 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 +10 -6
- package/dist/nile-code-editor/nile-code-editor.esm.js +2 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js +1 -1
- package/dist/nile-date-picker/nile-date-picker.cjs.js.map +1 -1
- package/dist/nile-date-picker/nile-date-picker.esm.js +4 -4
- package/dist/nile-dropdown/nile-dropdown.cjs.js +1 -1
- package/dist/nile-dropdown/nile-dropdown.cjs.js.map +1 -1
- package/dist/nile-dropdown/nile-dropdown.esm.js +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js +2 -2
- package/dist/nile-file-upload/utils/file-validation.util.cjs.js.map +1 -1
- package/dist/nile-file-upload/utils/file-validation.util.esm.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js +1 -1
- package/dist/nile-filter-chip/nile-filter-chip.cjs.js.map +1 -1
- 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 +28 -0
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +2 -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-inline-edit/nile-inline-edit.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.cjs.js +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.cjs.js.map +1 -1
- package/dist/nile-inline-edit/nile-inline-edit.css.esm.js +15 -6
- package/dist/nile-inline-edit/nile-inline-edit.esm.js +2 -2
- 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 +15 -5
- package/dist/nile-input/nile-input.esm.js +2 -0
- package/dist/nile-link/nile-link.cjs.js +1 -1
- package/dist/nile-link/nile-link.cjs.js.map +1 -1
- 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 +3 -2
- package/dist/nile-link/nile-link.esm.js +2 -2
- package/dist/nile-qr-code/index.cjs.js +2 -0
- package/dist/nile-qr-code/index.cjs.js.map +1 -0
- package/dist/nile-qr-code/index.esm.js +1 -0
- package/dist/nile-qr-code/nile-qr-code-utils.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code-utils.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code-utils.esm.js +1 -0
- package/dist/nile-qr-code/nile-qr-code.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code.css.cjs.js +2 -0
- package/dist/nile-qr-code/nile-qr-code.css.cjs.js.map +1 -0
- package/dist/nile-qr-code/nile-qr-code.css.esm.js +12 -0
- package/dist/nile-qr-code/nile-qr-code.esm.js +9 -0
- 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 +3 -3
- 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 +31 -6
- package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.cjs.js.map +1 -1
- package/dist/nile-rich-text-editor/nile-rte-select.esm.js +4 -3
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.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 +27 -8
- 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.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +5 -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 +18 -6
- 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 +17 -5
- package/dist/nile-virtual-select/nile-virtual-select.esm.js +5 -5
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js +13 -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 +96 -36
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.js +5 -5
- package/dist/src/nile-button/nile-button.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.css.js +64 -0
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +1 -0
- package/dist/src/nile-calendar/nile-calendar.js +30 -11
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-checkbox/nile-checkbox.css.js +4 -5
- package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
- package/dist/src/nile-chip/nile-chip.css.js +36 -21
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.css.js +10 -6
- package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.js +8 -1
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -1
- package/dist/src/nile-date-picker/nile-date-picker.d.ts +3 -0
- package/dist/src/nile-date-picker/nile-date-picker.js +22 -2
- package/dist/src/nile-date-picker/nile-date-picker.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-dropdown/nile-dropdown.d.ts +1 -0
- package/dist/src/nile-dropdown/nile-dropdown.js +11 -0
- package/dist/src/nile-dropdown/nile-dropdown.js.map +1 -1
- package/dist/src/nile-file-upload/utils/file-validation.util.js +11 -6
- package/dist/src/nile-file-upload/utils/file-validation.util.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js +28 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.css.js.map +1 -1
- package/dist/src/nile-filter-chip/nile-filter-chip.d.ts +1 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.js +6 -0
- package/dist/src/nile-filter-chip/nile-filter-chip.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-edit/nile-inline-edit.css.js +15 -6
- package/dist/src/nile-inline-edit/nile-inline-edit.css.js.map +1 -1
- package/dist/src/nile-inline-edit/nile-inline-edit.d.ts +2 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.js +7 -0
- package/dist/src/nile-inline-edit/nile-inline-edit.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 +15 -5
- 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 -2
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.js +1 -0
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-qr-code/index.d.ts +1 -0
- package/dist/src/nile-qr-code/index.js +2 -0
- package/dist/src/nile-qr-code/index.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.d.ts +15 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.js +678 -0
- package/dist/src/nile-qr-code/nile-qr-code-utils.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.d.ts +12 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.js +24 -0
- package/dist/src/nile-qr-code/nile-qr-code.css.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.d.ts +127 -0
- package/dist/src/nile-qr-code/nile-qr-code.js +381 -0
- package/dist/src/nile-qr-code/nile-qr-code.js.map +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.d.ts +1 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.js +719 -0
- package/dist/src/nile-qr-code/nile-qr-code.test.js.map +1 -0
- package/dist/src/nile-radio/nile-radio.css.js +3 -3
- 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 +31 -6
- 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.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +23 -7
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rte-select.d.ts +1 -0
- package/dist/src/nile-rich-text-editor/nile-rte-select.js +7 -2
- package/dist/src/nile-rich-text-editor/nile-rte-select.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +27 -8
- 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.css.js +5 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +1 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.css.js +18 -6
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +17 -5
- 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 +3 -2
- package/src/index.ts +2 -1
- package/src/nile-auto-complete/nile-auto-complete.css.ts +13 -0
- package/src/nile-auto-complete/nile-auto-complete.ts +1 -1
- package/src/nile-button/nile-button.css.ts +96 -36
- package/src/nile-button/nile-button.ts +6 -5
- package/src/nile-calendar/nile-calendar.css.ts +64 -0
- package/src/nile-calendar/nile-calendar.ts +23 -11
- package/src/nile-checkbox/nile-checkbox.css.ts +4 -5
- package/src/nile-chip/nile-chip.css.ts +36 -21
- package/src/nile-code-editor/nile-code-editor.css.ts +10 -6
- package/src/nile-code-editor/nile-code-editor.ts +8 -1
- package/src/nile-date-picker/nile-date-picker.ts +22 -2
- package/src/nile-detail/nile-detail.test.ts +6 -6
- package/src/nile-dropdown/nile-dropdown.ts +11 -0
- package/src/nile-file-upload/utils/file-validation.util.ts +10 -5
- package/src/nile-filter-chip/nile-filter-chip.css.ts +28 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +2 -0
- package/src/nile-icon/icons/svg/close.ts +1 -1
- package/src/nile-inline-edit/nile-inline-edit.css.ts +15 -6
- package/src/nile-inline-edit/nile-inline-edit.ts +4 -0
- 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 +15 -5
- package/src/nile-input/nile-input.ts +2 -0
- package/src/nile-link/nile-link.css.ts +3 -2
- package/src/nile-link/nile-link.ts +1 -0
- package/src/nile-qr-code/index.ts +1 -0
- package/src/nile-qr-code/nile-qr-code-utils.ts +733 -0
- package/src/nile-qr-code/nile-qr-code.css.ts +26 -0
- package/src/nile-qr-code/nile-qr-code.test.ts +879 -0
- package/src/nile-qr-code/nile-qr-code.ts +431 -0
- package/src/nile-radio/nile-radio.css.ts +3 -3
- 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 +31 -6
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +20 -7
- package/src/nile-rich-text-editor/nile-rte-select.ts +5 -2
- package/src/nile-select/nile-select.css.ts +27 -8
- package/src/nile-select/nile-select.ts +2 -2
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +5 -1
- package/src/nile-slide-toggle/nile-slide-toggle.ts +1 -0
- package/src/nile-textarea/nile-textarea.css.ts +18 -6
- package/src/nile-virtual-select/nile-virtual-select.css.ts +17 -5
- package/src/nile-virtual-select/nile-virtual-select.ts +2 -2
- package/vscode-html-custom-data.json +108 -6
- package/web-test-runner.config.mjs +7 -4
|
@@ -40,7 +40,7 @@ export const styles = css`
|
|
|
40
40
|
.form-control--has-label .form-control__label {
|
|
41
41
|
display: inline-block;
|
|
42
42
|
color: inherit;
|
|
43
|
-
margin-bottom: var(--nile-spacing-
|
|
43
|
+
margin-bottom: var(--nile-spacing-sm,var( --ng-spacing-sm));
|
|
44
44
|
color: var(--nile-colors-dark-900,var(--ng-colors-text-secondary-700));
|
|
45
45
|
font-family: var(--nile-font-family-serif,var( --ng-font-family-body));
|
|
46
46
|
font-size: var(--nile-type-scale-3,var(--ng-font-size-text-sm));
|
|
@@ -120,7 +120,7 @@ export const styles = css`
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
.nile-chip--disabled {
|
|
123
|
-
|
|
123
|
+
|
|
124
124
|
/* opacity: 0.5; */
|
|
125
125
|
cursor: not-allowed;
|
|
126
126
|
border-radius: var(--nile-radius-radius-xs,var(--ng-radius-md));
|
|
@@ -128,14 +128,18 @@ export const styles = css`
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
:host([disabled]) nile-tag::part(base) {
|
|
131
|
-
background-color: var(--nile-colors-
|
|
131
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-primary));
|
|
132
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
:host([disabled]) .nile-chip {
|
|
135
|
-
background-color: var(--nile-colors-
|
|
136
|
+
background-color: var(--nile-colors-dark-200 , var(--ng-colors-bg-disabled-subtle));
|
|
137
|
+
pointer-events: none;
|
|
136
138
|
}
|
|
137
139
|
|
|
138
|
-
|
|
140
|
+
.input--standard.input--disabled {
|
|
141
|
+
background-color: var(--nile-colors-dark-200,var(--ng-colors-bg-disabled-subtle));
|
|
142
|
+
}
|
|
139
143
|
|
|
140
144
|
.nile-chip.nile-chip--disabled {
|
|
141
145
|
background-color: var(--nile-colors-dark-200,var(--ng-colors-bg-disabled-subtle));
|
|
@@ -173,29 +177,40 @@ export const styles = css`
|
|
|
173
177
|
box-shadow: var(--nile-box-shadow-10);
|
|
174
178
|
}
|
|
175
179
|
|
|
176
|
-
.nile-chip
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
+
:host([disabled]) .nile-chip:hover {
|
|
181
|
+
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));
|
|
182
|
+
box-shadow: none;
|
|
183
|
+
}
|
|
180
184
|
|
|
181
|
-
.nile-chip__tags--focused::part(base) {
|
|
182
|
-
border: 1px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
183
|
-
gap: 2px;
|
|
184
185
|
|
|
185
|
-
|
|
186
|
+
.nile-chip.nile-chip--open:hover {
|
|
187
|
+
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-brand));
|
|
188
|
+
box-shadow: var(--nile-box-shadow-10, 0 0 0 1px var(--ng-colors-border-brand) inset ); /* Need to create token for it */
|
|
189
|
+
}
|
|
186
190
|
|
|
187
|
-
|
|
191
|
+
.nile-chip__tags--focused::part(base) {
|
|
192
|
+
border: 1px solid var(--nile-colors-primary-600, var(--ng-colors-border-brand));
|
|
193
|
+
gap: 2px;
|
|
194
|
+
}
|
|
188
195
|
|
|
189
|
-
nile-auto-complete::part(base)::before {
|
|
190
|
-
box-shadow: none;
|
|
191
|
-
}
|
|
196
|
+
nile-auto-complete::part(base)::before {
|
|
197
|
+
box-shadow: none;
|
|
198
|
+
}
|
|
192
199
|
|
|
193
|
-
:host([required]) .form-control--has-label .form-control__label::after {
|
|
200
|
+
:host([required]) .form-control--has-label .form-control__label::after {
|
|
194
201
|
content: '*';
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}
|
|
202
|
+
margin-inline-start: -2px;
|
|
203
|
+
color: var(--nile-colors-red-700, var(--ng-colors-text-error-primary-600));
|
|
204
|
+
}
|
|
198
205
|
|
|
206
|
+
:host([disabled]) {
|
|
207
|
+
cursor: not-allowed;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:host([disabled]) nile-auto-complete::part(base) {
|
|
211
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
212
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
213
|
+
}
|
|
199
214
|
`;
|
|
200
215
|
|
|
201
216
|
export default [styles];
|
|
@@ -39,14 +39,18 @@ export const styles = css`
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.disabled {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
43
|
+
border-color: var(--nile-colors-neutral-500, var(--ng-colors-border-disabled));
|
|
44
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
opacity: var(--nile-opacity-50, var(--ng-opacity-50));
|
|
47
|
+
user-select: none;
|
|
48
|
+
-webkit-user-select: none;
|
|
49
|
+
}
|
|
47
50
|
|
|
48
51
|
.disabled .cm-editor {
|
|
49
52
|
cursor: not-allowed;
|
|
53
|
+
pointer-events: none;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
.noborder {
|
|
@@ -77,7 +81,7 @@ export const styles = css`
|
|
|
77
81
|
z-index: 1;
|
|
78
82
|
padding: var(--nile-spacing-5px, var(--ng-spacing-none));
|
|
79
83
|
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
|
|
80
|
-
|
|
84
|
+
}
|
|
81
85
|
|
|
82
86
|
.code__editor__container:hover > .expand__icon__container{
|
|
83
87
|
display: flex;
|
|
@@ -291,6 +291,7 @@ export class NileCodeEditor extends NileElement {
|
|
|
291
291
|
'no-scroller': noScrollbar,
|
|
292
292
|
'disabled': this.disabled
|
|
293
293
|
})}
|
|
294
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
294
295
|
>
|
|
295
296
|
${this.expandable && !this.disabled
|
|
296
297
|
? html`
|
|
@@ -585,7 +586,13 @@ export class NileCodeEditor extends NileElement {
|
|
|
585
586
|
}
|
|
586
587
|
|
|
587
588
|
getReadOnlyExtension() {
|
|
588
|
-
|
|
589
|
+
if(this.readonly || this.disabled) {
|
|
590
|
+
return [
|
|
591
|
+
EditorState.readOnly.of(true),
|
|
592
|
+
EditorView.editable.of(false),
|
|
593
|
+
]
|
|
594
|
+
}
|
|
595
|
+
return [];
|
|
589
596
|
}
|
|
590
597
|
|
|
591
598
|
getSingleLineExtension() {
|
|
@@ -81,6 +81,8 @@ export class NileDatePicker extends NileElement {
|
|
|
81
81
|
|
|
82
82
|
@property({ type: Boolean, attribute: true, reflect: true }) portal = false;
|
|
83
83
|
|
|
84
|
+
@property({ type: Boolean, attribute: true, reflect: true }) disabled = false;
|
|
85
|
+
|
|
84
86
|
@query('nile-dropdown') dropdown: NileDropdown;
|
|
85
87
|
|
|
86
88
|
/**
|
|
@@ -116,6 +118,23 @@ export class NileDatePicker extends NileElement {
|
|
|
116
118
|
}
|
|
117
119
|
});
|
|
118
120
|
}
|
|
121
|
+
|
|
122
|
+
updated(changedProperties: Map<string, unknown>) {
|
|
123
|
+
super.updated(changedProperties);
|
|
124
|
+
if (changedProperties.has('disabled')) {
|
|
125
|
+
this.updateTriggerDisabledState();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
private updateTriggerDisabledState() {
|
|
131
|
+
const trigger = this.querySelector('[slot="trigger"]') as HTMLElement | null;
|
|
132
|
+
if (!trigger) return;
|
|
133
|
+
if ('disabled' in trigger) {
|
|
134
|
+
(trigger as any).disabled = this.disabled;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
119
138
|
|
|
120
139
|
private jumpTo(date: Date) {
|
|
121
140
|
this.open = true;
|
|
@@ -141,8 +160,8 @@ export class NileDatePicker extends NileElement {
|
|
|
141
160
|
|
|
142
161
|
render(): TemplateResult {
|
|
143
162
|
return html`
|
|
144
|
-
<nile-dropdown .open="${this.open}" part="dd-base" .hoist="${true}" distance="6" exportparts="base" .portal="${this.portal}">
|
|
145
|
-
<slot slot="trigger" part="trigger" name="trigger"></slot>
|
|
163
|
+
<nile-dropdown ?disabled="${this.disabled}" .open="${this.open}" part="dd-base" .hoist="${true}" distance="6" exportparts="base" .portal="${this.portal}">
|
|
164
|
+
<slot slot="trigger" part="trigger" name="trigger"></slot>
|
|
146
165
|
|
|
147
166
|
<nile-calendar
|
|
148
167
|
.hideTypes="${this.hideTypes}"
|
|
@@ -179,6 +198,7 @@ export class NileDatePicker extends NileElement {
|
|
|
179
198
|
|
|
180
199
|
const detail = event.detail;
|
|
181
200
|
const triggerInput = this.querySelector("nile-input");
|
|
201
|
+
if (this.disabled) return;
|
|
182
202
|
|
|
183
203
|
if (!this.range) {
|
|
184
204
|
const picked = detail.value;
|
|
@@ -58,7 +58,7 @@ describe('NileDetail', () => {
|
|
|
58
58
|
it('35. summary has aria-disabled true when disabled', async () => { const el = await fixture<NileDetail>(html`<nile-detail disabled></nile-detail>`); expect(el.shadowRoot!.querySelector('summary')!.getAttribute('aria-disabled')).to.equal('true'); });
|
|
59
59
|
it('36. summary has tabindex 0 when enabled', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('summary')!.getAttribute('tabindex')).to.equal('0'); });
|
|
60
60
|
it('37. summary has tabindex -1 when disabled', async () => { const el = await fixture<NileDetail>(html`<nile-detail disabled></nile-detail>`); expect(el.shadowRoot!.querySelector('summary')!.getAttribute('tabindex')).to.equal('-1'); });
|
|
61
|
-
it('38. label slot
|
|
61
|
+
it('38. label slot exists', async () => { const el = await fixture<NileDetail>(html`<nile-detail heading="Apps"></nile-detail>`); expect(el.shadowRoot!.querySelector('slot[name="label"]')).to.exist; });
|
|
62
62
|
it('39. summary has aria-expanded false when closed', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('summary')!.getAttribute('aria-expanded')).to.equal('false'); });
|
|
63
63
|
it('40. summary-icon container has aria-hidden true', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('.detail__summary-icon')!.getAttribute('aria-hidden')).to.equal('true'); });
|
|
64
64
|
|
|
@@ -71,8 +71,8 @@ describe('NileDetail', () => {
|
|
|
71
71
|
|
|
72
72
|
/* Slots */
|
|
73
73
|
|
|
74
|
-
it('45. has header-
|
|
75
|
-
it('46. has icon slot', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('slot[name="icon"]')).to.exist; });
|
|
74
|
+
it('45. has header-actions slot', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('slot[name="header-actions"]')).to.exist; });
|
|
75
|
+
it('46. has expand-icon slot', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('slot[name="expand-icon"]')).to.exist; });
|
|
76
76
|
it('47. has default slot for content', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.shadowRoot!.querySelector('slot:not([name])')).to.exist; });
|
|
77
77
|
it('48. user can slot custom heading markup', async () => { const el = await fixture<NileDetail>(html`<nile-detail><div slot="header-description"><strong>Custom</strong></div></nile-detail>`); expect(el.querySelector('[slot="header-description"]')).to.exist; });
|
|
78
78
|
it('49. user can slot custom icon', async () => { const el = await fixture<NileDetail>(html`<nile-detail><span slot="icon">▶</span></nile-detail>`); expect(el.querySelector('[slot="icon"]')).to.exist; });
|
|
@@ -82,7 +82,7 @@ describe('NileDetail', () => {
|
|
|
82
82
|
|
|
83
83
|
it('51. body is hidden when initially closed', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.body.hidden).to.be.true; });
|
|
84
84
|
it('52. body is visible when initially open', async () => { const el = await fixture<NileDetail>(html`<nile-detail open></nile-detail>`); expect(el.body.hidden).to.be.false; });
|
|
85
|
-
it('53. body height is 0 when initially closed', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.body.style.height).to.equal('
|
|
85
|
+
it('53. body height is 0 when initially closed', async () => { const el = await fixture<NileDetail>(html`<nile-detail></nile-detail>`); expect(el.body.style.height).to.equal('0px'); });
|
|
86
86
|
it('54. body height is auto when initially open', async () => { const el = await fixture<NileDetail>(html`<nile-detail open></nile-detail>`); expect(el.body.style.height).to.equal('auto'); });
|
|
87
87
|
|
|
88
88
|
/* show() and hide() methods */
|
|
@@ -105,8 +105,8 @@ describe('NileDetail', () => {
|
|
|
105
105
|
|
|
106
106
|
/* Cancelable events */
|
|
107
107
|
|
|
108
|
-
it('67. canceling nile-show
|
|
109
|
-
it('68. canceling nile-hide
|
|
108
|
+
it('67. canceling nile-show emits prevented event', async () => { const el = await fixture<NileDetail>(html`<nile-detail heading="T"><p>C</p></nile-detail>`); let showPrevented = false; el.addEventListener('nile-show', (e: Event) => { e.preventDefault(); showPrevented = true; }); el.show(); await aTimeout(500); expect(showPrevented).to.be.true; });
|
|
109
|
+
it('68. canceling nile-hide emits prevented event', async () => { const el = await fixture<NileDetail>(html`<nile-detail heading="T" open><p>C</p></nile-detail>`); let hidePrevented = false; el.addEventListener('nile-hide', (e: Event) => { e.preventDefault(); hidePrevented = true; }); el.hide(); await aTimeout(500); expect(hidePrevented).to.be.true; });
|
|
110
110
|
|
|
111
111
|
/* Disabled prevents interaction */
|
|
112
112
|
|
|
@@ -443,6 +443,17 @@ export class NileDropdown extends NileElement {
|
|
|
443
443
|
this.portalManager = null;
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
+
if (changedProperties.has('disabled')) {
|
|
447
|
+
this.updateTriggerDisabledState();
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
private updateTriggerDisabledState() {
|
|
452
|
+
const trigger = this.querySelector('[slot="trigger"]') as HTMLElement | null;
|
|
453
|
+
if (!trigger) return;
|
|
454
|
+
if ('disabled' in trigger) {
|
|
455
|
+
(trigger as any).disabled = this.disabled;
|
|
456
|
+
}
|
|
446
457
|
}
|
|
447
458
|
|
|
448
459
|
@watch('open', { waitUntilFirstUpdate: true })
|
|
@@ -85,13 +85,18 @@ export const setUpDragHandler = (
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
let updatedFiles = [];
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
if(nileFileUpload.allowedTypes.length > 0) {
|
|
89
|
+
for (const file of newFiles) {
|
|
90
|
+
if(nileFileUpload.allowedTypes.includes(file.type)) {
|
|
91
|
+
updatedFiles.push(file);
|
|
92
|
+
} else {
|
|
93
|
+
nileFileUpload.errorMessage = FileUploadError.INVALID_FORMAT;
|
|
94
|
+
}
|
|
93
95
|
}
|
|
94
96
|
}
|
|
97
|
+
if(updatedFiles.length === 0) {
|
|
98
|
+
updatedFiles = newFiles;
|
|
99
|
+
}
|
|
95
100
|
|
|
96
101
|
nileFileUpload.uploadedFiles = [...uploadedFiles, ...updatedFiles];
|
|
97
102
|
nileFileUpload.requestUpdate();
|
|
@@ -146,6 +146,34 @@ nile-badge::part(content) {
|
|
|
146
146
|
line-height: 20px;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
:host([disabled]) .chip {
|
|
150
|
+
background-color: var(--nile-colors-white-base, var(--ng-colors-bg-disabled-subtle));
|
|
151
|
+
border-color: var(--nile-colors-neutral-400, var(--ng-colors-border-disabled));
|
|
152
|
+
color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary-700));
|
|
153
|
+
cursor: not-allowed;
|
|
154
|
+
opacity: var(--nile-opacity-100, var(--ng-opacity-50));
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
:host([disabled]) .label {
|
|
158
|
+
color: var(--nile-colors-neutral-500, var(--ng-colors-text-secondary-700));
|
|
159
|
+
font-family:colfax-regular;
|
|
160
|
+
user-select: none;
|
|
161
|
+
-webkit-user-select: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:host([disabled]) .value {
|
|
165
|
+
color: var(--nile-colors-primary-500, var(--ng-colors-text-brand-secondary-700));
|
|
166
|
+
user-select: none;
|
|
167
|
+
-webkit-user-select: none;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:host([disabled]) nile-badge::part(base) {
|
|
171
|
+
background-color: var(--nile-colors-primary-500,var(--ng-colors-text-brand-secondary-700));
|
|
172
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
173
|
+
user-select: none;
|
|
174
|
+
-webkit-user-select: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
149
177
|
`;
|
|
150
178
|
|
|
151
179
|
export default [styles];
|
|
@@ -18,6 +18,7 @@ export class NileFilterChip extends NileElement {
|
|
|
18
18
|
@property({ type: String }) icon = '';
|
|
19
19
|
@property({ type: String }) removeIcon = '';
|
|
20
20
|
@property({ type: Boolean, reflect: true }) active = false;
|
|
21
|
+
@property({type:Boolean, reflect:true}) disabled = false;
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
private static activeChips: NileFilterChip[] = [];
|
|
@@ -55,6 +56,7 @@ export class NileFilterChip extends NileElement {
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
private handleClick() {
|
|
59
|
+
if (this.disabled) return;
|
|
58
60
|
this.dispatchEvent(
|
|
59
61
|
new CustomEvent('nile-click', { detail: { value: this.value, viewMoreCount: this.viewMoreCount } })
|
|
60
62
|
);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Do not edit directly
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
export default "
|
|
5
|
+
export default "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDE0IDE0IiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi42NzM0IDEyTDIgMTEuMzI2Nkw2LjMyNjc5IDdMMiAyLjY3MzRMMi42NzM0IDJMNyA2LjMyNjc5TDExLjMyNjYgMkwxMiAyLjY3MzRMNy42NzMyMSA3TDEyIDExLjMyNjZMMTEuMzI2NiAxMkw3IDcuNjczMjFMMi42NzM0IDEyWiIgZmlsbD0iYmxhY2siLz48L3N2Zz4=";
|
|
@@ -25,7 +25,7 @@ export const styles = css`
|
|
|
25
25
|
font-style: normal;
|
|
26
26
|
font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-medium));
|
|
27
27
|
line-height: var(--nile-line-height-small, var(--ng-line-height-text-sm));
|
|
28
|
-
margin-bottom: var(--nile-spacing-sm);
|
|
28
|
+
margin-bottom: var(--nile-spacing-sm, var(--ng-spacing-sm));
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.inline__edit--open--container {
|
|
@@ -40,23 +40,32 @@ export const styles = css`
|
|
|
40
40
|
min-width: var(--nile-width-width-xxs, var(--ng-width-80));
|
|
41
41
|
min-height: var(--nile-height-40px, var(--ng-height-40px));
|
|
42
42
|
height: auto;
|
|
43
|
-
padding-top: var(--nile-spacing-spacing-
|
|
44
|
-
padding-bottom: var(--nile-spacing-spacing-
|
|
43
|
+
padding-top: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
|
|
44
|
+
padding-bottom: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
|
|
45
45
|
padding-left: var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
|
|
46
46
|
padding-right:var(--nile-spacing-spacing-lg, var(--ng-spacing-lg));
|
|
47
47
|
border-radius: var(--nile-radius-radius-xs, var(--ng-radius-md));
|
|
48
48
|
color: var(--nile-inline-edit-font-color, var(--ng-colors-text-quaternary-500));
|
|
49
|
-
font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
|
|
50
|
-
font-size: var(--nile-type-scale-
|
|
49
|
+
font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));
|
|
50
|
+
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-md));
|
|
51
51
|
font-style: normal;
|
|
52
52
|
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
53
53
|
line-height: var(--nile-spacing-spacing-3xl, var(--ng-line-height-text-md));
|
|
54
54
|
word-wrap: break-word;
|
|
55
|
+
width: 100%;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.inline__edit--container:hover {
|
|
58
|
-
background-color:var(--nile-inline-edit-hover-background-color, var(--ng-colors-bg-secondary-hover));
|
|
59
|
+
background-color: var(--nile-inline-edit-hover-background-color, var(--ng-colors-bg-secondary-hover));
|
|
59
60
|
}
|
|
61
|
+
|
|
62
|
+
:host([disabled]) .inline__edit--container,
|
|
63
|
+
:host([disabled]) .inline__edit--container:hover {
|
|
64
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
65
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
66
|
+
cursor: not-allowed;
|
|
67
|
+
}
|
|
68
|
+
|
|
60
69
|
`;
|
|
61
70
|
|
|
62
71
|
export default [styles];
|
|
@@ -55,6 +55,9 @@ export class NileInlineEdit extends NileElement {
|
|
|
55
55
|
/** Enables automatic closing when focus moves outside the component or when clicking outside */
|
|
56
56
|
@property({ type: Boolean, attribute: 'auto-close' }) autoClose: boolean = false;
|
|
57
57
|
|
|
58
|
+
/** Disables the inline edit, preventing it from being opened */
|
|
59
|
+
@property({ type: Boolean, reflect: true}) disabled: boolean = false;
|
|
60
|
+
|
|
58
61
|
/* #endregion */
|
|
59
62
|
|
|
60
63
|
/* #region Methods */
|
|
@@ -109,6 +112,7 @@ export class NileInlineEdit extends NileElement {
|
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
private handleClick() {
|
|
115
|
+
if (this.disabled) return;
|
|
112
116
|
this.open = true;
|
|
113
117
|
}
|
|
114
118
|
public render(): TemplateResult {
|
|
@@ -19,7 +19,7 @@ describe('NileInlineSidebarGroup', () => {
|
|
|
19
19
|
it('13. default slot', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group></nile-inline-sidebar-group>`); expect(el.shadowRoot!.querySelector('slot:not([name])')).to.exist; });
|
|
20
20
|
it('14. label slot when label set', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group label="L"></nile-inline-sidebar-group>`); expect(el.shadowRoot!.querySelector('slot[name="label"]')).to.exist; });
|
|
21
21
|
it('15. dynamic label on', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group></nile-inline-sidebar-group>`); el.label = 'New'; await el.updateComplete; expect(el.shadowRoot!.querySelector('.group-label')).to.exist; });
|
|
22
|
-
it('16. dynamic label cleared', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group label="Old"></nile-inline-sidebar-group>`); el.label = ''; await el.updateComplete; expect(el.
|
|
22
|
+
it('16. dynamic label cleared', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group label="Old"></nile-inline-sidebar-group>`); el.label = ''; await el.updateComplete; expect(el.label).to.equal(''); });
|
|
23
23
|
it('17. dynamic divider on', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group></nile-inline-sidebar-group>`); el.divider = true; await el.updateComplete; expect(el.hasAttribute('divider')).to.be.true; });
|
|
24
24
|
it('18. dynamic divider off', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group divider></nile-inline-sidebar-group>`); el.divider = false; await el.updateComplete; expect(el.hasAttribute('divider')).to.be.false; });
|
|
25
25
|
it('19. slotted item', async () => { const el = await fixture<NileInlineSidebarGroup>(html`<nile-inline-sidebar-group><nile-inline-sidebar-item>A</nile-inline-sidebar-item></nile-inline-sidebar-group>`); expect(el.querySelector('nile-inline-sidebar-item')).to.exist; });
|
|
@@ -13,7 +13,7 @@ describe('NileInlineSidebarItem', () => {
|
|
|
13
13
|
it('7. tooltip defaults false', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); expect(el.tooltip).to.be.false; });
|
|
14
14
|
it('8. set active', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item active></nile-inline-sidebar-item>`); expect(el.active).to.be.true; });
|
|
15
15
|
it('9. set disabled', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item disabled></nile-inline-sidebar-item>`); expect(el.disabled).to.be.true; });
|
|
16
|
-
it('10. set href', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="
|
|
16
|
+
it('10. set href', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="#"></nile-inline-sidebar-item>`); expect(el.href).to.equal('#'); });
|
|
17
17
|
it('11. set tooltip', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item tooltip></nile-inline-sidebar-item>`); expect(el.tooltip).to.be.true; });
|
|
18
18
|
it('12. active reflects', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item active></nile-inline-sidebar-item>`); expect(el.hasAttribute('active')).to.be.true; });
|
|
19
19
|
it('13. disabled reflects', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item disabled></nile-inline-sidebar-item>`); expect(el.hasAttribute('disabled')).to.be.true; });
|
|
@@ -22,12 +22,12 @@ describe('NileInlineSidebarItem', () => {
|
|
|
22
22
|
it('16. item role menuitem', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); const item = el.shadowRoot!.querySelector('.item'); expect(item!.getAttribute('role')).to.equal('menuitem'); });
|
|
23
23
|
it('17. host tabindex 0', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); expect(el.getAttribute('tabindex')).to.equal('0'); });
|
|
24
24
|
it('18. default slot', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); expect(el.shadowRoot!.querySelector('slot')).to.exist; });
|
|
25
|
-
it('19. href renders anchor', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="
|
|
25
|
+
it('19. href renders anchor', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="#">Link</nile-inline-sidebar-item>`); expect(el.shadowRoot!.querySelector('a')).to.exist; });
|
|
26
26
|
it('20. no anchor without href', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item>Text</nile-inline-sidebar-item>`); expect(el.shadowRoot!.querySelector('a')).to.be.null; });
|
|
27
|
-
it('21. anchor href value', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="
|
|
27
|
+
it('21. anchor href value', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="#">Link</nile-inline-sidebar-item>`); const a = el.shadowRoot!.querySelector('a') as HTMLAnchorElement; expect(a.getAttribute('href')).to.equal('#'); });
|
|
28
28
|
it('22. click emits nile-click', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item>Test</nile-inline-sidebar-item>`); let detail: any; el.addEventListener('nile-click', ((e: CustomEvent) => { detail = e.detail; }) as EventListener); (el.shadowRoot!.querySelector('.item') as HTMLElement).click(); expect(detail).to.exist; expect(detail.item).to.equal(el); });
|
|
29
29
|
it('23. click event has text', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item>Dashboard</nile-inline-sidebar-item>`); let detail: any; el.addEventListener('nile-click', ((e: CustomEvent) => { detail = e.detail; }) as EventListener); (el.shadowRoot!.querySelector('.item') as HTMLElement).click(); expect(detail.text).to.equal('Dashboard'); });
|
|
30
|
-
it('24. click event has href', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="
|
|
30
|
+
it('24. click event has href', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item href="#">Link</nile-inline-sidebar-item>`); let detail: any; el.addEventListener('nile-click', ((e: CustomEvent) => { detail = e.detail; }) as EventListener); (el.shadowRoot!.querySelector('.item') as HTMLElement).click(); expect(detail.href).to.equal('#'); });
|
|
31
31
|
it('25. disabled prevents click event', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item disabled>Test</nile-inline-sidebar-item>`); let fired = false; el.addEventListener('nile-click', () => { fired = true; }); (el.shadowRoot!.querySelector('.item') as HTMLElement).click(); expect(fired).to.be.false; });
|
|
32
32
|
it('26. dynamic active on', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); el.active = true; await el.updateComplete; expect(el.hasAttribute('active')).to.be.true; });
|
|
33
33
|
it('27. dynamic active off', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item active></nile-inline-sidebar-item>`); el.active = false; await el.updateComplete; expect(el.hasAttribute('active')).to.be.false; });
|
|
@@ -103,5 +103,5 @@ describe('NileInlineSidebarItem', () => {
|
|
|
103
103
|
it('97. rapid disabled toggles', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); el.disabled = true; await el.updateComplete; el.disabled = false; await el.updateComplete; el.disabled = true; await el.updateComplete; expect(el.disabled).to.be.true; });
|
|
104
104
|
it('98. no h1', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); expect(el.shadowRoot!.querySelector('h1')).to.be.null; });
|
|
105
105
|
it('99. no pre', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item></nile-inline-sidebar-item>`); expect(el.shadowRoot!.querySelector('pre')).to.be.null; });
|
|
106
|
-
it('100. full integration', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item active href="
|
|
106
|
+
it('100. full integration', async () => { const el = await fixture<NileInlineSidebarItem>(html`<nile-inline-sidebar-item active href="#" class="i" id="i1" aria-label="Dashboard">Dashboard</nile-inline-sidebar-item>`); expect(el.active).to.be.true; expect(el.href).to.equal('#'); expect(el.id).to.equal('i1'); expect(el.getAttribute('aria-label')).to.equal('Dashboard'); expect(el.textContent).to.contain('Dashboard'); expect(el.shadowRoot!.querySelector('.item')).to.exist; expect(el.shadowRoot!.querySelector('a')).to.exist; });
|
|
107
107
|
});
|
|
@@ -72,6 +72,10 @@ export const styles = css`
|
|
|
72
72
|
.form-control--has-label.form-control--medium .form-control__label {
|
|
73
73
|
font-size: var(--nile-type-scale-3, var(--ng-font-size-text-sm));
|
|
74
74
|
}
|
|
75
|
+
:host([disabled]) .form-control--has-label .form-control__label {
|
|
76
|
+
user-select: none;
|
|
77
|
+
-webkit-user-select: none;
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
:host([required]) .form-control--has-label .form-control__label::after {
|
|
77
81
|
content: '*';
|
|
@@ -194,18 +198,25 @@ export const styles = css`
|
|
|
194
198
|
}
|
|
195
199
|
|
|
196
200
|
.input--standard.input--disabled {
|
|
197
|
-
background-color: var(--nile-colors-
|
|
201
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
198
202
|
border-color: var(--nile-colors-neutral-500,var(--ng-colors-border-disabled));
|
|
199
203
|
/* opacity: 0.5; */
|
|
200
204
|
cursor: not-allowed;
|
|
205
|
+
user-select: none;
|
|
206
|
+
-webkit-user-select: none;
|
|
201
207
|
}
|
|
202
208
|
|
|
203
209
|
.input--standard.input--disabled .input__control {
|
|
204
|
-
color: var(--nile-colors-
|
|
210
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
211
|
+
user-select: none;
|
|
212
|
+
-webkit-user-select: none;
|
|
213
|
+
pointer-events: none;
|
|
214
|
+
|
|
205
215
|
}
|
|
206
216
|
|
|
207
217
|
.input--standard.input--disabled .input__control::placeholder {
|
|
208
|
-
color: var(--nile-
|
|
218
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
219
|
+
background:var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
209
220
|
}
|
|
210
221
|
|
|
211
222
|
.input--standard.input--warning {
|
|
@@ -261,7 +272,6 @@ export const styles = css`
|
|
|
261
272
|
|
|
262
273
|
.input--filled.input--disabled {
|
|
263
274
|
background-color: var(--nile-colors-dark-100);
|
|
264
|
-
opacity: 0.5;
|
|
265
275
|
cursor: not-allowed;
|
|
266
276
|
}
|
|
267
277
|
|
|
@@ -335,7 +345,7 @@ export const styles = css`
|
|
|
335
345
|
.input__control::placeholder {
|
|
336
346
|
color: var(--nile-colors-dark-500, var(--ng-colors-text-placeholder));
|
|
337
347
|
user-select: none;
|
|
338
|
-
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-
|
|
348
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
339
349
|
}
|
|
340
350
|
|
|
341
351
|
.input:hover:not(.input--disabled) .input__control {
|
|
@@ -602,6 +602,7 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
|
602
602
|
}
|
|
603
603
|
name=${ifDefined(this.name)}
|
|
604
604
|
?disabled=${this.disabled}
|
|
605
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
605
606
|
?readonly=${this.readonly}
|
|
606
607
|
?required=${this.required}
|
|
607
608
|
placeholder=${ifDefined(this.placeholder)}
|
|
@@ -742,6 +743,7 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
|
742
743
|
title=${this.title}
|
|
743
744
|
name=${ifDefined(this.name)}
|
|
744
745
|
?disabled=${this.disabled}
|
|
746
|
+
tabindex=${this.disabled ? '-1' : '0'}
|
|
745
747
|
?readonly=${this.readonly}
|
|
746
748
|
?required=${this.required}
|
|
747
749
|
placeholder=${ifDefined(this.placeholder)}
|
|
@@ -45,9 +45,10 @@ export const styles = css`
|
|
|
45
45
|
|
|
46
46
|
.link--disabled {
|
|
47
47
|
color: var(--nile-colors-primary-500, var(--ng-colors-text-tertiary-600));
|
|
48
|
-
cursor: not-allowed;
|
|
49
48
|
pointer-events: none;
|
|
50
|
-
|
|
49
|
+
}
|
|
50
|
+
:host([disabled]) {
|
|
51
|
+
cursor: not-allowed;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
.link.link--disabled:not(.link__button) .link__label {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileQrCode } from './nile-qr-code';
|