@vonage/vivid 3.0.0-next.82 → 3.0.0-next.84
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/accordion/index.js +2 -9
- package/accordion-item/index.js +8 -22
- package/action-group/index.js +2 -8
- package/avatar/index.js +4 -14
- package/badge/index.js +3 -13
- package/banner/index.js +3 -26
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +5 -9
- package/calendar/index.js +12 -49
- package/calendar-event/index.js +4 -7
- package/card/index.js +9 -28
- package/checkbox/index.js +3 -11
- package/dialog/index.js +7 -59
- package/divider/index.js +1 -0
- package/fab/index.js +2 -8
- package/focus/index.js +2 -2
- package/header/index.js +2 -7
- package/icon/index.js +2 -5
- package/index.js +5 -1
- package/layout/index.js +1 -9
- package/lib/badge/badge.d.ts +1 -3
- package/lib/components.d.ts +2 -0
- package/lib/listbox-option/index.d.ts +4 -0
- package/lib/listbox-option/listbox-option.d.ts +7 -0
- package/lib/listbox-option/listbox-option.template.d.ts +4 -0
- package/lib/radio-group/index.d.ts +10 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/listbox-option/index.js +248 -0
- package/menu/index.js +2 -7
- package/menu-item/index.js +1 -0
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +4 -11
- package/nav-item/index.js +2 -2
- package/note/index.js +4 -12
- package/number-field/index.js +25 -21
- package/package.json +13 -9
- package/popup/index.js +0 -1
- package/progress/index.js +5 -13
- package/progress-ring/index.js +4 -8
- package/radio/index.js +7 -131
- package/radio-group/index.js +435 -0
- package/shared/affix.js +1 -6
- package/shared/apply-mixins.js +5 -4
- package/shared/aria.js +9 -0
- package/shared/calendar-event.js +0 -7
- package/shared/direction.js +20 -0
- package/shared/enums.js +0 -17
- package/shared/es.object.assign.js +4 -4
- package/shared/export.js +79 -57
- package/shared/focus2.js +1 -1
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +5 -27
- package/shared/icon.js +8 -18
- package/shared/index.js +38 -25
- package/shared/index2.js +2 -13
- package/shared/index3.js +1 -5
- package/shared/index4.js +3 -12
- package/shared/index5.js +6 -581
- package/shared/index6.js +7 -29
- package/shared/iterators.js +3 -3
- package/shared/key-codes.js +7 -1
- package/shared/object-keys.js +2 -2
- package/shared/patterns/form-elements/form-elements.d.ts +1 -1
- package/shared/radio.js +127 -0
- package/shared/ref.js +1 -1
- package/shared/slotted.js +1 -1
- package/shared/text-anchor.js +0 -2
- package/shared/text-anchor.template.js +1 -3
- package/shared/web.dom-collections.iterator.js +6 -8
- package/side-drawer/index.js +3 -16
- 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 +29 -23
- package/styles/tokens/theme-light.css +29 -23
- package/text-area/index.js +3 -9
- package/text-field/index.js +4 -14
- package/tooltip/index.js +2 -10
- package/shared/regexp-flags.js +0 -21
package/shared/index6.js
CHANGED
|
@@ -2,31 +2,13 @@ import '../icon/index.js';
|
|
|
2
2
|
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, o as observable, b as __metadata, h as html, d as designSystem } from './index.js';
|
|
3
3
|
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
4
4
|
import { S as StartEnd } from './start-end.js';
|
|
5
|
+
import { D as Direction, g as getDirection } from './direction.js';
|
|
5
6
|
import { a as applyMixins } from './apply-mixins.js';
|
|
6
7
|
import { g as keyArrowLeft, h as keyArrowRight, a as keySpace, k as keyEnter } from './key-codes.js';
|
|
7
8
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
9
|
import { w as when } from './when.js';
|
|
9
10
|
import { c as classNames } from './class-names.js';
|
|
10
11
|
|
|
11
|
-
/**
|
|
12
|
-
* Expose ltr and rtl strings
|
|
13
|
-
*/
|
|
14
|
-
var Direction;
|
|
15
|
-
(function (Direction) {
|
|
16
|
-
Direction["ltr"] = "ltr";
|
|
17
|
-
Direction["rtl"] = "rtl";
|
|
18
|
-
})(Direction || (Direction = {}));
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* a method to determine the current localization direction of the view
|
|
22
|
-
* @param rootNode - the HTMLElement to begin the query from, usually "this" when used in a component controller
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
const getDirection = (rootNode) => {
|
|
26
|
-
const dirNode = rootNode.closest("[dir]");
|
|
27
|
-
return dirNode !== null && dirNode.dir === "rtl" ? Direction.rtl : Direction.ltr;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
12
|
/**
|
|
31
13
|
* Menu items roles.
|
|
32
14
|
* @public
|
|
@@ -297,28 +279,24 @@ __decorate([
|
|
|
297
279
|
], MenuItem$1.prototype, "submenu", void 0);
|
|
298
280
|
applyMixins(MenuItem$1, StartEnd);
|
|
299
281
|
|
|
300
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
282
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 31 Oct 2022 12:51:44 GMT\n */\n@supports selector(:focus-visible) {\n :host(:focus) {\n outline: none;\n }\n}\n.base {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n block-size: 40px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n gap: 8px;\n inline-size: 100%;\n padding-inline: 8px;\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n cursor: pointer;\n}\n.base.disabled {\n cursor: not-allowed;\n}\n\n.focus-indicator {\n border-radius: 6px;\n}\n:host(:not(:focus-visible)) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n}\n.base:not(.item-checkbox, .item-radio) .icon {\n color: var(--vvd-color-neutral-600);\n}\n\n.text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}";
|
|
301
283
|
|
|
302
284
|
class MenuItem extends MenuItem$1 {}
|
|
303
|
-
|
|
304
285
|
__decorate([attr, __metadata("design:type", String)], MenuItem.prototype, "text", void 0);
|
|
305
|
-
|
|
306
286
|
applyMixins(MenuItem, AffixIcon);
|
|
307
287
|
|
|
308
288
|
let _ = t => t,
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
289
|
+
_t,
|
|
290
|
+
_t2,
|
|
291
|
+
_t3,
|
|
292
|
+
_t4,
|
|
293
|
+
_t5;
|
|
315
294
|
const getClasses = ({
|
|
316
295
|
disabled,
|
|
317
296
|
checked,
|
|
318
297
|
expanded,
|
|
319
298
|
role
|
|
320
299
|
}) => classNames('base', ['disabled', Boolean(disabled)], ['selected', role !== MenuItemRole.menuitem && Boolean(checked)], ['expanded', Boolean(expanded)], ['item-checkbox', role === MenuItemRole.menuitemcheckbox], ['item-radio', role === MenuItemRole.menuitemradio]);
|
|
321
|
-
|
|
322
300
|
const MenuItemTemplate = (context, definition) => {
|
|
323
301
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
324
302
|
const focusTemplate = focusTemplateFactory(context);
|
package/shared/iterators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isCallable$1, f as functionUncurryThis, j as anObject$1,
|
|
1
|
+
import { i as isCallable$1, f as functionUncurryThis, j as anObject$1, w as wellKnownSymbol$1, o as objectDefineProperty, q as hasOwnProperty_1, a as getBuiltIn$1 } from './export.js';
|
|
2
2
|
|
|
3
3
|
var isCallable = isCallable$1;
|
|
4
4
|
|
|
@@ -19,13 +19,13 @@ var aPossiblePrototype = aPossiblePrototype$1;
|
|
|
19
19
|
// `Object.setPrototypeOf` method
|
|
20
20
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
21
21
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
22
|
-
// eslint-disable-next-line es
|
|
22
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
23
23
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
24
24
|
var CORRECT_SETTER = false;
|
|
25
25
|
var test = {};
|
|
26
26
|
var setter;
|
|
27
27
|
try {
|
|
28
|
-
// eslint-disable-next-line es
|
|
28
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
29
29
|
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
30
30
|
setter(test, []);
|
|
31
31
|
CORRECT_SETTER = test instanceof Array;
|
package/shared/key-codes.js
CHANGED
|
@@ -86,5 +86,11 @@ const keyEscape = "Escape";
|
|
|
86
86
|
const keyHome = "Home";
|
|
87
87
|
const keyEnd = "End";
|
|
88
88
|
const keySpace = " ";
|
|
89
|
+
const ArrowKeys = {
|
|
90
|
+
ArrowDown: keyArrowDown,
|
|
91
|
+
ArrowLeft: keyArrowLeft,
|
|
92
|
+
ArrowRight: keyArrowRight,
|
|
93
|
+
ArrowUp: keyArrowUp,
|
|
94
|
+
};
|
|
89
95
|
|
|
90
|
-
export { keySpace as a, keyHome as b, keyEnd as c, keyArrowUp as d, keyArrowDown as e, keyEscape as f, keyArrowLeft as g, keyArrowRight as h, keyEnter as k };
|
|
96
|
+
export { ArrowKeys as A, keySpace as a, keyHome as b, keyEnd as c, keyArrowUp as d, keyArrowDown as e, keyEscape as f, keyArrowLeft as g, keyArrowRight as h, keyEnter as k };
|
package/shared/object-keys.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { M as objectKeysInternal,
|
|
1
|
+
import { M as objectKeysInternal, H as enumBugKeys$1 } from './export.js';
|
|
2
2
|
|
|
3
3
|
var internalObjectKeys = objectKeysInternal;
|
|
4
4
|
var enumBugKeys = enumBugKeys$1;
|
|
5
5
|
|
|
6
6
|
// `Object.keys` method
|
|
7
7
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
8
|
-
// eslint-disable-next-line es
|
|
8
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
9
9
|
var objectKeys = Object.keys || function keys(O) {
|
|
10
10
|
return internalObjectKeys(O, enumBugKeys);
|
|
11
11
|
};
|
|
@@ -18,7 +18,7 @@ export declare function formElements<T extends {
|
|
|
18
18
|
successText?: string | undefined;
|
|
19
19
|
charCount: boolean;
|
|
20
20
|
userValid: boolean;
|
|
21
|
-
"__#
|
|
21
|
+
"__#6619@#blurred": boolean;
|
|
22
22
|
readonly errorValidationMessage: any;
|
|
23
23
|
validate: () => void;
|
|
24
24
|
};
|
package/shared/radio.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, o as observable, b as __metadata } from './index.js';
|
|
2
|
+
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
3
|
+
import { a as keySpace } from './key-codes.js';
|
|
4
|
+
|
|
5
|
+
class _Radio extends FoundationElement {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A form-associated base class for the {@link @microsoft/fast-foundation#(Radio:class)} component.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
class FormAssociatedRadio extends CheckableFormAssociated(_Radio) {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.proxy = document.createElement("input");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A Radio Custom HTML Element.
|
|
21
|
+
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#radio | ARIA radio }.
|
|
22
|
+
*
|
|
23
|
+
* @slot checked-indicator - The checked indicator
|
|
24
|
+
* @slot - The default slot for the label
|
|
25
|
+
* @csspart control - The element representing the visual radio control
|
|
26
|
+
* @csspart label - The label
|
|
27
|
+
* @fires change - Emits a custom change event when the checked state changes
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
class Radio$1 extends FormAssociatedRadio {
|
|
32
|
+
constructor() {
|
|
33
|
+
super();
|
|
34
|
+
/**
|
|
35
|
+
* The element's value to be included in form submission when checked.
|
|
36
|
+
* Default to "on" to reach parity with input[type="radio"]
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
this.initialValue = "on";
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
this.keypressHandler = (e) => {
|
|
45
|
+
switch (e.key) {
|
|
46
|
+
case keySpace:
|
|
47
|
+
if (!this.checked && !this.readOnly) {
|
|
48
|
+
this.checked = true;
|
|
49
|
+
}
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
};
|
|
54
|
+
this.proxy.setAttribute("type", "radio");
|
|
55
|
+
}
|
|
56
|
+
readOnlyChanged() {
|
|
57
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
58
|
+
this.proxy.readOnly = this.readOnly;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
defaultCheckedChanged() {
|
|
65
|
+
var _a;
|
|
66
|
+
if (this.$fastController.isConnected && !this.dirtyChecked) {
|
|
67
|
+
// Setting this.checked will cause us to enter a dirty state,
|
|
68
|
+
// but if we are clean when defaultChecked is changed, we want to stay
|
|
69
|
+
// in a clean state, so reset this.dirtyChecked
|
|
70
|
+
if (!this.isInsideRadioGroup()) {
|
|
71
|
+
this.checked = (_a = this.defaultChecked) !== null && _a !== void 0 ? _a : false;
|
|
72
|
+
this.dirtyChecked = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
connectedCallback() {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
super.connectedCallback();
|
|
82
|
+
this.validate();
|
|
83
|
+
if (((_a = this.parentElement) === null || _a === void 0 ? void 0 : _a.getAttribute("role")) !== "radiogroup" &&
|
|
84
|
+
this.getAttribute("tabindex") === null) {
|
|
85
|
+
if (!this.disabled) {
|
|
86
|
+
this.setAttribute("tabindex", "0");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (this.checkedAttribute) {
|
|
90
|
+
if (!this.dirtyChecked) {
|
|
91
|
+
// Setting this.checked will cause us to enter a dirty state,
|
|
92
|
+
// but if we are clean when defaultChecked is changed, we want to stay
|
|
93
|
+
// in a clean state, so reset this.dirtyChecked
|
|
94
|
+
if (!this.isInsideRadioGroup()) {
|
|
95
|
+
this.checked = (_b = this.defaultChecked) !== null && _b !== void 0 ? _b : false;
|
|
96
|
+
this.dirtyChecked = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
isInsideRadioGroup() {
|
|
102
|
+
const parent = this.closest("[role=radiogroup]");
|
|
103
|
+
return parent !== null;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
clickHandler(e) {
|
|
109
|
+
if (!this.disabled && !this.readOnly && !this.checked) {
|
|
110
|
+
this.checked = true;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
__decorate([
|
|
115
|
+
attr({ attribute: "readonly", mode: "boolean" })
|
|
116
|
+
], Radio$1.prototype, "readOnly", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
observable
|
|
119
|
+
], Radio$1.prototype, "name", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
observable
|
|
122
|
+
], Radio$1.prototype, "defaultSlottedNodes", void 0);
|
|
123
|
+
|
|
124
|
+
class Radio extends Radio$1 {}
|
|
125
|
+
__decorate([attr, __metadata("design:type", String)], Radio.prototype, "label", void 0);
|
|
126
|
+
|
|
127
|
+
export { Radio as R };
|
package/shared/ref.js
CHANGED
package/shared/slotted.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as Observable,
|
|
1
|
+
import { O as Observable, g as emptyArray, e as AttachedBehaviorHTMLDirective } from './index.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Creates a function that can be used to filter a Node array, selecting only elements.
|
package/shared/text-anchor.js
CHANGED
|
@@ -4,9 +4,7 @@ import { A as Anchor } from './anchor.js';
|
|
|
4
4
|
import { a as applyMixins } from './apply-mixins.js';
|
|
5
5
|
|
|
6
6
|
class TextAnchor extends Anchor {}
|
|
7
|
-
|
|
8
7
|
__decorate([attr, __metadata("design:type", String)], TextAnchor.prototype, "text", void 0);
|
|
9
|
-
|
|
10
8
|
applyMixins(TextAnchor, AffixIcon);
|
|
11
9
|
|
|
12
10
|
export { TextAnchor as T };
|
|
@@ -5,13 +5,11 @@ import { r as ref } from './ref.js';
|
|
|
5
5
|
import { c as classNames } from './class-names.js';
|
|
6
6
|
|
|
7
7
|
let _ = t => t,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_t;
|
|
10
9
|
const getClasses = ({
|
|
11
10
|
text,
|
|
12
11
|
icon
|
|
13
12
|
}) => classNames('control', ['icon-only', !text && !!icon]);
|
|
14
|
-
|
|
15
13
|
const textAnchorTemplate = context => {
|
|
16
14
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
17
15
|
const focusTemplate = focusTemplateFactory(context);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as descriptors, E as v8PrototypeDefineBug, o as objectDefineProperty, j as anObject$2, F as toIndexedObject$2, G as
|
|
1
|
+
import { d as descriptors, E as v8PrototypeDefineBug, o as objectDefineProperty, j as anObject$2, F as toIndexedObject$2, G as sharedKey$2, H as enumBugKeys$1, I as hiddenKeys$1, p as documentCreateElement$2, w as wellKnownSymbol$4, e as fails$2, q as hasOwnProperty_1, i as isCallable$3, J as toObject$1, z as isObject$1, v as defineBuiltIn$2, K as createPropertyDescriptor$1, _ as _export, L as createNonEnumerableProperty$2, x as functionCall, D as functionName, y as internalState, g as global$1 } from './export.js';
|
|
2
2
|
import { o as objectKeys$1 } from './object-keys.js';
|
|
3
3
|
import { h as html$1, s as setToStringTag$2, i as iterators, o as objectSetPrototypeOf } from './iterators.js';
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ var objectKeys = objectKeys$1;
|
|
|
13
13
|
|
|
14
14
|
// `Object.defineProperties` method
|
|
15
15
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
16
|
-
// eslint-disable-next-line es
|
|
16
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
17
17
|
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
18
18
|
anObject$1(O);
|
|
19
19
|
var props = toIndexedObject$1(Properties);
|
|
@@ -97,7 +97,7 @@ hiddenKeys[IE_PROTO$1] = true;
|
|
|
97
97
|
|
|
98
98
|
// `Object.create` method
|
|
99
99
|
// https://tc39.es/ecma262/#sec-object.create
|
|
100
|
-
// eslint-disable-next-line es
|
|
100
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
101
101
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
102
102
|
var result;
|
|
103
103
|
if (O !== null) {
|
|
@@ -136,7 +136,7 @@ var fails$1 = fails$2;
|
|
|
136
136
|
var correctPrototypeGetter = !fails$1(function () {
|
|
137
137
|
function F() { /* empty */ }
|
|
138
138
|
F.prototype.constructor = null;
|
|
139
|
-
// eslint-disable-next-line es
|
|
139
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
140
140
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
141
141
|
});
|
|
142
142
|
|
|
@@ -152,7 +152,7 @@ var ObjectPrototype = $Object.prototype;
|
|
|
152
152
|
|
|
153
153
|
// `Object.getPrototypeOf` method
|
|
154
154
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
155
|
-
// eslint-disable-next-line es
|
|
155
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
156
156
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
157
157
|
var object = toObject(O);
|
|
158
158
|
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
|
@@ -176,7 +176,7 @@ var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
|
176
176
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
177
177
|
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
178
178
|
|
|
179
|
-
/* eslint-disable es
|
|
179
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
180
180
|
if ([].keys) {
|
|
181
181
|
arrayIterator = [].keys();
|
|
182
182
|
// Safari 8 has buggy iterators w/o `next`
|
|
@@ -470,5 +470,3 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
470
470
|
}
|
|
471
471
|
|
|
472
472
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
473
|
-
|
|
474
|
-
export { objectCreate as o };
|
package/side-drawer/index.js
CHANGED
|
@@ -10,18 +10,14 @@ var _SideDrawer_instances, _SideDrawer_close, _SideDrawer_open;
|
|
|
10
10
|
class SideDrawer extends FoundationElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
-
|
|
14
13
|
_SideDrawer_instances.add(this);
|
|
15
|
-
|
|
16
14
|
this.alternate = false;
|
|
17
15
|
this.modal = false;
|
|
18
16
|
this.open = false;
|
|
19
17
|
this.trailing = false;
|
|
20
18
|
}
|
|
21
|
-
|
|
22
19
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
23
20
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
24
|
-
|
|
25
21
|
switch (name) {
|
|
26
22
|
case 'open':
|
|
27
23
|
{
|
|
@@ -29,46 +25,38 @@ class SideDrawer extends FoundationElement {
|
|
|
29
25
|
}
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
|
-
|
|
33
28
|
}
|
|
34
29
|
_SideDrawer_instances = new WeakSet(), _SideDrawer_close = function _SideDrawer_close() {
|
|
35
30
|
this.$emit('close');
|
|
36
31
|
}, _SideDrawer_open = function _SideDrawer_open() {
|
|
37
32
|
this.$emit('open');
|
|
38
33
|
};
|
|
39
|
-
|
|
40
34
|
__decorate([attr({
|
|
41
35
|
mode: 'boolean'
|
|
42
36
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "alternate", void 0);
|
|
43
|
-
|
|
44
37
|
__decorate([attr({
|
|
45
38
|
mode: 'boolean'
|
|
46
39
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "modal", void 0);
|
|
47
|
-
|
|
48
40
|
__decorate([attr({
|
|
49
41
|
mode: 'boolean'
|
|
50
42
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "open", void 0);
|
|
51
|
-
|
|
52
43
|
__decorate([attr({
|
|
53
44
|
mode: 'boolean'
|
|
54
45
|
}), __metadata("design:type", Object)], SideDrawer.prototype, "trailing", void 0);
|
|
55
46
|
|
|
56
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
47
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 31 Oct 2022 12:51:44 GMT\n */\n.control {\n position: fixed;\n z-index: 1;\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n inline-size: 280px;\n inset-block: 0;\n overflow-y: auto;\n}\n.control[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n.control.trailing {\n inset-inline-end: 0;\n}\n.control:not(.open).trailing {\n transform: translateX(100%);\n}\n.control:not(.open):not(.trailing) {\n transform: translateX(-100%);\n}\n.control.open:not(.modal).trailing + .side-drawer-app-content {\n margin-inline-end: var(--side-drawer-app-content-offset, 280px);\n}\n.control.open:not(.modal):not(.trailing) + .side-drawer-app-content {\n margin-inline-start: var(--side-drawer-app-content-offset, 280px);\n}\n@media (prefers-reduced-motion: no-preference) {\n .control {\n transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);\n }\n}\n\n.scrim {\n background-color: var(--vvd-color-canvas-text);\n opacity: 0.5;\n position: fixed;\n inset: 0;\n}\n.scrim:not(.open) {\n display: none;\n}";
|
|
57
48
|
|
|
58
49
|
let _ = t => t,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
_t,
|
|
51
|
+
_t2;
|
|
62
52
|
const getClasses = ({
|
|
63
53
|
modal,
|
|
64
54
|
open,
|
|
65
55
|
trailing
|
|
66
56
|
}) => classNames('control', ['modal', modal], ['open', open], ['trailing', trailing]);
|
|
67
|
-
|
|
68
57
|
const getScrimClasses = ({
|
|
69
58
|
open
|
|
70
59
|
}) => classNames('scrim', ['open', open]);
|
|
71
|
-
|
|
72
60
|
const sideDrawerTemplate = () => html(_t || (_t = _`
|
|
73
61
|
<aside class="${0}" part="base ${0}"
|
|
74
62
|
@keydown="${0}">
|
|
@@ -81,7 +69,6 @@ const sideDrawerTemplate = () => html(_t || (_t = _`
|
|
|
81
69
|
|
|
82
70
|
${0}
|
|
83
71
|
`), getClasses, x => x.alternate ? 'vvd-theme-alternate' : '', (x, c) => handleKeydown(x, c.event), x => x.open && x.modal, when(x => x.modal, html(_t2 || (_t2 = _`<div class="${0}" @click="${0}"></div>`), getScrimClasses, x => x.open = false)));
|
|
84
|
-
|
|
85
72
|
const handleKeydown = (x, {
|
|
86
73
|
key
|
|
87
74
|
}) => {
|
package/styles/core/all.css
CHANGED
package/styles/core/theme.css
CHANGED
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
16
16
|
*/
|
|
17
|
+
@property --vvd-size-density {
|
|
18
|
+
syntax: "<integer>";
|
|
19
|
+
inherits: true;
|
|
20
|
+
initial-value: 0;
|
|
21
|
+
}
|
|
22
|
+
@property --vvd-size-font-scale-base {
|
|
23
|
+
syntax: "<length>";
|
|
24
|
+
inherits: true;
|
|
25
|
+
initial-value: 16px;
|
|
26
|
+
}
|
|
17
27
|
.vvd-root, ::part(vvd-root) {
|
|
18
28
|
--vvd-color-scheme: dark;
|
|
19
29
|
--vvd-color-canvas: #000000;
|
|
@@ -103,25 +113,21 @@
|
|
|
103
113
|
--vvd-shadow-surface-12dp: drop-shadow(0px 4px 24px #00000040) drop-shadow(0px 12px 16px #00000040) drop-shadow(0px 6px 8px #00000040);
|
|
104
114
|
--vvd-shadow-surface-16dp: drop-shadow(0px 6px 32px #00000040) drop-shadow(0px 16px 24px #00000040) drop-shadow(0px 8px 12px #00000040);
|
|
105
115
|
--vvd-shadow-surface-24dp: drop-shadow(0px 12px 48px #00000040) drop-shadow(0px 24px 32px #00000040) drop-shadow(0px 12px 16px #00000040);
|
|
106
|
-
--vvd-font-family-upright
|
|
107
|
-
--vvd-font-family-
|
|
108
|
-
--vvd-size-font-scale-base
|
|
109
|
-
--vvd-typography-
|
|
110
|
-
--vvd-typography-
|
|
111
|
-
--vvd-typography-heading-
|
|
112
|
-
--vvd-typography-
|
|
113
|
-
--vvd-typography-
|
|
114
|
-
--vvd-typography-
|
|
115
|
-
--vvd-typography-base: 400 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
116
|
-
--vvd-typography-base-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
117
|
-
--vvd-typography-base-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
118
|
-
--vvd-typography-base-
|
|
119
|
-
--vvd-typography-base-
|
|
120
|
-
--vvd-typography-base-
|
|
121
|
-
--vvd-typography-base-extended: 400 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-upright);
|
|
122
|
-
--vvd-typography-base-extended-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-upright);
|
|
123
|
-
--vvd-typography-base-extended-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-monospace);
|
|
124
|
-
--vvd-size-base: 40px;
|
|
116
|
+
--vvd-typography-headline: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 4.125)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
117
|
+
--vvd-typography-subtitle: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 3.25)/1.3076923076923077 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
118
|
+
--vvd-typography-heading-1: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 2.5)/1.3 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
119
|
+
--vvd-typography-heading-2: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 2)/1.375 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
120
|
+
--vvd-typography-heading-3: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 1.625)/1.3846153846153846 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
121
|
+
--vvd-typography-heading-4: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 1.25)/1.4 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
122
|
+
--vvd-typography-base: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
123
|
+
--vvd-typography-base-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
124
|
+
--vvd-typography-base-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
125
|
+
--vvd-typography-base-condensed: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
126
|
+
--vvd-typography-base-condensed-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
127
|
+
--vvd-typography-base-condensed-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
128
|
+
--vvd-typography-base-extended: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
129
|
+
--vvd-typography-base-extended-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
130
|
+
--vvd-typography-base-extended-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
.vvd-theme-alternate, ::part(vvd-theme-alternate) {
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Do not edit directly
|
|
7
|
-
* Generated on
|
|
7
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* Do not edit directly
|
|
11
|
-
* Generated on
|
|
11
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* Do not edit directly
|
|
15
|
-
* Generated on
|
|
15
|
+
* Generated on Mon, 31 Oct 2022 12:51:44 GMT
|
|
16
16
|
*/
|
|
17
|
+
@property --vvd-size-density {
|
|
18
|
+
syntax: "<integer>";
|
|
19
|
+
inherits: true;
|
|
20
|
+
initial-value: 0;
|
|
21
|
+
}
|
|
22
|
+
@property --vvd-size-font-scale-base {
|
|
23
|
+
syntax: "<length>";
|
|
24
|
+
inherits: true;
|
|
25
|
+
initial-value: 16px;
|
|
26
|
+
}
|
|
17
27
|
.vvd-root, ::part(vvd-root) {
|
|
18
28
|
--vvd-color-scheme: light;
|
|
19
29
|
--vvd-color-canvas: #ffffff;
|
|
@@ -109,25 +119,21 @@
|
|
|
109
119
|
--vvd-shadow-surface-12dp: drop-shadow(0px 4px 24px #0000001a) drop-shadow(0px 12px 16px #0000000d) drop-shadow(0px 6px 8px #0000000d);
|
|
110
120
|
--vvd-shadow-surface-16dp: drop-shadow(0px 6px 32px #0000001a) drop-shadow(0px 16px 24px #0000000d) drop-shadow(0px 8px 12px #0000000d);
|
|
111
121
|
--vvd-shadow-surface-24dp: drop-shadow(0px 12px 48px #00000033) drop-shadow(0px 24px 32px #0000000d) drop-shadow(0px 12px 16px #0000000d);
|
|
112
|
-
--vvd-font-family-upright
|
|
113
|
-
--vvd-font-family-
|
|
114
|
-
--vvd-size-font-scale-base
|
|
115
|
-
--vvd-typography-
|
|
116
|
-
--vvd-typography-
|
|
117
|
-
--vvd-typography-heading-
|
|
118
|
-
--vvd-typography-
|
|
119
|
-
--vvd-typography-
|
|
120
|
-
--vvd-typography-
|
|
121
|
-
--vvd-typography-base: 400 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
122
|
-
--vvd-typography-base-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
123
|
-
--vvd-typography-base-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base) * 0.
|
|
124
|
-
--vvd-typography-base-
|
|
125
|
-
--vvd-typography-base-
|
|
126
|
-
--vvd-typography-base-
|
|
127
|
-
--vvd-typography-base-extended: 400 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-upright);
|
|
128
|
-
--vvd-typography-base-extended-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-upright);
|
|
129
|
-
--vvd-typography-base-extended-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base))/1.5 var(--vvd-font-family-monospace);
|
|
130
|
-
--vvd-size-base: 40px;
|
|
122
|
+
--vvd-typography-headline: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 4.125)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
123
|
+
--vvd-typography-subtitle: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 3.25)/1.3076923076923077 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
124
|
+
--vvd-typography-heading-1: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 2.5)/1.3 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
125
|
+
--vvd-typography-heading-2: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 2)/1.375 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
126
|
+
--vvd-typography-heading-3: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 1.625)/1.3846153846153846 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
127
|
+
--vvd-typography-heading-4: 500 condensed calc(var(--vvd-size-font-scale-base, 16px) * 1.25)/1.4 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
128
|
+
--vvd-typography-base: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
129
|
+
--vvd-typography-base-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
130
|
+
--vvd-typography-base-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.875)/1.4285714285714286 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
131
|
+
--vvd-typography-base-condensed: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
132
|
+
--vvd-typography-base-condensed-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
133
|
+
--vvd-typography-base-condensed-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px) * 0.75)/1.3333333333333333 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
134
|
+
--vvd-typography-base-extended: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
135
|
+
--vvd-typography-base-extended-bold: 600 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-upright, SpeziaCompleteVariableUpright);
|
|
136
|
+
--vvd-typography-base-extended-code: 400 ultra-condensed calc(var(--vvd-size-font-scale-base, 16px))/1.5 var(--vvd-font-family-monospace, SpeziaMonoCompleteVariable);
|
|
131
137
|
}
|
|
132
138
|
|
|
133
139
|
.vvd-theme-alternate, ::part(vvd-theme-alternate) {
|