@vonage/vivid 3.0.0-next.13 → 3.0.0-next.16

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/card/index.js CHANGED
@@ -9,9 +9,11 @@ import { c as classNames } from '../shared/class-names.js';
9
9
  import '../shared/icon.js';
10
10
  import '../shared/object-set-prototype-of.js';
11
11
  import '../shared/_has.js';
12
- import '../shared/index2.js';
12
+ import '../focus/index.js';
13
+ import '../shared/focus2.js';
13
14
  import '../shared/web.dom-collections.iterator.js';
14
15
  import '../shared/affix.js';
16
+ import '../shared/focus.js';
15
17
  import '../shared/apply-mixins.js';
16
18
  import '../shared/aria-global.js';
17
19
 
@@ -6,7 +6,7 @@ class Elevation extends FoundationElement {}
6
6
 
7
7
  __decorate([attr, __metadata("design:type", Number)], Elevation.prototype, "dp", void 0);
8
8
 
9
- var css_248z = ".control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-2 {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background-color: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n}";
9
+ var css_248z = ".control.dp-0 {\n --_elevation-fill: var(--vvd-color-surface-0dp);\n --_elevation-shadow: var(--vvd-shadow-surface-0dp);\n}\n.control.dp-4 {\n --_elevation-fill: var(--vvd-color-surface-4dp);\n --_elevation-shadow: var(--vvd-shadow-surface-4dp);\n}\n.control.dp-8 {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n.control.dp-12 {\n --_elevation-fill: var(--vvd-color-surface-12dp);\n --_elevation-shadow: var(--vvd-shadow-surface-12dp);\n}\n.control.dp-16 {\n --_elevation-fill: var(--vvd-color-surface-16dp);\n --_elevation-shadow: var(--vvd-shadow-surface-16dp);\n}\n.control.dp-24 {\n --_elevation-fill: var(--vvd-color-surface-24dp);\n --_elevation-shadow: var(--vvd-shadow-surface-24dp);\n}\n.control:not(.dp-0, .dp-4, .dp-8, .dp-12, .dp-16, .dp-24) {\n --_elevation-fill: var(--vvd-color-surface-2dp);\n --_elevation-shadow: var(--vvd-shadow-surface-2dp);\n}\n.control ::slotted(*) {\n background-color: var(--_elevation-fill);\n filter: var(--_elevation-shadow);\n}";
10
10
  styleInject(css_248z);
11
11
 
12
12
  let _ = t => t,
@@ -21,11 +21,11 @@ const elevationTemplate = () => html(_t || (_t = _`
21
21
  <slot></slot>
22
22
  </div>`), getClasses);
23
23
 
24
- const VIVIDElevation = Elevation.compose({
24
+ const vividElevation = Elevation.compose({
25
25
  baseName: 'elevation',
26
26
  template: elevationTemplate,
27
27
  styles: css_248z
28
28
  });
29
- designSystem.register(VIVIDElevation());
29
+ designSystem.register(vividElevation());
30
30
 
31
- export { VIVIDElevation };
31
+ export { vividElevation };
package/fab/index.js ADDED
@@ -0,0 +1,93 @@
1
+ import '../icon/index.js';
2
+ import '../focus/index.js';
3
+ import { _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
4
+ import { s as styleInject } from '../shared/style-inject.es.js';
5
+ import { A as AffixIconWithTrailing, a as affixIconTemplateFactory } from '../shared/affix.js';
6
+ import { B as Button, f as focusTemplateFactory } from '../shared/focus.js';
7
+ import { a as applyMixins } from '../shared/apply-mixins.js';
8
+ import { r as ref } from '../shared/aria-global.js';
9
+ import { c as classNames } from '../shared/class-names.js';
10
+ import '../shared/icon.js';
11
+ import '../shared/object-set-prototype-of.js';
12
+ import '../shared/_has.js';
13
+ import '../shared/when.js';
14
+ import '../shared/focus2.js';
15
+ import '../shared/web.dom-collections.iterator.js';
16
+
17
+ var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.control {\n font: 600 ultra-condensed 16px / 24px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n --_fab-block-size: 48px;\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n border: 0 none;\n background-color: var(--_appearance-color-fill);\n block-size: var(--_fab-block-size);\n border-radius: 24px;\n color: var(--_appearance-color-text);\n column-gap: var(--fab-icon-gap);\n filter: var(--_elevation-shadow);\n outline: 0 none;\n vertical-align: middle;\n}\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n --connotation-basis: var(--vvd-color-cta);\n --connotation-basis-increment: var(--vvd-color-cta-70);\n --connotation-contrast: var(--vvd-color-cta-90);\n --connotation-fierce: var(--vvd-color-cta-80);\n --connotation-firm: var(--vvd-color-cta-70);\n}\n.control.connotation-primary {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n --connotation-basis: var(--vvd-color-neutral);\n --connotation-basis-increment: var(--vvd-color-neutral-90);\n --connotation-contrast: var(--vvd-color-neutral-90);\n --connotation-fierce: var(--vvd-color-neutral-80);\n --connotation-firm: var(--vvd-color-primary);\n}\n.control:not(.connotation-cta, .connotation-primary) {\n --connotation: var(--vvd-color-canvas);\n --on-connotation: var(--vvd-color-on-canvas);\n --connotation-basis: var(--vvd-color-canvas);\n --connotation-basis-increment: var(--vvd-color-neutral-20);\n --connotation-contrast: var(--vvd-color-on-canvas);\n --connotation-fierce: var(--vvd-color-neutral-30);\n --connotation-firm: var(--vvd-color-primary);\n}\n.control {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation);\n --_appearance-color-outline: transaprent;\n}\n.control:hover:not(:disabled, .disabled), .control.hovered:not(:disabled, .disabled) {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation-basis-increment);\n --_appearance-color-outline: transaprent;\n}\n.control:disabled, .control.disabled {\n --_appearance-color-text: var(--vvd-color-neutral-50);\n --_appearance-color-fill: var(--vvd-color-neutral-30);\n --_appearance-color-outline: transaprent;\n}\n.control:active:not(:disabled, .disabled), .control.active:not(:disabled, .disabled) {\n --_appearance-color-text: var(--on-connotation);\n --_appearance-color-fill: var(--connotation-fierce);\n --_appearance-color-outline: transaprent;\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):active {\n --_elevation-fill: var(--vvd-color-surface-8dp);\n --_elevation-shadow: var(--vvd-shadow-surface-8dp);\n}\n\n/* Icon */\n.icon {\n font-size: 24px;\n}\n.icon-trailing .icon {\n order: 1;\n}\n\n:not(:focus) .focus-indicator {\n display: none;\n}";
18
+ styleInject(css_248z);
19
+
20
+ class Fab extends Button {}
21
+
22
+ __decorate([attr, __metadata("design:type", String)], Fab.prototype, "connotation", void 0);
23
+
24
+ __decorate([attr, __metadata("design:type", String)], Fab.prototype, "label", void 0);
25
+
26
+ applyMixins(Fab, AffixIconWithTrailing);
27
+
28
+ let _ = t => t,
29
+ _t;
30
+
31
+ const getClasses = ({
32
+ connotation,
33
+ icon,
34
+ label,
35
+ iconTrailing,
36
+ disabled
37
+ }) => classNames('control', [`connotation-${connotation}`, Boolean(connotation)], ['icon-only', !label && !!icon], ['icon-trailing', iconTrailing], ['disabled', disabled]);
38
+
39
+ const FabTemplate = context => {
40
+ const affixIconTemplate = affixIconTemplateFactory(context);
41
+ const focusTemplate = focusTemplateFactory(context);
42
+ return html(_t || (_t = _`
43
+ <button
44
+ class="${0} "
45
+ ?autofocus="${0}"
46
+ ?disabled="${0}"
47
+ form="${0}"
48
+ formaction="${0}"
49
+ formenctype="${0}"
50
+ formmethod="${0}"
51
+ formnovalidate="${0}"
52
+ formtarget="${0}"
53
+ name="${0}"
54
+ type="${0}"
55
+ value="${0}"
56
+ aria-atomic="${0}"
57
+ aria-busy="${0}"
58
+ aria-controls="${0}"
59
+ aria-current="${0}"
60
+ aria-describedby="${0}"
61
+ aria-details="${0}"
62
+ aria-disabled="${0}"
63
+ aria-errormessage="${0}"
64
+ aria-expanded="${0}"
65
+ aria-flowto="${0}"
66
+ aria-haspopup="${0}"
67
+ aria-hidden="${0}"
68
+ aria-invalid="${0}"
69
+ aria-keyshortcuts="${0}"
70
+ aria-label="${0}"
71
+ aria-labelledby="${0}"
72
+ aria-live="${0}"
73
+ aria-owns="${0}"
74
+ aria-pressed="${0}"
75
+ aria-relevant="${0}"
76
+ aria-roledescription="${0}"
77
+ ${0}
78
+ >
79
+ ${0}
80
+ ${0}
81
+ ${0}
82
+ </button>
83
+ `), 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);
84
+ };
85
+
86
+ const vividFab = Fab.compose({
87
+ baseName: 'fab',
88
+ template: FabTemplate,
89
+ styles: css_248z
90
+ });
91
+ designSystem.register(vividFab());
92
+
93
+ export { vividFab };
package/focus/index.js CHANGED
@@ -1,3 +1,20 @@
1
- import '../shared/index.js';
2
- export { V as VIVIDFocus } from '../shared/index2.js';
3
- import '../shared/style-inject.es.js';
1
+ import { h as html, d as designSystem } from '../shared/index.js';
2
+ import { F as Focus } from '../shared/focus2.js';
3
+ import { s as styleInject } from '../shared/style-inject.es.js';
4
+
5
+ var css_248z = ":host {\n display: contents;\n border-radius: inherit;\n}\n\n.control {\n position: absolute;\n box-sizing: border-box;\n border-radius: inherit;\n box-shadow: inset 0 0 0 2px var(--focus-stroke-color, var(--vvd-color-on-canvas)), inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);\n inset: 0;\n}";
6
+ styleInject(css_248z);
7
+
8
+ let _ = t => t,
9
+ _t;
10
+ const focusTemplate = () => html(_t || (_t = _`
11
+ <span class="control"></span>`));
12
+
13
+ const vividFocus = Focus.compose({
14
+ baseName: 'focus',
15
+ template: focusTemplate,
16
+ styles: css_248z
17
+ });
18
+ designSystem.register(vividFocus());
19
+
20
+ export { vividFocus };
package/icon/index.js CHANGED
@@ -6,7 +6,7 @@ import { c as classNames } from '../shared/class-names.js';
6
6
  import '../shared/object-set-prototype-of.js';
7
7
  import '../shared/_has.js';
8
8
 
9
- var css_248z = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n color: currentColor;\n contain: strict;\n}\n.control.connotation-primary {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n\n.control.connotation-announcement {\n --connotation: var(--vvd-color-announcement);\n --on-connotation: var(--vvd-color-on-announcement);\n}\n\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n\n.control.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n\n.control.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n\n.control.connotation-info {\n --connotation: var(--vvd-color-info);\n --on-connotation: var(--vvd-color-on-info);\n}\n\n.control[class*=connotation] {\n color: var(--connotation);\n}\n\nsvg {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}\n\n/* Size */\n.control:not(.size-small):not(.size-medium):not(.size-large) {\n block-size: 1em;\n inline-size: 1em;\n}\n\n.control.size-small {\n block-size: 16px;\n inline-size: 16px;\n}\n\n.control.size-medium {\n block-size: 24px;\n inline-size: 24px;\n}\n\n.control.size-large {\n block-size: 32px;\n inline-size: 32px;\n}";
9
+ var css_248z = ":host {\n display: inline-block;\n vertical-align: sub;\n}\n\n.control {\n display: flex;\n margin: unset;\n color: currentColor;\n contain: strict;\n}\n.control.connotation-primary {\n --connotation: var(--vvd-color-primary);\n --on-connotation: var(--vvd-color-on-primary);\n}\n.control.connotation-announcement {\n --connotation: var(--vvd-color-announcement);\n --on-connotation: var(--vvd-color-on-announcement);\n}\n.control.connotation-cta {\n --connotation: var(--vvd-color-cta);\n --on-connotation: var(--vvd-color-on-cta);\n}\n.control.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n.control.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n.control.connotation-info {\n --connotation: var(--vvd-color-info);\n --on-connotation: var(--vvd-color-on-info);\n}\n\n.control[class*=connotation] {\n color: var(--connotation);\n}\n\nsvg {\n margin: auto;\n block-size: inherit;\n inline-size: inherit;\n}\n\n/* Size */\n.control:not(.size-small):not(.size-medium):not(.size-large) {\n block-size: 1em;\n inline-size: 1em;\n}\n\n.control.size-small {\n block-size: 16px;\n inline-size: 16px;\n}\n\n.control.size-medium {\n block-size: 24px;\n inline-size: 24px;\n}\n\n.control.size-large {\n block-size: 32px;\n inline-size: 32px;\n}";
10
10
  styleInject(css_248z);
11
11
 
12
12
  let _ = t => t,
package/index.js CHANGED
@@ -1,33 +1,44 @@
1
- export { vividTextAnchor } from './text-anchor/index.js';
2
- export { VIVIDBadge } from './badge/index.js';
3
- export { vividButton } from './button/index.js';
4
- export { V as VIVIDFocus } from './shared/index2.js';
5
- export { vividIcon } from './icon/index.js';
6
- export { VIVIDLayout } from './layout/index.js';
7
- export { VIVIDElevation } from './elevation/index.js';
8
- export { vividBreadcrumbItem } from './breadcrumb-item/index.js';
1
+ export { vividAccordion } from './accordion/index.js';
2
+ export { vividAccordionItem } from './accordion-item/index.js';
3
+ export { vividBadge } from './badge/index.js';
4
+ export { vividBanner } from './banner/index.js';
9
5
  export { vividBreadcrumb } from './breadcrumb/index.js';
10
- export { VIVIDSideDrawer } from './side-drawer/index.js';
6
+ export { vividBreadcrumbItem } from './breadcrumb-item/index.js';
7
+ export { vividButton } from './button/index.js';
11
8
  export { vividCalendar } from './calendar/index.js';
12
- export { VIVIDPopup } from './popup/index.js';
9
+ export { vividCard } from './card/index.js';
10
+ export { vividElevation } from './elevation/index.js';
11
+ export { vividFab } from './fab/index.js';
12
+ export { vividIcon } from './icon/index.js';
13
+ export { vividLayout } from './layout/index.js';
14
+ export { vividNote } from './note/index.js';
15
+ export { vividPopup } from './popup/index.js';
16
+ export { vividProgress } from './progress/index.js';
17
+ export { vividProgressRing } from './progress-ring/index.js';
18
+ export { vividSideDrawer } from './side-drawer/index.js';
19
+ export { vividSidenavItem } from './sidenav-item/index.js';
20
+ export { vividText } from './text/index.js';
13
21
  export { vividTooltip } from './tooltip/index.js';
14
- export { vividBanner } from './banner/index.js';
15
- export { vividAccordionItem } from './accordion-item/index.js';
16
- export { vividAccordion } from './accordion/index.js';
17
22
  export { d as designSystem, p as provideVividDesignSystem } from './shared/index.js';
18
- import './shared/text-anchor.js';
19
- import './shared/affix.js';
23
+ import './shared/style-inject.es.js';
24
+ import './shared/class-names.js';
20
25
  import './shared/web.dom-collections.iterator.js';
21
26
  import './shared/object-set-prototype-of.js';
27
+ import './shared/affix.js';
22
28
  import './shared/icon.js';
23
29
  import './shared/_has.js';
24
- import './shared/anchor.js';
25
30
  import './shared/apply-mixins.js';
31
+ import './shared/when.js';
32
+ import './shared/enums.js';
33
+ import './text-anchor/index.js';
34
+ import './shared/text-anchor.js';
35
+ import './shared/anchor.js';
26
36
  import './shared/aria-global.js';
27
37
  import './shared/text-anchor.template.js';
28
- import './shared/class-names.js';
29
- import './shared/style-inject.es.js';
30
- import './shared/when.js';
38
+ import './focus/index.js';
39
+ import './shared/focus2.js';
40
+ import './shared/focus.js';
31
41
  import './shared/breadcrumb-item.js';
32
42
  import './shared/slotted.js';
33
43
  import './shared/es.object.assign.js';
44
+ import './shared/base-progress.js';
package/layout/index.js CHANGED
@@ -43,11 +43,11 @@ const layoutTemplate = () => html(_t || (_t = _`
43
43
  <slot></slot>
44
44
  </div>`), getClasses);
45
45
 
46
- const VIVIDLayout = Layout.compose({
46
+ const vividLayout = Layout.compose({
47
47
  baseName: 'layout',
48
48
  template: layoutTemplate,
49
49
  styles: css_248z
50
50
  });
51
- designSystem.register(VIVIDLayout());
51
+ designSystem.register(vividLayout());
52
52
 
53
- export { VIVIDLayout };
53
+ export { vividLayout };
@@ -1,15 +1,15 @@
1
1
  import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { AffixIconWithTrailing } from '../../shared/patterns/affix';
3
- import type { Appearance, BlockSize, Connotation, Shape } from '../enums.js';
3
+ import type { Appearance, Connotation, Density, Shape } from '../enums.js';
4
4
  declare type BadgeConnotation = Extract<Connotation, Connotation.Primary | Connotation.CTA | Connotation.Success | Connotation.Alert | Connotation.Warning | Connotation.Info>;
5
5
  declare type BadgeAppearance = Extract<Appearance, Appearance.Filled | Appearance.Duotone | Appearance.Subtle>;
6
6
  declare type BadgeShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
7
- declare type BadgeSize = Extract<BlockSize, BlockSize.Condensed | BlockSize.Normal | BlockSize.Extended>;
7
+ declare type BadgeDensity = Extract<Density, Density.Condensed | Density.Normal | Density.Extended>;
8
8
  export declare class Badge extends FoundationElement {
9
9
  connotation?: BadgeConnotation;
10
10
  shape?: BadgeShape;
11
11
  appearance?: BadgeAppearance;
12
- size?: BadgeSize;
12
+ density?: BadgeDensity;
13
13
  text?: string;
14
14
  }
15
15
  export interface Badge extends AffixIconWithTrailing {
@@ -1,3 +1,3 @@
1
1
  import '../icon';
2
2
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
3
- export declare const VIVIDBadge: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
3
+ export declare const vividBadge: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -1,15 +1,15 @@
1
1
  import { Button as FoundationButton } from '@microsoft/fast-foundation';
2
- import type { Appearance, BlockSize, Connotation, Shape } from '../enums.js';
2
+ import type { Appearance, Connotation, Density, Shape } from '../enums.js';
3
3
  import { AffixIconWithTrailing } from '../../shared/patterns/affix';
4
4
  declare type ButtonConnotation = Extract<Connotation, Connotation.Primary | Connotation.CTA | Connotation.Success | Connotation.Alert>;
5
5
  export declare type ButtonAppearance = Extract<Appearance, Appearance.Filled | Appearance.Outlined | Appearance.Ghost>;
6
6
  declare type ButtonShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
7
- declare type ButtonSize = Extract<BlockSize, BlockSize.Condensed | BlockSize.Normal | BlockSize.Extended>;
7
+ declare type ButtonDensity = Extract<Density, Density.Condensed | Density.Normal | Density.Extended>;
8
8
  export declare class Button extends FoundationButton {
9
9
  connotation?: ButtonConnotation;
10
10
  shape?: ButtonShape;
11
11
  appearance?: ButtonAppearance;
12
- size?: ButtonSize;
12
+ density?: ButtonDensity;
13
13
  stacked: boolean;
14
14
  label?: string;
15
15
  }
@@ -1,21 +1,4 @@
1
1
  import '../icon';
2
2
  import '../focus';
3
- import { Button as FastButton } from '@microsoft/fast-foundation';
4
- import { Button } from './button';
5
- export declare const vividButton: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
6
- baseName: string;
7
- baseClass: typeof FastButton;
8
- template: any;
9
- styles: import("@microsoft/fast-element").ComposableStyles;
10
- shadowOptions: {
11
- delegatesFocus: true;
12
- };
13
- }> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
14
- baseName: string;
15
- baseClass: typeof FastButton;
16
- template: any;
17
- styles: import("@microsoft/fast-element").ComposableStyles;
18
- shadowOptions: {
19
- delegatesFocus: true;
20
- };
21
- }, typeof Button>;
3
+ import { type FoundationElementDefinition } from '@microsoft/fast-foundation';
4
+ export declare const vividButton: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -1,16 +1,21 @@
1
- export * from './text-anchor';
1
+ export * from './accordion';
2
+ export * from './accordion-item';
2
3
  export * from './badge';
4
+ export * from './banner';
5
+ export * from './breadcrumb';
6
+ export * from './breadcrumb-item';
3
7
  export * from './button';
4
- export * from './focus';
8
+ export * from './calendar';
9
+ export * from './card';
10
+ export * from './elevation';
11
+ export * from './fab';
5
12
  export * from './icon';
6
13
  export * from './layout';
7
- export * from './elevation';
8
- export * from './breadcrumb-item';
9
- export * from './breadcrumb';
10
- export * from './side-drawer';
11
- export * from './calendar';
14
+ export * from './note';
12
15
  export * from './popup';
16
+ export * from './progress';
17
+ export * from './progress-ring';
18
+ export * from './side-drawer';
19
+ export * from './sidenav-item';
20
+ export * from './text';
13
21
  export * from './tooltip';
14
- export * from './banner';
15
- export * from './accordion-item';
16
- export * from './accordion';
@@ -1,2 +1,2 @@
1
1
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- export declare const VIVIDElevation: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
2
+ export declare const vividElevation: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
package/lib/enums.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare enum Connotation {
2
+ Canvas = "canvas",
2
3
  Primary = "primary",
3
4
  CTA = "cta",
4
5
  Success = "success",
@@ -24,7 +25,7 @@ export declare enum Appearance {
24
25
  Subtle = "subtle",
25
26
  Ghost = "ghost"
26
27
  }
27
- export declare enum BlockSize {
28
+ export declare enum Density {
28
29
  Condensed = "condensed",
29
30
  Normal = "normal",
30
31
  Extended = "extended"
@@ -0,0 +1,10 @@
1
+ import { Button as FoundationButton } from '@microsoft/fast-foundation';
2
+ import type { Connotation } from '../enums.js';
3
+ import { AffixIconWithTrailing } from '../../shared/patterns/affix';
4
+ export declare type FabConnotation = Extract<Connotation, Connotation.Canvas | Connotation.CTA | Connotation.Primary>;
5
+ export declare class Fab extends FoundationButton {
6
+ connotation?: FabConnotation;
7
+ label?: string;
8
+ }
9
+ export interface Fab extends AffixIconWithTrailing {
10
+ }
@@ -0,0 +1,4 @@
1
+ import type { ViewTemplate } from '@microsoft/fast-element';
2
+ import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
3
+ import type { Fab } from './fab';
4
+ export declare const FabTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Fab>;
@@ -0,0 +1,4 @@
1
+ import '../icon';
2
+ import '../focus';
3
+ import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
4
+ export declare const vividFab: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -1,2 +1,2 @@
1
1
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- export declare const VIVIDFocus: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
2
+ export declare const vividFocus: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -1,2 +1,2 @@
1
1
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- export declare const VIVIDLayout: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
2
+ export declare const vividLayout: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -0,0 +1,2 @@
1
+ import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
+ export declare const vividNote: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -0,0 +1,10 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import type { Connotation } from '../enums';
3
+ import { AffixIcon } from '../../shared/patterns';
4
+ export declare type NoteConnotation = Connotation.Info | Connotation.Announcement | Connotation.Success | Connotation.Warning | Connotation.Alert;
5
+ export declare class Note extends FoundationElement {
6
+ heading?: string;
7
+ connotation?: NoteConnotation;
8
+ }
9
+ export interface Note extends AffixIcon {
10
+ }
@@ -0,0 +1,5 @@
1
+ import type { ViewTemplate } from '@microsoft/fast-element';
2
+ import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
3
+ import '../icon/index';
4
+ import type { Note } from './note';
5
+ export declare const NoteTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Note>;
@@ -1,4 +1,4 @@
1
1
  import '../elevation';
2
2
  import '../button';
3
3
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
4
- export declare const VIVIDPopup: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
4
+ export declare const vividPopup: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
@@ -3,4 +3,5 @@ import type { Connotation } from '../enums';
3
3
  export declare type ProgressRingConnotation = Connotation.Primary | Connotation.Success | Connotation.Alert | Connotation.CTA;
4
4
  export declare class ProgressRing extends BaseProgress {
5
5
  connotation?: ProgressRingConnotation;
6
+ density?: -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3;
6
7
  }
@@ -1,2 +1,2 @@
1
1
  import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
2
- export declare const VIVIDSideDrawer: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
2
+ export declare const vividSideDrawer: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<FoundationElementDefinition> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<FoundationElementDefinition, import("@microsoft/fast-element").Constructable<import("@microsoft/fast-foundation").FoundationElement>>;
package/note/index.js ADDED
@@ -0,0 +1,65 @@
1
+ import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, d as designSystem } from '../shared/index.js';
2
+ import { s as styleInject } from '../shared/style-inject.es.js';
3
+ import { b as AffixIcon } from '../shared/affix.js';
4
+ import '../shared/focus2.js';
5
+ import { a as applyMixins } from '../shared/apply-mixins.js';
6
+ import '../shared/web.dom-collections.iterator.js';
7
+ import '../icon/index.js';
8
+ import { C as Connotation } from '../shared/enums.js';
9
+ import { w as when } from '../shared/when.js';
10
+ import { c as classNames } from '../shared/class-names.js';
11
+ import '../shared/icon.js';
12
+ import '../shared/object-set-prototype-of.js';
13
+ import '../shared/_has.js';
14
+
15
+ var css_248z = "/*\n Do not edit directly\n Generated on Wed, 27 Apr 2022 11:58:36 GMT\n*/\n.base {\n display: flex;\n align-items: stretch;\n padding: 20px;\n border-left: 8px solid var(--connotation);\n background-color: var(--vvd-color-canvas);\n border-radius: 6px;\n box-shadow: inset 0 1px 0 0 var(--vvd-color-neutral-40), inset -1px 0 0 0 var(--vvd-color-neutral-40), inset 0 -1px 0 0 var(--vvd-color-neutral-40);\n color: var(--vvd-color-on-canvas);\n}\n.base.connotation-success {\n --connotation: var(--vvd-color-success);\n --on-connotation: var(--vvd-color-on-success);\n}\n.base.connotation-info {\n --connotation: var(--vvd-color-info);\n --on-connotation: var(--vvd-color-on-info);\n}\n.base.connotation-alert {\n --connotation: var(--vvd-color-alert);\n --on-connotation: var(--vvd-color-on-alert);\n}\n.base.connotation-warning {\n --connotation: var(--vvd-color-warning);\n --on-connotation: var(--vvd-color-on-warning);\n}\n.base:not(.connotation-success, .connotation-info, .connotation-alert, .connotation-warning) {\n --connotation: var(--vvd-color-announcement);\n --on-connotation: var(--vvd-color-on-announcement);\n}\n@supports (contain: content) {\n .base {\n contain: content;\n }\n}\n@supports not (contain: content) {\n .base {\n overflow: hidden;\n }\n}\n\n.icon {\n --connotation: currentColor;\n align-self: flex-start;\n font-size: 24px;\n margin-inline-end: 16px;\n}\n\n.text {\n display: flex;\n min-height: 24px;\n flex: 1;\n flex-direction: column;\n justify-content: center;\n gap: 4px;\n text-align: start;\n}\n.text .heading {\n font: 600 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}\n.text .message {\n font: 400 ultra-condensed 14px / 20px SpeziaWebVariable;\n letter-spacing: 0px;\n text-decoration: none;\n text-transform: none;\n}";
16
+ styleInject(css_248z);
17
+
18
+ class Note extends FoundationElement {}
19
+
20
+ __decorate([attr, __metadata("design:type", String)], Note.prototype, "heading", void 0);
21
+
22
+ __decorate([attr, __metadata("design:type", String)], Note.prototype, "connotation", void 0);
23
+
24
+ applyMixins(Note, AffixIcon);
25
+
26
+ let _ = t => t,
27
+ _t,
28
+ _t2,
29
+ _t3;
30
+ const connotationIconMap = new Map([[Connotation.Info, 'info-solid'], [Connotation.Announcement, 'megaphone-solid'], [Connotation.Success, 'check-circle-solid'], [Connotation.Warning, 'warning-solid'], [Connotation.Alert, 'error-solid']]);
31
+
32
+ const getClasses = ({
33
+ connotation
34
+ }) => classNames('base', `connotation-${connotation}`);
35
+
36
+ function getHeaderTemplate() {
37
+ return html(_t || (_t = _`<div class="heading">${0}</div>`), x => x.heading);
38
+ }
39
+
40
+ function getIconType(note) {
41
+ return note.icon ? note.icon : note.connotation ? connotationIconMap.get(note.connotation) : 'megaphone-solid';
42
+ }
43
+
44
+ function getIconTemplate() {
45
+ return html(_t2 || (_t2 = _`<vwc-icon class="icon" type="${0}"></vwc-icon>`), getIconType);
46
+ }
47
+
48
+ const NoteTemplate = () => html(_t3 || (_t3 = _`
49
+ <div class="${0}">
50
+ ${0}
51
+ <div class="text">
52
+ ${0}
53
+ <slot class="message"></slot>
54
+ </div>
55
+ </div>
56
+ `), getClasses, getIconTemplate(), when(x => x.heading, getHeaderTemplate()));
57
+
58
+ const vividNote = Note.compose({
59
+ baseName: 'note',
60
+ template: NoteTemplate,
61
+ styles: css_248z
62
+ });
63
+ designSystem.register(vividNote());
64
+
65
+ export { vividNote };
package/package.json CHANGED
@@ -1,11 +1,31 @@
1
1
  {
2
2
  "name": "@vonage/vivid",
3
- "version": "3.0.0-next.13",
3
+ "version": "3.0.0-next.16",
4
4
  "type": "module",
5
5
  "module": "./index.esm.js",
6
- "main": "index.js",
6
+ "main": "./index.js",
7
7
  "exports": {
8
- "import": "./index.js"
8
+ "./accordion": "./accordion",
9
+ "./accordion-item": "./accordion-item",
10
+ "./badge": "./badge",
11
+ "./banner": "./banner",
12
+ "./breadcrumb": "./breadcrumb",
13
+ "./breadcrumb-item": "./breadcrumb-item",
14
+ "./button": "./button",
15
+ "./calendar": "./calendar",
16
+ "./card": "./card",
17
+ "./elevation": "./elevation",
18
+ "./fab": "./fab",
19
+ "./icon": "./icon",
20
+ "./layout": "./layout",
21
+ "./note": "./note",
22
+ "./popup": "./popup",
23
+ "./progress": "./progress",
24
+ "./progress-ring": "./progress-ring",
25
+ "./side-drawer": "./side-drawer",
26
+ "./sidenav-item": "./sidenav-item",
27
+ "./text": "./text",
28
+ "./tooltip": "./tooltip"
9
29
  },
10
30
  "typings": "./index.d.ts",
11
31
  "dependencies": {
@@ -13,7 +33,7 @@
13
33
  "@microsoft/fast-foundation": "^2.41.1",
14
34
  "@microsoft/fast-web-utilities": "^5.2.0",
15
35
  "ramda": "^0.27.2",
16
- "@floating-ui/dom": "^0.4.0"
36
+ "@floating-ui/dom": "^0.5.1"
17
37
  },
18
38
  "peerDependencies": {}
19
39
  }