@vonage/vivid 3.0.0-next.5 → 3.0.0-next.50
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 +133 -4
- package/accordion/index.js +2 -2
- package/accordion-item/index.js +26 -18
- package/action-group/index.js +49 -0
- package/badge/index.js +14 -18
- package/banner/index.js +18 -81
- package/breadcrumb/index.js +20 -16
- package/breadcrumb-item/index.js +14 -9
- package/button/index.js +28 -659
- package/calendar/index.js +37 -8
- package/calendar-event/index.js +117 -0
- package/card/index.js +134 -0
- package/checkbox/index.js +173 -0
- package/dialog/index.js +282 -0
- package/divider/index.js +88 -0
- package/elevation/index.js +4 -31
- package/fab/index.js +102 -0
- package/focus/index.js +20 -3
- package/header/index.js +68 -0
- package/icon/index.js +9 -3
- package/index.js +45 -20
- package/layout/index.js +4 -4
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/accordion-item/index.d.ts +2 -1
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
- package/lib/{sidenav-item → action-group}/index.d.ts +1 -2
- package/lib/badge/badge.d.ts +6 -6
- package/lib/badge/index.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/banner/index.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/index.d.ts +1 -0
- package/lib/button/button.d.ts +6 -5
- package/lib/button/index.d.ts +2 -19
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/index.d.ts +0 -1
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/index.d.ts +2 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
- package/lib/card/index.d.ts +4 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/index.d.ts +4 -0
- package/lib/components.d.ts +22 -10
- package/lib/dialog/dialog.d.ts +20 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +5 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +2 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/elevation/index.d.ts +1 -1
- package/lib/enums.d.ts +11 -5
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +4 -0
- package/lib/focus/index.d.ts +1 -1
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +3 -0
- package/lib/icon/icon.d.ts +4 -3
- package/lib/layout/index.d.ts +1 -1
- package/lib/layout/layout.d.ts +3 -3
- package/lib/menu/index.d.ts +11 -0
- package/lib/menu/menu.d.ts +7 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/index.d.ts +4 -0
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/{text → note}/index.d.ts +1 -1
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +5 -0
- package/lib/popup/index.d.ts +1 -1
- package/lib/popup/popup.d.ts +3 -15
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- package/lib/side-drawer/index.d.ts +1 -1
- package/lib/side-drawer/side-drawer.d.ts +2 -7
- package/lib/side-drawer/side-drawer.template.d.ts +2 -2
- package/lib/text-anchor/text-anchor.d.ts +1 -1
- package/lib/text-field/index.d.ts +4 -0
- package/lib/text-field/text-field.d.ts +23 -0
- package/lib/text-field/text-field.template.d.ts +5 -0
- package/lib/tooltip/tooltip.d.ts +2 -4
- package/menu/index.js +661 -0
- package/nav/index.js +17 -0
- package/nav-disclosure/index.js +90 -0
- package/nav-item/index.js +43 -0
- package/note/index.js +68 -0
- package/package.json +48 -8
- package/popup/index.js +20 -2082
- package/progress/index.js +33 -24
- package/progress-ring/index.js +9 -3
- package/shared/anchor.js +8 -1
- package/shared/aria-global.js +3 -40
- package/shared/base-progress.js +5 -0
- package/shared/button.js +195 -0
- package/shared/calendar-event.js +26 -0
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/enums.js +79 -0
- package/shared/es.object.assign.js +7 -6
- package/shared/export.js +972 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +557 -0
- package/shared/icon.js +504 -508
- package/shared/index.js +79 -56
- package/shared/index2.js +26 -10
- package/shared/index3.js +2109 -0
- package/shared/iterators.js +61 -0
- package/shared/object-keys.js +13 -0
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/index.d.ts +1 -0
- package/shared/ref.js +41 -0
- package/shared/text-anchor.js +2 -11
- package/shared/text-anchor.template.js +5 -2
- package/shared/to-string.js +51 -0
- package/shared/web.dom-collections.iterator.js +61 -1074
- package/side-drawer/index.js +33 -51
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff +0 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +11 -11
- package/styles/themes/dark.css +12 -0
- package/styles/themes/light.css +12 -0
- package/styles/typography/desktop.css +72 -0
- package/text-anchor/index.js +8 -1
- package/text-field/index.js +412 -0
- package/tooltip/index.js +19 -21
- package/lib/text/text.d.ts +0 -10
- package/sidenav-item/index.js +0 -38
- package/text/index.js +0 -45
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
import '../icon/index.js';
|
|
2
|
+
import '../focus/index.js';
|
|
3
|
+
import { F as FoundationElement, D as DOM, _ as __decorate, a as attr, n as nullableNumberConverter, o as observable, c as __classPrivateFieldGet, i as __classPrivateFieldSet, b as __metadata, v as volatile, h as html, d as designSystem } from '../shared/index.js';
|
|
4
|
+
import '../shared/web.dom-collections.iterator.js';
|
|
5
|
+
import { b as AffixIcon, a as affixIconTemplateFactory } from '../shared/affix.js';
|
|
6
|
+
import '../shared/focus.js';
|
|
7
|
+
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
8
|
+
import { F as FormAssociated } from '../shared/form-associated.js';
|
|
9
|
+
import { A as ARIAGlobalStatesAndProperties, S as StartEnd } from '../shared/aria-global.js';
|
|
10
|
+
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
11
|
+
import { f as focusTemplateFactory } from '../shared/focus2.js';
|
|
12
|
+
import { w as when } from '../shared/when.js';
|
|
13
|
+
import { r as ref } from '../shared/ref.js';
|
|
14
|
+
import { c as classNames } from '../shared/class-names.js';
|
|
15
|
+
import '../shared/icon.js';
|
|
16
|
+
import '../shared/export.js';
|
|
17
|
+
import '../shared/iterators.js';
|
|
18
|
+
import '../shared/to-string.js';
|
|
19
|
+
import '../shared/_has.js';
|
|
20
|
+
import '../shared/object-keys.js';
|
|
21
|
+
|
|
22
|
+
class _TextField extends FoundationElement {
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
|
|
26
|
+
*
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
class FormAssociatedTextField extends FormAssociated(_TextField) {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.proxy = document.createElement("input");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Text field sub-types
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
const TextFieldType = {
|
|
41
|
+
/**
|
|
42
|
+
* An email TextField
|
|
43
|
+
*/
|
|
44
|
+
email: "email",
|
|
45
|
+
/**
|
|
46
|
+
* A password TextField
|
|
47
|
+
*/
|
|
48
|
+
password: "password",
|
|
49
|
+
/**
|
|
50
|
+
* A telephone TextField
|
|
51
|
+
*/
|
|
52
|
+
tel: "tel",
|
|
53
|
+
/**
|
|
54
|
+
* A text TextField
|
|
55
|
+
*/
|
|
56
|
+
text: "text",
|
|
57
|
+
/**
|
|
58
|
+
* A URL TextField
|
|
59
|
+
*/
|
|
60
|
+
url: "url",
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* A Text Field Custom HTML Element.
|
|
65
|
+
* Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
|
|
66
|
+
*
|
|
67
|
+
* @slot start - Content which can be provided before the number field input
|
|
68
|
+
* @slot end - Content which can be provided after the number field input
|
|
69
|
+
* @slot - The default slot for the label
|
|
70
|
+
* @csspart label - The label
|
|
71
|
+
* @csspart root - The element wrapping the control, including start and end slots
|
|
72
|
+
* @csspart control - The text field element
|
|
73
|
+
* @fires change - Fires a custom 'change' event when the value has changed
|
|
74
|
+
*
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
class TextField$1 extends FormAssociatedTextField {
|
|
78
|
+
constructor() {
|
|
79
|
+
super(...arguments);
|
|
80
|
+
/**
|
|
81
|
+
* Allows setting a type or mode of text.
|
|
82
|
+
* @public
|
|
83
|
+
* @remarks
|
|
84
|
+
* HTML Attribute: type
|
|
85
|
+
*/
|
|
86
|
+
this.type = TextFieldType.text;
|
|
87
|
+
}
|
|
88
|
+
readOnlyChanged() {
|
|
89
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
90
|
+
this.proxy.readOnly = this.readOnly;
|
|
91
|
+
this.validate();
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
autofocusChanged() {
|
|
95
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
96
|
+
this.proxy.autofocus = this.autofocus;
|
|
97
|
+
this.validate();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
placeholderChanged() {
|
|
101
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
102
|
+
this.proxy.placeholder = this.placeholder;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
typeChanged() {
|
|
106
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
107
|
+
this.proxy.type = this.type;
|
|
108
|
+
this.validate();
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
listChanged() {
|
|
112
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
113
|
+
this.proxy.setAttribute("list", this.list);
|
|
114
|
+
this.validate();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
maxlengthChanged() {
|
|
118
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
119
|
+
this.proxy.maxLength = this.maxlength;
|
|
120
|
+
this.validate();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
minlengthChanged() {
|
|
124
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
125
|
+
this.proxy.minLength = this.minlength;
|
|
126
|
+
this.validate();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
patternChanged() {
|
|
130
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
131
|
+
this.proxy.pattern = this.pattern;
|
|
132
|
+
this.validate();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
sizeChanged() {
|
|
136
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
137
|
+
this.proxy.size = this.size;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
spellcheckChanged() {
|
|
141
|
+
if (this.proxy instanceof HTMLInputElement) {
|
|
142
|
+
this.proxy.spellcheck = this.spellcheck;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @internal
|
|
147
|
+
*/
|
|
148
|
+
connectedCallback() {
|
|
149
|
+
super.connectedCallback();
|
|
150
|
+
this.proxy.setAttribute("type", this.type);
|
|
151
|
+
this.validate();
|
|
152
|
+
if (this.autofocus) {
|
|
153
|
+
DOM.queueUpdate(() => {
|
|
154
|
+
this.focus();
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Selects all the text in the text field
|
|
160
|
+
*
|
|
161
|
+
* @public
|
|
162
|
+
*/
|
|
163
|
+
select() {
|
|
164
|
+
this.control.select();
|
|
165
|
+
/**
|
|
166
|
+
* The select event does not permeate the shadow DOM boundary.
|
|
167
|
+
* This fn effectively proxies the select event,
|
|
168
|
+
* emitting a `select` event whenever the internal
|
|
169
|
+
* control emits a `select` event
|
|
170
|
+
*/
|
|
171
|
+
this.$emit("select");
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Handles the internal control's `input` event
|
|
175
|
+
* @internal
|
|
176
|
+
*/
|
|
177
|
+
handleTextInput() {
|
|
178
|
+
this.value = this.control.value;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Change event handler for inner control.
|
|
182
|
+
* @remarks
|
|
183
|
+
* "Change" events are not `composable` so they will not
|
|
184
|
+
* permeate the shadow DOM boundary. This fn effectively proxies
|
|
185
|
+
* the change event, emitting a `change` event whenever the internal
|
|
186
|
+
* control emits a `change` event
|
|
187
|
+
* @internal
|
|
188
|
+
*/
|
|
189
|
+
handleChange() {
|
|
190
|
+
this.$emit("change");
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
__decorate([
|
|
194
|
+
attr({ attribute: "readonly", mode: "boolean" })
|
|
195
|
+
], TextField$1.prototype, "readOnly", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
attr({ mode: "boolean" })
|
|
198
|
+
], TextField$1.prototype, "autofocus", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
attr
|
|
201
|
+
], TextField$1.prototype, "placeholder", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
attr
|
|
204
|
+
], TextField$1.prototype, "type", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
attr
|
|
207
|
+
], TextField$1.prototype, "list", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
attr({ converter: nullableNumberConverter })
|
|
210
|
+
], TextField$1.prototype, "maxlength", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
attr({ converter: nullableNumberConverter })
|
|
213
|
+
], TextField$1.prototype, "minlength", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
attr
|
|
216
|
+
], TextField$1.prototype, "pattern", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
attr({ converter: nullableNumberConverter })
|
|
219
|
+
], TextField$1.prototype, "size", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
attr({ mode: "boolean" })
|
|
222
|
+
], TextField$1.prototype, "spellcheck", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
observable
|
|
225
|
+
], TextField$1.prototype, "defaultSlottedNodes", void 0);
|
|
226
|
+
/**
|
|
227
|
+
* Includes ARIA states and properties relating to the ARIA textbox role
|
|
228
|
+
*
|
|
229
|
+
* @public
|
|
230
|
+
*/
|
|
231
|
+
class DelegatesARIATextbox {
|
|
232
|
+
}
|
|
233
|
+
applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
|
|
234
|
+
applyMixins(TextField$1, StartEnd, DelegatesARIATextbox);
|
|
235
|
+
|
|
236
|
+
var _TextField_blurred;
|
|
237
|
+
class TextField extends TextField$1 {
|
|
238
|
+
constructor() {
|
|
239
|
+
super();
|
|
240
|
+
this.charCount = false;
|
|
241
|
+
this.userValid = true;
|
|
242
|
+
|
|
243
|
+
_TextField_blurred.set(this, false);
|
|
244
|
+
|
|
245
|
+
this.validate = () => {
|
|
246
|
+
super.validate();
|
|
247
|
+
this.userValid = !this.userValid;
|
|
248
|
+
|
|
249
|
+
if (this.proxy instanceof HTMLElement) {
|
|
250
|
+
this.userValid = __classPrivateFieldGet(this, _TextField_blurred, "f") && this.dirtyValue ? !this.validationMessage : true;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
this.addEventListener('blur', () => {
|
|
255
|
+
__classPrivateFieldSet(this, _TextField_blurred, true, "f");
|
|
256
|
+
|
|
257
|
+
this.validate();
|
|
258
|
+
});
|
|
259
|
+
this.addEventListener('focus', () => {
|
|
260
|
+
__classPrivateFieldSet(this, _TextField_blurred, false, "f");
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
get errorValidationMessage() {
|
|
265
|
+
return this.userValid ? '' : this.validationMessage;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
}
|
|
269
|
+
_TextField_blurred = new WeakMap();
|
|
270
|
+
|
|
271
|
+
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "label", void 0);
|
|
272
|
+
|
|
273
|
+
__decorate([attr({
|
|
274
|
+
attribute: 'helper-text'
|
|
275
|
+
}), __metadata("design:type", String)], TextField.prototype, "helperText", void 0);
|
|
276
|
+
|
|
277
|
+
__decorate([attr({
|
|
278
|
+
attribute: 'char-count',
|
|
279
|
+
mode: 'boolean'
|
|
280
|
+
}), __metadata("design:type", Object)], TextField.prototype, "charCount", void 0);
|
|
281
|
+
|
|
282
|
+
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "density", void 0);
|
|
283
|
+
|
|
284
|
+
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "appearance", void 0);
|
|
285
|
+
|
|
286
|
+
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "shape", void 0);
|
|
287
|
+
|
|
288
|
+
__decorate([observable, __metadata("design:type", Object)], TextField.prototype, "userValid", void 0);
|
|
289
|
+
|
|
290
|
+
__decorate([attr, __metadata("design:type", String)], TextField.prototype, "autoComplete", void 0);
|
|
291
|
+
|
|
292
|
+
__decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], TextField.prototype, "errorValidationMessage", null);
|
|
293
|
+
|
|
294
|
+
applyMixins(TextField, AffixIcon);
|
|
295
|
+
|
|
296
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 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-on-canvas);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-neutral-50);\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-on-canvas);\n --_appearance-color-fill: var(--vvd-color-canvas);\n --_appearance-color-outline: var(--vvd-color-on-canvas);\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-50);\n --_appearance-color-fill: var(--vvd-color-neutral-20);\n --_appearance-color-outline: var(--vvd-color-neutral-50);\n}\n.base:where(:disabled, .disabled).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-50);\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-on-canvas);\n --_appearance-color-fill: var(--vvd-color-neutral-20);\n --_appearance-color-outline: var(--vvd-color-neutral-50);\n}\n.base:where(:readonly, .readonly):where(:not(:disabled, .disabled, :hover, .hover, :active, .active)).appearance-ghost {\n --_appearance-color-text: var(--vvd-color-neutral-50);\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);\n --_appearance-color-fill: var(--vvd-color-alert-20);\n --_appearance-color-outline: var(--vvd-color-alert);\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-70);\n}\n.base.disabled {\n --_low-ink-color: var(--vvd-color-neutral-50);\n}\n\n.label {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n contain: inline-size;\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-on-canvas);\n}\n.base.disabled .label {\n color: var(--vvd-color-neutral-50);\n}\n\n.char-count {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n color: var(--_low-ink-color);\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 font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\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 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 font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n color: var(--_low-ink-color);\n grid-column: 1/4;\n margin-inline-start: 16px;\n}\n\n.error-message {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n display: flex;\n color: var(--vvd-color-on-canvas);\n contain: inline-size;\n grid-column: 2/4;\n}\n.error-message-icon {\n color: var(--vvd-color-alert);\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
|
+
styleInject(css_248z);
|
|
298
|
+
|
|
299
|
+
let _ = t => t,
|
|
300
|
+
_t,
|
|
301
|
+
_t2,
|
|
302
|
+
_t3,
|
|
303
|
+
_t4,
|
|
304
|
+
_t5;
|
|
305
|
+
|
|
306
|
+
const getStateClasses = ({
|
|
307
|
+
errorValidationMessage,
|
|
308
|
+
disabled,
|
|
309
|
+
value,
|
|
310
|
+
readOnly,
|
|
311
|
+
placeholder,
|
|
312
|
+
density,
|
|
313
|
+
appearance,
|
|
314
|
+
shape,
|
|
315
|
+
label
|
|
316
|
+
}) => 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]);
|
|
317
|
+
|
|
318
|
+
function renderLabel() {
|
|
319
|
+
return html(_t || (_t = _`
|
|
320
|
+
<label for="control" class="label">
|
|
321
|
+
${0}
|
|
322
|
+
</label>`), x => x.label);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function renderHelperText() {
|
|
326
|
+
return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function renderCharCount() {
|
|
330
|
+
return html(_t3 || (_t3 = _`
|
|
331
|
+
<span class="char-count">${0} / ${0}</span>
|
|
332
|
+
`), x => x.value ? x.value.length : 0, x => x.maxlength);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function renderErrorMessage() {
|
|
336
|
+
return html(_t4 || (_t4 = _`
|
|
337
|
+
<vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
|
|
338
|
+
<span class="error-message">${0}</span>
|
|
339
|
+
`), x => x.errorValidationMessage);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const TextfieldTemplate = context => {
|
|
343
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
344
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
345
|
+
return html(_t5 || (_t5 = _`
|
|
346
|
+
<div class="base ${0}">
|
|
347
|
+
${0}
|
|
348
|
+
${0}
|
|
349
|
+
<div class="fieldset">
|
|
350
|
+
${0}
|
|
351
|
+
<input class="control"
|
|
352
|
+
id="control"
|
|
353
|
+
@input="${0}"
|
|
354
|
+
@change="${0}"
|
|
355
|
+
?autofocus="${0}"
|
|
356
|
+
?disabled="${0}"
|
|
357
|
+
list="${0}"
|
|
358
|
+
maxlength="${0}"
|
|
359
|
+
minlength="${0}"
|
|
360
|
+
pattern="${0}"
|
|
361
|
+
placeholder="${0}"
|
|
362
|
+
?readonly="${0}"
|
|
363
|
+
?required="${0}"
|
|
364
|
+
size="${0}"
|
|
365
|
+
autocomplete="${0}"
|
|
366
|
+
name="${0}"
|
|
367
|
+
?spellcheck="${0}"
|
|
368
|
+
:value="${0}"
|
|
369
|
+
type="${0}"
|
|
370
|
+
aria-atomic="${0}"
|
|
371
|
+
aria-busy="${0}"
|
|
372
|
+
aria-controls="${0}"
|
|
373
|
+
aria-current="${0}"
|
|
374
|
+
aria-describedby="${0}"
|
|
375
|
+
aria-details="${0}"
|
|
376
|
+
aria-disabled="${0}"
|
|
377
|
+
aria-errormessage="${0}"
|
|
378
|
+
aria-flowto="${0}"
|
|
379
|
+
aria-haspopup="${0}"
|
|
380
|
+
aria-hidden="${0}"
|
|
381
|
+
aria-invalid="${0}"
|
|
382
|
+
aria-keyshortcuts="${0}"
|
|
383
|
+
aria-label="${0}"
|
|
384
|
+
aria-labelledby="${0}"
|
|
385
|
+
aria-live="${0}"
|
|
386
|
+
aria-owns="${0}"
|
|
387
|
+
aria-relevant="${0}"
|
|
388
|
+
aria-roledescription="${0}"
|
|
389
|
+
${0}
|
|
390
|
+
/>
|
|
391
|
+
${0}
|
|
392
|
+
</div>
|
|
393
|
+
${0}
|
|
394
|
+
${0}
|
|
395
|
+
</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 => {
|
|
396
|
+
var _a;
|
|
397
|
+
|
|
398
|
+
return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
399
|
+
}, renderHelperText()), when(x => x.errorValidationMessage, renderErrorMessage()));
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
const vividTextfield = TextField.compose({
|
|
403
|
+
baseName: 'text-field',
|
|
404
|
+
template: TextfieldTemplate,
|
|
405
|
+
styles: css_248z,
|
|
406
|
+
shadowOptions: {
|
|
407
|
+
delegatesFocus: true
|
|
408
|
+
}
|
|
409
|
+
});
|
|
410
|
+
designSystem.register(vividTextfield());
|
|
411
|
+
|
|
412
|
+
export { vividTextfield };
|
package/tooltip/index.js
CHANGED
|
@@ -1,49 +1,47 @@
|
|
|
1
|
-
import '../
|
|
1
|
+
import '../shared/index3.js';
|
|
2
2
|
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
3
3
|
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
4
4
|
import '../shared/web.dom-collections.iterator.js';
|
|
5
5
|
import { c as classNames } from '../shared/class-names.js';
|
|
6
|
-
import '../
|
|
6
|
+
import '../shared/index2.js';
|
|
7
7
|
import '../button/index.js';
|
|
8
8
|
import '../icon/index.js';
|
|
9
9
|
import '../shared/icon.js';
|
|
10
|
+
import '../shared/export.js';
|
|
11
|
+
import '../shared/iterators.js';
|
|
12
|
+
import '../shared/to-string.js';
|
|
10
13
|
import '../shared/_has.js';
|
|
11
14
|
import '../shared/when.js';
|
|
12
|
-
import '../
|
|
15
|
+
import '../focus/index.js';
|
|
16
|
+
import '../shared/focus.js';
|
|
13
17
|
import '../shared/affix.js';
|
|
18
|
+
import '../shared/button.js';
|
|
14
19
|
import '../shared/apply-mixins.js';
|
|
20
|
+
import '../shared/form-associated.js';
|
|
15
21
|
import '../shared/aria-global.js';
|
|
22
|
+
import '../shared/ref.js';
|
|
23
|
+
import '../shared/focus2.js';
|
|
24
|
+
import '../shared/object-keys.js';
|
|
16
25
|
import '../shared/es.object.assign.js';
|
|
17
26
|
|
|
18
|
-
var css_248z = "/*\n Do not edit directly\n Generated on
|
|
27
|
+
var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.control {\n pointer-events: none;\n}\n\n.tooltip {\n width: var(--tooltip-inline-size, 240px);\n}\n.tooltip-text {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n padding: 8px 12px;\n color: var(--vvd-color-on-canvas);\n}";
|
|
19
28
|
styleInject(css_248z);
|
|
20
29
|
|
|
21
30
|
class Tooltip extends FoundationElement {
|
|
22
31
|
constructor() {
|
|
23
32
|
super(...arguments);
|
|
24
|
-
this.text = '';
|
|
25
|
-
this.open = false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
show() {
|
|
29
|
-
this.open = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
hide() {
|
|
33
33
|
this.open = false;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
__decorate([attr(
|
|
39
|
-
mode: 'fromView'
|
|
40
|
-
}), __metadata("design:type", Object)], Tooltip.prototype, "text", void 0);
|
|
38
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "text", void 0);
|
|
41
39
|
|
|
42
40
|
__decorate([attr({
|
|
43
41
|
mode: 'boolean'
|
|
44
42
|
}), __metadata("design:type", Object)], Tooltip.prototype, "open", void 0);
|
|
45
43
|
|
|
46
|
-
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "
|
|
44
|
+
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "placement", void 0);
|
|
47
45
|
|
|
48
46
|
__decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "anchor", void 0);
|
|
49
47
|
|
|
@@ -53,15 +51,15 @@ let _2 = t => t,
|
|
|
53
51
|
const getClasses = _ => classNames('control');
|
|
54
52
|
|
|
55
53
|
const TooltipTemplate = () => html(_t || (_t = _2`
|
|
56
|
-
<vwc-popup class="${0}" arrow alternate
|
|
57
|
-
|
|
58
|
-
exportparts="vvd-theme-alternate">
|
|
54
|
+
<vwc-popup class="${0}" arrow alternate
|
|
55
|
+
placement=${0} open=${0} anchor=${0}
|
|
56
|
+
exportparts="vvd-theme-alternate" role="tooltip">
|
|
59
57
|
<div class="tooltip">
|
|
60
58
|
<header part="vvd-theme-alternate" class="tooltip-header">
|
|
61
59
|
<div class="tooltip-text">${0}</div>
|
|
62
60
|
</header>
|
|
63
61
|
</div>
|
|
64
|
-
</vwc-popup>`), getClasses, x => x.
|
|
62
|
+
</vwc-popup>`), getClasses, x => x.placement, x => x.open, x => x.anchor, x => x.text);
|
|
65
63
|
|
|
66
64
|
const vividTooltip = Tooltip.compose({
|
|
67
65
|
baseName: 'tooltip',
|
package/lib/text/text.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
|
-
import type { Connotation } from '../enums.js';
|
|
3
|
-
import type { VVDFontFace } from '../../../../../node_modules/@vonage/vivid-tokens/dist/types/typography/font-faces';
|
|
4
|
-
declare type TextConnotation = Extract<Connotation, Connotation.Primary | Connotation.CTA | Connotation.Success | Connotation.Alert | Connotation.Announcement | Connotation.Info>;
|
|
5
|
-
export declare class Text extends FoundationElement {
|
|
6
|
-
connotation?: TextConnotation;
|
|
7
|
-
fontFace?: VVDFontFace;
|
|
8
|
-
tight: boolean;
|
|
9
|
-
}
|
|
10
|
-
export {};
|
package/sidenav-item/index.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import '../icon/index.js';
|
|
2
|
-
import { h as html, d as designSystem } from '../shared/index.js';
|
|
3
|
-
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
4
|
-
import { b as AffixIcon } from '../shared/affix.js';
|
|
5
|
-
import { T as TextAnchor } from '../shared/text-anchor.js';
|
|
6
|
-
import { a as applyMixins } from '../shared/apply-mixins.js';
|
|
7
|
-
import { t as textAnchorTemplate } from '../shared/text-anchor.template.js';
|
|
8
|
-
import '../shared/icon.js';
|
|
9
|
-
import '../shared/web.dom-collections.iterator.js';
|
|
10
|
-
import '../shared/_has.js';
|
|
11
|
-
import '../shared/when.js';
|
|
12
|
-
import '../shared/class-names.js';
|
|
13
|
-
import '../shared/anchor.js';
|
|
14
|
-
import '../shared/aria-global.js';
|
|
15
|
-
|
|
16
|
-
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n.control {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: transparent;\n border-radius: 6px;\n color: var(--vvd-color-on-canvas);\n gap: 8px;\n -webkit-hyphens: auto;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: 40px;\n outline: 0 none;\n padding-block: 10px;\n padding-inline: 8px;\n text-decoration: none;\n vertical-align: middle;\n word-break: break-word;\n}\n:host, .control {\n outline: 0 none;\n}\n\n.control.icon-only {\n display: flex;\n block-size: 40px;\n inline-size: 40px;\n place-content: center;\n}\n\n.control:focus {\n background-color: var(--vvd-color-neutral-20);\n}\n\n.control:focus-visible {\n box-shadow: inset 0 0 0 1px darkorange;\n}\n\n.icon {\n font-size: 20px;\n}";
|
|
17
|
-
styleInject(css_248z);
|
|
18
|
-
|
|
19
|
-
class SidenavItem extends TextAnchor {}
|
|
20
|
-
applyMixins(SidenavItem, AffixIcon);
|
|
21
|
-
|
|
22
|
-
let _ = t => t,
|
|
23
|
-
_t;
|
|
24
|
-
const SidenavItemTemplate = (context, definition) => html(_t || (_t = _`
|
|
25
|
-
${0}
|
|
26
|
-
`), textAnchorTemplate(context));
|
|
27
|
-
|
|
28
|
-
const vividSidenavItem = SidenavItem.compose({
|
|
29
|
-
baseName: 'sidenav-item',
|
|
30
|
-
template: SidenavItemTemplate,
|
|
31
|
-
styles: css_248z,
|
|
32
|
-
shadowOptions: {
|
|
33
|
-
delegatesFocus: true
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
designSystem.register(vividSidenavItem());
|
|
37
|
-
|
|
38
|
-
export { vividSidenavItem };
|
package/text/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
|
|
2
|
-
import { s as styleInject } from '../shared/style-inject.es.js';
|
|
3
|
-
import '../shared/web.dom-collections.iterator.js';
|
|
4
|
-
import { c as classNames } from '../shared/class-names.js';
|
|
5
|
-
|
|
6
|
-
var css_248z = "/*\n Do not edit directly\n Generated on Sun, 23 Jan 2022 11:15:05 GMT\n*/\n.control:not(.tight):not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2), .control.font-face-body-1:not(.tight), .control.font-face-body-1-bold:not(.tight), .control.font-face-body-1-code:not(.tight), .control.font-face-body-1-link:not(.tight), .control.font-face-body-2:not(.tight), .control.font-face-body-2-bold:not(.tight), .control.font-face-body-2-code:not(.tight), .control.font-face-body-2-link:not(.tight), .control.font-face-subtitle-1:not(.tight), .control.font-face-subtitle-2:not(.tight), .control.font-face-title-1:not(.tight), .control.font-face-title-2:not(.tight), .control.font-face-headline-1:not(.tight), .control.font-face-headline-2:not(.tight) {\n display: block;\n margin: var(--font-face-margin, 0);\n}\n\n.control {\n color: var(--connotation);\n}\n.control.font-face-body-1 {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-bold {\n font: 600 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-code {\n font: 400 ultra-condensed 16px / 24px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-1-link {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-body-2 {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-bold {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-code {\n font: 400 ultra-condensed 14px / 20px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-body-2-link {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-button {\n font: 600 ultra-condensed 14px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-button-dense {\n font: 600 ultra-condensed 12px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-button-enlarge {\n font: 600 ultra-condensed 16px / 100% SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-bold {\n font: 600 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-code {\n font: 400 ultra-condensed 12px / 16px SpeziaMonoWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-caption-link {\n font: 400 ultra-condensed 12px / 16px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: underline;\n text-transform: none;\n}\n.control.font-face-headline-1 {\n font: 500 condensed 66px / 88px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-headline-2 {\n font: 500 condensed 52px / 68px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-subtitle-1 {\n font: 500 condensed 26px / 36px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-subtitle-2 {\n font: 500 condensed 20px / 28px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-title-1 {\n font: 500 condensed 40px / 52px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.font-face-title-2 {\n font: 500 condensed 32px / 44px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control:not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2) {\n font: 400 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.control.connotation-primary {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.control.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.control.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.control.connotation-announcement {\n --connotation: var(--vvd-color-announcement);\n --on-connotation: var(--vvd-color-on-announcement);\n}\n\n.control.connotation-info {\n --connotation: var(--vvd-color-info);\n --on-connotation: var(--vvd-color-on-info);\n}\n\n.control.font-face-headline-1, .control.font-face-headline-2 {\n --font-face-margin: 2.5rem 0;\n}\n.control.font-face-title-1, .control.font-face-title-2 {\n --font-face-margin: 2rem 0;\n}\n.control.font-face-subtitle-1, .control.font-face-subtitle-2 {\n --font-face-margin: 1.5rem 0;\n}\n.control:not(.font-face-body-1, .font-face-body-1-bold, .font-face-body-1-code, .font-face-body-1-link, .font-face-body-2, .font-face-body-2-bold, .font-face-body-2-code, .font-face-body-2-link, .font-face-button, .font-face-button-dense, .font-face-button-enlarge, .font-face-caption, .font-face-caption-bold, .font-face-caption-code, .font-face-caption-link, .font-face-headline-1, .font-face-headline-2, .font-face-subtitle-1, .font-face-subtitle-2, .font-face-title-1, .font-face-title-2), .control.font-face-body-1, .control.font-face-body-1-bold, .control.font-face-body-1-code, .control.font-face-body-1-link, .control.font-face-body-2, .control.font-face-body-2-bold, .control.font-face-body-2-code, .control.font-face-body-2-link {\n --font-face-margin: 1rem 0;\n}\n\n::slotted(:where(h1, h2, h3, h4, h5, h6, p)) {\n margin: initial;\n}\n\n::slotted(*) {\n color: inherit;\n font: inherit;\n}";
|
|
7
|
-
styleInject(css_248z);
|
|
8
|
-
|
|
9
|
-
class Text extends FoundationElement {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.tight = false;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
__decorate([attr, __metadata("design:type", String)], Text.prototype, "connotation", void 0);
|
|
18
|
-
|
|
19
|
-
__decorate([attr({
|
|
20
|
-
attribute: 'font-face'
|
|
21
|
-
}), __metadata("design:type", String)], Text.prototype, "fontFace", void 0);
|
|
22
|
-
|
|
23
|
-
__decorate([attr({
|
|
24
|
-
mode: 'boolean'
|
|
25
|
-
}), __metadata("design:type", Object)], Text.prototype, "tight", void 0);
|
|
26
|
-
|
|
27
|
-
let _ = t => t,
|
|
28
|
-
_t;
|
|
29
|
-
|
|
30
|
-
const getClasses = ({
|
|
31
|
-
connotation,
|
|
32
|
-
fontFace,
|
|
33
|
-
tight
|
|
34
|
-
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`font-face-${fontFace}`, Boolean(fontFace)], ['tight', tight]);
|
|
35
|
-
|
|
36
|
-
const TextTemplate = () => html(_t || (_t = _`<slot class="${0}"></slot>`), getClasses);
|
|
37
|
-
|
|
38
|
-
const vividText = Text.compose({
|
|
39
|
-
baseName: 'text',
|
|
40
|
-
template: TextTemplate,
|
|
41
|
-
styles: css_248z
|
|
42
|
-
});
|
|
43
|
-
designSystem.register(vividText());
|
|
44
|
-
|
|
45
|
-
export { vividText };
|