@dialpad/dialtone-vue 1.0.0-beta.test.4 → 1.0.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 +45 -33
- package/dist/dialtone-vue.common.js +4510 -2381
- package/dist/dialtone-vue.umd.js +4510 -2381
- package/dist/dialtone-vue.umd.min.js +1 -1
- package/package.json +10 -7
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Dialtone Vue 📞
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Dialtone Vue is a library of Vue components for [Dialtone][dt]. The goal is to simplify and standardize the use of common UI patterns and behaviour across all Dialpad projects.
|
|
4
4
|
|
|
5
5
|
**[Component Documentation Site ↗️][handbook]**
|
|
6
6
|
|
|
@@ -8,31 +8,31 @@ Handset is a library of Vue components for [Dialtone][dt]. The goal is to simpli
|
|
|
8
8
|
|
|
9
9
|
### Project Status
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Dialtone Vue is a new project, and as such it is under constant development as we add new components and refine existing ones. Please refer to the [project board][project] to see the status of Dialtone Vue components and request new components that should be in the Dialtone Vue library.
|
|
12
12
|
|
|
13
13
|
[project]: https://github.com/orgs/dialpad/projects/1
|
|
14
14
|
|
|
15
15
|
### Timeline
|
|
16
16
|
|
|
17
|
-
Our goal is to have a stable 1.0 release in
|
|
17
|
+
Our goal is to have a stable 1.0 release in Q3 2021. At this point, we will split Dialtone Vue into a separate repository and follow semantic versioning.
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Dialtone Vue components can be imported directly from the package. Some components also export named constants, which can be imported as well:
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
|
-
import {
|
|
24
|
+
import { DtInput, VALIDATION_MESSAGE_TYPES } from '@dialpad/dialtone-vue';
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Storybook Component Documentation
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Dialtone Vue uses [Storybook][storybook] for documentation of components, as well as an environment for local development. Please see the [Storybook Documentation Site][handbook] for specific usage information and interactive documentation for each Dialtone Vue component.
|
|
30
30
|
|
|
31
|
-
All components in
|
|
31
|
+
All components in Dialtone Vue should have stories written for them in Storybook. For more information on how to write stories, see the [documentation][stories].
|
|
32
32
|
|
|
33
33
|
[storybook]: https://storybook.js.org
|
|
34
|
-
[handbook]: https://
|
|
35
|
-
[stories]: https://
|
|
34
|
+
[handbook]: https://dialtone-vue.netlify.app
|
|
35
|
+
[stories]: https://dialtone-vue.netlify.app/?path=/story/docs-storybook-getting-started--page
|
|
36
36
|
|
|
37
37
|
### Running Storybook Locally
|
|
38
38
|
|
|
@@ -41,7 +41,7 @@ Storybook provides a sandbox to develop and experiment with components locally,
|
|
|
41
41
|
To run Storybook locally, first install the dependencies:
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
npm run install
|
|
44
|
+
npm run storybook:install
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Then you can run the dev server:
|
|
@@ -50,55 +50,67 @@ Then you can run the dev server:
|
|
|
50
50
|
npm run storybook
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
## Developing
|
|
53
|
+
## Developing Dialtone Vue Components
|
|
54
54
|
|
|
55
|
-
Building components for
|
|
55
|
+
Building components for Dialtone Vue is similar to components for Dialpad or UberConference, but there are some differences. Remember that Dialtone Vue is a shared library so more care has to be taken to avoid breaking changes.
|
|
56
56
|
|
|
57
|
-
Remember that
|
|
57
|
+
Remember that Dialtone Vue is a separate project, so be sure to run the lint and unit tests for Dialtone Vue separately whenever making changes to the library.
|
|
58
58
|
|
|
59
59
|
See [CONTRIBUTING](./CONTRIBUTING.md).
|
|
60
60
|
|
|
61
|
+
### Project Setup
|
|
62
|
+
|
|
63
|
+
#### NPM_AUTH_TOKEN
|
|
64
|
+
|
|
65
|
+
Ensure that `NPM_AUTH_TOKEN` is set in your path. You will need to set the token to an NPM authentication token which has read level access to the `@dialpad` organization.
|
|
66
|
+
|
|
67
|
+
#### Install Dependencies
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install
|
|
71
|
+
```
|
|
72
|
+
|
|
61
73
|
### CSS & Dialtone
|
|
62
74
|
|
|
63
|
-
Dialtone components should utilize the global immutable CSS classes provided by Dialtone whenever possible. It is a requirement of any project using
|
|
75
|
+
Dialtone components should utilize the global immutable CSS classes provided by Dialtone whenever possible. It is a requirement of any project using Dialtone Vue to include these classes.
|
|
64
76
|
|
|
65
77
|
If needed, you can also write custom CSS using the Dialtone LESS variables or mixins by importing `../css/dialtone.less`.
|
|
66
78
|
|
|
67
|
-
Please **do not** use any scoped CSS in
|
|
79
|
+
Please **do not** use any scoped CSS in Dialtone Vue components.
|
|
68
80
|
|
|
69
81
|
### Unit Tests
|
|
70
82
|
|
|
71
|
-
Each component should have a corresponding unit test in the `tests/specs` directory. There is no special test setup as
|
|
83
|
+
Each component should have a corresponding unit test in the `tests/specs` directory. There is no special test setup as Dialtone Vue components do not have access to the Vuex store or custom methods/directives.
|
|
72
84
|
|
|
73
85
|
### Exports
|
|
74
86
|
|
|
75
|
-
When adding a new component, please add its exports to `index.js`, including any named exports, so they're available for import to users of
|
|
87
|
+
When adding a new component, please add its exports to `index.js`, including any named exports, so they're available for import to users of Dialtone Vue:
|
|
76
88
|
|
|
77
89
|
```js
|
|
78
90
|
export {
|
|
79
|
-
default as
|
|
80
|
-
|
|
91
|
+
default as DtInput,
|
|
92
|
+
INPUT_SIZES,
|
|
81
93
|
} from './components/input.vue';
|
|
82
94
|
```
|
|
83
95
|
|
|
84
96
|
### External Dependencies
|
|
85
97
|
|
|
86
|
-
|
|
98
|
+
Dialtone Vue components are designed to be used in a variety of different projects. As such, Dialtone Vue components should be pure Vue components with no dependencies on global Vue plugins or stores, except when noted below. This in particular means:
|
|
87
99
|
|
|
88
|
-
- **No access to the Vuex store.** Different projects will have different store structures, and so
|
|
89
|
-
- **No I18n.** Each project will have its own i18n implementation. Any text needed in a
|
|
90
|
-
- **No custom directives.** Directives in Vue are installed globally and vary from project to project. Custom directives (such as `v-tooltip`) cannot be used in
|
|
91
|
-
- **No other custom global methods.** Some projects may implement custom global methods on the Vue object.
|
|
92
|
-
- **No imports outside of the
|
|
93
|
-
- **Vue 2 compatibility.**
|
|
100
|
+
- **No access to the Vuex store.** Different projects will have different store structures, and so Dialtone Vue components cannot access the Vuex store. Dialtone Vue components should take data as props only.
|
|
101
|
+
- **No I18n.** Each project will have its own i18n implementation. Any text needed in a Dialtone Vue component should be passed as props or slots.
|
|
102
|
+
- **No custom directives.** Directives in Vue are installed globally and vary from project to project. Custom directives (such as `v-tooltip`) cannot be used in Dialtone Vue components.
|
|
103
|
+
- **No other custom global methods.** Some projects may implement custom global methods on the Vue object. Dialtone Vue components are limited to the built-in Vue methods.
|
|
104
|
+
- **No imports outside of the dialtone-vue directory.**
|
|
105
|
+
- **Vue 2 compatibility.** Dialtone Vue components should ideally support Vue 2 and 3, but a minimum of Vue 2 support is currently required.
|
|
94
106
|
|
|
95
|
-
## Using
|
|
107
|
+
## Using Dialtone Vue in your Project
|
|
96
108
|
|
|
97
|
-
Project using
|
|
109
|
+
Project using Dialtone Vue should be aware of the requirements:
|
|
98
110
|
|
|
99
|
-
- Dialtone classes must be made available globally (to avoid duplication,
|
|
100
|
-
- A tool like Webpack must be used to package the SFC components from
|
|
111
|
+
- Dialtone classes must be made available globally (to avoid duplication, Dialtone Vue does not do this for you).
|
|
112
|
+
- A tool like Webpack must be used to package the SFC components from Dialtone Vue.
|
|
101
113
|
- LESS preprocessor support for Vue SFC `<style>` blocks.
|
|
102
|
-
-
|
|
114
|
+
- Dialtone Vue components are built for Vue 2, with Vue 3 support coming soon.
|
|
103
115
|
|
|
104
|
-
These requirements are enforced via peerdependencies of
|
|
116
|
+
These requirements are enforced via peerdependencies of Dialtone Vue when possible.
|