@vonage/vivid 3.0.0-next.80 → 3.0.0-next.82
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 +1 -1
- package/accordion-item/index.js +1 -1
- package/action-group/index.js +1 -1
- package/avatar/index.js +1 -1
- package/badge/index.js +1 -1
- package/banner/index.js +1 -1
- package/breadcrumb-item/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 +1 -1
- package/fab/index.js +1 -1
- package/focus/index.js +1 -1
- package/header/index.js +1 -1
- package/lib/number-field/number-field.d.ts +1 -1
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/index.js +1 -1
- package/note/index.js +4 -4
- package/number-field/index.js +12 -24
- package/package.json +1 -1
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +1 -1
- package/shared/form-elements.js +56 -2
- package/shared/index2.js +1 -1
- package/shared/index4.js +1 -1
- package/shared/index6.js +1 -1
- package/shared/patterns/{form-elements.d.ts → form-elements/form-elements.d.ts} +7 -1
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +1 -0
- package/side-drawer/index.js +1 -1
- package/styles/core/all.css +14 -14
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +14 -14
- package/styles/tokens/theme-dark.css +41 -28
- package/styles/tokens/theme-light.css +41 -28
- package/text-area/index.js +21 -31
- package/text-field/index.js +11 -22
- package/tooltip/index.js +1 -1
package/text-area/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import '../focus/index.js';
|
|
2
|
+
import '../icon/index.js';
|
|
2
3
|
import { F as FoundationElement, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
3
|
-
import
|
|
4
|
+
import '../shared/affix.js';
|
|
5
|
+
import '../shared/focus.js';
|
|
6
|
+
import { D as DelegatesARIATextbox, f as formElements, g as getFeedbackTemplate } from '../shared/form-elements.js';
|
|
4
7
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
5
8
|
import { F as FormAssociated } from '../shared/form-associated.js';
|
|
6
|
-
import '../shared/affix.js';
|
|
7
9
|
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
8
10
|
import { w as when } from '../shared/when.js';
|
|
9
11
|
import { r as ref } from '../shared/ref.js';
|
|
10
12
|
import { c as classNames } from '../shared/class-names.js';
|
|
11
|
-
import '../shared/
|
|
12
|
-
import '../shared/aria-global.js';
|
|
13
|
-
import '../shared/start-end.js';
|
|
14
|
-
import '../shared/web.dom-collections.iterator.js';
|
|
13
|
+
import '../shared/icon.js';
|
|
15
14
|
import '../shared/export.js';
|
|
16
|
-
import '../shared/object-keys.js';
|
|
17
15
|
import '../shared/iterators.js';
|
|
18
|
-
import '../shared/key-codes.js';
|
|
19
|
-
import '../shared/icon.js';
|
|
20
16
|
import '../shared/to-string.js';
|
|
21
17
|
import '../shared/_has.js';
|
|
18
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
19
|
+
import '../shared/object-keys.js';
|
|
20
|
+
import '../shared/aria-global.js';
|
|
21
|
+
import '../shared/start-end.js';
|
|
22
|
+
import '../shared/key-codes.js';
|
|
22
23
|
|
|
23
24
|
class _TextArea extends FoundationElement {
|
|
24
25
|
}
|
|
@@ -197,7 +198,7 @@ __decorate([
|
|
|
197
198
|
], TextArea$1.prototype, "defaultSlottedNodes", void 0);
|
|
198
199
|
applyMixins(TextArea$1, DelegatesARIATextbox);
|
|
199
200
|
|
|
200
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
201
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 27 Oct 2022 06:37:06 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}";
|
|
201
202
|
|
|
202
203
|
let TextArea = class TextArea extends TextArea$1 {};
|
|
203
204
|
|
|
@@ -207,17 +208,16 @@ TextArea = __decorate([formElements], TextArea);
|
|
|
207
208
|
|
|
208
209
|
let _ = t => t,
|
|
209
210
|
_t,
|
|
210
|
-
_t2
|
|
211
|
-
_t3,
|
|
212
|
-
_t4;
|
|
211
|
+
_t2;
|
|
213
212
|
|
|
214
213
|
const getClasses = ({
|
|
215
214
|
value,
|
|
216
215
|
errorValidationMessage,
|
|
217
216
|
disabled,
|
|
218
217
|
placeholder,
|
|
219
|
-
readOnly
|
|
220
|
-
|
|
218
|
+
readOnly,
|
|
219
|
+
successText
|
|
220
|
+
}) => classNames('base', ['readonly', readOnly], ['placeholder', Boolean(placeholder)], ['disabled', disabled], ['error', Boolean(errorValidationMessage)], ['has-value', Boolean(value)], ['success', !!successText]);
|
|
221
221
|
|
|
222
222
|
function renderLabel() {
|
|
223
223
|
return html(_t || (_t = _`
|
|
@@ -226,20 +226,9 @@ function renderLabel() {
|
|
|
226
226
|
</label>`), x => x.label);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
function renderHelperText() {
|
|
230
|
-
return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
function renderErrorMessage() {
|
|
234
|
-
return html(_t3 || (_t3 = _`
|
|
235
|
-
<vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
|
|
236
|
-
<span class="error-message">${0}</span>
|
|
237
|
-
`), x => x.errorValidationMessage);
|
|
238
|
-
}
|
|
239
|
-
|
|
240
229
|
const TextAreaTemplate = context => {
|
|
241
230
|
const focusTemplate = focusTemplateFactory(context);
|
|
242
|
-
return html(
|
|
231
|
+
return html(_t2 || (_t2 = _`
|
|
243
232
|
<div class="${0}">
|
|
244
233
|
${0}
|
|
245
234
|
<div class="fieldset">
|
|
@@ -281,14 +270,15 @@ const TextAreaTemplate = context => {
|
|
|
281
270
|
</textarea>
|
|
282
271
|
${0}
|
|
283
272
|
</div>
|
|
284
|
-
|
|
285
|
-
|
|
273
|
+
${0}
|
|
274
|
+
${0}
|
|
275
|
+
${0}
|
|
286
276
|
</div>
|
|
287
277
|
`), 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 => {
|
|
288
278
|
var _a;
|
|
289
279
|
|
|
290
|
-
return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
291
|
-
},
|
|
280
|
+
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
281
|
+
}, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
|
|
292
282
|
};
|
|
293
283
|
|
|
294
284
|
const vividTextArea = TextArea.compose({
|
package/text-field/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import '../focus/index.js';
|
|
|
3
3
|
import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
4
4
|
import { b as AffixIcon, a as affixIconTemplateFactory } from '../shared/affix.js';
|
|
5
5
|
import '../shared/focus.js';
|
|
6
|
-
import { T as TextField$1, f as formElements } from '../shared/form-elements.js';
|
|
6
|
+
import { T as TextField$1, f as formElements, g as getFeedbackTemplate } from '../shared/form-elements.js';
|
|
7
7
|
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
8
|
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
9
9
|
import { w as when } from '../shared/when.js';
|
|
@@ -34,14 +34,12 @@ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "auto
|
|
|
34
34
|
TextField = __decorate([formElements], TextField);
|
|
35
35
|
applyMixins(TextField, AffixIcon);
|
|
36
36
|
|
|
37
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
37
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 27 Oct 2022 06:37:06 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
38
|
|
|
39
39
|
let _ = t => t,
|
|
40
40
|
_t,
|
|
41
41
|
_t2,
|
|
42
|
-
_t3
|
|
43
|
-
_t4,
|
|
44
|
-
_t5;
|
|
42
|
+
_t3;
|
|
45
43
|
|
|
46
44
|
const getStateClasses = ({
|
|
47
45
|
errorValidationMessage,
|
|
@@ -52,8 +50,9 @@ const getStateClasses = ({
|
|
|
52
50
|
density,
|
|
53
51
|
appearance,
|
|
54
52
|
shape,
|
|
55
|
-
label
|
|
56
|
-
|
|
53
|
+
label,
|
|
54
|
+
successText
|
|
55
|
+
}) => 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)]);
|
|
57
56
|
|
|
58
57
|
function renderLabel() {
|
|
59
58
|
return html(_t || (_t = _`
|
|
@@ -62,27 +61,16 @@ function renderLabel() {
|
|
|
62
61
|
</label>`), x => x.label);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
function renderHelperText() {
|
|
66
|
-
return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
64
|
function renderCharCount() {
|
|
70
|
-
return html(
|
|
65
|
+
return html(_t2 || (_t2 = _`
|
|
71
66
|
<span class="char-count">${0} / ${0}</span>
|
|
72
67
|
`), x => x.value ? x.value.length : 0, x => x.maxlength);
|
|
73
68
|
}
|
|
74
69
|
|
|
75
|
-
function renderErrorMessage() {
|
|
76
|
-
return html(_t4 || (_t4 = _`
|
|
77
|
-
<vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
|
|
78
|
-
<span class="error-message">${0}</span>
|
|
79
|
-
`), x => x.errorValidationMessage);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
70
|
const TextfieldTemplate = context => {
|
|
83
71
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
84
72
|
const focusTemplate = focusTemplateFactory(context);
|
|
85
|
-
return html(
|
|
73
|
+
return html(_t3 || (_t3 = _`
|
|
86
74
|
<div class="base ${0}">
|
|
87
75
|
${0}
|
|
88
76
|
${0}
|
|
@@ -132,11 +120,12 @@ const TextfieldTemplate = context => {
|
|
|
132
120
|
</div>
|
|
133
121
|
${0}
|
|
134
122
|
${0}
|
|
123
|
+
${0}
|
|
135
124
|
</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 => {
|
|
136
125
|
var _a;
|
|
137
126
|
|
|
138
|
-
return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
139
|
-
},
|
|
127
|
+
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
128
|
+
}, getFeedbackTemplate('helper', context)), when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context)), when(x => x.successText, getFeedbackTemplate('success', context)));
|
|
140
129
|
};
|
|
141
130
|
|
|
142
131
|
const vividTextfield = TextField.compose({
|
package/tooltip/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import '../shared/es.object.assign.js';
|
|
|
26
26
|
import '../shared/object-keys.js';
|
|
27
27
|
import '../shared/regexp-flags.js';
|
|
28
28
|
|
|
29
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
29
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 27 Oct 2022 06:37:06 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-typography-base-bold);\n}";
|
|
30
30
|
|
|
31
31
|
class Tooltip extends FoundationElement {
|
|
32
32
|
constructor() {
|