@vonage/vivid 3.0.0-next.83 → 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/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 +1 -1
- package/layout/index.js +1 -9
- package/lib/badge/badge.d.ts +1 -3
- package/lib/components.d.ts +1 -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/listbox-option/index.js +248 -0
- package/menu/index.js +1 -7
- 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 +24 -21
- package/package.json +12 -9
- package/popup/index.js +0 -1
- package/progress/index.js +5 -13
- package/progress-ring/index.js +4 -8
- package/radio/index.js +3 -5
- package/radio-group/index.js +3 -4
- package/shared/affix.js +1 -6
- package/shared/apply-mixins.js +5 -4
- package/shared/calendar-event.js +0 -7
- 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 +2 -4
- package/shared/index5.js +6 -581
- package/shared/index6.js +6 -10
- package/shared/iterators.js +3 -3
- package/shared/object-keys.js +2 -2
- package/shared/patterns/form-elements/form-elements.d.ts +1 -1
- package/shared/radio.js +0 -1
- 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
|
@@ -279,28 +279,24 @@ __decorate([
|
|
|
279
279
|
], MenuItem$1.prototype, "submenu", void 0);
|
|
280
280
|
applyMixins(MenuItem$1, StartEnd);
|
|
281
281
|
|
|
282
|
-
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}";
|
|
283
283
|
|
|
284
284
|
class MenuItem extends MenuItem$1 {}
|
|
285
|
-
|
|
286
285
|
__decorate([attr, __metadata("design:type", String)], MenuItem.prototype, "text", void 0);
|
|
287
|
-
|
|
288
286
|
applyMixins(MenuItem, AffixIcon);
|
|
289
287
|
|
|
290
288
|
let _ = t => t,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
_t,
|
|
290
|
+
_t2,
|
|
291
|
+
_t3,
|
|
292
|
+
_t4,
|
|
293
|
+
_t5;
|
|
297
294
|
const getClasses = ({
|
|
298
295
|
disabled,
|
|
299
296
|
checked,
|
|
300
297
|
expanded,
|
|
301
298
|
role
|
|
302
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]);
|
|
303
|
-
|
|
304
300
|
const MenuItemTemplate = (context, definition) => {
|
|
305
301
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
306
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/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
CHANGED
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) {
|
package/text-area/index.js
CHANGED
|
@@ -198,18 +198,15 @@ __decorate([
|
|
|
198
198
|
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
199
199
|
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
200
200
|
|
|
201
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
201
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 31 Oct 2022 12:51:44 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base.appearance-ghost {\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(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).appearance-ghost {\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(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.success):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-success-100);\n --_appearance-color-outline: var(--vvd-color-success-500);\n}\n.base:where(.success):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--vvd-color-neutral-400);\n pointer-events: none;\n}\n\n.label {\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/3;\n grid-row: 1;\n line-height: 20px;\n}\n.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n border-radius: 6px;\n grid-column: 1/3;\n}\n.success .fieldset {\n --focus-stroke-color: var(--vvd-color-success-500);\n}\n.error .fieldset {\n --focus-stroke-color: var(--vvd-color-alert-500);\n}\n\n.control {\n width: 100%;\n padding: 8px 16px;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n border-radius: inherit;\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 min-block-size: 40px;\n transition: box-shadow 0.2s, background-color 0.2s, color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
|
|
202
202
|
|
|
203
203
|
let TextArea = class TextArea extends TextArea$1 {};
|
|
204
|
-
|
|
205
204
|
__decorate([attr, __metadata("design:type", String)], TextArea.prototype, "wrap", void 0);
|
|
206
|
-
|
|
207
205
|
TextArea = __decorate([formElements], TextArea);
|
|
208
206
|
|
|
209
207
|
let _ = t => t,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
_t,
|
|
209
|
+
_t2;
|
|
213
210
|
const getClasses = ({
|
|
214
211
|
value,
|
|
215
212
|
errorValidationMessage,
|
|
@@ -218,14 +215,12 @@ const getClasses = ({
|
|
|
218
215
|
readOnly,
|
|
219
216
|
successText
|
|
220
217
|
}) => classNames('base', ['readonly', readOnly], ['placeholder', Boolean(placeholder)], ['disabled', disabled], ['error', Boolean(errorValidationMessage)], ['has-value', Boolean(value)], ['success', !!successText]);
|
|
221
|
-
|
|
222
218
|
function renderLabel() {
|
|
223
219
|
return html(_t || (_t = _`
|
|
224
220
|
<label for="control" class="label">
|
|
225
221
|
${0}
|
|
226
222
|
</label>`), x => x.label);
|
|
227
223
|
}
|
|
228
|
-
|
|
229
224
|
const TextAreaTemplate = context => {
|
|
230
225
|
const focusTemplate = focusTemplateFactory(context);
|
|
231
226
|
return html(_t2 || (_t2 = _`
|
|
@@ -276,7 +271,6 @@ const TextAreaTemplate = context => {
|
|
|
276
271
|
</div>
|
|
277
272
|
`), getClasses, when(x => x.label, renderLabel()), x => x.autofocus, x => x.placeholder ? x.placeholder : null, x => x.name ? x.name : null, x => x.maxlength ? x.maxlength : null, x => x.rows ? x.rows : null, x => x.cols ? x.cols : null, x => x.wrap ? x.wrap : null, x => x.readOnly, x => x.required, x => x.spellcheck, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, x => x.handleTextInput(), x => x.handleChange(), ref('control'), () => focusTemplate, when(x => {
|
|
278
273
|
var _a;
|
|
279
|
-
|
|
280
274
|
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
281
275
|
}, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
|
|
282
276
|
};
|
package/text-field/index.js
CHANGED
|
@@ -22,25 +22,19 @@ import '../shared/aria-global.js';
|
|
|
22
22
|
import '../shared/start-end.js';
|
|
23
23
|
|
|
24
24
|
let TextField = class TextField extends TextField$1 {};
|
|
25
|
-
|
|
26
25
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "density", void 0);
|
|
27
|
-
|
|
28
26
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "appearance", void 0);
|
|
29
|
-
|
|
30
27
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "shape", void 0);
|
|
31
|
-
|
|
32
28
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "autoComplete", void 0);
|
|
33
|
-
|
|
34
29
|
TextField = __decorate([formElements], TextField);
|
|
35
30
|
applyMixins(TextField, AffixIcon);
|
|
36
31
|
|
|
37
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
32
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Mon, 31 Oct 2022 12:51:44 GMT\n */\n:host {\n display: inline-block;\n}\n\n.base {\n display: inline-grid;\n width: 100%;\n gap: 4px;\n grid-template-columns: min-content 1fr max-content;\n}\n.base {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base.appearance-ghost {\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(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-canvas-text);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled)).appearance-ghost {\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(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\n --_appearance-color-outline: var(--vvd-color-neutral-400);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.error):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-alert-500);\n --_appearance-color-fill: var(--vvd-color-alert-100);\n --_appearance-color-outline: var(--vvd-color-alert-500);\n}\n.base:where(.error):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(.success):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--vvd-color-canvas-text);\n --_appearance-color-fill: var(--vvd-color-success-100);\n --_appearance-color-outline: var(--vvd-color-success-500);\n}\n.base:where(.success):where(:not(:disabled, .disabled)).appearance-ghost {\n --_appearance-color-text: transparent;\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n --_low-ink-color: var(--vvd-color-neutral-600);\n}\n.base.disabled {\n --_low-ink-color: var(--vvd-color-neutral-400);\n}\n\n.label {\n contain: inline-size;\n font: var(--vvd-typography-base);\n grid-column: 1/4;\n grid-row: 1;\n}\n.char-count + .label {\n grid-column: 1/3;\n}\n.base:not(.disabled) .label {\n color: var(--vvd-color-canvas-text);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-400);\n}\n\n.char-count {\n color: var(--_low-ink-color);\n font: var(--vvd-typography-base);\n grid-column: 3/4;\n}\n\n.fieldset {\n position: relative;\n display: flex;\n align-items: center;\n color: var(--_appearance-color-text);\n grid-column: 1/4;\n transition: color 0.2s;\n /* Size */\n /* Shape */\n}\n.success .fieldset {\n --focus-stroke-color: var(--vvd-color-success-500);\n}\n.error .fieldset {\n --focus-stroke-color: var(--vvd-color-alert-500);\n}\n.base:not(.density-extended) > .fieldset {\n block-size: 40px;\n}\n.base.density-extended > .fieldset {\n block-size: 48px;\n}\n.base:not(.shape-pill) .fieldset {\n border-radius: 6px;\n}\n.base.shape-pill .fieldset {\n border-radius: 24px;\n}\n\n.control {\n width: 100%;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n block-size: 100%;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: inherit;\n font: var(--vvd-typography-base);\n padding-inline-end: 16px;\n padding-inline-start: 16px;\n transition: box-shadow 0.2s, background-color 0.2s;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.icon {\n position: absolute;\n z-index: 1;\n color: var(--_low-ink-color);\n font-size: 20px;\n inset-inline-start: 16px;\n}\n.icon + .control {\n padding-inline-start: 44px;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n pointer-events: none;\n}\n.fieldset:not(:focus-visible, :focus-within) > .focus-indicator {\n display: none;\n}";
|
|
38
33
|
|
|
39
34
|
let _ = t => t,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
_t,
|
|
36
|
+
_t2,
|
|
37
|
+
_t3;
|
|
44
38
|
const getStateClasses = ({
|
|
45
39
|
errorValidationMessage,
|
|
46
40
|
disabled,
|
|
@@ -53,20 +47,17 @@ const getStateClasses = ({
|
|
|
53
47
|
label,
|
|
54
48
|
successText
|
|
55
49
|
}) => classNames(['error', Boolean(errorValidationMessage)], ['disabled', disabled], ['has-value', Boolean(value)], ['readonly', readOnly], ['placeholder', Boolean(placeholder)], [`density-${density}`, Boolean(density)], [`appearance-${appearance}`, Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], ['no-label', !label], ['success', Boolean(successText)]);
|
|
56
|
-
|
|
57
50
|
function renderLabel() {
|
|
58
51
|
return html(_t || (_t = _`
|
|
59
52
|
<label for="control" class="label">
|
|
60
53
|
${0}
|
|
61
54
|
</label>`), x => x.label);
|
|
62
55
|
}
|
|
63
|
-
|
|
64
56
|
function renderCharCount() {
|
|
65
57
|
return html(_t2 || (_t2 = _`
|
|
66
58
|
<span class="char-count">${0} / ${0}</span>
|
|
67
59
|
`), x => x.value ? x.value.length : 0, x => x.maxlength);
|
|
68
60
|
}
|
|
69
|
-
|
|
70
61
|
const TextfieldTemplate = context => {
|
|
71
62
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
72
63
|
const focusTemplate = focusTemplateFactory(context);
|
|
@@ -123,7 +114,6 @@ const TextfieldTemplate = context => {
|
|
|
123
114
|
${0}
|
|
124
115
|
</div>`), getStateClasses, when(x => x.charCount && x.maxlength, renderCharCount()), when(x => x.label, renderLabel()), x => affixIconTemplate(x.icon), x => x.handleTextInput(), x => x.handleChange(), x => x.autofocus, x => x.disabled, x => x.list, x => x.maxlength, x => x.minlength, x => x.pattern, x => x.placeholder, x => x.readOnly, x => x.required, x => x.size, x => x.autoComplete, x => x.name, x => x.spellcheck, x => x.value, x => x.type, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, when(x => {
|
|
125
116
|
var _a;
|
|
126
|
-
|
|
127
117
|
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
128
118
|
}, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
|
|
129
119
|
};
|