@vonage/vivid 4.9.0 → 4.11.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/custom-elements.json +2792 -83
- package/lib/badge/badge.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +8 -2
- package/lib/checkbox/checkbox.form-associated.d.ts +10 -0
- package/lib/dialog/dialog.d.ts +4 -0
- package/lib/divider/divider.d.ts +11 -2
- package/lib/enums.d.ts +1 -0
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +3 -0
- package/lib/icon/icon.d.ts +2 -1
- package/lib/slider/slider.d.ts +30 -6
- package/lib/slider/slider.form-associated.d.ts +10 -0
- package/lib/split-button/split-button.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +1 -0
- package/package.json +1 -1
- package/shared/aria-global2.cjs +93 -0
- package/shared/aria-global2.js +91 -0
- package/shared/breadcrumb-item.cjs +2 -89
- package/shared/breadcrumb-item.js +1 -88
- package/shared/definition11.cjs +201 -5
- package/shared/definition11.js +199 -4
- package/shared/definition15.cjs +49 -90
- package/shared/definition15.js +50 -91
- package/shared/definition16.cjs +9 -7
- package/shared/definition16.js +9 -7
- package/shared/definition20.cjs +16 -11
- package/shared/definition20.js +16 -11
- package/shared/definition21.cjs +34 -4
- package/shared/definition21.js +34 -4
- package/shared/definition22.cjs +32 -51
- package/shared/definition22.js +33 -52
- package/shared/definition24.cjs +156 -2
- package/shared/definition24.js +157 -3
- package/shared/definition25.cjs +106 -56
- package/shared/definition25.js +106 -56
- package/shared/definition29.cjs +1 -1
- package/shared/definition29.js +1 -1
- package/shared/definition30.cjs +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition35.cjs +2 -2
- package/shared/definition35.js +2 -2
- package/shared/definition37.cjs +1 -1
- package/shared/definition37.js +1 -1
- package/shared/definition4.cjs +5 -6
- package/shared/definition4.js +1 -2
- package/shared/definition40.cjs +11 -4
- package/shared/definition40.js +8 -1
- package/shared/definition42.cjs +3 -22
- package/shared/definition42.js +2 -21
- package/shared/definition43.cjs +1 -2
- package/shared/definition43.js +1 -2
- package/shared/definition44.js +1 -1
- package/shared/definition47.cjs +369 -502
- package/shared/definition47.js +370 -503
- package/shared/definition5.cjs +5 -5
- package/shared/definition5.js +2 -2
- package/shared/definition51.cjs +1 -1
- package/shared/definition51.js +1 -1
- package/shared/definition52.cjs +63 -26
- package/shared/definition52.js +63 -26
- package/shared/definition56.cjs +45 -43
- package/shared/definition56.js +45 -43
- package/shared/definition57.cjs +1 -1
- package/shared/definition57.js +1 -1
- package/shared/definition64.cjs +242 -79
- package/shared/definition64.js +242 -79
- package/shared/definition7.cjs +1 -1
- package/shared/definition7.js +1 -1
- package/shared/definition8.cjs +1 -1
- package/shared/definition8.js +1 -1
- package/shared/enums.cjs +1 -0
- package/shared/enums.js +1 -0
- package/shared/form-associated.js +1 -1
- package/shared/{patterns → foundation/anchor}/anchor.d.ts +1 -1
- package/shared/foundation/button/button.d.ts +27 -0
- package/shared/foundation/button/button.template.d.ts +4 -0
- package/shared/foundation/button/index.d.ts +2 -0
- package/shared/foundation/patterns/index.d.ts +1 -0
- package/shared/icon.cjs +11 -5
- package/shared/icon.js +11 -5
- package/shared/index.cjs +22 -2
- package/shared/index.js +22 -2
- package/shared/key-codes2.js +1 -1
- package/shared/patterns/form-elements/form-elements.d.ts +6 -6
- package/shared/presentationDate.cjs +4328 -4042
- package/shared/presentationDate.js +4327 -4041
- package/shared/slider.template.cjs +23 -1
- package/shared/slider.template.js +21 -2
- 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 +35 -14
- package/styles/tokens/theme-light.css +35 -14
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/vivid.api.json +62 -5
- package/shared/aria2.cjs +0 -11
- package/shared/aria2.js +0 -9
- package/shared/button.cjs +0 -202
- package/shared/button.js +0 -200
- /package/shared/{patterns → foundation/patterns}/aria-global.d.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition64.cjs');
|
|
4
|
-
const aria = require('./aria.cjs');
|
|
5
4
|
const index = require('./index.cjs');
|
|
6
5
|
const ref = require('./ref.cjs');
|
|
6
|
+
const aria = require('./aria.cjs');
|
|
7
7
|
const when = require('./when.cjs');
|
|
8
8
|
const classNames = require('./class-names.cjs');
|
|
9
9
|
|
|
@@ -20,6 +20,25 @@ function limit(min, max, value) {
|
|
|
20
20
|
return Math.min(Math.max(value, min), max);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
const getDecimalPlaces = (num) => {
|
|
24
|
+
const match = num.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
25
|
+
return Math.max(
|
|
26
|
+
0,
|
|
27
|
+
// Number of digits right of decimal point.
|
|
28
|
+
(match[1] ? match[1].length : 0) - // Adjust for scientific notation.
|
|
29
|
+
(match[2] ? +match[2] : 0)
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
const roundToStepValue = (value, step) => {
|
|
33
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
34
|
+
const factor = Math.pow(10, decimalPlaces);
|
|
35
|
+
const roundedValue = Math.round(value / step) * step;
|
|
36
|
+
return Math.round(roundedValue * factor) / factor;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const lerp = (a, b, value) => a + (b - a) * value;
|
|
40
|
+
const inverseLerp = (a, b, value) => limit(0, 1, (value - a) / (b - a));
|
|
41
|
+
|
|
23
42
|
const getClasses = ({ disabled, connotation }) => classNames.classNames(
|
|
24
43
|
"control",
|
|
25
44
|
["disabled", Boolean(disabled)],
|
|
@@ -91,4 +110,7 @@ const SliderTemplate = (context) => {
|
|
|
91
110
|
|
|
92
111
|
exports.SliderTemplate = SliderTemplate;
|
|
93
112
|
exports.getMarkersTemplate = getMarkersTemplate;
|
|
113
|
+
exports.inverseLerp = inverseLerp;
|
|
114
|
+
exports.lerp = lerp;
|
|
94
115
|
exports.limit = limit;
|
|
116
|
+
exports.roundToStepValue = roundToStepValue;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { P as Popup, a as PlacementStrategy } from './definition64.js';
|
|
2
|
-
import { O as Orientation } from './aria.js';
|
|
3
2
|
import { h as html } from './index.js';
|
|
4
3
|
import { r as ref } from './ref.js';
|
|
4
|
+
import { O as Orientation } from './aria.js';
|
|
5
5
|
import { w as when } from './when.js';
|
|
6
6
|
import { c as classNames } from './class-names.js';
|
|
7
7
|
|
|
@@ -18,6 +18,25 @@ function limit(min, max, value) {
|
|
|
18
18
|
return Math.min(Math.max(value, min), max);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
const getDecimalPlaces = (num) => {
|
|
22
|
+
const match = num.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
23
|
+
return Math.max(
|
|
24
|
+
0,
|
|
25
|
+
// Number of digits right of decimal point.
|
|
26
|
+
(match[1] ? match[1].length : 0) - // Adjust for scientific notation.
|
|
27
|
+
(match[2] ? +match[2] : 0)
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
const roundToStepValue = (value, step) => {
|
|
31
|
+
const decimalPlaces = getDecimalPlaces(step);
|
|
32
|
+
const factor = Math.pow(10, decimalPlaces);
|
|
33
|
+
const roundedValue = Math.round(value / step) * step;
|
|
34
|
+
return Math.round(roundedValue * factor) / factor;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const lerp = (a, b, value) => a + (b - a) * value;
|
|
38
|
+
const inverseLerp = (a, b, value) => limit(0, 1, (value - a) / (b - a));
|
|
39
|
+
|
|
21
40
|
const getClasses = ({ disabled, connotation }) => classNames(
|
|
22
41
|
"control",
|
|
23
42
|
["disabled", Boolean(disabled)],
|
|
@@ -87,4 +106,4 @@ const SliderTemplate = (context) => {
|
|
|
87
106
|
>`;
|
|
88
107
|
};
|
|
89
108
|
|
|
90
|
-
export { SliderTemplate as S, getMarkersTemplate as g,
|
|
109
|
+
export { SliderTemplate as S, limit as a, getMarkersTemplate as g, inverseLerp as i, lerp as l, roundToStepValue as r };
|
package/styles/core/all.css
CHANGED
package/styles/core/theme.css
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
|
@@ -79,16 +79,6 @@
|
|
|
79
79
|
--vvd-color-announcement-700: #f8b9e7;
|
|
80
80
|
--vvd-color-announcement-800: #ffdcf7;
|
|
81
81
|
--vvd-color-announcement-900: #ffedfb;
|
|
82
|
-
--vvd-color-alert-50: #3e0004;
|
|
83
|
-
--vvd-color-alert-100: #6e0000;
|
|
84
|
-
--vvd-color-alert-200: #9f0202;
|
|
85
|
-
--vvd-color-alert-300: #cd0d0d;
|
|
86
|
-
--vvd-color-alert-400: #e61d1d;
|
|
87
|
-
--vvd-color-alert-500: #f75959;
|
|
88
|
-
--vvd-color-alert-600: #fe9696;
|
|
89
|
-
--vvd-color-alert-700: #ffbbbb;
|
|
90
|
-
--vvd-color-alert-800: #fedfdf;
|
|
91
|
-
--vvd-color-alert-900: #ffeef2;
|
|
92
82
|
--vvd-color-success-50: #0a1e11;
|
|
93
83
|
--vvd-color-success-100: #183a1e;
|
|
94
84
|
--vvd-color-success-200: #155923;
|
|
@@ -99,6 +89,26 @@
|
|
|
99
89
|
--vvd-color-success-700: #86e090;
|
|
100
90
|
--vvd-color-success-800: #cfeed4;
|
|
101
91
|
--vvd-color-success-900: #e1f8e5;
|
|
92
|
+
--vvd-color-alert-50: #3e0004;
|
|
93
|
+
--vvd-color-alert-100: #6e0000;
|
|
94
|
+
--vvd-color-alert-200: #9f0202;
|
|
95
|
+
--vvd-color-alert-300: #cd0d0d;
|
|
96
|
+
--vvd-color-alert-400: #e61d1d;
|
|
97
|
+
--vvd-color-alert-500: #f75959;
|
|
98
|
+
--vvd-color-alert-600: #fe9696;
|
|
99
|
+
--vvd-color-alert-700: #ffbbbb;
|
|
100
|
+
--vvd-color-alert-800: #fedfdf;
|
|
101
|
+
--vvd-color-alert-900: #ffeef2;
|
|
102
|
+
--vvd-color-neutral-tint-50: #191828;
|
|
103
|
+
--vvd-color-neutral-tint-100: #31304f;
|
|
104
|
+
--vvd-color-neutral-tint-200: #494977;
|
|
105
|
+
--vvd-color-neutral-tint-300: #63628d;
|
|
106
|
+
--vvd-color-neutral-tint-400: #727198;
|
|
107
|
+
--vvd-color-neutral-tint-500: #908fae;
|
|
108
|
+
--vvd-color-neutral-tint-600: #b2b1c7;
|
|
109
|
+
--vvd-color-neutral-tint-700: #cbcbd9;
|
|
110
|
+
--vvd-color-neutral-tint-800: #e5e5ec;
|
|
111
|
+
--vvd-color-neutral-tint-900: #f2f3f9;
|
|
102
112
|
--vvd-color-surface-0dp: #0d0d0d;
|
|
103
113
|
--vvd-color-surface-2dp: linear-gradient(#ffffff0f, #ffffff0f), #0d0d0d;
|
|
104
114
|
--vvd-color-surface-4dp: linear-gradient(#ffffff14, #ffffff14), #0d0d0d;
|
|
@@ -209,6 +219,17 @@
|
|
|
209
219
|
--vvd-color-alert-800: #6e0000;
|
|
210
220
|
--vvd-color-alert-900: #3e0004;
|
|
211
221
|
--vvd-color-alert-950: #250004;
|
|
222
|
+
--vvd-color-neutral-tint-50: #f2f3f9;
|
|
223
|
+
--vvd-color-neutral-tint-100: #e5e5ec;
|
|
224
|
+
--vvd-color-neutral-tint-200: #cbcbd9;
|
|
225
|
+
--vvd-color-neutral-tint-300: #b2b1c7;
|
|
226
|
+
--vvd-color-neutral-tint-400: #908fae;
|
|
227
|
+
--vvd-color-neutral-tint-500: #727198;
|
|
228
|
+
--vvd-color-neutral-tint-600: #63628d;
|
|
229
|
+
--vvd-color-neutral-tint-700: #494977;
|
|
230
|
+
--vvd-color-neutral-tint-800: #31304f;
|
|
231
|
+
--vvd-color-neutral-tint-900: #191828;
|
|
232
|
+
--vvd-color-neutral-tint-950: #0d0c15;
|
|
212
233
|
--vvd-color-surface-0dp: #ffffff;
|
|
213
234
|
--vvd-color-surface-2dp: #ffffff;
|
|
214
235
|
--vvd-color-surface-4dp: #ffffff;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Wed, 13 Nov 2024 14:14:30 GMT
|
|
16
16
|
*/
|
|
17
17
|
@property --vvd-size-density {
|
|
18
18
|
syntax: "<integer>";
|
|
@@ -105,6 +105,17 @@
|
|
|
105
105
|
--vvd-color-alert-800: #6e0000;
|
|
106
106
|
--vvd-color-alert-900: #3e0004;
|
|
107
107
|
--vvd-color-alert-950: #250004;
|
|
108
|
+
--vvd-color-neutral-tint-50: #f2f3f9;
|
|
109
|
+
--vvd-color-neutral-tint-100: #e5e5ec;
|
|
110
|
+
--vvd-color-neutral-tint-200: #cbcbd9;
|
|
111
|
+
--vvd-color-neutral-tint-300: #b2b1c7;
|
|
112
|
+
--vvd-color-neutral-tint-400: #908fae;
|
|
113
|
+
--vvd-color-neutral-tint-500: #727198;
|
|
114
|
+
--vvd-color-neutral-tint-600: #63628d;
|
|
115
|
+
--vvd-color-neutral-tint-700: #494977;
|
|
116
|
+
--vvd-color-neutral-tint-800: #31304f;
|
|
117
|
+
--vvd-color-neutral-tint-900: #191828;
|
|
118
|
+
--vvd-color-neutral-tint-950: #0d0c15;
|
|
108
119
|
--vvd-color-surface-0dp: #ffffff;
|
|
109
120
|
--vvd-color-surface-2dp: #ffffff;
|
|
110
121
|
--vvd-color-surface-4dp: #ffffff;
|
|
@@ -189,16 +200,6 @@
|
|
|
189
200
|
--vvd-color-announcement-700: #f8b9e7;
|
|
190
201
|
--vvd-color-announcement-800: #ffdcf7;
|
|
191
202
|
--vvd-color-announcement-900: #ffedfb;
|
|
192
|
-
--vvd-color-alert-50: #3e0004;
|
|
193
|
-
--vvd-color-alert-100: #6e0000;
|
|
194
|
-
--vvd-color-alert-200: #9f0202;
|
|
195
|
-
--vvd-color-alert-300: #cd0d0d;
|
|
196
|
-
--vvd-color-alert-400: #e61d1d;
|
|
197
|
-
--vvd-color-alert-500: #f75959;
|
|
198
|
-
--vvd-color-alert-600: #fe9696;
|
|
199
|
-
--vvd-color-alert-700: #ffbbbb;
|
|
200
|
-
--vvd-color-alert-800: #fedfdf;
|
|
201
|
-
--vvd-color-alert-900: #ffeef2;
|
|
202
203
|
--vvd-color-success-50: #0a1e11;
|
|
203
204
|
--vvd-color-success-100: #183a1e;
|
|
204
205
|
--vvd-color-success-200: #155923;
|
|
@@ -209,6 +210,26 @@
|
|
|
209
210
|
--vvd-color-success-700: #86e090;
|
|
210
211
|
--vvd-color-success-800: #cfeed4;
|
|
211
212
|
--vvd-color-success-900: #e1f8e5;
|
|
213
|
+
--vvd-color-alert-50: #3e0004;
|
|
214
|
+
--vvd-color-alert-100: #6e0000;
|
|
215
|
+
--vvd-color-alert-200: #9f0202;
|
|
216
|
+
--vvd-color-alert-300: #cd0d0d;
|
|
217
|
+
--vvd-color-alert-400: #e61d1d;
|
|
218
|
+
--vvd-color-alert-500: #f75959;
|
|
219
|
+
--vvd-color-alert-600: #fe9696;
|
|
220
|
+
--vvd-color-alert-700: #ffbbbb;
|
|
221
|
+
--vvd-color-alert-800: #fedfdf;
|
|
222
|
+
--vvd-color-alert-900: #ffeef2;
|
|
223
|
+
--vvd-color-neutral-tint-50: #191828;
|
|
224
|
+
--vvd-color-neutral-tint-100: #31304f;
|
|
225
|
+
--vvd-color-neutral-tint-200: #494977;
|
|
226
|
+
--vvd-color-neutral-tint-300: #63628d;
|
|
227
|
+
--vvd-color-neutral-tint-400: #727198;
|
|
228
|
+
--vvd-color-neutral-tint-500: #908fae;
|
|
229
|
+
--vvd-color-neutral-tint-600: #b2b1c7;
|
|
230
|
+
--vvd-color-neutral-tint-700: #cbcbd9;
|
|
231
|
+
--vvd-color-neutral-tint-800: #e5e5ec;
|
|
232
|
+
--vvd-color-neutral-tint-900: #f2f3f9;
|
|
212
233
|
--vvd-color-surface-0dp: #0d0d0d;
|
|
213
234
|
--vvd-color-surface-2dp: linear-gradient(#ffffff0f, #ffffff0f), #0d0d0d;
|
|
214
235
|
--vvd-color-surface-4dp: linear-gradient(#ffffff14, #ffffff14), #0d0d0d;
|
package/vivid.api.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
3
|
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
-
"toolVersion": "7.47.
|
|
4
|
+
"toolVersion": "7.47.11",
|
|
5
5
|
"schemaVersion": 1011,
|
|
6
6
|
"oldestForwardsCompatibleVersion": 1001,
|
|
7
7
|
"tsdocConfig": {
|
|
@@ -607,6 +607,27 @@
|
|
|
607
607
|
},
|
|
608
608
|
"releaseTag": "Public",
|
|
609
609
|
"name": "Subtle"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"kind": "EnumMember",
|
|
613
|
+
"canonicalReference": "@vonage/vivid!Appearance.SubtleLight:member",
|
|
614
|
+
"docComment": "",
|
|
615
|
+
"excerptTokens": [
|
|
616
|
+
{
|
|
617
|
+
"kind": "Content",
|
|
618
|
+
"text": "SubtleLight = "
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
"kind": "Content",
|
|
622
|
+
"text": "\"subtle-light\""
|
|
623
|
+
}
|
|
624
|
+
],
|
|
625
|
+
"initializerTokenRange": {
|
|
626
|
+
"startIndex": 1,
|
|
627
|
+
"endIndex": 2
|
|
628
|
+
},
|
|
629
|
+
"releaseTag": "Public",
|
|
630
|
+
"name": "SubtleLight"
|
|
610
631
|
}
|
|
611
632
|
]
|
|
612
633
|
},
|
|
@@ -1190,6 +1211,15 @@
|
|
|
1190
1211
|
"text": "Appearance.Subtle",
|
|
1191
1212
|
"canonicalReference": "@vonage/vivid!Appearance.Subtle:member"
|
|
1192
1213
|
},
|
|
1214
|
+
{
|
|
1215
|
+
"kind": "Content",
|
|
1216
|
+
"text": " | "
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"kind": "Reference",
|
|
1220
|
+
"text": "Appearance.SubtleLight",
|
|
1221
|
+
"canonicalReference": "@vonage/vivid!Appearance.SubtleLight:member"
|
|
1222
|
+
},
|
|
1193
1223
|
{
|
|
1194
1224
|
"kind": "Content",
|
|
1195
1225
|
"text": ">"
|
|
@@ -1204,7 +1234,7 @@
|
|
|
1204
1234
|
"name": "BadgeAppearance",
|
|
1205
1235
|
"typeTokenRange": {
|
|
1206
1236
|
"startIndex": 1,
|
|
1207
|
-
"endIndex":
|
|
1237
|
+
"endIndex": 13
|
|
1208
1238
|
}
|
|
1209
1239
|
},
|
|
1210
1240
|
{
|
|
@@ -1638,6 +1668,15 @@
|
|
|
1638
1668
|
"kind": "Content",
|
|
1639
1669
|
"text": " | "
|
|
1640
1670
|
},
|
|
1671
|
+
{
|
|
1672
|
+
"kind": "Reference",
|
|
1673
|
+
"text": "Connotation.Announcement",
|
|
1674
|
+
"canonicalReference": "@vonage/vivid!Connotation.Announcement:member"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
"kind": "Content",
|
|
1678
|
+
"text": " | "
|
|
1679
|
+
},
|
|
1641
1680
|
{
|
|
1642
1681
|
"kind": "Reference",
|
|
1643
1682
|
"text": "Connotation.CTA",
|
|
@@ -1675,7 +1714,7 @@
|
|
|
1675
1714
|
"name": "ButtonConnotation",
|
|
1676
1715
|
"typeTokenRange": {
|
|
1677
1716
|
"startIndex": 1,
|
|
1678
|
-
"endIndex":
|
|
1717
|
+
"endIndex": 15
|
|
1679
1718
|
}
|
|
1680
1719
|
},
|
|
1681
1720
|
{
|
|
@@ -3857,6 +3896,15 @@
|
|
|
3857
3896
|
"text": "Connotation.Information",
|
|
3858
3897
|
"canonicalReference": "@vonage/vivid!Connotation.Information:member"
|
|
3859
3898
|
},
|
|
3899
|
+
{
|
|
3900
|
+
"kind": "Content",
|
|
3901
|
+
"text": " | "
|
|
3902
|
+
},
|
|
3903
|
+
{
|
|
3904
|
+
"kind": "Reference",
|
|
3905
|
+
"text": "Connotation.Announcement",
|
|
3906
|
+
"canonicalReference": "@vonage/vivid!Connotation.Announcement:member"
|
|
3907
|
+
},
|
|
3860
3908
|
{
|
|
3861
3909
|
"kind": "Content",
|
|
3862
3910
|
"text": ">"
|
|
@@ -3871,7 +3919,7 @@
|
|
|
3871
3919
|
"name": "IconConnotation",
|
|
3872
3920
|
"typeTokenRange": {
|
|
3873
3921
|
"startIndex": 1,
|
|
3874
|
-
"endIndex":
|
|
3922
|
+
"endIndex": 19
|
|
3875
3923
|
}
|
|
3876
3924
|
},
|
|
3877
3925
|
{
|
|
@@ -10542,6 +10590,15 @@
|
|
|
10542
10590
|
"kind": "Content",
|
|
10543
10591
|
"text": " | "
|
|
10544
10592
|
},
|
|
10593
|
+
{
|
|
10594
|
+
"kind": "Reference",
|
|
10595
|
+
"text": "Connotation.Announcement",
|
|
10596
|
+
"canonicalReference": "@vonage/vivid!Connotation.Announcement:member"
|
|
10597
|
+
},
|
|
10598
|
+
{
|
|
10599
|
+
"kind": "Content",
|
|
10600
|
+
"text": " | "
|
|
10601
|
+
},
|
|
10545
10602
|
{
|
|
10546
10603
|
"kind": "Reference",
|
|
10547
10604
|
"text": "Connotation.CTA",
|
|
@@ -10579,7 +10636,7 @@
|
|
|
10579
10636
|
"name": "SplitButtonConnotation",
|
|
10580
10637
|
"typeTokenRange": {
|
|
10581
10638
|
"startIndex": 1,
|
|
10582
|
-
"endIndex":
|
|
10639
|
+
"endIndex": 15
|
|
10583
10640
|
}
|
|
10584
10641
|
},
|
|
10585
10642
|
{
|
package/shared/aria2.cjs
DELETED
package/shared/aria2.js
DELETED
package/shared/button.cjs
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const index = require('./index.cjs');
|
|
4
|
-
const applyMixins = require('./apply-mixins.cjs');
|
|
5
|
-
const formAssociated = require('./form-associated.cjs');
|
|
6
|
-
const ariaGlobal = require('./aria-global.cjs');
|
|
7
|
-
const startEnd = require('./start-end.cjs');
|
|
8
|
-
|
|
9
|
-
class _Button extends index.FoundationElement {
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* A form-associated base class for the {@link @microsoft/fast-foundation#(Button:class)} component.
|
|
13
|
-
*
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
class FormAssociatedButton extends formAssociated.FormAssociated(_Button) {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.proxy = document.createElement("input");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A Button Custom HTML Element.
|
|
25
|
-
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button | <button> element }.
|
|
26
|
-
*
|
|
27
|
-
* @slot start - Content which can be provided before the button content
|
|
28
|
-
* @slot end - Content which can be provided after the button content
|
|
29
|
-
* @slot - The default slot for button content
|
|
30
|
-
* @csspart control - The button element
|
|
31
|
-
* @csspart content - The element wrapping button content
|
|
32
|
-
*
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
let Button$1 = class Button extends FormAssociatedButton {
|
|
36
|
-
constructor() {
|
|
37
|
-
super(...arguments);
|
|
38
|
-
/**
|
|
39
|
-
* Prevent events to propagate if disabled and has no slotted content wrapped in HTML elements
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
this.handleClick = (e) => {
|
|
43
|
-
var _a;
|
|
44
|
-
if (this.disabled && ((_a = this.defaultSlottedContent) === null || _a === void 0 ? void 0 : _a.length) <= 1) {
|
|
45
|
-
e.stopPropagation();
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Submits the parent form
|
|
50
|
-
*/
|
|
51
|
-
this.handleSubmission = () => {
|
|
52
|
-
if (!this.form) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const attached = this.proxy.isConnected;
|
|
56
|
-
if (!attached) {
|
|
57
|
-
this.attachProxy();
|
|
58
|
-
}
|
|
59
|
-
// Browser support for requestSubmit is not comprehensive
|
|
60
|
-
// so click the proxy if it isn't supported
|
|
61
|
-
typeof this.form.requestSubmit === "function"
|
|
62
|
-
? this.form.requestSubmit(this.proxy)
|
|
63
|
-
: this.proxy.click();
|
|
64
|
-
if (!attached) {
|
|
65
|
-
this.detachProxy();
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
/**
|
|
69
|
-
* Resets the parent form
|
|
70
|
-
*/
|
|
71
|
-
this.handleFormReset = () => {
|
|
72
|
-
var _a;
|
|
73
|
-
(_a = this.form) === null || _a === void 0 ? void 0 : _a.reset();
|
|
74
|
-
};
|
|
75
|
-
/**
|
|
76
|
-
* Overrides the focus call for where delegatesFocus is unsupported.
|
|
77
|
-
* This check works for Chrome, Edge Chromium, FireFox, and Safari
|
|
78
|
-
* Relevant PR on the Firefox browser: https://phabricator.services.mozilla.com/D123858
|
|
79
|
-
*/
|
|
80
|
-
this.handleUnsupportedDelegatesFocus = () => {
|
|
81
|
-
var _a;
|
|
82
|
-
// Check to see if delegatesFocus is supported
|
|
83
|
-
if (window.ShadowRoot &&
|
|
84
|
-
!window.ShadowRoot.prototype.hasOwnProperty("delegatesFocus") &&
|
|
85
|
-
((_a = this.$fastController.definition.shadowOptions) === null || _a === void 0 ? void 0 : _a.delegatesFocus)) {
|
|
86
|
-
this.focus = () => {
|
|
87
|
-
this.control.focus();
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
formactionChanged() {
|
|
93
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
94
|
-
this.proxy.formAction = this.formaction;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
formenctypeChanged() {
|
|
98
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
99
|
-
this.proxy.formEnctype = this.formenctype;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
formmethodChanged() {
|
|
103
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
104
|
-
this.proxy.formMethod = this.formmethod;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
formnovalidateChanged() {
|
|
108
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
109
|
-
this.proxy.formNoValidate = this.formnovalidate;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
formtargetChanged() {
|
|
113
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
114
|
-
this.proxy.formTarget = this.formtarget;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
typeChanged(previous, next) {
|
|
118
|
-
if (this.proxy instanceof HTMLInputElement) {
|
|
119
|
-
this.proxy.type = this.type;
|
|
120
|
-
}
|
|
121
|
-
next === "submit" && this.addEventListener("click", this.handleSubmission);
|
|
122
|
-
previous === "submit" && this.removeEventListener("click", this.handleSubmission);
|
|
123
|
-
next === "reset" && this.addEventListener("click", this.handleFormReset);
|
|
124
|
-
previous === "reset" && this.removeEventListener("click", this.handleFormReset);
|
|
125
|
-
}
|
|
126
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
127
|
-
validate() {
|
|
128
|
-
super.validate(this.control);
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* @internal
|
|
132
|
-
*/
|
|
133
|
-
connectedCallback() {
|
|
134
|
-
var _a;
|
|
135
|
-
super.connectedCallback();
|
|
136
|
-
this.proxy.setAttribute("type", this.type);
|
|
137
|
-
this.handleUnsupportedDelegatesFocus();
|
|
138
|
-
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
139
|
-
if (elements) {
|
|
140
|
-
elements.forEach((span) => {
|
|
141
|
-
span.addEventListener("click", this.handleClick);
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* @internal
|
|
147
|
-
*/
|
|
148
|
-
disconnectedCallback() {
|
|
149
|
-
var _a;
|
|
150
|
-
super.disconnectedCallback();
|
|
151
|
-
const elements = Array.from((_a = this.control) === null || _a === void 0 ? void 0 : _a.children);
|
|
152
|
-
if (elements) {
|
|
153
|
-
elements.forEach((span) => {
|
|
154
|
-
span.removeEventListener("click", this.handleClick);
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
index.__decorate([
|
|
160
|
-
index.attr({ mode: "boolean" })
|
|
161
|
-
], Button$1.prototype, "autofocus", void 0);
|
|
162
|
-
index.__decorate([
|
|
163
|
-
index.attr({ attribute: "form" })
|
|
164
|
-
], Button$1.prototype, "formId", void 0);
|
|
165
|
-
index.__decorate([
|
|
166
|
-
index.attr
|
|
167
|
-
], Button$1.prototype, "formaction", void 0);
|
|
168
|
-
index.__decorate([
|
|
169
|
-
index.attr
|
|
170
|
-
], Button$1.prototype, "formenctype", void 0);
|
|
171
|
-
index.__decorate([
|
|
172
|
-
index.attr
|
|
173
|
-
], Button$1.prototype, "formmethod", void 0);
|
|
174
|
-
index.__decorate([
|
|
175
|
-
index.attr({ mode: "boolean" })
|
|
176
|
-
], Button$1.prototype, "formnovalidate", void 0);
|
|
177
|
-
index.__decorate([
|
|
178
|
-
index.attr
|
|
179
|
-
], Button$1.prototype, "formtarget", void 0);
|
|
180
|
-
index.__decorate([
|
|
181
|
-
index.attr
|
|
182
|
-
], Button$1.prototype, "type", void 0);
|
|
183
|
-
index.__decorate([
|
|
184
|
-
index.observable
|
|
185
|
-
], Button$1.prototype, "defaultSlottedContent", void 0);
|
|
186
|
-
/**
|
|
187
|
-
* Includes ARIA states and properties relating to the ARIA button role
|
|
188
|
-
*
|
|
189
|
-
* @public
|
|
190
|
-
*/
|
|
191
|
-
class DelegatesARIAButton {
|
|
192
|
-
}
|
|
193
|
-
index.__decorate([
|
|
194
|
-
index.attr({ attribute: "aria-expanded" })
|
|
195
|
-
], DelegatesARIAButton.prototype, "ariaExpanded", void 0);
|
|
196
|
-
index.__decorate([
|
|
197
|
-
index.attr({ attribute: "aria-pressed" })
|
|
198
|
-
], DelegatesARIAButton.prototype, "ariaPressed", void 0);
|
|
199
|
-
applyMixins.applyMixins(DelegatesARIAButton, ariaGlobal.ARIAGlobalStatesAndProperties);
|
|
200
|
-
applyMixins.applyMixins(Button$1, startEnd.StartEnd, DelegatesARIAButton);
|
|
201
|
-
|
|
202
|
-
exports.Button = Button$1;
|