@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/definition52.cjs
CHANGED
|
@@ -1,195 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index.cjs');
|
|
4
|
-
const definition = require('./definition26.cjs');
|
|
5
|
-
require('./affix.cjs');
|
|
6
|
-
const index$1 = require('./index2.cjs');
|
|
7
|
-
const Reflector = require('./Reflector.cjs');
|
|
8
|
-
const textField = require('./text-field2.cjs');
|
|
9
|
-
const applyMixins = require('./apply-mixins.cjs');
|
|
10
|
-
const formAssociated = require('./form-associated.cjs');
|
|
11
|
-
const when = require('./when.cjs');
|
|
12
|
-
const ref = require('./ref.cjs');
|
|
13
4
|
const classNames = require('./class-names.cjs');
|
|
14
5
|
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
class FormAssociatedTextArea extends formAssociated.FormAssociated(_TextArea) {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.proxy = document.createElement("textarea");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Resize mode for a TextArea
|
|
31
|
-
* @public
|
|
32
|
-
*/
|
|
33
|
-
const TextAreaResize = {
|
|
34
|
-
/**
|
|
35
|
-
* No resize.
|
|
36
|
-
*/
|
|
37
|
-
none: "none",
|
|
38
|
-
/**
|
|
39
|
-
* Resize vertically and horizontally.
|
|
40
|
-
*/
|
|
41
|
-
both: "both",
|
|
42
|
-
/**
|
|
43
|
-
* Resize horizontally.
|
|
44
|
-
*/
|
|
45
|
-
horizontal: "horizontal",
|
|
46
|
-
/**
|
|
47
|
-
* Resize vertically.
|
|
48
|
-
*/
|
|
49
|
-
vertical: "vertical",
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* A Text Area Custom HTML Element.
|
|
54
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
|
|
55
|
-
*
|
|
56
|
-
* @slot - The default slot for the label
|
|
57
|
-
* @csspart label - The label
|
|
58
|
-
* @csspart root - The element wrapping the control
|
|
59
|
-
* @csspart control - The textarea element
|
|
60
|
-
* @fires change - Emits a custom 'change' event when the textarea emits a change event
|
|
61
|
-
*
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
let TextArea$1 = class TextArea extends FormAssociatedTextArea {
|
|
65
|
-
constructor() {
|
|
66
|
-
super(...arguments);
|
|
67
|
-
/**
|
|
68
|
-
* The resize mode of the element.
|
|
69
|
-
* @public
|
|
70
|
-
* @remarks
|
|
71
|
-
* HTML Attribute: resize
|
|
72
|
-
*/
|
|
73
|
-
this.resize = TextAreaResize.none;
|
|
74
|
-
/**
|
|
75
|
-
* Sizes the element horizontally by a number of character columns.
|
|
76
|
-
*
|
|
77
|
-
* @public
|
|
78
|
-
* @remarks
|
|
79
|
-
* HTML Attribute: cols
|
|
80
|
-
*/
|
|
81
|
-
this.cols = 20;
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
|
-
this.handleTextInput = () => {
|
|
86
|
-
this.value = this.control.value;
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
readOnlyChanged() {
|
|
90
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
91
|
-
this.proxy.readOnly = this.readOnly;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
autofocusChanged() {
|
|
95
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
96
|
-
this.proxy.autofocus = this.autofocus;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
listChanged() {
|
|
100
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
101
|
-
this.proxy.setAttribute("list", this.list);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
maxlengthChanged() {
|
|
105
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
106
|
-
this.proxy.maxLength = this.maxlength;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
minlengthChanged() {
|
|
110
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
111
|
-
this.proxy.minLength = this.minlength;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
spellcheckChanged() {
|
|
115
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
116
|
-
this.proxy.spellcheck = this.spellcheck;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Selects all the text in the text area
|
|
121
|
-
*
|
|
122
|
-
* @public
|
|
123
|
-
*/
|
|
124
|
-
select() {
|
|
125
|
-
this.control.select();
|
|
126
|
-
/**
|
|
127
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
128
|
-
* This fn effectively proxies the select event,
|
|
129
|
-
* emitting a `select` event whenever the internal
|
|
130
|
-
* control emits a `select` event
|
|
131
|
-
*/
|
|
132
|
-
this.$emit("select");
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Change event handler for inner control.
|
|
136
|
-
* @remarks
|
|
137
|
-
* "Change" events are not `composable` so they will not
|
|
138
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
139
|
-
* the change event, emitting a `change` event whenever the internal
|
|
140
|
-
* control emits a `change` event
|
|
141
|
-
* @internal
|
|
142
|
-
*/
|
|
143
|
-
handleChange() {
|
|
144
|
-
this.$emit("change");
|
|
145
|
-
}
|
|
146
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
147
|
-
validate() {
|
|
148
|
-
super.validate(this.control);
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
index.__decorate([
|
|
152
|
-
index.attr({ mode: "boolean" })
|
|
153
|
-
], TextArea$1.prototype, "readOnly", void 0);
|
|
154
|
-
index.__decorate([
|
|
155
|
-
index.attr
|
|
156
|
-
], TextArea$1.prototype, "resize", void 0);
|
|
157
|
-
index.__decorate([
|
|
158
|
-
index.attr({ mode: "boolean" })
|
|
159
|
-
], TextArea$1.prototype, "autofocus", void 0);
|
|
160
|
-
index.__decorate([
|
|
161
|
-
index.attr({ attribute: "form" })
|
|
162
|
-
], TextArea$1.prototype, "formId", void 0);
|
|
163
|
-
index.__decorate([
|
|
164
|
-
index.attr
|
|
165
|
-
], TextArea$1.prototype, "list", void 0);
|
|
166
|
-
index.__decorate([
|
|
167
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
168
|
-
], TextArea$1.prototype, "maxlength", void 0);
|
|
169
|
-
index.__decorate([
|
|
170
|
-
index.attr({ converter: index.nullableNumberConverter })
|
|
171
|
-
], TextArea$1.prototype, "minlength", void 0);
|
|
172
|
-
index.__decorate([
|
|
173
|
-
index.attr
|
|
174
|
-
], TextArea$1.prototype, "name", void 0);
|
|
175
|
-
index.__decorate([
|
|
176
|
-
index.attr
|
|
177
|
-
], TextArea$1.prototype, "placeholder", void 0);
|
|
178
|
-
index.__decorate([
|
|
179
|
-
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
180
|
-
], TextArea$1.prototype, "cols", void 0);
|
|
181
|
-
index.__decorate([
|
|
182
|
-
index.attr({ converter: index.nullableNumberConverter, mode: "fromView" })
|
|
183
|
-
], TextArea$1.prototype, "rows", void 0);
|
|
184
|
-
index.__decorate([
|
|
185
|
-
index.attr({ mode: "boolean" })
|
|
186
|
-
], TextArea$1.prototype, "spellcheck", void 0);
|
|
187
|
-
index.__decorate([
|
|
188
|
-
index.observable
|
|
189
|
-
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
190
|
-
applyMixins.applyMixins(TextArea$1, textField.DelegatesARIATextbox);
|
|
191
|
-
|
|
192
|
-
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;appearance:none;background-color:var(--_appearance-color-fill);border-radius:8px;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}.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";
|
|
6
|
+
const styles = ".base{display:flex;flex-wrap:wrap;gap:8px}\n";
|
|
193
7
|
|
|
194
8
|
var __defProp = Object.defineProperty;
|
|
195
9
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -202,102 +16,40 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
202
16
|
__defProp(target, key, result);
|
|
203
17
|
return result;
|
|
204
18
|
};
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
this.#reflectToTextArea = new Reflector.Reflector(this, this.control);
|
|
210
|
-
this.#reflectToTextArea.property("value", "value", true);
|
|
19
|
+
class TagGroup extends index.FoundationElement {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.ariaLabel = null;
|
|
211
23
|
}
|
|
212
|
-
|
|
213
|
-
super.disconnectedCallback();
|
|
214
|
-
this.#reflectToTextArea.destroy();
|
|
215
|
-
}
|
|
216
|
-
};
|
|
24
|
+
}
|
|
217
25
|
__decorateClass([
|
|
218
|
-
index.attr
|
|
219
|
-
],
|
|
220
|
-
TextArea = __decorateClass([
|
|
221
|
-
index$1.errorText,
|
|
222
|
-
index$1.formElements
|
|
223
|
-
], TextArea);
|
|
224
|
-
applyMixins.applyMixins(TextArea, index$1.FormElementCharCount, index$1.FormElementHelperText, index$1.FormElementSuccessText);
|
|
26
|
+
index.attr({ attribute: "aria-label" })
|
|
27
|
+
], TagGroup.prototype, "ariaLabel", 2);
|
|
225
28
|
|
|
226
|
-
const getClasses = (
|
|
227
|
-
|
|
228
|
-
["readonly", readOnly],
|
|
229
|
-
["placeholder", Boolean(placeholder)],
|
|
230
|
-
["disabled", disabled],
|
|
231
|
-
["error", Boolean(errorValidationMessage)],
|
|
232
|
-
["has-value", Boolean(value)],
|
|
233
|
-
["success", !!successText]
|
|
234
|
-
);
|
|
235
|
-
function renderLabel() {
|
|
236
|
-
return index.html`
|
|
237
|
-
<label for="control" class="label">
|
|
238
|
-
${(x) => x.label}
|
|
239
|
-
</label>`;
|
|
240
|
-
}
|
|
241
|
-
function renderCharCount() {
|
|
29
|
+
const getClasses = (_) => classNames.classNames("base");
|
|
30
|
+
const TagGroupTemplate = () => {
|
|
242
31
|
return index.html`
|
|
243
|
-
<
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
<textarea class="control" id="control"
|
|
252
|
-
?autofocus="${(x) => x.autofocus}"
|
|
253
|
-
placeholder="${(x) => x.placeholder ? x.placeholder : null}"
|
|
254
|
-
name="${(x) => x.name ? x.name : null}"
|
|
255
|
-
minlength="${(x) => x.minlength ? x.minlength : null}"
|
|
256
|
-
maxlength="${(x) => x.maxlength ? x.maxlength : null}"
|
|
257
|
-
rows="${(x) => x.rows ? x.rows : null}"
|
|
258
|
-
cols="${(x) => x.cols ? x.cols : null}"
|
|
259
|
-
wrap="${(x) => x.wrap ? x.wrap : null}"
|
|
260
|
-
?readonly="${(x) => x.readOnly}"
|
|
261
|
-
?disabled="${(x) => x.disabled}"
|
|
262
|
-
?required="${(x) => x.required}"
|
|
263
|
-
?spellcheck="${(x) => x.spellcheck}"
|
|
264
|
-
aria-atomic="${(x) => x.ariaAtomic}"
|
|
265
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
266
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
267
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
268
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
269
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
270
|
-
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
271
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
272
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
273
|
-
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
274
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
275
|
-
aria-live="${(x) => x.ariaLive}"
|
|
276
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
277
|
-
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
278
|
-
@input="${(x) => x.handleTextInput()}"
|
|
279
|
-
@change="${(x) => x.handleChange()}"
|
|
280
|
-
${ref.ref("control")}
|
|
281
|
-
>
|
|
282
|
-
</textarea>
|
|
283
|
-
${when.when((x) => !x.successText && !x.errorValidationMessage && x.helperText?.length, index$1.getFeedbackTemplate("helper", context))}
|
|
284
|
-
${when.when((x) => !x.successText && x.errorValidationMessage, index$1.getFeedbackTemplate("error", context))}
|
|
285
|
-
${when.when((x) => x.successText, index$1.getFeedbackTemplate("success", context))}
|
|
286
|
-
</div>
|
|
32
|
+
<div
|
|
33
|
+
class="${getClasses}"
|
|
34
|
+
role="listbox"
|
|
35
|
+
aria-orientation="horizontal"
|
|
36
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
37
|
+
>
|
|
38
|
+
<slot></slot>
|
|
39
|
+
</div>
|
|
287
40
|
`;
|
|
288
41
|
};
|
|
289
42
|
|
|
290
|
-
const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
delegatesFocus: true
|
|
43
|
+
const tagGroupDefinition = TagGroup.compose(
|
|
44
|
+
{
|
|
45
|
+
baseName: "tag-group",
|
|
46
|
+
template: TagGroupTemplate,
|
|
47
|
+
styles
|
|
296
48
|
}
|
|
297
|
-
|
|
298
|
-
const
|
|
299
|
-
const
|
|
49
|
+
);
|
|
50
|
+
const tagGroupRegistries = [tagGroupDefinition()];
|
|
51
|
+
const registerTagGroup = index.registerFactory(tagGroupRegistries);
|
|
300
52
|
|
|
301
|
-
exports.
|
|
302
|
-
exports.
|
|
303
|
-
exports.
|
|
53
|
+
exports.registerTagGroup = registerTagGroup;
|
|
54
|
+
exports.tagGroupDefinition = tagGroupDefinition;
|
|
55
|
+
exports.tagGroupRegistries = tagGroupRegistries;
|
package/shared/definition52.js
CHANGED
|
@@ -1,193 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as iconRegistries } from './definition26.js';
|
|
3
|
-
import './affix.js';
|
|
4
|
-
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './index2.js';
|
|
5
|
-
import { R as Reflector } from './Reflector.js';
|
|
6
|
-
import { D as DelegatesARIATextbox } from './text-field2.js';
|
|
7
|
-
import { a as applyMixins } from './apply-mixins.js';
|
|
8
|
-
import { F as FormAssociated } from './form-associated.js';
|
|
9
|
-
import { w as when } from './when.js';
|
|
10
|
-
import { r as ref } from './ref.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
|
|
11
2
|
import { c as classNames } from './class-names.js';
|
|
12
3
|
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextArea:class)} component.
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
class FormAssociatedTextArea extends FormAssociated(_TextArea) {
|
|
21
|
-
constructor() {
|
|
22
|
-
super(...arguments);
|
|
23
|
-
this.proxy = document.createElement("textarea");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Resize mode for a TextArea
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
const TextAreaResize = {
|
|
32
|
-
/**
|
|
33
|
-
* No resize.
|
|
34
|
-
*/
|
|
35
|
-
none: "none",
|
|
36
|
-
/**
|
|
37
|
-
* Resize vertically and horizontally.
|
|
38
|
-
*/
|
|
39
|
-
both: "both",
|
|
40
|
-
/**
|
|
41
|
-
* Resize horizontally.
|
|
42
|
-
*/
|
|
43
|
-
horizontal: "horizontal",
|
|
44
|
-
/**
|
|
45
|
-
* Resize vertically.
|
|
46
|
-
*/
|
|
47
|
-
vertical: "vertical",
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* A Text Area Custom HTML Element.
|
|
52
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea | <textarea> element }.
|
|
53
|
-
*
|
|
54
|
-
* @slot - The default slot for the label
|
|
55
|
-
* @csspart label - The label
|
|
56
|
-
* @csspart root - The element wrapping the control
|
|
57
|
-
* @csspart control - The textarea element
|
|
58
|
-
* @fires change - Emits a custom 'change' event when the textarea emits a change event
|
|
59
|
-
*
|
|
60
|
-
* @public
|
|
61
|
-
*/
|
|
62
|
-
let TextArea$1 = class TextArea extends FormAssociatedTextArea {
|
|
63
|
-
constructor() {
|
|
64
|
-
super(...arguments);
|
|
65
|
-
/**
|
|
66
|
-
* The resize mode of the element.
|
|
67
|
-
* @public
|
|
68
|
-
* @remarks
|
|
69
|
-
* HTML Attribute: resize
|
|
70
|
-
*/
|
|
71
|
-
this.resize = TextAreaResize.none;
|
|
72
|
-
/**
|
|
73
|
-
* Sizes the element horizontally by a number of character columns.
|
|
74
|
-
*
|
|
75
|
-
* @public
|
|
76
|
-
* @remarks
|
|
77
|
-
* HTML Attribute: cols
|
|
78
|
-
*/
|
|
79
|
-
this.cols = 20;
|
|
80
|
-
/**
|
|
81
|
-
* @internal
|
|
82
|
-
*/
|
|
83
|
-
this.handleTextInput = () => {
|
|
84
|
-
this.value = this.control.value;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
readOnlyChanged() {
|
|
88
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
89
|
-
this.proxy.readOnly = this.readOnly;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
autofocusChanged() {
|
|
93
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
94
|
-
this.proxy.autofocus = this.autofocus;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
listChanged() {
|
|
98
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
99
|
-
this.proxy.setAttribute("list", this.list);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
maxlengthChanged() {
|
|
103
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
104
|
-
this.proxy.maxLength = this.maxlength;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
minlengthChanged() {
|
|
108
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
109
|
-
this.proxy.minLength = this.minlength;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
spellcheckChanged() {
|
|
113
|
-
if (this.proxy instanceof HTMLTextAreaElement) {
|
|
114
|
-
this.proxy.spellcheck = this.spellcheck;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Selects all the text in the text area
|
|
119
|
-
*
|
|
120
|
-
* @public
|
|
121
|
-
*/
|
|
122
|
-
select() {
|
|
123
|
-
this.control.select();
|
|
124
|
-
/**
|
|
125
|
-
* The select event does not permeate the shadow DOM boundary.
|
|
126
|
-
* This fn effectively proxies the select event,
|
|
127
|
-
* emitting a `select` event whenever the internal
|
|
128
|
-
* control emits a `select` event
|
|
129
|
-
*/
|
|
130
|
-
this.$emit("select");
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Change event handler for inner control.
|
|
134
|
-
* @remarks
|
|
135
|
-
* "Change" events are not `composable` so they will not
|
|
136
|
-
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
137
|
-
* the change event, emitting a `change` event whenever the internal
|
|
138
|
-
* control emits a `change` event
|
|
139
|
-
* @internal
|
|
140
|
-
*/
|
|
141
|
-
handleChange() {
|
|
142
|
-
this.$emit("change");
|
|
143
|
-
}
|
|
144
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
145
|
-
validate() {
|
|
146
|
-
super.validate(this.control);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
__decorate([
|
|
150
|
-
attr({ mode: "boolean" })
|
|
151
|
-
], TextArea$1.prototype, "readOnly", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
attr
|
|
154
|
-
], TextArea$1.prototype, "resize", void 0);
|
|
155
|
-
__decorate([
|
|
156
|
-
attr({ mode: "boolean" })
|
|
157
|
-
], TextArea$1.prototype, "autofocus", void 0);
|
|
158
|
-
__decorate([
|
|
159
|
-
attr({ attribute: "form" })
|
|
160
|
-
], TextArea$1.prototype, "formId", void 0);
|
|
161
|
-
__decorate([
|
|
162
|
-
attr
|
|
163
|
-
], TextArea$1.prototype, "list", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
attr({ converter: nullableNumberConverter })
|
|
166
|
-
], TextArea$1.prototype, "maxlength", void 0);
|
|
167
|
-
__decorate([
|
|
168
|
-
attr({ converter: nullableNumberConverter })
|
|
169
|
-
], TextArea$1.prototype, "minlength", void 0);
|
|
170
|
-
__decorate([
|
|
171
|
-
attr
|
|
172
|
-
], TextArea$1.prototype, "name", void 0);
|
|
173
|
-
__decorate([
|
|
174
|
-
attr
|
|
175
|
-
], TextArea$1.prototype, "placeholder", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
178
|
-
], TextArea$1.prototype, "cols", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
attr({ converter: nullableNumberConverter, mode: "fromView" })
|
|
181
|
-
], TextArea$1.prototype, "rows", void 0);
|
|
182
|
-
__decorate([
|
|
183
|
-
attr({ mode: "boolean" })
|
|
184
|
-
], TextArea$1.prototype, "spellcheck", void 0);
|
|
185
|
-
__decorate([
|
|
186
|
-
observable
|
|
187
|
-
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
188
|
-
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
189
|
-
|
|
190
|
-
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;appearance:none;background-color:var(--_appearance-color-fill);border-radius:8px;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}.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";
|
|
4
|
+
const styles = ".base{display:flex;flex-wrap:wrap;gap:8px}\n";
|
|
191
5
|
|
|
192
6
|
var __defProp = Object.defineProperty;
|
|
193
7
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -200,100 +14,38 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
200
14
|
__defProp(target, key, result);
|
|
201
15
|
return result;
|
|
202
16
|
};
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
this.#reflectToTextArea = new Reflector(this, this.control);
|
|
208
|
-
this.#reflectToTextArea.property("value", "value", true);
|
|
17
|
+
class TagGroup extends FoundationElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.ariaLabel = null;
|
|
209
21
|
}
|
|
210
|
-
|
|
211
|
-
super.disconnectedCallback();
|
|
212
|
-
this.#reflectToTextArea.destroy();
|
|
213
|
-
}
|
|
214
|
-
};
|
|
22
|
+
}
|
|
215
23
|
__decorateClass([
|
|
216
|
-
attr
|
|
217
|
-
],
|
|
218
|
-
TextArea = __decorateClass([
|
|
219
|
-
errorText,
|
|
220
|
-
formElements
|
|
221
|
-
], TextArea);
|
|
222
|
-
applyMixins(TextArea, FormElementCharCount, FormElementHelperText, FormElementSuccessText);
|
|
24
|
+
attr({ attribute: "aria-label" })
|
|
25
|
+
], TagGroup.prototype, "ariaLabel", 2);
|
|
223
26
|
|
|
224
|
-
const getClasses = (
|
|
225
|
-
|
|
226
|
-
["readonly", readOnly],
|
|
227
|
-
["placeholder", Boolean(placeholder)],
|
|
228
|
-
["disabled", disabled],
|
|
229
|
-
["error", Boolean(errorValidationMessage)],
|
|
230
|
-
["has-value", Boolean(value)],
|
|
231
|
-
["success", !!successText]
|
|
232
|
-
);
|
|
233
|
-
function renderLabel() {
|
|
234
|
-
return html`
|
|
235
|
-
<label for="control" class="label">
|
|
236
|
-
${(x) => x.label}
|
|
237
|
-
</label>`;
|
|
238
|
-
}
|
|
239
|
-
function renderCharCount() {
|
|
27
|
+
const getClasses = (_) => classNames("base");
|
|
28
|
+
const TagGroupTemplate = () => {
|
|
240
29
|
return html`
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<textarea class="control" id="control"
|
|
250
|
-
?autofocus="${(x) => x.autofocus}"
|
|
251
|
-
placeholder="${(x) => x.placeholder ? x.placeholder : null}"
|
|
252
|
-
name="${(x) => x.name ? x.name : null}"
|
|
253
|
-
minlength="${(x) => x.minlength ? x.minlength : null}"
|
|
254
|
-
maxlength="${(x) => x.maxlength ? x.maxlength : null}"
|
|
255
|
-
rows="${(x) => x.rows ? x.rows : null}"
|
|
256
|
-
cols="${(x) => x.cols ? x.cols : null}"
|
|
257
|
-
wrap="${(x) => x.wrap ? x.wrap : null}"
|
|
258
|
-
?readonly="${(x) => x.readOnly}"
|
|
259
|
-
?disabled="${(x) => x.disabled}"
|
|
260
|
-
?required="${(x) => x.required}"
|
|
261
|
-
?spellcheck="${(x) => x.spellcheck}"
|
|
262
|
-
aria-atomic="${(x) => x.ariaAtomic}"
|
|
263
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
264
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
265
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
266
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
267
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
268
|
-
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
269
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
270
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
271
|
-
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
272
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
273
|
-
aria-live="${(x) => x.ariaLive}"
|
|
274
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
275
|
-
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
276
|
-
@input="${(x) => x.handleTextInput()}"
|
|
277
|
-
@change="${(x) => x.handleChange()}"
|
|
278
|
-
${ref("control")}
|
|
279
|
-
>
|
|
280
|
-
</textarea>
|
|
281
|
-
${when((x) => !x.successText && !x.errorValidationMessage && x.helperText?.length, getFeedbackTemplate("helper", context))}
|
|
282
|
-
${when((x) => !x.successText && x.errorValidationMessage, getFeedbackTemplate("error", context))}
|
|
283
|
-
${when((x) => x.successText, getFeedbackTemplate("success", context))}
|
|
284
|
-
</div>
|
|
30
|
+
<div
|
|
31
|
+
class="${getClasses}"
|
|
32
|
+
role="listbox"
|
|
33
|
+
aria-orientation="horizontal"
|
|
34
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
35
|
+
>
|
|
36
|
+
<slot></slot>
|
|
37
|
+
</div>
|
|
285
38
|
`;
|
|
286
39
|
};
|
|
287
40
|
|
|
288
|
-
const
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
delegatesFocus: true
|
|
41
|
+
const tagGroupDefinition = TagGroup.compose(
|
|
42
|
+
{
|
|
43
|
+
baseName: "tag-group",
|
|
44
|
+
template: TagGroupTemplate,
|
|
45
|
+
styles
|
|
294
46
|
}
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
const
|
|
47
|
+
);
|
|
48
|
+
const tagGroupRegistries = [tagGroupDefinition()];
|
|
49
|
+
const registerTagGroup = registerFactory(tagGroupRegistries);
|
|
298
50
|
|
|
299
|
-
export {
|
|
51
|
+
export { tagGroupRegistries as a, registerTagGroup as r, tagGroupDefinition as t };
|