@vonage/vivid 3.0.0-next.2 → 3.0.0-next.22

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.
Files changed (133) hide show
  1. package/README.md +49 -4
  2. package/accordion/index.js +61 -0
  3. package/accordion-item/index.js +128 -0
  4. package/action-group/index.js +34 -0
  5. package/badge/index.js +27 -22
  6. package/banner/index.js +149 -0
  7. package/breadcrumb/index.js +103 -0
  8. package/breadcrumb-item/index.js +26 -11
  9. package/button/index.js +41 -663
  10. package/calendar/index.js +1550 -0
  11. package/calendar-event/index.js +117 -0
  12. package/card/index.js +134 -0
  13. package/elevation/index.js +8 -15
  14. package/fab/index.js +99 -0
  15. package/focus/index.js +20 -3
  16. package/icon/index.js +40 -5
  17. package/index.d.ts +1 -0
  18. package/index.js +49 -12
  19. package/layout/index.js +5 -5
  20. package/lib/accordion/accordion.d.ts +9 -0
  21. package/lib/accordion/accordion.template.d.ts +4 -0
  22. package/lib/accordion/index.d.ts +2 -0
  23. package/lib/accordion-item/accordion-item.d.ts +13 -0
  24. package/lib/accordion-item/accordion-item.template.d.ts +4 -0
  25. package/lib/accordion-item/index.d.ts +5 -0
  26. package/lib/action-group/action-group.d.ts +9 -0
  27. package/lib/action-group/action-group.template.d.ts +4 -0
  28. package/lib/action-group/index.d.ts +2 -0
  29. package/lib/badge/badge.d.ts +8 -8
  30. package/lib/badge/index.d.ts +1 -1
  31. package/lib/banner/banner.d.ts +20 -0
  32. package/lib/banner/banner.template.d.ts +4 -0
  33. package/lib/banner/index.d.ts +3 -0
  34. package/lib/breadcrumb/breadcrumb.d.ts +3 -0
  35. package/lib/breadcrumb/index.d.ts +2 -0
  36. package/lib/breadcrumb-item/breadcrumb-item.d.ts +3 -3
  37. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +0 -1
  38. package/lib/breadcrumb-item/index.d.ts +2 -0
  39. package/lib/button/button.d.ts +9 -8
  40. package/lib/button/index.d.ts +2 -19
  41. package/lib/calendar/calendar.d.ts +13 -0
  42. package/lib/calendar/calendar.template.d.ts +4 -0
  43. package/lib/calendar/helpers/calendar.date-functions.d.ts +2 -0
  44. package/lib/calendar/helpers/calendar.event-context.d.ts +6 -0
  45. package/lib/calendar/helpers/calendar.keyboard-interactions.d.ts +9 -0
  46. package/lib/calendar/index.d.ts +2 -0
  47. package/lib/calendar-event/calendar-event.d.ts +14 -0
  48. package/lib/calendar-event/calendar-event.template.d.ts +4 -0
  49. package/lib/calendar-event/index.d.ts +2 -0
  50. package/lib/card/card.d.ts +10 -0
  51. package/lib/card/card.template.d.ts +4 -0
  52. package/lib/card/index.d.ts +4 -0
  53. package/lib/components.d.ts +20 -3
  54. package/lib/elevation/elevation.d.ts +1 -1
  55. package/lib/elevation/index.d.ts +1 -1
  56. package/lib/enums.d.ts +14 -7
  57. package/lib/fab/fab.d.ts +10 -0
  58. package/lib/fab/fab.template.d.ts +4 -0
  59. package/lib/fab/index.d.ts +4 -0
  60. package/lib/focus/index.d.ts +1 -1
  61. package/lib/icon/icon.d.ts +4 -5
  62. package/lib/layout/index.d.ts +1 -1
  63. package/lib/layout/layout.d.ts +3 -3
  64. package/lib/note/index.d.ts +2 -0
  65. package/lib/note/note.d.ts +10 -0
  66. package/lib/note/note.template.d.ts +5 -0
  67. package/lib/popup/index.d.ts +4 -0
  68. package/lib/popup/popup.d.ts +17 -0
  69. package/lib/popup/popup.template.d.ts +4 -0
  70. package/lib/progress/index.d.ts +2 -0
  71. package/lib/progress/progress.d.ts +9 -0
  72. package/lib/progress/progress.template.d.ts +5 -0
  73. package/lib/progress-ring/index.d.ts +2 -0
  74. package/lib/progress-ring/progress-ring.d.ts +7 -0
  75. package/lib/progress-ring/progress-ring.template.d.ts +4 -0
  76. package/lib/side-drawer/index.d.ts +2 -0
  77. package/lib/side-drawer/side-drawer.d.ts +15 -0
  78. package/lib/side-drawer/side-drawer.template.d.ts +4 -0
  79. package/lib/sidenav-item/index.d.ts +1 -0
  80. package/lib/sidenav-item/sidenav-item.d.ts +4 -5
  81. package/lib/text/index.d.ts +2 -0
  82. package/lib/text/text.d.ts +10 -0
  83. package/lib/text/text.template.d.ts +4 -0
  84. package/lib/text-anchor/text-anchor.d.ts +4 -1
  85. package/lib/text-field/index.d.ts +4 -0
  86. package/lib/text-field/text-field.d.ts +21 -0
  87. package/lib/text-field/text-field.template.d.ts +5 -0
  88. package/lib/tooltip/index.d.ts +3 -0
  89. package/lib/tooltip/tooltip.d.ts +8 -0
  90. package/lib/tooltip/tooltip.template.d.ts +4 -0
  91. package/note/index.js +68 -0
  92. package/package.json +37 -6
  93. package/popup/index.js +2111 -0
  94. package/progress/index.js +101 -0
  95. package/progress-ring/index.js +82 -0
  96. package/shared/_has.js +58 -0
  97. package/shared/affix.js +10 -25
  98. package/shared/anchor.js +11 -4
  99. package/shared/aria-global.js +22 -59
  100. package/shared/base-progress.js +70 -0
  101. package/shared/breadcrumb-item.js +25 -0
  102. package/shared/button.js +195 -0
  103. package/shared/calendar-event.js +26 -0
  104. package/shared/enums.js +79 -0
  105. package/shared/es.object.assign.js +69 -0
  106. package/shared/export.js +972 -0
  107. package/shared/focus.js +5 -0
  108. package/shared/focus2.js +11 -0
  109. package/shared/form-associated.js +460 -0
  110. package/shared/icon.js +1389 -0
  111. package/shared/index.js +4940 -1426
  112. package/shared/iterators.js +61 -0
  113. package/shared/object-keys.js +13 -0
  114. package/shared/patterns/affix.d.ts +3 -4
  115. package/shared/patterns/focus.d.ts +3 -0
  116. package/shared/patterns/index.d.ts +1 -0
  117. package/shared/ref.js +41 -0
  118. package/shared/slotted.js +119 -0
  119. package/shared/text-anchor.js +12 -0
  120. package/shared/text-anchor.template.js +18 -20
  121. package/shared/to-string.js +51 -0
  122. package/shared/web.dom-collections.iterator.js +46 -1059
  123. package/shared/when.js +15 -0
  124. package/side-drawer/index.js +8660 -0
  125. package/sidenav-item/index.js +25 -61
  126. package/styles/themes/dark.css +16 -4
  127. package/styles/themes/light.css +16 -4
  128. package/text/index.js +48 -0
  129. package/text-anchor/index.js +13 -2
  130. package/text-field/index.js +398 -0
  131. package/tooltip/index.js +71 -0
  132. package/shared/index2.js +0 -4911
  133. package/shared/index3.js +0 -21
@@ -1,4 +1,7 @@
1
1
  import { Anchor } from '@microsoft/fast-foundation';
2
+ import { AffixIcon } from '../../shared/patterns/affix';
2
3
  export declare class TextAnchor extends Anchor {
3
- text: string;
4
+ text?: string;
5
+ }
6
+ export interface TextAnchor extends AffixIcon {
4
7
  }
@@ -0,0 +1,4 @@
1
+ import '../icon';
2
+ import '../focus';
3
+ import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
4
+ export declare const vividTextfield: (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,21 @@
1
+ import { TextField as FoundationTextfield } from '@microsoft/fast-foundation';
2
+ import type { Appearance, Density, Shape } from '../enums';
3
+ import { AffixIcon } from '../../shared/patterns';
4
+ declare type TextFieldDensity = Extract<Density, Density.Normal | Density.Extended>;
5
+ declare type TextFieldAppearance = Extract<Appearance, Appearance.Outlined | Appearance.Ghost>;
6
+ declare type TextFieldShape = Extract<Shape, Shape.Rounded | Shape.Pill>;
7
+ export declare class TextField extends FoundationTextfield {
8
+ label?: string;
9
+ helperText?: string;
10
+ charCount: boolean;
11
+ density?: TextFieldDensity;
12
+ appearance?: TextFieldAppearance;
13
+ shape?: TextFieldShape;
14
+ userValid: boolean;
15
+ autoComplete?: string;
16
+ get errorValidationMessage(): string;
17
+ validate(): void;
18
+ }
19
+ export interface TextField extends AffixIcon {
20
+ }
21
+ export {};
@@ -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 { TextField } from './text-field';
5
+ export declare const TextfieldTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<TextField>;
@@ -0,0 +1,3 @@
1
+ import '../popup';
2
+ import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
3
+ export declare const vividTooltip: (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,8 @@
1
+ import { FoundationElement } from '@microsoft/fast-foundation';
2
+ import type { Placement } from '@floating-ui/dom';
3
+ export declare class Tooltip extends FoundationElement {
4
+ text?: string;
5
+ open: boolean;
6
+ corner?: Placement;
7
+ anchor?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import type { ViewTemplate } from '@microsoft/fast-element';
2
+ import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
3
+ import type { Tooltip } from './tooltip';
4
+ export declare const TooltipTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Tooltip>;
package/note/index.js ADDED
@@ -0,0 +1,68 @@
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/focus.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/export.js';
13
+ import '../shared/iterators.js';
14
+ import '../shared/to-string.js';
15
+ import '../shared/_has.js';
16
+ import '../shared/object-keys.js';
17
+
18
+ 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-color-primary);\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-color-primary: var(--vvd-color-success);\n}\n.base.connotation-info {\n --_connotation-color-primary: var(--vvd-color-info);\n}\n.base.connotation-alert {\n --_connotation-color-primary: var(--vvd-color-alert);\n}\n.base.connotation-warning {\n --_connotation-color-primary: var(--vvd-color-warning);\n}\n.base:not(.connotation-success, .connotation-info, .connotation-alert, .connotation-warning) {\n --_connotation-color-primary: var(--vvd-color-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 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}";
19
+ styleInject(css_248z);
20
+
21
+ class Note extends FoundationElement {}
22
+
23
+ __decorate([attr, __metadata("design:type", String)], Note.prototype, "heading", void 0);
24
+
25
+ __decorate([attr, __metadata("design:type", String)], Note.prototype, "connotation", void 0);
26
+
27
+ applyMixins(Note, AffixIcon);
28
+
29
+ let _ = t => t,
30
+ _t,
31
+ _t2,
32
+ _t3;
33
+ 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']]);
34
+
35
+ const getClasses = ({
36
+ connotation
37
+ }) => classNames('base', `connotation-${connotation}`);
38
+
39
+ function getHeaderTemplate() {
40
+ return html(_t || (_t = _`<div class="heading">${0}</div>`), x => x.heading);
41
+ }
42
+
43
+ function getIconType(note) {
44
+ return note.icon ? note.icon : note.connotation ? connotationIconMap.get(note.connotation) : 'megaphone-solid';
45
+ }
46
+
47
+ function getIconTemplate() {
48
+ return html(_t2 || (_t2 = _`<vwc-icon class="icon" type="${0}"></vwc-icon>`), getIconType);
49
+ }
50
+
51
+ const NoteTemplate = () => html(_t3 || (_t3 = _`
52
+ <div class="${0}">
53
+ ${0}
54
+ <div class="text">
55
+ ${0}
56
+ <slot class="message"></slot>
57
+ </div>
58
+ </div>
59
+ `), getClasses, getIconTemplate(), when(x => x.heading, getHeaderTemplate()));
60
+
61
+ const vividNote = Note.compose({
62
+ baseName: 'note',
63
+ template: NoteTemplate,
64
+ styles: css_248z
65
+ });
66
+ designSystem.register(vividNote());
67
+
68
+ export { vividNote };
package/package.json CHANGED
@@ -1,14 +1,45 @@
1
1
  {
2
2
  "name": "@vonage/vivid",
3
- "version": "3.0.0-next.2",
4
- "main": "./index.umd.js",
3
+ "version": "3.0.0-next.22",
4
+ "type": "module",
5
5
  "module": "./index.esm.js",
6
+ "main": "./index.js",
7
+ "exports": {
8
+ "./accordion": "./accordion",
9
+ "./accordion-item": "./accordion-item",
10
+ "./action-group": "./action-group",
11
+ "./badge": "./badge",
12
+ "./banner": "./banner",
13
+ "./breadcrumb": "./breadcrumb",
14
+ "./breadcrumb-item": "./breadcrumb-item",
15
+ "./button": "./button",
16
+ "./calendar": "./calendar",
17
+ "./calendar-event": "./calendar-event",
18
+ "./card": "./card",
19
+ "./elevation": "./elevation",
20
+ "./fab": "./fab",
21
+ "./icon": "./icon",
22
+ "./layout": "./layout",
23
+ "./note": "./note",
24
+ "./popup": "./popup",
25
+ "./progress": "./progress",
26
+ "./progress-ring": "./progress-ring",
27
+ "./side-drawer": "./side-drawer",
28
+ "./sidenav-item": "./sidenav-item",
29
+ "./text": "./text",
30
+ "./text-field": "./text-field",
31
+ "./tooltip": "./tooltip"
32
+ },
6
33
  "typings": "./index.d.ts",
7
34
  "dependencies": {
8
- "@microsoft/fast-element": "^1.7.0",
9
- "@microsoft/fast-foundation": "^2.33.3",
10
- "@microsoft/fast-web-utilities": "^5.1.0",
11
- "ramda": "^0.27.2"
35
+ "@microsoft/fast-element": "^1.10.2",
36
+ "@microsoft/fast-foundation": "^2.46.9",
37
+ "@microsoft/fast-web-utilities": "^5.4.1",
38
+ "ramda": "^0.27.2",
39
+ "@floating-ui/dom": "^0.5.2",
40
+ "blocking-elements": "^0.1.1",
41
+ "wicg-inert": "^3.1.2",
42
+ "babel-polyfill": "^6.26.0"
12
43
  },
13
44
  "peerDependencies": {}
14
45
  }