@vonage/vivid 4.14.1 → 4.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +22 -174
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- package/package.json +1 -1
- package/shared/affix.js +1 -1
- package/shared/definition.js +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition16.cjs +1 -2
- package/shared/definition16.js +2 -3
- package/shared/definition17.cjs +9 -7
- package/shared/definition17.js +9 -7
- package/shared/definition22.cjs +2 -1
- package/shared/definition22.js +2 -1
- package/shared/definition24.js +1 -1
- package/shared/definition27.cjs +1 -1
- package/shared/definition27.js +1 -1
- package/shared/definition29.js +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition33.js +1 -1
- package/shared/definition34.cjs +88 -19
- package/shared/definition34.js +72 -3
- package/shared/definition35.cjs +2 -201
- package/shared/definition35.js +4 -201
- package/shared/definition4.js +1 -1
- package/shared/definition42.cjs +3 -3
- package/shared/definition42.js +3 -3
- package/shared/definition43.cjs +9 -9
- package/shared/definition43.js +5 -5
- package/shared/definition47.js +1 -1
- package/shared/definition50.js +1 -1
- package/shared/definition51.cjs +39 -17
- package/shared/definition51.js +24 -2
- package/shared/definition53.js +1 -1
- package/shared/definition59.js +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.js +1 -1
- package/shared/foundation-element.cjs +1417 -0
- package/shared/foundation-element.js +1414 -0
- package/shared/key-codes2.cjs +0 -1469
- package/shared/key-codes2.js +1 -1464
- package/shared/listbox.cjs +3 -3
- package/shared/listbox.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- package/shared/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.js +1 -1
- package/shared/text-field2.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/listbox2.cjs +0 -1267
- package/shared/listbox2.js +0 -1264
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/custom-elements.json
CHANGED
|
@@ -5833,6 +5833,10 @@
|
|
|
5833
5833
|
"description": "When true the component will not add itself to the tab queue.\nDefault is false.",
|
|
5834
5834
|
"privacy": "public"
|
|
5835
5835
|
},
|
|
5836
|
+
{
|
|
5837
|
+
"kind": "method",
|
|
5838
|
+
"name": "#setTabIndex"
|
|
5839
|
+
},
|
|
5836
5840
|
{
|
|
5837
5841
|
"kind": "field",
|
|
5838
5842
|
"name": "generateHeader",
|
|
@@ -8029,6 +8033,16 @@
|
|
|
8029
8033
|
"kind": "javascript-module",
|
|
8030
8034
|
"path": "libs/components/src/lib/divider/divider.ts",
|
|
8031
8035
|
"declarations": [
|
|
8036
|
+
{
|
|
8037
|
+
"kind": "variable",
|
|
8038
|
+
"name": "DividerRole",
|
|
8039
|
+
"type": {
|
|
8040
|
+
"text": "{\n\t/**\n\t * The divider semantically separates content\n\t */\n\tseparator: 'separator',\n\n\t/**\n\t * The divider has no semantic value and is for visual presentation only.\n\t */\n\tpresentation: 'presentation',\n}"
|
|
8041
|
+
},
|
|
8042
|
+
"default": "{\n\t/**\n\t * The divider semantically separates content\n\t */\n\tseparator: 'separator',\n\n\t/**\n\t * The divider has no semantic value and is for visual presentation only.\n\t */\n\tpresentation: 'presentation',\n}",
|
|
8043
|
+
"description": "Divider roles",
|
|
8044
|
+
"privacy": "public"
|
|
8045
|
+
},
|
|
8032
8046
|
{
|
|
8033
8047
|
"kind": "class",
|
|
8034
8048
|
"description": "",
|
|
@@ -8082,6 +8096,14 @@
|
|
|
8082
8096
|
}
|
|
8083
8097
|
],
|
|
8084
8098
|
"exports": [
|
|
8099
|
+
{
|
|
8100
|
+
"kind": "js",
|
|
8101
|
+
"name": "DividerRole",
|
|
8102
|
+
"declaration": {
|
|
8103
|
+
"name": "DividerRole",
|
|
8104
|
+
"module": "libs/components/src/lib/divider/divider.ts"
|
|
8105
|
+
}
|
|
8106
|
+
},
|
|
8085
8107
|
{
|
|
8086
8108
|
"kind": "js",
|
|
8087
8109
|
"name": "Divider",
|
|
@@ -10075,180 +10097,6 @@
|
|
|
10075
10097
|
}
|
|
10076
10098
|
]
|
|
10077
10099
|
},
|
|
10078
|
-
{
|
|
10079
|
-
"kind": "javascript-module",
|
|
10080
|
-
"path": "libs/components/src/lib/listbox/definition.ts",
|
|
10081
|
-
"declarations": [
|
|
10082
|
-
{
|
|
10083
|
-
"kind": "variable",
|
|
10084
|
-
"name": "registerListbox",
|
|
10085
|
-
"description": "Registers the listbox elements with the design system.",
|
|
10086
|
-
"parameters": [
|
|
10087
|
-
{
|
|
10088
|
-
"description": "the prefix to use for the component name",
|
|
10089
|
-
"name": "prefix"
|
|
10090
|
-
}
|
|
10091
|
-
]
|
|
10092
|
-
}
|
|
10093
|
-
],
|
|
10094
|
-
"exports": [
|
|
10095
|
-
{
|
|
10096
|
-
"kind": "js",
|
|
10097
|
-
"name": "LisboxAppearance",
|
|
10098
|
-
"declaration": {
|
|
10099
|
-
"name": "LisboxAppearance",
|
|
10100
|
-
"module": "./listbox"
|
|
10101
|
-
}
|
|
10102
|
-
},
|
|
10103
|
-
{
|
|
10104
|
-
"kind": "js",
|
|
10105
|
-
"name": "registerListbox",
|
|
10106
|
-
"declaration": {
|
|
10107
|
-
"name": "registerListbox",
|
|
10108
|
-
"module": "libs/components/src/lib/listbox/definition.ts"
|
|
10109
|
-
}
|
|
10110
|
-
}
|
|
10111
|
-
]
|
|
10112
|
-
},
|
|
10113
|
-
{
|
|
10114
|
-
"kind": "javascript-module",
|
|
10115
|
-
"path": "libs/components/src/lib/listbox/listbox.ts",
|
|
10116
|
-
"declarations": [
|
|
10117
|
-
{
|
|
10118
|
-
"kind": "class",
|
|
10119
|
-
"description": "",
|
|
10120
|
-
"name": "Listbox",
|
|
10121
|
-
"cssProperties": [
|
|
10122
|
-
{
|
|
10123
|
-
"name": "--vvd-listbox-accent-intermediate",
|
|
10124
|
-
"default": "var(--vvd-color-neutral-500)"
|
|
10125
|
-
},
|
|
10126
|
-
{
|
|
10127
|
-
"name": "--vvd-listbox-accent-primary",
|
|
10128
|
-
"default": "var(--vvd-color-canvas-text)"
|
|
10129
|
-
},
|
|
10130
|
-
{
|
|
10131
|
-
"name": "--vvd-listbox-accent-soft",
|
|
10132
|
-
"default": "var(--vvd-color-neutral-100)"
|
|
10133
|
-
}
|
|
10134
|
-
],
|
|
10135
|
-
"slots": [
|
|
10136
|
-
{
|
|
10137
|
-
"description": "Default slot.",
|
|
10138
|
-
"name": ""
|
|
10139
|
-
}
|
|
10140
|
-
],
|
|
10141
|
-
"members": [
|
|
10142
|
-
{
|
|
10143
|
-
"kind": "field",
|
|
10144
|
-
"name": "appearance",
|
|
10145
|
-
"type": {
|
|
10146
|
-
"text": "LisboxAppearance | undefined"
|
|
10147
|
-
},
|
|
10148
|
-
"description": "The appearance the listbox should have.",
|
|
10149
|
-
"privacy": "public"
|
|
10150
|
-
},
|
|
10151
|
-
{
|
|
10152
|
-
"kind": "field",
|
|
10153
|
-
"name": "orientation",
|
|
10154
|
-
"type": {
|
|
10155
|
-
"text": "'horizontal' | 'vertical' | undefined"
|
|
10156
|
-
},
|
|
10157
|
-
"description": "The direction the listbox options should flow.",
|
|
10158
|
-
"privacy": "public"
|
|
10159
|
-
},
|
|
10160
|
-
{
|
|
10161
|
-
"kind": "method",
|
|
10162
|
-
"name": "orientationChanged",
|
|
10163
|
-
"return": {
|
|
10164
|
-
"type": {
|
|
10165
|
-
"text": "void"
|
|
10166
|
-
}
|
|
10167
|
-
}
|
|
10168
|
-
},
|
|
10169
|
-
{
|
|
10170
|
-
"kind": "field",
|
|
10171
|
-
"name": "shape",
|
|
10172
|
-
"type": {
|
|
10173
|
-
"text": "ListboxShape | undefined"
|
|
10174
|
-
},
|
|
10175
|
-
"description": "The shape the listbox should have.",
|
|
10176
|
-
"privacy": "public"
|
|
10177
|
-
},
|
|
10178
|
-
{
|
|
10179
|
-
"kind": "method",
|
|
10180
|
-
"name": "slottedOptionsChanged",
|
|
10181
|
-
"parameters": [
|
|
10182
|
-
{
|
|
10183
|
-
"name": "prev",
|
|
10184
|
-
"type": {
|
|
10185
|
-
"text": "Element[] | undefined"
|
|
10186
|
-
}
|
|
10187
|
-
},
|
|
10188
|
-
{
|
|
10189
|
-
"name": "next",
|
|
10190
|
-
"type": {
|
|
10191
|
-
"text": "Element[]"
|
|
10192
|
-
}
|
|
10193
|
-
}
|
|
10194
|
-
]
|
|
10195
|
-
},
|
|
10196
|
-
{
|
|
10197
|
-
"kind": "method",
|
|
10198
|
-
"name": "#disableSlottedChildren",
|
|
10199
|
-
"return": {
|
|
10200
|
-
"type": {
|
|
10201
|
-
"text": "void"
|
|
10202
|
-
}
|
|
10203
|
-
}
|
|
10204
|
-
}
|
|
10205
|
-
],
|
|
10206
|
-
"attributes": [
|
|
10207
|
-
{
|
|
10208
|
-
"name": "appearance",
|
|
10209
|
-
"type": {
|
|
10210
|
-
"text": "LisboxAppearance | undefined"
|
|
10211
|
-
},
|
|
10212
|
-
"description": "The appearance the listbox should have.",
|
|
10213
|
-
"fieldName": "appearance"
|
|
10214
|
-
},
|
|
10215
|
-
{
|
|
10216
|
-
"name": "orientation",
|
|
10217
|
-
"type": {
|
|
10218
|
-
"text": "'horizontal' | 'vertical' | undefined"
|
|
10219
|
-
},
|
|
10220
|
-
"description": "The direction the listbox options should flow.",
|
|
10221
|
-
"fieldName": "orientation"
|
|
10222
|
-
},
|
|
10223
|
-
{
|
|
10224
|
-
"name": "shape",
|
|
10225
|
-
"type": {
|
|
10226
|
-
"text": "ListboxShape | undefined"
|
|
10227
|
-
},
|
|
10228
|
-
"description": "The shape the listbox should have.",
|
|
10229
|
-
"fieldName": "shape"
|
|
10230
|
-
}
|
|
10231
|
-
],
|
|
10232
|
-
"superclass": {
|
|
10233
|
-
"name": "FoundationListboxElement",
|
|
10234
|
-
"package": "@microsoft/fast-foundation"
|
|
10235
|
-
},
|
|
10236
|
-
"vividComponent": {
|
|
10237
|
-
"name": "listbox"
|
|
10238
|
-
}
|
|
10239
|
-
}
|
|
10240
|
-
],
|
|
10241
|
-
"exports": [
|
|
10242
|
-
{
|
|
10243
|
-
"kind": "js",
|
|
10244
|
-
"name": "Listbox",
|
|
10245
|
-
"declaration": {
|
|
10246
|
-
"name": "Listbox",
|
|
10247
|
-
"module": "libs/components/src/lib/listbox/listbox.ts"
|
|
10248
|
-
}
|
|
10249
|
-
}
|
|
10250
|
-
]
|
|
10251
|
-
},
|
|
10252
10100
|
{
|
|
10253
10101
|
"kind": "javascript-module",
|
|
10254
10102
|
"path": "libs/components/src/lib/menu/definition.ts",
|
package/lib/divider/divider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Orientation } from '@microsoft/fast-web-utilities';
|
|
2
2
|
import { VividElement } from '../../shared/foundation/vivid-element/vivid-element';
|
|
3
|
-
declare const DividerRole: {
|
|
3
|
+
export declare const DividerRole: {
|
|
4
4
|
readonly separator: "separator";
|
|
5
5
|
readonly presentation: "presentation";
|
|
6
6
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Divider } from './divider';
|
|
2
2
|
export declare const DividerTemplate: import("@microsoft/fast-element").ViewTemplate<Divider, any>;
|
package/package.json
CHANGED
package/shared/affix.js
CHANGED
|
@@ -61,4 +61,4 @@ const affixIconTemplateFactory = (context) => {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
export {
|
|
64
|
+
export { AffixIconWithTrailing as A, IconWrapper as I, affixIconTemplateFactory as a, AffixIcon as b };
|
package/shared/definition.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { V as VividElement, a as attr, n as nullableNumberConverter, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { i as iconDefinition } from './definition27.js';
|
|
3
|
-
import {
|
|
3
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { r as ref } from './ref.js';
|
|
6
6
|
import { w as when } from './when.js';
|
package/shared/definition11.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { P as ProgressRing, p as progressRingDefinition } from './definition37.js';
|
|
3
3
|
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { V as VividFoundationButton } from './button.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
7
7
|
import { b as Size } from './enums.js';
|
package/shared/definition16.cjs
CHANGED
|
@@ -12,7 +12,6 @@ const strings = require('./strings.cjs');
|
|
|
12
12
|
const numbers = require('./numbers.cjs');
|
|
13
13
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
14
14
|
const formElements = require('./form-elements.cjs');
|
|
15
|
-
const listbox$1 = require('./listbox2.cjs');
|
|
16
15
|
const index = require('./index.cjs');
|
|
17
16
|
const ref = require('./ref.cjs');
|
|
18
17
|
const slotted = require('./slotted.cjs');
|
|
@@ -606,7 +605,7 @@ const comboboxTemplate = (context) => {
|
|
|
606
605
|
?disabled="${(x) => x.disabled}"
|
|
607
606
|
${ref.ref("listbox")}>
|
|
608
607
|
<slot ${slotted.slotted({
|
|
609
|
-
filter: listbox
|
|
608
|
+
filter: listbox.Listbox.slottedOptionFilter,
|
|
610
609
|
flatten: true,
|
|
611
610
|
property: "slottedOptions"
|
|
612
611
|
})}>
|
package/shared/definition16.js
CHANGED
|
@@ -5,12 +5,11 @@ import { s as styles$1 } from './text-field.js';
|
|
|
5
5
|
import { D as DOM, O as Observable, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
6
6
|
import { L as Listbox } from './listbox.js';
|
|
7
7
|
import { F as FormAssociated } from './form-associated.js';
|
|
8
|
-
import {
|
|
8
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
9
9
|
import { u as uniqueId } from './strings.js';
|
|
10
10
|
import { l as limit } from './numbers.js';
|
|
11
11
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
12
12
|
import { f as formElements } from './form-elements.js';
|
|
13
|
-
import { a as Listbox$1 } from './listbox2.js';
|
|
14
13
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
15
14
|
import { r as ref } from './ref.js';
|
|
16
15
|
import { s as slotted } from './slotted.js';
|
|
@@ -604,7 +603,7 @@ const comboboxTemplate = (context) => {
|
|
|
604
603
|
?disabled="${(x) => x.disabled}"
|
|
605
604
|
${ref("listbox")}>
|
|
606
605
|
<slot ${slotted({
|
|
607
|
-
filter: Listbox
|
|
606
|
+
filter: Listbox.slottedOptionFilter,
|
|
608
607
|
flatten: true,
|
|
609
608
|
property: "slottedOptions"
|
|
610
609
|
})}>
|
package/shared/definition17.cjs
CHANGED
|
@@ -274,15 +274,16 @@ const _DataGrid = class _DataGrid extends vividElement.VividElement {
|
|
|
274
274
|
* @internal
|
|
275
275
|
*/
|
|
276
276
|
noTabbingChanged() {
|
|
277
|
-
if (this.
|
|
278
|
-
this
|
|
279
|
-
} else {
|
|
280
|
-
this.setAttribute(
|
|
281
|
-
"tabIndex",
|
|
282
|
-
this.contains(document.activeElement) ? "-1" : "0"
|
|
283
|
-
);
|
|
277
|
+
if (this.$fastController.isConnected) {
|
|
278
|
+
this.#setTabIndex();
|
|
284
279
|
}
|
|
285
280
|
}
|
|
281
|
+
#setTabIndex() {
|
|
282
|
+
this.setAttribute(
|
|
283
|
+
"tabIndex",
|
|
284
|
+
this.noTabbing || this.contains(document.activeElement) ? "-1" : "0"
|
|
285
|
+
);
|
|
286
|
+
}
|
|
286
287
|
/**
|
|
287
288
|
* @internal
|
|
288
289
|
*/
|
|
@@ -376,6 +377,7 @@ const _DataGrid = class _DataGrid extends vividElement.VividElement {
|
|
|
376
377
|
this.observer = new MutationObserver(this.onChildListChange);
|
|
377
378
|
this.observer.observe(this, { childList: true });
|
|
378
379
|
vividElement.DOM.queueUpdate(this.queueRowIndexUpdate);
|
|
380
|
+
this.#setTabIndex();
|
|
379
381
|
vividElement.Observable.getNotifier(this).subscribe(
|
|
380
382
|
this.#changeHandler,
|
|
381
383
|
"columnDefinitions"
|
package/shared/definition17.js
CHANGED
|
@@ -272,15 +272,16 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
272
272
|
* @internal
|
|
273
273
|
*/
|
|
274
274
|
noTabbingChanged() {
|
|
275
|
-
if (this.
|
|
276
|
-
this
|
|
277
|
-
} else {
|
|
278
|
-
this.setAttribute(
|
|
279
|
-
"tabIndex",
|
|
280
|
-
this.contains(document.activeElement) ? "-1" : "0"
|
|
281
|
-
);
|
|
275
|
+
if (this.$fastController.isConnected) {
|
|
276
|
+
this.#setTabIndex();
|
|
282
277
|
}
|
|
283
278
|
}
|
|
279
|
+
#setTabIndex() {
|
|
280
|
+
this.setAttribute(
|
|
281
|
+
"tabIndex",
|
|
282
|
+
this.noTabbing || this.contains(document.activeElement) ? "-1" : "0"
|
|
283
|
+
);
|
|
284
|
+
}
|
|
284
285
|
/**
|
|
285
286
|
* @internal
|
|
286
287
|
*/
|
|
@@ -374,6 +375,7 @@ const _DataGrid = class _DataGrid extends VividElement {
|
|
|
374
375
|
this.observer = new MutationObserver(this.onChildListChange);
|
|
375
376
|
this.observer.observe(this, { childList: true });
|
|
376
377
|
DOM.queueUpdate(this.queueRowIndexUpdate);
|
|
378
|
+
this.#setTabIndex();
|
|
377
379
|
Observable.getNotifier(this).subscribe(
|
|
378
380
|
this.#changeHandler,
|
|
379
381
|
"columnDefinitions"
|
package/shared/definition22.cjs
CHANGED
|
@@ -40,9 +40,10 @@ __decorateClass([
|
|
|
40
40
|
], Divider.prototype, "orientation");
|
|
41
41
|
|
|
42
42
|
const getClasses = ({ orientation }) => classNames.classNames("base", [`${orientation}`, Boolean(orientation)]);
|
|
43
|
+
const getAriaOrientation = ({ role, orientation }) => role === DividerRole.presentation ? null : orientation;
|
|
43
44
|
const DividerTemplate = vividElement.html` <span
|
|
44
45
|
class="${getClasses}"
|
|
45
|
-
orientation="${
|
|
46
|
+
aria-orientation="${getAriaOrientation}"
|
|
46
47
|
role="${(x) => x.role}"
|
|
47
48
|
></span>`;
|
|
48
49
|
|
package/shared/definition22.js
CHANGED
|
@@ -38,9 +38,10 @@ __decorateClass([
|
|
|
38
38
|
], Divider.prototype, "orientation");
|
|
39
39
|
|
|
40
40
|
const getClasses = ({ orientation }) => classNames("base", [`${orientation}`, Boolean(orientation)]);
|
|
41
|
+
const getAriaOrientation = ({ role, orientation }) => role === DividerRole.presentation ? null : orientation;
|
|
41
42
|
const DividerTemplate = html` <span
|
|
42
43
|
class="${getClasses}"
|
|
43
|
-
orientation="${
|
|
44
|
+
aria-orientation="${getAriaOrientation}"
|
|
44
45
|
role="${(x) => x.role}"
|
|
45
46
|
></span>`;
|
|
46
47
|
|
package/shared/definition24.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { V as VividFoundationButton } from './button.js';
|
|
6
6
|
import { r as ref } from './ref.js';
|
|
7
7
|
import { c as classNames } from './class-names.js';
|
package/shared/definition27.cjs
CHANGED
package/shared/definition27.js
CHANGED
package/shared/definition29.js
CHANGED
|
@@ -2,7 +2,7 @@ import { P as Popup, p as popupDefinition } from './definition63.js';
|
|
|
2
2
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
3
3
|
import { V as VividElement, D as DOM, o as observable, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { g as keyHome, d as keyEnd, e as keyArrowUp, f as keyArrowDown, h as keyArrowLeft, i as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
5
|
-
import {
|
|
5
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
7
7
|
import { D as Direction, g as getDirection } from './direction.js';
|
|
8
8
|
import { a as anchored, b as anchorSlotTemplateFactory } from './anchored.js';
|
package/shared/definition30.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { r as ref } from './ref.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
package/shared/definition31.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
|
-
import {
|
|
3
|
+
import { b as AffixIcon } from './affix.js';
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
import { T as TextAnchor } from './text-anchor.js';
|
|
6
6
|
import { t as textAnchorTemplate } from './text-anchor.template.js';
|
package/shared/definition33.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixins } from './apply-mixins2.js';
|
|
4
|
-
import {
|
|
4
|
+
import { b as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
package/shared/definition34.cjs
CHANGED
|
@@ -6,11 +6,11 @@ const vividElement = require('./vivid-element.cjs');
|
|
|
6
6
|
const definition$2 = require('./definition27.cjs');
|
|
7
7
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
8
8
|
const formAssociated$1 = require('./form-associated.cjs');
|
|
9
|
-
const
|
|
9
|
+
const foundationElement = require('./foundation-element.cjs');
|
|
10
10
|
const applyMixins = require('./apply-mixins2.cjs');
|
|
11
11
|
const formAssociated = require('./form-associated2.cjs');
|
|
12
|
-
const
|
|
13
|
-
const keyCodes
|
|
12
|
+
const startEnd = require('./start-end.cjs');
|
|
13
|
+
const keyCodes = require('./key-codes.cjs');
|
|
14
14
|
const formElements = require('./form-elements.cjs');
|
|
15
15
|
const affix = require('./affix.cjs');
|
|
16
16
|
const localized = require('./localized.cjs');
|
|
@@ -19,7 +19,76 @@ const when = require('./when.cjs');
|
|
|
19
19
|
const ref = require('./ref.cjs');
|
|
20
20
|
const classNames = require('./class-names.cjs');
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Some states and properties are applicable to all host language elements regardless of whether a role is applied.
|
|
24
|
+
* The following global states and properties are supported by all roles and by all base markup elements.
|
|
25
|
+
* {@link https://www.w3.org/TR/wai-aria-1.1/#global_states}
|
|
26
|
+
*
|
|
27
|
+
* This is intended to be used as a mixin. Be sure you extend FASTElement.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
class ARIAGlobalStatesAndProperties {
|
|
32
|
+
}
|
|
33
|
+
foundationElement.__decorate([
|
|
34
|
+
vividElement.attr({ attribute: "aria-atomic" })
|
|
35
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaAtomic", void 0);
|
|
36
|
+
foundationElement.__decorate([
|
|
37
|
+
vividElement.attr({ attribute: "aria-busy" })
|
|
38
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaBusy", void 0);
|
|
39
|
+
foundationElement.__decorate([
|
|
40
|
+
vividElement.attr({ attribute: "aria-controls" })
|
|
41
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaControls", void 0);
|
|
42
|
+
foundationElement.__decorate([
|
|
43
|
+
vividElement.attr({ attribute: "aria-current" })
|
|
44
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaCurrent", void 0);
|
|
45
|
+
foundationElement.__decorate([
|
|
46
|
+
vividElement.attr({ attribute: "aria-describedby" })
|
|
47
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDescribedby", void 0);
|
|
48
|
+
foundationElement.__decorate([
|
|
49
|
+
vividElement.attr({ attribute: "aria-details" })
|
|
50
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDetails", void 0);
|
|
51
|
+
foundationElement.__decorate([
|
|
52
|
+
vividElement.attr({ attribute: "aria-disabled" })
|
|
53
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaDisabled", void 0);
|
|
54
|
+
foundationElement.__decorate([
|
|
55
|
+
vividElement.attr({ attribute: "aria-errormessage" })
|
|
56
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaErrormessage", void 0);
|
|
57
|
+
foundationElement.__decorate([
|
|
58
|
+
vividElement.attr({ attribute: "aria-flowto" })
|
|
59
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaFlowto", void 0);
|
|
60
|
+
foundationElement.__decorate([
|
|
61
|
+
vividElement.attr({ attribute: "aria-haspopup" })
|
|
62
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHaspopup", void 0);
|
|
63
|
+
foundationElement.__decorate([
|
|
64
|
+
vividElement.attr({ attribute: "aria-hidden" })
|
|
65
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaHidden", void 0);
|
|
66
|
+
foundationElement.__decorate([
|
|
67
|
+
vividElement.attr({ attribute: "aria-invalid" })
|
|
68
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaInvalid", void 0);
|
|
69
|
+
foundationElement.__decorate([
|
|
70
|
+
vividElement.attr({ attribute: "aria-keyshortcuts" })
|
|
71
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaKeyshortcuts", void 0);
|
|
72
|
+
foundationElement.__decorate([
|
|
73
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
74
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabel", void 0);
|
|
75
|
+
foundationElement.__decorate([
|
|
76
|
+
vividElement.attr({ attribute: "aria-labelledby" })
|
|
77
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLabelledby", void 0);
|
|
78
|
+
foundationElement.__decorate([
|
|
79
|
+
vividElement.attr({ attribute: "aria-live" })
|
|
80
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaLive", void 0);
|
|
81
|
+
foundationElement.__decorate([
|
|
82
|
+
vividElement.attr({ attribute: "aria-owns" })
|
|
83
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaOwns", void 0);
|
|
84
|
+
foundationElement.__decorate([
|
|
85
|
+
vividElement.attr({ attribute: "aria-relevant" })
|
|
86
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRelevant", void 0);
|
|
87
|
+
foundationElement.__decorate([
|
|
88
|
+
vividElement.attr({ attribute: "aria-roledescription" })
|
|
89
|
+
], ARIAGlobalStatesAndProperties.prototype, "ariaRoledescription", void 0);
|
|
90
|
+
|
|
91
|
+
class _TextField extends foundationElement.FoundationElement {
|
|
23
92
|
}
|
|
24
93
|
/**
|
|
25
94
|
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
@@ -194,37 +263,37 @@ class TextField extends FormAssociatedTextField {
|
|
|
194
263
|
super.validate(this.control);
|
|
195
264
|
}
|
|
196
265
|
}
|
|
197
|
-
|
|
266
|
+
foundationElement.__decorate([
|
|
198
267
|
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
199
268
|
], TextField.prototype, "readOnly", void 0);
|
|
200
|
-
|
|
269
|
+
foundationElement.__decorate([
|
|
201
270
|
vividElement.attr({ mode: "boolean" })
|
|
202
271
|
], TextField.prototype, "autofocus", void 0);
|
|
203
|
-
|
|
272
|
+
foundationElement.__decorate([
|
|
204
273
|
vividElement.attr
|
|
205
274
|
], TextField.prototype, "placeholder", void 0);
|
|
206
|
-
|
|
275
|
+
foundationElement.__decorate([
|
|
207
276
|
vividElement.attr
|
|
208
277
|
], TextField.prototype, "type", void 0);
|
|
209
|
-
|
|
278
|
+
foundationElement.__decorate([
|
|
210
279
|
vividElement.attr
|
|
211
280
|
], TextField.prototype, "list", void 0);
|
|
212
|
-
|
|
281
|
+
foundationElement.__decorate([
|
|
213
282
|
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
214
283
|
], TextField.prototype, "maxlength", void 0);
|
|
215
|
-
|
|
284
|
+
foundationElement.__decorate([
|
|
216
285
|
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
217
286
|
], TextField.prototype, "minlength", void 0);
|
|
218
|
-
|
|
287
|
+
foundationElement.__decorate([
|
|
219
288
|
vividElement.attr
|
|
220
289
|
], TextField.prototype, "pattern", void 0);
|
|
221
|
-
|
|
290
|
+
foundationElement.__decorate([
|
|
222
291
|
vividElement.attr({ converter: vividElement.nullableNumberConverter })
|
|
223
292
|
], TextField.prototype, "size", void 0);
|
|
224
|
-
|
|
293
|
+
foundationElement.__decorate([
|
|
225
294
|
vividElement.attr({ mode: "boolean" })
|
|
226
295
|
], TextField.prototype, "spellcheck", void 0);
|
|
227
|
-
|
|
296
|
+
foundationElement.__decorate([
|
|
228
297
|
vividElement.observable
|
|
229
298
|
], TextField.prototype, "defaultSlottedNodes", void 0);
|
|
230
299
|
/**
|
|
@@ -234,8 +303,8 @@ keyCodes.__decorate([
|
|
|
234
303
|
*/
|
|
235
304
|
class DelegatesARIATextbox {
|
|
236
305
|
}
|
|
237
|
-
applyMixins.applyMixins(DelegatesARIATextbox,
|
|
238
|
-
applyMixins.applyMixins(TextField,
|
|
306
|
+
applyMixins.applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
|
|
307
|
+
applyMixins.applyMixins(TextField, startEnd.StartEnd, DelegatesARIATextbox);
|
|
239
308
|
|
|
240
309
|
const styles = ":host{display:inline-block}.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-firm);--_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-firm);--_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-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 8px;--_text-field-pill-border-radius: 24px;display:inline-grid;width:100%;gap:4px;grid-template-columns:min-content 1fr max-content}.base.size-condensed{--_text-field-gutter-start: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-gutter-end: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-icon-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 4px}@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)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base);grid-column:3/4}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:\"\";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){width:100%!important;box-sizing:border-box!important;border:0 none!important;border-radius:inherit!important;margin:initial!important;appearance:none!important;background-color:transparent!important;block-size:100%!important;color:inherit!important;font:inherit;outline:transparent;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;text-align:inherit}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{position:absolute;z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));line-height:1;transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.fieldset:has(.wrapper .control:focus-within):after{--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))}}@supports not selector(:has(*)){.wrapper:focus-within:after{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));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:\"\";inset:0;pointer-events:none}}:host([internal-part]) .fieldset{background-color:transparent;font:var(--vvd-typography-heading-4);line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}.base{--_text-field-gutter-end: 70px}.control::-webkit-outer-spin-button,.control::-webkit-inner-spin-button{appearance:none}.control-buttons{position:absolute;z-index:1;right:3px;display:flex}.readonly .control-buttons,.disabled .control-buttons{pointer-events:none}.control-buttons .divider{margin-block:8px}.control-buttons>*{flex-shrink:0}";
|
|
241
310
|
|
|
@@ -441,10 +510,10 @@ let NumberField = class extends FormAssociatedNumberField {
|
|
|
441
510
|
handleKeyDown(e) {
|
|
442
511
|
const key = e.key;
|
|
443
512
|
switch (key) {
|
|
444
|
-
case keyCodes
|
|
513
|
+
case keyCodes.keyArrowUp:
|
|
445
514
|
this.stepUp();
|
|
446
515
|
return false;
|
|
447
|
-
case keyCodes
|
|
516
|
+
case keyCodes.keyArrowDown:
|
|
448
517
|
this.stepDown();
|
|
449
518
|
return false;
|
|
450
519
|
}
|