@vonage/vivid 3.0.0-next.50 → 3.0.0-next.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.js +1 -1
- package/badge/index.js +1 -1
- package/banner/index.js +3 -3
- package/breadcrumb-item/index.js +1 -1
- package/button/index.js +1 -1
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +1 -1
- package/checkbox/index.js +1 -1
- package/dialog/index.js +3 -3
- package/divider/index.js +1 -1
- package/fab/index.js +1 -1
- package/focus/index.js +1 -1
- package/header/index.js +1 -1
- package/icon/index.js +1 -1
- package/layout/index.js +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/dialog/index.d.ts +1 -1
- package/lib/enums.d.ts +1 -1
- package/lib/icon/icon.d.ts +1 -1
- package/lib/note/note.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +2 -9
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +2 -2
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/shared/enums.js +1 -1
- package/shared/index2.js +1 -1
- package/shared/index3.js +1 -1
- package/shared/patterns/form-elements.d.ts +22 -0
- package/side-drawer/index.js +1 -1
- package/styles/fonts/spezia.css +2 -2
- package/styles/themes/dark.css +182 -188
- package/styles/themes/light.css +182 -188
- package/styles/typography/desktop.css +77 -60
- package/text-field/index.js +67 -41
- package/tooltip/index.js +1 -1
package/text-field/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '../icon/index.js';
|
|
2
2
|
import '../focus/index.js';
|
|
3
|
-
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable,
|
|
4
|
-
import '../shared/web.dom-collections.iterator.js';
|
|
3
|
+
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, v as volatile, c as __classPrivateFieldGet, i as __classPrivateFieldSet, h as html, d as designSystem } from '../shared/index.js';
|
|
5
4
|
import { b as AffixIcon, a as affixIconTemplateFactory } from '../shared/affix.js';
|
|
6
5
|
import '../shared/focus.js';
|
|
6
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
7
7
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
8
|
import { F as FormAssociated } from '../shared/form-associated.js';
|
|
9
9
|
import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from '../shared/aria-global.js';
|
|
@@ -233,51 +233,80 @@ class DelegatesARIATextbox {
|
|
|
233
233
|
applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
|
|
234
234
|
applyMixins(TextField$1, StartEnd, DelegatesARIATextbox);
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
class TextField extends TextField$1 {
|
|
238
|
-
constructor() {
|
|
239
|
-
super();
|
|
240
|
-
this.charCount = false;
|
|
241
|
-
this.userValid = true;
|
|
236
|
+
const ElementInternalsKey = 'ElementInternals';
|
|
242
237
|
|
|
243
|
-
|
|
238
|
+
const supportsElementInternals = () => ElementInternalsKey in window && 'setFormValue' in window[ElementInternalsKey].prototype;
|
|
244
239
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
this.userValid = !this.userValid;
|
|
240
|
+
function formElements(constructor) {
|
|
241
|
+
var _Decorated_blurred;
|
|
248
242
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
243
|
+
class Decorated extends constructor {
|
|
244
|
+
constructor(...args) {
|
|
245
|
+
super(...args);
|
|
246
|
+
this.charCount = false;
|
|
247
|
+
this.userValid = true;
|
|
253
248
|
|
|
254
|
-
|
|
255
|
-
__classPrivateFieldSet(this, _TextField_blurred, true, "f");
|
|
249
|
+
_Decorated_blurred.set(this, false);
|
|
256
250
|
|
|
257
|
-
this.validate()
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
251
|
+
this.validate = () => {
|
|
252
|
+
if (supportsElementInternals() && this.proxy instanceof HTMLElement) {
|
|
253
|
+
this.setValidity(this.proxy.validity, this.proxy.validationMessage, this.control);
|
|
254
|
+
} else {
|
|
255
|
+
super.validate();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
this.userValid = !this.userValid;
|
|
259
|
+
|
|
260
|
+
if (this.proxy instanceof HTMLElement) {
|
|
261
|
+
this.userValid = __classPrivateFieldGet(this, _Decorated_blurred, "f") && this.dirtyValue ? !this.validationMessage : true;
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
this.addEventListener('blur', () => {
|
|
266
|
+
__classPrivateFieldSet(this, _Decorated_blurred, true, "f");
|
|
267
|
+
|
|
268
|
+
this.validate();
|
|
269
|
+
});
|
|
270
|
+
this.addEventListener('focus', () => {
|
|
271
|
+
__classPrivateFieldSet(this, _Decorated_blurred, false, "f");
|
|
272
|
+
});
|
|
273
|
+
this.addEventListener('invalid', () => {
|
|
274
|
+
if (__classPrivateFieldGet(this, _Decorated_blurred, "f") && this.dirtyValue) return;
|
|
275
|
+
|
|
276
|
+
__classPrivateFieldSet(this, _Decorated_blurred, true, "f");
|
|
277
|
+
|
|
278
|
+
this.dirtyValue = true;
|
|
279
|
+
this.validate();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
get errorValidationMessage() {
|
|
284
|
+
return this.userValid ? '' : this.validationMessage;
|
|
285
|
+
}
|
|
263
286
|
|
|
264
|
-
get errorValidationMessage() {
|
|
265
|
-
return this.userValid ? '' : this.validationMessage;
|
|
266
287
|
}
|
|
267
288
|
|
|
268
|
-
|
|
269
|
-
|
|
289
|
+
_Decorated_blurred = new WeakMap();
|
|
290
|
+
|
|
291
|
+
__decorate([attr, __metadata("design:type", String)], Decorated.prototype, "label", void 0);
|
|
270
292
|
|
|
271
|
-
__decorate([attr
|
|
293
|
+
__decorate([attr({
|
|
294
|
+
attribute: 'helper-text'
|
|
295
|
+
}), __metadata("design:type", String)], Decorated.prototype, "helperText", void 0);
|
|
272
296
|
|
|
273
|
-
__decorate([attr({
|
|
274
|
-
|
|
275
|
-
|
|
297
|
+
__decorate([attr({
|
|
298
|
+
attribute: 'char-count',
|
|
299
|
+
mode: 'boolean'
|
|
300
|
+
}), __metadata("design:type", Object)], Decorated.prototype, "charCount", void 0);
|
|
276
301
|
|
|
277
|
-
__decorate([
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
302
|
+
__decorate([observable, __metadata("design:type", Object)], Decorated.prototype, "userValid", void 0);
|
|
303
|
+
|
|
304
|
+
__decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], Decorated.prototype, "errorValidationMessage", null);
|
|
305
|
+
|
|
306
|
+
return Decorated;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
let TextField = class TextField extends TextField$1 {};
|
|
281
310
|
|
|
282
311
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "density", void 0);
|
|
283
312
|
|
|
@@ -285,15 +314,12 @@ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "appe
|
|
|
285
314
|
|
|
286
315
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "shape", void 0);
|
|
287
316
|
|
|
288
|
-
__decorate([observable, __metadata("design:type", Object)], TextField.prototype, "userValid", void 0);
|
|
289
|
-
|
|
290
317
|
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "autoComplete", void 0);
|
|
291
318
|
|
|
292
|
-
|
|
293
|
-
|
|
319
|
+
TextField = __decorate([formElements], TextField);
|
|
294
320
|
applyMixins(TextField, AffixIcon);
|
|
295
321
|
|
|
296
|
-
var css_248z = "
|
|
322
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 01 Sep 2022 13:30:09 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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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: transaprent;\n --_appearance-color-outline: transaprent;\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@supports ((-webkit-user-select: none) or (user-select: none)) {\n .base {\n -webkit-user-select: none;\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-font-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-font-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.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-font-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 inset-inline-start: 16px;\n}\n.icon + .control {\n padding-inline-start: 44px;\n}\n\n.helper-text {\n color: var(--_low-ink-color);\n font: var(--vvd-font-base-condensed);\n grid-column: 1/4;\n margin-inline-start: 16px;\n}\n\n.error-message {\n display: flex;\n color: var(--vvd-color-canvas-text);\n contain: inline-size;\n font: var(--vvd-font-base-condensed);\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert-500);\n font-size: 16px;\n grid-column: 1/2;\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}";
|
|
297
323
|
styleInject(css_248z);
|
|
298
324
|
|
|
299
325
|
let _ = t => t,
|
package/tooltip/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import '../shared/focus2.js';
|
|
|
24
24
|
import '../shared/object-keys.js';
|
|
25
25
|
import '../shared/es.object.assign.js';
|
|
26
26
|
|
|
27
|
-
var css_248z = "
|
|
27
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 01 Sep 2022 13:30:09 GMT\n */\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, 240px);\n}\n.tooltip-text {\n padding: 8px 12px;\n color: var(--vvd-color-canvas-text);\n font: var(--vvd-font-base-bold);\n}";
|
|
28
28
|
styleInject(css_248z);
|
|
29
29
|
|
|
30
30
|
class Tooltip extends FoundationElement {
|