@tylertech/forge 3.3.4 → 3.3.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/custom-elements.json +341 -72
- package/dist/app-bar/forge-app-bar.css +0 -16
- package/dist/field/forge-field.css +4 -17
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +3 -3
- package/dist/vscode.html-custom-data.json +153 -22
- package/esm/autocomplete/autocomplete-adapter.js +2 -1
- package/esm/calendar/calendar-dropdown/calendar-dropdown.js +1 -1
- package/esm/checkbox/checkbox.d.ts +3 -3
- package/esm/chip-field/chip-field.js +1 -1
- package/esm/dialog/dialog-core.d.ts +1 -0
- package/esm/dialog/dialog-core.js +10 -6
- package/esm/dialog/dialog.d.ts +4 -4
- package/esm/field/base/with-base-field.js +2 -2
- package/esm/field/field-adapter.d.ts +9 -6
- package/esm/field/field-adapter.js +9 -16
- package/esm/field/field-constants.d.ts +2 -0
- package/esm/field/field-constants.js +3 -1
- package/esm/field/field-core.d.ts +2 -0
- package/esm/field/field-core.js +16 -5
- package/esm/field/field.d.ts +1 -0
- package/esm/field/field.js +3 -2
- package/esm/icon/icon.d.ts +26 -9
- package/esm/icon/icon.js +3 -2
- package/esm/label/label.d.ts +1 -1
- package/esm/popover/popover-adapter.js +5 -0
- package/esm/radio/radio/radio.d.ts +2 -2
- package/esm/select/core/base-select-adapter.js +5 -0
- package/esm/skip-link/skip-link.d.ts +1 -1
- package/esm/skip-link/skip-link.js +1 -1
- package/esm/switch/switch.d.ts +2 -2
- package/esm/time-picker/time-picker-adapter.d.ts +2 -2
- package/esm/time-picker/time-picker-adapter.js +44 -30
- package/esm/time-picker/time-picker-core.js +1 -1
- package/esm/time-picker/time-picker.d.ts +125 -28
- package/esm/time-picker/time-picker.js +0 -27
- package/esm/view-switcher/view-switcher.d.ts +1 -1
- package/package.json +4 -4
- package/sass/core/styles/_utils.scss +1 -1
- package/sass/core/styles/theme/_utils.scss +1 -1
- package/sass/core/styles/tokens/list/list/_tokens.scss +2 -1
- package/sass/field/_core.animation.scss +0 -20
- package/sass/field/_core.layout.scss +3 -8
- package/sass/field/_core.scss +1 -0
- package/sass/field/_core.slotted.scss +4 -8
- package/sass/field/field.scss +8 -8
- package/sass/radio/index.scss +1 -1
|
@@ -24,7 +24,9 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
24
24
|
}
|
|
25
25
|
initializeMask(options) {
|
|
26
26
|
this.destroyMask();
|
|
27
|
-
|
|
27
|
+
if (this._inputElement) {
|
|
28
|
+
this._inputMask = new TimeInputMask(this._inputElement, options);
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
destroy() {
|
|
30
32
|
this._targetElement = undefined;
|
|
@@ -36,25 +38,25 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
36
38
|
this._inputMask = undefined;
|
|
37
39
|
}
|
|
38
40
|
initializeAccessibility(identifier) {
|
|
39
|
-
this._inputElement
|
|
40
|
-
this._inputElement
|
|
41
|
-
this._inputElement
|
|
42
|
-
this._inputElement
|
|
43
|
-
this._inputElement
|
|
44
|
-
this._inputElement
|
|
45
|
-
this._inputElement
|
|
46
|
-
this._inputElement
|
|
47
|
-
this._inputElement
|
|
41
|
+
this._inputElement?.setAttribute('autocomplete', 'off');
|
|
42
|
+
this._inputElement?.setAttribute('autocorrect', 'off');
|
|
43
|
+
this._inputElement?.setAttribute('autocapitalize', 'off');
|
|
44
|
+
this._inputElement?.setAttribute('spellcheck', 'false');
|
|
45
|
+
this._inputElement?.setAttribute('role', 'combobox');
|
|
46
|
+
this._inputElement?.setAttribute('aria-live', 'assertive');
|
|
47
|
+
this._inputElement?.setAttribute('aria-atomic', 'true');
|
|
48
|
+
this._inputElement?.setAttribute('aria-haspopup', 'true');
|
|
49
|
+
this._inputElement?.setAttribute('aria-expanded', 'false');
|
|
48
50
|
tryCreateAriaControlsPlaceholder();
|
|
49
|
-
|
|
51
|
+
if (this._inputElement) {
|
|
52
|
+
setAriaControls(this._inputElement);
|
|
53
|
+
}
|
|
50
54
|
}
|
|
51
55
|
addInputListener(type, listener, capture) {
|
|
52
|
-
this._inputElement
|
|
56
|
+
this._inputElement?.addEventListener(type, listener, { capture });
|
|
53
57
|
}
|
|
54
58
|
removeInputListener(type, listener, capture) {
|
|
55
|
-
|
|
56
|
-
this._inputElement.removeEventListener(type, listener, { capture });
|
|
57
|
-
}
|
|
59
|
+
this._inputElement?.removeEventListener(type, listener, { capture });
|
|
58
60
|
}
|
|
59
61
|
addToggleListener(type, listener) {
|
|
60
62
|
if (this._toggleElement) {
|
|
@@ -96,26 +98,28 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
tryFocusInput() {
|
|
99
|
-
this._inputElement
|
|
101
|
+
this._inputElement?.select();
|
|
100
102
|
}
|
|
101
103
|
tryBlurInput() {
|
|
102
|
-
this._inputElement
|
|
104
|
+
this._inputElement?.blur();
|
|
103
105
|
}
|
|
104
106
|
selectInputText() {
|
|
105
|
-
this._inputElement
|
|
107
|
+
this._inputElement?.select();
|
|
106
108
|
}
|
|
107
109
|
isInputDisabled() {
|
|
108
|
-
return this._inputElement
|
|
110
|
+
return this._inputElement?.disabled ?? false;
|
|
109
111
|
}
|
|
110
112
|
isInputFocused() {
|
|
111
113
|
const activeElement = getActiveElement(this._component.ownerDocument);
|
|
112
114
|
return activeElement === this._inputElement;
|
|
113
115
|
}
|
|
114
116
|
setInputValue(value, emitEvents) {
|
|
115
|
-
if (this._inputElement
|
|
117
|
+
if (this._inputElement?.value === value) {
|
|
116
118
|
return;
|
|
117
119
|
}
|
|
118
|
-
this._inputElement
|
|
120
|
+
if (this._inputElement) {
|
|
121
|
+
this._inputElement.value = value;
|
|
122
|
+
}
|
|
119
123
|
if (this._inputMask) {
|
|
120
124
|
this._inputMask.update();
|
|
121
125
|
}
|
|
@@ -125,11 +129,13 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
131
|
getInputValue() {
|
|
128
|
-
return this._inputMask ? this._inputMask.maskedValue : this._inputElement
|
|
132
|
+
return this._inputMask ? this._inputMask.maskedValue : (this._inputElement?.value ?? '');
|
|
129
133
|
}
|
|
130
134
|
setDisabled(isDisabled) {
|
|
131
|
-
this._inputElement
|
|
132
|
-
|
|
135
|
+
if (this._inputElement) {
|
|
136
|
+
this._inputElement.disabled = isDisabled;
|
|
137
|
+
this._inputElement.setAttribute('aria-disabled', isDisabled.toString());
|
|
138
|
+
}
|
|
133
139
|
this.setToggleDisabled(isDisabled);
|
|
134
140
|
}
|
|
135
141
|
attachDropdown(config) {
|
|
@@ -138,7 +144,7 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
138
144
|
}
|
|
139
145
|
this._listDropdown = new ListDropdown(this._targetElement, config);
|
|
140
146
|
this._listDropdown.open();
|
|
141
|
-
this._inputElement
|
|
147
|
+
this._inputElement?.setAttribute('aria-controls', `list-dropdown-popup-${config.id}`);
|
|
142
148
|
}
|
|
143
149
|
async detachDropdown({ destroy = false } = {}) {
|
|
144
150
|
if (this._listDropdown) {
|
|
@@ -150,26 +156,34 @@ export class TimePickerAdapter extends BaseAdapter {
|
|
|
150
156
|
}
|
|
151
157
|
this._listDropdown = undefined;
|
|
152
158
|
}
|
|
153
|
-
|
|
159
|
+
if (this._inputElement) {
|
|
160
|
+
setAriaControls(this._inputElement);
|
|
161
|
+
}
|
|
154
162
|
}
|
|
155
163
|
propagateKey(key) {
|
|
156
164
|
this._listDropdown?.handleKey(key);
|
|
157
165
|
}
|
|
158
166
|
setActiveDescendant(id) {
|
|
159
|
-
|
|
167
|
+
if (this._inputElement) {
|
|
168
|
+
toggleAttribute(this._inputElement, !!id, 'aria-activedescendant', id);
|
|
169
|
+
}
|
|
160
170
|
}
|
|
161
171
|
getTargetElementWidth(selector) {
|
|
162
172
|
const targetElement = this._getTargetElement(selector);
|
|
163
173
|
return targetElement.getBoundingClientRect().width;
|
|
164
174
|
}
|
|
165
175
|
_emitInputEvent(type) {
|
|
166
|
-
this._inputElement
|
|
176
|
+
this._inputElement?.dispatchEvent(new Event(type));
|
|
167
177
|
}
|
|
168
178
|
emitInputEvent(type, data) {
|
|
169
|
-
|
|
179
|
+
if (this._inputElement) {
|
|
180
|
+
emitEvent(this._inputElement, type, data);
|
|
181
|
+
}
|
|
170
182
|
}
|
|
171
183
|
setInputReadonly(value) {
|
|
172
|
-
this._inputElement
|
|
184
|
+
if (this._inputElement) {
|
|
185
|
+
this._inputElement.readOnly = value;
|
|
186
|
+
}
|
|
173
187
|
}
|
|
174
188
|
setToggleDisabled(value) {
|
|
175
189
|
if (this._toggleElement) {
|
|
@@ -455,7 +455,7 @@ export class TimePickerCore {
|
|
|
455
455
|
}
|
|
456
456
|
_openDropdown() {
|
|
457
457
|
const options = this._generateTimeOptions();
|
|
458
|
-
if (!this.allowDropdown || !options.length) {
|
|
458
|
+
if (!this.allowDropdown || !options.length || !this._adapter.inputElement) {
|
|
459
459
|
return;
|
|
460
460
|
}
|
|
461
461
|
this._formatInputValue();
|
|
@@ -45,33 +45,6 @@ declare global {
|
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* @tag forge-time-picker
|
|
48
|
-
*
|
|
49
|
-
* @property {string | null | undefined} [value=undefined] - The current value of the time picker.
|
|
50
|
-
* @property {boolean} [open=false] - Whether or not the time picker is open.
|
|
51
|
-
* @property {boolean} [allowSeconds=false] - Whether or not to allow seconds in the time picker.
|
|
52
|
-
* @property {boolean} [masked=false] - Whether or not the time picker input should be masked.
|
|
53
|
-
* @property {boolean} [showMaskFormat=false] - Whether or not to show the mask format in the input.
|
|
54
|
-
* @property {boolean} [use24HourTime=false] - Whether or not to use 24-hour time.
|
|
55
|
-
* @property {boolean} [allowInvalidTime=false] - Whether or not to allow invalid times.
|
|
56
|
-
* @property {string | null | undefined} [min=undefined] - The minimum time that can be selected.
|
|
57
|
-
* @property {string | null | undefined} [max=undefined] - The maximum time that can be selected.
|
|
58
|
-
* @property {string[]} [restrictedTimes=[]] - An array of times that cannot be selected.
|
|
59
|
-
* @property {string | null | undefined} [startTime=undefined] - The time to start the time picker at.
|
|
60
|
-
* @property {number} [step=undefined] - The step interval for the time picker.
|
|
61
|
-
* @property {boolean} [allowInput=false] - Whether or not to allow manual input of the time.
|
|
62
|
-
* @property {boolean} [showNow=false] - Whether or not to show a "Now" button.
|
|
63
|
-
* @property {boolean} [showHourOptions=false] - Whether or not to display hour options in dropdown.
|
|
64
|
-
* @property {ITimePickerOption[]} [customOptions=[]] - An array of custom time picker options.
|
|
65
|
-
* @property {TimePickerValidationCallback} [validationCallback=undefined] - A callback function to validate the time.
|
|
66
|
-
* @property {TimePickerParseCallback} [parseCallback=undefined] - A callback function to parse the time.
|
|
67
|
-
* @property {TimePickerFormatCallback} [formatCallback=undefined] - A callback function to format the time.
|
|
68
|
-
* @property {TimePickerCoercionCallback} [coercionCallback=undefined] - A callback function to coerce the time.
|
|
69
|
-
* @property {TimePickerPrepareMaskCallback} [prepareMaskCallback=undefined] - A callback function to prepare the mask.
|
|
70
|
-
* @property {boolean} [disabled=false] - Whether or not the time picker is disabled.
|
|
71
|
-
* @property {string | string[]} [popupClasses=undefined] - The classes to apply to the time picker popup.
|
|
72
|
-
* @property {boolean} [allowDropdown=false] - Whether or not to allow the time picker to be a dropdown.
|
|
73
|
-
* @property {string} [popupTarget=undefined] - The target element to attach the popup to.
|
|
74
|
-
*
|
|
75
48
|
*/
|
|
76
49
|
export declare class TimePickerComponent extends BaseComponent implements ITimePickerComponent {
|
|
77
50
|
static get observedAttributes(): string[];
|
|
@@ -80,30 +53,154 @@ export declare class TimePickerComponent extends BaseComponent implements ITimeP
|
|
|
80
53
|
connectedCallback(): void;
|
|
81
54
|
disconnectedCallback(): void;
|
|
82
55
|
attributeChangedCallback(name: string, oldValue: string, newValue: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* The current value of the time picker.
|
|
58
|
+
* @default undefined
|
|
59
|
+
* @attribute
|
|
60
|
+
*/
|
|
83
61
|
value: string | null | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Whether or not the time picker is open.
|
|
64
|
+
* @default false
|
|
65
|
+
* @attribute
|
|
66
|
+
*/
|
|
84
67
|
open: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Whether or not to allow seconds in the time picker.
|
|
70
|
+
* @default false
|
|
71
|
+
* @attribute allow-seconds
|
|
72
|
+
*/
|
|
85
73
|
allowSeconds: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether or not the time picker input should be masked.
|
|
76
|
+
* @default false
|
|
77
|
+
* @attribute
|
|
78
|
+
*/
|
|
86
79
|
masked: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Whether or not to show the mask format in the input.
|
|
82
|
+
* @default false
|
|
83
|
+
* @attribute show-mask-format
|
|
84
|
+
*/
|
|
87
85
|
showMaskFormat: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Whether or not to use 24-hour time.
|
|
88
|
+
* @default false
|
|
89
|
+
* @attribute use-24-hour-time
|
|
90
|
+
*/
|
|
88
91
|
use24HourTime: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether or not to allow invalid times.
|
|
94
|
+
* @default false
|
|
95
|
+
* @attribute allow-invalid-time
|
|
96
|
+
*/
|
|
89
97
|
allowInvalidTime: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* The minimum time that can be selected.
|
|
100
|
+
* @default undefined
|
|
101
|
+
* @attribute
|
|
102
|
+
*/
|
|
90
103
|
min: string | null | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* The maximum time that can be selected.
|
|
106
|
+
* @default undefined
|
|
107
|
+
* @attribute
|
|
108
|
+
*/
|
|
91
109
|
max: string | null | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* An array of times that cannot be selected.
|
|
112
|
+
* @default []
|
|
113
|
+
* @attribute restricted-times
|
|
114
|
+
*/
|
|
92
115
|
restrictedTimes: string[];
|
|
116
|
+
/**
|
|
117
|
+
* The time to start the time picker at.
|
|
118
|
+
* @default undefined
|
|
119
|
+
* @attribute start-time
|
|
120
|
+
*/
|
|
93
121
|
startTime: string | null | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The step interval for the time picker.
|
|
124
|
+
* @default undefined
|
|
125
|
+
* @attribute
|
|
126
|
+
*/
|
|
94
127
|
step: number;
|
|
128
|
+
/**
|
|
129
|
+
* Whether or not to allow manual input of the time.
|
|
130
|
+
* @default false
|
|
131
|
+
* @attribute allow-input
|
|
132
|
+
*/
|
|
95
133
|
allowInput: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Whether or not to show a "Now" button.
|
|
136
|
+
* @default false
|
|
137
|
+
* @attribute show-now
|
|
138
|
+
*/
|
|
96
139
|
showNow: boolean;
|
|
97
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Whether or not to display hour options in dropdown.
|
|
142
|
+
* @default false
|
|
143
|
+
* @attribute show-hour-options
|
|
144
|
+
*/
|
|
98
145
|
showHourOptions: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* An array of custom time picker options.
|
|
148
|
+
* @default []
|
|
149
|
+
* @attribute custom-options
|
|
150
|
+
*/
|
|
99
151
|
customOptions: ITimePickerOption[];
|
|
152
|
+
/**
|
|
153
|
+
* A callback function to validate the time.
|
|
154
|
+
* @default undefined
|
|
155
|
+
* @attribute validation-callback
|
|
156
|
+
*/
|
|
100
157
|
validationCallback: TimePickerValidationCallback;
|
|
158
|
+
/**
|
|
159
|
+
* A callback function to parse the time.
|
|
160
|
+
* @default undefined
|
|
161
|
+
* @attribute parse-callback
|
|
162
|
+
*/
|
|
101
163
|
parseCallback: TimePickerParseCallback;
|
|
164
|
+
/**
|
|
165
|
+
* A callback function to format the time.
|
|
166
|
+
* @default undefined
|
|
167
|
+
* @attribute format-callback
|
|
168
|
+
*/
|
|
102
169
|
formatCallback: TimePickerFormatCallback;
|
|
170
|
+
/**
|
|
171
|
+
* A callback function to coerce the time.
|
|
172
|
+
* @default undefined
|
|
173
|
+
* @attribute coercion-callback
|
|
174
|
+
*/
|
|
103
175
|
coercionCallback: TimePickerCoercionCallback;
|
|
176
|
+
/**
|
|
177
|
+
* A callback function to prepare the mask.
|
|
178
|
+
* @default undefined
|
|
179
|
+
* @attribute prepare-mask-callback
|
|
180
|
+
*/
|
|
104
181
|
prepareMaskCallback: TimePickerPrepareMaskCallback;
|
|
182
|
+
/**
|
|
183
|
+
* Whether or not the time picker is disabled.
|
|
184
|
+
* @default false
|
|
185
|
+
* @attribute disabled
|
|
186
|
+
*/
|
|
105
187
|
disabled: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* The classes to apply to the time picker popup.
|
|
190
|
+
* @default undefined
|
|
191
|
+
* @attribute popup-classes
|
|
192
|
+
*/
|
|
106
193
|
popupClasses: string | string[];
|
|
194
|
+
/**
|
|
195
|
+
* Whether or not to allow the time picker to be a dropdown.
|
|
196
|
+
* @default false
|
|
197
|
+
* @attribute allow-dropdown
|
|
198
|
+
*/
|
|
107
199
|
allowDropdown: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* The target element to attach the popup to.
|
|
202
|
+
* @default undefined
|
|
203
|
+
* @attribute popup-target
|
|
204
|
+
*/
|
|
108
205
|
popupTarget: string;
|
|
109
206
|
}
|
|
@@ -20,33 +20,6 @@ const template = '<template><slot></slot></template>';
|
|
|
20
20
|
const styles = ':host{display:block}:host([hidden]){display:none}';
|
|
21
21
|
/**
|
|
22
22
|
* @tag forge-time-picker
|
|
23
|
-
*
|
|
24
|
-
* @property {string | null | undefined} [value=undefined] - The current value of the time picker.
|
|
25
|
-
* @property {boolean} [open=false] - Whether or not the time picker is open.
|
|
26
|
-
* @property {boolean} [allowSeconds=false] - Whether or not to allow seconds in the time picker.
|
|
27
|
-
* @property {boolean} [masked=false] - Whether or not the time picker input should be masked.
|
|
28
|
-
* @property {boolean} [showMaskFormat=false] - Whether or not to show the mask format in the input.
|
|
29
|
-
* @property {boolean} [use24HourTime=false] - Whether or not to use 24-hour time.
|
|
30
|
-
* @property {boolean} [allowInvalidTime=false] - Whether or not to allow invalid times.
|
|
31
|
-
* @property {string | null | undefined} [min=undefined] - The minimum time that can be selected.
|
|
32
|
-
* @property {string | null | undefined} [max=undefined] - The maximum time that can be selected.
|
|
33
|
-
* @property {string[]} [restrictedTimes=[]] - An array of times that cannot be selected.
|
|
34
|
-
* @property {string | null | undefined} [startTime=undefined] - The time to start the time picker at.
|
|
35
|
-
* @property {number} [step=undefined] - The step interval for the time picker.
|
|
36
|
-
* @property {boolean} [allowInput=false] - Whether or not to allow manual input of the time.
|
|
37
|
-
* @property {boolean} [showNow=false] - Whether or not to show a "Now" button.
|
|
38
|
-
* @property {boolean} [showHourOptions=false] - Whether or not to display hour options in dropdown.
|
|
39
|
-
* @property {ITimePickerOption[]} [customOptions=[]] - An array of custom time picker options.
|
|
40
|
-
* @property {TimePickerValidationCallback} [validationCallback=undefined] - A callback function to validate the time.
|
|
41
|
-
* @property {TimePickerParseCallback} [parseCallback=undefined] - A callback function to parse the time.
|
|
42
|
-
* @property {TimePickerFormatCallback} [formatCallback=undefined] - A callback function to format the time.
|
|
43
|
-
* @property {TimePickerCoercionCallback} [coercionCallback=undefined] - A callback function to coerce the time.
|
|
44
|
-
* @property {TimePickerPrepareMaskCallback} [prepareMaskCallback=undefined] - A callback function to prepare the mask.
|
|
45
|
-
* @property {boolean} [disabled=false] - Whether or not the time picker is disabled.
|
|
46
|
-
* @property {string | string[]} [popupClasses=undefined] - The classes to apply to the time picker popup.
|
|
47
|
-
* @property {boolean} [allowDropdown=false] - Whether or not to allow the time picker to be a dropdown.
|
|
48
|
-
* @property {string} [popupTarget=undefined] - The target element to attach the popup to.
|
|
49
|
-
*
|
|
50
23
|
*/
|
|
51
24
|
let TimePickerComponent = class TimePickerComponent extends BaseComponent {
|
|
52
25
|
static get observedAttributes() {
|
|
@@ -39,7 +39,7 @@ export declare class ViewSwitcherComponent extends BaseComponent implements IVie
|
|
|
39
39
|
/**
|
|
40
40
|
* Gets/sets the animation type.
|
|
41
41
|
* @default "none"
|
|
42
|
-
* @attribute
|
|
42
|
+
* @attribute animation-type
|
|
43
43
|
*/
|
|
44
44
|
animationType: `${ViewSwitcherAnimationType}` | ViewSwitcherAnimation;
|
|
45
45
|
/** Transitions to the next view. */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tylertech/forge",
|
|
3
3
|
"description": "Tyler Forge™ Web Components library",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.6",
|
|
5
5
|
"author": "Tyler Technologies, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"typings": "esm/index.d.ts",
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@floating-ui/dom": "^1.6.
|
|
17
|
-
"@tylertech/forge-core": "^3.0
|
|
16
|
+
"@floating-ui/dom": "^1.6.12",
|
|
17
|
+
"@tylertech/forge-core": "^3.1.0",
|
|
18
18
|
"@tylertech/tyler-icons": "^1.12.0",
|
|
19
19
|
"imask": "^6.6.1",
|
|
20
|
-
"tslib": "^2.
|
|
20
|
+
"tslib": "^2.8.1"
|
|
21
21
|
},
|
|
22
22
|
"customElements": "custom-elements.json"
|
|
23
23
|
}
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
///
|
|
165
165
|
/// Rounds a number to the specified number of decimal places.
|
|
166
166
|
///
|
|
167
|
-
@function round($value, $fractionDigits: 0) {
|
|
167
|
+
@function round-fraction($value, $fractionDigits: 0) {
|
|
168
168
|
$power: math.pow(10, $fractionDigits);
|
|
169
169
|
@return math.div(math.round($power * $value), $power);
|
|
170
170
|
}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
/// Computes the hue, saturation, lightness (and optionally alpha) values for the provided color and returns a string in HSL format.
|
|
75
75
|
///
|
|
76
76
|
@function hsl-values($color, $with-alpha: false) {
|
|
77
|
-
$value: utils.round(color.hue($color), 2) utils.round(color.saturation($color), 2) utils.round(color.lightness($color), 2);
|
|
77
|
+
$value: utils.round-fraction(color.hue($color), 2) utils.round-fraction(color.saturation($color), 2) utils.round-fraction(color.lightness($color), 2);
|
|
78
78
|
@if $with-alpha {
|
|
79
79
|
$value: string.unquote($value + ' / ' + alpha($color));
|
|
80
80
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Copyright Tyler Technologies, Inc.
|
|
4
4
|
* License: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
@use 'sass:map';
|
|
6
7
|
@use '../../../utils';
|
|
7
8
|
@use '../../../spacing';
|
|
8
9
|
@use '../../../shape';
|
|
@@ -23,5 +24,5 @@ $tokens: (
|
|
|
23
24
|
) !default;
|
|
24
25
|
|
|
25
26
|
@function get($key) {
|
|
26
|
-
@return map
|
|
27
|
+
@return map.get($tokens, $key);
|
|
27
28
|
}
|
|
@@ -41,26 +41,6 @@
|
|
|
41
41
|
opacity: 100%;
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
@keyframes float-in-input-animation {
|
|
46
|
-
from {
|
|
47
|
-
translate: 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
to {
|
|
51
|
-
translate: 0 $offset;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@keyframes float-out-input-animation {
|
|
56
|
-
from {
|
|
57
|
-
translate: 0 $offset;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
to {
|
|
61
|
-
translate: 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
44
|
}
|
|
65
45
|
|
|
66
46
|
@mixin multiline-inset-label-background-animation-keyframes {
|
|
@@ -158,7 +158,6 @@
|
|
|
158
158
|
//
|
|
159
159
|
|
|
160
160
|
$multiline-input-offset-base: calc((token(height, custom) - typography.variable(body2, line-height)) / 2);
|
|
161
|
-
$multiline-input-padding-block-end-base: 8px;
|
|
162
161
|
|
|
163
162
|
@mixin multiline-container {
|
|
164
163
|
align-items: start;
|
|
@@ -216,12 +215,12 @@ $multiline-input-padding-block-end-base: 8px;
|
|
|
216
215
|
|
|
217
216
|
@mixin multiline-slotted-input {
|
|
218
217
|
padding-block-start: $multiline-input-offset-base;
|
|
219
|
-
padding-block-end: calc($floating-offset + $multiline-input-
|
|
218
|
+
padding-block-end: calc($floating-offset + $multiline-input-offset-base);
|
|
220
219
|
}
|
|
221
220
|
|
|
222
221
|
@mixin multiline-slotted-floating-input {
|
|
223
222
|
padding-block-start: calc($floating-offset + ($multiline-input-offset-base)) !important; // TODO: find a way to remove this !important
|
|
224
|
-
padding-block-end: #{$multiline-input-
|
|
223
|
+
padding-block-end: #{$multiline-input-offset-base} !important;
|
|
225
224
|
}
|
|
226
225
|
|
|
227
226
|
//
|
|
@@ -258,11 +257,7 @@ $floating-offset: #{calc($floating-offset-base + $floating-offset-adjustment)};
|
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
@mixin float-in-input {
|
|
261
|
-
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
@mixin float-out-input {
|
|
265
|
-
@include animation.floating-animation(float-out-input-animation);
|
|
260
|
+
padding-block-start: calc($floating-offset * 2) !important;
|
|
266
261
|
}
|
|
267
262
|
|
|
268
263
|
@mixin slotted-floating-input {
|
package/sass/field/_core.scss
CHANGED
|
@@ -24,20 +24,16 @@
|
|
|
24
24
|
font: inherit;
|
|
25
25
|
font-size: #{token(font-size)};
|
|
26
26
|
text-overflow: ellipsis;
|
|
27
|
+
|
|
28
|
+
padding-block-start: 0;
|
|
29
|
+
padding-block-end: 0;
|
|
30
|
+
transition: padding-block #{token(floating-animation-duration)} #{token(floating-animation-timing)};
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
@mixin default-slot-textarea {
|
|
30
34
|
resize: none;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
|
-
@mixin default-slot-floating-in {
|
|
34
|
-
position: absolute;
|
|
35
|
-
inset-block-start: calc(#{token(height)} * -0.5);
|
|
36
|
-
|
|
37
|
-
block-size: 100%;
|
|
38
|
-
padding-block: #{token(height)};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
37
|
@mixin slotted-inset-label {
|
|
42
38
|
max-inline-size: 100%;
|
|
43
39
|
overflow: hidden;
|
package/sass/field/field.scss
CHANGED
|
@@ -447,10 +447,8 @@ $variants: (
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
.input {
|
|
450
|
-
@include core.float-in-input;
|
|
451
|
-
|
|
452
450
|
::slotted(:is(input, [data-forge-field-input], [data-forge-multi-input-separator])) {
|
|
453
|
-
@include core.
|
|
451
|
+
@include core.float-in-input;
|
|
454
452
|
}
|
|
455
453
|
}
|
|
456
454
|
}
|
|
@@ -470,15 +468,11 @@ $variants: (
|
|
|
470
468
|
.label {
|
|
471
469
|
@include core.float-out-label;
|
|
472
470
|
}
|
|
473
|
-
|
|
474
|
-
.input {
|
|
475
|
-
@include core.float-out-input;
|
|
476
|
-
}
|
|
477
471
|
}
|
|
478
472
|
}
|
|
479
473
|
|
|
480
474
|
:host(#{map.get($label-positions, inset)}[float-label][multiline]) {
|
|
481
|
-
.has-label
|
|
475
|
+
.has-label {
|
|
482
476
|
::slotted(textarea) {
|
|
483
477
|
@include core.multiline-slotted-floating-input;
|
|
484
478
|
}
|
|
@@ -536,6 +530,12 @@ $variants: (
|
|
|
536
530
|
@include core.multiline-inset-label-background;
|
|
537
531
|
}
|
|
538
532
|
}
|
|
533
|
+
|
|
534
|
+
.forge-field:not(.has-label) {
|
|
535
|
+
.label::after {
|
|
536
|
+
display: none;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
//
|
package/sass/radio/index.scss
CHANGED