tyrell-components 1.0.0-RC16 → 1.0.0-RC18
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 +1 -1
- package/css/tyrell-colors-static.css +1 -316
- package/css/tyrell-theme.css +1 -1471
- package/css/tyrell.css +1 -1385
- package/dist/tyrell-colors-static.css +1 -1
- package/dist/tyrell-theme.css +1 -1
- package/dist/tyrell.js +1 -1
- package/lib/base/ty-component.d.ts +28 -15
- package/lib/base/ty-component.js +81 -38
- package/lib/components/button.d.ts +14 -0
- package/lib/components/button.js +55 -7
- package/lib/components/calendar-month.d.ts +7 -1
- package/lib/components/calendar-month.js +35 -28
- package/lib/components/calendar-navigation.js +19 -6
- package/lib/components/calendar.d.ts +27 -3
- package/lib/components/calendar.js +107 -63
- package/lib/components/checkbox.d.ts +8 -1
- package/lib/components/checkbox.js +27 -6
- package/lib/components/copy.d.ts +2 -0
- package/lib/components/copy.js +15 -31
- package/lib/components/date-picker.d.ts +53 -18
- package/lib/components/date-picker.js +217 -146
- package/lib/components/file-upload.d.ts +4 -1
- package/lib/components/file-upload.js +23 -5
- package/lib/components/input.d.ts +73 -3
- package/lib/components/input.js +158 -22
- package/lib/components/modal.d.ts +2 -0
- package/lib/components/modal.js +97 -17
- package/lib/components/option.d.ts +19 -0
- package/lib/components/option.js +45 -31
- package/lib/components/popup.js +115 -15
- package/lib/components/radio.d.ts +10 -1
- package/lib/components/radio.js +22 -29
- package/lib/components/resize-observer.js +2 -0
- package/lib/components/scroll-container.js +2 -0
- package/lib/components/select.d.ts +150 -190
- package/lib/components/select.js +501 -796
- package/lib/components/selected-tags.d.ts +14 -4
- package/lib/components/selected-tags.js +35 -8
- package/lib/components/switch.d.ts +9 -1
- package/lib/components/switch.js +27 -6
- package/lib/components/tabs.js +1 -1
- package/lib/components/tag.d.ts +0 -9
- package/lib/components/tag.js +0 -11
- package/lib/components/textarea.d.ts +47 -2
- package/lib/components/textarea.js +81 -17
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/styles/button.js +21 -19
- package/lib/styles/calendar-month.js +1 -1
- package/lib/styles/calendar.js +3 -0
- package/lib/styles/checkbox.js +11 -5
- package/lib/styles/date-picker.js +16 -4
- package/lib/styles/file-upload.d.ts +1 -1
- package/lib/styles/file-upload.js +3 -3
- package/lib/styles/icon.d.ts +1 -1
- package/lib/styles/icon.js +2 -2
- package/lib/styles/input.js +6 -10
- package/lib/styles/option.d.ts +1 -1
- package/lib/styles/option.js +6 -7
- package/lib/styles/popup.d.ts +1 -1
- package/lib/styles/popup.js +2 -0
- package/lib/styles/radio.js +12 -6
- package/lib/styles/select-base.js +22 -60
- package/lib/styles/select.d.ts +1 -1
- package/lib/styles/select.js +13 -2
- package/lib/styles/switch.js +10 -5
- package/lib/styles/tag.js +3 -5
- package/lib/styles/textarea.d.ts +1 -1
- package/lib/styles/textarea.js +7 -0
- package/lib/types/common.d.ts +3 -3
- package/lib/utils/calendar-utils.d.ts +49 -0
- package/lib/utils/calendar-utils.js +63 -6
- package/lib/utils/property-manager.d.ts +6 -5
- package/lib/utils/property-manager.js +14 -15
- package/lib/utils/scroll-lock.d.ts +10 -4
- package/lib/utils/scroll-lock.js +102 -2
- package/lib/utils/upgrade-properties.d.ts +21 -0
- package/lib/utils/upgrade-properties.js +47 -0
- package/lib/utils/validity.d.ts +98 -2
- package/lib/utils/validity.js +244 -8
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -6
- package/lib/base/ty-component.d.ts.map +0 -1
- package/lib/base/ty-component.js.map +0 -1
- package/lib/components/button.d.ts.map +0 -1
- package/lib/components/button.js.map +0 -1
- package/lib/components/calendar-month.d.ts.map +0 -1
- package/lib/components/calendar-month.js.map +0 -1
- package/lib/components/calendar-navigation.d.ts.map +0 -1
- package/lib/components/calendar-navigation.js.map +0 -1
- package/lib/components/calendar.d.ts.map +0 -1
- package/lib/components/calendar.js.map +0 -1
- package/lib/components/checkbox.d.ts.map +0 -1
- package/lib/components/checkbox.js.map +0 -1
- package/lib/components/copy.d.ts.map +0 -1
- package/lib/components/copy.js.map +0 -1
- package/lib/components/date-picker.d.ts.map +0 -1
- package/lib/components/date-picker.js.map +0 -1
- package/lib/components/dropdown.d.ts +0 -403
- package/lib/components/dropdown.d.ts.map +0 -1
- package/lib/components/dropdown.js +0 -1315
- package/lib/components/dropdown.js.map +0 -1
- package/lib/components/icon.d.ts.map +0 -1
- package/lib/components/icon.js.map +0 -1
- package/lib/components/input.d.ts.map +0 -1
- package/lib/components/input.js.map +0 -1
- package/lib/components/modal.d.ts.map +0 -1
- package/lib/components/modal.js.map +0 -1
- package/lib/components/multiselect.d.ts +0 -389
- package/lib/components/multiselect.d.ts.map +0 -1
- package/lib/components/multiselect.js +0 -1301
- package/lib/components/multiselect.js.map +0 -1
- package/lib/components/option.d.ts.map +0 -1
- package/lib/components/option.js.map +0 -1
- package/lib/components/popup.d.ts.map +0 -1
- package/lib/components/popup.js.map +0 -1
- package/lib/components/resize-observer.d.ts.map +0 -1
- package/lib/components/resize-observer.js.map +0 -1
- package/lib/components/scroll-container.d.ts.map +0 -1
- package/lib/components/scroll-container.js.map +0 -1
- package/lib/components/step.d.ts.map +0 -1
- package/lib/components/step.js.map +0 -1
- package/lib/components/tab.d.ts.map +0 -1
- package/lib/components/tab.js.map +0 -1
- package/lib/components/tabs.d.ts.map +0 -1
- package/lib/components/tabs.js.map +0 -1
- package/lib/components/tag.d.ts.map +0 -1
- package/lib/components/tag.js.map +0 -1
- package/lib/components/textarea.d.ts.map +0 -1
- package/lib/components/textarea.js.map +0 -1
- package/lib/components/tooltip.d.ts.map +0 -1
- package/lib/components/tooltip.js.map +0 -1
- package/lib/components/wizard.d.ts.map +0 -1
- package/lib/components/wizard.js.map +0 -1
- package/lib/icons/fontawesome/brands.d.ts.map +0 -1
- package/lib/icons/fontawesome/brands.js.map +0 -1
- package/lib/icons/fontawesome/regular.d.ts.map +0 -1
- package/lib/icons/fontawesome/regular.js.map +0 -1
- package/lib/icons/fontawesome/solid.d.ts.map +0 -1
- package/lib/icons/fontawesome/solid.js.map +0 -1
- package/lib/icons/heroicons/micro.d.ts.map +0 -1
- package/lib/icons/heroicons/micro.js.map +0 -1
- package/lib/icons/heroicons/mini.d.ts.map +0 -1
- package/lib/icons/heroicons/mini.js.map +0 -1
- package/lib/icons/heroicons/outline.d.ts.map +0 -1
- package/lib/icons/heroicons/outline.js.map +0 -1
- package/lib/icons/heroicons/solid.d.ts.map +0 -1
- package/lib/icons/heroicons/solid.js.map +0 -1
- package/lib/icons/lucide.d.ts.map +0 -1
- package/lib/icons/lucide.js.map +0 -1
- package/lib/icons/material/filled.d.ts.map +0 -1
- package/lib/icons/material/filled.js.map +0 -1
- package/lib/icons/material/outlined.d.ts.map +0 -1
- package/lib/icons/material/outlined.js.map +0 -1
- package/lib/icons/material/round.d.ts.map +0 -1
- package/lib/icons/material/round.js.map +0 -1
- package/lib/icons/material/sharp.d.ts.map +0 -1
- package/lib/icons/material/sharp.js.map +0 -1
- package/lib/icons/material/two-tone.d.ts.map +0 -1
- package/lib/icons/material/two-tone.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/styles/button.d.ts.map +0 -1
- package/lib/styles/button.js.map +0 -1
- package/lib/styles/calendar-month.d.ts.map +0 -1
- package/lib/styles/calendar-month.js.map +0 -1
- package/lib/styles/calendar-navigation.d.ts.map +0 -1
- package/lib/styles/calendar-navigation.js.map +0 -1
- package/lib/styles/calendar.d.ts.map +0 -1
- package/lib/styles/calendar.js.map +0 -1
- package/lib/styles/copy.d.ts.map +0 -1
- package/lib/styles/copy.js.map +0 -1
- package/lib/styles/date-picker.d.ts.map +0 -1
- package/lib/styles/date-picker.js.map +0 -1
- package/lib/styles/dropdown.d.ts +0 -12
- package/lib/styles/dropdown.d.ts.map +0 -1
- package/lib/styles/dropdown.js +0 -725
- package/lib/styles/dropdown.js.map +0 -1
- package/lib/styles/icon.d.ts.map +0 -1
- package/lib/styles/icon.js.map +0 -1
- package/lib/styles/input.d.ts.map +0 -1
- package/lib/styles/input.js.map +0 -1
- package/lib/styles/modal.d.ts.map +0 -1
- package/lib/styles/modal.js.map +0 -1
- package/lib/styles/multiselect.d.ts +0 -6
- package/lib/styles/multiselect.d.ts.map +0 -1
- package/lib/styles/multiselect.js +0 -568
- package/lib/styles/multiselect.js.map +0 -1
- package/lib/styles/option.d.ts.map +0 -1
- package/lib/styles/option.js.map +0 -1
- package/lib/styles/popup.d.ts.map +0 -1
- package/lib/styles/popup.js.map +0 -1
- package/lib/styles/resize-observer.d.ts.map +0 -1
- package/lib/styles/resize-observer.js.map +0 -1
- package/lib/styles/scroll-container.d.ts.map +0 -1
- package/lib/styles/scroll-container.js.map +0 -1
- package/lib/styles/step.d.ts.map +0 -1
- package/lib/styles/step.js.map +0 -1
- package/lib/styles/tab.d.ts.map +0 -1
- package/lib/styles/tab.js.map +0 -1
- package/lib/styles/tabs.d.ts.map +0 -1
- package/lib/styles/tabs.js.map +0 -1
- package/lib/styles/tag.d.ts.map +0 -1
- package/lib/styles/tag.js.map +0 -1
- package/lib/styles/textarea.d.ts.map +0 -1
- package/lib/styles/textarea.js.map +0 -1
- package/lib/styles/tooltip.d.ts.map +0 -1
- package/lib/styles/tooltip.js.map +0 -1
- package/lib/styles/wizard.d.ts.map +0 -1
- package/lib/styles/wizard.js.map +0 -1
- package/lib/types/common.d.ts.map +0 -1
- package/lib/types/common.js.map +0 -1
- package/lib/utils/calendar-utils.d.ts.map +0 -1
- package/lib/utils/calendar-utils.js.map +0 -1
- package/lib/utils/icon-registry.d.ts.map +0 -1
- package/lib/utils/icon-registry.js.map +0 -1
- package/lib/utils/locale.d.ts.map +0 -1
- package/lib/utils/locale.js.map +0 -1
- package/lib/utils/number-format.d.ts.map +0 -1
- package/lib/utils/number-format.js.map +0 -1
- package/lib/utils/parse-boolean.d.ts +0 -39
- package/lib/utils/parse-boolean.d.ts.map +0 -1
- package/lib/utils/parse-boolean.js +0 -23
- package/lib/utils/parse-boolean.js.map +0 -1
- package/lib/utils/positioning.d.ts.map +0 -1
- package/lib/utils/positioning.js.map +0 -1
- package/lib/utils/property-capture.d.ts.map +0 -1
- package/lib/utils/property-capture.js.map +0 -1
- package/lib/utils/property-manager.d.ts.map +0 -1
- package/lib/utils/property-manager.js.map +0 -1
- package/lib/utils/resize-observer.d.ts.map +0 -1
- package/lib/utils/resize-observer.js.map +0 -1
- package/lib/utils/scroll-lock.d.ts.map +0 -1
- package/lib/utils/scroll-lock.js.map +0 -1
- package/lib/utils/styles.d.ts.map +0 -1
- package/lib/utils/styles.js.map +0 -1
- package/lib/version.d.ts.map +0 -1
- package/lib/version.js.map +0 -1
package/lib/components/copy.js
CHANGED
|
@@ -32,7 +32,7 @@ this._customFlavorSheet = syncCustomFlavorSheet(this.shadowRoot, this._customFla
|
|
|
32
32
|
onDisconnect() {
|
|
33
33
|
if (this._copyTimeout !== null) {
|
|
34
34
|
clearTimeout(this._copyTimeout);
|
|
35
|
-
this.
|
|
35
|
+
this.resetCopyButton();
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
onPropertiesChanged(changes) {
|
|
@@ -61,15 +61,15 @@ composed: true
|
|
|
61
61
|
}));
|
|
62
62
|
}
|
|
63
63
|
catch (err) {
|
|
64
|
-
|
|
64
|
+
const focused = this.shadowRoot.activeElement;
|
|
65
65
|
const textarea = document.createElement('textarea');
|
|
66
|
+
try {
|
|
66
67
|
textarea.value = value;
|
|
67
68
|
textarea.style.position = 'fixed';
|
|
68
69
|
textarea.style.opacity = '0';
|
|
69
70
|
document.body.appendChild(textarea);
|
|
70
71
|
textarea.select();
|
|
71
72
|
document.execCommand('copy');
|
|
72
|
-
document.body.removeChild(textarea);
|
|
73
73
|
this.dispatchEvent(new CustomEvent('copy-success', {
|
|
74
74
|
detail: { value },
|
|
75
75
|
bubbles: true,
|
|
@@ -86,6 +86,10 @@ composed: true
|
|
|
86
86
|
this.showCopyError();
|
|
87
87
|
return;
|
|
88
88
|
}
|
|
89
|
+
finally {
|
|
90
|
+
textarea.remove();
|
|
91
|
+
focused?.focus();
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
this.showCopySuccess();
|
|
91
95
|
}
|
|
@@ -100,16 +104,17 @@ copyButton.classList.add('success');
|
|
|
100
104
|
copyButton.innerHTML = CHECK_ICON_SVG;
|
|
101
105
|
copyButton.setAttribute('aria-label', 'Copied!');
|
|
102
106
|
}
|
|
103
|
-
this._copyTimeout = window.setTimeout(() =>
|
|
107
|
+
this._copyTimeout = window.setTimeout(() => this.resetCopyButton(), 2000);
|
|
108
|
+
}
|
|
109
|
+
resetCopyButton() {
|
|
104
110
|
this._showingSuccess = false;
|
|
105
111
|
const btn = this.shadowRoot.querySelector('.copy-button');
|
|
106
112
|
if (btn) {
|
|
107
|
-
btn.classList.remove('success');
|
|
113
|
+
btn.classList.remove('success', 'error');
|
|
108
114
|
btn.innerHTML = COPY_ICON_SVG;
|
|
109
115
|
btn.setAttribute('aria-label', 'Copy to clipboard');
|
|
110
116
|
}
|
|
111
117
|
this._copyTimeout = null;
|
|
112
|
-
}, 2000);
|
|
113
118
|
}
|
|
114
119
|
showCopyError() {
|
|
115
120
|
if (this._copyTimeout !== null) {
|
|
@@ -122,34 +127,13 @@ copyButton.classList.add('error');
|
|
|
122
127
|
copyButton.innerHTML = ERROR_ICON_SVG;
|
|
123
128
|
copyButton.setAttribute('aria-label', 'Copy failed');
|
|
124
129
|
}
|
|
125
|
-
this._copyTimeout = window.setTimeout(() =>
|
|
126
|
-
const btn = this.shadowRoot.querySelector('.copy-button');
|
|
127
|
-
if (btn) {
|
|
128
|
-
btn.classList.remove('error');
|
|
129
|
-
btn.innerHTML = COPY_ICON_SVG;
|
|
130
|
-
btn.setAttribute('aria-label', 'Copy to clipboard');
|
|
131
|
-
}
|
|
132
|
-
this._copyTimeout = null;
|
|
133
|
-
}, 2000);
|
|
130
|
+
this._copyTimeout = window.setTimeout(() => this.resetCopyButton(), 2000);
|
|
134
131
|
}
|
|
135
132
|
setupEventListeners() {
|
|
136
|
-
const
|
|
137
|
-
const inputWrapper = shadow.querySelector('.input-wrapper');
|
|
138
|
-
const copyButton = shadow.querySelector('.copy-button');
|
|
133
|
+
const inputWrapper = this.shadowRoot.querySelector('.input-wrapper');
|
|
139
134
|
if (inputWrapper && !this.disabled) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
if (e.target === copyButton || e.target.closest('.copy-button')) {
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
this.copyToClipboard();
|
|
146
|
-
});
|
|
147
|
-
wrapperEl.style.cursor = 'pointer';
|
|
148
|
-
}
|
|
149
|
-
if (copyButton) {
|
|
150
|
-
copyButton.addEventListener('click', () => {
|
|
151
|
-
this.copyToClipboard();
|
|
152
|
-
});
|
|
135
|
+
inputWrapper.addEventListener('click', () => this.copyToClipboard());
|
|
136
|
+
inputWrapper.style.cursor = 'pointer';
|
|
153
137
|
}
|
|
154
138
|
}
|
|
155
139
|
render() {
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TyDatePicker Web Component — read-only input stub + calendar dropdown
|
|
3
3
|
* (modal <dialog>), optional time input, form participation via
|
|
4
|
-
* ElementInternals. Value is UTC
|
|
4
|
+
* ElementInternals. Value is a UTC instant (wall-clock with `native`);
|
|
5
|
+
* display is local.
|
|
5
6
|
*/
|
|
6
7
|
import { type Placement } from '../utils/positioning.js';
|
|
7
8
|
import { TyComponent } from '../base/ty-component.js';
|
|
8
9
|
import type { Flavor } from '../types/common.js';
|
|
9
10
|
import type { PropertyChange } from '../utils/property-manager.js';
|
|
10
|
-
|
|
11
|
-
* Date components (internal representation in local timezone)
|
|
12
|
-
*/
|
|
13
|
-
interface DateComponents {
|
|
14
|
-
year?: number;
|
|
15
|
-
month?: number;
|
|
16
|
-
day?: number;
|
|
17
|
-
hour?: number;
|
|
18
|
-
minute?: number;
|
|
19
|
-
}
|
|
11
|
+
import { type DateTimeParts } from '../utils/calendar-utils.js';
|
|
20
12
|
/**
|
|
21
13
|
* Internal date picker state
|
|
22
14
|
*/
|
|
23
|
-
interface DatePickerState extends
|
|
15
|
+
interface DatePickerState extends DateTimeParts {
|
|
24
16
|
withTime: boolean;
|
|
25
17
|
open: boolean;
|
|
26
18
|
}
|
|
@@ -99,6 +91,11 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
99
91
|
visual: boolean;
|
|
100
92
|
default: boolean;
|
|
101
93
|
};
|
|
94
|
+
error: {
|
|
95
|
+
type: "string";
|
|
96
|
+
visual: boolean;
|
|
97
|
+
default: string;
|
|
98
|
+
};
|
|
102
99
|
format: {
|
|
103
100
|
type: "string";
|
|
104
101
|
visual: boolean;
|
|
@@ -123,12 +120,19 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
123
120
|
visual: boolean;
|
|
124
121
|
default: boolean;
|
|
125
122
|
};
|
|
123
|
+
native: {
|
|
124
|
+
type: "boolean";
|
|
125
|
+
visual: boolean;
|
|
126
|
+
default: boolean;
|
|
127
|
+
};
|
|
126
128
|
};
|
|
127
129
|
private _state;
|
|
128
130
|
private _clickListener?;
|
|
129
131
|
private _keydownListener?;
|
|
130
132
|
private _dialogClickListener?;
|
|
131
133
|
private _closeTimestamp;
|
|
134
|
+
private _initialized;
|
|
135
|
+
private _syncing;
|
|
132
136
|
private _timeInput?;
|
|
133
137
|
private _localeObserver?;
|
|
134
138
|
private _customFlavorSheet;
|
|
@@ -142,14 +146,21 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
142
146
|
/** Handle state updates BEFORE render. */
|
|
143
147
|
protected onPropertiesChanged(changes: PropertyChange[]): void;
|
|
144
148
|
/**
|
|
145
|
-
* Get form value -
|
|
146
|
-
* TyComponent calls this automatically when
|
|
149
|
+
* Get form value - the submitted string from current state (see
|
|
150
|
+
* componentsToOutputValue). TyComponent calls this automatically when the
|
|
151
|
+
* value property changes.
|
|
147
152
|
*/
|
|
148
153
|
protected getFormValue(): FormDataEntryValue | null;
|
|
154
|
+
private outputValue;
|
|
149
155
|
protected updateFormValue(): void;
|
|
156
|
+
/** The field's focusable element: the stub, or the native input on touch devices. */
|
|
157
|
+
private focusTarget;
|
|
158
|
+
/** Focus the field: the host itself isn't focusable. Disabled: nothing, like a native input. */
|
|
159
|
+
focus(options?: FocusOptions): void;
|
|
150
160
|
/**
|
|
151
161
|
* `required` used to be cosmetic: nothing reported valueMissing, so an empty
|
|
152
162
|
* required picker never blocked its form. Disabled pickers don't validate.
|
|
163
|
+
* The message is a native date (datetime-local with time) input's.
|
|
153
164
|
*/
|
|
154
165
|
private updateValidity;
|
|
155
166
|
private getComponents;
|
|
@@ -206,17 +217,23 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
206
217
|
set max(v: string);
|
|
207
218
|
get withTime(): boolean;
|
|
208
219
|
set withTime(v: boolean);
|
|
220
|
+
get native(): boolean;
|
|
221
|
+
set native(v: boolean);
|
|
222
|
+
get error(): string;
|
|
223
|
+
set error(v: string);
|
|
209
224
|
/**
|
|
210
|
-
* Get current value
|
|
225
|
+
* Get current value — the string the form submits: a UTC ISO instant, or
|
|
226
|
+
* wall-clock ('YYYY-MM-DD' / 'YYYY-MM-DDTHH:mm') with `native`. null when
|
|
227
|
+
* empty (the form then submits name=, like a native date input).
|
|
211
228
|
*/
|
|
212
229
|
get value(): string | null;
|
|
213
230
|
/**
|
|
214
|
-
* Set value (
|
|
231
|
+
* Set value: any format parseDateTime() reads, a Date, epoch milliseconds,
|
|
232
|
+
* or null. It's normalized to the submitted form.
|
|
215
233
|
*
|
|
216
234
|
* When set to null/undefined/empty string, the attribute is removed.
|
|
217
|
-
* When set to a valid date, the attribute is set to ISO UTC string.
|
|
218
235
|
*/
|
|
219
|
-
set value(val: string | Date | null);
|
|
236
|
+
set value(val: string | number | Date | null);
|
|
220
237
|
/**
|
|
221
238
|
* Clear the date value programmatically WITH a change event (source:
|
|
222
239
|
* 'clear'). Works regardless of `no-clear` — lets any
|
|
@@ -230,15 +247,33 @@ export declare class TyDatePicker extends TyComponent<DatePickerState> {
|
|
|
230
247
|
/** Footer: clock + "Time" on the left, HH : MM on the right, summary below. */
|
|
231
248
|
private renderTimeSection;
|
|
232
249
|
private renderCalendarDropdown;
|
|
250
|
+
/**
|
|
251
|
+
* Match the popup calendar to the stub's look: danger while an error
|
|
252
|
+
* shows, as on the stub (styles: errorLook), else the user's flavor.
|
|
253
|
+
* 'default' is the stub's own unstyled state, not a real flavor: the
|
|
254
|
+
* calendar stays on its own default.
|
|
255
|
+
*/
|
|
256
|
+
private calendarFlavor;
|
|
233
257
|
/**
|
|
234
258
|
* Render native date input for mobile touch devices.
|
|
235
259
|
* Uses <input type="date"> or <input type="datetime-local"> when with-time.
|
|
236
260
|
* Reuses .date-picker-stub styling and existing event/state infrastructure.
|
|
237
261
|
*/
|
|
238
262
|
private renderNativeInput;
|
|
263
|
+
/**
|
|
264
|
+
* The touch devices' native input follows the picker: type (date, or
|
|
265
|
+
* datetime-local with time), disabled, required, min/max (datetime-local
|
|
266
|
+
* wants a time suffix) and value — also when they change at runtime.
|
|
267
|
+
*/
|
|
268
|
+
private syncNativeInput;
|
|
239
269
|
private calculateCalendarPosition;
|
|
240
270
|
private renderContainer;
|
|
241
271
|
protected render(): void;
|
|
272
|
+
/**
|
|
273
|
+
* The `error` line under the field — same markup as ty-input's; the field
|
|
274
|
+
* (stub, or the native input on touch devices) is described by it.
|
|
275
|
+
*/
|
|
276
|
+
private syncErrorLine;
|
|
242
277
|
/**
|
|
243
278
|
* Update display without destroying DOM (for open dialog)
|
|
244
279
|
*/
|