@vonage/vivid 3.32.0 → 3.35.0
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 +5 -5
- package/accordion-item/index.js +4 -4
- package/action-group/index.js +1 -1
- package/alert/index.js +6 -6
- package/avatar/index.js +2 -2
- package/badge/index.js +2 -2
- package/banner/index.js +5 -5
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +3 -3
- package/button/index.js +4 -4
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +3 -3
- package/checkbox/index.js +5 -3
- package/combobox/index.js +8 -8
- package/custom-elements.json +256 -18
- package/data-grid/index.js +2 -2
- package/date-picker/index.js +9 -9
- package/dialog/index.js +6 -6
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.js +2 -2
- package/fab/index.js +4 -4
- package/file-picker/index.js +5 -5
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/icon/index.js +1 -1
- package/index.js +59 -59
- package/layout/index.js +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/date-picker/calendar/dateStr.d.ts +1 -0
- package/lib/date-picker/calendar/month.d.ts +1 -0
- package/lib/date-picker/calendar/year.d.ts +2 -0
- package/lib/date-picker/date-picker.d.ts +2 -0
- package/lib/icon/icon.d.ts +0 -1
- package/lib/listbox/listbox.d.ts +9 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -0
- package/listbox/index.js +20 -16
- package/locales/en-GB.js +48 -14
- package/locales/en-US.js +48 -14
- package/locales/ja-JP.js +48 -14
- package/locales/zh-CN.js +48 -14
- package/menu/index.js +8 -8
- package/menu-item/index.js +4 -4
- package/nav/index.js +1 -1
- package/nav-disclosure/index.js +3 -3
- package/nav-item/index.js +3 -3
- package/note/index.js +2 -3
- package/number-field/index.js +6 -6
- package/option/index.js +3 -3
- package/package.json +2 -16
- package/pagination/index.js +5 -5
- package/popup/index.js +6 -6
- package/progress/index.js +1 -1
- package/progress-ring/index.js +1 -1
- package/radio/index.js +2 -2
- package/radio-group/index.js +1 -1
- package/select/index.js +8 -8
- package/shared/affix.js +25 -9
- package/shared/apply-mixins.js +1 -1
- package/shared/breadcrumb-item.js +5 -5
- package/shared/button.js +13 -13
- package/shared/calendar-event.js +36 -16
- package/shared/definition.js +133 -194
- package/shared/definition10.js +225 -40
- package/shared/definition11.js +36 -32
- package/shared/definition12.js +763 -98
- package/shared/definition13.js +125 -89
- package/shared/definition14.js +207 -27
- package/shared/definition15.js +710 -731
- package/shared/definition16.js +1289 -47
- package/shared/definition17.js +6113 -93
- package/shared/definition18.js +242 -164
- package/shared/definition19.js +47 -692
- package/shared/definition2.js +199 -117
- package/shared/definition20.js +59 -1671
- package/shared/definition21.js +95 -255
- package/shared/definition22.js +2218 -1167
- package/shared/definition23.js +61 -5784
- package/shared/definition24.js +28 -117
- package/shared/definition25.js +52 -66
- package/shared/definition26.js +391 -214
- package/shared/definition27.js +441 -34
- package/shared/definition28.js +85 -73
- package/shared/definition29.js +21 -2283
- package/shared/definition3.js +61 -24
- package/shared/definition30.js +13 -49
- package/shared/definition31.js +54 -39
- package/shared/definition32.js +413 -375
- package/shared/definition33.js +223 -304
- package/shared/definition34.js +197 -13
- package/shared/definition35.js +88 -73
- package/shared/definition36.js +75 -25
- package/shared/definition37.js +434 -34
- package/shared/definition38.js +32 -432
- package/shared/definition39.js +677 -187
- package/shared/definition4.js +157 -12
- package/shared/definition40.js +95 -48
- package/shared/definition41.js +577 -31
- package/shared/definition42.js +126 -424
- package/shared/definition43.js +114 -618
- package/shared/definition44.js +24 -80
- package/shared/definition45.js +71 -543
- package/shared/definition46.js +499 -92
- package/shared/definition47.js +19 -133
- package/shared/definition48.js +129 -52
- package/shared/definition49.js +281 -17
- package/shared/definition5.js +71 -36
- package/shared/definition50.js +153 -484
- package/shared/definition51.js +131 -98
- package/shared/definition52.js +131 -16
- package/shared/definition53.js +80 -264
- package/shared/definition54.js +293 -118
- package/shared/definition55.js +12 -117
- package/shared/definition56.js +39 -68
- package/shared/definition57.js +166 -288
- package/shared/definition6.js +56 -111
- package/shared/definition7.js +120 -195
- package/shared/definition8.js +58 -23
- package/shared/definition9.js +92 -66
- package/shared/focus.js +2 -1
- package/shared/focus2.js +1 -1
- package/shared/form-associated.js +2 -2
- package/shared/icon.js +48 -27
- package/shared/index.js +7 -27
- package/shared/index2.js +108 -80
- package/shared/key-codes.js +1 -1
- package/shared/listbox.js +88 -11
- package/shared/patterns/form-elements/form-elements.d.ts +4 -4
- package/shared/radio.js +23 -7
- package/shared/repeat.js +1 -1
- package/shared/text-anchor.js +21 -4
- package/shared/text-anchor.template.js +37 -40
- package/shared/text-field.js +2 -2
- package/shared/text-field2.js +15 -15
- package/shared/tree-item.js +12 -12
- package/side-drawer/index.js +1 -1
- package/slider/index.js +2 -2
- package/split-button/index.js +3 -3
- package/style.css +6106 -0
- 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 +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.js +3 -3
- package/tab/index.js +3 -3
- package/tab-panel/index.js +1 -1
- package/tabs/index.js +5 -5
- package/tag/index.js +3 -3
- package/tag-group/index.js +1 -1
- package/text-anchor/index.js +1 -1
- package/text-area/index.js +3 -3
- package/text-field/index.js +3 -3
- package/toggletip/index.js +7 -7
- package/tooltip/index.js +7 -7
- package/tree-item/index.js +3 -3
- package/tree-view/index.js +1 -1
- package/vivid.api.json +10 -1
- package/lib/accordion/index.d.ts +0 -1
- package/lib/accordion-item/index.d.ts +0 -1
- package/lib/action-group/index.d.ts +0 -1
- package/lib/alert/index.d.ts +0 -1
- package/lib/avatar/index.d.ts +0 -1
- package/lib/badge/index.d.ts +0 -1
- package/lib/banner/index.d.ts +0 -1
- package/lib/breadcrumb/index.d.ts +0 -1
- package/lib/breadcrumb-item/index.d.ts +0 -1
- package/lib/button/index.d.ts +0 -1
- package/lib/calendar/index.d.ts +0 -1
- package/lib/calendar-event/index.d.ts +0 -1
- package/lib/card/index.d.ts +0 -1
- package/lib/checkbox/index.d.ts +0 -1
- package/lib/combobox/index.d.ts +0 -1
- package/lib/data-grid/index.d.ts +0 -1
- package/lib/date-picker/index.d.ts +0 -1
- package/lib/dialog/index.d.ts +0 -1
- package/lib/divider/index.d.ts +0 -1
- package/lib/elevation/index.d.ts +0 -1
- package/lib/empty-state/index.d.ts +0 -1
- package/lib/fab/index.d.ts +0 -1
- package/lib/file-picker/index.d.ts +0 -1
- package/lib/focus/index.d.ts +0 -1
- package/lib/header/index.d.ts +0 -1
- package/lib/icon/index.d.ts +0 -1
- package/lib/layout/index.d.ts +0 -1
- package/lib/listbox/index.d.ts +0 -1
- package/lib/menu/index.d.ts +0 -1
- package/lib/menu-item/index.d.ts +0 -1
- package/lib/nav/index.d.ts +0 -1
- package/lib/nav-disclosure/index.d.ts +0 -1
- package/lib/nav-item/index.d.ts +0 -1
- package/lib/note/index.d.ts +0 -1
- package/lib/number-field/index.d.ts +0 -1
- package/lib/option/index.d.ts +0 -1
- package/lib/pagination/index.d.ts +0 -1
- package/lib/popup/index.d.ts +0 -1
- package/lib/progress/index.d.ts +0 -1
- package/lib/progress-ring/index.d.ts +0 -1
- package/lib/radio/index.d.ts +0 -1
- package/lib/radio-group/index.d.ts +0 -1
- package/lib/select/index.d.ts +0 -1
- package/lib/side-drawer/index.d.ts +0 -1
- package/lib/slider/index.d.ts +0 -1
- package/lib/split-button/index.d.ts +0 -1
- package/lib/switch/index.d.ts +0 -1
- package/lib/tab/index.d.ts +0 -1
- package/lib/tab-panel/index.d.ts +0 -1
- package/lib/tabs/index.d.ts +0 -1
- package/lib/tag/index.d.ts +0 -1
- package/lib/tag-group/index.d.ts +0 -1
- package/lib/text-anchor/index.d.ts +0 -1
- package/lib/text-area/index.d.ts +0 -1
- package/lib/text-field/index.d.ts +0 -1
- package/lib/toggletip/index.d.ts +0 -1
- package/lib/tooltip/index.d.ts +0 -1
- package/lib/tree-item/index.d.ts +0 -1
- package/lib/tree-view/index.d.ts +0 -1
package/shared/definition21.js
CHANGED
|
@@ -1,270 +1,110 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as focusRegistries } from './
|
|
4
|
-
import {
|
|
5
|
-
import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
|
|
6
|
-
import { S as StartEnd } from './start-end.js';
|
|
1
|
+
import { a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { a as iconRegistries } from './definition24.js';
|
|
3
|
+
import { f as focusRegistries } from './definition55.js';
|
|
4
|
+
import { b as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
7
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
8
|
-
import {
|
|
6
|
+
import { B as Button$1 } from './button.js';
|
|
9
7
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
10
|
-
import './
|
|
11
|
-
import { w as when } from './when.js';
|
|
8
|
+
import { r as ref } from './ref.js';
|
|
12
9
|
import { c as classNames } from './class-names.js';
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
* Determines if the element is a {@link (ListboxOption:class)}
|
|
16
|
-
*
|
|
17
|
-
* @param element - the element to test.
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
function isListboxOption(el) {
|
|
21
|
-
return (isHTMLElement(el) &&
|
|
22
|
-
(el.getAttribute("role") === "option" ||
|
|
23
|
-
el instanceof HTMLOptionElement));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* An Option Custom HTML Element.
|
|
27
|
-
* Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
|
|
28
|
-
*
|
|
29
|
-
* @slot start - Content which can be provided before the listbox option content
|
|
30
|
-
* @slot end - Content which can be provided after the listbox option content
|
|
31
|
-
* @slot - The default slot for listbox option content
|
|
32
|
-
* @csspart content - Wraps the listbox option content
|
|
33
|
-
*
|
|
34
|
-
* @public
|
|
35
|
-
*/
|
|
36
|
-
class ListboxOption$1 extends FoundationElement {
|
|
37
|
-
constructor(text, value, defaultSelected, selected) {
|
|
38
|
-
super();
|
|
39
|
-
/**
|
|
40
|
-
* The defaultSelected state of the option.
|
|
41
|
-
* @public
|
|
42
|
-
*/
|
|
43
|
-
this.defaultSelected = false;
|
|
44
|
-
/**
|
|
45
|
-
* Tracks whether the "selected" property has been changed.
|
|
46
|
-
* @internal
|
|
47
|
-
*/
|
|
48
|
-
this.dirtySelected = false;
|
|
49
|
-
/**
|
|
50
|
-
* The checked state of the control.
|
|
51
|
-
*
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
this.selected = this.defaultSelected;
|
|
55
|
-
/**
|
|
56
|
-
* Track whether the value has been changed from the initial value
|
|
57
|
-
*/
|
|
58
|
-
this.dirtyValue = false;
|
|
59
|
-
if (text) {
|
|
60
|
-
this.textContent = text;
|
|
61
|
-
}
|
|
62
|
-
if (value) {
|
|
63
|
-
this.initialValue = value;
|
|
64
|
-
}
|
|
65
|
-
if (defaultSelected) {
|
|
66
|
-
this.defaultSelected = defaultSelected;
|
|
67
|
-
}
|
|
68
|
-
if (selected) {
|
|
69
|
-
this.selected = selected;
|
|
70
|
-
}
|
|
71
|
-
this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
|
|
72
|
-
this.proxy.disabled = this.disabled;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Updates the ariaChecked property when the checked property changes.
|
|
76
|
-
*
|
|
77
|
-
* @param prev - the previous checked value
|
|
78
|
-
* @param next - the current checked value
|
|
79
|
-
*
|
|
80
|
-
* @public
|
|
81
|
-
*/
|
|
82
|
-
checkedChanged(prev, next) {
|
|
83
|
-
if (typeof next === "boolean") {
|
|
84
|
-
this.ariaChecked = next ? "true" : "false";
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
this.ariaChecked = null;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Updates the proxy's text content when the default slot changes.
|
|
91
|
-
* @param prev - the previous content value
|
|
92
|
-
* @param next - the current content value
|
|
93
|
-
*
|
|
94
|
-
* @internal
|
|
95
|
-
*/
|
|
96
|
-
contentChanged(prev, next) {
|
|
97
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
98
|
-
this.proxy.textContent = this.textContent;
|
|
99
|
-
}
|
|
100
|
-
this.$emit("contentchange", null, { bubbles: true });
|
|
101
|
-
}
|
|
102
|
-
defaultSelectedChanged() {
|
|
103
|
-
if (!this.dirtySelected) {
|
|
104
|
-
this.selected = this.defaultSelected;
|
|
105
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
106
|
-
this.proxy.selected = this.defaultSelected;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
disabledChanged(prev, next) {
|
|
111
|
-
this.ariaDisabled = this.disabled ? "true" : "false";
|
|
112
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
113
|
-
this.proxy.disabled = this.disabled;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
selectedAttributeChanged() {
|
|
117
|
-
this.defaultSelected = this.selectedAttribute;
|
|
118
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
119
|
-
this.proxy.defaultSelected = this.defaultSelected;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
selectedChanged() {
|
|
123
|
-
this.ariaSelected = this.selected ? "true" : "false";
|
|
124
|
-
if (!this.dirtySelected) {
|
|
125
|
-
this.dirtySelected = true;
|
|
126
|
-
}
|
|
127
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
128
|
-
this.proxy.selected = this.selected;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
initialValueChanged(previous, next) {
|
|
132
|
-
// If the value is clean and the component is connected to the DOM
|
|
133
|
-
// then set value equal to the attribute value.
|
|
134
|
-
if (!this.dirtyValue) {
|
|
135
|
-
this.value = this.initialValue;
|
|
136
|
-
this.dirtyValue = false;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
get label() {
|
|
140
|
-
var _a;
|
|
141
|
-
return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
|
|
142
|
-
}
|
|
143
|
-
get text() {
|
|
144
|
-
var _a, _b;
|
|
145
|
-
return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
|
|
146
|
-
}
|
|
147
|
-
set value(next) {
|
|
148
|
-
const newValue = `${next !== null && next !== void 0 ? next : ""}`;
|
|
149
|
-
this._value = newValue;
|
|
150
|
-
this.dirtyValue = true;
|
|
151
|
-
if (this.proxy instanceof HTMLOptionElement) {
|
|
152
|
-
this.proxy.value = newValue;
|
|
153
|
-
}
|
|
154
|
-
Observable.notify(this, "value");
|
|
155
|
-
}
|
|
156
|
-
get value() {
|
|
157
|
-
var _a;
|
|
158
|
-
Observable.track(this, "value");
|
|
159
|
-
return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
|
|
160
|
-
}
|
|
161
|
-
get form() {
|
|
162
|
-
return this.proxy ? this.proxy.form : null;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
__decorate([
|
|
166
|
-
observable
|
|
167
|
-
], ListboxOption$1.prototype, "checked", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
observable
|
|
170
|
-
], ListboxOption$1.prototype, "content", void 0);
|
|
171
|
-
__decorate([
|
|
172
|
-
observable
|
|
173
|
-
], ListboxOption$1.prototype, "defaultSelected", void 0);
|
|
174
|
-
__decorate([
|
|
175
|
-
attr({ mode: "boolean" })
|
|
176
|
-
], ListboxOption$1.prototype, "disabled", void 0);
|
|
177
|
-
__decorate([
|
|
178
|
-
attr({ attribute: "selected", mode: "boolean" })
|
|
179
|
-
], ListboxOption$1.prototype, "selectedAttribute", void 0);
|
|
180
|
-
__decorate([
|
|
181
|
-
observable
|
|
182
|
-
], ListboxOption$1.prototype, "selected", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
attr({ attribute: "value", mode: "fromView" })
|
|
185
|
-
], ListboxOption$1.prototype, "initialValue", void 0);
|
|
186
|
-
/**
|
|
187
|
-
* States and properties relating to the ARIA `option` role.
|
|
188
|
-
*
|
|
189
|
-
* @public
|
|
190
|
-
*/
|
|
191
|
-
class DelegatesARIAListboxOption {
|
|
192
|
-
}
|
|
193
|
-
__decorate([
|
|
194
|
-
observable
|
|
195
|
-
], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
|
|
196
|
-
__decorate([
|
|
197
|
-
observable
|
|
198
|
-
], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
|
|
199
|
-
__decorate([
|
|
200
|
-
observable
|
|
201
|
-
], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
|
|
202
|
-
__decorate([
|
|
203
|
-
observable
|
|
204
|
-
], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
|
|
205
|
-
applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
|
|
206
|
-
applyMixins(ListboxOption$1, StartEnd, DelegatesARIAListboxOption);
|
|
11
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Wed, 06 Sep 2023 09:40:36 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 /* @cssprop [--vvd-fab-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-fab-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-fab-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-fab-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-fab-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-fab-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-fab-accent-contrast=var(--vvd-color-neutral-800)] */\n --_connotation-color-contrast: var(--vvd-fab-accent-contrast, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-fab-accent-fierce=var(--vvd-color-neutral-700)] */\n --_connotation-color-fierce: var(--vvd-fab-accent-fierce, var(--vvd-color-neutral-700));\n /* @cssprop [--vvd-fab-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-fab-accent-firm, var(--vvd-color-canvas-text));\n}\n.control.connotation-cta {\n /* @cssprop [--vvd-fab-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-fab-cta-primary, var(--vvd-color-cta-500));\n /* @cssprop [--vvd-fab-cta-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-fab-cta-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-fab-cta-primary-increment=var(--vvd-color-cta-600)] */\n --_connotation-color-primary-increment: var(--vvd-fab-cta-primary-increment, var(--vvd-color-cta-600));\n /* @cssprop [--vvd-fab-cta-contrast=var(--vvd-color-cta-800)] */\n --_connotation-color-contrast: var(--vvd-fab-cta-contrast, var(--vvd-color-cta-800));\n /* @cssprop [--vvd-fab-cta-fierce=var(--vvd-color-cta-700)] */\n --_connotation-color-fierce: var(--vvd-fab-cta-fierce, var(--vvd-color-cta-700));\n /* @cssprop [--vvd-fab-cta-firm=var(--vvd-color-cta-600)] */\n --_connotation-color-firm: var(--vvd-fab-cta-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, .readonly)) {\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-300);\n --_appearance-color-fill: var(--vvd-color-neutral-100);\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-visible {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .control {\n user-select: none;\n }\n}\n.control.size-expanded {\n --_fab-border-radius: 30px;\n --_fab-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.control:not(.size-expanded) {\n --_fab-border-radius: 24px;\n --_fab-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\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 {\n line-height: 1;\n}\n.icon-trailing .icon {\n order: 1;\n}\n.control.size-extended .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16)) / 2.3333);\n}\n.control:not(.size-extended) .icon {\n font-size: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) / 2);\n}\n\n:not(:focus-visible) .focus-indicator {\n display: none;\n}\n.control:not(.connotation-accent, .connotation-cta) .focus-indicator {\n --focus-stroke-gap-color: transparent;\n}";
|
|
207
12
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
set label(value) {
|
|
221
|
-
this._label = value;
|
|
222
|
-
}
|
|
13
|
+
var __defProp = Object.defineProperty;
|
|
14
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
16
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
17
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
18
|
+
if (decorator = decorators[i])
|
|
19
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
20
|
+
if (kind && result)
|
|
21
|
+
__defProp(target, key, result);
|
|
22
|
+
return result;
|
|
23
|
+
};
|
|
24
|
+
class Fab extends Button$1 {
|
|
223
25
|
}
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
26
|
+
__decorateClass([
|
|
27
|
+
attr
|
|
28
|
+
], Fab.prototype, "connotation", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
attr
|
|
31
|
+
], Fab.prototype, "size", 2);
|
|
32
|
+
__decorateClass([
|
|
33
|
+
attr
|
|
34
|
+
], Fab.prototype, "label", 2);
|
|
35
|
+
applyMixins(Fab, AffixIconWithTrailing);
|
|
231
36
|
|
|
232
37
|
const getClasses = ({
|
|
38
|
+
connotation,
|
|
39
|
+
size,
|
|
233
40
|
icon,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}) => classNames(
|
|
238
|
-
|
|
239
|
-
|
|
41
|
+
label,
|
|
42
|
+
iconTrailing,
|
|
43
|
+
disabled
|
|
44
|
+
}) => classNames(
|
|
45
|
+
"control",
|
|
46
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
47
|
+
[`size-${size}`, Boolean(size)],
|
|
48
|
+
["icon-only", !label && !!icon],
|
|
49
|
+
["icon-trailing", iconTrailing],
|
|
50
|
+
["disabled", disabled]
|
|
51
|
+
);
|
|
52
|
+
const FabTemplate = (context) => {
|
|
53
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
240
54
|
const focusTemplate = focusTemplateFactory(context);
|
|
241
55
|
return html`
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
56
|
+
<button
|
|
57
|
+
class="${getClasses} "
|
|
58
|
+
?autofocus="${(x) => x.autofocus}"
|
|
59
|
+
?disabled="${(x) => x.disabled}"
|
|
60
|
+
form="${(x) => x.formId}"
|
|
61
|
+
formaction="${(x) => x.formaction}"
|
|
62
|
+
formenctype="${(x) => x.formenctype}"
|
|
63
|
+
formmethod="${(x) => x.formmethod}"
|
|
64
|
+
formnovalidate="${(x) => x.formnovalidate}"
|
|
65
|
+
formtarget="${(x) => x.formtarget}"
|
|
66
|
+
name="${(x) => x.name}"
|
|
67
|
+
type="${(x) => x.type}"
|
|
68
|
+
value="${(x) => x.value}"
|
|
69
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
70
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
71
|
+
aria-controls="${(x) => x.ariaControls}"
|
|
72
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
73
|
+
aria-describedby="${(x) => x.ariaDescribedby}"
|
|
74
|
+
aria-details="${(x) => x.ariaDetails}"
|
|
75
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
76
|
+
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
77
|
+
aria-expanded="${(x) => x.ariaExpanded}"
|
|
78
|
+
aria-flowto="${(x) => x.ariaFlowto}"
|
|
79
|
+
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
80
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
81
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
82
|
+
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
83
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
84
|
+
aria-labelledby="${(x) => x.ariaLabelledby}"
|
|
85
|
+
aria-live="${(x) => x.ariaLive}"
|
|
86
|
+
aria-owns="${(x) => x.ariaOwns}"
|
|
87
|
+
aria-pressed="${(x) => x.ariaPressed}"
|
|
88
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
89
|
+
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
90
|
+
${ref("control")}
|
|
91
|
+
>
|
|
92
|
+
${() => focusTemplate}
|
|
93
|
+
${(x) => affixIconTemplate(x.icon)}
|
|
94
|
+
${(x) => x.label}
|
|
95
|
+
</button>
|
|
96
|
+
`;
|
|
258
97
|
};
|
|
259
98
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
99
|
+
const fabDefinition = Fab.compose({
|
|
100
|
+
baseName: "fab",
|
|
101
|
+
template: FabTemplate,
|
|
102
|
+
styles,
|
|
103
|
+
shadowOptions: {
|
|
104
|
+
delegatesFocus: true
|
|
105
|
+
}
|
|
266
106
|
});
|
|
267
|
-
const
|
|
268
|
-
const
|
|
107
|
+
const fabRegistries = [fabDefinition(), ...iconRegistries, ...focusRegistries];
|
|
108
|
+
const registerFab = registerFactory(fabRegistries);
|
|
269
109
|
|
|
270
|
-
export {
|
|
110
|
+
export { fabRegistries as a, fabDefinition as f, registerFab as r };
|