@vonage/vivid 3.32.0 → 3.34.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 +246 -16
- 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/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/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 +6097 -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/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/definition24.js
CHANGED
|
@@ -1,124 +1,35 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { i as iconRegistries } from './definition3.js';
|
|
4
|
-
import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
-
import './focus.js';
|
|
6
|
-
import { e as errorText, f as formElements, F as FormElementSuccessText, a as FormElementHelperText, b as FormElementCharCount, g as getFeedbackTemplate } from './index2.js';
|
|
7
|
-
import { T as TextField$1 } from './text-field2.js';
|
|
8
|
-
import { a as applyMixins } from './apply-mixins.js';
|
|
9
|
-
import { c as css_248z } from './text-field.js';
|
|
10
|
-
import { f as focusTemplateFactory } from './focus2.js';
|
|
11
|
-
import { w as when } from './when.js';
|
|
12
|
-
import { r as ref } from './ref.js';
|
|
13
|
-
import { s as slotted } from './slotted.js';
|
|
1
|
+
import { h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { I as Icon } from './icon.js';
|
|
14
3
|
import { c as classNames } from './class-names.js';
|
|
4
|
+
import { w as when } from './when.js';
|
|
5
|
+
|
|
6
|
+
const styles = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n block-size: var(--_icon-block-size);\n color: currentColor;\n contain: strict;\n inline-size: var(--_icon-block-size);\n}\n.control.connotation-accent {\n /* @cssprop [--vvd-icon-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-icon-accent-primary, var(--vvd-color-canvas-text));\n}\n.control.connotation-announcement {\n /* @cssprop [--vvd-icon-announcement-primary=var(--vvd-color-announcement-500)] */\n --_connotation-color-primary: var(--vvd-icon-announcement-primary, var(--vvd-color-announcement-500));\n}\n.control.connotation-cta {\n /* @cssprop [--vvd-icon-cta-primary=var(--vvd-color-cta-500)] */\n --_connotation-color-primary: var(--vvd-icon-cta-primary, var(--vvd-color-cta-500));\n}\n.control.connotation-success {\n /* @cssprop [--vvd-icon-success-primary=var(--vvd-color-success-500)] */\n --_connotation-color-primary: var(--vvd-icon-success-primary, var(--vvd-color-success-500));\n}\n.control.connotation-alert {\n /* @cssprop [--vvd-icon-alert-primary=var(--vvd-color-alert-500)] */\n --_connotation-color-primary: var(--vvd-icon-alert-primary, var(--vvd-color-alert-500));\n}\n.control.connotation-information {\n /* @cssprop [--vvd-icon-information-primary=var(--vvd-color-information-500)] */\n --_connotation-color-primary: var(--vvd-icon-information-primary, var(--vvd-color-information-500));\n}\n.control.size--6 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)) - 1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 20));\n}\n.control.size--4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.size--3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 12));\n}\n.control.size--2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.size--1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 4));\n}\n.control.size-0 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}\n.control.size-1 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 4));\n}\n.control.size-2 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 8));\n}\n.control.size-3 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 12));\n}\n.control.size-4 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 16));\n}\n.control.size-5 {\n --_icon-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) + 20));\n}\n.control:not(.size--6, .size--5, .size--4, .size--3, .size--2, .size--1, .size-0, .size-1, .size-2, .size-3, .size-4, .size-5) {\n --_icon-block-size: 1em;\n}\n\n.control[class*=connotation] {\n color: var(--_connotation-color-primary);\n}\n\nslot, svg, ::slotted(:where(svg, img)) {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}";
|
|
15
7
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
const getClasses = ({
|
|
9
|
+
connotation,
|
|
10
|
+
size
|
|
11
|
+
}) => classNames(
|
|
12
|
+
"control",
|
|
13
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
14
|
+
[`size-${size}`, Boolean(size)]
|
|
15
|
+
);
|
|
16
|
+
const iconTemplate = () => html`
|
|
23
17
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
appearance,
|
|
31
|
-
shape,
|
|
32
|
-
label,
|
|
33
|
-
successText,
|
|
34
|
-
actionItemsSlottedContent
|
|
35
|
-
}) => classNames(['error connotation-alert', Boolean(errorValidationMessage)], ['disabled', disabled], ['has-value', Boolean(value)], ['readonly', readOnly], ['placeholder', Boolean(placeholder)], [`appearance-${appearance}`, Boolean(appearance)], [`shape-${shape}`, Boolean(shape)], ['no-label', !label], ['success connotation-success', Boolean(successText)], ['action-items', !!(actionItemsSlottedContent === null || actionItemsSlottedContent === void 0 ? void 0 : actionItemsSlottedContent.length)]);
|
|
36
|
-
function renderLabel() {
|
|
37
|
-
return html`
|
|
38
|
-
<label for="control" class="label">
|
|
39
|
-
${x => x.label}
|
|
40
|
-
</label>`;
|
|
41
|
-
}
|
|
42
|
-
function renderCharCount() {
|
|
43
|
-
return html`
|
|
44
|
-
<span class="char-count">${x => x.value ? x.value.length : 0} / ${x => x.maxlength}</span>
|
|
45
|
-
`;
|
|
46
|
-
}
|
|
47
|
-
const TextfieldTemplate = context => {
|
|
48
|
-
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
49
|
-
const focusTemplate = focusTemplateFactory(context);
|
|
50
|
-
return html`
|
|
51
|
-
<div class="base ${getStateClasses}">
|
|
52
|
-
${when(x => x.charCount && x.maxlength, renderCharCount())}
|
|
53
|
-
${when(x => x.label, renderLabel())}
|
|
54
|
-
<div class="fieldset">
|
|
55
|
-
${x => affixIconTemplate(x.icon)}
|
|
56
|
-
<div class="wrapper">
|
|
57
|
-
<input class="control"
|
|
58
|
-
id="control"
|
|
59
|
-
@input="${x => x.handleTextInput()}"
|
|
60
|
-
@change="${x => x.handleChange()}"
|
|
61
|
-
?autofocus="${x => x.autofocus}"
|
|
62
|
-
?disabled="${x => x.disabled}"
|
|
63
|
-
list="${x => x.list}"
|
|
64
|
-
maxlength="${x => x.maxlength}"
|
|
65
|
-
minlength="${x => x.minlength}"
|
|
66
|
-
pattern="${x => x.pattern}"
|
|
67
|
-
placeholder="${x => x.placeholder}"
|
|
68
|
-
?readonly="${x => x.readOnly}"
|
|
69
|
-
?required="${x => x.required}"
|
|
70
|
-
size="${x => x.size}"
|
|
71
|
-
autocomplete="${x => x.autoComplete}"
|
|
72
|
-
name="${x => x.name}"
|
|
73
|
-
?spellcheck="${x => x.spellcheck}"
|
|
74
|
-
:value="${x => x.value}"
|
|
75
|
-
type="${x => x.type}"
|
|
76
|
-
aria-atomic="${x => x.ariaAtomic}"
|
|
77
|
-
aria-busy="${x => x.ariaBusy}"
|
|
78
|
-
aria-controls="${x => x.ariaControls}"
|
|
79
|
-
aria-current="${x => x.ariaCurrent}"
|
|
80
|
-
aria-describedby="${x => x.ariaDescribedby}"
|
|
81
|
-
aria-details="${x => x.ariaDetails}"
|
|
82
|
-
aria-disabled="${x => x.ariaDisabled}"
|
|
83
|
-
aria-errormessage="${x => x.ariaErrormessage}"
|
|
84
|
-
aria-flowto="${x => x.ariaFlowto}"
|
|
85
|
-
aria-haspopup="${x => x.ariaHaspopup}"
|
|
86
|
-
aria-hidden="${x => x.ariaHidden}"
|
|
87
|
-
aria-invalid="${x => x.ariaInvalid}"
|
|
88
|
-
aria-keyshortcuts="${x => x.ariaKeyshortcuts}"
|
|
89
|
-
aria-label="${x => x.ariaLabel}"
|
|
90
|
-
aria-labelledby="${x => x.ariaLabelledby}"
|
|
91
|
-
aria-live="${x => x.ariaLive}"
|
|
92
|
-
aria-owns="${x => x.ariaOwns}"
|
|
93
|
-
aria-relevant="${x => x.ariaRelevant}"
|
|
94
|
-
aria-roledescription="${x => x.ariaRoledescription}"
|
|
95
|
-
${ref('control')}
|
|
96
|
-
/>
|
|
97
|
-
${() => focusTemplate}
|
|
98
|
-
</div>
|
|
99
|
-
<div class="action-items-wrapper">
|
|
100
|
-
<slot name="action-items" ${slotted('actionItemsSlottedContent')}></slot>
|
|
101
|
-
</div>
|
|
18
|
+
<figure class="${getClasses}">
|
|
19
|
+
<slot>
|
|
20
|
+
${when((x) => !x.iconLoaded, html`<img alt="${(x) => x.name}" src="${(x) => x.iconUrl}"/>`)}
|
|
21
|
+
${when((x) => x.iconLoaded && x._svg, (x) => html`${x._svg}`)}
|
|
22
|
+
</slot>
|
|
23
|
+
</figure>
|
|
102
24
|
|
|
103
|
-
|
|
104
|
-
${when(x => {
|
|
105
|
-
var _a;
|
|
106
|
-
return !x.successText && !x.errorValidationMessage && ((_a = x.helperText) === null || _a === void 0 ? void 0 : _a.length);
|
|
107
|
-
}, getFeedbackTemplate('helper', context))}
|
|
108
|
-
${when(x => !x.successText && x.errorValidationMessage, getFeedbackTemplate('error', context))}
|
|
109
|
-
${when(x => x.successText, getFeedbackTemplate('success', context))}
|
|
110
|
-
</div>`;
|
|
111
|
-
};
|
|
25
|
+
`;
|
|
112
26
|
|
|
113
|
-
const
|
|
114
|
-
baseName:
|
|
115
|
-
template:
|
|
116
|
-
styles
|
|
117
|
-
shadowOptions: {
|
|
118
|
-
delegatesFocus: true
|
|
119
|
-
}
|
|
27
|
+
const iconDefinition = Icon.compose({
|
|
28
|
+
baseName: "icon",
|
|
29
|
+
template: iconTemplate,
|
|
30
|
+
styles
|
|
120
31
|
});
|
|
121
|
-
const
|
|
122
|
-
const
|
|
32
|
+
const iconRegistries = [iconDefinition()];
|
|
33
|
+
const registerIcon = registerFactory(iconRegistries);
|
|
123
34
|
|
|
124
|
-
export {
|
|
35
|
+
export { iconRegistries as a, iconDefinition as i, registerIcon as r };
|
package/shared/definition25.js
CHANGED
|
@@ -1,76 +1,62 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { O as Orientation } from './aria.js';
|
|
1
|
+
import { a as attr, F as FoundationElement, h as html, r as registerFactory } from './index.js';
|
|
3
2
|
import { c as classNames } from './class-names.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
* The divider has no semantic value and is for visual presentation only.
|
|
16
|
-
*/
|
|
17
|
-
presentation: "presentation",
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
7
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
8
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
9
|
+
if (decorator = decorators[i])
|
|
10
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
11
|
+
if (kind && result)
|
|
12
|
+
__defProp(target, key, result);
|
|
13
|
+
return result;
|
|
18
14
|
};
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* A Divider Custom HTML Element.
|
|
22
|
-
* Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
|
|
23
|
-
*
|
|
24
|
-
* @public
|
|
25
|
-
*/
|
|
26
|
-
class Divider$1 extends FoundationElement {
|
|
27
|
-
constructor() {
|
|
28
|
-
super(...arguments);
|
|
29
|
-
/**
|
|
30
|
-
* The role of the element.
|
|
31
|
-
*
|
|
32
|
-
* @public
|
|
33
|
-
* @remarks
|
|
34
|
-
* HTML Attribute: role
|
|
35
|
-
*/
|
|
36
|
-
this.role = DividerRole.separator;
|
|
37
|
-
/**
|
|
38
|
-
* The orientation of the divider.
|
|
39
|
-
*
|
|
40
|
-
* @public
|
|
41
|
-
* @remarks
|
|
42
|
-
* HTML Attribute: orientation
|
|
43
|
-
*/
|
|
44
|
-
this.orientation = Orientation.horizontal;
|
|
45
|
-
}
|
|
15
|
+
class Layout extends FoundationElement {
|
|
46
16
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
],
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
],
|
|
53
|
-
|
|
54
|
-
|
|
17
|
+
__decorateClass([
|
|
18
|
+
attr
|
|
19
|
+
], Layout.prototype, "gutters", 2);
|
|
20
|
+
__decorateClass([
|
|
21
|
+
attr({ attribute: "column-basis" })
|
|
22
|
+
], Layout.prototype, "columnBasis", 2);
|
|
23
|
+
__decorateClass([
|
|
24
|
+
attr({ attribute: "column-spacing" })
|
|
25
|
+
], Layout.prototype, "columnSpacing", 2);
|
|
26
|
+
__decorateClass([
|
|
27
|
+
attr({ attribute: "row-spacing" })
|
|
28
|
+
], Layout.prototype, "rowSpacing", 2);
|
|
29
|
+
__decorateClass([
|
|
30
|
+
attr({ attribute: "auto-sizing" })
|
|
31
|
+
], Layout.prototype, "autoSizing", 2);
|
|
55
32
|
|
|
56
|
-
|
|
33
|
+
const styles = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: var(--layout-grid-template-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 column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-inline {\n column-gap: var(--layout-column-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.column-spacing-small-block {\n column-gap: var(--layout-column-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 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 column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-medium-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.column-spacing-large {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-inline {\n column-gap: var(--layout-column-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.column-spacing-large-block {\n column-gap: var(--layout-column-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.row-spacing-small {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-inline {\n row-gap: var(--layout-row-gap, 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))));\n}\n.control.row-spacing-small-block {\n row-gap: var(--layout-row-gap, calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0);\n}\n.control:not(.row-spacing-small):not(.row-spacing-small-inline):not(.row-spacing-small-block):not(.row-spacing-medium):not(.row-spacing-medium-inline):not(.row-spacing-medium-block):not(.row-spacing-large):not(.row-spacing-large-inline):not(.row-spacing-large-block), .control.row-spacing-medium {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.row-spacing-medium-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0);\n}\n.control.row-spacing-large {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-inline {\n row-gap: var(--layout-row-gap, 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)));\n}\n.control.row-spacing-large-block {\n row-gap: var(--layout-row-gap, calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0);\n}\n.control.gutters-small {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-inline {\n margin: 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-block {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0;\n}\n.control.gutters-medium {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0;\n}\n.control.gutters-large {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 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}";
|
|
57
34
|
|
|
58
35
|
const getClasses = ({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
36
|
+
columnBasis,
|
|
37
|
+
gutters,
|
|
38
|
+
columnSpacing,
|
|
39
|
+
autoSizing,
|
|
40
|
+
rowSpacing
|
|
41
|
+
}) => classNames(
|
|
42
|
+
"control",
|
|
43
|
+
[`column-basis-${columnBasis}`, Boolean(columnBasis)],
|
|
44
|
+
[`gutters-${gutters}`, Boolean(gutters)],
|
|
45
|
+
[`column-spacing-${columnSpacing}`, Boolean(columnSpacing)],
|
|
46
|
+
[`row-spacing-${rowSpacing ? rowSpacing : columnSpacing}`, Boolean(rowSpacing) || Boolean(columnSpacing)],
|
|
47
|
+
[`auto-sizing-${autoSizing}`, Boolean(autoSizing)]
|
|
48
|
+
);
|
|
49
|
+
const layoutTemplate = () => html`
|
|
50
|
+
<div class="${getClasses}">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
</div>`;
|
|
67
53
|
|
|
68
|
-
const
|
|
69
|
-
baseName:
|
|
70
|
-
template:
|
|
71
|
-
styles
|
|
54
|
+
const layoutDefinition = Layout.compose({
|
|
55
|
+
baseName: "layout",
|
|
56
|
+
template: layoutTemplate,
|
|
57
|
+
styles
|
|
72
58
|
});
|
|
73
|
-
const
|
|
74
|
-
const
|
|
59
|
+
const layoutRegistries = [layoutDefinition()];
|
|
60
|
+
const registerLayout = registerFactory(layoutRegistries);
|
|
75
61
|
|
|
76
|
-
export {
|
|
62
|
+
export { layoutRegistries as a, layoutDefinition as l, registerLayout as r };
|