@vonage/vivid 3.0.0-next.12 → 3.0.0-next.121
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/README.md +170 -4
- package/accordion/index.js +4 -60
- package/accordion-item/index.js +14 -118
- package/action-group/index.js +5 -0
- package/avatar/index.js +11 -0
- package/badge/index.js +9 -53
- package/banner/index.js +20 -210
- package/breadcrumb/index.js +7 -96
- package/breadcrumb-item/index.js +15 -46
- package/button/index.js +19 -751
- package/calendar/index.js +5 -1520
- package/calendar-event/index.js +9 -0
- package/card/index.js +13 -0
- package/checkbox/index.js +16 -0
- package/custom-elements.json +5465 -0
- package/dialog/index.js +24 -0
- package/divider/index.js +6 -0
- package/elevation/index.js +4 -30
- package/fab/index.js +22 -0
- package/focus/index.js +4 -2
- package/header/index.js +58 -0
- package/icon/index.js +8 -36
- package/index.js +65 -26
- package/layout/index.js +4 -52
- package/lib/accordion/definition.d.ts +1 -0
- package/lib/accordion/index.d.ts +1 -2
- package/lib/accordion-item/definition.d.ts +1 -0
- package/lib/accordion-item/index.d.ts +1 -3
- package/lib/action-group/action-group.d.ts +10 -0
- package/lib/{sidenav-item/sidenav-item.template.d.ts → action-group/action-group.template.d.ts} +2 -2
- package/lib/action-group/definition.d.ts +1 -0
- package/lib/action-group/index.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +15 -0
- package/lib/avatar/avatar.template.d.ts +4 -0
- package/lib/avatar/definition.d.ts +1 -0
- package/lib/avatar/index.d.ts +1 -0
- package/lib/badge/badge.d.ts +2 -4
- package/lib/badge/definition.d.ts +3 -0
- package/lib/badge/index.d.ts +1 -3
- package/lib/banner/banner.d.ts +1 -1
- package/lib/banner/banner.template.d.ts +0 -2
- package/lib/banner/definition.d.ts +1 -0
- package/lib/banner/index.d.ts +1 -2
- package/lib/breadcrumb/breadcrumb.template.d.ts +4 -0
- package/lib/breadcrumb/definition.d.ts +1 -0
- package/lib/breadcrumb/index.d.ts +1 -2
- package/lib/breadcrumb-item/definition.d.ts +1 -0
- package/lib/breadcrumb-item/index.d.ts +1 -3
- package/lib/button/button.d.ts +3 -2
- package/lib/button/definition.d.ts +1 -0
- package/lib/button/index.d.ts +1 -21
- package/lib/calendar/calendar.d.ts +3 -1
- package/lib/calendar/definition.d.ts +1 -0
- package/lib/calendar/index.d.ts +1 -3
- package/lib/calendar-event/calendar-event.d.ts +14 -0
- package/lib/calendar-event/calendar-event.template.d.ts +4 -0
- package/lib/calendar-event/definition.d.ts +1 -0
- package/lib/calendar-event/index.d.ts +1 -0
- package/lib/card/card.d.ts +10 -0
- package/lib/{text/text.template.d.ts → card/card.template.d.ts} +2 -2
- package/lib/card/definition.d.ts +1 -0
- package/lib/card/index.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +5 -0
- package/lib/checkbox/checkbox.template.d.ts +4 -0
- package/lib/checkbox/definition.d.ts +1 -0
- package/lib/checkbox/index.d.ts +1 -0
- package/lib/components.d.ts +38 -16
- package/lib/dialog/definition.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +23 -0
- package/lib/dialog/dialog.template.d.ts +4 -0
- package/lib/dialog/index.d.ts +1 -0
- package/lib/divider/definition.d.ts +1 -0
- package/lib/divider/divider.d.ts +3 -0
- package/lib/divider/divider.template.d.ts +4 -0
- package/lib/divider/index.d.ts +1 -0
- package/lib/elevation/definition.d.ts +1 -0
- package/lib/elevation/elevation.d.ts +1 -0
- package/lib/elevation/index.d.ts +1 -2
- package/lib/enums.d.ts +19 -6
- package/lib/fab/definition.d.ts +3 -0
- package/lib/fab/fab.d.ts +13 -0
- package/lib/fab/fab.template.d.ts +4 -0
- package/lib/fab/index.d.ts +1 -0
- package/lib/focus/definition.d.ts +3 -0
- package/lib/focus/index.d.ts +1 -2
- package/lib/{sidenav-item/index.d.ts → header/definition.d.ts} +2 -2
- package/lib/header/header.d.ts +5 -0
- package/lib/header/header.template.d.ts +4 -0
- package/lib/header/index.d.ts +1 -0
- package/lib/icon/definition.d.ts +3 -0
- package/lib/icon/icon.d.ts +5 -6
- package/lib/icon/index.d.ts +1 -2
- package/lib/layout/definition.d.ts +3 -0
- package/lib/layout/index.d.ts +1 -2
- package/lib/layout/layout.d.ts +4 -4
- package/lib/listbox/definition.d.ts +3 -0
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +9 -0
- package/lib/listbox/listbox.template.d.ts +4 -0
- package/lib/menu/definition.d.ts +11 -0
- package/lib/menu/index.d.ts +1 -0
- package/lib/menu/menu.d.ts +10 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/menu-item/definition.d.ts +3 -0
- package/lib/menu-item/index.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +7 -0
- package/lib/menu-item/menu-item.template.d.ts +5 -0
- package/lib/nav/definition.d.ts +3 -0
- package/lib/nav/index.d.ts +1 -0
- package/lib/nav/nav.d.ts +3 -0
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/definition.d.ts +3 -0
- package/lib/nav-disclosure/index.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +10 -0
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/nav-item/definition.d.ts +3 -0
- package/lib/nav-item/index.d.ts +1 -0
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/nav-item/nav-item.template.d.ts +4 -0
- package/lib/note/definition.d.ts +3 -0
- package/lib/note/index.d.ts +1 -0
- package/lib/note/note.d.ts +10 -0
- package/lib/note/note.template.d.ts +4 -0
- package/lib/number-field/definition.d.ts +4 -0
- package/lib/number-field/index.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +14 -0
- package/lib/number-field/number-field.template.d.ts +4 -0
- package/lib/option/definition.d.ts +3 -0
- package/lib/option/index.d.ts +1 -0
- package/lib/option/option.d.ts +9 -0
- package/lib/option/option.template.d.ts +4 -0
- package/lib/popup/definition.d.ts +3 -0
- package/lib/popup/index.d.ts +1 -4
- package/lib/popup/popup.d.ts +6 -4
- package/lib/progress/definition.d.ts +3 -0
- package/lib/progress/index.d.ts +1 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/definition.d.ts +3 -0
- package/lib/progress-ring/index.d.ts +1 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -1
- package/lib/radio/definition.d.ts +3 -0
- package/lib/radio/index.d.ts +1 -0
- package/lib/radio/radio.d.ts +4 -0
- package/lib/radio/radio.template.d.ts +4 -0
- package/lib/radio-group/definition.d.ts +11 -0
- package/lib/radio-group/index.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +4 -0
- package/lib/radio-group/radio-group.template.d.ts +4 -0
- package/lib/side-drawer/definition.d.ts +3 -0
- package/lib/side-drawer/index.d.ts +1 -2
- package/lib/side-drawer/side-drawer.d.ts +3 -2
- package/lib/slider/definition.d.ts +3 -0
- package/lib/slider/index.d.ts +1 -0
- package/lib/slider/slider.d.ts +4 -0
- package/lib/slider/slider.template.d.ts +4 -0
- package/lib/switch/definition.d.ts +3 -0
- package/lib/switch/index.d.ts +1 -0
- package/lib/switch/switch.d.ts +7 -0
- package/lib/switch/switch.template.d.ts +4 -0
- package/lib/text-anchor/definition.d.ts +3 -0
- package/lib/text-anchor/index.d.ts +1 -2
- package/lib/text-area/definition.d.ts +3 -0
- package/lib/text-area/index.d.ts +1 -0
- package/lib/text-area/text-area.d.ts +9 -0
- package/lib/text-area/text-area.template.d.ts +4 -0
- package/lib/text-field/definition.d.ts +3 -0
- package/lib/text-field/index.d.ts +1 -0
- package/lib/text-field/text-field.d.ts +14 -0
- package/lib/text-field/text-field.template.d.ts +4 -0
- package/lib/tooltip/definition.d.ts +3 -0
- package/lib/tooltip/index.d.ts +1 -3
- package/lib/tooltip/tooltip.d.ts +6 -6
- package/listbox/index.js +24 -0
- package/menu/index.js +30 -0
- package/menu-item/index.js +20 -0
- package/nav/index.js +4 -0
- package/nav-disclosure/index.js +17 -0
- package/nav-item/index.js +22 -0
- package/note/index.js +15 -0
- package/number-field/index.js +458 -0
- package/option/index.js +20 -0
- package/package.json +62 -10
- package/popup/index.js +21 -2062
- package/progress/index.js +6 -98
- package/progress-ring/index.js +6 -75
- package/radio/index.js +12 -0
- package/radio-group/index.js +11 -0
- package/shared/affix.js +2 -8
- package/shared/anchor.js +11 -3
- package/shared/apply-mixins.js +5 -4
- package/shared/aria-global.js +2 -86
- package/shared/aria.js +9 -0
- package/shared/base-progress.js +6 -1
- package/shared/breadcrumb-item.js +2 -2
- package/shared/button.js +200 -0
- package/shared/calendar-event.js +19 -0
- package/shared/definition.js +53 -0
- package/shared/definition10.js +99 -0
- package/shared/definition11.js +48 -0
- package/shared/definition12.js +1523 -0
- package/shared/definition13.js +111 -0
- package/shared/definition14.js +114 -0
- package/shared/definition15.js +32 -0
- package/shared/definition16.js +172 -0
- package/shared/definition17.js +223 -0
- package/shared/definition18.js +78 -0
- package/shared/definition19.js +87 -0
- package/shared/definition2.js +106 -0
- package/shared/definition20.js +44 -0
- package/shared/definition21.js +1078 -0
- package/shared/definition22.js +261 -0
- package/shared/definition23.js +348 -0
- package/shared/definition24.js +1529 -0
- package/shared/definition25.js +351 -0
- package/shared/definition26.js +18 -0
- package/shared/definition27.js +75 -0
- package/shared/definition28.js +31 -0
- package/shared/definition29.js +56 -0
- package/shared/definition3.js +29 -0
- package/shared/definition30.js +94 -0
- package/shared/definition31.js +77 -0
- package/shared/definition32.js +45 -0
- package/shared/definition33.js +435 -0
- package/shared/definition34.js +86 -0
- package/shared/definition35.js +592 -0
- package/shared/definition36.js +147 -0
- package/shared/definition37.js +279 -0
- package/shared/definition38.js +119 -0
- package/shared/definition39.js +77 -0
- package/shared/definition4.js +19 -0
- package/shared/definition5.js +38 -0
- package/shared/definition6.js +60 -0
- package/shared/definition7.js +45 -0
- package/shared/definition8.js +113 -0
- package/shared/definition9.js +107 -0
- package/shared/design-system/index.d.ts +1 -1
- package/shared/dialog-polyfill.esm.js +858 -0
- package/shared/direction.js +20 -0
- package/shared/dom.js +8 -0
- package/shared/enums.js +70 -0
- package/shared/es.object.assign.js +2 -3
- package/shared/es.regexp.to-string.js +59 -0
- package/shared/focus.js +5 -0
- package/shared/focus2.js +11 -0
- package/shared/form-associated.js +466 -0
- package/shared/form-elements.js +343 -0
- package/shared/icon.js +538 -567
- package/shared/index.js +1664 -83
- package/shared/key-codes.js +97 -0
- package/shared/numbers.js +25 -0
- package/shared/patterns/affix.d.ts +1 -1
- package/shared/patterns/focus.d.ts +3 -0
- package/shared/patterns/form-elements/form-elements.d.ts +31 -0
- package/shared/patterns/form-elements/index.d.ts +1 -0
- package/shared/patterns/index.d.ts +2 -0
- package/shared/radio.js +127 -0
- package/shared/ref.js +41 -0
- package/shared/slotted.js +1 -1
- package/shared/start-end.js +50 -0
- package/shared/string-trim.js +40 -0
- package/shared/text-anchor.js +0 -2
- package/shared/text-anchor.template.js +6 -5
- package/shared/to-string.js +51 -0
- package/side-drawer/index.js +5 -81
- package/slider/index.js +17 -0
- package/styles/core/all.css +86 -0
- package/styles/core/theme.css +11 -0
- package/styles/core/typography.css +80 -0
- package/styles/fonts/SpeziaCompleteVariableItalicWeb.woff2 +0 -0
- package/styles/fonts/SpeziaCompleteVariableUprightWeb.woff2 +0 -0
- package/styles/fonts/SpeziaMonoCompleteVariableWeb.woff2 +0 -0
- package/styles/fonts/spezia.css +9 -12
- package/styles/tokens/theme-dark.css +230 -0
- package/styles/tokens/theme-light.css +230 -0
- package/switch/index.js +17 -0
- package/text-anchor/index.js +11 -6
- package/text-area/index.js +22 -0
- package/text-field/index.js +22 -0
- package/tooltip/index.js +18 -55
- package/vivid.api.json +3047 -0
- package/lib/text/index.d.ts +0 -2
- package/lib/text/text.d.ts +0 -10
- package/shared/index2.js +0 -21
- package/shared/object-set-prototype-of.js +0 -1009
- package/shared/style-inject.es.js +0 -28
- package/shared/web.dom-collections.iterator.js +0 -473
- package/sidenav-item/index.js +0 -39
- package/styles/themes/dark.css +0 -205
- package/styles/themes/light.css +0 -205
- package/text/index.js +0 -46
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { O as Orientation } from './aria.js';
|
|
3
|
+
import { c as classNames } from './class-names.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Divider roles
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
const DividerRole = {
|
|
10
|
+
/**
|
|
11
|
+
* The divider semantically separates content
|
|
12
|
+
*/
|
|
13
|
+
separator: "separator",
|
|
14
|
+
/**
|
|
15
|
+
* The divider has no semantic value and is for visual presentation only.
|
|
16
|
+
*/
|
|
17
|
+
presentation: "presentation",
|
|
18
|
+
};
|
|
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
|
+
}
|
|
46
|
+
}
|
|
47
|
+
__decorate([
|
|
48
|
+
attr
|
|
49
|
+
], Divider$1.prototype, "role", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
attr
|
|
52
|
+
], Divider$1.prototype, "orientation", void 0);
|
|
53
|
+
|
|
54
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Fri, 16 Dec 2022 11:38:53 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-200);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
|
|
55
|
+
|
|
56
|
+
class Divider extends Divider$1 {}
|
|
57
|
+
|
|
58
|
+
let _ = t => t,
|
|
59
|
+
_t;
|
|
60
|
+
const getClasses = ({
|
|
61
|
+
orientation
|
|
62
|
+
}) => classNames('base', [`${orientation}`, Boolean(orientation)]);
|
|
63
|
+
const DividerTemplate = () => html(_t || (_t = _`
|
|
64
|
+
<span
|
|
65
|
+
class="${0}"
|
|
66
|
+
orientation="${0}"
|
|
67
|
+
role="${0}"
|
|
68
|
+
></span>`), getClasses, x => x.orientation, x => x.role);
|
|
69
|
+
|
|
70
|
+
const dividerDefinition = Divider.compose({
|
|
71
|
+
baseName: 'divider',
|
|
72
|
+
template: DividerTemplate,
|
|
73
|
+
styles: css_248z
|
|
74
|
+
});
|
|
75
|
+
const dividerRegistries = [dividerDefinition()];
|
|
76
|
+
const registerDivider = registerFactory(dividerRegistries);
|
|
77
|
+
|
|
78
|
+
export { Divider as D, dividerDefinition as a, dividerRegistries as d, registerDivider as r };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { f as focusRegistries } from './definition4.js';
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
+
import { B as Button } from './button.js';
|
|
6
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
7
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
8
|
+
import { r as ref } from './ref.js';
|
|
9
|
+
import { c as classNames } from './class-names.js';
|
|
10
|
+
|
|
11
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Fri, 16 Dec 2022 11:38:53 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, .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-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.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-trailing .icon {\n order: 1;\n}\n.size-expanded .icon {\n font-size: 24px;\n}\n.icon:not(.size-expanded) .icon {\n font-size: 20px;\n}\n\n:not(:focus-visible) .focus-indicator {\n display: none;\n}";
|
|
12
|
+
|
|
13
|
+
class Fab extends Button {}
|
|
14
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "connotation", void 0);
|
|
15
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "size", void 0);
|
|
16
|
+
__decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
|
|
17
|
+
applyMixins(Fab, AffixIconWithTrailing);
|
|
18
|
+
|
|
19
|
+
let _ = t => t,
|
|
20
|
+
_t;
|
|
21
|
+
const getClasses = ({
|
|
22
|
+
connotation,
|
|
23
|
+
size,
|
|
24
|
+
icon,
|
|
25
|
+
label,
|
|
26
|
+
iconTrailing,
|
|
27
|
+
disabled
|
|
28
|
+
}) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], [`size-${size}`, Boolean(size)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing], ['disabled', disabled]);
|
|
29
|
+
const FabTemplate = context => {
|
|
30
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
31
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
32
|
+
return html(_t || (_t = _`
|
|
33
|
+
<button
|
|
34
|
+
class="${0} "
|
|
35
|
+
?autofocus="${0}"
|
|
36
|
+
?disabled="${0}"
|
|
37
|
+
form="${0}"
|
|
38
|
+
formaction="${0}"
|
|
39
|
+
formenctype="${0}"
|
|
40
|
+
formmethod="${0}"
|
|
41
|
+
formnovalidate="${0}"
|
|
42
|
+
formtarget="${0}"
|
|
43
|
+
name="${0}"
|
|
44
|
+
type="${0}"
|
|
45
|
+
value="${0}"
|
|
46
|
+
aria-atomic="${0}"
|
|
47
|
+
aria-busy="${0}"
|
|
48
|
+
aria-controls="${0}"
|
|
49
|
+
aria-current="${0}"
|
|
50
|
+
aria-describedby="${0}"
|
|
51
|
+
aria-details="${0}"
|
|
52
|
+
aria-disabled="${0}"
|
|
53
|
+
aria-errormessage="${0}"
|
|
54
|
+
aria-expanded="${0}"
|
|
55
|
+
aria-flowto="${0}"
|
|
56
|
+
aria-haspopup="${0}"
|
|
57
|
+
aria-hidden="${0}"
|
|
58
|
+
aria-invalid="${0}"
|
|
59
|
+
aria-keyshortcuts="${0}"
|
|
60
|
+
aria-label="${0}"
|
|
61
|
+
aria-labelledby="${0}"
|
|
62
|
+
aria-live="${0}"
|
|
63
|
+
aria-owns="${0}"
|
|
64
|
+
aria-pressed="${0}"
|
|
65
|
+
aria-relevant="${0}"
|
|
66
|
+
aria-roledescription="${0}"
|
|
67
|
+
${0}
|
|
68
|
+
>
|
|
69
|
+
${0}
|
|
70
|
+
${0}
|
|
71
|
+
${0}
|
|
72
|
+
</button>
|
|
73
|
+
`), getClasses, x => x.autofocus, x => x.disabled, x => x.formId, x => x.formaction, x => x.formenctype, x => x.formmethod, x => x.formnovalidate, x => x.formtarget, x => x.name, x => x.type, x => x.value, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaPressed, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), () => focusTemplate, x => affixIconTemplate(x.icon), x => x.label);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const fabDefinition = Fab.compose({
|
|
77
|
+
baseName: 'fab',
|
|
78
|
+
template: FabTemplate,
|
|
79
|
+
styles: css_248z,
|
|
80
|
+
shadowOptions: {
|
|
81
|
+
delegatesFocus: true
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
const fabRegistries = [fabDefinition(), ...iconRegistries, ...focusRegistries];
|
|
85
|
+
const registerFab = registerFactory(fabRegistries);
|
|
86
|
+
|
|
87
|
+
export { fabRegistries as a, fabDefinition as f, registerFab as r };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { i as iconRegistries } from './definition3.js';
|
|
3
|
+
import { f as focusRegistries } from './definition4.js';
|
|
4
|
+
import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
|
|
5
|
+
import { a as applyMixins } from './apply-mixins.js';
|
|
6
|
+
import { f as focusTemplateFactory } from './focus2.js';
|
|
7
|
+
import { w as when } from './when.js';
|
|
8
|
+
import { c as classNames } from './class-names.js';
|
|
9
|
+
|
|
10
|
+
var css_248z = "/**\n * Do not edit directly\n * Generated on Fri, 16 Dec 2022 11:38:53 GMT\n */\n.body {\n padding: 8px 32px 24px 16px;\n font: var(--vvd-typography-base);\n}\n.icon:not(.icon-trailing) .body {\n padding-left: 48px;\n}\n\n.base {\n display: flex;\n flex-direction: column;\n}\n.base:not(.open) .body {\n display: none;\n}\n\n.header {\n padding: 0;\n margin: 0;\n}\n\n.button {\n position: relative;\n display: flex;\n width: 100%;\n align-items: center;\n padding: 16px;\n border: 0 none;\n margin: 0;\n background-color: var(--_appearance-color-fill);\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n cursor: pointer;\n font: var(--vvd-typography-heading-4);\n}\n.button {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.button:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.button:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.button {\n --_connotation-color-primary: var(--vvd-color-canvas-text);\n --_connotation-color-faint: var(--vvd-color-neutral-50);\n --_connotation-color-soft: var(--vvd-color-neutral-100);\n}\n@supports selector(:focus-visible) {\n .button:focus {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .button {\n user-select: none;\n }\n}\n.button .heading-text {\n flex-grow: 1;\n margin-inline-end: auto;\n text-align: left;\n}\n.button .meta {\n overflow: hidden;\n max-width: 20%;\n flex-shrink: 0;\n color: var(--vvd-color-neutral-600);\n font: var(--vvd-typography-base-bold);\n margin-inline-start: 16px;\n text-align: end;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.button .indicator {\n margin-inline-start: 16px;\n}\n.button .icon {\n color: var(--vvd-color-neutral-600);\n margin-inline-end: 16px;\n}\n\n/* Icon */\n.icon-trailing .icon {\n order: 1;\n}\n\n.button:not(:focus-visible) > .focus-indicator {\n display: none;\n}";
|
|
11
|
+
|
|
12
|
+
class AccordionItem extends FoundationElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.noIndicator = false;
|
|
16
|
+
this.open = false;
|
|
17
|
+
}
|
|
18
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
19
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
20
|
+
if (name === 'open') {
|
|
21
|
+
newValue === null ? this.emitEvent('closed') : this.emitEvent('opened');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
emitEvent(name) {
|
|
25
|
+
const init = {
|
|
26
|
+
bubbles: true,
|
|
27
|
+
composed: true
|
|
28
|
+
};
|
|
29
|
+
const ev = new CustomEvent(name, init);
|
|
30
|
+
this.dispatchEvent(ev);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
__decorate([attr, __metadata("design:type", String)], AccordionItem.prototype, "heading", void 0);
|
|
34
|
+
__decorate([attr({
|
|
35
|
+
attribute: 'heading-level'
|
|
36
|
+
}), __metadata("design:type", Number)], AccordionItem.prototype, "headingLevel", void 0);
|
|
37
|
+
__decorate([attr({
|
|
38
|
+
mode: 'boolean',
|
|
39
|
+
attribute: 'no-indicator'
|
|
40
|
+
}), __metadata("design:type", Object)], AccordionItem.prototype, "noIndicator", void 0);
|
|
41
|
+
__decorate([attr, __metadata("design:type", String)], AccordionItem.prototype, "meta", void 0);
|
|
42
|
+
__decorate([attr({
|
|
43
|
+
mode: 'boolean'
|
|
44
|
+
}), __metadata("design:type", Object)], AccordionItem.prototype, "open", void 0);
|
|
45
|
+
applyMixins(AccordionItem, AffixIconWithTrailing);
|
|
46
|
+
|
|
47
|
+
let _ = t => t,
|
|
48
|
+
_t,
|
|
49
|
+
_t2,
|
|
50
|
+
_t3,
|
|
51
|
+
_t4,
|
|
52
|
+
_t5;
|
|
53
|
+
const PANEL = 'panel';
|
|
54
|
+
const getClasses = ({
|
|
55
|
+
open,
|
|
56
|
+
iconTrailing,
|
|
57
|
+
icon,
|
|
58
|
+
noIndicator
|
|
59
|
+
}) => classNames('base', ['open', open], ['icon', Boolean(icon)], ['icon-trailing', iconTrailing], ['no-indicator', noIndicator]);
|
|
60
|
+
const AccordionItemTemplate = context => html(_t || (_t = _`
|
|
61
|
+
<div class="${0}">
|
|
62
|
+
${0}
|
|
63
|
+
<div class="body" id="${0}" role="region" aria-labelledby="header">
|
|
64
|
+
<slot></slot>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
`), getClasses, x => renderPanelHeader(context, x.headingLevel), PANEL);
|
|
68
|
+
const renderPanelHeader = (context, headingLevel) => {
|
|
69
|
+
const header = headingLevel ? 'h' + headingLevel : 'h3';
|
|
70
|
+
return html(_t2 || (_t2 = _`
|
|
71
|
+
<${0} class="header">
|
|
72
|
+
${0}
|
|
73
|
+
</${0}>
|
|
74
|
+
`), header, renderHeaderButton(context), header);
|
|
75
|
+
};
|
|
76
|
+
const renderHeaderButton = context => {
|
|
77
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
78
|
+
const focusTemplate = focusTemplateFactory(context);
|
|
79
|
+
return html(_t3 || (_t3 = _`
|
|
80
|
+
<button class="button" id="header" @click=${0}
|
|
81
|
+
aria-expanded=${0}
|
|
82
|
+
aria-controls="${0}">
|
|
83
|
+
${0}
|
|
84
|
+
${0}
|
|
85
|
+
<span class="heading-text">${0}</span>
|
|
86
|
+
${0}
|
|
87
|
+
|
|
88
|
+
${0}
|
|
89
|
+
</button>
|
|
90
|
+
`), x => x.open = !x.open, x => x.open, PANEL, () => focusTemplate, x => affixIconTemplate(x.icon), x => x.heading, when(x => x.meta, html(_t4 || (_t4 = _`<span class="meta">${0}</span>`), x => x.meta)), when(x => !x.noIndicator && !x.iconTrailing, html(_t5 || (_t5 = _`${0}`), x => {
|
|
91
|
+
return affixIconTemplate(x.open ? 'chevron-up-solid' : 'chevron-down-solid', 'indicator');
|
|
92
|
+
})));
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
const accordionItemDefinition = AccordionItem.compose({
|
|
96
|
+
baseName: 'accordion-item',
|
|
97
|
+
template: AccordionItemTemplate,
|
|
98
|
+
styles: css_248z,
|
|
99
|
+
shadowOptions: {
|
|
100
|
+
delegatesFocus: true
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
const accordionItemRegistries = [accordionItemDefinition(), ...iconRegistries, ...focusRegistries];
|
|
104
|
+
const registerAccordionItem = registerFactory(accordionItemRegistries);
|
|
105
|
+
|
|
106
|
+
export { accordionItemDefinition as a, accordionItemRegistries as b, registerAccordionItem as r };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
|
|
2
|
+
import { c as classNames } from './class-names.js';
|
|
3
|
+
|
|
4
|
+
var AUTO_SIZING;
|
|
5
|
+
(function (AUTO_SIZING) {
|
|
6
|
+
AUTO_SIZING["Fit"] = "fit";
|
|
7
|
+
AUTO_SIZING["Fill"] = "fill";
|
|
8
|
+
})(AUTO_SIZING || (AUTO_SIZING = {}));
|
|
9
|
+
class Layout extends FoundationElement {}
|
|
10
|
+
__decorate([attr, __metadata("design:type", String)], Layout.prototype, "gutters", void 0);
|
|
11
|
+
__decorate([attr({
|
|
12
|
+
attribute: 'column-basis'
|
|
13
|
+
}), __metadata("design:type", String)], Layout.prototype, "columnBasis", void 0);
|
|
14
|
+
__decorate([attr({
|
|
15
|
+
attribute: 'column-spacing'
|
|
16
|
+
}), __metadata("design:type", String)], Layout.prototype, "columnSpacing", void 0);
|
|
17
|
+
__decorate([attr({
|
|
18
|
+
attribute: 'auto-sizing'
|
|
19
|
+
}), __metadata("design:type", String)], Layout.prototype, "autoSizing", void 0);
|
|
20
|
+
|
|
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}";
|
|
22
|
+
|
|
23
|
+
let _ = t => t,
|
|
24
|
+
_t;
|
|
25
|
+
const getClasses = ({
|
|
26
|
+
columnBasis,
|
|
27
|
+
gutters,
|
|
28
|
+
columnSpacing,
|
|
29
|
+
autoSizing
|
|
30
|
+
}) => classNames('control', [`column-basis-${columnBasis}`, Boolean(columnBasis)], [`gutters-${gutters}`, Boolean(gutters)], [`column-spacing-${columnSpacing}`, Boolean(columnSpacing)], [`auto-sizing-${autoSizing}`, Boolean(autoSizing)]);
|
|
31
|
+
const layoutTemplate = () => html(_t || (_t = _`
|
|
32
|
+
<div class="${0}">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</div>`), getClasses);
|
|
35
|
+
|
|
36
|
+
const layoutDefinition = Layout.compose({
|
|
37
|
+
baseName: 'layout',
|
|
38
|
+
template: layoutTemplate,
|
|
39
|
+
styles: css_248z
|
|
40
|
+
});
|
|
41
|
+
const layoutRegistries = [layoutDefinition()];
|
|
42
|
+
const registerLayout = registerFactory(layoutRegistries);
|
|
43
|
+
|
|
44
|
+
export { layoutRegistries as a, layoutDefinition as l, registerLayout as r };
|