@dialpad/dialtone 9.34.2 → 9.34.3
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 +185 -169
- package/dist/css/dialtone.css +7 -2
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/css/variables-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-light.css +1 -1
- package/dist/tokens/css/variables-expressive-sm-dark.css +1 -1
- package/dist/tokens/css/variables-expressive-sm-light.css +1 -1
- package/dist/tokens/css/variables-light.css +1 -1
- package/dist/tokens/css/variables-tmo-dark.css +1 -1
- package/dist/tokens/css/variables-tmo-light.css +1 -1
- package/dist/tokens/less/variables-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-light.less +1 -1
- package/dist/tokens/less/variables-expressive-sm-dark.less +1 -1
- package/dist/tokens/less/variables-expressive-sm-light.less +1 -1
- package/dist/tokens/less/variables-light.less +1 -1
- package/dist/tokens/less/variables-tmo-dark.less +1 -1
- package/dist/tokens/less/variables-tmo-light.less +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -2,6 +2,104 @@
|
|
|
2
2
|
|
|
3
3
|
The monorepo for Dialpad's design system Dialtone.
|
|
4
4
|
|
|
5
|
+
All packages of the monorepo are combined into a single Dialtone package for ease of use, however all separate packages of dialtone are also deployed individually. If you would like to use an individual package rather than the combined Dialtone package, you can find documentation for each package in the readme under the respective packages folder. The below usage instructions are for the combined package.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### Install it via NPM:
|
|
10
|
+
|
|
11
|
+
#### Vue 3
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
npm install @dialpad/dialtone@next @tiptap/vue-3
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
#### Vue 2
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
npm install @dialpad/dialtone@next @linusborg/vue-simple-portal @tiptap/vue-2
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Import packages:
|
|
24
|
+
|
|
25
|
+
#### Dialtone CSS
|
|
26
|
+
|
|
27
|
+
Dialtone CSS includes all utility classes as well as tokens.
|
|
28
|
+
|
|
29
|
+
- CSS
|
|
30
|
+
|
|
31
|
+
```css
|
|
32
|
+
@import "@dialpad/dialtone/css";
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- Javascript
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
import "@dialpad/dialtone/css";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
If you are using the Vue components, then import either Vue 2 or Vue 3 css:
|
|
42
|
+
|
|
43
|
+
- CSS
|
|
44
|
+
|
|
45
|
+
```css
|
|
46
|
+
@import "@dialpad/dialtone/vue2/css";
|
|
47
|
+
/* Or */
|
|
48
|
+
@import "@dialpad/dialtone/vue3/css";
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
- Javascript
|
|
52
|
+
|
|
53
|
+
```js
|
|
54
|
+
import "@dialpad/dialtone/vue2/css";
|
|
55
|
+
/* Or */
|
|
56
|
+
import "@dialpad/dialtone/vue3/css";
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
#### Dialtone icons
|
|
60
|
+
|
|
61
|
+
- Vue 2:
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
// Named import
|
|
65
|
+
import { DtIconArrowUp } from '@dialpad/dialtone-icons/vue2';
|
|
66
|
+
|
|
67
|
+
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
68
|
+
import DtIconArrowUp from '@dialpad/dialtone-icons/vue2/arrow-up';
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
- Vue 3:
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
// Named import
|
|
75
|
+
import { DtIconArrowUp } from '@dialpad/dialtone-icons/vue3';
|
|
76
|
+
|
|
77
|
+
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
78
|
+
import DtIconArrowUp from '@dialpad/dialtone-icons/vue3/arrow-up';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Dialtone Vue components
|
|
82
|
+
|
|
83
|
+
- Vue 2
|
|
84
|
+
|
|
85
|
+
```js
|
|
86
|
+
// Named import
|
|
87
|
+
import { DtButton } from "@dialpad/dialtone/vue2"
|
|
88
|
+
|
|
89
|
+
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
90
|
+
import { DtButton } from "@dialpad/dialtone/vue2/lib/button"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
- Vue 3
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
// Named import
|
|
97
|
+
import { DtButton } from "@dialpad/dialtone/vue3"
|
|
98
|
+
|
|
99
|
+
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
100
|
+
import { DtButton } from "@dialpad/dialtone/vue3/lib/button"
|
|
101
|
+
```
|
|
102
|
+
|
|
5
103
|
## About this repo
|
|
6
104
|
|
|
7
105
|
The @dialpad/dialtone repository is a monorepo composed of Dialtone NPM packages and apps.
|
|
@@ -16,6 +114,7 @@ dialtone/
|
|
|
16
114
|
|--- dialtone-documentation # Documentation site
|
|
17
115
|
|--- packages # NPM packages
|
|
18
116
|
|--- dialtone-css # CSS library
|
|
117
|
+
|--- dialtone-emojis # Emoji assets
|
|
19
118
|
|--- dialtone-vue2 # Vue component library compatible with vue@2
|
|
20
119
|
|--- dialtone-vue3 # Vue component library compatible with vue@3
|
|
21
120
|
|--- dialtone-icons # SVG icons library
|
|
@@ -25,33 +124,55 @@ dialtone/
|
|
|
25
124
|
|--- scripts # Shared scripts
|
|
26
125
|
```
|
|
27
126
|
|
|
28
|
-
##
|
|
127
|
+
## Contributing
|
|
128
|
+
|
|
129
|
+
Please read our [contributing guide](.github/CONTRIBUTING.md) **before submitting a pull request**.
|
|
130
|
+
|
|
131
|
+
### Quick start
|
|
132
|
+
|
|
133
|
+
If you would like to contribute to Dialtone without having to do any local environment setup, you can use GitHub
|
|
134
|
+
Codespaces. You can initialize a new Codespace by clicking the green "Code" button at the top right of the Dialtone
|
|
135
|
+
GitHub page.
|
|
136
|
+
|
|
137
|
+

|
|
138
|
+
|
|
139
|
+
Please see the [Codespaces docs](./.github/codespaces.md) for more information.
|
|
140
|
+
|
|
141
|
+
### Local development
|
|
29
142
|
|
|
30
|
-
|
|
143
|
+
#### PNPM
|
|
31
144
|
|
|
32
145
|
PNPM (Performant NPM) is a package management solution designed to address the challenges posed by
|
|
33
146
|
traditional package managers.
|
|
34
147
|
|
|
35
148
|
We use PNPM to manage everything related to NPM, **adding, installing, removing and publishing packages**.
|
|
36
149
|
|
|
37
|
-
|
|
150
|
+
You will need to install PNPM locally to contribute to this project. <https://pnpm.io/installation>
|
|
151
|
+
|
|
152
|
+
##### Installation
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
npm install -g pnpm
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
##### Do
|
|
38
159
|
|
|
39
|
-
Use PNPM to manage
|
|
160
|
+
Use PNPM to manage package dependencies
|
|
40
161
|
|
|
41
162
|
```bash
|
|
42
163
|
pnpm add eslint --filter dialtone-icons
|
|
43
164
|
```
|
|
44
165
|
|
|
45
|
-
|
|
166
|
+
##### Don't
|
|
46
167
|
|
|
47
168
|
Run package scripts with PNPM, this will not use NX cache and pipelines,
|
|
48
169
|
so you might end up missing dependencies that needed to be built before.
|
|
49
170
|
|
|
50
171
|
```bash
|
|
51
|
-
pnpm run --filter
|
|
172
|
+
pnpm run --filter dialtone-css build
|
|
52
173
|
```
|
|
53
174
|
|
|
54
|
-
|
|
175
|
+
#### NX
|
|
55
176
|
|
|
56
177
|
Nx is a build system with built-in tooling and advanced CI capabilities.
|
|
57
178
|
It helps you maintain and scale monorepos, both locally and on CI.
|
|
@@ -74,7 +195,15 @@ if they need to run before a specific command.
|
|
|
74
195
|
|
|
75
196
|
For more information, check [setup a monorepo with PNPM workspaces and NX](https://blog.nrwl.io/setup-a-monorepo-with-pnpm-workspaces-and-speed-it-up-with-nx-bc5d97258a7e#d69f)
|
|
76
197
|
|
|
77
|
-
|
|
198
|
+
##### Installation
|
|
199
|
+
|
|
200
|
+
It is recommended to install NX globally via:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
pnpm add --global nx@latest
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
##### Do
|
|
78
207
|
|
|
79
208
|
Use NX to run scripts, this will use cache, improve the performance,
|
|
80
209
|
and build any dependency needed before running your command.
|
|
@@ -83,7 +212,7 @@ and build any dependency needed before running your command.
|
|
|
83
212
|
nx run dialtone-css:build
|
|
84
213
|
```
|
|
85
214
|
|
|
86
|
-
|
|
215
|
+
##### Don't
|
|
87
216
|
|
|
88
217
|
Try installing packages with NX, this doesn't work at all, please use PNPM instead.
|
|
89
218
|
|
|
@@ -91,87 +220,95 @@ Try installing packages with NX, this doesn't work at all, please use PNPM inste
|
|
|
91
220
|
nx add eslint --filter dialtone-icons
|
|
92
221
|
```
|
|
93
222
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
If you would like to contribute to Dialtone without having to do any local environment setup, you can use GitHub
|
|
97
|
-
Codespaces. You can initialize a new Codespace by clicking the green "Code" button at the top right of the Dialtone
|
|
98
|
-
GitHub page.
|
|
99
|
-
|
|
100
|
-

|
|
223
|
+
#### Running the projects
|
|
101
224
|
|
|
102
|
-
|
|
225
|
+
First, install the dependencies for all the monorepo packages and apps.
|
|
103
226
|
|
|
104
|
-
|
|
227
|
+
```bash
|
|
228
|
+
pnpm install
|
|
229
|
+
```
|
|
105
230
|
|
|
106
|
-
|
|
107
|
-
in order to be able to manage the packages. In order to install it, run the following command
|
|
108
|
-
or follow its [installation guide](https://pnpm.io/installation):
|
|
231
|
+
##### Dialtone documentation site
|
|
109
232
|
|
|
110
233
|
```bash
|
|
111
|
-
|
|
234
|
+
nx start:dialtone
|
|
112
235
|
```
|
|
113
236
|
|
|
114
|
-
|
|
115
|
-
|
|
237
|
+
This will start the documentation site and watch the library for changes, it will be live updated with any changes.
|
|
238
|
+
|
|
239
|
+
Access the local server at `http://localhost:4000`
|
|
240
|
+
|
|
241
|
+
##### Dialtone Vue 2 storybook
|
|
116
242
|
|
|
117
243
|
```bash
|
|
118
|
-
|
|
244
|
+
nx start:dialtone-vue2
|
|
119
245
|
```
|
|
120
246
|
|
|
121
|
-
|
|
247
|
+
Access the local storybook server for Dialtone Vue 2 via `http://localhost:9010/`
|
|
248
|
+
|
|
249
|
+
##### Dialtone Vue 3 storybook
|
|
122
250
|
|
|
123
251
|
```bash
|
|
124
|
-
|
|
252
|
+
nx start:dialtone-vue3
|
|
125
253
|
```
|
|
126
254
|
|
|
127
|
-
|
|
255
|
+
Access the local storybook server for Dialtone Vue 3 via `http://localhost:9011/`
|
|
256
|
+
|
|
257
|
+
#### Common Commands
|
|
128
258
|
|
|
129
|
-
|
|
259
|
+
##### Production build the root project
|
|
130
260
|
|
|
131
261
|
```bash
|
|
132
|
-
nx
|
|
262
|
+
nx build
|
|
133
263
|
```
|
|
134
264
|
|
|
135
|
-
|
|
265
|
+
##### Run all Vue unit tests
|
|
136
266
|
|
|
137
|
-
|
|
267
|
+
```bash
|
|
268
|
+
nx test
|
|
269
|
+
```
|
|
138
270
|
|
|
139
|
-
|
|
271
|
+
##### Run Vue 2 tests
|
|
140
272
|
|
|
141
273
|
```bash
|
|
142
|
-
nx
|
|
274
|
+
nx test dialtone-vue2
|
|
143
275
|
```
|
|
144
276
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
#### Dialtone Vue 3:
|
|
277
|
+
##### Run Vue 3 tests
|
|
148
278
|
|
|
149
279
|
```bash
|
|
150
|
-
nx
|
|
280
|
+
nx test dialtone-vue3
|
|
151
281
|
```
|
|
152
282
|
|
|
153
|
-
|
|
283
|
+
Use the `--filter` flag to run commands for a specific package or app.
|
|
154
284
|
|
|
155
|
-
|
|
285
|
+
##### Adding dependencies for individual packages
|
|
156
286
|
|
|
157
|
-
|
|
158
|
-
|
|
287
|
+
```bash
|
|
288
|
+
pnpm add <dependency> --filter <package or app name>
|
|
289
|
+
```
|
|
159
290
|
|
|
160
|
-
|
|
291
|
+
Example:
|
|
161
292
|
|
|
162
293
|
```bash
|
|
163
|
-
pnpm add
|
|
294
|
+
pnpm add eslint --filter dialtone-icons
|
|
164
295
|
```
|
|
165
296
|
|
|
166
297
|
To install a local dependency, just add the `--workspace` flag
|
|
167
298
|
|
|
168
299
|
```bash
|
|
169
|
-
pnpm add <dependency> --filter <package
|
|
300
|
+
pnpm add <dependency> --filter <package or app name> --workspace
|
|
170
301
|
```
|
|
171
302
|
|
|
172
|
-
|
|
303
|
+
Example:
|
|
173
304
|
|
|
174
|
-
|
|
305
|
+
```bash
|
|
306
|
+
pnpm add @dialpad/dialtone-tokens --filter dialtone-icons --workspace
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
##### Running commands for individual packages
|
|
310
|
+
|
|
311
|
+
You can run commands like `build`, `test`, `start` for individual packages from
|
|
175
312
|
the root of the project with:
|
|
176
313
|
|
|
177
314
|
```bash
|
|
@@ -210,7 +347,7 @@ This can only be run while on **staging** branch. After running the command, it
|
|
|
210
347
|
5. Merge changes from `production` back to `staging`
|
|
211
348
|
|
|
212
349
|
```bash
|
|
213
|
-
nx run
|
|
350
|
+
nx run release
|
|
214
351
|
```
|
|
215
352
|
|
|
216
353
|
#### Alpha/Beta
|
|
@@ -232,124 +369,3 @@ nx run dialtone:release:alpha
|
|
|
232
369
|
```bash
|
|
233
370
|
nx run dialtone:release:beta
|
|
234
371
|
```
|
|
235
|
-
|
|
236
|
-
## Usage
|
|
237
|
-
|
|
238
|
-
### Install it via NPM:
|
|
239
|
-
|
|
240
|
-
#### Vue 3
|
|
241
|
-
|
|
242
|
-
```shell
|
|
243
|
-
npm install @dialpad/dialtone@next @tiptap/vue-3
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
#### Vue 2
|
|
247
|
-
|
|
248
|
-
```shell
|
|
249
|
-
npm install @dialpad/dialtone@next @linusborg/vue-simple-portal @tiptap/vue-2
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Import packages:
|
|
253
|
-
|
|
254
|
-
#### Dialtone CSS
|
|
255
|
-
|
|
256
|
-
- CSS
|
|
257
|
-
|
|
258
|
-
```css
|
|
259
|
-
@import "@dialpad/dialtone/css";
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
- Javascript
|
|
263
|
-
|
|
264
|
-
```js
|
|
265
|
-
import "@dialpad/dialtone/css";
|
|
266
|
-
```
|
|
267
|
-
|
|
268
|
-
#### Dialtone eslint-plugin
|
|
269
|
-
|
|
270
|
-
```js
|
|
271
|
-
import dialtone from "@dialpad/dialtone/eslint-plugin"
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
#### Dialtone icons
|
|
275
|
-
|
|
276
|
-
- Importing for Vue 2:
|
|
277
|
-
|
|
278
|
-
```js
|
|
279
|
-
// Named import
|
|
280
|
-
import { DtIconArrowUp } from '@dialpad/dialtone-icons/vue2';
|
|
281
|
-
|
|
282
|
-
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
283
|
-
import DtIconArrowUp from '@dialpad/dialtone-icons/vue2/arrow-up';
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
- Importing for Vue 3:
|
|
287
|
-
|
|
288
|
-
```js
|
|
289
|
-
// Named import
|
|
290
|
-
import { DtIconArrowUp } from '@dialpad/dialtone-icons/vue3';
|
|
291
|
-
|
|
292
|
-
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
293
|
-
import DtIconArrowUp from '@dialpad/dialtone-icons/vue3/arrow-up';
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
- In case you are not using vue, import the svg's directly as following:
|
|
297
|
-
|
|
298
|
-
```js
|
|
299
|
-
import IconArrowUp from '@dialpad/dialtone-icons/arrow-up.svg';
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
- Importing json files
|
|
303
|
-
|
|
304
|
-
```js
|
|
305
|
-
import keywords from '@dialpad/dialtone-icons/keywords.json';
|
|
306
|
-
import iconsList from '@dialpad/dialtone-icons/icons.json';
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
#### Dialtone Vue
|
|
310
|
-
|
|
311
|
-
- Vue 2
|
|
312
|
-
|
|
313
|
-
```js
|
|
314
|
-
// Named import
|
|
315
|
-
import { DtButton } from "@dialpad/dialtone/vue2"
|
|
316
|
-
|
|
317
|
-
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
318
|
-
import { DtButton } from "@dialpad/dialtone/vue2/lib/button"
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
- Vue 3
|
|
322
|
-
|
|
323
|
-
```js
|
|
324
|
-
// Named import
|
|
325
|
-
import { DtButton } from "@dialpad/dialtone/vue3"
|
|
326
|
-
|
|
327
|
-
// Default import (Prefered if using webpack as it is tree-shakeable by default)
|
|
328
|
-
import { DtButton } from "@dialpad/dialtone/vue3/lib/button"
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
#### Dialtone Tokens
|
|
332
|
-
|
|
333
|
-
Dialtone tokens doesn't have a default export, so you need to access
|
|
334
|
-
the files directly as following:
|
|
335
|
-
|
|
336
|
-
- CSS
|
|
337
|
-
|
|
338
|
-
```css
|
|
339
|
-
@import "@dialpad/dialtone/tokens/variables-light.css" // Light tokens
|
|
340
|
-
@import "@dialpad/dialtone/tokens/variables-dark.css" // Dark tokens
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
- LESS
|
|
344
|
-
|
|
345
|
-
```less
|
|
346
|
-
@import "@dialpad/dialtone/tokens/variables-light.less" // Light tokens
|
|
347
|
-
@import "@dialpad/dialtone/tokens/variables-dark.less" // Dark tokens
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
- JSON
|
|
351
|
-
|
|
352
|
-
```js
|
|
353
|
-
import "@dialpad/dialtone/tokens/tokens-light.json" // Light tokens
|
|
354
|
-
import "@dialpad/dialtone/tokens/tokens-dark.json" // Dark tokens
|
|
355
|
-
```
|
package/dist/css/dialtone.css
CHANGED
|
@@ -7398,6 +7398,11 @@ ul {
|
|
|
7398
7398
|
font-style: normal;
|
|
7399
7399
|
src: url('./fonts/Archivo-SemiBold.woff2') format('woff2');
|
|
7400
7400
|
}
|
|
7401
|
+
@font-face {
|
|
7402
|
+
font-family: "Segoe UI Adjusted";
|
|
7403
|
+
src: local(Segoe UI);
|
|
7404
|
+
ascent-override: 95%;
|
|
7405
|
+
}
|
|
7401
7406
|
html,
|
|
7402
7407
|
body {
|
|
7403
7408
|
margin: 0;
|
|
@@ -7480,7 +7485,7 @@ body {
|
|
|
7480
7485
|
}
|
|
7481
7486
|
/**
|
|
7482
7487
|
* Do not edit directly
|
|
7483
|
-
* Generated on
|
|
7488
|
+
* Generated on Thu, 09 May 2024 17:09:14 GMT
|
|
7484
7489
|
*/
|
|
7485
7490
|
|
|
7486
7491
|
.dialtone-theme-light {
|
|
@@ -8297,7 +8302,7 @@ body {
|
|
|
8297
8302
|
|
|
8298
8303
|
/**
|
|
8299
8304
|
* Do not edit directly
|
|
8300
|
-
* Generated on
|
|
8305
|
+
* Generated on Thu, 09 May 2024 17:09:15 GMT
|
|
8301
8306
|
*/
|
|
8302
8307
|
|
|
8303
8308
|
.dialtone-theme-dark {
|