@vonage/vivid 4.14.0 → 4.14.1
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/custom-elements.json +130 -23
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/radio/radio.form-associated.d.ts +2 -0
- package/lib/tabs/tabs.d.ts +0 -5
- package/lib/text-anchor/text-anchor.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/listbox/index.cjs +4 -4
- package/listbox/index.js +1 -1
- package/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +1 -1
- package/shared/anchor.cjs +10 -10
- package/shared/anchor.js +1 -1
- package/shared/anchored.cjs +6 -6
- package/shared/anchored.js +1 -1
- package/shared/apply-mixins.cjs +3 -3
- package/shared/apply-mixins.js +1 -1
- package/shared/apply-mixins2.cjs +3 -3
- package/shared/apply-mixins2.js +1 -1
- package/shared/applyMixinsWithObservables.cjs +3 -3
- package/shared/applyMixinsWithObservables.js +1 -1
- package/shared/aria-global.cjs +20 -20
- package/shared/aria-global.js +1 -1
- package/shared/aria-global2.cjs +40 -40
- package/shared/aria-global2.js +2 -2
- package/shared/base-progress.cjs +7 -8
- package/shared/base-progress.js +2 -3
- package/shared/breadcrumb-item.cjs +2 -3
- package/shared/breadcrumb-item.js +1 -2
- package/shared/button.cjs +10 -11
- package/shared/button.js +1 -2
- package/shared/calendar-event.cjs +7 -8
- package/shared/calendar-event.js +1 -2
- package/shared/children.cjs +2 -2
- package/shared/children.js +1 -1
- package/shared/definition.cjs +14 -15
- package/shared/definition.js +1 -2
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +1 -1
- package/shared/definition12.cjs +6 -6
- package/shared/definition12.js +1 -1
- package/shared/definition13.cjs +13 -14
- package/shared/definition13.js +1 -2
- package/shared/definition14.cjs +23 -24
- package/shared/definition14.js +1 -2
- package/shared/definition15.cjs +15 -16
- package/shared/definition15.js +1 -2
- package/shared/definition16.cjs +20 -19
- package/shared/definition16.js +3 -2
- package/shared/definition17.cjs +53 -54
- package/shared/definition17.js +1 -2
- package/shared/definition18.cjs +4 -4
- package/shared/definition18.js +1 -1
- package/shared/definition19.cjs +12 -12
- package/shared/definition19.js +1 -1
- package/shared/definition2.cjs +6 -7
- package/shared/definition2.js +1 -2
- package/shared/definition20.cjs +20 -21
- package/shared/definition20.js +1 -2
- package/shared/definition21.cjs +27 -28
- package/shared/definition21.js +3 -4
- package/shared/definition22.cjs +5 -6
- package/shared/definition22.js +1 -2
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +2 -2
- package/shared/definition25.cjs +13 -14
- package/shared/definition25.js +1 -2
- package/shared/definition26.cjs +5 -6
- package/shared/definition26.js +1 -2
- package/shared/definition27.cjs +11 -12
- package/shared/definition27.js +1 -2
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +2 -3
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +1 -2
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +1 -1
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +1 -2
- package/shared/definition34.cjs +50 -52
- package/shared/definition34.js +2 -4
- package/shared/definition35.cjs +24 -25
- package/shared/definition35.js +1 -2
- package/shared/definition36.cjs +15 -16
- package/shared/definition36.js +1 -2
- package/shared/definition37.cjs +9 -9
- package/shared/definition37.js +1 -1
- package/shared/definition38.cjs +10 -10
- package/shared/definition38.js +1 -1
- package/shared/definition39.cjs +12 -13
- package/shared/definition39.js +1 -2
- package/shared/definition4.cjs +19 -20
- package/shared/definition4.js +1 -2
- package/shared/definition40.cjs +61 -13
- package/shared/definition40.js +52 -4
- package/shared/definition41.cjs +29 -30
- package/shared/definition41.js +1 -2
- package/shared/definition42.cjs +53 -54
- package/shared/definition42.js +2 -3
- package/shared/definition43.cjs +31 -31
- package/shared/definition43.js +1 -1
- package/shared/definition44.cjs +14 -15
- package/shared/definition44.js +1 -2
- package/shared/definition45.cjs +9 -10
- package/shared/definition45.js +1 -2
- package/shared/definition46.cjs +26 -27
- package/shared/definition46.js +1 -2
- package/shared/definition47.cjs +17 -18
- package/shared/definition47.js +1 -2
- package/shared/definition48.cjs +9 -10
- package/shared/definition48.js +1 -2
- package/shared/definition49.cjs +3 -4
- package/shared/definition49.js +1 -2
- package/shared/definition5.cjs +30 -31
- package/shared/definition5.js +1 -2
- package/shared/definition50.cjs +12 -13
- package/shared/definition50.js +1 -2
- package/shared/definition51.cjs +87 -72
- package/shared/definition51.js +56 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +1 -2
- package/shared/definition54.cjs +20 -21
- package/shared/definition54.js +1 -2
- package/shared/definition55.cjs +5 -5
- package/shared/definition55.js +1 -1
- package/shared/definition56.cjs +18 -19
- package/shared/definition56.js +1 -2
- package/shared/definition57.cjs +10 -11
- package/shared/definition57.js +1 -2
- package/shared/definition58.cjs +7 -8
- package/shared/definition58.js +1 -2
- package/shared/definition59.cjs +16 -17
- package/shared/definition59.js +2 -3
- package/shared/definition6.cjs +11 -12
- package/shared/definition6.js +1 -2
- package/shared/definition60.cjs +9 -10
- package/shared/definition60.js +2 -3
- package/shared/definition61.cjs +27 -30
- package/shared/definition61.js +17 -20
- package/shared/definition62.cjs +12 -9
- package/shared/definition62.js +8 -5
- package/shared/definition63.cjs +13 -14
- package/shared/definition63.js +1 -2
- package/shared/definition7.cjs +9 -10
- package/shared/definition7.js +1 -2
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +1 -2
- package/shared/definition9.cjs +7 -7
- package/shared/definition9.js +1 -1
- package/shared/form-associated.cjs +14 -14
- package/shared/form-associated.js +1 -1
- package/shared/form-associated2.cjs +10 -10
- package/shared/form-associated2.js +1 -1
- package/shared/form-elements.cjs +13 -13
- package/shared/form-elements.js +1 -1
- package/shared/foundation/progress/base-progress.d.ts +2 -2
- package/shared/key-codes2.cjs +1416 -3
- package/shared/key-codes2.js +1413 -2
- package/shared/listbox.cjs +12 -13
- package/shared/listbox.js +1 -2
- package/shared/listbox2.cjs +59 -60
- package/shared/listbox2.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/presentationDate.cjs +42 -43
- package/shared/presentationDate.js +1 -2
- package/shared/ref.cjs +2 -2
- package/shared/ref.js +1 -1
- package/shared/repeat.cjs +15 -15
- package/shared/repeat.js +1 -1
- package/shared/slider.template.cjs +4 -4
- package/shared/slider.template.js +1 -1
- package/shared/slotted.cjs +4 -4
- package/shared/slotted.js +1 -1
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +2 -3
- package/shared/text-anchor.template.cjs +2 -2
- package/shared/text-anchor.template.js +1 -1
- package/shared/text-field2.cjs +23 -24
- package/shared/text-field2.js +1 -2
- package/shared/vivid-element.cjs +2610 -2
- package/shared/vivid-element.js +2591 -2
- package/styles/core/all.css +40 -1
- package/styles/core/theme.css +40 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +25 -4
- package/styles/tokens/theme-light.css +25 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/text-anchor/index.cjs +3 -3
- package/text-anchor/index.js +1 -1
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/foundation-element.cjs +0 -1417
- package/shared/foundation-element.js +0 -1414
package/shared/definition11.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
4
|
const definition$1 = require('./definition37.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const affix = require('./affix.cjs');
|
|
7
7
|
const button = require('./button.cjs');
|
|
8
8
|
const applyMixins = require('./apply-mixins.cjs');
|
|
@@ -31,7 +31,7 @@ class Button extends button.VividFoundationButton {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
__decorateClass([
|
|
34
|
-
|
|
34
|
+
vividElement.attr({
|
|
35
35
|
converter: {
|
|
36
36
|
fromView: (value) => value || null,
|
|
37
37
|
toView: (value) => value || null
|
|
@@ -39,64 +39,64 @@ __decorateClass([
|
|
|
39
39
|
})
|
|
40
40
|
], Button.prototype, "title");
|
|
41
41
|
__decorateClass([
|
|
42
|
-
|
|
42
|
+
vividElement.attr
|
|
43
43
|
], Button.prototype, "connotation");
|
|
44
44
|
__decorateClass([
|
|
45
|
-
|
|
45
|
+
vividElement.attr
|
|
46
46
|
], Button.prototype, "shape");
|
|
47
47
|
__decorateClass([
|
|
48
|
-
|
|
48
|
+
vividElement.attr
|
|
49
49
|
], Button.prototype, "appearance");
|
|
50
50
|
__decorateClass([
|
|
51
|
-
|
|
51
|
+
vividElement.attr
|
|
52
52
|
], Button.prototype, "size");
|
|
53
53
|
__decorateClass([
|
|
54
|
-
|
|
54
|
+
vividElement.attr({
|
|
55
55
|
mode: "boolean",
|
|
56
56
|
attribute: "stacked"
|
|
57
57
|
})
|
|
58
58
|
], Button.prototype, "stacked");
|
|
59
59
|
__decorateClass([
|
|
60
|
-
|
|
60
|
+
vividElement.attr({
|
|
61
61
|
mode: "boolean",
|
|
62
62
|
attribute: "pending"
|
|
63
63
|
})
|
|
64
64
|
], Button.prototype, "pending");
|
|
65
65
|
__decorateClass([
|
|
66
|
-
|
|
66
|
+
vividElement.attr({
|
|
67
67
|
mode: "boolean",
|
|
68
68
|
attribute: "dropdown-indicator"
|
|
69
69
|
})
|
|
70
70
|
], Button.prototype, "dropdownIndicator");
|
|
71
71
|
__decorateClass([
|
|
72
|
-
|
|
72
|
+
vividElement.attr({
|
|
73
73
|
mode: "boolean",
|
|
74
74
|
attribute: "active"
|
|
75
75
|
})
|
|
76
76
|
], Button.prototype, "active");
|
|
77
77
|
__decorateClass([
|
|
78
|
-
|
|
78
|
+
vividElement.attr
|
|
79
79
|
], Button.prototype, "label");
|
|
80
80
|
__decorateClass([
|
|
81
|
-
|
|
81
|
+
vividElement.attr
|
|
82
82
|
], Button.prototype, "href");
|
|
83
83
|
__decorateClass([
|
|
84
|
-
|
|
84
|
+
vividElement.attr
|
|
85
85
|
], Button.prototype, "download");
|
|
86
86
|
__decorateClass([
|
|
87
|
-
|
|
87
|
+
vividElement.attr
|
|
88
88
|
], Button.prototype, "hreflang");
|
|
89
89
|
__decorateClass([
|
|
90
|
-
|
|
90
|
+
vividElement.attr
|
|
91
91
|
], Button.prototype, "ping");
|
|
92
92
|
__decorateClass([
|
|
93
|
-
|
|
93
|
+
vividElement.attr
|
|
94
94
|
], Button.prototype, "referrerpolicy");
|
|
95
95
|
__decorateClass([
|
|
96
|
-
|
|
96
|
+
vividElement.attr
|
|
97
97
|
], Button.prototype, "rel");
|
|
98
98
|
__decorateClass([
|
|
99
|
-
|
|
99
|
+
vividElement.attr
|
|
100
100
|
], Button.prototype, "target");
|
|
101
101
|
applyMixins.applyMixins(Button, affix.AffixIconWithTrailing);
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ const styles = ".chevron{display:flex;flex-shrink:0;font:var(--vvd-typography-ba
|
|
|
104
104
|
|
|
105
105
|
const chevronTemplateFactory = (context) => {
|
|
106
106
|
const iconTag = context.tagFor(definition.Icon);
|
|
107
|
-
return
|
|
107
|
+
return vividElement.html`<${iconTag} class="chevron" aria-hidden="true" name="chevron-down-line"></${iconTag}>`;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
const getAppearanceClassName = (appearance, disabled) => {
|
|
@@ -151,7 +151,7 @@ function renderIconOrPending(context, icon, pending, size = enums.Size.Normal) {
|
|
|
151
151
|
[enums.Size.Normal]: "-5",
|
|
152
152
|
[enums.Size.Expanded]: "-4"
|
|
153
153
|
};
|
|
154
|
-
return
|
|
154
|
+
return vividElement.html`<span class="icon pending"><${progressTag} size="${progressSize[size]}"></${progressTag}></span>`;
|
|
155
155
|
} else {
|
|
156
156
|
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
157
157
|
return affixIconTemplate(icon, affix.IconWrapper.Slot);
|
|
@@ -159,17 +159,17 @@ function renderIconOrPending(context, icon, pending, size = enums.Size.Normal) {
|
|
|
159
159
|
}
|
|
160
160
|
const buttonContent = (context) => {
|
|
161
161
|
const chevronTemplate = chevronTemplateFactory(context);
|
|
162
|
-
return
|
|
162
|
+
return vividElement.html`<span class="content">
|
|
163
163
|
${(x) => renderIconOrPending(context, x.icon, x.pending, x.size)}
|
|
164
164
|
${when.when(
|
|
165
165
|
(x) => x.label,
|
|
166
|
-
|
|
166
|
+
vividElement.html`<span class="text" role="presentation">${(x) => x.label}</span>`
|
|
167
167
|
)}
|
|
168
168
|
</span>
|
|
169
169
|
${when.when((x) => x.dropdownIndicator, chevronTemplate)}`;
|
|
170
170
|
};
|
|
171
171
|
function renderButtonContent(context) {
|
|
172
|
-
return
|
|
172
|
+
return vividElement.html` <button
|
|
173
173
|
class="${getClasses}"
|
|
174
174
|
?autofocus="${(x) => x.autofocus}"
|
|
175
175
|
?disabled="${(x) => x.disabled || x.pending}"
|
|
@@ -204,7 +204,7 @@ function renderButtonContent(context) {
|
|
|
204
204
|
</button>`;
|
|
205
205
|
}
|
|
206
206
|
function renderAnchorContent(context) {
|
|
207
|
-
return
|
|
207
|
+
return vividElement.html`<a
|
|
208
208
|
class="${getClasses}"
|
|
209
209
|
download="${(x) => x.download}"
|
|
210
210
|
href="${(x) => x.href}"
|
|
@@ -235,13 +235,13 @@ function renderAnchorContent(context) {
|
|
|
235
235
|
</a>`;
|
|
236
236
|
}
|
|
237
237
|
const buttonTemplate = (context) => {
|
|
238
|
-
return
|
|
239
|
-
${when.when((x) => !x.href,
|
|
240
|
-
${when.when((x) => x.href,
|
|
238
|
+
return vividElement.html` <template role="presentation">
|
|
239
|
+
${when.when((x) => !x.href, vividElement.html`${renderButtonContent(context)}`)}
|
|
240
|
+
${when.when((x) => x.href, vividElement.html`${renderAnchorContent(context)}`)}
|
|
241
241
|
</template>`;
|
|
242
242
|
};
|
|
243
243
|
|
|
244
|
-
const buttonDefinition =
|
|
244
|
+
const buttonDefinition = vividElement.defineVividComponent(
|
|
245
245
|
"button",
|
|
246
246
|
Button,
|
|
247
247
|
buttonTemplate,
|
|
@@ -253,7 +253,7 @@ const buttonDefinition = defineVividComponent.defineVividComponent(
|
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
);
|
|
256
|
-
const registerButton =
|
|
256
|
+
const registerButton = vividElement.createRegisterFunction(buttonDefinition);
|
|
257
257
|
|
|
258
258
|
exports.Button = Button;
|
|
259
259
|
exports.buttonDefinition = buttonDefinition;
|
package/shared/definition11.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { P as ProgressRing, p as progressRingDefinition } from './definition37.js';
|
|
3
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
+
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { b as AffixIconWithTrailing, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
5
5
|
import { V as VividFoundationButton } from './button.js';
|
|
6
6
|
import { a as applyMixins } from './apply-mixins.js';
|
package/shared/definition12.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const vividElement = require('./vivid-element.cjs');
|
|
4
4
|
const calendarEvent = require('./calendar-event.cjs');
|
|
5
5
|
const when = require('./when.cjs');
|
|
6
6
|
const classNames = require('./class-names.cjs');
|
|
@@ -22,17 +22,17 @@ const getStyles = ({ start, duration, overlapCount }) => {
|
|
|
22
22
|
};
|
|
23
23
|
return Object.entries(stylesObj).map((entry) => entry.join(":")).join(";");
|
|
24
24
|
};
|
|
25
|
-
const CalendarEventTemplate =
|
|
25
|
+
const CalendarEventTemplate = vividElement.html` <div
|
|
26
26
|
style="${getStyles}"
|
|
27
27
|
class="${getClasses}"
|
|
28
28
|
role="button"
|
|
29
29
|
tabindex="0"
|
|
30
30
|
>
|
|
31
|
-
${when.when((x) => x.heading,
|
|
32
|
-
${when.when((x) => x.description,
|
|
31
|
+
${when.when((x) => x.heading, vividElement.html`<h2><strong>${(x) => x.heading}</strong></h2>`)}
|
|
32
|
+
${when.when((x) => x.description, vividElement.html`<p>${(x) => x.description}</p>`)}
|
|
33
33
|
</div>`;
|
|
34
34
|
|
|
35
|
-
const calendarEventDefinition =
|
|
35
|
+
const calendarEventDefinition = vividElement.defineVividComponent(
|
|
36
36
|
"calendar-event",
|
|
37
37
|
calendarEvent.CalendarEvent,
|
|
38
38
|
CalendarEventTemplate,
|
|
@@ -44,7 +44,7 @@ const calendarEventDefinition = defineVividComponent.defineVividComponent(
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
|
-
const registerCalendarEvent =
|
|
47
|
+
const registerCalendarEvent = vividElement.createRegisterFunction(
|
|
48
48
|
calendarEventDefinition
|
|
49
49
|
);
|
|
50
50
|
|
package/shared/definition12.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
1
|
+
import { h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { C as CalendarEvent } from './calendar-event.js';
|
|
3
3
|
import { w as when } from './when.js';
|
|
4
4
|
import { c as classNames } from './class-names.js';
|
package/shared/definition13.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
3
|
const vividElement = require('./vivid-element.cjs');
|
|
5
4
|
const calendarEvent = require('./calendar-event.cjs');
|
|
6
5
|
const _has = require('./_has.cjs');
|
|
@@ -687,16 +686,16 @@ class Calendar extends vividElement.VividElement {
|
|
|
687
686
|
}
|
|
688
687
|
}
|
|
689
688
|
__decorateClass([
|
|
690
|
-
|
|
689
|
+
vividElement.attr
|
|
691
690
|
], Calendar.prototype, "datetime");
|
|
692
691
|
__decorateClass([
|
|
693
|
-
|
|
692
|
+
vividElement.attr({ attribute: "start-day" })
|
|
694
693
|
], Calendar.prototype, "startDay");
|
|
695
694
|
__decorateClass([
|
|
696
|
-
|
|
695
|
+
vividElement.attr
|
|
697
696
|
], Calendar.prototype, "locales");
|
|
698
697
|
__decorateClass([
|
|
699
|
-
|
|
698
|
+
vividElement.attr({ mode: "boolean" })
|
|
700
699
|
], Calendar.prototype, "hour12");
|
|
701
700
|
|
|
702
701
|
function getValidDateString(date) {
|
|
@@ -718,10 +717,10 @@ function getFirstDateOfTheWeek(date = /* @__PURE__ */ new Date(), startDay) {
|
|
|
718
717
|
}
|
|
719
718
|
|
|
720
719
|
const HoursTemplate = () => {
|
|
721
|
-
return
|
|
720
|
+
return vividElement.html` <div class="row-headers" role="row">
|
|
722
721
|
${repeat.repeat(
|
|
723
722
|
(x) => x.hoursAsDatetime,
|
|
724
|
-
|
|
723
|
+
vividElement.html`<span role="rowheader">
|
|
725
724
|
<time
|
|
726
725
|
datetime="${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
|
|
727
726
|
hour: "numeric",
|
|
@@ -739,10 +738,10 @@ const HoursTemplate = () => {
|
|
|
739
738
|
</div>`;
|
|
740
739
|
};
|
|
741
740
|
const DaysTemplate = () => {
|
|
742
|
-
return
|
|
741
|
+
return vividElement.html` <div class="column-headers" role="row">
|
|
743
742
|
${repeat.repeat(
|
|
744
743
|
(x) => x._generateDaysArr([getFirstDateOfTheWeek(x.datetime, x.startDay)]),
|
|
745
|
-
|
|
744
|
+
vividElement.html` <div role="columnheader" tabindex="-1">
|
|
746
745
|
<time datetime=${(x) => getValidDateString(x)}>
|
|
747
746
|
<h2>
|
|
748
747
|
<!-- TODO add to column aria-labelledby or describedby to count
|
|
@@ -771,12 +770,12 @@ const DaysTemplate = () => {
|
|
|
771
770
|
)}
|
|
772
771
|
</div>`;
|
|
773
772
|
};
|
|
774
|
-
const ColumnTemplate =
|
|
773
|
+
const ColumnTemplate = vividElement.html`
|
|
775
774
|
<div role="gridcell" tabindex="-1">
|
|
776
775
|
<slot name="day-${(_, c) => c.index}"></slot>
|
|
777
776
|
</div>
|
|
778
777
|
`;
|
|
779
|
-
const CalendarTemplate =
|
|
778
|
+
const CalendarTemplate = vividElement.html`
|
|
780
779
|
<div role="grid" @keydown=${(x, c) => x.onKeydown(c.event)}>
|
|
781
780
|
${DaysTemplate}
|
|
782
781
|
<div class="calendar-row" role="rowgroup">
|
|
@@ -785,7 +784,7 @@ const CalendarTemplate = defineVividComponent.html`
|
|
|
785
784
|
<div class="hours" role="list">
|
|
786
785
|
${repeat.repeat(
|
|
787
786
|
(x) => Array.from({ length: x.hoursAsDatetime.length + 1 }),
|
|
788
|
-
|
|
787
|
+
vividElement.html` <div role="listitem"></div>`
|
|
789
788
|
)}
|
|
790
789
|
</div>
|
|
791
790
|
<div class="columns" role="row">
|
|
@@ -799,7 +798,7 @@ const CalendarTemplate = defineVividComponent.html`
|
|
|
799
798
|
</div>
|
|
800
799
|
`;
|
|
801
800
|
|
|
802
|
-
const calendarDefinition =
|
|
801
|
+
const calendarDefinition = vividElement.defineVividComponent(
|
|
803
802
|
"calendar",
|
|
804
803
|
Calendar,
|
|
805
804
|
CalendarTemplate,
|
|
@@ -811,7 +810,7 @@ const calendarDefinition = defineVividComponent.defineVividComponent(
|
|
|
811
810
|
}
|
|
812
811
|
}
|
|
813
812
|
);
|
|
814
|
-
const registerCalendar =
|
|
813
|
+
const registerCalendar = vividElement.createRegisterFunction(calendarDefinition);
|
|
815
814
|
|
|
816
815
|
exports.calendarDefinition = calendarDefinition;
|
|
817
816
|
exports.registerCalendar = registerCalendar;
|
package/shared/definition13.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
-
import { V as VividElement } from './vivid-element.js';
|
|
1
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
2
|
import { C as CalendarEvent } from './calendar-event.js';
|
|
4
3
|
import { b as _has, _ as _curry1, a as _curry2 } from './_has.js';
|
|
5
4
|
import { r as repeat } from './repeat.js';
|
package/shared/definition14.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const definition$1 = require('./definition27.cjs');
|
|
4
4
|
const definition = require('./definition62.cjs');
|
|
5
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
6
5
|
const vividElement = require('./vivid-element.cjs');
|
|
7
6
|
const enums = require('./enums.cjs');
|
|
8
7
|
const when = require('./when.cjs');
|
|
@@ -23,31 +22,31 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
23
22
|
class Card extends vividElement.VividElement {
|
|
24
23
|
}
|
|
25
24
|
__decorateClass([
|
|
26
|
-
|
|
25
|
+
vividElement.attr
|
|
27
26
|
], Card.prototype, "appearance");
|
|
28
27
|
__decorateClass([
|
|
29
|
-
|
|
28
|
+
vividElement.attr
|
|
30
29
|
], Card.prototype, "headline");
|
|
31
30
|
__decorateClass([
|
|
32
|
-
|
|
31
|
+
vividElement.attr
|
|
33
32
|
], Card.prototype, "subtitle");
|
|
34
33
|
__decorateClass([
|
|
35
|
-
|
|
34
|
+
vividElement.attr
|
|
36
35
|
], Card.prototype, "text");
|
|
37
36
|
__decorateClass([
|
|
38
|
-
|
|
37
|
+
vividElement.attr
|
|
39
38
|
], Card.prototype, "icon");
|
|
40
39
|
__decorateClass([
|
|
41
|
-
|
|
40
|
+
vividElement.attr
|
|
42
41
|
], Card.prototype, "elevation");
|
|
43
42
|
__decorateClass([
|
|
44
|
-
|
|
43
|
+
vividElement.observable
|
|
45
44
|
], Card.prototype, "footerSlottedContent");
|
|
46
45
|
__decorateClass([
|
|
47
|
-
|
|
46
|
+
vividElement.observable
|
|
48
47
|
], Card.prototype, "graphicSlottedContent");
|
|
49
48
|
__decorateClass([
|
|
50
|
-
|
|
49
|
+
vividElement.observable
|
|
51
50
|
], Card.prototype, "hasMetaSlottedContent");
|
|
52
51
|
|
|
53
52
|
const getClasses = (_) => classNames.classNames(
|
|
@@ -56,17 +55,17 @@ const getClasses = (_) => classNames.classNames(
|
|
|
56
55
|
["hide-header", shouldHideHeader(_)]
|
|
57
56
|
);
|
|
58
57
|
function renderHeaderIcon(iconTag) {
|
|
59
|
-
return
|
|
58
|
+
return vividElement.html`
|
|
60
59
|
<${iconTag} class="icon" inline name="${(x) => x.icon}"></${iconTag}>`;
|
|
61
60
|
}
|
|
62
61
|
function Headline() {
|
|
63
|
-
return
|
|
62
|
+
return vividElement.html` <div class="header-headline">${(x) => x.headline}</div> `;
|
|
64
63
|
}
|
|
65
64
|
function Subtitle() {
|
|
66
|
-
return
|
|
65
|
+
return vividElement.html` <div class="header-subtitle">${(x) => x.subtitle}</div> `;
|
|
67
66
|
}
|
|
68
67
|
function headerContent() {
|
|
69
|
-
return
|
|
68
|
+
return vividElement.html`
|
|
70
69
|
<div class="header-content">
|
|
71
70
|
${when.when((x) => x.headline, Headline())}
|
|
72
71
|
${when.when((x) => x.subtitle, Subtitle())}
|
|
@@ -74,7 +73,7 @@ function headerContent() {
|
|
|
74
73
|
`;
|
|
75
74
|
}
|
|
76
75
|
function renderHeader(iconTag) {
|
|
77
|
-
return
|
|
76
|
+
return vividElement.html` <header class="header">
|
|
78
77
|
<slot name="graphic" ${slotted.slotted("graphicSlottedContent")}
|
|
79
78
|
>${when.when((x) => x.icon, renderHeaderIcon(iconTag))}</slot
|
|
80
79
|
>
|
|
@@ -85,14 +84,14 @@ function shouldHideHeader(card) {
|
|
|
85
84
|
return !card.headline && !card.subtitle && !card.icon && (!card.graphicSlottedContent || !card.graphicSlottedContent.length);
|
|
86
85
|
}
|
|
87
86
|
function renderMetaSlot() {
|
|
88
|
-
return
|
|
87
|
+
return vividElement.html` <slot name="meta" ${slotted.slotted("metaSlottedContent")}></slot> `;
|
|
89
88
|
}
|
|
90
89
|
function text() {
|
|
91
|
-
return
|
|
90
|
+
return vividElement.html` <div class="text">${(x) => x.text}</div> `;
|
|
92
91
|
}
|
|
93
92
|
function renderCardContent(context) {
|
|
94
93
|
const iconTag = context.tagFor(definition$1.Icon);
|
|
95
|
-
return
|
|
94
|
+
return vividElement.html`
|
|
96
95
|
<div class="${getClasses}">
|
|
97
96
|
<div class="wrapper">
|
|
98
97
|
<div class="vwc-card-media">
|
|
@@ -115,10 +114,10 @@ function renderCardContent(context) {
|
|
|
115
114
|
}
|
|
116
115
|
const CardTemplate = (context) => {
|
|
117
116
|
const elevationTag = context.tagFor(definition.Elevation);
|
|
118
|
-
return
|
|
117
|
+
return vividElement.html`
|
|
119
118
|
${when.when(
|
|
120
119
|
(x) => x.appearance !== enums.Appearance.Ghost && x.appearance !== enums.Appearance.Outlined,
|
|
121
|
-
|
|
120
|
+
vividElement.html`
|
|
122
121
|
<${elevationTag} dp=${(x) => x.elevation ?? "4"}>
|
|
123
122
|
${renderCardContent(context)}
|
|
124
123
|
</${elevationTag}>
|
|
@@ -126,7 +125,7 @@ const CardTemplate = (context) => {
|
|
|
126
125
|
)}
|
|
127
126
|
${when.when(
|
|
128
127
|
(x) => x.appearance === enums.Appearance.Outlined,
|
|
129
|
-
|
|
128
|
+
vividElement.html`
|
|
130
129
|
<${elevationTag} dp='0')}>
|
|
131
130
|
${renderCardContent(context)}
|
|
132
131
|
</${elevationTag}>
|
|
@@ -134,12 +133,12 @@ const CardTemplate = (context) => {
|
|
|
134
133
|
)}
|
|
135
134
|
${when.when(
|
|
136
135
|
(x) => x.appearance === enums.Appearance.Ghost,
|
|
137
|
-
|
|
136
|
+
vividElement.html` ${renderCardContent(context)} `
|
|
138
137
|
)}
|
|
139
138
|
`;
|
|
140
139
|
};
|
|
141
140
|
|
|
142
|
-
const cardDefinition =
|
|
141
|
+
const cardDefinition = vividElement.defineVividComponent(
|
|
143
142
|
"card",
|
|
144
143
|
Card,
|
|
145
144
|
CardTemplate,
|
|
@@ -148,7 +147,7 @@ const cardDefinition = defineVividComponent.defineVividComponent(
|
|
|
148
147
|
styles
|
|
149
148
|
}
|
|
150
149
|
);
|
|
151
|
-
const registerCard =
|
|
150
|
+
const registerCard = vividElement.createRegisterFunction(cardDefinition);
|
|
152
151
|
|
|
153
152
|
exports.cardDefinition = cardDefinition;
|
|
154
153
|
exports.registerCard = registerCard;
|
package/shared/definition14.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { E as Elevation, e as elevationDefinition } from './definition62.js';
|
|
3
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
4
|
-
import { V as VividElement } from './vivid-element.js';
|
|
3
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
5
4
|
import { A as Appearance } from './enums.js';
|
|
6
5
|
import { w as when } from './when.js';
|
|
7
6
|
import { s as slotted } from './slotted.js';
|
package/shared/definition15.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const
|
|
4
|
+
const vividElement = require('./vivid-element.cjs');
|
|
5
5
|
const applyMixinsWithObservables = require('./applyMixinsWithObservables.cjs');
|
|
6
6
|
const formAssociated = require('./form-associated.cjs');
|
|
7
|
-
const vividElement = require('./vivid-element.cjs');
|
|
8
7
|
const formElements = require('./form-elements.cjs');
|
|
9
8
|
const when = require('./when.cjs');
|
|
10
9
|
const slotted = require('./slotted.cjs');
|
|
@@ -112,28 +111,28 @@ exports.Checkbox = class Checkbox extends FormAssociatedCheckbox {
|
|
|
112
111
|
}
|
|
113
112
|
};
|
|
114
113
|
__decorateClass([
|
|
115
|
-
|
|
114
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
116
115
|
], exports.Checkbox.prototype, "ariaLabel", 2);
|
|
117
116
|
__decorateClass([
|
|
118
|
-
|
|
117
|
+
vividElement.attr({ attribute: "tabindex" })
|
|
119
118
|
], exports.Checkbox.prototype, "tabindex", 2);
|
|
120
119
|
__decorateClass([
|
|
121
|
-
|
|
120
|
+
vividElement.attr
|
|
122
121
|
], exports.Checkbox.prototype, "connotation", 2);
|
|
123
122
|
__decorateClass([
|
|
124
|
-
|
|
123
|
+
vividElement.attr({ attribute: "aria-checked" })
|
|
125
124
|
], exports.Checkbox.prototype, "ariaChecked", 2);
|
|
126
125
|
__decorateClass([
|
|
127
|
-
|
|
126
|
+
vividElement.attr({ attribute: "readonly", mode: "boolean" })
|
|
128
127
|
], exports.Checkbox.prototype, "readOnly", 2);
|
|
129
128
|
__decorateClass([
|
|
130
|
-
|
|
129
|
+
vividElement.observable
|
|
131
130
|
], exports.Checkbox.prototype, "defaultSlottedNodes", 2);
|
|
132
131
|
__decorateClass([
|
|
133
|
-
|
|
132
|
+
vividElement.observable
|
|
134
133
|
], exports.Checkbox.prototype, "indeterminate", 2);
|
|
135
134
|
__decorateClass([
|
|
136
|
-
|
|
135
|
+
vividElement.observable
|
|
137
136
|
], exports.Checkbox.prototype, "slottedContent", 2);
|
|
138
137
|
exports.Checkbox = __decorateClass([
|
|
139
138
|
formElements.errorText,
|
|
@@ -167,7 +166,7 @@ const getClasses = ({
|
|
|
167
166
|
);
|
|
168
167
|
const CheckboxTemplate = (context) => {
|
|
169
168
|
const iconTag = context.tagFor(definition.Icon);
|
|
170
|
-
return
|
|
169
|
+
return vividElement.html`<template role="${(x) => x.ariaLabel ? "presentation" : null}">
|
|
171
170
|
<div
|
|
172
171
|
class="${getClasses}"
|
|
173
172
|
role="checkbox"
|
|
@@ -183,14 +182,14 @@ const CheckboxTemplate = (context) => {
|
|
|
183
182
|
<div class="control">
|
|
184
183
|
${when.when(
|
|
185
184
|
(x) => x.checked,
|
|
186
|
-
|
|
185
|
+
vividElement.html`<${iconTag} name="check-solid" class="icon"></${iconTag}>`
|
|
187
186
|
)}
|
|
188
187
|
${when.when(
|
|
189
188
|
(x) => x.indeterminate,
|
|
190
|
-
|
|
189
|
+
vividElement.html`<${iconTag} name="minus-solid" class="icon"></${iconTag}>`
|
|
191
190
|
)}
|
|
192
191
|
</div>
|
|
193
|
-
${
|
|
192
|
+
${vividElement.html`<label
|
|
194
193
|
>${(x) => x.label}<slot ${slotted.slotted("slottedContent")}></slot
|
|
195
194
|
></label>`}
|
|
196
195
|
</div>
|
|
@@ -198,7 +197,7 @@ const CheckboxTemplate = (context) => {
|
|
|
198
197
|
</template>`;
|
|
199
198
|
};
|
|
200
199
|
|
|
201
|
-
const checkboxDefinition =
|
|
200
|
+
const checkboxDefinition = vividElement.defineVividComponent(
|
|
202
201
|
"checkbox",
|
|
203
202
|
exports.Checkbox,
|
|
204
203
|
CheckboxTemplate,
|
|
@@ -210,7 +209,7 @@ const checkboxDefinition = defineVividComponent.defineVividComponent(
|
|
|
210
209
|
}
|
|
211
210
|
}
|
|
212
211
|
);
|
|
213
|
-
const registerCheckbox =
|
|
212
|
+
const registerCheckbox = vividElement.createRegisterFunction(checkboxDefinition);
|
|
214
213
|
|
|
215
214
|
exports.checkboxDefinition = checkboxDefinition;
|
|
216
215
|
exports.registerCheckbox = registerCheckbox;
|
package/shared/definition15.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
2
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
3
3
|
import { a as applyMixinsWithObservables } from './applyMixinsWithObservables.js';
|
|
4
4
|
import { C as CheckableFormAssociated } from './form-associated.js';
|
|
5
|
-
import { V as VividElement } from './vivid-element.js';
|
|
6
5
|
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, g as getFeedbackTemplate } from './form-elements.js';
|
|
7
6
|
import { w as when } from './when.js';
|
|
8
7
|
import { s as slotted } from './slotted.js';
|