@vonage/vivid 3.0.0-next.2 → 3.0.0-next.20

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.
Files changed (122) hide show
  1. package/README.md +49 -4
  2. package/accordion/index.js +61 -0
  3. package/accordion-item/index.js +120 -0
  4. package/action-group/index.js +34 -0
  5. package/badge/index.js +24 -22
  6. package/banner/index.js +148 -0
  7. package/breadcrumb/index.js +102 -0
  8. package/breadcrumb-item/index.js +14 -9
  9. package/button/index.js +36 -663
  10. package/calendar/index.js +1526 -0
  11. package/card/index.js +139 -0
  12. package/elevation/index.js +8 -15
  13. package/fab/index.js +94 -0
  14. package/focus/index.js +20 -3
  15. package/icon/index.js +38 -5
  16. package/index.d.ts +1 -0
  17. package/index.js +43 -12
  18. package/layout/index.js +5 -5
  19. package/lib/accordion/accordion.d.ts +9 -0
  20. package/lib/accordion/accordion.template.d.ts +4 -0
  21. package/lib/accordion/index.d.ts +2 -0
  22. package/lib/accordion-item/accordion-item.d.ts +13 -0
  23. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  24. package/lib/accordion-item/index.d.ts +3 -0
  25. package/lib/action-group/action-group.d.ts +9 -0
  26. package/lib/action-group/action-group.template.d.ts +4 -0
  27. package/lib/action-group/index.d.ts +2 -0
  28. package/lib/badge/badge.d.ts +8 -8
  29. package/lib/badge/index.d.ts +1 -1
  30. package/lib/banner/banner.d.ts +20 -0
  31. package/lib/banner/banner.template.d.ts +6 -0
  32. package/lib/banner/index.d.ts +2 -0
  33. package/lib/breadcrumb/breadcrumb.d.ts +3 -0
  34. package/lib/breadcrumb/index.d.ts +2 -0
  35. package/lib/breadcrumb-item/breadcrumb-item.d.ts +3 -3
  36. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
  37. package/lib/breadcrumb-item/index.d.ts +1 -0
  38. package/lib/button/button.d.ts +9 -8
  39. package/lib/button/index.d.ts +2 -19
  40. package/lib/calendar/calendar.d.ts +11 -0
  41. package/lib/calendar/calendar.template.d.ts +4 -0
  42. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  43. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  44. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  45. package/lib/calendar/index.d.ts +3 -0
  46. package/lib/card/card.d.ts +10 -0
  47. package/lib/card/card.template.d.ts +4 -0
  48. package/lib/card/index.d.ts +5 -0
  49. package/lib/components.d.ts +19 -3
  50. package/lib/elevation/elevation.d.ts +1 -1
  51. package/lib/elevation/index.d.ts +1 -1
  52. package/lib/enums.d.ts +14 -7
  53. package/lib/fab/fab.d.ts +10 -0
  54. package/lib/fab/fab.template.d.ts +4 -0
  55. package/lib/fab/index.d.ts +4 -0
  56. package/lib/focus/index.d.ts +1 -1
  57. package/lib/icon/icon.d.ts +4 -5
  58. package/lib/layout/index.d.ts +1 -1
  59. package/lib/layout/layout.d.ts +3 -3
  60. package/lib/note/index.d.ts +2 -0
  61. package/lib/note/note.d.ts +10 -0
  62. package/lib/note/note.template.d.ts +5 -0
  63. package/lib/popup/index.d.ts +4 -0
  64. package/lib/popup/popup.d.ts +17 -0
  65. package/lib/popup/popup.template.d.ts +4 -0
  66. package/lib/progress/index.d.ts +2 -0
  67. package/lib/progress/progress.d.ts +9 -0
  68. package/lib/progress/progress.template.d.ts +5 -0
  69. package/lib/progress-ring/index.d.ts +2 -0
  70. package/lib/progress-ring/progress-ring.d.ts +7 -0
  71. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  72. package/lib/side-drawer/index.d.ts +2 -0
  73. package/lib/side-drawer/side-drawer.d.ts +8 -0
  74. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  75. package/lib/sidenav-item/sidenav-item.d.ts +4 -5
  76. package/lib/text/index.d.ts +2 -0
  77. package/lib/text/text.d.ts +10 -0
  78. package/lib/text/text.template.d.ts +4 -0
  79. package/lib/text-anchor/text-anchor.d.ts +4 -1
  80. package/lib/text-field/index.d.ts +4 -0
  81. package/lib/text-field/text-field.d.ts +20 -0
  82. package/lib/text-field/text-field.template.d.ts +5 -0
  83. package/lib/tooltip/index.d.ts +3 -0
  84. package/lib/tooltip/tooltip.d.ts +8 -0
  85. package/lib/tooltip/tooltip.template.d.ts +4 -0
  86. package/note/index.js +65 -0
  87. package/package.json +33 -6
  88. package/popup/index.js +2106 -0
  89. package/progress/index.js +99 -0
  90. package/progress-ring/index.js +82 -0
  91. package/shared/_has.js +58 -0
  92. package/shared/affix.js +10 -25
  93. package/shared/anchor.js +11 -4
  94. package/shared/aria-global.js +20 -20
  95. package/shared/base-progress.js +70 -0
  96. package/shared/breadcrumb-item.js +25 -0
  97. package/shared/button.js +195 -0
  98. package/shared/enums.js +79 -0
  99. package/shared/es.object.assign.js +69 -0
  100. package/shared/focus.js +5 -0
  101. package/shared/focus2.js +468 -0
  102. package/shared/icon.js +1435 -0
  103. package/shared/index.js +4940 -1426
  104. package/shared/object-set-prototype-of.js +1030 -0
  105. package/shared/patterns/affix.d.ts +3 -4
  106. package/shared/patterns/focus.d.ts +3 -0
  107. package/shared/patterns/index.d.ts +1 -0
  108. package/shared/slotted.js +119 -0
  109. package/shared/text-anchor.js +12 -0
  110. package/shared/text-anchor.template.js +14 -19
  111. package/shared/web.dom-collections.iterator.js +46 -1051
  112. package/shared/when.js +15 -0
  113. package/side-drawer/index.js +82 -0
  114. package/sidenav-item/index.js +17 -57
  115. package/styles/themes/dark.css +16 -4
  116. package/styles/themes/light.css +16 -4
  117. package/text/index.js +46 -0
  118. package/text-anchor/index.js +7 -2
  119. package/text-field/index.js +389 -0
  120. package/tooltip/index.js +66 -0
  121. package/shared/index2.js +0 -4911
  122. package/shared/index3.js +0 -21
@@ -0,0 +1,389 @@
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, 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, f as focusTemplateFactory } from '../shared/focus2.js';
9
+ import { A as ARIAGlobalStatesAndProperties, S as StartEnd, r as ref } from '../shared/aria-global.js';
10
+ import { s as styleInject } from '../shared/style-inject.es.js';
11
+ import { w as when } from '../shared/when.js';
12
+ import { c as classNames } from '../shared/class-names.js';
13
+ import '../shared/icon.js';
14
+ import '../shared/object-set-prototype-of.js';
15
+ import '../shared/_has.js';
16
+
17
+ class _TextField extends FoundationElement {
18
+ }
19
+ /**
20
+ * A form-associated base class for the {@link @microsoft/fast-foundation#(TextField:class)} component.
21
+ *
22
+ * @internal
23
+ */
24
+ class FormAssociatedTextField extends FormAssociated(_TextField) {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.proxy = document.createElement("input");
28
+ }
29
+ }
30
+
31
+ /**
32
+ * Text field sub-types
33
+ * @public
34
+ */
35
+ const TextFieldType = {
36
+ /**
37
+ * An email TextField
38
+ */
39
+ email: "email",
40
+ /**
41
+ * A password TextField
42
+ */
43
+ password: "password",
44
+ /**
45
+ * A telephone TextField
46
+ */
47
+ tel: "tel",
48
+ /**
49
+ * A text TextField
50
+ */
51
+ text: "text",
52
+ /**
53
+ * A URL TextField
54
+ */
55
+ url: "url",
56
+ };
57
+
58
+ /**
59
+ * A Text Field Custom HTML Element.
60
+ * Based largely on the {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text | <input type="text" /> element }.
61
+ *
62
+ * @slot start - Content which can be provided before the number field input
63
+ * @slot end - Content which can be provided after the number field input
64
+ * @slot - The default slot for the label
65
+ * @csspart label - The label
66
+ * @csspart root - The element wrapping the control, including start and end slots
67
+ * @csspart control - The text field element
68
+ * @fires change - Fires a custom 'change' event when the value has changed
69
+ *
70
+ * @public
71
+ */
72
+ class TextField$1 extends FormAssociatedTextField {
73
+ constructor() {
74
+ super(...arguments);
75
+ /**
76
+ * Allows setting a type or mode of text.
77
+ * @public
78
+ * @remarks
79
+ * HTML Attribute: type
80
+ */
81
+ this.type = TextFieldType.text;
82
+ }
83
+ readOnlyChanged() {
84
+ if (this.proxy instanceof HTMLInputElement) {
85
+ this.proxy.readOnly = this.readOnly;
86
+ this.validate();
87
+ }
88
+ }
89
+ autofocusChanged() {
90
+ if (this.proxy instanceof HTMLInputElement) {
91
+ this.proxy.autofocus = this.autofocus;
92
+ this.validate();
93
+ }
94
+ }
95
+ placeholderChanged() {
96
+ if (this.proxy instanceof HTMLInputElement) {
97
+ this.proxy.placeholder = this.placeholder;
98
+ }
99
+ }
100
+ typeChanged() {
101
+ if (this.proxy instanceof HTMLInputElement) {
102
+ this.proxy.type = this.type;
103
+ this.validate();
104
+ }
105
+ }
106
+ listChanged() {
107
+ if (this.proxy instanceof HTMLInputElement) {
108
+ this.proxy.setAttribute("list", this.list);
109
+ this.validate();
110
+ }
111
+ }
112
+ maxlengthChanged() {
113
+ if (this.proxy instanceof HTMLInputElement) {
114
+ this.proxy.maxLength = this.maxlength;
115
+ this.validate();
116
+ }
117
+ }
118
+ minlengthChanged() {
119
+ if (this.proxy instanceof HTMLInputElement) {
120
+ this.proxy.minLength = this.minlength;
121
+ this.validate();
122
+ }
123
+ }
124
+ patternChanged() {
125
+ if (this.proxy instanceof HTMLInputElement) {
126
+ this.proxy.pattern = this.pattern;
127
+ this.validate();
128
+ }
129
+ }
130
+ sizeChanged() {
131
+ if (this.proxy instanceof HTMLInputElement) {
132
+ this.proxy.size = this.size;
133
+ }
134
+ }
135
+ spellcheckChanged() {
136
+ if (this.proxy instanceof HTMLInputElement) {
137
+ this.proxy.spellcheck = this.spellcheck;
138
+ }
139
+ }
140
+ /**
141
+ * @internal
142
+ */
143
+ connectedCallback() {
144
+ super.connectedCallback();
145
+ this.proxy.setAttribute("type", this.type);
146
+ this.validate();
147
+ if (this.autofocus) {
148
+ DOM.queueUpdate(() => {
149
+ this.focus();
150
+ });
151
+ }
152
+ }
153
+ /**
154
+ * Selects all the text in the text field
155
+ *
156
+ * @public
157
+ */
158
+ select() {
159
+ this.control.select();
160
+ /**
161
+ * The select event does not permeate the shadow DOM boundary.
162
+ * This fn effectively proxies the select event,
163
+ * emitting a `select` event whenever the internal
164
+ * control emits a `select` event
165
+ */
166
+ this.$emit("select");
167
+ }
168
+ /**
169
+ * Handles the internal control's `input` event
170
+ * @internal
171
+ */
172
+ handleTextInput() {
173
+ this.value = this.control.value;
174
+ }
175
+ /**
176
+ * Change event handler for inner control.
177
+ * @remarks
178
+ * "Change" events are not `composable` so they will not
179
+ * permeate the shadow DOM boundary. This fn effectively proxies
180
+ * the change event, emitting a `change` event whenever the internal
181
+ * control emits a `change` event
182
+ * @internal
183
+ */
184
+ handleChange() {
185
+ this.$emit("change");
186
+ }
187
+ }
188
+ __decorate([
189
+ attr({ attribute: "readonly", mode: "boolean" })
190
+ ], TextField$1.prototype, "readOnly", void 0);
191
+ __decorate([
192
+ attr({ mode: "boolean" })
193
+ ], TextField$1.prototype, "autofocus", void 0);
194
+ __decorate([
195
+ attr
196
+ ], TextField$1.prototype, "placeholder", void 0);
197
+ __decorate([
198
+ attr
199
+ ], TextField$1.prototype, "type", void 0);
200
+ __decorate([
201
+ attr
202
+ ], TextField$1.prototype, "list", void 0);
203
+ __decorate([
204
+ attr({ converter: nullableNumberConverter })
205
+ ], TextField$1.prototype, "maxlength", void 0);
206
+ __decorate([
207
+ attr({ converter: nullableNumberConverter })
208
+ ], TextField$1.prototype, "minlength", void 0);
209
+ __decorate([
210
+ attr
211
+ ], TextField$1.prototype, "pattern", void 0);
212
+ __decorate([
213
+ attr({ converter: nullableNumberConverter })
214
+ ], TextField$1.prototype, "size", void 0);
215
+ __decorate([
216
+ attr({ mode: "boolean" })
217
+ ], TextField$1.prototype, "spellcheck", void 0);
218
+ __decorate([
219
+ observable
220
+ ], TextField$1.prototype, "defaultSlottedNodes", void 0);
221
+ /**
222
+ * Includes ARIA states and properties relating to the ARIA textbox role
223
+ *
224
+ * @public
225
+ */
226
+ class DelegatesARIATextbox {
227
+ }
228
+ applyMixins(DelegatesARIATextbox, ARIAGlobalStatesAndProperties);
229
+ applyMixins(TextField$1, StartEnd, DelegatesARIATextbox);
230
+
231
+ class TextField extends TextField$1 {
232
+ constructor() {
233
+ super(...arguments);
234
+ this.charCount = false;
235
+ this.userValid = true;
236
+ }
237
+
238
+ get errorValidationMessage() {
239
+ return this.userValid ? '' : this.validationMessage;
240
+ }
241
+
242
+ validate() {
243
+ super.validate();
244
+
245
+ if (this.proxy instanceof HTMLElement) {
246
+ this.userValid = this.dirtyValue ? !this.validationMessage : true;
247
+ }
248
+ }
249
+
250
+ }
251
+
252
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "label", void 0);
253
+
254
+ __decorate([attr({
255
+ attribute: 'helper-text'
256
+ }), __metadata("design:type", String)], TextField.prototype, "helperText", void 0);
257
+
258
+ __decorate([attr({
259
+ attribute: 'char-count',
260
+ mode: 'boolean'
261
+ }), __metadata("design:type", Object)], TextField.prototype, "charCount", void 0);
262
+
263
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "density", void 0);
264
+
265
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "appearance", void 0);
266
+
267
+ __decorate([attr, __metadata("design:type", String)], TextField.prototype, "shape", void 0);
268
+
269
+ __decorate([observable, __metadata("design:type", Object)], TextField.prototype, "userValid", void 0);
270
+
271
+ __decorate([volatile, __metadata("design:type", Object), __metadata("design:paramtypes", [])], TextField.prototype, "errorValidationMessage", null);
272
+
273
+ applyMixins(TextField, AffixIcon);
274
+
275
+ var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.base {\n display: grid;\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.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 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 background-color: var(--_appearance-color-fill);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n contain: strict;\n grid-column: 1/4;\n padding-inline: 16px;\n transition: color 0.2s, box-shadow 0.2s, background-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 position: absolute;\n padding: 1px;\n border: 0 none;\n background-color: unset;\n border-radius: inherit;\n color: inherit;\n inset: 0;\n outline: 0 none;\n padding-inline-start: 16px;\n}\n.control::placeholder {\n color: var(--_low-ink-color);\n}\n\n.icon {\n position: relative;\n z-index: 1;\n color: var(--_low-ink-color);\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 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-within) > .focus-indicator {\n display: none;\n}";
276
+ styleInject(css_248z);
277
+
278
+ let _ = t => t,
279
+ _t,
280
+ _t2,
281
+ _t3,
282
+ _t4,
283
+ _t5;
284
+
285
+ const getStateClasses = ({
286
+ errorValidationMessage,
287
+ disabled,
288
+ value,
289
+ readOnly,
290
+ placeholder,
291
+ density,
292
+ appearance,
293
+ shape,
294
+ label
295
+ }) => 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]);
296
+
297
+ function renderLabel() {
298
+ return html(_t || (_t = _`
299
+ <label for="control" class="label">
300
+ ${0}
301
+ </label>`), x => x.label);
302
+ }
303
+
304
+ function renderHelperText() {
305
+ return html(_t2 || (_t2 = _`<span class="helper-text">${0}</span>`), x => x.helperText);
306
+ }
307
+
308
+ function renderCharCount() {
309
+ return html(_t3 || (_t3 = _`
310
+ <span class="char-count">${0} / ${0}</span>
311
+ `), x => x.value ? x.value.length : 0, x => x.maxlength);
312
+ }
313
+
314
+ function renderErrorMessage() {
315
+ return html(_t4 || (_t4 = _`
316
+ <vwc-icon class="error-message-icon" type="info-negative"></vwc-icon>
317
+ <span class="error-message">${0}</span>
318
+ `), x => x.errorValidationMessage);
319
+ }
320
+
321
+ const TextfieldTemplate = context => {
322
+ const affixIconTemplate = affixIconTemplateFactory(context);
323
+ const focusTemplate = focusTemplateFactory(context);
324
+ return html(_t5 || (_t5 = _`
325
+ <div class="base ${0}">
326
+ ${0}
327
+ ${0}
328
+ <div class="fieldset">
329
+ ${0}
330
+ <input class="control"
331
+ id="control"
332
+ @input="${0}"
333
+ @change="${0}"
334
+ ?autofocus="${0}"
335
+ ?disabled="${0}"
336
+ list="${0}"
337
+ maxlength="${0}"
338
+ minlength="${0}"
339
+ pattern="${0}"
340
+ placeholder="${0}"
341
+ ?readonly="${0}"
342
+ ?required="${0}"
343
+ size="${0}"
344
+ ?spellcheck="${0}"
345
+ :value="${0}"
346
+ type="${0}"
347
+ aria-atomic="${0}"
348
+ aria-busy="${0}"
349
+ aria-controls="${0}"
350
+ aria-current="${0}"
351
+ aria-describedby="${0}"
352
+ aria-details="${0}"
353
+ aria-disabled="${0}"
354
+ aria-errormessage="${0}"
355
+ aria-flowto="${0}"
356
+ aria-haspopup="${0}"
357
+ aria-hidden="${0}"
358
+ aria-invalid="${0}"
359
+ aria-keyshortcuts="${0}"
360
+ aria-label="${0}"
361
+ aria-labelledby="${0}"
362
+ aria-live="${0}"
363
+ aria-owns="${0}"
364
+ aria-relevant="${0}"
365
+ aria-roledescription="${0}"
366
+ ${0}
367
+ />
368
+ ${0}
369
+ </div>
370
+ ${0}
371
+ ${0}
372
+ </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.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 => {
373
+ var _a;
374
+
375
+ return !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
376
+ }, renderHelperText()), when(x => x.errorValidationMessage, renderErrorMessage()));
377
+ };
378
+
379
+ const vividTextfield = TextField.compose({
380
+ baseName: 'text-field',
381
+ template: TextfieldTemplate,
382
+ styles: css_248z,
383
+ shadowOptions: {
384
+ delegatesFocus: true
385
+ }
386
+ });
387
+ designSystem.register(vividTextfield());
388
+
389
+ export { vividTextfield };
@@ -0,0 +1,66 @@
1
+ import '../popup/index.js';
2
+ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
3
+ import { s as styleInject } from '../shared/style-inject.es.js';
4
+ import '../shared/web.dom-collections.iterator.js';
5
+ import { c as classNames } from '../shared/class-names.js';
6
+ import '../elevation/index.js';
7
+ import '../button/index.js';
8
+ import '../icon/index.js';
9
+ import '../shared/icon.js';
10
+ import '../shared/object-set-prototype-of.js';
11
+ import '../shared/_has.js';
12
+ import '../shared/when.js';
13
+ import '../focus/index.js';
14
+ import '../shared/focus.js';
15
+ import '../shared/affix.js';
16
+ import '../shared/button.js';
17
+ import '../shared/apply-mixins.js';
18
+ import '../shared/focus2.js';
19
+ import '../shared/aria-global.js';
20
+ import '../shared/es.object.assign.js';
21
+
22
+ 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}";
23
+ styleInject(css_248z);
24
+
25
+ class Tooltip extends FoundationElement {
26
+ constructor() {
27
+ super(...arguments);
28
+ this.open = false;
29
+ }
30
+
31
+ }
32
+
33
+ __decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "text", void 0);
34
+
35
+ __decorate([attr({
36
+ mode: 'boolean'
37
+ }), __metadata("design:type", Object)], Tooltip.prototype, "open", void 0);
38
+
39
+ __decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "corner", void 0);
40
+
41
+ __decorate([attr, __metadata("design:type", String)], Tooltip.prototype, "anchor", void 0);
42
+
43
+ let _2 = t => t,
44
+ _t;
45
+
46
+ const getClasses = _ => classNames('control');
47
+
48
+ const TooltipTemplate = () => html(_t || (_t = _2`
49
+ <vwc-popup class="${0}" arrow alternate="true"
50
+ corner=${0} open=${0} anchor=${0}
51
+ exportparts="vvd-theme-alternate">
52
+ <div class="tooltip">
53
+ <header part="vvd-theme-alternate" class="tooltip-header">
54
+ <div class="tooltip-text">${0}</div>
55
+ </header>
56
+ </div>
57
+ </vwc-popup>`), getClasses, x => x.corner, x => x.open, x => x.anchor, x => x.text);
58
+
59
+ const vividTooltip = Tooltip.compose({
60
+ baseName: 'tooltip',
61
+ template: TooltipTemplate,
62
+ styles: css_248z
63
+ });
64
+ designSystem.register(vividTooltip());
65
+
66
+ export { vividTooltip };