@vonage/vivid 3.39.0 → 3.41.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 +2 -2
- package/accordion-item/index.js +2 -2
- package/alert/index.js +7 -5
- package/audio-player/index.js +33 -0
- package/avatar/index.js +2 -2
- package/badge/index.js +2 -2
- package/banner/index.js +9 -5
- package/breadcrumb/index.js +1 -1
- package/breadcrumb-item/index.js +3 -3
- package/button/index.js +5 -4
- package/calendar/index.js +1 -1
- package/calendar-event/index.js +1 -1
- package/card/index.js +4 -3
- package/checkbox/index.js +3 -3
- package/combobox/index.js +9 -7
- package/custom-elements.json +809 -5
- package/data-grid/index.js +3 -2
- package/date-picker/index.js +11 -9
- package/date-range-picker/index.js +11 -9
- package/dialog/index.js +10 -6
- package/divider/index.js +1 -1
- package/elevation/index.js +1 -1
- package/empty-state/index.js +2 -2
- package/fab/index.js +3 -3
- package/file-picker/index.js +6 -5
- package/focus/index.js +1 -1
- package/header/index.js +2 -2
- package/icon/index.js +1 -1
- package/index.js +60 -55
- package/layout/index.js +1 -1
- package/lib/alert/alert.d.ts +3 -1
- package/lib/alert/locale.d.ts +3 -0
- package/lib/audio-player/audio-player.d.ts +17 -0
- package/lib/audio-player/audio-player.template.d.ts +4 -0
- package/lib/audio-player/definition.d.ts +4 -0
- package/lib/audio-player/locale.d.ts +5 -0
- package/lib/banner/banner.d.ts +3 -1
- package/lib/banner/locale.d.ts +3 -0
- package/lib/card/card.d.ts +3 -0
- package/lib/card/card.template.d.ts +1 -1
- package/lib/card/definition.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +2 -0
- package/lib/components.d.ts +2 -0
- package/lib/dialog/dialog.d.ts +4 -0
- package/lib/dialog/locale.d.ts +3 -0
- package/lib/enums.d.ts +2 -1
- package/lib/menu/menu.d.ts +1 -0
- package/lib/number-field/locale.d.ts +4 -0
- package/lib/number-field/number-field.d.ts +4 -2
- package/lib/progress/progress.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +1 -0
- package/lib/radio/radio.d.ts +1 -0
- package/lib/selectable-box/definition.d.ts +3 -0
- package/lib/selectable-box/selectable-box.d.ts +12 -0
- package/lib/selectable-box/selectable-box.template.d.ts +4 -0
- package/lib/slider/definition.d.ts +1 -0
- package/lib/slider/slider.d.ts +5 -0
- package/lib/split-button/locale.d.ts +3 -0
- package/lib/split-button/split-button.d.ts +3 -1
- package/lib/text-area/text-area.d.ts +3 -0
- package/lib/text-field/text-field.d.ts +5 -2
- package/listbox/index.js +5 -4
- package/locales/en-GB.js +21 -0
- package/locales/en-US.js +21 -0
- package/locales/ja-JP.js +21 -0
- package/locales/zh-CN.js +21 -0
- package/menu/index.js +9 -8
- package/menu-item/index.js +3 -3
- 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 -2
- package/number-field/index.js +8 -6
- package/option/index.js +3 -3
- package/package.json +1 -1
- package/pagination/index.js +6 -5
- package/popup/index.js +7 -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 +2 -2
- package/select/index.js +10 -8
- package/selectable-box/index.js +23 -0
- package/shared/Reflector.js +65 -0
- package/shared/date-picker/calendar/segment.d.ts +21 -0
- package/shared/date-picker/date-picker-base.d.ts +1 -0
- package/shared/definition.js +3 -3
- package/shared/definition10.js +89 -227
- package/shared/definition11.js +151 -29
- package/shared/definition12.js +37 -766
- package/shared/definition13.js +747 -106
- package/shared/definition14.js +122 -192
- package/shared/definition15.js +156 -664
- package/shared/definition16.js +576 -1123
- package/shared/definition17.js +1278 -143
- package/shared/definition18.js +64 -298
- package/shared/definition19.js +358 -211
- package/shared/definition2.js +2 -2
- package/shared/definition20.js +259 -67
- package/shared/definition21.js +66 -58
- package/shared/definition22.js +43 -84
- package/shared/definition23.js +76 -2352
- package/shared/definition24.js +2362 -45
- package/shared/definition25.js +63 -27
- package/shared/definition26.js +24 -51
- package/shared/definition27.js +36 -813
- package/shared/definition28.js +837 -49
- package/shared/definition29.js +52 -89
- package/shared/definition3.js +1 -1
- package/shared/definition30.js +88 -24
- package/shared/definition31.js +25 -12
- package/shared/definition32.js +12 -52
- package/shared/definition33.js +28 -487
- package/shared/definition34.js +442 -197
- package/shared/definition35.js +260 -185
- package/shared/definition36.js +188 -69
- package/shared/definition37.js +72 -52
- package/shared/definition38.js +65 -421
- package/shared/definition39.js +435 -35
- package/shared/definition4.js +44 -16
- package/shared/definition40.js +32 -680
- package/shared/definition41.js +661 -77
- package/shared/definition42.js +103 -555
- package/shared/definition43.js +76 -103
- package/shared/definition44.js +522 -87
- package/shared/definition45.js +133 -22
- package/shared/definition46.js +131 -58
- package/shared/definition47.js +16 -501
- package/shared/definition48.js +69 -23
- package/shared/definition49.js +477 -108
- package/shared/definition5.js +160 -44
- package/shared/definition50.js +25 -271
- package/shared/definition51.js +103 -122
- package/shared/definition52.js +277 -122
- package/shared/definition53.js +274 -103
- package/shared/definition54.js +126 -71
- package/shared/definition55.js +128 -294
- package/shared/definition56.js +91 -13
- package/shared/definition57.js +298 -39
- package/shared/definition58.js +11 -175
- package/shared/definition59.js +47 -0
- package/shared/definition6.js +43 -33
- package/shared/definition60.js +181 -0
- package/shared/definition7.js +39 -105
- package/shared/definition8.js +122 -38
- package/shared/definition9.js +56 -89
- package/shared/enums.js +72 -0
- package/shared/icon.js +2 -2
- package/shared/index2.js +28 -1
- package/shared/key-codes.js +1 -1
- package/shared/key-codes2.js +9 -0
- package/shared/listbox.js +3 -8
- package/shared/localization/Locale.d.ts +12 -0
- package/shared/patterns/form-elements/form-elements.d.ts +6 -6
- package/shared/presentationDate.js +196 -143
- package/shared/radio.js +7 -0
- package/shared/text-field.js +1 -1
- package/shared/utils/Reflector.d.ts +8 -0
- package/shared/utils/randomId.d.ts +1 -0
- package/side-drawer/index.js +1 -1
- package/slider/index.js +3 -3
- package/split-button/index.js +6 -3
- package/style.css +889 -722
- 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-area/index.js +4 -3
- package/text-field/index.js +4 -3
- package/toggletip/index.js +8 -7
- package/tooltip/index.js +8 -7
- package/tree-item/index.js +3 -3
- package/tree-view/index.js +1 -1
- package/vivid.api.json +392 -0
package/shared/definition51.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import { a as attr,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { A as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
-
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './index2.js';
|
|
6
|
-
import { T as TextField$1 } from './text-field2.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { a as iconRegistries } from './definition26.js';
|
|
3
|
+
import { f as focusRegistries } from './definition58.js';
|
|
4
|
+
import { A as AffixIcon, a as affixIconTemplateFactory, I as IconWrapper } from './affix.js';
|
|
7
5
|
import { a as applyMixins } from './apply-mixins.js';
|
|
8
|
-
import { s as styles } from './text-field.js';
|
|
9
6
|
import { f as focusTemplateFactory } from './focus2.js';
|
|
7
|
+
import { I as Icon } from './icon.js';
|
|
10
8
|
import { w as when } from './when.js';
|
|
11
|
-
import { s as slotted } from './slotted.js';
|
|
12
|
-
import { r as ref } from './ref.js';
|
|
13
9
|
import { c as classNames } from './class-names.js';
|
|
14
10
|
|
|
15
11
|
var __defProp = Object.defineProperty;
|
|
@@ -23,144 +19,129 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
23
19
|
__defProp(target, key, result);
|
|
24
20
|
return result;
|
|
25
21
|
};
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
class Tag extends FoundationElement {
|
|
23
|
+
constructor() {
|
|
24
|
+
super(...arguments);
|
|
25
|
+
this.removable = false;
|
|
26
|
+
this.disabled = false;
|
|
27
|
+
this.selectable = false;
|
|
28
|
+
this.selected = false;
|
|
29
|
+
this.#select = () => {
|
|
30
|
+
if (!this.selectable || this.disabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
this.selected = !this.selected;
|
|
34
|
+
this.$emit("selected-change");
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
remove() {
|
|
38
|
+
if (!this.removable || this.selectable) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.$emit("removed");
|
|
42
|
+
this.parentElement && this.parentElement.removeChild(this);
|
|
43
|
+
}
|
|
44
|
+
#select;
|
|
45
|
+
handleKeydown(e) {
|
|
46
|
+
if (e.key === "Enter") {
|
|
47
|
+
this.#select();
|
|
48
|
+
}
|
|
49
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
50
|
+
this.remove();
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
handleClick() {
|
|
55
|
+
this.#select();
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
__decorateClass([
|
|
59
|
+
attr
|
|
60
|
+
], Tag.prototype, "connotation", 2);
|
|
28
61
|
__decorateClass([
|
|
29
62
|
attr
|
|
30
|
-
],
|
|
63
|
+
], Tag.prototype, "shape", 2);
|
|
31
64
|
__decorateClass([
|
|
32
65
|
attr
|
|
33
|
-
],
|
|
66
|
+
], Tag.prototype, "appearance", 2);
|
|
34
67
|
__decorateClass([
|
|
35
68
|
attr
|
|
36
|
-
],
|
|
69
|
+
], Tag.prototype, "label", 2);
|
|
70
|
+
__decorateClass([
|
|
71
|
+
attr({ mode: "boolean" })
|
|
72
|
+
], Tag.prototype, "removable", 2);
|
|
37
73
|
__decorateClass([
|
|
38
|
-
|
|
39
|
-
],
|
|
74
|
+
attr({ mode: "boolean" })
|
|
75
|
+
], Tag.prototype, "disabled", 2);
|
|
40
76
|
__decorateClass([
|
|
41
|
-
|
|
42
|
-
],
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
applyMixins(TextField, AffixIcon, FormElementCharCount, FormElementHelperText, FormElementSuccessText);
|
|
77
|
+
attr({ mode: "boolean" })
|
|
78
|
+
], Tag.prototype, "selectable", 2);
|
|
79
|
+
__decorateClass([
|
|
80
|
+
attr({ mode: "boolean" })
|
|
81
|
+
], Tag.prototype, "selected", 2);
|
|
82
|
+
applyMixins(Tag, AffixIcon);
|
|
48
83
|
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
readOnly,
|
|
54
|
-
placeholder,
|
|
84
|
+
const styles = "/**\n * Do not edit directly\n * Generated on Wed, 22 Nov 2023 16:09:43 GMT\n */\n.base {\n --tag-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n block-size: var(--tag-block-size);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n column-gap: 8px;\n font: var(--vvd-typography-base-bold);\n max-inline-size: 100%;\n padding-inline: 8px;\n vertical-align: middle;\n /* Shape */\n}\n.base.connotation-cta {\n /* @cssprop [--vvd-tag-cta-contrast=var(--vvd-color-cta-800)] */\n --_connotation-color-contrast: var(--vvd-tag-cta-contrast, var(--vvd-color-cta-800));\n /* @cssprop [--vvd-tag-cta-soft=var(--vvd-color-cta-100)] */\n --_connotation-color-soft: var(--vvd-tag-cta-soft, var(--vvd-color-cta-100));\n /* @cssprop [--vvd-tag-cta-pale=var(--vvd-color-cta-300)] */\n --_connotation-color-pale: var(--vvd-tag-cta-pale, var(--vvd-color-cta-300));\n /* @cssprop [--vvd-tag-cta-fierce=var(--vvd-color-cta-700)] */\n --_connotation-color-fierce: var(--vvd-tag-cta-fierce, var(--vvd-color-cta-700));\n /* @cssprop [--vvd-tag-cta-firm=var(--vvd-color-cta-600)] */\n --_connotation-color-firm: var(--vvd-tag-cta-firm, var(--vvd-color-cta-600));\n /* @cssprop [--vvd-tag-cta-faint=var(--vvd-color-cta-50)] */\n --_connotation-color-faint: var(--vvd-tag-cta-faint, var(--vvd-color-cta-50));\n /* @cssprop [--vvd-tag-cta-dim=var(--vvd-color-cta-200)] */\n --_connotation-color-dim: var(--vvd-tag-cta-dim, var(--vvd-color-cta-200));\n}\n.base:not(.connotation-cta) {\n /* @cssprop [--vvd-tag-accent-contrast=var(--vvd-color-neutral-800)] */\n --_connotation-color-contrast: var(--vvd-tag-accent-contrast, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-tag-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-tag-accent-soft, var(--vvd-color-neutral-100));\n /* @cssprop [--vvd-tag-accent-pale=var(--vvd-color-neutral-300)] */\n --_connotation-color-pale: var(--vvd-tag-accent-pale, var(--vvd-color-neutral-300));\n /* @cssprop [--vvd-tag-accent-fierce=var(--vvd-color-neutral-700)] */\n --_connotation-color-fierce: var(--vvd-tag-accent-fierce, var(--vvd-color-neutral-700));\n /* @cssprop [--vvd-tag-accent-firm=var(--vvd-color-canvas-text)] */\n --_connotation-color-firm: var(--vvd-tag-accent-firm, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-tag-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-tag-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-tag-accent-dim=var(--vvd-color-neutral-200)] */\n --_connotation-color-dim: var(--vvd-tag-accent-dim, var(--vvd-color-neutral-200));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base.appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)).appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--_connotation-color-firm);\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-dim);\n --_appearance-color-outline: transparent;\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)).appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base: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.base:where(:disabled, .disabled).appearance-duotone {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: var(--vvd-color-neutral-100);\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-contrast);\n --_appearance-color-fill: var(--_connotation-color-pale);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)).appearance-duotone {\n --_appearance-color-text: var(--_connotation-color-fierce);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: var(--_connotation-color-pale);\n}\n.base:not(.shape-pill) {\n border-radius: 4px;\n}\n.base.shape-pill {\n border-radius: 14px;\n}\n@supports selector(:focus-visible) {\n .base:focus-visible {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n cursor: pointer;\n}\n.base.disabled {\n cursor: not-allowed;\n pointer-events: none;\n}\n.base.removable {\n cursor: auto;\n}\n\n.label {\n overflow: hidden;\n max-inline-size: 100%;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\nslot[name=icon] {\n font-size: calc(var(--tag-block-size) / 1.5);\n line-height: 1;\n}\n\n.dismiss-button {\n display: flex;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: inherit;\n cursor: pointer;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n}\n.base:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
85
|
+
|
|
86
|
+
const getClasses = ({
|
|
87
|
+
connotation,
|
|
55
88
|
appearance,
|
|
56
89
|
shape,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
icon
|
|
90
|
+
disabled,
|
|
91
|
+
selectable,
|
|
92
|
+
removable,
|
|
93
|
+
selected
|
|
62
94
|
}) => classNames(
|
|
63
|
-
|
|
95
|
+
"base",
|
|
64
96
|
["disabled", disabled],
|
|
65
|
-
["
|
|
66
|
-
["
|
|
67
|
-
["
|
|
97
|
+
["selectable", selectable],
|
|
98
|
+
["active", selectable && selected],
|
|
99
|
+
["removable", removable && !selectable],
|
|
100
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
68
101
|
[`appearance-${appearance}`, Boolean(appearance)],
|
|
69
|
-
[`shape-${shape}`, Boolean(shape)]
|
|
70
|
-
["no-label", !label],
|
|
71
|
-
["has-icon", !!icon],
|
|
72
|
-
["success connotation-success", Boolean(successText)],
|
|
73
|
-
["action-items", !!actionItemsSlottedContent?.length],
|
|
74
|
-
["leading-action-items", !!leadingActionItemsSlottedContent?.length],
|
|
75
|
-
["no-leading", !(leadingActionItemsSlottedContent?.length || icon)]
|
|
102
|
+
[`shape-${shape}`, Boolean(shape)]
|
|
76
103
|
);
|
|
77
|
-
function
|
|
104
|
+
function renderDismissButton(iconTag) {
|
|
78
105
|
return html`
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
106
|
+
<span
|
|
107
|
+
aria-hidden="true"
|
|
108
|
+
class="dismiss-button"
|
|
109
|
+
@click="${(x) => x.remove()}">
|
|
110
|
+
<${iconTag} name="close-line"></${iconTag}>
|
|
111
|
+
</span>`;
|
|
82
112
|
}
|
|
83
|
-
|
|
84
|
-
return html`
|
|
85
|
-
<span class="char-count">${(x) => x.value ? x.value.length : 0} / ${(x) => x.maxlength}</span>
|
|
86
|
-
`;
|
|
87
|
-
}
|
|
88
|
-
const TextfieldTemplate = (context) => {
|
|
113
|
+
const tagTemplate = (context) => {
|
|
89
114
|
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
115
|
+
const iconTag = context.tagFor(Icon);
|
|
90
116
|
const focusTemplate = focusTemplateFactory(context);
|
|
91
117
|
return html`
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
list="${(x) => x.list}"
|
|
109
|
-
maxlength="${(x) => x.maxlength}"
|
|
110
|
-
minlength="${(x) => x.minlength}"
|
|
111
|
-
pattern="${(x) => x.pattern}"
|
|
112
|
-
placeholder="${(x) => x.placeholder}"
|
|
113
|
-
?readonly="${(x) => x.readOnly}"
|
|
114
|
-
?required="${(x) => x.required}"
|
|
115
|
-
size="${(x) => x.size}"
|
|
116
|
-
autocomplete="${(x) => x.autoComplete}"
|
|
117
|
-
name="${(x) => x.name}"
|
|
118
|
-
?spellcheck="${(x) => x.spellcheck}"
|
|
119
|
-
:value="${(x) => x.value}"
|
|
120
|
-
type="${(x) => x.type}"
|
|
121
|
-
aria-atomic="${(x) => x.ariaAtomic}"
|
|
122
|
-
aria-busy="${(x) => x.ariaBusy}"
|
|
123
|
-
aria-controls="${(x) => x.ariaControls}"
|
|
124
|
-
aria-current="${(x) => x.ariaCurrent}"
|
|
125
|
-
aria-describedby="${(x) => x.ariaDescribedby}"
|
|
126
|
-
aria-details="${(x) => x.ariaDetails}"
|
|
127
|
-
aria-disabled="${(x) => x.ariaDisabled}"
|
|
128
|
-
aria-errormessage="${(x) => x.ariaErrormessage}"
|
|
129
|
-
aria-flowto="${(x) => x.ariaFlowto}"
|
|
130
|
-
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
131
|
-
aria-hidden="${(x) => x.ariaHidden}"
|
|
132
|
-
aria-invalid="${(x) => x.ariaInvalid}"
|
|
133
|
-
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
134
|
-
aria-label="${(x) => x.ariaLabel}"
|
|
135
|
-
aria-labelledby="${(x) => x.ariaLabelledby}"
|
|
136
|
-
aria-live="${(x) => x.ariaLive}"
|
|
137
|
-
aria-owns="${(x) => x.ariaOwns}"
|
|
138
|
-
aria-relevant="${(x) => x.ariaRelevant}"
|
|
139
|
-
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
140
|
-
${ref("control")}
|
|
141
|
-
/>
|
|
142
|
-
${() => focusTemplate}
|
|
143
|
-
</div>
|
|
144
|
-
<div class="action-items-wrapper">
|
|
145
|
-
<slot name="action-items" ${slotted("actionItemsSlottedContent")}></slot>
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
</div>
|
|
149
|
-
${when((x) => !x.successText && !x.errorValidationMessage && x.helperText?.length, getFeedbackTemplate("helper", context))}
|
|
150
|
-
${when((x) => !x.successText && x.errorValidationMessage, getFeedbackTemplate("error", context))}
|
|
151
|
-
${when((x) => x.successText, getFeedbackTemplate("success", context))}
|
|
152
|
-
</div>`;
|
|
118
|
+
<span class="${getClasses}"
|
|
119
|
+
role="option"
|
|
120
|
+
aria-disabled="${(x) => x.disabled}"
|
|
121
|
+
aria-selected="${(x) => x.selectable}"
|
|
122
|
+
tabindex="${(x) => x.disabled ? null : 0}"
|
|
123
|
+
@keydown="${(x, c) => x.handleKeydown(c.event)}"
|
|
124
|
+
@click="${(x) => x.handleClick()}">
|
|
125
|
+
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
|
|
126
|
+
${when((x) => x.label, (x) => html`<span class="label">${x.label}</span>`)}
|
|
127
|
+
${when((x) => x.removable && !x.selectable, renderDismissButton(iconTag))}
|
|
128
|
+
${when(
|
|
129
|
+
(x) => x.selectable && x.selected,
|
|
130
|
+
html`<${iconTag} class="selectable-icon" name="check-circle-solid"></${iconTag}>`
|
|
131
|
+
)}
|
|
132
|
+
${() => focusTemplate}
|
|
133
|
+
</span>`;
|
|
153
134
|
};
|
|
154
135
|
|
|
155
|
-
const
|
|
156
|
-
baseName: "
|
|
157
|
-
template:
|
|
136
|
+
const tagDefinition = Tag.compose({
|
|
137
|
+
baseName: "tag",
|
|
138
|
+
template: tagTemplate,
|
|
158
139
|
styles,
|
|
159
140
|
shadowOptions: {
|
|
160
141
|
delegatesFocus: true
|
|
161
142
|
}
|
|
162
143
|
});
|
|
163
|
-
const
|
|
164
|
-
const
|
|
144
|
+
const tagRegistries = [tagDefinition(), ...iconRegistries, ...focusRegistries];
|
|
145
|
+
const registerTag = registerFactory(tagRegistries);
|
|
165
146
|
|
|
166
|
-
export {
|
|
147
|
+
export { registerTag as r, tagDefinition as t };
|