@aquera/nile-elements 1.5.5 → 1.5.6
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 +4 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.js +465 -238
- 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 +13 -2
- 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 +89 -33
- 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 +59 -2
- package/dist/nile-calendar/nile-calendar.esm.js +16 -10
- 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 +37 -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 +7 -6
- package/dist/nile-code-editor/nile-code-editor.esm.js +1 -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 +24 -2
- package/dist/nile-filter-chip/nile-filter-chip.esm.js +2 -2
- 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.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 +4 -4
- 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 -4
- 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.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 +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 +25 -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.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 +7 -4
- 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-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 +10 -5
- 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 +5 -3
- 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 +11 -0
- package/dist/src/nile-auto-complete/nile-auto-complete.css.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +89 -33
- 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 +57 -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 +24 -6
- 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 +35 -21
- package/dist/src/nile-chip/nile-chip.css.js.map +1 -1
- package/dist/src/nile-code-editor/nile-code-editor.css.js +7 -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 +7 -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-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 +22 -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-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-input/nile-input.css.js +4 -4
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.css.js +1 -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 +1 -1
- package/dist/src/nile-radio/nile-radio.css.js.map +1 -1
- package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +25 -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 +17 -6
- 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 +7 -4
- package/dist/src/nile-select/nile-select.css.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-textarea/nile-textarea.css.js +10 -5
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js +5 -3
- package/dist/src/nile-virtual-select/nile-virtual-select.css.js.map +1 -1
- package/dist/src/version.js +1 -1
- 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 +11 -0
- package/src/nile-button/nile-button.css.ts +89 -33
- package/src/nile-button/nile-button.ts +6 -5
- package/src/nile-calendar/nile-calendar.css.ts +57 -0
- package/src/nile-calendar/nile-calendar.ts +17 -6
- package/src/nile-checkbox/nile-checkbox.css.ts +4 -5
- package/src/nile-chip/nile-chip.css.ts +35 -21
- package/src/nile-code-editor/nile-code-editor.css.ts +7 -6
- package/src/nile-code-editor/nile-code-editor.ts +7 -1
- package/src/nile-date-picker/nile-date-picker.ts +22 -2
- 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 +22 -0
- package/src/nile-filter-chip/nile-filter-chip.ts +2 -0
- 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-input/nile-input.css.ts +4 -4
- package/src/nile-link/nile-link.css.ts +1 -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 +1 -1
- package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +25 -6
- package/src/nile-rich-text-editor/nile-rich-text-editor.ts +14 -6
- package/src/nile-rich-text-editor/nile-rte-select.ts +5 -2
- package/src/nile-select/nile-select.css.ts +7 -4
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +5 -1
- package/src/nile-textarea/nile-textarea.css.ts +10 -5
- package/src/nile-virtual-select/nile-virtual-select.css.ts +5 -3
- package/vscode-html-custom-data.json +108 -6
- package/web-test-runner.config.mjs +1 -1
|
@@ -585,7 +585,13 @@ export class NileCodeEditor extends NileElement {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
getReadOnlyExtension() {
|
|
588
|
-
|
|
588
|
+
if(this.readonly || this.disabled) {
|
|
589
|
+
return [
|
|
590
|
+
EditorState.readOnly.of(true),
|
|
591
|
+
EditorView.editable.of(false),
|
|
592
|
+
]
|
|
593
|
+
}
|
|
594
|
+
return [];
|
|
589
595
|
}
|
|
590
596
|
|
|
591
597
|
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;
|
|
@@ -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,28 @@ 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
|
+
}
|
|
161
|
+
|
|
162
|
+
:host([disabled]) .value {
|
|
163
|
+
color: var(--nile-colors-primary-500, var(--ng-colors-text-brand-secondary-700));
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host([disabled]) nile-badge::part(base) {
|
|
167
|
+
background-color: var(--nile-colors-primary-500,var(--ng-colors-text-brand-secondary-700));
|
|
168
|
+
color: var(--nile-colors-white-base, var(--ng-colors-text-white));
|
|
169
|
+
}
|
|
170
|
+
|
|
149
171
|
`;
|
|
150
172
|
|
|
151
173
|
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
|
);
|
|
@@ -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 {
|
|
@@ -194,7 +194,7 @@ export const styles = css`
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
.input--standard.input--disabled {
|
|
197
|
-
background-color: var(--nile-colors-
|
|
197
|
+
background-color: var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
198
198
|
border-color: var(--nile-colors-neutral-500,var(--ng-colors-border-disabled));
|
|
199
199
|
/* opacity: 0.5; */
|
|
200
200
|
cursor: not-allowed;
|
|
@@ -205,7 +205,8 @@ export const styles = css`
|
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
.input--standard.input--disabled .input__control::placeholder {
|
|
208
|
-
color: var(--nile-
|
|
208
|
+
color: var(--nile-colors-dark-500, var(--ng-colors-text-disabled));
|
|
209
|
+
background:var(--nile-colors-dark-200, var(--ng-colors-bg-disabled-subtle));
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
.input--standard.input--warning {
|
|
@@ -261,7 +262,6 @@ export const styles = css`
|
|
|
261
262
|
|
|
262
263
|
.input--filled.input--disabled {
|
|
263
264
|
background-color: var(--nile-colors-dark-100);
|
|
264
|
-
opacity: 0.5;
|
|
265
265
|
cursor: not-allowed;
|
|
266
266
|
}
|
|
267
267
|
|
|
@@ -335,7 +335,7 @@ export const styles = css`
|
|
|
335
335
|
.input__control::placeholder {
|
|
336
336
|
color: var(--nile-colors-dark-500, var(--ng-colors-text-placeholder));
|
|
337
337
|
user-select: none;
|
|
338
|
-
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-
|
|
338
|
+
font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-regular));
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
.input:hover:not(.input--disabled) .input__control {
|
|
@@ -46,8 +46,7 @@ export const styles = css`
|
|
|
46
46
|
.link--disabled {
|
|
47
47
|
color: var(--nile-colors-primary-500, var(--ng-colors-text-tertiary-600));
|
|
48
48
|
cursor: not-allowed;
|
|
49
|
-
|
|
50
|
-
opacity: 0.6;
|
|
49
|
+
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
.link.link--disabled:not(.link__button) .link__label {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NileQrCode } from './nile-qr-code';
|