@vonage/vivid 4.14.0 → 4.14.2
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 +152 -197
- package/lib/divider/divider.d.ts +1 -1
- package/lib/divider/divider.template.d.ts +1 -1
- 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/package.json +1 -1
- package/shared/affix.cjs +8 -8
- package/shared/affix.js +2 -2
- 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/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 +2 -3
- package/shared/definition10.cjs +5 -6
- package/shared/definition10.js +1 -2
- package/shared/definition11.cjs +29 -29
- package/shared/definition11.js +2 -2
- 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 +21 -21
- package/shared/definition16.js +5 -5
- package/shared/definition17.cjs +62 -61
- package/shared/definition17.js +10 -9
- 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 +7 -7
- package/shared/definition22.js +3 -3
- package/shared/definition23.cjs +10 -11
- package/shared/definition23.js +1 -2
- package/shared/definition24.cjs +8 -8
- package/shared/definition24.js +3 -3
- 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 +12 -13
- package/shared/definition27.js +2 -3
- package/shared/definition28.cjs +9 -10
- package/shared/definition28.js +2 -3
- package/shared/definition29.cjs +44 -45
- package/shared/definition29.js +3 -4
- package/shared/definition3.cjs +8 -9
- package/shared/definition3.js +1 -2
- package/shared/definition30.cjs +9 -10
- package/shared/definition30.js +2 -3
- package/shared/definition31.cjs +5 -5
- package/shared/definition31.js +2 -2
- package/shared/definition32.cjs +3 -4
- package/shared/definition32.js +1 -2
- package/shared/definition33.cjs +6 -7
- package/shared/definition33.js +2 -3
- package/shared/definition34.cjs +112 -45
- package/shared/definition34.js +73 -6
- package/shared/definition35.cjs +9 -209
- package/shared/definition35.js +4 -202
- 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 +2 -3
- 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 +52 -53
- package/shared/definition42.js +3 -4
- package/shared/definition43.cjs +40 -40
- package/shared/definition43.js +6 -6
- 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 +2 -3
- 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 +2 -3
- package/shared/definition51.cjs +109 -72
- package/shared/definition51.js +78 -41
- package/shared/definition52.cjs +4 -5
- package/shared/definition52.js +1 -2
- package/shared/definition53.cjs +15 -16
- package/shared/definition53.js +2 -3
- 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 +3 -4
- 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 +2 -3
- package/shared/definition8.cjs +14 -15
- package/shared/definition8.js +2 -3
- 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/foundation-element.cjs +11 -11
- package/shared/foundation-element.js +1 -1
- package/shared/key-codes2.cjs +0 -56
- package/shared/key-codes2.js +1 -53
- package/shared/listbox.cjs +15 -16
- package/shared/listbox.js +2 -3
- package/shared/localized.cjs +2 -2
- package/shared/localized.js +1 -1
- package/shared/option.cjs +205 -0
- package/shared/option.js +202 -0
- 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/start-end.cjs +52 -0
- package/shared/start-end.js +50 -0
- package/shared/text-anchor.cjs +5 -6
- package/shared/text-anchor.js +3 -4
- 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 +2 -3
- 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/lib/listbox/definition.d.ts +0 -2
- package/lib/listbox/listbox.d.ts +0 -14
- package/lib/listbox/listbox.template.d.ts +0 -2
- package/listbox/index.cjs +0 -54
- package/listbox/index.js +0 -52
- package/shared/aria-global2.cjs +0 -75
- package/shared/aria-global2.js +0 -73
- package/shared/defineVividComponent.cjs +0 -2612
- package/shared/defineVividComponent.js +0 -2592
- package/shared/listbox2.cjs +0 -1268
- package/shared/listbox2.js +0 -1265
- package/shared/strings2.cjs +0 -37
- package/shared/strings2.js +0 -33
package/shared/definition19.cjs
CHANGED
|
@@ -5,7 +5,7 @@ const definition$1 = require('./definition63.cjs');
|
|
|
5
5
|
const definition$2 = require('./definition55.cjs');
|
|
6
6
|
const definition$3 = require('./definition22.cjs');
|
|
7
7
|
const presentationDate = require('./presentationDate.cjs');
|
|
8
|
-
const
|
|
8
|
+
const vividElement = require('./vivid-element.cjs');
|
|
9
9
|
const formElements = require('./form-elements.cjs');
|
|
10
10
|
|
|
11
11
|
const formatRange = (from, to) => {
|
|
@@ -382,38 +382,38 @@ getVisibleRange_fn = function() {
|
|
|
382
382
|
return { start, end };
|
|
383
383
|
};
|
|
384
384
|
__decorateClass([
|
|
385
|
-
|
|
385
|
+
vividElement.attr({ mode: "fromView", attribute: "start" })
|
|
386
386
|
], DateRangePicker.prototype, "initialStart", 2);
|
|
387
387
|
__decorateClass([
|
|
388
|
-
|
|
388
|
+
vividElement.attr({ mode: "fromView", attribute: "end" })
|
|
389
389
|
], DateRangePicker.prototype, "initialEnd", 2);
|
|
390
390
|
__decorateClass([
|
|
391
|
-
|
|
391
|
+
vividElement.observable
|
|
392
392
|
], DateRangePicker.prototype, "start", 2);
|
|
393
393
|
__decorateClass([
|
|
394
|
-
|
|
394
|
+
vividElement.observable
|
|
395
395
|
], DateRangePicker.prototype, "end", 2);
|
|
396
396
|
__decorateClass([
|
|
397
|
-
|
|
397
|
+
vividElement.attr({ attribute: "current-start" })
|
|
398
398
|
], DateRangePicker.prototype, "currentStart", 2);
|
|
399
399
|
__decorateClass([
|
|
400
|
-
|
|
400
|
+
vividElement.attr({ attribute: "current-end" })
|
|
401
401
|
], DateRangePicker.prototype, "currentEnd", 2);
|
|
402
402
|
__decorateClass([
|
|
403
|
-
|
|
403
|
+
vividElement.observable
|
|
404
404
|
], DateRangePicker.prototype, "_numCalendars", 2);
|
|
405
405
|
__decorateClass([
|
|
406
|
-
|
|
406
|
+
vividElement.observable
|
|
407
407
|
], DateRangePicker.prototype, "_hoverDate", 2);
|
|
408
408
|
__decorateClass([
|
|
409
|
-
|
|
409
|
+
vividElement.volatile
|
|
410
410
|
], DateRangePicker.prototype, "_calendarButtonLabel", 1);
|
|
411
411
|
DateRangePicker = __decorateClass([
|
|
412
412
|
formElements.errorText,
|
|
413
413
|
formElements.formElements
|
|
414
414
|
], DateRangePicker);
|
|
415
415
|
|
|
416
|
-
const dateRangePickerDefinition =
|
|
416
|
+
const dateRangePickerDefinition = vividElement.defineVividComponent(
|
|
417
417
|
"date-range-picker",
|
|
418
418
|
DateRangePicker,
|
|
419
419
|
presentationDate.DatePickerBaseTemplate,
|
|
@@ -425,7 +425,7 @@ const dateRangePickerDefinition = defineVividComponent.defineVividComponent(
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
);
|
|
428
|
-
const registerDateRangePicker =
|
|
428
|
+
const registerDateRangePicker = vividElement.createRegisterFunction(
|
|
429
429
|
dateRangePickerDefinition
|
|
430
430
|
);
|
|
431
431
|
|
package/shared/definition19.js
CHANGED
|
@@ -3,7 +3,7 @@ import { p as popupDefinition } from './definition63.js';
|
|
|
3
3
|
import { t as textFieldDefinition } from './definition55.js';
|
|
4
4
|
import { d as dividerDefinition } from './definition22.js';
|
|
5
5
|
import { f as formatPresentationDate, p as parsePresentationDate, D as DatePickerBase, i as isValidDateStr, c as compareDateStr, s as styles, a as DatePickerBaseTemplate } from './presentationDate.js';
|
|
6
|
-
import { a as attr, o as observable, v as volatile, d as defineVividComponent, f as createRegisterFunction } from './
|
|
6
|
+
import { a as attr, o as observable, v as volatile, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
7
7
|
import { e as errorText, f as formElements } from './form-elements.js';
|
|
8
8
|
|
|
9
9
|
const formatRange = (from, to) => {
|
package/shared/definition2.cjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
4
|
-
const definition = require('./definition.cjs');
|
|
5
3
|
const vividElement = require('./vivid-element.cjs');
|
|
4
|
+
const definition = require('./definition.cjs');
|
|
6
5
|
const keyCodes = require('./key-codes.cjs');
|
|
7
6
|
const numbers = require('./numbers.cjs');
|
|
8
7
|
const slotted = require('./slotted.cjs');
|
|
@@ -173,21 +172,21 @@ class Accordion extends vividElement.VividElement {
|
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
__decorateClass([
|
|
176
|
-
|
|
175
|
+
vividElement.attr({ attribute: "expand-mode" })
|
|
177
176
|
], Accordion.prototype, "expandmode");
|
|
178
177
|
// @ts-expect-error Type is incorrectly non-optional
|
|
179
178
|
__decorateClass([
|
|
180
|
-
|
|
179
|
+
vividElement.observable
|
|
181
180
|
], Accordion.prototype, "accordionItems");
|
|
182
181
|
|
|
183
182
|
const getClasses = (_) => classNames.classNames("base");
|
|
184
|
-
const AccordionTemplate =
|
|
183
|
+
const AccordionTemplate = vividElement.html`
|
|
185
184
|
<div class="${getClasses}">
|
|
186
185
|
<slot ${slotted.slotted({ property: "accordionItems", filter: slotted.elements() })}></slot>
|
|
187
186
|
</div>
|
|
188
187
|
`;
|
|
189
188
|
|
|
190
|
-
const accordionDefinition =
|
|
189
|
+
const accordionDefinition = vividElement.defineVividComponent(
|
|
191
190
|
"accordion",
|
|
192
191
|
Accordion,
|
|
193
192
|
AccordionTemplate,
|
|
@@ -196,7 +195,7 @@ const accordionDefinition = defineVividComponent.defineVividComponent(
|
|
|
196
195
|
styles
|
|
197
196
|
}
|
|
198
197
|
);
|
|
199
|
-
const registerAccordion =
|
|
198
|
+
const registerAccordion = vividElement.createRegisterFunction(accordionDefinition);
|
|
200
199
|
|
|
201
200
|
exports.accordionDefinition = accordionDefinition;
|
|
202
201
|
exports.registerAccordion = registerAccordion;
|
package/shared/definition2.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
1
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
2
2
|
import { A as AccordionItem, a as accordionItemDefinition } from './definition.js';
|
|
3
|
-
import { V as VividElement } from './vivid-element.js';
|
|
4
3
|
import { d as keyEnd, g as keyHome, f as keyArrowDown, e as keyArrowUp } from './key-codes.js';
|
|
5
4
|
import { w as wrapInBounds } from './numbers.js';
|
|
6
5
|
import { s as slotted, e as elements } from './slotted.js';
|
package/shared/definition20.cjs
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition11.cjs');
|
|
4
4
|
const definition$2 = require('./definition55.cjs');
|
|
5
|
-
const
|
|
5
|
+
const vividElement = require('./vivid-element.cjs');
|
|
6
6
|
const definition$1 = require('./definition27.cjs');
|
|
7
7
|
const applyMixins = require('./apply-mixins.cjs');
|
|
8
|
-
const vividElement = require('./vivid-element.cjs');
|
|
9
8
|
const localized = require('./localized.cjs');
|
|
10
9
|
const textField = require('./text-field2.cjs');
|
|
11
10
|
const when = require('./when.cjs');
|
|
@@ -55,37 +54,37 @@ class DialPad extends vividElement.VividElement {
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
__decorateClass([
|
|
58
|
-
|
|
57
|
+
vividElement.attr({ attribute: "helper-text" })
|
|
59
58
|
], DialPad.prototype, "helperText");
|
|
60
59
|
__decorateClass([
|
|
61
|
-
|
|
60
|
+
vividElement.attr
|
|
62
61
|
], DialPad.prototype, "placeholder");
|
|
63
62
|
__decorateClass([
|
|
64
|
-
|
|
63
|
+
vividElement.attr({ mode: "fromView" })
|
|
65
64
|
], DialPad.prototype, "value");
|
|
66
65
|
__decorateClass([
|
|
67
|
-
|
|
66
|
+
vividElement.attr({ mode: "fromView" })
|
|
68
67
|
], DialPad.prototype, "pattern");
|
|
69
68
|
__decorateClass([
|
|
70
|
-
|
|
69
|
+
vividElement.attr({ mode: "boolean" })
|
|
71
70
|
], DialPad.prototype, "disabled");
|
|
72
71
|
__decorateClass([
|
|
73
|
-
|
|
72
|
+
vividElement.attr({ mode: "boolean" })
|
|
74
73
|
], DialPad.prototype, "pending");
|
|
75
74
|
__decorateClass([
|
|
76
|
-
|
|
75
|
+
vividElement.attr({ attribute: "call-active", mode: "boolean" })
|
|
77
76
|
], DialPad.prototype, "callActive");
|
|
78
77
|
__decorateClass([
|
|
79
|
-
|
|
78
|
+
vividElement.attr({ mode: "boolean", attribute: "no-call" })
|
|
80
79
|
], DialPad.prototype, "noCall");
|
|
81
80
|
__decorateClass([
|
|
82
|
-
|
|
81
|
+
vividElement.attr({ mode: "boolean", attribute: "no-input" })
|
|
83
82
|
], DialPad.prototype, "noInput");
|
|
84
83
|
__decorateClass([
|
|
85
|
-
|
|
84
|
+
vividElement.attr({ attribute: "end-call-button-label" })
|
|
86
85
|
], DialPad.prototype, "endCallButtonLabel");
|
|
87
86
|
__decorateClass([
|
|
88
|
-
|
|
87
|
+
vividElement.attr({ attribute: "call-button-label" })
|
|
89
88
|
], DialPad.prototype, "callButtonLabel");
|
|
90
89
|
applyMixins.applyMixins(DialPad, localized.Localized);
|
|
91
90
|
|
|
@@ -157,7 +156,7 @@ function deleteLastCharacter(dialPad) {
|
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
function renderTextField(textFieldTag, buttonTag) {
|
|
160
|
-
return
|
|
159
|
+
return vividElement.html`<${textFieldTag} ${ref.ref(
|
|
161
160
|
"_textFieldEl"
|
|
162
161
|
)} class="phone-field" internal-part type="tel"
|
|
163
162
|
value="${(x) => x.value}" placeholder="${(x) => x.placeholder}"
|
|
@@ -171,7 +170,7 @@ function renderTextField(textFieldTag, buttonTag) {
|
|
|
171
170
|
>
|
|
172
171
|
${when.when(
|
|
173
172
|
(x) => x.value && x.value.length && x.value.length > 0,
|
|
174
|
-
|
|
173
|
+
vividElement.html`<${buttonTag}
|
|
175
174
|
slot="action-items"
|
|
176
175
|
size='super-condensed'
|
|
177
176
|
icon="backspace-line"
|
|
@@ -190,10 +189,10 @@ function onDigitClick(digit, { parent: dialPad, event }) {
|
|
|
190
189
|
dialPad.$emit("change");
|
|
191
190
|
}
|
|
192
191
|
function renderDigits(buttonTag, iconTag) {
|
|
193
|
-
return
|
|
192
|
+
return vividElement.html`
|
|
194
193
|
${repeat.repeat(
|
|
195
194
|
(_) => DIAL_PAD_BUTTONS,
|
|
196
|
-
|
|
195
|
+
vividElement.html`
|
|
197
196
|
<${buttonTag}
|
|
198
197
|
id="${(x) => x.id}"
|
|
199
198
|
value="${(x) => x.value}"
|
|
@@ -215,7 +214,7 @@ function renderDigits(buttonTag, iconTag) {
|
|
|
215
214
|
`;
|
|
216
215
|
}
|
|
217
216
|
function renderDialButton(buttonTag) {
|
|
218
|
-
return
|
|
217
|
+
return vividElement.html`<${buttonTag} class="call-btn"
|
|
219
218
|
size="expanded"
|
|
220
219
|
appearance="filled"
|
|
221
220
|
icon="${(x) => x.callActive ? "disable-call-line" : "call-line"}"
|
|
@@ -230,14 +229,14 @@ const DialPadTemplate = (context) => {
|
|
|
230
229
|
const buttonTag = context.tagFor(definition.Button);
|
|
231
230
|
const iconTag = context.tagFor(definition$1.Icon);
|
|
232
231
|
const textFieldTag = context.tagFor(textField.TextField);
|
|
233
|
-
return
|
|
232
|
+
return vividElement.html` <div class="${getClasses}">
|
|
234
233
|
${when.when((x) => !x.noInput, renderTextField(textFieldTag, buttonTag))}
|
|
235
234
|
<div class="digits">${renderDigits(buttonTag, iconTag)}</div>
|
|
236
235
|
${when.when((x) => !x.noCall, renderDialButton(buttonTag))}
|
|
237
236
|
</div>`;
|
|
238
237
|
};
|
|
239
238
|
|
|
240
|
-
const dialPadDefinition =
|
|
239
|
+
const dialPadDefinition = vividElement.defineVividComponent(
|
|
241
240
|
"dial-pad",
|
|
242
241
|
DialPad,
|
|
243
242
|
DialPadTemplate,
|
|
@@ -246,7 +245,7 @@ const dialPadDefinition = defineVividComponent.defineVividComponent(
|
|
|
246
245
|
styles
|
|
247
246
|
}
|
|
248
247
|
);
|
|
249
|
-
const registerDialPad =
|
|
248
|
+
const registerDialPad = vividElement.createRegisterFunction(dialPadDefinition);
|
|
250
249
|
|
|
251
250
|
exports.dialPadDefinition = dialPadDefinition;
|
|
252
251
|
exports.registerDialPad = registerDialPad;
|
package/shared/definition20.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { t as textFieldDefinition } from './definition55.js';
|
|
3
|
-
import { a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
3
|
+
import { V as VividElement, a as attr, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
4
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
5
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
6
|
-
import { V as VividElement } from './vivid-element.js';
|
|
7
6
|
import { L as Localized } from './localized.js';
|
|
8
7
|
import { T as TextField } from './text-field2.js';
|
|
9
8
|
import { w as when } from './when.js';
|
package/shared/definition21.cjs
CHANGED
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
const definition$1 = require('./definition27.cjs');
|
|
4
4
|
const definition$2 = require('./definition11.cjs');
|
|
5
5
|
const definition = require('./definition62.cjs');
|
|
6
|
-
const
|
|
6
|
+
const vividElement = require('./vivid-element.cjs');
|
|
7
7
|
const applyMixins = require('./apply-mixins.cjs');
|
|
8
8
|
const index = require('./index.cjs');
|
|
9
|
-
const vividElement = require('./vivid-element.cjs');
|
|
10
9
|
const localized = require('./localized.cjs');
|
|
11
10
|
const when = require('./when.cjs');
|
|
12
11
|
const slotted = require('./slotted.cjs');
|
|
13
12
|
const classNames = require('./class-names.cjs');
|
|
14
13
|
|
|
15
|
-
const styles = ".base{white-space:initial;box-sizing:border-box;padding:0;border:none;border-radius:8px;background-color:transparent;color:var(--vvd-color-canvas-text);max-block-size:var(--dialog-max-block-size, calc(100vh - 64px) );max-inline-size:var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));min-inline-size:var(--dialog-min-inline-size, 280px)}@media not all and (width >= 600px){.base{--_dialog-default-max-inline-size: 90vw}}@media (width >= 600px){.base{--_dialog-default-max-inline-size: 560px}}.base:not(.modal){z-index:var(--dialog-z-index, 1)}.base.modal{
|
|
14
|
+
const styles = ".base{white-space:initial;box-sizing:border-box;padding:0;border:none;border-radius:8px;background-color:transparent;color:var(--vvd-color-canvas-text);max-block-size:var(--dialog-max-block-size, calc(100vh - 64px) );max-inline-size:var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));min-inline-size:var(--dialog-min-inline-size, 280px)}@media not all and (width >= 600px){.base{--_dialog-default-max-inline-size: 90vw}}@media (width >= 600px){.base{--_dialog-default-max-inline-size: 560px}}.base:not(.modal){z-index:var(--dialog-z-index, 1)}.base.modal{box-shadow:0 4px 20px #00000059}.base.modal::backdrop{background-color:var(--vvd-color-canvas-text, currentColor);opacity:.5}.base:focus-visible{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.main-wrapper{display:flex;box-sizing:border-box;flex-direction:column;gap:24px;padding-block:24px}.main-wrapper>*{box-sizing:border-box}.header{display:grid;align-items:flex-start;justify-content:space-between;inline-size:100%;padding-inline:24px}.base:not(.icon-placement-side) .header{grid-template-columns:1fr auto;grid-template-rows:auto auto auto}.base:not(.icon-placement-side) .header .icon{font-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));grid-column:1/2;grid-row:1/2;line-height:1;margin-block-end:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}.base.icon-placement-side .header{grid-template-columns:auto 1fr auto;grid-template-rows:auto auto}.base.icon-placement-side .header .icon{font-size:calc(1px*(28 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}.base.icon-placement-side .header ::slotted(*),.base.icon-placement-side .header .icon{grid-column:1/2;grid-row:1/-1;margin-inline-end:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}.header.border{position:relative}.header.border:after{position:absolute;bottom:-24px;left:0;background-color:var(--vvd-color-neutral-200);block-size:1px;content:\"\";inline-size:100%}.base.hide-body .header.border:after{content:none}.body:not(.full-width){padding-inline:24px}.hide-body .body{display:none}.footer{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-inline:24px}.hide-footer .footer{display:none}.footer .actions{display:flex;align-self:flex-end;gap:8px}.dismiss-button{flex-shrink:0;grid-column:-2/-1;grid-row:1/-1;margin-block-start:-8px;margin-inline:4px -8px}.headline{font:var(--vvd-typography-heading-4)}.subtitle{font:var(--vvd-typography-base)}slot[name=main]{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}slot[name=main]{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}slot[name=main] ::-webkit-scrollbar{width:4px}slot[name=main] ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}slot[name=main] ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}slot[name=main]{display:block;overflow:hidden auto;max-width:inherit;max-height:inherit;border-radius:inherit}";
|
|
16
15
|
|
|
17
16
|
var __defProp = Object.defineProperty;
|
|
18
17
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -194,55 +193,55 @@ class Dialog extends vividElement.VividElement {
|
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
__decorateClass([
|
|
197
|
-
|
|
196
|
+
vividElement.attr({ mode: "boolean" })
|
|
198
197
|
], Dialog.prototype, "open");
|
|
199
198
|
__decorateClass([
|
|
200
|
-
|
|
199
|
+
vividElement.attr
|
|
201
200
|
], Dialog.prototype, "icon");
|
|
202
201
|
__decorateClass([
|
|
203
|
-
|
|
202
|
+
vividElement.attr({ attribute: "icon-placement" })
|
|
204
203
|
], Dialog.prototype, "iconPlacement");
|
|
205
204
|
__decorateClass([
|
|
206
|
-
|
|
205
|
+
vividElement.attr
|
|
207
206
|
], Dialog.prototype, "subtitle");
|
|
208
207
|
__decorateClass([
|
|
209
|
-
|
|
208
|
+
vividElement.attr
|
|
210
209
|
], Dialog.prototype, "headline");
|
|
211
210
|
__decorateClass([
|
|
212
|
-
|
|
211
|
+
vividElement.attr({ attribute: "full-width-body", mode: "boolean" })
|
|
213
212
|
], Dialog.prototype, "fullWidthBody");
|
|
214
213
|
__decorateClass([
|
|
215
|
-
|
|
214
|
+
vividElement.attr({ attribute: "aria-label" })
|
|
216
215
|
], Dialog.prototype, "ariaLabel");
|
|
217
216
|
__decorateClass([
|
|
218
|
-
|
|
217
|
+
vividElement.attr({ attribute: "dismiss-button-aria-label" })
|
|
219
218
|
], Dialog.prototype, "dismissButtonAriaLabel");
|
|
220
219
|
__decorateClass([
|
|
221
|
-
|
|
220
|
+
vividElement.attr({ attribute: "no-light-dismiss", mode: "boolean" })
|
|
222
221
|
], Dialog.prototype, "noLightDismiss");
|
|
223
222
|
__decorateClass([
|
|
224
|
-
|
|
223
|
+
vividElement.attr({ attribute: "no-dismiss-on-esc", mode: "boolean" })
|
|
225
224
|
], Dialog.prototype, "noDismissOnEsc");
|
|
226
225
|
__decorateClass([
|
|
227
|
-
|
|
226
|
+
vividElement.attr({ attribute: "no-dismiss-button", mode: "boolean" })
|
|
228
227
|
], Dialog.prototype, "noDismissButton");
|
|
229
228
|
__decorateClass([
|
|
230
|
-
|
|
229
|
+
vividElement.attr({ attribute: "non-dismissible", mode: "boolean" })
|
|
231
230
|
], Dialog.prototype, "nonDismissible");
|
|
232
231
|
__decorateClass([
|
|
233
|
-
|
|
232
|
+
vividElement.attr({ mode: "boolean" })
|
|
234
233
|
], Dialog.prototype, "modal");
|
|
235
234
|
__decorateClass([
|
|
236
|
-
|
|
235
|
+
vividElement.observable
|
|
237
236
|
], Dialog.prototype, "_openedAsModal");
|
|
238
237
|
__decorateClass([
|
|
239
|
-
|
|
238
|
+
vividElement.observable
|
|
240
239
|
], Dialog.prototype, "bodySlottedContent");
|
|
241
240
|
__decorateClass([
|
|
242
|
-
|
|
241
|
+
vividElement.observable
|
|
243
242
|
], Dialog.prototype, "footerSlottedContent");
|
|
244
243
|
__decorateClass([
|
|
245
|
-
|
|
244
|
+
vividElement.observable
|
|
246
245
|
], Dialog.prototype, "actionItemsSlottedContent");
|
|
247
246
|
applyMixins.applyMixins(Dialog, localized.Localized);
|
|
248
247
|
|
|
@@ -263,18 +262,18 @@ const getClasses = ({
|
|
|
263
262
|
["modal", _openedAsModal]
|
|
264
263
|
);
|
|
265
264
|
function icon(iconTag) {
|
|
266
|
-
return
|
|
265
|
+
return vividElement.html`
|
|
267
266
|
<${iconTag} class="icon" name="${(x) => x.icon}"></${iconTag}>
|
|
268
267
|
`;
|
|
269
268
|
}
|
|
270
269
|
function headline() {
|
|
271
|
-
return
|
|
270
|
+
return vividElement.html` <div class="headline">${(x) => x.headline}</div> `;
|
|
272
271
|
}
|
|
273
272
|
function subtitle() {
|
|
274
|
-
return
|
|
273
|
+
return vividElement.html` <div class="subtitle">${(x) => x.subtitle}</div> `;
|
|
275
274
|
}
|
|
276
275
|
function renderDismissButton(buttonTag) {
|
|
277
|
-
return
|
|
276
|
+
return vividElement.html`
|
|
278
277
|
<${buttonTag}
|
|
279
278
|
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.dialog.dismissButtonLabel}"
|
|
280
279
|
size="condensed"
|
|
@@ -287,8 +286,8 @@ const DialogTemplate = (context) => {
|
|
|
287
286
|
const elevationTag = context.tagFor(definition.Elevation);
|
|
288
287
|
const iconTag = context.tagFor(definition$1.Icon);
|
|
289
288
|
const buttonTag = context.tagFor(definition$2.Button);
|
|
290
|
-
return
|
|
291
|
-
<${elevationTag} dp="8">
|
|
289
|
+
return vividElement.html`
|
|
290
|
+
<${elevationTag} dp="8" not-relative>
|
|
292
291
|
<dialog class="${getClasses}"
|
|
293
292
|
@keydown="${(x, c) => x._onKeyDown(c.event)}"
|
|
294
293
|
@cancel="${(_, c) => c.event.preventDefault()}"
|
|
@@ -322,7 +321,7 @@ const DialogTemplate = (context) => {
|
|
|
322
321
|
</${elevationTag}>`;
|
|
323
322
|
};
|
|
324
323
|
|
|
325
|
-
const dialogDefinition =
|
|
324
|
+
const dialogDefinition = vividElement.defineVividComponent(
|
|
326
325
|
"dialog",
|
|
327
326
|
Dialog,
|
|
328
327
|
DialogTemplate,
|
|
@@ -331,7 +330,7 @@ const dialogDefinition = defineVividComponent.defineVividComponent(
|
|
|
331
330
|
styles
|
|
332
331
|
}
|
|
333
332
|
);
|
|
334
|
-
const registerDialog =
|
|
333
|
+
const registerDialog = vividElement.createRegisterFunction(dialogDefinition);
|
|
335
334
|
|
|
336
335
|
exports.dialogDefinition = dialogDefinition;
|
|
337
336
|
exports.registerDialog = registerDialog;
|
package/shared/definition21.js
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { I as Icon, i as iconDefinition } from './definition27.js';
|
|
2
2
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
3
3
|
import { E as Elevation, e as elevationDefinition } from './definition62.js';
|
|
4
|
-
import { a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './
|
|
4
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
5
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
6
6
|
import { h as handleEscapeKeyAndStopPropogation } from './index.js';
|
|
7
|
-
import { V as VividElement } from './vivid-element.js';
|
|
8
7
|
import { L as Localized } from './localized.js';
|
|
9
8
|
import { w as when } from './when.js';
|
|
10
9
|
import { s as slotted } from './slotted.js';
|
|
11
10
|
import { c as classNames } from './class-names.js';
|
|
12
11
|
|
|
13
|
-
const styles = ".base{white-space:initial;box-sizing:border-box;padding:0;border:none;border-radius:8px;background-color:transparent;color:var(--vvd-color-canvas-text);max-block-size:var(--dialog-max-block-size, calc(100vh - 64px) );max-inline-size:var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));min-inline-size:var(--dialog-min-inline-size, 280px)}@media not all and (width >= 600px){.base{--_dialog-default-max-inline-size: 90vw}}@media (width >= 600px){.base{--_dialog-default-max-inline-size: 560px}}.base:not(.modal){z-index:var(--dialog-z-index, 1)}.base.modal{
|
|
12
|
+
const styles = ".base{white-space:initial;box-sizing:border-box;padding:0;border:none;border-radius:8px;background-color:transparent;color:var(--vvd-color-canvas-text);max-block-size:var(--dialog-max-block-size, calc(100vh - 64px) );max-inline-size:var(--dialog-max-inline-size, var(--_dialog-default-max-inline-size));min-inline-size:var(--dialog-min-inline-size, 280px)}@media not all and (width >= 600px){.base{--_dialog-default-max-inline-size: 90vw}}@media (width >= 600px){.base{--_dialog-default-max-inline-size: 560px}}.base:not(.modal){z-index:var(--dialog-z-index, 1)}.base.modal{box-shadow:0 4px 20px #00000059}.base.modal::backdrop{background-color:var(--vvd-color-canvas-text, currentColor);opacity:.5}.base:focus-visible{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}.main-wrapper{display:flex;box-sizing:border-box;flex-direction:column;gap:24px;padding-block:24px}.main-wrapper>*{box-sizing:border-box}.header{display:grid;align-items:flex-start;justify-content:space-between;inline-size:100%;padding-inline:24px}.base:not(.icon-placement-side) .header{grid-template-columns:1fr auto;grid-template-rows:auto auto auto}.base:not(.icon-placement-side) .header .icon{font-size:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2)));grid-column:1/2;grid-row:1/2;line-height:1;margin-block-end:calc(1px*(24 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}.base.icon-placement-side .header{grid-template-columns:auto 1fr auto;grid-template-rows:auto auto}.base.icon-placement-side .header .icon{font-size:calc(1px*(28 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}.base.icon-placement-side .header ::slotted(*),.base.icon-placement-side .header .icon{grid-column:1/2;grid-row:1/-1;margin-inline-end:calc(1px*(32 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}.header.border{position:relative}.header.border:after{position:absolute;bottom:-24px;left:0;background-color:var(--vvd-color-neutral-200);block-size:1px;content:\"\";inline-size:100%}.base.hide-body .header.border:after{content:none}.body:not(.full-width){padding-inline:24px}.hide-body .body{display:none}.footer{display:flex;align-items:center;justify-content:space-between;gap:24px;padding-inline:24px}.hide-footer .footer{display:none}.footer .actions{display:flex;align-self:flex-end;gap:8px}.dismiss-button{flex-shrink:0;grid-column:-2/-1;grid-row:1/-1;margin-block-start:-8px;margin-inline:4px -8px}.headline{font:var(--vvd-typography-heading-4)}.subtitle{font:var(--vvd-typography-base)}slot[name=main]{--scrollbar-track-color: transparent;--scrollbar-thumb-color: color-mix(in srgb, var(--vvd-color-neutral-950), transparent 70%)}slot[name=main]{scrollbar-color:var(--scrollbar-thumb-color) var(--scrollbar-track-color);scrollbar-width:thin}slot[name=main] ::-webkit-scrollbar{width:4px}slot[name=main] ::-webkit-scrollbar-track{background:var(--scrollbar-track-color)}slot[name=main] ::-webkit-scrollbar-thumb{border:0;border-radius:4px;background-color:var(--scrollbar-thumb-color)}slot[name=main]{display:block;overflow:hidden auto;max-width:inherit;max-height:inherit;border-radius:inherit}";
|
|
14
13
|
|
|
15
14
|
var __defProp = Object.defineProperty;
|
|
16
15
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -286,7 +285,7 @@ const DialogTemplate = (context) => {
|
|
|
286
285
|
const iconTag = context.tagFor(Icon);
|
|
287
286
|
const buttonTag = context.tagFor(Button);
|
|
288
287
|
return html`
|
|
289
|
-
<${elevationTag} dp="8">
|
|
288
|
+
<${elevationTag} dp="8" not-relative>
|
|
290
289
|
<dialog class="${getClasses}"
|
|
291
290
|
@keydown="${(x, c) => x._onKeyDown(c.event)}"
|
|
292
291
|
@cancel="${(_, c) => c.event.preventDefault()}"
|
package/shared/definition22.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 aria = require('./aria.cjs');
|
|
6
5
|
const classNames = require('./class-names.cjs');
|
|
@@ -34,20 +33,21 @@ class Divider extends vividElement.VividElement {
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
__decorateClass([
|
|
37
|
-
|
|
36
|
+
vividElement.attr
|
|
38
37
|
], Divider.prototype, "role");
|
|
39
38
|
__decorateClass([
|
|
40
|
-
|
|
39
|
+
vividElement.attr
|
|
41
40
|
], Divider.prototype, "orientation");
|
|
42
41
|
|
|
43
42
|
const getClasses = ({ orientation }) => classNames.classNames("base", [`${orientation}`, Boolean(orientation)]);
|
|
44
|
-
const
|
|
43
|
+
const getAriaOrientation = ({ role, orientation }) => role === DividerRole.presentation ? null : orientation;
|
|
44
|
+
const DividerTemplate = vividElement.html` <span
|
|
45
45
|
class="${getClasses}"
|
|
46
|
-
orientation="${
|
|
46
|
+
aria-orientation="${getAriaOrientation}"
|
|
47
47
|
role="${(x) => x.role}"
|
|
48
48
|
></span>`;
|
|
49
49
|
|
|
50
|
-
const dividerDefinition =
|
|
50
|
+
const dividerDefinition = vividElement.defineVividComponent(
|
|
51
51
|
"divider",
|
|
52
52
|
Divider,
|
|
53
53
|
DividerTemplate,
|
|
@@ -56,7 +56,7 @@ const dividerDefinition = defineVividComponent.defineVividComponent(
|
|
|
56
56
|
styles
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
|
-
const registerDivider =
|
|
59
|
+
const registerDivider = vividElement.createRegisterFunction(dividerDefinition);
|
|
60
60
|
|
|
61
61
|
exports.Divider = Divider;
|
|
62
62
|
exports.dividerDefinition = dividerDefinition;
|
package/shared/definition22.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 { O as Orientation } from './aria.js';
|
|
4
3
|
import { c as classNames } from './class-names.js';
|
|
5
4
|
|
|
@@ -39,9 +38,10 @@ __decorateClass([
|
|
|
39
38
|
], Divider.prototype, "orientation");
|
|
40
39
|
|
|
41
40
|
const getClasses = ({ orientation }) => classNames("base", [`${orientation}`, Boolean(orientation)]);
|
|
41
|
+
const getAriaOrientation = ({ role, orientation }) => role === DividerRole.presentation ? null : orientation;
|
|
42
42
|
const DividerTemplate = html` <span
|
|
43
43
|
class="${getClasses}"
|
|
44
|
-
orientation="${
|
|
44
|
+
aria-orientation="${getAriaOrientation}"
|
|
45
45
|
role="${(x) => x.role}"
|
|
46
46
|
></span>`;
|
|
47
47
|
|
package/shared/definition23.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition27.cjs');
|
|
4
|
-
const defineVividComponent = require('./defineVividComponent.cjs');
|
|
5
4
|
const vividElement = require('./vivid-element.cjs');
|
|
6
5
|
const when = require('./when.cjs');
|
|
7
6
|
const slotted = require('./slotted.cjs');
|
|
@@ -21,19 +20,19 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
21
20
|
class EmptyState extends vividElement.VividElement {
|
|
22
21
|
}
|
|
23
22
|
__decorateClass([
|
|
24
|
-
|
|
23
|
+
vividElement.attr
|
|
25
24
|
], EmptyState.prototype, "connotation");
|
|
26
25
|
__decorateClass([
|
|
27
|
-
|
|
26
|
+
vividElement.attr
|
|
28
27
|
], EmptyState.prototype, "headline");
|
|
29
28
|
__decorateClass([
|
|
30
|
-
|
|
29
|
+
vividElement.attr
|
|
31
30
|
], EmptyState.prototype, "icon");
|
|
32
31
|
__decorateClass([
|
|
33
|
-
|
|
32
|
+
vividElement.attr({ attribute: "icon-decoration" })
|
|
34
33
|
], EmptyState.prototype, "iconDecoration");
|
|
35
34
|
__decorateClass([
|
|
36
|
-
|
|
35
|
+
vividElement.observable
|
|
37
36
|
], EmptyState.prototype, "slottedActionItems");
|
|
38
37
|
|
|
39
38
|
const getClasses = ({
|
|
@@ -48,11 +47,11 @@ const getClasses = ({
|
|
|
48
47
|
);
|
|
49
48
|
const EmptyStateTemplate = (context) => {
|
|
50
49
|
const iconTag = context.tagFor(definition.Icon);
|
|
51
|
-
return
|
|
50
|
+
return vividElement.html` <div class="${getClasses}">
|
|
52
51
|
<slot name="graphic">
|
|
53
52
|
${when.when(
|
|
54
53
|
(x) => x.icon,
|
|
55
|
-
|
|
54
|
+
vividElement.html`<div class="icon-container">
|
|
56
55
|
<${iconTag} class="icon" name="${(x) => x.icon}"></${iconTag}>
|
|
57
56
|
</div>`
|
|
58
57
|
)}
|
|
@@ -60,7 +59,7 @@ const EmptyStateTemplate = (context) => {
|
|
|
60
59
|
<div class="content">
|
|
61
60
|
${when.when(
|
|
62
61
|
(x) => x.headline,
|
|
63
|
-
|
|
62
|
+
vividElement.html`<header>${(x) => x.headline}</header>`
|
|
64
63
|
)}
|
|
65
64
|
<slot></slot>
|
|
66
65
|
</div>
|
|
@@ -70,7 +69,7 @@ const EmptyStateTemplate = (context) => {
|
|
|
70
69
|
</div>`;
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
const emptyStateDefinition =
|
|
72
|
+
const emptyStateDefinition = vividElement.defineVividComponent(
|
|
74
73
|
"empty-state",
|
|
75
74
|
EmptyState,
|
|
76
75
|
EmptyStateTemplate,
|
|
@@ -79,7 +78,7 @@ const emptyStateDefinition = defineVividComponent.defineVividComponent(
|
|
|
79
78
|
styles
|
|
80
79
|
}
|
|
81
80
|
);
|
|
82
|
-
const registerEmptyState =
|
|
81
|
+
const registerEmptyState = vividElement.createRegisterFunction(emptyStateDefinition);
|
|
83
82
|
|
|
84
83
|
exports.emptyStateDefinition = emptyStateDefinition;
|
|
85
84
|
exports.registerEmptyState = registerEmptyState;
|
package/shared/definition23.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
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 './
|
|
3
|
-
import { V as VividElement } from './vivid-element.js';
|
|
2
|
+
import { V as VividElement, a as attr, o as observable, h as html, d as defineVividComponent, f as createRegisterFunction } from './vivid-element.js';
|
|
4
3
|
import { w as when } from './when.js';
|
|
5
4
|
import { s as slotted } from './slotted.js';
|
|
6
5
|
import { c as classNames } from './class-names.js';
|