@vonage/vivid 3.51.0 → 3.53.0
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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/alert/index.cjs +3 -3
- package/alert/index.js +3 -3
- package/appearance-ui/index.cjs +19 -11
- package/appearance-ui/index.js +19 -11
- package/audio-player/index.cjs +4 -3
- package/audio-player/index.js +4 -3
- package/avatar/index.cjs +1 -1
- package/avatar/index.js +1 -1
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/banner/index.cjs +2 -2
- package/banner/index.js +2 -2
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/button/index.cjs +2 -2
- package/button/index.js +2 -2
- package/card/index.cjs +2 -2
- package/card/index.js +2 -2
- package/checkbox/index.cjs +3 -2
- package/checkbox/index.js +3 -2
- package/combobox/index.cjs +5 -8
- package/combobox/index.js +5 -8
- package/custom-elements.json +2310 -769
- package/data-grid/index.cjs +1 -1
- package/data-grid/index.js +1 -1
- package/date-picker/index.cjs +7 -9
- package/date-picker/index.js +7 -9
- package/date-range-picker/index.cjs +7 -9
- package/date-range-picker/index.js +7 -9
- package/dial-pad/index.cjs +33 -0
- package/dial-pad/index.js +31 -0
- package/dialog/index.cjs +4 -4
- package/dialog/index.js +4 -4
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/index.cjs +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.cjs +2 -2
- package/empty-state/index.js +2 -2
- package/fab/index.cjs +2 -2
- package/fab/index.js +2 -2
- package/file-picker/index.cjs +4 -5
- package/file-picker/index.js +4 -5
- package/header/index.cjs +2 -2
- package/header/index.js +2 -2
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +135 -123
- package/index.js +48 -46
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/avatar/definition.d.ts +1 -1
- package/lib/button/button.d.ts +1 -0
- package/lib/button/definition.d.ts +1 -1
- package/lib/calendar-event/definition.d.ts +1 -1
- package/lib/components.d.ts +3 -0
- package/lib/dial-pad/definition.d.ts +3 -0
- package/lib/dial-pad/dial-pad.d.ts +14 -0
- package/lib/dial-pad/dial-pad.template.d.ts +4 -0
- package/lib/dial-pad/locale.d.ts +18 -0
- package/lib/enums.d.ts +6 -0
- package/lib/layout/definition.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +3 -0
- package/lib/range-slider/definition.d.ts +3 -0
- package/lib/range-slider/locale.d.ts +4 -0
- package/lib/range-slider/range-slider.d.ts +32 -0
- package/lib/range-slider/range-slider.form-associated.d.ts +10 -0
- package/lib/range-slider/range-slider.template.d.ts +4 -0
- package/lib/range-slider/utils/lerp.d.ts +2 -0
- package/lib/range-slider/utils/roundToStepValue.d.ts +1 -0
- package/lib/slider/slider.template.d.ts +1 -0
- package/lib/split-button/definition.d.ts +1 -1
- package/lib/text-anchor/definition.d.ts +1 -0
- package/lib/text-anchor/text-anchor.d.ts +5 -0
- package/lib/video-player/definition.d.ts +3 -0
- package/lib/video-player/locale.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +17 -0
- package/lib/video-player/video-player.template.d.ts +4 -0
- package/listbox/index.cjs +25 -24
- package/listbox/index.js +25 -24
- package/locales/en-GB.cjs +34 -0
- package/locales/en-GB.js +34 -0
- package/locales/en-US.cjs +202 -0
- package/locales/en-US.js +202 -0
- package/locales/ja-JP.cjs +202 -1
- package/locales/ja-JP.js +202 -1
- package/locales/zh-CN.cjs +203 -0
- package/locales/zh-CN.js +203 -0
- package/menu/index.cjs +7 -7
- package/menu/index.js +7 -7
- package/menu-item/index.cjs +4 -4
- package/menu-item/index.js +4 -4
- package/nav/index.cjs +1 -1
- package/nav/index.js +1 -1
- package/nav-disclosure/index.cjs +2 -2
- package/nav-disclosure/index.js +2 -2
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +2 -2
- package/note/index.cjs +2 -2
- package/note/index.js +2 -2
- package/number-field/index.cjs +5 -6
- package/number-field/index.js +5 -6
- package/option/index.cjs +2 -2
- package/option/index.js +2 -2
- package/package.json +34 -34
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +3 -3
- package/popup/index.cjs +4 -4
- package/popup/index.js +4 -4
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.cjs +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.cjs +1 -1
- package/radio/index.js +1 -1
- package/radio-group/index.cjs +1 -1
- package/radio-group/index.js +1 -1
- package/range-slider/index.cjs +22 -0
- package/range-slider/index.js +20 -0
- package/select/index.cjs +7 -6
- package/select/index.js +7 -6
- package/selectable-box/index.cjs +5 -4
- package/selectable-box/index.js +5 -4
- package/shared/Reflector.cjs +5 -1
- package/shared/Reflector.js +5 -1
- package/shared/affix.cjs +11 -4
- package/shared/affix.js +12 -4
- package/shared/anchored.cjs +8 -2
- package/shared/anchored.js +8 -2
- package/shared/applyMixinsWithObservables.cjs +15 -0
- package/shared/applyMixinsWithObservables.js +13 -0
- package/shared/definition.cjs +9 -4
- package/shared/definition.js +9 -4
- package/shared/definition10.cjs +5 -5
- package/shared/definition10.js +5 -5
- package/shared/definition11.cjs +77 -49
- package/shared/definition11.js +78 -50
- package/shared/definition12.cjs +12 -14
- package/shared/definition12.js +12 -14
- package/shared/definition13.cjs +118 -75
- package/shared/definition13.js +118 -75
- package/shared/definition14.cjs +34 -33
- package/shared/definition14.js +34 -33
- package/shared/definition15.cjs +24 -12
- package/shared/definition15.js +24 -12
- package/shared/definition16.cjs +38 -43
- package/shared/definition16.js +38 -43
- package/shared/definition17.cjs +126 -66
- package/shared/definition17.js +127 -67
- package/shared/definition18.cjs +31 -15
- package/shared/definition18.js +31 -15
- package/shared/definition19.cjs +117 -81
- package/shared/definition19.js +117 -81
- package/shared/definition2.cjs +10 -5
- package/shared/definition2.js +10 -5
- package/shared/definition20.cjs +187 -227
- package/shared/definition20.js +183 -223
- package/shared/definition21.cjs +262 -69
- package/shared/definition21.js +261 -67
- package/shared/definition22.cjs +66 -61
- package/shared/definition22.js +64 -60
- package/shared/definition23.cjs +42 -77
- package/shared/definition23.js +41 -76
- package/shared/definition24.cjs +65 -2350
- package/shared/definition24.js +64 -2349
- package/shared/definition25.cjs +2402 -48
- package/shared/definition25.js +2401 -47
- package/shared/definition26.cjs +62 -28
- package/shared/definition26.js +61 -27
- package/shared/definition27.cjs +28 -54
- package/shared/definition27.js +27 -53
- package/shared/definition28.cjs +39 -819
- package/shared/definition28.js +38 -817
- package/shared/definition29.cjs +893 -54
- package/shared/definition29.js +893 -55
- package/shared/definition3.cjs +7 -10
- package/shared/definition3.js +7 -10
- package/shared/definition30.cjs +69 -85
- package/shared/definition30.js +68 -84
- package/shared/definition31.cjs +86 -23
- package/shared/definition31.js +86 -23
- package/shared/definition32.cjs +24 -14
- package/shared/definition32.js +23 -13
- package/shared/definition33.cjs +11 -53
- package/shared/definition33.js +10 -52
- package/shared/definition34.cjs +28 -500
- package/shared/definition34.js +28 -500
- package/shared/definition35.cjs +447 -194
- package/shared/definition35.js +447 -192
- package/shared/definition36.cjs +258 -188
- package/shared/definition36.js +255 -187
- package/shared/definition37.cjs +204 -78
- package/shared/definition37.js +203 -76
- package/shared/definition38.cjs +55 -51
- package/shared/definition38.js +52 -49
- package/shared/definition39.cjs +65 -423
- package/shared/definition39.js +64 -422
- package/shared/definition4.cjs +24 -12
- package/shared/definition4.js +24 -12
- package/shared/definition40.cjs +447 -35
- package/shared/definition40.js +444 -32
- package/shared/definition41.cjs +35 -678
- package/shared/definition41.js +34 -677
- package/shared/definition42.cjs +544 -99
- package/shared/definition42.js +543 -98
- package/shared/definition43.cjs +696 -77
- package/shared/definition43.js +695 -76
- package/shared/definition44.cjs +113 -563
- package/shared/definition44.js +112 -561
- package/shared/definition45.cjs +77 -117
- package/shared/definition45.js +75 -115
- package/shared/definition46.cjs +474 -86
- package/shared/definition46.js +474 -87
- package/shared/definition47.cjs +140 -23
- package/shared/definition47.js +139 -22
- package/shared/definition48.cjs +132 -57
- package/shared/definition48.js +131 -56
- package/shared/definition49.cjs +18 -524
- package/shared/definition49.js +17 -523
- package/shared/definition5.cjs +20 -17
- package/shared/definition5.js +20 -17
- package/shared/definition50.cjs +73 -25
- package/shared/definition50.js +72 -24
- package/shared/definition51.cjs +506 -99
- package/shared/definition51.js +505 -99
- package/shared/definition52.cjs +29 -277
- package/shared/definition52.js +28 -276
- package/shared/definition53.cjs +97 -256
- package/shared/definition53.js +97 -255
- package/shared/definition54.cjs +287 -769
- package/shared/definition54.js +287 -769
- package/shared/definition55.cjs +305 -105
- package/shared/definition55.js +304 -104
- package/shared/definition56.cjs +841 -81
- package/shared/definition56.js +840 -80
- package/shared/definition57.cjs +153 -69
- package/shared/definition57.js +152 -68
- package/shared/definition58.cjs +138 -299
- package/shared/definition58.js +137 -298
- package/shared/definition59.cjs +72 -27
- package/shared/definition59.js +71 -26
- package/shared/definition6.cjs +4 -5
- package/shared/definition6.js +4 -5
- package/shared/definition60.cjs +279 -1780
- package/shared/definition60.js +278 -1779
- package/shared/definition61.cjs +65870 -11
- package/shared/definition61.js +65869 -11
- package/shared/definition62.cjs +50 -0
- package/shared/definition62.js +46 -0
- package/shared/definition63.cjs +1828 -0
- package/shared/definition63.js +1824 -0
- package/shared/definition7.cjs +8 -6
- package/shared/definition7.js +8 -6
- package/shared/definition8.cjs +27 -20
- package/shared/definition8.js +27 -20
- package/shared/definition9.cjs +7 -10
- package/shared/definition9.js +7 -10
- package/shared/enums.cjs +8 -0
- package/shared/enums.js +8 -1
- package/shared/icon.cjs +7 -2
- package/shared/icon.js +7 -2
- package/shared/index2.cjs +67 -38
- package/shared/index2.js +67 -38
- package/shared/key-codes2.cjs +8 -0
- package/shared/key-codes2.js +5 -1
- package/shared/listbox.cjs +1 -1
- package/shared/listbox.js +1 -1
- package/shared/localization/Locale.d.ts +6 -0
- package/shared/patterns/form-elements/form-elements.d.ts +2 -3
- package/shared/patterns/index.d.ts +0 -1
- package/shared/presentationDate.cjs +140 -81
- package/shared/presentationDate.js +140 -81
- package/shared/slider.template.cjs +71 -0
- package/shared/slider.template.js +67 -0
- package/shared/text-anchor.cjs +6 -0
- package/shared/text-anchor.js +6 -0
- package/shared/text-anchor.template.cjs +33 -33
- package/shared/text-anchor.template.js +33 -33
- package/shared/text-field.cjs +1 -1
- package/shared/text-field.js +1 -1
- package/shared/utils/applyMixinsWithObservables.d.ts +1 -0
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/slider/index.cjs +2 -1
- package/slider/index.js +2 -1
- package/split-button/index.cjs +2 -2
- package/split-button/index.js +2 -2
- package/style.css +1 -0
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/fonts/spezia-variable.css +39 -13
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +4 -2
- package/switch/index.cjs +2 -2
- package/switch/index.js +2 -2
- package/tab/index.cjs +2 -2
- package/tab/index.js +2 -2
- package/tab-panel/index.cjs +1 -1
- package/tab-panel/index.js +1 -1
- package/tabs/index.cjs +4 -4
- package/tabs/index.js +4 -4
- package/tag/index.cjs +2 -2
- package/tag/index.js +2 -2
- package/tag-group/index.cjs +1 -1
- package/tag-group/index.js +1 -1
- package/text-area/index.cjs +4 -3
- package/text-area/index.js +4 -3
- package/text-field/index.cjs +4 -6
- package/text-field/index.js +4 -6
- package/time-picker/index.cjs +8 -10
- package/time-picker/index.js +8 -10
- package/toggletip/index.cjs +5 -5
- package/toggletip/index.js +5 -5
- package/tooltip/index.cjs +5 -5
- package/tooltip/index.js +5 -5
- package/tree-item/index.cjs +2 -2
- package/tree-item/index.js +2 -2
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +1 -1
- package/video-player/index.cjs +17 -0
- package/video-player/index.js +15 -0
- package/vivid.api.json +428 -1
- package/focus/index.cjs +0 -7
- package/focus/index.js +0 -5
- package/lib/focus/definition.d.ts +0 -3
- package/lib/focus/focus.d.ts +0 -3
- package/lib/focus/focus.template.d.ts +0 -4
- package/lib/popup/popup.d.ts +0 -21
- package/shared/focus.cjs +0 -8
- package/shared/focus.js +0 -6
- package/shared/focus2.cjs +0 -11
- package/shared/focus2.js +0 -9
- package/shared/patterns/focus.d.ts +0 -3
package/shared/definition54.cjs
CHANGED
|
@@ -1,217 +1,196 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const definition
|
|
5
|
-
const definition = require('./definition60.cjs');
|
|
6
|
-
const definition$2 = require('./definition11.cjs');
|
|
4
|
+
const definition = require('./definition27.cjs');
|
|
7
5
|
require('./affix.cjs');
|
|
8
6
|
const index$1 = require('./index2.cjs');
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
7
|
+
const Reflector = require('./Reflector.cjs');
|
|
8
|
+
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
9
|
+
const textField = require('./text-field2.cjs');
|
|
12
10
|
const applyMixins = require('./apply-mixins.cjs');
|
|
13
|
-
const
|
|
11
|
+
const formAssociated = require('./form-associated.cjs');
|
|
14
12
|
const when = require('./when.cjs');
|
|
15
|
-
const
|
|
13
|
+
const ref = require('./ref.cjs');
|
|
16
14
|
const classNames = require('./class-names.cjs');
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class _TimePicker extends index.FoundationElement {
|
|
16
|
+
class _TextArea extends index.FoundationElement {
|
|
21
17
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
class FormAssociatedTextArea extends formAssociated.FormAssociated(_TextArea) {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.proxy = document.createElement("textarea");
|
|
27
|
+
}
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (secondsNum < 0 || secondsNum > 59) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
return true;
|
|
54
|
-
};
|
|
55
|
-
const parseTimePart = (partStr) => Number.parseInt(partStr, 10);
|
|
56
|
-
const formatTimePart = (part) => part.toString().padStart(2, "0");
|
|
57
|
-
const parseTimeStr = (timeStr) => {
|
|
58
|
-
const [hoursStr, minutesStr, secondsStr] = timeStr.split(":");
|
|
59
|
-
const hours = parseTimePart(hoursStr);
|
|
60
|
-
const minutes = parseTimePart(minutesStr);
|
|
61
|
-
const seconds = parseTimePart(secondsStr);
|
|
62
|
-
return {
|
|
63
|
-
hourStr: hoursStr,
|
|
64
|
-
hours,
|
|
65
|
-
minuteStr: minutesStr,
|
|
66
|
-
minutes,
|
|
67
|
-
secondStr: secondsStr,
|
|
68
|
-
seconds,
|
|
69
|
-
meridiem: hours < 12 ? "AM" : "PM"
|
|
70
|
-
};
|
|
30
|
+
/**
|
|
31
|
+
* Resize mode for a TextArea
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
const TextAreaResize = {
|
|
35
|
+
/**
|
|
36
|
+
* No resize.
|
|
37
|
+
*/
|
|
38
|
+
none: "none",
|
|
39
|
+
/**
|
|
40
|
+
* Resize vertically and horizontally.
|
|
41
|
+
*/
|
|
42
|
+
both: "both",
|
|
43
|
+
/**
|
|
44
|
+
* Resize horizontally.
|
|
45
|
+
*/
|
|
46
|
+
horizontal: "horizontal",
|
|
47
|
+
/**
|
|
48
|
+
* Resize vertically.
|
|
49
|
+
*/
|
|
50
|
+
vertical: "vertical",
|
|
71
51
|
};
|
|
72
|
-
const hoursAs12hClock = (hour) => hour % 12 || 12;
|
|
73
52
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
53
|
+
/**
|
|
54
|
+
* A Text Area Custom HTML Element.
|
|
55
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
|
|
56
|
+
*
|
|
57
|
+
* @slot - The default slot for the label
|
|
58
|
+
* @csspart label - The label
|
|
59
|
+
* @csspart root - The element wrapping the control
|
|
60
|
+
* @csspart control - The textarea element
|
|
61
|
+
* @fires change - Emits a custom 'change' event when the textarea emits a change event
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
let TextArea$1 = class TextArea extends FormAssociatedTextArea {
|
|
66
|
+
constructor() {
|
|
67
|
+
super(...arguments);
|
|
68
|
+
/**
|
|
69
|
+
* The resize mode of the element.
|
|
70
|
+
* @public
|
|
71
|
+
* @remarks
|
|
72
|
+
* HTML Attribute: resize
|
|
73
|
+
*/
|
|
74
|
+
this.resize = TextAreaResize.none;
|
|
75
|
+
/**
|
|
76
|
+
* Sizes the element horizontally by a number of character columns.
|
|
77
|
+
*
|
|
78
|
+
* @public
|
|
79
|
+
* @remarks
|
|
80
|
+
* HTML Attribute: cols
|
|
81
|
+
*/
|
|
82
|
+
this.cols = 20;
|
|
83
|
+
/**
|
|
84
|
+
* @internal
|
|
85
|
+
*/
|
|
86
|
+
this.handleTextInput = () => {
|
|
87
|
+
this.value = this.control.value;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
readOnlyChanged() {
|
|
91
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
92
|
+
this.proxy.readOnly = this.readOnly;
|
|
93
|
+
}
|
|
108
94
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (meridiem && (numerals[0] < 1 || numerals[0] > 12)) {
|
|
114
|
-
throw new Error("Invalid time format");
|
|
115
|
-
}
|
|
116
|
-
if (meridiem || use12HourClock) {
|
|
117
|
-
if (numerals[0] === 12) {
|
|
118
|
-
numerals[0] = 0;
|
|
95
|
+
autofocusChanged() {
|
|
96
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
97
|
+
this.proxy.autofocus = this.autofocus;
|
|
98
|
+
}
|
|
119
99
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const [hours, minutes = 0, seconds = 0] = numerals;
|
|
125
|
-
if (hours > 23 || minutes > 59 || seconds > 59) {
|
|
126
|
-
throw new Error("Invalid value");
|
|
127
|
-
}
|
|
128
|
-
return [hours, minutes, seconds].map(formatTimePart).join(":");
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const fallsIntoMeridiem = (meridiem, hour) => meridiem === "AM" && hour < 12 || meridiem === "PM" && hour >= 12;
|
|
132
|
-
const getHoursOptions = (min, max, forMeridiem) => {
|
|
133
|
-
const result = [];
|
|
134
|
-
const minHour = min ? parseTimeStr(min).hours : 0;
|
|
135
|
-
const maxHour = max ? parseTimeStr(max).hours : 23;
|
|
136
|
-
for (let i = minHour; i <= maxHour; i++) {
|
|
137
|
-
if (forMeridiem && !fallsIntoMeridiem(forMeridiem, i)) {
|
|
138
|
-
continue;
|
|
100
|
+
listChanged() {
|
|
101
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
102
|
+
this.proxy.setAttribute("list", this.list);
|
|
103
|
+
}
|
|
139
104
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}
|
|
145
|
-
return result;
|
|
146
|
-
};
|
|
147
|
-
const getMinutesOptions = (step, value, min, max) => {
|
|
148
|
-
const result = [];
|
|
149
|
-
let minMinute = 0;
|
|
150
|
-
let maxMinute = 59;
|
|
151
|
-
if (min) {
|
|
152
|
-
const { hourStr: minHourStr, minutes: minMinutes } = parseTimeStr(min);
|
|
153
|
-
if (value && parseTimeStr(value).hourStr === minHourStr) {
|
|
154
|
-
minMinute = minMinutes;
|
|
105
|
+
maxlengthChanged() {
|
|
106
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
107
|
+
this.proxy.maxLength = this.maxlength;
|
|
108
|
+
}
|
|
155
109
|
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
maxMinute = maxMinutes;
|
|
110
|
+
minlengthChanged() {
|
|
111
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
112
|
+
this.proxy.minLength = this.minlength;
|
|
113
|
+
}
|
|
161
114
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
value: minutes,
|
|
167
|
-
label: minutes
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
return result;
|
|
171
|
-
};
|
|
172
|
-
const getSecondsOptions = (step, value, min, max) => {
|
|
173
|
-
const result = [];
|
|
174
|
-
let minSecond = 0;
|
|
175
|
-
let maxSecond = 59;
|
|
176
|
-
if (min) {
|
|
177
|
-
const minTime = parseTimeStr(min);
|
|
178
|
-
if (value && (parseTimeStr(value).hourStr === minTime.hourStr && parseTimeStr(value).minuteStr) === minTime.minuteStr) {
|
|
179
|
-
minSecond = minTime.seconds;
|
|
115
|
+
spellcheckChanged() {
|
|
116
|
+
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
117
|
+
this.proxy.spellcheck = this.spellcheck;
|
|
118
|
+
}
|
|
180
119
|
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
120
|
+
/**
|
|
121
|
+
* Selects all the text in the text area
|
|
122
|
+
*
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
select() {
|
|
126
|
+
this.control.select();
|
|
127
|
+
/**
|
|
128
|
+
* The select event does not permeate the shadow DOM boundary.
|
|
129
|
+
* This fn effectively proxies the select event,
|
|
130
|
+
* emitting a `select` event whenever the internal
|
|
131
|
+
* control emits a `select` event
|
|
132
|
+
*/
|
|
133
|
+
this.$emit("select");
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Change event handler for inner control.
|
|
137
|
+
* @remarks
|
|
138
|
+
* "Change" events are not `composable` so they will not
|
|
139
|
+
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
140
|
+
* the change event, emitting a `change` event whenever the internal
|
|
141
|
+
* control emits a `change` event
|
|
142
|
+
* @internal
|
|
143
|
+
*/
|
|
144
|
+
handleChange() {
|
|
145
|
+
this.$emit("change");
|
|
146
|
+
}
|
|
147
|
+
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
148
|
+
validate() {
|
|
149
|
+
super.validate(this.control);
|
|
186
150
|
}
|
|
187
|
-
}
|
|
188
|
-
for (let i = minSecond; i <= maxSecond; i += Math.max(1, step)) {
|
|
189
|
-
const seconds = formatTimePart(i);
|
|
190
|
-
result.push({
|
|
191
|
-
value: seconds,
|
|
192
|
-
label: seconds
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
return result;
|
|
196
|
-
};
|
|
197
|
-
const getMeridiesOptions = (min, max) => {
|
|
198
|
-
const result = [];
|
|
199
|
-
const hideAM = min ? parseTimeStr(min).meridiem === "PM" : false;
|
|
200
|
-
if (!hideAM) {
|
|
201
|
-
result.push({
|
|
202
|
-
value: "AM",
|
|
203
|
-
label: "AM"
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
const hidePM = max ? parseTimeStr(max).meridiem === "AM" : false;
|
|
207
|
-
if (!hidePM) {
|
|
208
|
-
result.push({
|
|
209
|
-
value: "PM",
|
|
210
|
-
label: "PM"
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
return result;
|
|
214
151
|
};
|
|
152
|
+
index.__decorate([
|
|
153
|
+
index.attr({ mode: "boolean" })
|
|
154
|
+
], TextArea$1.prototype, "readOnly", void 0);
|
|
155
|
+
index.__decorate([
|
|
156
|
+
index.attr
|
|
157
|
+
], TextArea$1.prototype, "resize", void 0);
|
|
158
|
+
index.__decorate([
|
|
159
|
+
index.attr({ mode: "boolean" })
|
|
160
|
+
], TextArea$1.prototype, "autofocus", void 0);
|
|
161
|
+
index.__decorate([
|
|
162
|
+
index.attr({ attribute: "form" })
|
|
163
|
+
], TextArea$1.prototype, "formId", void 0);
|
|
164
|
+
index.__decorate([
|
|
165
|
+
index.attr
|
|
166
|
+
], TextArea$1.prototype, "list", void 0);
|
|
167
|
+
index.__decorate([
|
|
168
|
+
index.attr({ converter: index.nullableNumberConverter })
|
|
169
|
+
], TextArea$1.prototype, "maxlength", void 0);
|
|
170
|
+
index.__decorate([
|
|
171
|
+
index.attr({ converter: index.nullableNumberConverter })
|
|
172
|
+
], TextArea$1.prototype, "minlength", void 0);
|
|
173
|
+
index.__decorate([
|
|
174
|
+
index.attr
|
|
175
|
+
], TextArea$1.prototype, "name", void 0);
|
|
176
|
+
index.__decorate([
|
|
177
|
+
index.attr
|
|
178
|
+
], TextArea$1.prototype, "placeholder", void 0);
|
|
179
|
+
index.__decorate([
|
|
180
|
+
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
181
|
+
], TextArea$1.prototype, "cols", void 0);
|
|
182
|
+
index.__decorate([
|
|
183
|
+
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
184
|
+
], TextArea$1.prototype, "rows", void 0);
|
|
185
|
+
index.__decorate([
|
|
186
|
+
index.attr({ mode: "boolean" })
|
|
187
|
+
], TextArea$1.prototype, "spellcheck", void 0);
|
|
188
|
+
index.__decorate([
|
|
189
|
+
index.observable
|
|
190
|
+
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
191
|
+
applyMixins.applyMixins(TextArea$1, textField.DelegatesARIATextbox);
|
|
192
|
+
|
|
193
|
+
const styles = ":host{display:inline-block}.base{display:inline-grid;grid-template-columns:1fr max-content;inline-size:100%;row-gap:4px}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-intermediate)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--_connotation-color-fierce)}.base:where(.hover,:hover):where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-primary);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:where(.disabled,:disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:where(.disabled,:disabled).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.readonly):where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base:where(.readonly):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:where(.error):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base:where(.error):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base:where(.success):where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base:where(.success):where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base.connotation-success{--_connotation-color-primary: var(--vvd-text-area-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-text-area-success-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-success-primary-increment, var(--vvd-color-success-600));--_connotation-color-intermediate: var(--vvd-text-area-success-intermediate, var(--vvd-color-success-500));--_connotation-color-firm: var(--vvd-text-area-success-firm, var(--vvd-color-success-600));--_connotation-color-fierce: var(--vvd-text-area-success-fierce, var(--vvd-color-success-700));--_connotation-color-faint: var(--vvd-text-area-success-faint, var(--vvd-color-success-50));--_connotation-color-soft: var(--vvd-text-area-success-soft, var(--vvd-color-success-100))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-text-area-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-text-area-alert-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-alert-primary-increment, var(--vvd-color-alert-600));--_connotation-color-intermediate: var(--vvd-text-area-alert-intermediate, var(--vvd-color-alert-500));--_connotation-color-firm: var(--vvd-text-area-alert-firm, var(--vvd-color-alert-600));--_connotation-color-fierce: var(--vvd-text-area-alert-fierce, var(--vvd-color-alert-700));--_connotation-color-faint: var(--vvd-text-area-alert-faint, var(--vvd-color-alert-50));--_connotation-color-soft: var(--vvd-text-area-alert-soft, var(--vvd-color-alert-100))}.base:not(.connotation-success,.connotation-alert){--_connotation-color-primary: var(--vvd-text-area-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-area-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-area-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-area-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-area-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-area-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-area-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-area-accent-soft, var(--vvd-color-neutral-100))}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);contain:inline-size;font:var(--vvd-typography-base);grid-column:1/2;grid-row:1;line-height:20px}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:2/-1}.control{padding:8px 16px;border:0 none;border-radius:8px;appearance:none;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);grid-column:1/-1;min-block-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2)));resize:none;transition:box-shadow .2s,background-color .2s,color .2s}@supports selector(::-webkit-resizer){.control::-webkit-resizer{background-image:linear-gradient(315deg,transparent 0,transparent 2px,var(--vvd-color-canvas-text) 2px,var(--vvd-color-canvas-text) 3px,transparent 3px,transparent 5px,var(--vvd-color-canvas-text) 5px,var(--vvd-color-canvas-text) 6px,transparent 6px,transparent 8px,transparent 100%);background-repeat:no-repeat;background-size:10px 10px;block-size:10px;inline-size:10px}}.control:disabled{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_appearance-color-text)}.control::placeholder,.control:disabled::placeholder{opacity:1;pointer-events:none;-webkit-text-fill-color:var(--_low-ink-color)}.control:focus-visible{--focus-stroke-gap-color: transparent;box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}:host([resize=both]) .control{resize:both}:host([resize=horizontal]) .control{resize:horizontal}:host([resize=vertical]) .control{resize:vertical}\n";
|
|
215
194
|
|
|
216
195
|
var __defProp = Object.defineProperty;
|
|
217
196
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -224,601 +203,140 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
224
203
|
__defProp(target, key, result);
|
|
225
204
|
return result;
|
|
226
205
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
206
|
+
var __accessCheck = (obj, member, msg) => {
|
|
207
|
+
if (!member.has(obj))
|
|
208
|
+
throw TypeError("Cannot " + msg);
|
|
209
|
+
};
|
|
210
|
+
var __privateGet = (obj, member, getter) => {
|
|
211
|
+
__accessCheck(obj, member, "read from private field");
|
|
212
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
213
|
+
};
|
|
214
|
+
var __privateAdd = (obj, member, value) => {
|
|
215
|
+
if (member.has(obj))
|
|
216
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
217
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
237
218
|
};
|
|
238
|
-
|
|
219
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
220
|
+
__accessCheck(obj, member, "write to private field");
|
|
221
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
222
|
+
return value;
|
|
223
|
+
};
|
|
224
|
+
var _reflectToTextArea;
|
|
225
|
+
let TextArea = class extends TextArea$1 {
|
|
239
226
|
constructor() {
|
|
240
|
-
super();
|
|
241
|
-
this
|
|
242
|
-
this.minutesStep = null;
|
|
243
|
-
this.secondsStep = null;
|
|
244
|
-
this.#getFocusableEls = () => this.shadowRoot.querySelectorAll(`
|
|
245
|
-
.dialog [tabindex="0"],
|
|
246
|
-
.dialog .vwc-button:not(:disabled)
|
|
247
|
-
`);
|
|
248
|
-
this.#onFocusIn = () => {
|
|
249
|
-
this.$emit("focus", void 0, { bubbles: false });
|
|
250
|
-
};
|
|
251
|
-
this.#onFocusOut = () => {
|
|
252
|
-
this.$emit("blur", void 0, { bubbles: false });
|
|
253
|
-
};
|
|
254
|
-
this._popupOpen = false;
|
|
255
|
-
this.#dismissOnClickOutside = (event) => {
|
|
256
|
-
if (!this._popupOpen) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
const path = event.composedPath();
|
|
260
|
-
const elementsToIgnoreClicksOn = [this._dialogEl, this._clockButtonEl];
|
|
261
|
-
if (!elementsToIgnoreClicksOn.some((element) => path.includes(element))) {
|
|
262
|
-
this._closePopup(false);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
this._presentationValue = "";
|
|
266
|
-
this.value = "";
|
|
267
|
-
this.min = "";
|
|
268
|
-
this.max = "";
|
|
269
|
-
this.proxy.type = "time";
|
|
270
|
-
this.proxy.step = "1";
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* @internal
|
|
274
|
-
*/
|
|
275
|
-
readOnlyChanged() {
|
|
276
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
277
|
-
this.proxy.readOnly = this.readOnly;
|
|
278
|
-
this.validate();
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* @internal
|
|
283
|
-
*/
|
|
284
|
-
minChanged(_, newMin) {
|
|
285
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
286
|
-
this.proxy.min = newMin;
|
|
287
|
-
this.validate();
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* @internal
|
|
292
|
-
*/
|
|
293
|
-
maxChanged(_, newMax) {
|
|
294
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
295
|
-
this.proxy.max = newMax;
|
|
296
|
-
this.validate();
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
// --- Core ---
|
|
300
|
-
/**
|
|
301
|
-
* @internal
|
|
302
|
-
*/
|
|
303
|
-
get _displaySeconds() {
|
|
304
|
-
return this.secondsStep !== null;
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* @internal
|
|
308
|
-
*/
|
|
309
|
-
get _use12hClock() {
|
|
310
|
-
return this.clock ? this.clock === "12h" : this.locale.timePicker.defaultTo12HourClock;
|
|
311
|
-
}
|
|
312
|
-
#getFocusableEls;
|
|
313
|
-
/**
|
|
314
|
-
* @internal
|
|
315
|
-
*/
|
|
316
|
-
valueChanged(previous, next) {
|
|
317
|
-
super.valueChanged(previous, next);
|
|
318
|
-
if (this.value) {
|
|
319
|
-
if (!isValidTimeStr(this.value)) {
|
|
320
|
-
this.value = "";
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
this._presentationValue = formatPresentationTime(
|
|
324
|
-
this.value,
|
|
325
|
-
this._displaySeconds,
|
|
326
|
-
this._use12hClock
|
|
327
|
-
);
|
|
328
|
-
} else {
|
|
329
|
-
this._presentationValue = "";
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
#updateValueDueToUserInteraction(newValue) {
|
|
333
|
-
this.value = newValue;
|
|
334
|
-
this.$emit("change");
|
|
335
|
-
this.$emit("input");
|
|
227
|
+
super(...arguments);
|
|
228
|
+
__privateAdd(this, _reflectToTextArea, void 0);
|
|
336
229
|
}
|
|
337
230
|
connectedCallback() {
|
|
338
231
|
super.connectedCallback();
|
|
339
|
-
|
|
340
|
-
this.
|
|
341
|
-
this.addEventListener("focusout", this.#onFocusOut);
|
|
232
|
+
__privateSet(this, _reflectToTextArea, new Reflector.Reflector(this, this.control));
|
|
233
|
+
__privateGet(this, _reflectToTextArea).property("value", "value", true);
|
|
342
234
|
}
|
|
343
235
|
disconnectedCallback() {
|
|
344
236
|
super.disconnectedCallback();
|
|
345
|
-
|
|
346
|
-
this.removeEventListener("focusin", this.#onFocusIn);
|
|
347
|
-
this.removeEventListener("focusout", this.#onFocusOut);
|
|
348
|
-
}
|
|
349
|
-
#onFocusIn;
|
|
350
|
-
#onFocusOut;
|
|
351
|
-
#dismissOnClickOutside;
|
|
352
|
-
#openPopupIfPossible() {
|
|
353
|
-
if (!this.readOnly) {
|
|
354
|
-
this._popupOpen = true;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
/**
|
|
358
|
-
* @internal
|
|
359
|
-
*/
|
|
360
|
-
_closePopup(restoreFocusToTextField = true) {
|
|
361
|
-
this._popupOpen = false;
|
|
362
|
-
if (restoreFocusToTextField) {
|
|
363
|
-
this._textFieldEl.focus();
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* On keydown anywhere in the time picker.
|
|
368
|
-
* @internal
|
|
369
|
-
*/
|
|
370
|
-
_onBaseKeyDown(event) {
|
|
371
|
-
if (event.key === "Escape") {
|
|
372
|
-
this._closePopup();
|
|
373
|
-
return false;
|
|
374
|
-
}
|
|
375
|
-
if (this._trappedFocus(event, this.#getFocusableEls)) {
|
|
376
|
-
return false;
|
|
377
|
-
}
|
|
378
|
-
return true;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* @internal
|
|
382
|
-
*/
|
|
383
|
-
_presentationValueChanged() {
|
|
384
|
-
this.dirtyValue = true;
|
|
385
|
-
this.validate();
|
|
386
|
-
}
|
|
387
|
-
/**
|
|
388
|
-
* @internal
|
|
389
|
-
*/
|
|
390
|
-
get _textFieldPlaceholder() {
|
|
391
|
-
let format = "hh:mm";
|
|
392
|
-
if (this._displaySeconds) {
|
|
393
|
-
format += ":ss";
|
|
394
|
-
}
|
|
395
|
-
if (this._use12hClock) {
|
|
396
|
-
format += " aa";
|
|
397
|
-
}
|
|
398
|
-
return format;
|
|
399
|
-
}
|
|
400
|
-
/**
|
|
401
|
-
* @internal
|
|
402
|
-
*/
|
|
403
|
-
_onTextFieldInput(event) {
|
|
404
|
-
const textField = event.currentTarget;
|
|
405
|
-
this._presentationValue = textField.value;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* @internal
|
|
409
|
-
*/
|
|
410
|
-
_onTextFieldChange() {
|
|
411
|
-
if (this._presentationValue === "") {
|
|
412
|
-
this.#updateValueDueToUserInteraction("");
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
try {
|
|
416
|
-
this.#updateValueDueToUserInteraction(
|
|
417
|
-
parsePresentationTime(this._presentationValue, this._use12hClock)
|
|
418
|
-
);
|
|
419
|
-
} catch (_) {
|
|
420
|
-
return;
|
|
421
|
-
}
|
|
422
|
-
}
|
|
423
|
-
// --- Clock button ---
|
|
424
|
-
/**
|
|
425
|
-
* @internal
|
|
426
|
-
*/
|
|
427
|
-
get _clockButtonLabel() {
|
|
428
|
-
if (this.value) {
|
|
429
|
-
return this.locale.timePicker.changeTimeLabel(formatPresentationTime(this.value, this._displaySeconds, this._use12hClock));
|
|
430
|
-
}
|
|
431
|
-
return this.locale.timePicker.chooseTimeLabel;
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
* @internal
|
|
435
|
-
*/
|
|
436
|
-
_onClockButtonClick() {
|
|
437
|
-
if (this._popupOpen) {
|
|
438
|
-
this._closePopup();
|
|
439
|
-
} else {
|
|
440
|
-
this.#openPopupIfPossible();
|
|
441
|
-
index.DOM.processUpdates();
|
|
442
|
-
if (this._selectedHour) {
|
|
443
|
-
this.#scrollToItem("hours", this._selectedHour, "start");
|
|
444
|
-
}
|
|
445
|
-
if (this._selectedMinute) {
|
|
446
|
-
this.#scrollToItem("minutes", this._selectedMinute, "start");
|
|
447
|
-
}
|
|
448
|
-
if (this._displaySeconds && this._selectedSecond) {
|
|
449
|
-
this.#scrollToItem("seconds", this._selectedSecond, "start");
|
|
450
|
-
}
|
|
451
|
-
if (this._use12hClock && this._selectedMeridiem) {
|
|
452
|
-
this.#scrollToItem("meridies", this._selectedMeridiem, "start");
|
|
453
|
-
}
|
|
454
|
-
this.#getFocusableEls()[0].focus();
|
|
455
|
-
}
|
|
456
|
-
}
|
|
457
|
-
// --- Pickers ---
|
|
458
|
-
/**
|
|
459
|
-
* @internal
|
|
460
|
-
*/
|
|
461
|
-
get _hours() {
|
|
462
|
-
return getHoursOptions(this.min, this.max, this._use12hClock ? this._selectedMeridiem ?? this._meridies[0].value : void 0);
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* @internal
|
|
466
|
-
*/
|
|
467
|
-
get _selectedHour() {
|
|
468
|
-
return this.value ? parseTimeStr(this.value).hourStr : void 0;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* @internal
|
|
472
|
-
*/
|
|
473
|
-
set _selectedHour(value) {
|
|
474
|
-
if (this.value) {
|
|
475
|
-
const { minuteStr, secondStr } = parseTimeStr(this.value);
|
|
476
|
-
this.value = `${value}:${minuteStr}:${secondStr}`;
|
|
477
|
-
} else {
|
|
478
|
-
this.value = `${value}:00:00`;
|
|
479
|
-
}
|
|
480
|
-
}
|
|
481
|
-
/**
|
|
482
|
-
* @internal
|
|
483
|
-
*/
|
|
484
|
-
get _minutes() {
|
|
485
|
-
return getMinutesOptions(this.minutesStep, this.value, this.min, this.max);
|
|
486
|
-
}
|
|
487
|
-
/**
|
|
488
|
-
* @internal
|
|
489
|
-
*/
|
|
490
|
-
get _selectedMinute() {
|
|
491
|
-
return this.value ? parseTimeStr(this.value).minuteStr : void 0;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* @internal
|
|
495
|
-
*/
|
|
496
|
-
set _selectedMinute(value) {
|
|
497
|
-
if (this.value) {
|
|
498
|
-
const { hourStr, secondStr } = parseTimeStr(this.value);
|
|
499
|
-
this.value = `${hourStr}:${value}:${secondStr}`;
|
|
500
|
-
} else {
|
|
501
|
-
this.value = `00:${value}:00`;
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* @internal
|
|
506
|
-
*/
|
|
507
|
-
get _seconds() {
|
|
508
|
-
return getSecondsOptions(this.secondsStep, this.value, this.min, this.max);
|
|
509
|
-
}
|
|
510
|
-
/**
|
|
511
|
-
* @internal
|
|
512
|
-
*/
|
|
513
|
-
get _selectedSecond() {
|
|
514
|
-
return this.value ? parseTimeStr(this.value).secondStr : void 0;
|
|
515
|
-
}
|
|
516
|
-
/**
|
|
517
|
-
* @internal
|
|
518
|
-
*/
|
|
519
|
-
set _selectedSecond(value) {
|
|
520
|
-
if (this.value) {
|
|
521
|
-
const { hourStr, minuteStr } = parseTimeStr(this.value);
|
|
522
|
-
this.value = `${hourStr}:${minuteStr}:${value}`;
|
|
523
|
-
} else {
|
|
524
|
-
this.value = `00:00:${value}`;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
/**
|
|
528
|
-
* @internal
|
|
529
|
-
*/
|
|
530
|
-
get _meridies() {
|
|
531
|
-
return getMeridiesOptions(this.min, this.max);
|
|
532
|
-
}
|
|
533
|
-
/**
|
|
534
|
-
* @internal
|
|
535
|
-
*/
|
|
536
|
-
get _selectedMeridiem() {
|
|
537
|
-
return this.value ? parseTimeStr(this.value).meridiem : void 0;
|
|
538
|
-
}
|
|
539
|
-
/**
|
|
540
|
-
* @internal
|
|
541
|
-
*/
|
|
542
|
-
set _selectedMeridiem(value) {
|
|
543
|
-
if (this.value) {
|
|
544
|
-
const { hours, minuteStr, secondStr } = parseTimeStr(this.value);
|
|
545
|
-
let adjustedHours = hours;
|
|
546
|
-
if (value === "AM" && hours >= 12) {
|
|
547
|
-
adjustedHours -= 12;
|
|
548
|
-
} else if (value === "PM" && hours < 12) {
|
|
549
|
-
adjustedHours += 12;
|
|
550
|
-
}
|
|
551
|
-
this.value = `${formatTimePart(adjustedHours)}:${minuteStr}:${secondStr}`;
|
|
552
|
-
} else {
|
|
553
|
-
if (value === "AM") {
|
|
554
|
-
this.value = "00:00:00";
|
|
555
|
-
} else {
|
|
556
|
-
this.value = "12:00:00";
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* @internal
|
|
562
|
-
*/
|
|
563
|
-
_onPickerKeyDown(picker, options, selectedValue, setSelectedValue, event) {
|
|
564
|
-
const offset = {
|
|
565
|
-
ArrowUp: -1,
|
|
566
|
-
ArrowDown: 1
|
|
567
|
-
}[event.key];
|
|
568
|
-
if (offset) {
|
|
569
|
-
event.preventDefault();
|
|
570
|
-
const index = options.findIndex((h) => h.value === selectedValue);
|
|
571
|
-
const newRawIndex = index === -1 ? 0 : index + offset;
|
|
572
|
-
const newIndex = (newRawIndex + options.length) % options.length;
|
|
573
|
-
const newValue = options[newIndex].value;
|
|
574
|
-
setSelectedValue(newValue);
|
|
575
|
-
this.#scrollToItem(picker, newValue, "nearest");
|
|
576
|
-
this.#updateValueDueToUserInteraction(this.value);
|
|
577
|
-
}
|
|
578
|
-
return true;
|
|
579
|
-
}
|
|
580
|
-
#scrollToItem(picker, selectedValue, position) {
|
|
581
|
-
const element = this.shadowRoot.querySelector(`#${picker}-${selectedValue}`);
|
|
582
|
-
if (!element) {
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
const parent = element.parentElement;
|
|
586
|
-
switch (position) {
|
|
587
|
-
case "start":
|
|
588
|
-
parent.scrollTop = element.offsetTop;
|
|
589
|
-
break;
|
|
590
|
-
case "nearest":
|
|
591
|
-
if (element.offsetTop < parent.scrollTop) {
|
|
592
|
-
parent.scrollTop = element.offsetTop;
|
|
593
|
-
}
|
|
594
|
-
if (element.offsetTop + element.offsetHeight > parent.scrollTop + parent.offsetHeight) {
|
|
595
|
-
parent.scrollTop = element.offsetTop + element.offsetHeight - parent.offsetHeight;
|
|
596
|
-
}
|
|
597
|
-
break;
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
/**
|
|
601
|
-
* @internal
|
|
602
|
-
*/
|
|
603
|
-
_onPickerItemClick(picker, setSelectedValue, value) {
|
|
604
|
-
setSelectedValue(value);
|
|
605
|
-
this.#scrollToItem(picker, value, "start");
|
|
606
|
-
this.#updateValueDueToUserInteraction(this.value);
|
|
607
|
-
const nextPickerEl = this.shadowRoot.querySelector(`#${picker} + .picker`);
|
|
608
|
-
if (nextPickerEl) {
|
|
609
|
-
nextPickerEl.focus();
|
|
610
|
-
} else {
|
|
611
|
-
this._closePopup();
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
// --- Dialog footer ---
|
|
615
|
-
/**
|
|
616
|
-
* @internal
|
|
617
|
-
*/
|
|
618
|
-
_onOkClick() {
|
|
619
|
-
this._closePopup();
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* @internal
|
|
623
|
-
*/
|
|
624
|
-
_onClearClick() {
|
|
625
|
-
this.#updateValueDueToUserInteraction("");
|
|
626
|
-
this._closePopup();
|
|
627
|
-
}
|
|
628
|
-
// --- Validation ---
|
|
629
|
-
/**
|
|
630
|
-
* @internal
|
|
631
|
-
*/
|
|
632
|
-
validate() {
|
|
633
|
-
if (this.proxy) {
|
|
634
|
-
this.proxy.setCustomValidity(this._getCustomValidationError() ?? "");
|
|
635
|
-
}
|
|
636
|
-
super.validate(this._textFieldEl?.querySelector("input") ?? void 0);
|
|
637
|
-
}
|
|
638
|
-
/**
|
|
639
|
-
* @internal
|
|
640
|
-
*/
|
|
641
|
-
_getCustomValidationError() {
|
|
642
|
-
if (this._isPresentationValueInvalid()) {
|
|
643
|
-
return this.locale.timePicker.invalidTimeError;
|
|
644
|
-
}
|
|
645
|
-
return null;
|
|
646
|
-
}
|
|
647
|
-
/**
|
|
648
|
-
* @internal
|
|
649
|
-
*/
|
|
650
|
-
_isPresentationValueInvalid() {
|
|
651
|
-
if (this._presentationValue === "") {
|
|
652
|
-
return false;
|
|
653
|
-
}
|
|
654
|
-
try {
|
|
655
|
-
parsePresentationTime(this._presentationValue, this._use12hClock);
|
|
656
|
-
return false;
|
|
657
|
-
} catch (_) {
|
|
658
|
-
return true;
|
|
659
|
-
}
|
|
237
|
+
__privateGet(this, _reflectToTextArea).destroy();
|
|
660
238
|
}
|
|
661
239
|
};
|
|
662
|
-
|
|
663
|
-
index.attr({ attribute: "readonly", mode: "boolean" })
|
|
664
|
-
], TimePicker.prototype, "readOnly", 2);
|
|
665
|
-
__decorateClass([
|
|
666
|
-
index.attr({ attribute: "minutes-step", converter: index.nullableNumberConverter })
|
|
667
|
-
], TimePicker.prototype, "minutesStep", 2);
|
|
668
|
-
__decorateClass([
|
|
669
|
-
index.attr({ attribute: "seconds-step", converter: index.nullableNumberConverter })
|
|
670
|
-
], TimePicker.prototype, "secondsStep", 2);
|
|
240
|
+
_reflectToTextArea = new WeakMap();
|
|
671
241
|
__decorateClass([
|
|
672
242
|
index.attr
|
|
673
|
-
],
|
|
674
|
-
__decorateClass([
|
|
675
|
-
index.attr({ converter: ValidTimeFilter })
|
|
676
|
-
], TimePicker.prototype, "min", 2);
|
|
677
|
-
__decorateClass([
|
|
678
|
-
index.attr({ converter: ValidTimeFilter })
|
|
679
|
-
], TimePicker.prototype, "max", 2);
|
|
680
|
-
__decorateClass([
|
|
681
|
-
index.observable
|
|
682
|
-
], TimePicker.prototype, "_popupOpen", 2);
|
|
683
|
-
__decorateClass([
|
|
684
|
-
index.observable
|
|
685
|
-
], TimePicker.prototype, "_presentationValue", 2);
|
|
686
|
-
TimePicker = __decorateClass([
|
|
243
|
+
], TextArea.prototype, "wrap", 2);
|
|
244
|
+
TextArea = __decorateClass([
|
|
687
245
|
index$1.errorText,
|
|
688
246
|
index$1.formElements
|
|
689
|
-
],
|
|
690
|
-
|
|
247
|
+
], TextArea);
|
|
248
|
+
applyMixinsWithObservables.applyMixinsWithObservables(
|
|
249
|
+
TextArea,
|
|
250
|
+
index$1.FormElementCharCount,
|
|
251
|
+
index$1.FormElementHelperText,
|
|
252
|
+
index$1.FormElementSuccessText
|
|
253
|
+
);
|
|
691
254
|
|
|
692
|
-
const
|
|
255
|
+
const getClasses = ({
|
|
256
|
+
value,
|
|
257
|
+
errorValidationMessage,
|
|
258
|
+
disabled,
|
|
259
|
+
placeholder,
|
|
260
|
+
readOnly,
|
|
261
|
+
successText
|
|
262
|
+
}) => classNames.classNames(
|
|
263
|
+
"base",
|
|
264
|
+
["readonly", readOnly],
|
|
265
|
+
["placeholder", Boolean(placeholder)],
|
|
266
|
+
["disabled", disabled],
|
|
267
|
+
["error", Boolean(errorValidationMessage)],
|
|
268
|
+
["has-value", Boolean(value)],
|
|
269
|
+
["success", !!successText]
|
|
270
|
+
);
|
|
271
|
+
function renderLabel() {
|
|
272
|
+
return index.html` <label for="control" class="label">
|
|
273
|
+
${(x) => x.label}
|
|
274
|
+
</label>`;
|
|
275
|
+
}
|
|
276
|
+
function renderCharCount() {
|
|
693
277
|
return index.html`
|
|
694
|
-
<
|
|
695
|
-
|
|
696
|
-
class="picker"
|
|
697
|
-
role="listbox"
|
|
698
|
-
tabindex="0"
|
|
699
|
-
aria-label="${getLabel}"
|
|
700
|
-
aria-activedescendant="${(x) => getSelected(x) ? `${id}-${getSelected(x)}` : void 0}"
|
|
701
|
-
@keydown="${(x, c) => x._onPickerKeyDown(id, getOptions(x), getSelected(x), setSelected(x), c.event)}"
|
|
278
|
+
<span class="char-count"
|
|
279
|
+
>${(x) => x.value ? x.value.length : 0} / ${(x) => x.maxlength}</span
|
|
702
280
|
>
|
|
703
|
-
${repeat.repeat(
|
|
704
|
-
getOptions,
|
|
705
|
-
index.html`
|
|
706
|
-
<li
|
|
707
|
-
id="${(x) => `${id}-${x.value}`}"
|
|
708
|
-
class="${(x, c) => classNames.classNames("item", [
|
|
709
|
-
"selected",
|
|
710
|
-
getSelected(c.parent) === x.value
|
|
711
|
-
])}"
|
|
712
|
-
role="option"
|
|
713
|
-
aria-selected="${(x, c) => getSelected(c.parent) === x.value}"
|
|
714
|
-
@click="${(x, c) => c.parent._onPickerItemClick(id, setSelected(c.parent), x.value)}"
|
|
715
|
-
>
|
|
716
|
-
${(x) => x.label}
|
|
717
|
-
</li>
|
|
718
|
-
`
|
|
719
|
-
)}
|
|
720
|
-
</ul>
|
|
721
281
|
`;
|
|
722
|
-
}
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
${
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
aria-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
(x) => x._selectedHour,
|
|
766
|
-
(x) => (v) => x._selectedHour = v,
|
|
767
|
-
(x) => x._hours
|
|
768
|
-
)}
|
|
769
|
-
${renderPicker(
|
|
770
|
-
"minutes",
|
|
771
|
-
(x) => x.locale.timePicker.minutesLabel,
|
|
772
|
-
(x) => x._selectedMinute,
|
|
773
|
-
(x) => (v) => x._selectedMinute = v,
|
|
774
|
-
(x) => x._minutes
|
|
775
|
-
)}
|
|
776
|
-
${when.when((x) => x._displaySeconds, renderPicker(
|
|
777
|
-
"seconds",
|
|
778
|
-
(x) => x.locale.timePicker.secondsLabel,
|
|
779
|
-
(x) => x._selectedSecond,
|
|
780
|
-
(x) => (v) => x._selectedSecond = v,
|
|
781
|
-
(x) => x._seconds
|
|
782
|
-
))}
|
|
783
|
-
${when.when((x) => x._use12hClock, renderPicker(
|
|
784
|
-
"meridies",
|
|
785
|
-
(x) => x.locale.timePicker.meridiesLabel,
|
|
786
|
-
(x) => x._selectedMeridiem,
|
|
787
|
-
(x) => (v) => x._selectedMeridiem = v,
|
|
788
|
-
(x) => x._meridies
|
|
789
|
-
))}
|
|
790
|
-
</div>
|
|
791
|
-
<div class="footer">
|
|
792
|
-
<${buttonTag}
|
|
793
|
-
class="vwc-button"
|
|
794
|
-
size="condensed"
|
|
795
|
-
label="${(x) => x.locale.timePicker.clearLabel}"
|
|
796
|
-
@click="${(x) => x._onClearClick()}"
|
|
797
|
-
></${buttonTag}>
|
|
798
|
-
<${buttonTag}
|
|
799
|
-
class="vwc-button"
|
|
800
|
-
size="condensed"
|
|
801
|
-
appearance="filled"
|
|
802
|
-
label="${(x) => x.locale.timePicker.okLabel}"
|
|
803
|
-
@click="${(x) => x._onOkClick()}"
|
|
804
|
-
></${buttonTag}>
|
|
805
|
-
</div>
|
|
806
|
-
</div>
|
|
807
|
-
</${popupTag}>
|
|
808
|
-
</div>`;
|
|
282
|
+
}
|
|
283
|
+
const TextAreaTemplate = (context) => {
|
|
284
|
+
return index.html`
|
|
285
|
+
<div class="${getClasses}">
|
|
286
|
+
${when.when((x) => x.charCount && x.maxlength, renderCharCount())}
|
|
287
|
+
${when.when((x) => x.label, renderLabel())}
|
|
288
|
+
<textarea
|
|
289
|
+
class="control"
|
|
290
|
+
id="control"
|
|
291
|
+
?autofocus="${(x) => x.autofocus}"
|
|
292
|
+
placeholder="${(x) => x.placeholder ? x.placeholder : null}"
|
|
293
|
+
name="${(x) => x.name ? x.name : null}"
|
|
294
|
+
minlength="${(x) => x.minlength ? x.minlength : null}"
|
|
295
|
+
maxlength="${(x) => x.maxlength ? x.maxlength : null}"
|
|
296
|
+
rows="${(x) => x.rows ? x.rows : null}"
|
|
297
|
+
cols="${(x) => x.cols ? x.cols : null}"
|
|
298
|
+
wrap="${(x) => x.wrap ? x.wrap : null}"
|
|
299
|
+
?readonly="${(x) => x.readOnly}"
|
|
300
|
+
?disabled="${(x) => x.disabled}"
|
|
301
|
+
?required="${(x) => x.required}"
|
|
302
|
+
?spellcheck="${(x) => x.spellcheck}"
|
|
303
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
304
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
305
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
306
|
+
aria-details="${(x) => x.ariaDetails}"
|
|
307
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
308
|
+
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
309
|
+
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
310
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
311
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
312
|
+
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
313
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
314
|
+
aria-live="${(x) => x.ariaLive}"
|
|
315
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
316
|
+
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
317
|
+
@input="${(x) => x.handleTextInput()}"
|
|
318
|
+
@change="${(x) => x.handleChange()}"
|
|
319
|
+
${ref.ref("control")}
|
|
320
|
+
>
|
|
321
|
+
</textarea>
|
|
322
|
+
${index$1.getFeedbackTemplate(context)}
|
|
323
|
+
</div>
|
|
324
|
+
`;
|
|
809
325
|
};
|
|
810
326
|
|
|
811
|
-
const
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
|
|
327
|
+
const textAreaDefinition = TextArea.compose(
|
|
328
|
+
{
|
|
329
|
+
baseName: "text-area",
|
|
330
|
+
template: TextAreaTemplate,
|
|
331
|
+
styles,
|
|
332
|
+
shadowOptions: {
|
|
333
|
+
delegatesFocus: true
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
);
|
|
337
|
+
const textAreaRegistries = [textAreaDefinition(), ...definition.iconRegistries];
|
|
338
|
+
const registerTextArea = index.registerFactory(textAreaRegistries);
|
|
821
339
|
|
|
822
|
-
exports.
|
|
823
|
-
exports.
|
|
824
|
-
exports.
|
|
340
|
+
exports.registerTextArea = registerTextArea;
|
|
341
|
+
exports.textAreaDefinition = textAreaDefinition;
|
|
342
|
+
exports.textAreaRegistries = textAreaRegistries;
|