@vonage/vivid 3.0.0-next.83 → 3.0.0-next.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/index.js +2 -9
- package/accordion-item/index.js +8 -22
- package/action-group/index.js +2 -8
- package/avatar/index.js +4 -14
- package/badge/index.js +3 -13
- package/banner/index.js +3 -26
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +5 -9
- package/calendar/index.js +12 -49
- package/calendar-event/index.js +4 -7
- package/card/index.js +9 -28
- package/checkbox/index.js +3 -11
- package/dialog/index.js +7 -59
- package/fab/index.js +2 -8
- package/focus/index.js +2 -2
- package/header/index.js +2 -7
- package/icon/index.js +2 -5
- package/index.js +1 -1
- package/layout/index.js +1 -9
- package/lib/badge/badge.d.ts +1 -3
- package/lib/components.d.ts +1 -0
- package/lib/listbox-option/index.d.ts +4 -0
- package/lib/listbox-option/listbox-option.d.ts +7 -0
- package/lib/listbox-option/listbox-option.template.d.ts +4 -0
- package/listbox-option/index.js +248 -0
- package/menu/index.js +1 -7
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +4 -11
- package/nav-item/index.js +2 -2
- package/note/index.js +4 -12
- package/number-field/index.js +24 -21
- package/package.json +12 -9
- package/popup/index.js +0 -1
- package/progress/index.js +5 -13
- package/progress-ring/index.js +4 -8
- package/radio/index.js +3 -5
- package/radio-group/index.js +3 -4
- package/shared/affix.js +1 -6
- package/shared/apply-mixins.js +5 -4
- package/shared/calendar-event.js +0 -7
- package/shared/enums.js +0 -17
- package/shared/es.object.assign.js +4 -4
- package/shared/export.js +79 -57
- package/shared/focus2.js +1 -1
- package/shared/form-associated.js +1 -1
- package/shared/form-elements.js +5 -27
- package/shared/icon.js +8 -18
- package/shared/index.js +38 -25
- package/shared/index2.js +2 -13
- package/shared/index3.js +1 -5
- package/shared/index4.js +2 -4
- package/shared/index5.js +6 -581
- package/shared/index6.js +6 -10
- package/shared/iterators.js +3 -3
- package/shared/object-keys.js +2 -2
- package/shared/patterns/form-elements/form-elements.d.ts +1 -1
- package/shared/radio.js +0 -1
- package/shared/ref.js +1 -1
- package/shared/slotted.js +1 -1
- package/shared/text-anchor.js +0 -2
- package/shared/text-anchor.template.js +1 -3
- package/shared/web.dom-collections.iterator.js +6 -8
- package/side-drawer/index.js +3 -16
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +29 -23
- package/styles/tokens/theme-light.css +29 -23
- package/text-area/index.js +3 -9
- package/text-field/index.js +4 -14
- package/tooltip/index.js +2 -10
- package/shared/regexp-flags.js +0 -21
package/dialog/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../icon/index.js';
|
|
2
2
|
import '../shared/index2.js';
|
|
3
3
|
import '../shared/index3.js';
|
|
4
|
-
import { F as FoundationElement, c as __classPrivateFieldGet,
|
|
4
|
+
import { F as FoundationElement, c as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, j as __classPrivateFieldSet, h as html, d as designSystem } from '../shared/index.js';
|
|
5
5
|
import '../shared/icon.js';
|
|
6
6
|
import '../shared/web.dom-collections.iterator.js';
|
|
7
7
|
import { w as when } from '../shared/when.js';
|
|
@@ -25,72 +25,55 @@ import '../shared/object-keys.js';
|
|
|
25
25
|
|
|
26
26
|
var css_248z$1 = "dialog {\n position: absolute;\n left: 0; right: 0;\n width: -moz-fit-content;\n width: -webkit-fit-content;\n width: fit-content;\n height: -moz-fit-content;\n height: -webkit-fit-content;\n height: fit-content;\n margin: auto;\n border: solid;\n padding: 1em;\n background: white;\n color: black;\n display: block;\n}\n\ndialog:not([open]) {\n display: none;\n}\n\ndialog + .backdrop {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n background: rgba(0,0,0,0.1);\n}\n\n._dialog_overlay {\n position: fixed;\n top: 0; right: 0; bottom: 0; left: 0;\n}\n\ndialog.fixed {\n position: fixed;\n top: 50%;\n transform: translate(0, -50%);\n}";
|
|
27
27
|
|
|
28
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
28
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 02 Nov 2022 12:59:38 GMT\n */\n.base {\n box-sizing: border-box;\n padding: 0;\n border: none;\n background: var(--_elevation-fill);\n border-radius: 6px;\n color: var(--vvd-color-canvas-text);\n max-block-size: var(--dialog-max-block-size, calc(100vh - 64px));\n max-inline-size: var(--dialog-max-inline-size);\n min-inline-size: var(--dialog-min-inline-size, 280px);\n overflow-x: hidden;\n overflow-y: auto;\n}\n@media not all and (min-width: 600px) {\n .base {\n --dialog-max-inline-size: 90vw;\n }\n}\n@media (min-width: 600px) {\n .base {\n --dialog-max-inline-size: 560px;\n }\n}\n.base:not(.modal) {\n z-index: var(--dialog-z-index, 1);\n}\n\n.main-wrapper {\n display: flex;\n flex-direction: column;\n padding: 24px;\n gap: 8px;\n}\n\n.header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 4px;\n inline-size: 100%;\n}\n\n.dismiss-button {\n flex-shrink: 0;\n margin-top: -8px;\n margin-right: -8px;\n}\n\n.headline {\n font: var(--vvd-typography-heading-4);\n}\n.headline-wrapper {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n row-gap: 24px;\n}\n\n.content {\n font: var(--vvd-typography-base);\n}";
|
|
29
29
|
|
|
30
30
|
var _Dialog_instances, _Dialog_modal, _Dialog_dialogElement, _Dialog_dialog_get, _Dialog_handleScrimClick, _Dialog_handleInternalFormSubmit, _Dialog_handleModal;
|
|
31
31
|
let dialogPolyfill;
|
|
32
|
-
|
|
33
32
|
(async () => {
|
|
34
33
|
if (!HTMLDialogElement || !HTMLDialogElement.prototype.showModal) {
|
|
35
34
|
delete window.HTMLDialogElement;
|
|
36
35
|
dialogPolyfill = await import('../shared/dialog-polyfill.esm.js');
|
|
37
36
|
}
|
|
38
37
|
})();
|
|
39
|
-
|
|
40
38
|
class Dialog extends FoundationElement {
|
|
41
39
|
constructor() {
|
|
42
40
|
super(...arguments);
|
|
43
|
-
|
|
44
41
|
_Dialog_instances.add(this);
|
|
45
|
-
|
|
46
42
|
this.open = false;
|
|
47
43
|
this.ariaLabelledBy = null;
|
|
48
44
|
this.ariaLabel = null;
|
|
49
45
|
this.ariaDescribedBy = null;
|
|
50
|
-
|
|
51
46
|
_Dialog_modal.set(this, false);
|
|
52
|
-
|
|
53
47
|
_Dialog_dialogElement.set(this, void 0);
|
|
54
|
-
|
|
55
48
|
_Dialog_handleScrimClick.set(this, event => {
|
|
56
49
|
if (event.target !== __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) {
|
|
57
50
|
return;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
52
|
const rect = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).getBoundingClientRect();
|
|
61
|
-
|
|
62
53
|
const clickedInDialog = rect.top <= event.clientY && event.clientY <= rect.top + rect.height && rect.left <= event.clientX && event.clientX <= rect.left + rect.width;
|
|
63
54
|
this.open = clickedInDialog;
|
|
64
55
|
});
|
|
65
|
-
|
|
66
56
|
_Dialog_handleInternalFormSubmit.set(this, event => {
|
|
67
57
|
if (event.target.method !== 'dialog') {
|
|
68
58
|
return;
|
|
69
59
|
}
|
|
70
|
-
|
|
71
60
|
this.open = false;
|
|
72
61
|
});
|
|
73
62
|
}
|
|
74
|
-
|
|
75
63
|
set returnValue(value) {
|
|
76
64
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).returnValue = value;
|
|
77
65
|
}
|
|
78
|
-
|
|
79
66
|
get returnValue() {
|
|
80
67
|
var _a;
|
|
81
|
-
|
|
82
68
|
return (_a = __classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get)) === null || _a === void 0 ? void 0 : _a.returnValue;
|
|
83
69
|
}
|
|
84
|
-
|
|
85
70
|
get modal() {
|
|
86
71
|
return __classPrivateFieldGet(this, _Dialog_modal, "f");
|
|
87
72
|
}
|
|
88
|
-
|
|
89
73
|
openChanged(oldValue, newValue) {
|
|
90
74
|
if (oldValue === undefined) {
|
|
91
75
|
return;
|
|
92
76
|
}
|
|
93
|
-
|
|
94
77
|
if (!newValue) {
|
|
95
78
|
this.close();
|
|
96
79
|
} else {
|
|
@@ -99,113 +82,82 @@ class Dialog extends FoundationElement {
|
|
|
99
82
|
}
|
|
100
83
|
}
|
|
101
84
|
}
|
|
102
|
-
|
|
103
85
|
close() {
|
|
104
86
|
if (__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).open) {
|
|
105
87
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).close();
|
|
106
|
-
|
|
107
88
|
this.dispatchEvent(new CustomEvent('close', {
|
|
108
89
|
bubbles: true,
|
|
109
90
|
composed: true,
|
|
110
91
|
detail: this.returnValue
|
|
111
92
|
}));
|
|
112
93
|
}
|
|
113
|
-
|
|
114
94
|
this.open = false;
|
|
115
|
-
|
|
116
95
|
__classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, false);
|
|
117
96
|
}
|
|
118
|
-
|
|
119
97
|
show() {
|
|
120
98
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).show();
|
|
121
|
-
|
|
122
99
|
this.open = true;
|
|
123
100
|
}
|
|
124
|
-
|
|
125
101
|
showModal() {
|
|
126
102
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).showModal();
|
|
127
|
-
|
|
128
103
|
this.open = true;
|
|
129
|
-
|
|
130
104
|
__classPrivateFieldGet(this, _Dialog_instances, "m", _Dialog_handleModal).call(this, true);
|
|
131
105
|
}
|
|
132
|
-
|
|
133
106
|
connectedCallback() {
|
|
134
107
|
super.connectedCallback();
|
|
135
|
-
|
|
136
108
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
|
|
137
|
-
|
|
138
109
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).addEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
|
|
139
110
|
}
|
|
140
|
-
|
|
141
111
|
disconnectedCallback() {
|
|
142
112
|
super.disconnectedCallback();
|
|
143
|
-
|
|
144
113
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('click', __classPrivateFieldGet(this, _Dialog_handleScrimClick, "f"));
|
|
145
|
-
|
|
146
114
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).removeEventListener('submit', __classPrivateFieldGet(this, _Dialog_handleInternalFormSubmit, "f"));
|
|
147
115
|
}
|
|
148
|
-
|
|
149
116
|
}
|
|
150
117
|
_Dialog_modal = new WeakMap(), _Dialog_dialogElement = new WeakMap(), _Dialog_handleScrimClick = new WeakMap(), _Dialog_handleInternalFormSubmit = new WeakMap(), _Dialog_instances = new WeakSet(), _Dialog_dialog_get = function _Dialog_dialog_get() {
|
|
151
118
|
if (!__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
|
|
152
119
|
__classPrivateFieldSet(this, _Dialog_dialogElement, this.shadowRoot.querySelector('dialog'), "f");
|
|
153
|
-
|
|
154
120
|
if (__classPrivateFieldGet(this, _Dialog_dialogElement, "f")) {
|
|
155
121
|
__classPrivateFieldGet(this, _Dialog_dialogElement, "f").open = this.open;
|
|
156
|
-
|
|
157
122
|
if (dialogPolyfill) {
|
|
158
123
|
dialogPolyfill.registerDialog(__classPrivateFieldGet(this, _Dialog_dialogElement, "f"));
|
|
159
124
|
}
|
|
160
125
|
}
|
|
161
126
|
}
|
|
162
|
-
|
|
163
127
|
return __classPrivateFieldGet(this, _Dialog_dialogElement, "f");
|
|
164
128
|
}, _Dialog_handleModal = function _Dialog_handleModal(show) {
|
|
165
129
|
__classPrivateFieldSet(this, _Dialog_modal, show, "f");
|
|
166
|
-
|
|
167
130
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).toggleAttribute('aria-modal', show);
|
|
168
|
-
|
|
169
131
|
__classPrivateFieldGet(this, _Dialog_instances, "a", _Dialog_dialog_get).classList.toggle('modal', show);
|
|
170
132
|
};
|
|
171
|
-
|
|
172
133
|
__decorate([attr({
|
|
173
134
|
mode: 'boolean'
|
|
174
135
|
}), __metadata("design:type", Object)], Dialog.prototype, "open", void 0);
|
|
175
|
-
|
|
176
136
|
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "icon", void 0);
|
|
177
|
-
|
|
178
137
|
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "text", void 0);
|
|
179
|
-
|
|
180
138
|
__decorate([attr, __metadata("design:type", String)], Dialog.prototype, "headline", void 0);
|
|
181
|
-
|
|
182
139
|
__decorate([attr({
|
|
183
140
|
attribute: 'aria-labelledby'
|
|
184
141
|
}), __metadata("design:type", Object)], Dialog.prototype, "ariaLabelledBy", void 0);
|
|
185
|
-
|
|
186
142
|
__decorate([attr({
|
|
187
143
|
attribute: 'aria-label'
|
|
188
144
|
}), __metadata("design:type", Object)], Dialog.prototype, "ariaLabel", void 0);
|
|
189
|
-
|
|
190
145
|
__decorate([attr({
|
|
191
146
|
attribute: 'aria-describedby'
|
|
192
147
|
}), __metadata("design:type", Object)], Dialog.prototype, "ariaDescribedBy", void 0);
|
|
193
148
|
|
|
194
149
|
let _2 = t => t,
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
150
|
+
_t,
|
|
151
|
+
_t2,
|
|
152
|
+
_t3,
|
|
153
|
+
_t4,
|
|
154
|
+
_t5;
|
|
201
155
|
const getClasses = _ => classNames('base');
|
|
202
|
-
|
|
203
156
|
function icon() {
|
|
204
157
|
return html(_t || (_t = _2`
|
|
205
158
|
<vwc-icon class="icon" size="large" type="${0}"></vwc-icon>
|
|
206
159
|
`), x => x.icon);
|
|
207
160
|
}
|
|
208
|
-
|
|
209
161
|
function headline() {
|
|
210
162
|
return html(_t2 || (_t2 = _2`
|
|
211
163
|
<div class="headline">
|
|
@@ -213,7 +165,6 @@ function headline() {
|
|
|
213
165
|
</div>
|
|
214
166
|
`), x => x.headline);
|
|
215
167
|
}
|
|
216
|
-
|
|
217
168
|
function renderDismissButton() {
|
|
218
169
|
return html(_t3 || (_t3 = _2`
|
|
219
170
|
<vwc-button
|
|
@@ -225,13 +176,11 @@ function renderDismissButton() {
|
|
|
225
176
|
x.open = false;
|
|
226
177
|
});
|
|
227
178
|
}
|
|
228
|
-
|
|
229
179
|
function handleEscapeKey(dialog, event) {
|
|
230
180
|
if (event.key === 'Escape' && dialog.modal) {
|
|
231
181
|
dialog.open = false;
|
|
232
182
|
}
|
|
233
183
|
}
|
|
234
|
-
|
|
235
184
|
function content() {
|
|
236
185
|
return html(_t4 || (_t4 = _2`
|
|
237
186
|
<div class="content">
|
|
@@ -239,7 +188,6 @@ function content() {
|
|
|
239
188
|
</div>
|
|
240
189
|
`), x => x.text);
|
|
241
190
|
}
|
|
242
|
-
|
|
243
191
|
const DialogTemplate = () => html(_t5 || (_t5 = _2`
|
|
244
192
|
<vwc-elevation dp="12">
|
|
245
193
|
<div>
|
package/fab/index.js
CHANGED
|
@@ -21,21 +21,16 @@ import '../shared/key-codes.js';
|
|
|
21
21
|
import '../shared/aria-global.js';
|
|
22
22
|
import '../shared/start-end.js';
|
|
23
23
|
|
|
24
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
24
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 02 Nov 2022 12:59:38 GMT\n */\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n border: 0 none;\n background: var(--_appearance-color-fill, var(--_elevation-fill));\n block-size: var(--_fab-block-size);\n border-radius: var(--_fab-border-radius);\n color: var(--_appearance-color-text, var(--vvd-color-canvas-text));\n column-gap: var(--fab-icon-gap);\n filter: var(--_elevation-shadow);\n font: var(--vvd-typography-base-bold);\n transition: background-color 0.15s linear, filter 0.15s linear;\n vertical-align: middle;\n /* Size */\n}\n.control.connotation-accent {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-neutral-800);\n --_connotation-color-contrast: var(--vvd-color-neutral-800);\n --_connotation-color-fierce: var(--vvd-color-neutral-700);\n --_connotation-color-firm: var(--vvd-color-canvas-text);\n}\n.control.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n --_connotation-color-primary-text: var(--vvd-color-canvas);\n --_connotation-color-primary-increment: var(--vvd-color-cta-600);\n --_connotation-color-contrast: var(--vvd-color-cta-800);\n --_connotation-color-fierce: var(--vvd-color-cta-700);\n --_connotation-color-firm: var(--vvd-color-cta-600);\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.control:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-400);\n --_appearance-color-fill: var(--vvd-color-neutral-200);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-fierce);\n --_appearance-color-outline: transparent;\n}\n@supports selector(:focus-visible) {\n .control:focus {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .control {\n user-select: none;\n }\n}\n.control.density-extended {\n --_fab-border-radius: 30px;\n --_fab-block-size: 56px;\n}\n.control:not(.density-extended) {\n --_fab-border-radius: 24px;\n --_fab-block-size: 40px;\n}\n.control.icon-only {\n border-radius: 50%;\n padding-inline: 0;\n place-content: center;\n}\n@supports (aspect-ratio: 1) {\n .control.icon-only {\n aspect-ratio: 1;\n }\n}\n@supports not (aspect-ratio: 1) {\n .control.icon-only {\n inline-size: var(--_fab-block-size);\n }\n}\n.control:not(.icon-only) {\n --fab-icon-gap: 10px;\n padding-inline: 20px;\n}\n.control:disabled {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n cursor: not-allowed;\n}\n.control:not(:disabled) {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n cursor: pointer;\n}\n.control:not(:disabled):hover {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control:not(:disabled):active {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n\n/* Icon */\n.icon-trailing .icon {\n order: 1;\n}\n.density-extended .icon {\n font-size: 24px;\n}\n.icon:not(.density-extended) .icon {\n font-size: 20px;\n}\n\n:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
25
25
|
|
|
26
26
|
class Fab extends Button {}
|
|
27
|
-
|
|
28
27
|
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "connotation", void 0);
|
|
29
|
-
|
|
30
28
|
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "density", void 0);
|
|
31
|
-
|
|
32
29
|
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
|
|
33
|
-
|
|
34
30
|
applyMixins(Fab, AffixIconWithTrailing);
|
|
35
31
|
|
|
36
32
|
let _ = t => t,
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
_t;
|
|
39
34
|
const getClasses = ({
|
|
40
35
|
connotation,
|
|
41
36
|
density,
|
|
@@ -44,7 +39,6 @@ const getClasses = ({
|
|
|
44
39
|
iconTrailing,
|
|
45
40
|
disabled
|
|
46
41
|
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`density-${density}`, Boolean(density)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing], ['disabled', disabled]);
|
|
47
|
-
|
|
48
42
|
const FabTemplate = context => {
|
|
49
43
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
50
44
|
const focusTemplate = focusTemplateFactory(context);
|
package/focus/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { h as html, d as designSystem } from '../shared/index.js';
|
|
2
2
|
import { F as Focus } from '../shared/focus.js';
|
|
3
3
|
|
|
4
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
4
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 02 Nov 2022 12:59:38 GMT\n */\n:host {\n display: contents;\n border-radius: inherit;\n}\n\n.control {\n position: absolute;\n z-index: 1;\n box-sizing: border-box;\n border-radius: inherit;\n box-shadow: inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);\n inset: var(--focus-inset, 0);\n outline: 2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));\n outline-offset: -2px;\n}";
|
|
5
5
|
|
|
6
6
|
let _ = t => t,
|
|
7
|
-
|
|
7
|
+
_t;
|
|
8
8
|
const focusTemplate = () => html(_t || (_t = _`
|
|
9
9
|
<span class="control"></span>`));
|
|
10
10
|
|
package/header/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import '../shared/export.js';
|
|
|
6
6
|
import '../shared/object-keys.js';
|
|
7
7
|
import '../shared/iterators.js';
|
|
8
8
|
|
|
9
|
-
var css_248z = "/**\n * Do not edit directly\n * Generated on
|
|
9
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Wed, 02 Nov 2022 12:59:38 GMT\n */\n.base {\n z-index: 1;\n block-size: var(--_header-block-size);\n font: var(--vvd-typography-heading-4);\n inline-size: 100%;\n --_header-block-size: 64px;\n}\n.base .header-content {\n display: inline-flex;\n align-items: center;\n column-gap: 4px;\n}\n\n.container {\n display: flex;\n box-sizing: border-box;\n justify-content: space-between;\n block-size: inherit;\n color: var(--vvd-color-canvas-text);\n column-gap: 12px;\n padding-block: 8px;\n padding-inline: 16px;\n}\n.container[part~=vvd-theme-alternate] {\n background-color: var(--vvd-color-canvas);\n color: var(--vvd-color-canvas-text);\n color-scheme: var(--vvd-color-scheme);\n}\n\n.app-content {\n --_header-block-size: 64px;\n}";
|
|
10
10
|
|
|
11
11
|
class Header extends FoundationElement {
|
|
12
12
|
constructor() {
|
|
@@ -14,25 +14,20 @@ class Header extends FoundationElement {
|
|
|
14
14
|
this.elevationShadow = false;
|
|
15
15
|
this.alternate = false;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
}
|
|
19
|
-
|
|
20
18
|
__decorate([attr({
|
|
21
19
|
attribute: 'elevation-shadow',
|
|
22
20
|
mode: 'boolean'
|
|
23
21
|
}), __metadata("design:type", Object)], Header.prototype, "elevationShadow", void 0);
|
|
24
|
-
|
|
25
22
|
__decorate([attr({
|
|
26
23
|
mode: 'boolean'
|
|
27
24
|
}), __metadata("design:type", Object)], Header.prototype, "alternate", void 0);
|
|
28
25
|
|
|
29
26
|
let _ = t => t,
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
_t;
|
|
32
28
|
const getPartAlternate = ({
|
|
33
29
|
alternate
|
|
34
30
|
}) => classNames(['vvd-theme-alternate', Boolean(alternate)]);
|
|
35
|
-
|
|
36
31
|
const headerTemplate = context => {
|
|
37
32
|
const elevationTag = context.tagFor(Elevation);
|
|
38
33
|
return html(_t || (_t = _`
|
package/icon/index.js
CHANGED
|
@@ -10,20 +10,17 @@ import '../shared/_has.js';
|
|
|
10
10
|
var css_248z = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n color: currentColor;\n contain: strict;\n}\n.control.connotation-accent {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n}\n.control.connotation-announcement {\n --_connotation-color-primary: var(--vvd-color-announcement-500);\n}\n.control.connotation-cta {\n --_connotation-color-primary: var(--vvd-color-cta-500);\n}\n.control.connotation-success {\n --_connotation-color-primary: var(--vvd-color-success-500);\n}\n.control.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert-500);\n}\n.control.connotation-information {\n --_connotation-color-primary: var(--vvd-color-information-500);\n}\n\n.control[class*=connotation] {\n color: var(--_connotation-color-primary);\n}\n\nsvg {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}\n\n/* Size */\n.control:not(.size-small):not(.size-medium):not(.size-large) {\n block-size: 1em;\n inline-size: 1em;\n}\n\n.control.size-small {\n block-size: 16px;\n inline-size: 16px;\n}\n\n.control.size-medium {\n block-size: 24px;\n inline-size: 24px;\n}\n\n.control.size-large {\n block-size: 32px;\n inline-size: 32px;\n}";
|
|
11
11
|
|
|
12
12
|
let _ = t => t,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
_t,
|
|
14
|
+
_t2;
|
|
16
15
|
const getClasses = ({
|
|
17
16
|
connotation,
|
|
18
17
|
size
|
|
19
18
|
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`size-${size}`, Boolean(size)]);
|
|
20
|
-
|
|
21
19
|
const iconTemplate = () => html(_t || (_t = _`
|
|
22
20
|
<figure class="${0}">
|
|
23
21
|
${0}
|
|
24
22
|
</figure>
|
|
25
23
|
`), getClasses, when(x => isValidString(x.svg), x => html(_t2 || (_t2 = _`${0}`), x.svg)));
|
|
26
|
-
|
|
27
24
|
function isValidString(value) {
|
|
28
25
|
return typeof value === 'string' && value.length > 0;
|
|
29
26
|
}
|
package/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { v as vividDivider } from './shared/index4.js';
|
|
|
17
17
|
export { vividFab } from './fab/index.js';
|
|
18
18
|
export { vividIcon } from './icon/index.js';
|
|
19
19
|
export { vividLayout } from './layout/index.js';
|
|
20
|
+
export { vividListboxOption } from './listbox-option/index.js';
|
|
20
21
|
export { vividMenu } from './menu/index.js';
|
|
21
22
|
export { v as vividMenuItem } from './shared/index6.js';
|
|
22
23
|
export { vividNav } from './nav/index.js';
|
|
@@ -61,7 +62,6 @@ import './shared/text-anchor.template.js';
|
|
|
61
62
|
import './shared/calendar-event.js';
|
|
62
63
|
import './shared/es.object.assign.js';
|
|
63
64
|
import './shared/aria.js';
|
|
64
|
-
import './shared/regexp-flags.js';
|
|
65
65
|
import './shared/direction.js';
|
|
66
66
|
import './shared/text-anchor.js';
|
|
67
67
|
import './shared/base-progress.js';
|
package/layout/index.js
CHANGED
|
@@ -2,24 +2,18 @@ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h
|
|
|
2
2
|
import { c as classNames } from '../shared/class-names.js';
|
|
3
3
|
|
|
4
4
|
var AUTO_SIZING;
|
|
5
|
-
|
|
6
5
|
(function (AUTO_SIZING) {
|
|
7
6
|
AUTO_SIZING["Fit"] = "fit";
|
|
8
7
|
AUTO_SIZING["Fill"] = "fill";
|
|
9
8
|
})(AUTO_SIZING || (AUTO_SIZING = {}));
|
|
10
|
-
|
|
11
9
|
class Layout extends FoundationElement {}
|
|
12
|
-
|
|
13
10
|
__decorate([attr, __metadata("design:type", String)], Layout.prototype, "gutters", void 0);
|
|
14
|
-
|
|
15
11
|
__decorate([attr({
|
|
16
12
|
attribute: 'column-basis'
|
|
17
13
|
}), __metadata("design:type", String)], Layout.prototype, "columnBasis", void 0);
|
|
18
|
-
|
|
19
14
|
__decorate([attr({
|
|
20
15
|
attribute: 'column-spacing'
|
|
21
16
|
}), __metadata("design:type", String)], Layout.prototype, "columnSpacing", void 0);
|
|
22
|
-
|
|
23
17
|
__decorate([attr({
|
|
24
18
|
attribute: 'auto-sizing'
|
|
25
19
|
}), __metadata("design:type", String)], Layout.prototype, "autoSizing", void 0);
|
|
@@ -27,15 +21,13 @@ __decorate([attr({
|
|
|
27
21
|
var css_248z = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: min-content;\n}\n.control.column-basis-small {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(160px, 1fr)));\n}\n.control:not(.column-basis-small):not(.column-basis-medium):not(.column-basis-large):not(.column-basis-block), .control.column-basis-medium {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(320px, 1fr)));\n}\n.control.column-basis-large {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(380px, 1fr)));\n}\n.control.column-basis-block {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(1fr, 1fr)));\n}\n.control.column-spacing-small {\n gap: 16px;\n}\n.control.column-spacing-small-inline {\n gap: 0 16px;\n}\n.control.column-spacing-small-block {\n gap: 16px 0;\n}\n.control:not(.column-spacing-small):not(.column-spacing-small-inline):not(.column-spacing-small-block):not(.column-spacing-medium):not(.column-spacing-medium-inline):not(.column-spacing-medium-block):not(.column-spacing-large):not(.column-spacing-large-inline):not(.column-spacing-large-block), .control.column-spacing-medium {\n gap: 24px;\n}\n.control.column-spacing-medium-inline {\n gap: 0 24px;\n}\n.control.column-spacing-medium-block {\n gap: 24px 0;\n}\n.control.column-spacing-large {\n gap: 32px;\n}\n.control.column-spacing-large-inline {\n gap: 0 32px;\n}\n.control.column-spacing-large-block {\n gap: 32px 0;\n}\n.control.gutters-small {\n margin: 16px;\n}\n.control.gutters-small-inline {\n margin: 0 16px;\n}\n.control.gutters-small-block {\n margin: 16px 0;\n}\n.control.gutters-medium {\n margin: 24px;\n}\n.control.gutters-medium-inline {\n margin: 0 24px;\n}\n.control.gutters-medium-block {\n margin: 24px 0;\n}\n.control.gutters-large {\n margin: 32px;\n}\n.control.gutters-large-inline {\n margin: 0 32px;\n}\n.control.gutters-large-block {\n margin: 32px 0;\n}\n.control.auto-sizing-fill {\n --_auto-sizing: auto-fill;\n}\n.control:not(.auto-sizing-fill):not(.auto-sizing-fit), .control.auto-sizing-fit {\n --_auto-sizing: auto-fit;\n}";
|
|
28
22
|
|
|
29
23
|
let _ = t => t,
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
_t;
|
|
32
25
|
const getClasses = ({
|
|
33
26
|
columnBasis,
|
|
34
27
|
gutters,
|
|
35
28
|
columnSpacing,
|
|
36
29
|
autoSizing
|
|
37
30
|
}) => classNames('control', [`column-basis-${columnBasis}`, Boolean(columnBasis)], [`gutters-${gutters}`, Boolean(gutters)], [`column-spacing-${columnSpacing}`, Boolean(columnSpacing)], [`auto-sizing-${autoSizing}`, Boolean(autoSizing)]);
|
|
38
|
-
|
|
39
31
|
const layoutTemplate = () => html(_t || (_t = _`
|
|
40
32
|
<div class="${0}">
|
|
41
33
|
<slot></slot>
|
package/lib/badge/badge.d.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
3
|
-
import type { Appearance, Connotation,
|
|
3
|
+
import type { Appearance, Connotation, Shape } from '../enums.js';
|
|
4
4
|
declare type BadgeConnotation = Extract<Connotation, Connotation.Accent | Connotation.CTA | Connotation.Success | Connotation.Alert | Connotation.Warning | Connotation.Information>;
|
|
5
5
|
declare type BadgeAppearance = Extract<Appearance, Appearance.Filled | Appearance.Duotone | Appearance.Subtle>;
|
|
6
6
|
declare type BadgeShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
|
|
7
|
-
declare type BadgeDensity = Extract<Density, Density.Condensed | Density.Normal | Density.Extended>;
|
|
8
7
|
export declare class Badge extends FoundationElement {
|
|
9
8
|
connotation?: BadgeConnotation;
|
|
10
9
|
shape?: BadgeShape;
|
|
11
10
|
appearance?: BadgeAppearance;
|
|
12
|
-
density?: BadgeDensity;
|
|
13
11
|
text?: string;
|
|
14
12
|
}
|
|
15
13
|
export interface Badge extends AffixIconWithTrailing {
|
package/lib/components.d.ts
CHANGED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../icon';
|
|
2
|
+
import '../focus';
|
|
3
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
4
|
+
export declare const vividListboxOption: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListboxOption as FoundationListboxOption } from '@microsoft/fast-foundation';
|
|
2
|
+
import { AffixIconWithTrailing } from '../../shared/patterns/affix';
|
|
3
|
+
export declare class ListboxOption extends FoundationListboxOption {
|
|
4
|
+
optionText?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ListboxOption extends AffixIconWithTrailing {
|
|
7
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { ListboxOption } from './listbox-option';
|
|
4
|
+
export declare const ListboxOptionTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<ListboxOption>;
|