@vonage/vivid 3.47.0 → 3.49.0-preview.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/README.md +3 -403
- package/accordion/index.cjs +21 -0
- package/accordion-item/index.cjs +18 -0
- package/action-group/index.cjs +7 -0
- package/alert/index.cjs +30 -0
- package/alert/index.js +0 -1
- package/appearance-ui/index.cjs +96 -0
- package/audio-player/index.cjs +34 -0
- package/audio-player/index.js +0 -1
- package/avatar/index.cjs +11 -0
- package/badge/index.cjs +14 -0
- package/banner/index.cjs +29 -0
- package/banner/index.js +0 -1
- package/breadcrumb/index.cjs +13 -0
- package/breadcrumb-item/index.cjs +22 -0
- package/button/index.cjs +25 -0
- package/button/index.js +0 -1
- package/calendar/index.cjs +9 -0
- package/calendar-event/index.cjs +9 -0
- package/card/index.cjs +14 -0
- package/checkbox/index.cjs +21 -0
- package/combobox/index.cjs +39 -0
- package/combobox/index.js +1 -1
- package/custom-elements.json +30 -35
- package/data-grid/index.cjs +18 -0
- package/date-picker/index.cjs +40 -0
- package/date-picker/index.js +1 -1
- package/date-range-picker/index.cjs +40 -0
- package/date-range-picker/index.js +1 -1
- package/dialog/index.cjs +31 -0
- package/dialog/index.js +1 -1
- package/divider/index.cjs +8 -0
- package/elevation/index.cjs +7 -0
- package/empty-state/index.cjs +12 -0
- package/fab/index.cjs +22 -0
- package/file-picker/index.cjs +30 -0
- package/file-picker/index.js +1 -1
- package/focus/index.cjs +7 -0
- package/header/index.cjs +8 -0
- package/icon/index.cjs +10 -0
- package/index.cjs +296 -0
- package/index.js +1 -1
- package/layout/index.cjs +7 -0
- package/lib/menu-item/menu-item.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +1 -0
- package/listbox/index.cjs +77 -0
- package/locales/en-GB.cjs +106 -0
- package/locales/en-US.cjs +106 -0
- package/locales/ja-JP.cjs +106 -0
- package/locales/zh-CN.cjs +106 -0
- package/menu/index.cjs +32 -0
- package/menu/index.js +0 -1
- package/menu-item/index.cjs +22 -0
- package/menu-item/index.js +0 -1
- package/nav/index.cjs +6 -0
- package/nav-disclosure/index.cjs +17 -0
- package/nav-disclosure/index.js +0 -1
- package/nav-item/index.cjs +22 -0
- package/note/index.cjs +16 -0
- package/number-field/index.cjs +33 -0
- package/number-field/index.js +1 -1
- package/option/index.cjs +23 -0
- package/package.json +20 -2
- package/pagination/index.cjs +28 -0
- package/pagination/index.js +0 -1
- package/popup/index.cjs +27 -0
- package/popup/index.js +0 -1
- package/progress/index.cjs +9 -0
- package/progress-ring/index.cjs +9 -0
- package/radio/index.cjs +14 -0
- package/radio-group/index.cjs +14 -0
- package/select/index.cjs +38 -0
- package/select/index.js +1 -1
- package/selectable-box/index.cjs +25 -0
- package/shared/Reflector.cjs +67 -0
- package/shared/_has.cjs +62 -0
- package/shared/affix.cjs +64 -0
- package/shared/affix.js +8 -4
- package/shared/anchor.cjs +90 -0
- package/shared/anchored.cjs +78 -0
- package/shared/apply-mixins.cjs +25 -0
- package/shared/aria-global.cjs +74 -0
- package/shared/aria.cjs +11 -0
- package/shared/aria2.cjs +11 -0
- package/shared/base-progress.cjs +72 -0
- package/shared/breadcrumb-item.cjs +27 -0
- package/shared/button.cjs +202 -0
- package/shared/calendar-event.cjs +41 -0
- package/shared/children.cjs +61 -0
- package/shared/class-names.cjs +17 -0
- package/shared/definition.cjs +165 -0
- package/shared/definition10.cjs +102 -0
- package/shared/definition11.cjs +164 -0
- package/shared/definition11.js +39 -42
- package/shared/definition12.cjs +50 -0
- package/shared/definition13.cjs +779 -0
- package/shared/definition14.cjs +157 -0
- package/shared/definition15.cjs +249 -0
- package/shared/definition16.cjs +746 -0
- package/shared/definition17.cjs +1372 -0
- package/shared/definition18.cjs +175 -0
- package/shared/definition19.cjs +416 -0
- package/shared/definition2.cjs +232 -0
- package/shared/definition20.cjs +278 -0
- package/shared/definition21.cjs +83 -0
- package/shared/definition22.cjs +74 -0
- package/shared/definition23.cjs +106 -0
- package/shared/definition24.cjs +2392 -0
- package/shared/definition25.cjs +75 -0
- package/shared/definition26.cjs +39 -0
- package/shared/definition27.cjs +66 -0
- package/shared/definition28.cjs +849 -0
- package/shared/definition28.js +5 -4
- package/shared/definition29.cjs +72 -0
- package/shared/definition29.js +1 -1
- package/shared/definition3.cjs +72 -0
- package/shared/definition30.cjs +98 -0
- package/shared/definition30.js +1 -4
- package/shared/definition31.cjs +37 -0
- package/shared/definition32.cjs +24 -0
- package/shared/definition33.cjs +64 -0
- package/shared/definition34.cjs +533 -0
- package/shared/definition35.cjs +295 -0
- package/shared/definition36.cjs +219 -0
- package/shared/definition37.cjs +109 -0
- package/shared/definition38.cjs +92 -0
- package/shared/definition39.cjs +448 -0
- package/shared/definition4.cjs +198 -0
- package/shared/definition40.cjs +49 -0
- package/shared/definition41.cjs +694 -0
- package/shared/definition41.js +1 -6
- package/shared/definition42.cjs +152 -0
- package/shared/definition43.cjs +113 -0
- package/shared/definition44.cjs +607 -0
- package/shared/definition45.cjs +152 -0
- package/shared/definition45.js +1 -6
- package/shared/definition46.cjs +166 -0
- package/shared/definition46.js +2 -7
- package/shared/definition47.cjs +35 -0
- package/shared/definition48.cjs +98 -0
- package/shared/definition49.cjs +543 -0
- package/shared/definition49.js +12 -3
- package/shared/definition5.cjs +199 -0
- package/shared/definition50.cjs +52 -0
- package/shared/definition51.cjs +150 -0
- package/shared/definition52.cjs +304 -0
- package/shared/definition53.cjs +309 -0
- package/shared/definition54.cjs +146 -0
- package/shared/definition55.cjs +128 -0
- package/shared/definition56.cjs +99 -0
- package/shared/definition57.cjs +310 -0
- package/shared/definition58.cjs +20 -0
- package/shared/definition59.cjs +51 -0
- package/shared/definition6.cjs +83 -0
- package/shared/definition60.cjs +1810 -0
- package/shared/definition7.cjs +72 -0
- package/shared/definition8.cjs +152 -0
- package/shared/definition9.cjs +69 -0
- package/shared/dialog-polyfill.esm.cjs +862 -0
- package/shared/direction.cjs +22 -0
- package/shared/dom.cjs +23 -0
- package/shared/enums.cjs +87 -0
- package/shared/focus.cjs +8 -0
- package/shared/focus2.cjs +11 -0
- package/shared/form-associated.cjs +470 -0
- package/shared/icon.cjs +237 -0
- package/shared/index.cjs +5061 -0
- package/shared/index2.cjs +231 -0
- package/shared/key-codes.cjs +115 -0
- package/shared/key-codes2.cjs +14 -0
- package/shared/listbox.cjs +1072 -0
- package/shared/localized.cjs +11 -0
- package/shared/numbers.cjs +38 -0
- package/shared/patterns/affix.d.ts +5 -1
- package/shared/presentationDate.cjs +6192 -0
- package/shared/presentationDate.js +1 -6
- package/shared/radio.cjs +153 -0
- package/shared/ref.cjs +43 -0
- package/shared/repeat.cjs +767 -0
- package/shared/select.options.cjs +12 -0
- package/shared/slotted.cjs +123 -0
- package/shared/start-end.cjs +52 -0
- package/shared/strings.cjs +11 -0
- package/shared/text-anchor.cjs +33 -0
- package/shared/text-anchor.template.cjs +48 -0
- package/shared/text-field.cjs +5 -0
- package/shared/text-field2.cjs +228 -0
- package/shared/tree-item.cjs +154 -0
- package/shared/when.cjs +31 -0
- package/side-drawer/index.cjs +8 -0
- package/slider/index.cjs +16 -0
- package/split-button/index.cjs +20 -0
- package/split-button/index.js +0 -1
- package/style.css +1 -1
- 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.cjs +15 -0
- package/switch/index.js +0 -5
- package/tab/index.cjs +17 -0
- package/tab-panel/index.cjs +6 -0
- package/tabs/index.cjs +24 -0
- package/tag/index.cjs +17 -0
- package/tag-group/index.cjs +7 -0
- package/text-anchor/index.cjs +24 -0
- package/text-area/index.cjs +25 -0
- package/text-field/index.cjs +27 -0
- package/toggletip/index.cjs +29 -0
- package/toggletip/index.js +0 -1
- package/tooltip/index.cjs +29 -0
- package/tooltip/index.js +0 -1
- package/tree-item/index.cjs +22 -0
- package/tree-view/index.cjs +14 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index.cjs');
|
|
4
|
+
const definition = require('./definition26.cjs');
|
|
5
|
+
const definition$1 = require('./definition58.cjs');
|
|
6
|
+
const affix = require('./affix.cjs');
|
|
7
|
+
const applyMixins = require('./apply-mixins.cjs');
|
|
8
|
+
const button = require('./button.cjs');
|
|
9
|
+
const ref = require('./ref.cjs');
|
|
10
|
+
const classNames = require('./class-names.cjs');
|
|
11
|
+
|
|
12
|
+
const styles = ".control{display:inline-flex;box-sizing:border-box;align-items:center;border:0 none;background:var(--_appearance-color-fill, var(--_elevation-fill));block-size:var(--_fab-block-size);border-radius:var(--_fab-border-radius);color:var(--_appearance-color-text, var(--vvd-color-canvas-text));column-gap:var(--fab-icon-gap);filter:var(--_elevation-shadow);font:var(--vvd-typography-base-bold);transition:background-color .15s linear,filter .15s linear;vertical-align:middle}.control.connotation-accent{--_connotation-color-primary: var(--vvd-fab-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-fab-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-fab-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-contrast: var(--vvd-fab-accent-contrast, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-fab-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-firm: var(--vvd-fab-accent-firm, var(--vvd-color-canvas-text))}.control.connotation-cta{--_connotation-color-primary: var(--vvd-fab-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-fab-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-fab-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-contrast: var(--vvd-fab-cta-contrast, var(--vvd-color-cta-800));--_connotation-color-fierce: var(--vvd-fab-cta-fierce, var(--vvd-color-cta-700));--_connotation-color-firm: var(--vvd-fab-cta-firm, var(--vvd-color-cta-600))}.control{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.control:where(:hover,.hover):where(:not(:disabled,.disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: transparent}.control:where(:disabled,.disabled){--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: transparent}.control:where(:active,.active):where(:not(:disabled,.disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-fierce);--_appearance-color-outline: transparent}.control:not(.connotation-accent,.connotation-cta){--focus-stroke-gap-color: transparent}.control:focus-visible{box-shadow:inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:2px solid var(--focus-stroke-color, var(--vvd-color-canvas-text));outline-offset:calc(-2px - var(--focus-inset, 0px))}@supports (user-select: none){.control{user-select:none}}.control.size-expanded{--_fab-border-radius: 40px;--_fab-block-size:calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))}.control:not(.size-expanded){--_fab-border-radius: 24px;--_fab-block-size:calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))}.control.icon-only{border-radius:50%;padding-inline:0;place-content:center}@supports (aspect-ratio: 1){.control.icon-only{aspect-ratio:1}}@supports not (aspect-ratio: 1){.control.icon-only{inline-size:var(--_fab-block-size)}}.control:not(.icon-only){--fab-icon-gap: 10px;padding-inline:20px}.control:disabled{--_elevation-fill: var(--vvd-color-surface-0dp);--_elevation-shadow: var(--vvd-shadow-surface-0dp);cursor:not-allowed}.control:not(:disabled){--_elevation-fill: var(--vvd-color-surface-4dp);--_elevation-shadow: var(--vvd-shadow-surface-4dp);cursor:pointer}.control:not(:disabled):hover{--_elevation-fill: var(--vvd-color-surface-12dp);--_elevation-shadow: var(--vvd-shadow-surface-12dp)}.control:not(:disabled):active{--_elevation-fill: var(--vvd-color-surface-24dp);--_elevation-shadow: var(--vvd-shadow-surface-24dp)}slot[name=icon]{line-height:1}.icon-trailing slot[name=icon]{display:inline-block;order:1}.control.size-extended slot[name=icon]{font-size:calc(calc(1px*(56 + 4*clamp(-1,var(--vvd-size-density, 0),2))) / 2.3333)}.control:not(.size-extended) slot[name=icon]{font-size:calc(1px*(40 + 4*clamp(-1,var(--vvd-size-density, 0),2))/2)}\n";
|
|
13
|
+
|
|
14
|
+
var __defProp = Object.defineProperty;
|
|
15
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
16
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
17
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
18
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
19
|
+
if (decorator = decorators[i])
|
|
20
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
21
|
+
if (kind && result)
|
|
22
|
+
__defProp(target, key, result);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
class Fab extends button.Button {
|
|
26
|
+
}
|
|
27
|
+
__decorateClass([
|
|
28
|
+
index.attr
|
|
29
|
+
], Fab.prototype, "connotation", 2);
|
|
30
|
+
__decorateClass([
|
|
31
|
+
index.attr
|
|
32
|
+
], Fab.prototype, "size", 2);
|
|
33
|
+
__decorateClass([
|
|
34
|
+
index.attr
|
|
35
|
+
], Fab.prototype, "label", 2);
|
|
36
|
+
applyMixins.applyMixins(Fab, affix.AffixIconWithTrailing);
|
|
37
|
+
|
|
38
|
+
const getClasses = ({
|
|
39
|
+
connotation,
|
|
40
|
+
size,
|
|
41
|
+
icon,
|
|
42
|
+
label,
|
|
43
|
+
iconTrailing,
|
|
44
|
+
disabled,
|
|
45
|
+
iconSlottedContent
|
|
46
|
+
}) => classNames.classNames(
|
|
47
|
+
"control",
|
|
48
|
+
[`connotation-${connotation}`, Boolean(connotation)],
|
|
49
|
+
[`size-${size}`, Boolean(size)],
|
|
50
|
+
["icon-only", !label && !!(icon || iconSlottedContent?.length)],
|
|
51
|
+
["icon-trailing", iconTrailing],
|
|
52
|
+
["disabled", disabled]
|
|
53
|
+
);
|
|
54
|
+
const FabTemplate = (context) => {
|
|
55
|
+
const affixIconTemplate = affix.affixIconTemplateFactory(context);
|
|
56
|
+
return index.html`
|
|
57
|
+
<button
|
|
58
|
+
class="${getClasses} "
|
|
59
|
+
?autofocus="${(x) => x.autofocus}"
|
|
60
|
+
?disabled="${(x) => x.disabled}"
|
|
61
|
+
form="${(x) => x.formId}"
|
|
62
|
+
formaction="${(x) => x.formaction}"
|
|
63
|
+
formenctype="${(x) => x.formenctype}"
|
|
64
|
+
formmethod="${(x) => x.formmethod}"
|
|
65
|
+
formnovalidate="${(x) => x.formnovalidate}"
|
|
66
|
+
formtarget="${(x) => x.formtarget}"
|
|
67
|
+
name="${(x) => x.name}"
|
|
68
|
+
type="${(x) => x.type}"
|
|
69
|
+
value="${(x) => x.value}"
|
|
70
|
+
aria-atomic="${(x) => x.ariaAtomic}"
|
|
71
|
+
aria-busy="${(x) => x.ariaBusy}"
|
|
72
|
+
aria-current="${(x) => x.ariaCurrent}"
|
|
73
|
+
aria-details="${(x) => x.ariaDetails}"
|
|
74
|
+
aria-disabled="${(x) => x.ariaDisabled}"
|
|
75
|
+
aria-expanded="${(x) => x.ariaExpanded}"
|
|
76
|
+
aria-haspopup="${(x) => x.ariaHaspopup}"
|
|
77
|
+
aria-hidden="${(x) => x.ariaHidden}"
|
|
78
|
+
aria-invalid="${(x) => x.ariaInvalid}"
|
|
79
|
+
aria-keyshortcuts="${(x) => x.ariaKeyshortcuts}"
|
|
80
|
+
aria-label="${(x) => x.ariaLabel}"
|
|
81
|
+
aria-live="${(x) => x.ariaLive}"
|
|
82
|
+
aria-pressed="${(x) => x.ariaPressed}"
|
|
83
|
+
aria-relevant="${(x) => x.ariaRelevant}"
|
|
84
|
+
aria-roledescription="${(x) => x.ariaRoledescription}"
|
|
85
|
+
${ref.ref("control")}
|
|
86
|
+
>
|
|
87
|
+
${(x) => affixIconTemplate(x.icon, affix.IconWrapper.Slot)}
|
|
88
|
+
${(x) => x.label}
|
|
89
|
+
</button>
|
|
90
|
+
`;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const fabDefinition = Fab.compose({
|
|
94
|
+
baseName: "fab",
|
|
95
|
+
template: FabTemplate,
|
|
96
|
+
styles,
|
|
97
|
+
shadowOptions: {
|
|
98
|
+
delegatesFocus: true
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
const fabRegistries = [fabDefinition(), ...definition.iconRegistries, ...definition$1.focusRegistries];
|
|
102
|
+
const registerFab = index.registerFactory(fabRegistries);
|
|
103
|
+
|
|
104
|
+
exports.fabDefinition = fabDefinition;
|
|
105
|
+
exports.fabRegistries = fabRegistries;
|
|
106
|
+
exports.registerFab = registerFab;
|