@vonage/vivid 3.0.0-next.43 → 3.0.0-next.46
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 +113 -34
- package/checkbox/index.js +1 -4
- package/index.js +5 -3
- package/lib/components.d.ts +4 -2
- package/lib/menu/index.d.ts +11 -0
- package/lib/menu/menu.d.ts +7 -0
- package/lib/menu/menu.template.d.ts +3 -0
- package/lib/nav/index.d.ts +2 -0
- package/lib/{sidenav/sidenav.d.ts → nav/nav.d.ts} +1 -1
- package/lib/nav/nav.template.d.ts +4 -0
- package/lib/nav-disclosure/index.d.ts +4 -0
- package/lib/{sidenav-disclosure/sidenav-disclosure.d.ts → nav-disclosure/nav-disclosure.d.ts} +2 -2
- package/lib/nav-disclosure/nav-disclosure.template.d.ts +4 -0
- package/lib/{sidenav → nav-item}/index.d.ts +3 -1
- package/lib/{sidenav-item/sidenav-item.d.ts → nav-item/nav-item.d.ts} +2 -2
- package/lib/{sidenav/sidenav.template.d.ts → nav-item/nav-item.template.d.ts} +2 -2
- package/menu/index.js +661 -0
- package/nav/index.js +17 -0
- package/{sidenav-disclosure → nav-disclosure}/index.js +15 -15
- package/{sidenav-item → nav-item}/index.js +8 -8
- package/package.json +16 -5
- package/popup/index.js +13 -2107
- package/progress-ring/index.js +1 -1
- package/shared/form-associated.js +10 -1
- package/shared/icon.js +1 -1
- package/shared/index3.js +2109 -0
- package/tooltip/index.js +1 -1
- package/lib/sidenav-disclosure/index.d.ts +0 -4
- package/lib/sidenav-disclosure/sidenav-disclosure.template.d.ts +0 -4
- package/lib/sidenav-item/index.d.ts +0 -4
- package/lib/sidenav-item/sidenav-item.template.d.ts +0 -4
- package/sidenav/index.js +0 -17
package/README.md
CHANGED
|
@@ -1,52 +1,131 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[![Apache 2.0 License][license-shield]][license-url]
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<h6>
|
|
16
|
-
Vonage's design system platform targeted to provide </br>incorporated, battery-charged web components.
|
|
17
|
-
</h6>
|
|
18
|
-
<a class="home-page-hero-docs-btn" href="https://vivid.deno.dev"><strong>Explore the docs</strong></a>
|
|
19
|
-
<div class="home-page-hero-docs-links">
|
|
20
|
-
<a href="https://github.com/Vonage/vivid-3/issues/new?assignees=&labels=&template=bug_report.md&title=">Report Bug</a>
|
|
21
|
-
<span>|</span>
|
|
22
|
-
<a href="https://github.com/Vonage/vivid-3/issues/new?assignees=&labels=&template=feature_request.md&title=">Request Feature</a>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
### Installation
|
|
27
|
-
|
|
28
|
-
run:
|
|
1
|
+
|
|
2
|
+
# Vivid UI
|
|
3
|
+
|
|
4
|
+
Essential UI **web components** for building modern web applications, bound to provide a **safe**, **simple** and **intuitive** interface.
|
|
5
|
+
|
|
6
|
+
<!-- ! TODO add visual - GIF or image reflecting an easy integration of vivid in code and page result -->
|
|
7
|
+

|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
To integrate Vivid components into your project, run:
|
|
29
12
|
|
|
30
13
|
```bash
|
|
31
|
-
npm install @vonage/vivid
|
|
14
|
+
npm install @vonage/vivid # or yarn add @vonage/vivid
|
|
32
15
|
```
|
|
33
16
|
|
|
34
|
-
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Import components in your project via [side effect imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#import_a_module_for_its_side_effects_only):
|
|
35
20
|
|
|
36
21
|
```js
|
|
37
22
|
import '@vonage/vivid/button';
|
|
38
23
|
```
|
|
39
24
|
|
|
25
|
+
And include in HTML:
|
|
26
|
+
|
|
40
27
|
```html
|
|
41
28
|
<vwc-button label="Click me"></vwc-button>
|
|
42
29
|
```
|
|
43
30
|
|
|
31
|
+
For a full list of components and API, explore the [components docs](https://vivid.deno.dev/components/accordion/) 📚.
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
The Vivid components library rely on a set of **core styles** to:
|
|
36
|
+
|
|
37
|
+
- Be present in the DOM
|
|
38
|
+
|
|
39
|
+
- Be shared across all components
|
|
40
|
+
|
|
41
|
+
- Apply common design identities (such as colors, typography, spacing etc')
|
|
42
|
+
|
|
43
|
+
- Ensure the components look as intended.
|
|
44
|
+
|
|
45
|
+
As the task of loading css is not trivial, and may vary from project to project, this library does not provide any way to load the css. It is up to the author to load the css in the most appropriate manner for their project.
|
|
46
|
+
|
|
47
|
+
To **include the styles**, css files must be loaded into the project from the `node_modules/@vonage/vivid/styles` folder.
|
|
48
|
+
|
|
49
|
+
The folder contains the following files:
|
|
50
|
+
|
|
51
|
+
- Fonts
|
|
52
|
+
|
|
53
|
+
- `fonts/spezia.css` - Loads the *Spezia* variable font and specifies its font face definition. *Spezia* is Vonage's branded font and is required by most Vivid components
|
|
54
|
+
|
|
55
|
+
- Themes - only one theme can apply at a time. thus, only one is required to be loaded
|
|
56
|
+
|
|
57
|
+
- `themes/light.css` - Light theme
|
|
58
|
+
|
|
59
|
+
- `themes/dark.css` - Dark theme
|
|
60
|
+
|
|
61
|
+
Note: scss users can simply [forward](https://sass-lang.com/documentation/at-rules/forward) the styles to their scss project:
|
|
62
|
+
|
|
63
|
+
```css
|
|
64
|
+
@forward 'node_modules/@vonage/vivid/styles/fonts/spezia';
|
|
65
|
+
@forward 'node_modules/@vonage/vivid/styles/themes/light';
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Support
|
|
69
|
+
|
|
70
|
+
This library is open source, developed and maintained by the [Vonage Vivid team](Vonage/vivid).
|
|
71
|
+
|
|
72
|
+
For any questions, please open a [bug report](https://github.com/Vonage/vivid-3/issues/new?assignees=&labels=&template=bug_report.md&title=) or [feature request](https://github.com/Vonage/vivid-3/issues/new?assignees=&labels=&template=feature_request.md&title=).
|
|
73
|
+
|
|
44
74
|
## Roadmap
|
|
45
75
|
|
|
46
|
-
[
|
|
76
|
+
- View [components status](https://github.com/orgs/Vonage/projects/6)
|
|
77
|
+
|
|
78
|
+
- [What's on our plate](https://github.com/orgs/Vonage/projects/3/views/7)
|
|
79
|
+
|
|
80
|
+
- See the [open issues](https://github.com/vonage/vivid-3/issues) for a full list of proposed features (and known issues).
|
|
81
|
+
|
|
82
|
+
We publish a *next* release on every successful merge to main, so you never need to wait for a new stable version to make use of any updates.
|
|
83
|
+
|
|
84
|
+
## Contributing
|
|
85
|
+
|
|
86
|
+
Please read [CONTRIBUTING.md](.github/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
|
|
87
|
+
|
|
88
|
+
## Versioning
|
|
89
|
+
|
|
90
|
+
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [npm page](https://www.npmjs.com/package/@vonage/vivid).
|
|
91
|
+
|
|
92
|
+
## Authors
|
|
93
|
+
|
|
94
|
+
See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
|
|
47
95
|
|
|
48
|
-
|
|
96
|
+
## License
|
|
49
97
|
|
|
50
|
-
|
|
98
|
+
This project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details
|
|
51
99
|
|
|
52
|
-
|
|
100
|
+
<!-- ## Acknowledgments
|
|
101
|
+
|
|
102
|
+
- Hat tip to anyone whose code was used
|
|
103
|
+
- Inspiration
|
|
104
|
+
- etc -->
|
|
105
|
+
|
|
106
|
+
## Built With
|
|
107
|
+
|
|
108
|
+
- [Fast](https://www.fast.design) - to extend element classes and compile code to native web components
|
|
109
|
+
- [Typescript](https://www.typescriptlang.org) - for ergonomic and type-safe code
|
|
110
|
+
- [Sass](https://sass-lang.com) - for styles authoring extensibility and consistency
|
|
111
|
+
|
|
112
|
+
## Quickstart
|
|
113
|
+
|
|
114
|
+
Global content delivery networks can help quickly integrate content within html pages, fetching content from an URL, skipping local builds entirely.
|
|
115
|
+
Such practice is often used when working on POCs or reproduction environments.
|
|
116
|
+
Tools like [UNPKG](https://unpkg.com), [jsDeliver](https://www.jsdelivr.com), [Skypack](https://www.skypack.dev) etc' are bound to deliver any content registered in the npm registry.
|
|
117
|
+
|
|
118
|
+
The following snippet fully renders a Vivid button component
|
|
119
|
+
|
|
120
|
+
```html
|
|
121
|
+
<!-- import spezia font -->
|
|
122
|
+
<link rel="stylesheet" href="https://unpkg.com/@vonage/vivid@next/styles/fonts/spezia.css">
|
|
123
|
+
|
|
124
|
+
<!-- import light theme style tokens -->
|
|
125
|
+
<link rel="stylesheet" href="https://unpkg.com/@vonage/vivid@next/styles/themes/light.css">
|
|
126
|
+
|
|
127
|
+
<!-- import Vivid button component -->
|
|
128
|
+
<script type="module" src="https://unpkg.com/@vonage/vivid@next/button/index.js"></script>
|
|
129
|
+
|
|
130
|
+
<vwc-button label="Click me" appearance="filled" connotation="cta"></vwc-button>
|
|
131
|
+
```
|
package/checkbox/index.js
CHANGED
|
@@ -166,10 +166,7 @@ const CheckboxTemplate = context => {
|
|
|
166
166
|
const vividCheckbox = Checkbox.compose({
|
|
167
167
|
baseName: 'checkbox',
|
|
168
168
|
template: CheckboxTemplate,
|
|
169
|
-
styles: css_248z
|
|
170
|
-
shadowOptions: {
|
|
171
|
-
delegatesFocus: true
|
|
172
|
-
}
|
|
169
|
+
styles: css_248z
|
|
173
170
|
});
|
|
174
171
|
designSystem.register(vividCheckbox());
|
|
175
172
|
|
package/index.js
CHANGED
|
@@ -13,13 +13,15 @@ export { v as vividElevation } from './shared/index2.js';
|
|
|
13
13
|
export { vividFab } from './fab/index.js';
|
|
14
14
|
export { vividIcon } from './icon/index.js';
|
|
15
15
|
export { vividLayout } from './layout/index.js';
|
|
16
|
+
export { vividMenu } from './menu/index.js';
|
|
16
17
|
export { vividNote } from './note/index.js';
|
|
17
|
-
export { vividPopup } from './
|
|
18
|
+
export { v as vividPopup } from './shared/index3.js';
|
|
18
19
|
export { vividProgress } from './progress/index.js';
|
|
19
20
|
export { vividProgressRing } from './progress-ring/index.js';
|
|
20
21
|
export { vividSideDrawer } from './side-drawer/index.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
22
|
+
export { vividNav } from './nav/index.js';
|
|
23
|
+
export { vividNavItem } from './nav-item/index.js';
|
|
24
|
+
export { vividNavDisclosure } from './nav-disclosure/index.js';
|
|
23
25
|
export { vividText } from './text/index.js';
|
|
24
26
|
export { vividTextfield } from './text-field/index.js';
|
|
25
27
|
export { vividTooltip } from './tooltip/index.js';
|
package/lib/components.d.ts
CHANGED
|
@@ -13,13 +13,15 @@ export * from './elevation';
|
|
|
13
13
|
export * from './fab';
|
|
14
14
|
export * from './icon';
|
|
15
15
|
export * from './layout';
|
|
16
|
+
export * from './menu';
|
|
16
17
|
export * from './note';
|
|
17
18
|
export * from './popup';
|
|
18
19
|
export * from './progress';
|
|
19
20
|
export * from './progress-ring';
|
|
20
21
|
export * from './side-drawer';
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
22
|
+
export * from './nav';
|
|
23
|
+
export * from './nav-item';
|
|
24
|
+
export * from './nav-disclosure';
|
|
23
25
|
export * from './text';
|
|
24
26
|
export * from './text-field';
|
|
25
27
|
export * from './tooltip';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import '../popup';
|
|
2
|
+
import { Menu } from './menu';
|
|
3
|
+
export declare const vividMenu: (overrideDefinition?: import("@microsoft/fast-foundation").OverrideFoundationElementDefinition<{
|
|
4
|
+
baseName: string;
|
|
5
|
+
template: any;
|
|
6
|
+
styles: import("@microsoft/fast-element").ComposableStyles;
|
|
7
|
+
}> | undefined) => import("@microsoft/fast-foundation").FoundationElementRegistry<{
|
|
8
|
+
baseName: string;
|
|
9
|
+
template: any;
|
|
10
|
+
styles: import("@microsoft/fast-element").ComposableStyles;
|
|
11
|
+
}, typeof Menu>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ElementViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
export declare const MenuTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ElementViewTemplate;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
+
export declare const vividNav: (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,4 @@
|
|
|
1
|
+
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
|
+
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
+
import type { Nav } from './nav';
|
|
4
|
+
export declare const NavTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<Nav>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '../icon';
|
|
2
|
+
import '../focus';
|
|
3
|
+
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
4
|
+
export declare const vividNavDisclosure: (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/{sidenav-disclosure/sidenav-disclosure.d.ts → nav-disclosure/nav-disclosure.d.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { FoundationElement } from '@microsoft/fast-foundation';
|
|
2
2
|
import { AffixIcon } from '../../shared/patterns/affix';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class NavDisclosure extends FoundationElement {
|
|
4
4
|
#private;
|
|
5
5
|
details: HTMLDetailsElement;
|
|
6
6
|
label?: string;
|
|
7
7
|
open: boolean;
|
|
8
8
|
}
|
|
9
|
-
export interface
|
|
9
|
+
export interface NavDisclosure extends AffixIcon {
|
|
10
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 { NavDisclosure } from './nav-disclosure';
|
|
4
|
+
export declare const NavDisclosureTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<NavDisclosure>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import '../icon';
|
|
2
|
+
import '../focus';
|
|
1
3
|
import type { FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
2
|
-
export declare const
|
|
4
|
+
export declare const vividNavItem: (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,6 +1,6 @@
|
|
|
1
1
|
import { AffixIcon } from '../../shared/patterns/affix';
|
|
2
2
|
import { TextAnchor } from '../text-anchor/text-anchor';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class NavItem extends TextAnchor {
|
|
4
4
|
}
|
|
5
|
-
export interface
|
|
5
|
+
export interface NavItem extends AffixIcon {
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ViewTemplate } from '@microsoft/fast-element';
|
|
2
2
|
import type { ElementDefinitionContext, FoundationElementDefinition } from '@microsoft/fast-foundation';
|
|
3
|
-
import type {
|
|
4
|
-
export declare const
|
|
3
|
+
import type { NavItem } from './nav-item';
|
|
4
|
+
export declare const NavItemTemplate: (context: ElementDefinitionContext, definition: FoundationElementDefinition) => ViewTemplate<NavItem>;
|