@dialpad/dialtone 9.34.2 → 9.34.4

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 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
- ## Tooling
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
+ ![Creating a codespace](./.github/new_codespace.png)
138
+
139
+ Please see the [Codespaces docs](./.github/codespaces.md) for more information.
140
+
141
+ ### Local development
29
142
 
30
- ### PNPM
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
- #### Do
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
+ ```
38
157
 
39
- Use PNPM to manage packages dependencies
158
+ ##### Do
159
+
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
- #### Don't
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 packages/dialtone-css build
172
+ pnpm run --filter dialtone-css build
52
173
  ```
53
174
 
54
- ### NX
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
- #### Do
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
- #### Don't
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
- ## Quick start
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
- ![Creating a codespace](./.github/new_codespace.png)
223
+ #### Running the projects
101
224
 
102
- Please see the [Codespaces docs](./.github/codespaces.md) for more information.
225
+ First, install the dependencies for all the monorepo packages and apps.
103
226
 
104
- ### Local environment setup
227
+ ```bash
228
+ pnpm install
229
+ ```
105
230
 
106
- - We use [pnpm](https://pnpm.io) for managing dependencies, so you need to have it installed
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
- npm install -g pnpm
234
+ nx start:dialtone
112
235
  ```
113
236
 
114
- Once pnpm is installed, install nx globally to make sure you can run commands such as `nx run build`
115
- without having to prefix them with `pnpm` or `pnpm exec`:
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
- pnpm add --global nx@latest
244
+ nx start:dialtone-vue2
119
245
  ```
120
246
 
121
- Then, install the dependencies for all the monorepo packages and apps.
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
- pnpm install
252
+ nx start:dialtone-vue3
125
253
  ```
126
254
 
127
- ### Running the projects
255
+ Access the local storybook server for Dialtone Vue 3 via `http://localhost:9011/`
256
+
257
+ #### Common Commands
128
258
 
129
- #### Dialtone
259
+ ##### Production build the root project
130
260
 
131
261
  ```bash
132
- nx start:dialtone
262
+ nx build
133
263
  ```
134
264
 
135
- This will start the documentation site and watch the library changes, so it is live updated.
265
+ ##### Run all Vue unit tests
136
266
 
137
- Access the local server at `http://localhost:4000`
267
+ ```bash
268
+ nx test
269
+ ```
138
270
 
139
- #### Dialtone Vue 2:
271
+ ##### Run Vue 2 tests
140
272
 
141
273
  ```bash
142
- nx start:dialtone-vue2
274
+ nx test dialtone-vue2
143
275
  ```
144
276
 
145
- Access the local storybook server for Dialtone Vue 2 via `http://localhost:9010/`
146
-
147
- #### Dialtone Vue 3:
277
+ ##### Run Vue 3 tests
148
278
 
149
279
  ```bash
150
- nx start:dialtone-vue3
280
+ nx test dialtone-vue3
151
281
  ```
152
282
 
153
- Access the local storybook server for Dialtone Vue 3 via `http://localhost:9011/`
283
+ Use the `--filter` flag to run commands for a specific package or app.
154
284
 
155
- ## Local development
285
+ ##### Adding dependencies for individual packages
156
286
 
157
- Use the `--filter` flag to run commands
158
- for a specific package or app.
287
+ ```bash
288
+ pnpm add <dependency> --filter <package or app name>
289
+ ```
159
290
 
160
- ### Adding dependencies for individual packages
291
+ Example:
161
292
 
162
293
  ```bash
163
- pnpm add <dependency> --filter <package/app>
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/app> --workspace
300
+ pnpm add <dependency> --filter <package or app name> --workspace
301
+ ```
302
+
303
+ Example:
304
+
305
+ ```bash
306
+ pnpm add @dialpad/dialtone-tokens --filter dialtone-icons --workspace
170
307
  ```
171
308
 
172
- ### Running commands for individual packages
309
+ ##### Running commands for individual packages
173
310
 
174
- You can run commands like `build`, `test`, `start` from
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
@@ -186,52 +323,53 @@ nx build dialtone-documentation
186
323
 
187
324
  ### Releasing
188
325
 
189
- Running these commands will call [release.sh](./scripts/release.sh) which
190
- automatically release all packages that need to be released.
326
+ Currently, Dialtone packages are being release in two different ways: `scheduled` and `manually`.
327
+ The `scheduled` release will only release changes to `production` while `manually` you can choose to release
328
+ `alpha`, `beta` or `next` branches.
191
329
 
192
- Once done, a GitHub Action will be triggered, you can check the progress here:
193
- [release.yml](https://github.com/dialpad/dialtone/actions/workflows/release.yml)
330
+ #### Production
194
331
 
195
- If something goes wrong, and you need to re-run the release, you can run the workflow manually through the `Run workflow`
196
- option on GitHub.
332
+ ##### Scheduled
197
333
 
198
- Select the `production` branch and pass the `commit SHA` which you would like to be the base to detect the changes or
199
- choose a `package` to release individually.
334
+ On every Tuesday at 10:00 am UTC, [release action](.github/workflows/release.yml) will trigger the production release process which
335
+ automatically release all packages that need to be released following the next steps:
200
336
 
201
- #### Production
337
+ 1. Run the `nx release` on every project.
338
+ 2. Merge the release commits created by the semantic release bot on `staging` to `production` branch.
339
+ 3. Push the `production` branch.
340
+ 4. An [action](https://github.com/dialpad/dialtone/actions/workflows/publish.yml) will publish the packages with its corresponding tag.
341
+
342
+ ##### Manually
343
+
344
+ In case you need to release earlier than the next scheduled date, you can trigger the release via `Run workflow` on [GitHub](https://github.com/dialpad/dialtone/actions/workflows/release.yml).
202
345
 
203
- This can only be run while on **staging** branch. After running the command, it will execute the following steps:
346
+ 1. Select `staging` branch.
347
+ 2. Select the `package` that you want to release or leave it empty to release all of them.
204
348
 
205
- 1. Run build on the affected projects to improve the speed of the next step.
206
- 2. Run release-local script on the affected projects to verify and increase the version according to commits.
207
- 3. Merge `staging` version changes to `production`
208
- 4. Push `production` branch.
209
- - A GHA will publish the release on npm and GitHub with `@latest` tag.
210
- 5. Merge changes from `production` back to `staging`
349
+ This will trigger the [release action](.github/workflows/release.yml), release changes on `staging` and automatically publish the selected packages following the next steps:
350
+
351
+ 1. Run the `nx release` on selected packages (all if `package` is empty).
352
+ 2. Merge the release commits created by the semantic release bot on `staging` to `production` branch.
353
+ 3. Push the `production` branch.
354
+ 4. An [action](https://github.com/dialpad/dialtone/actions/workflows/publish.yml) will publish the packages with its corresponding tag.
211
355
 
212
356
  ```bash
213
- nx run dialtone:release
357
+ nx run release
214
358
  ```
215
359
 
216
- #### Alpha/Beta
360
+ #### Alpha/Beta/Next
217
361
 
218
- Needs to be run while on your feature branch. After running the command, it will execute the following steps:
362
+ ##### Manually
219
363
 
220
- 1. Delete local and remote `alpha/beta` branch.
221
- 2. Checkout to a clean `alpha/beta` branch and push to origin.
222
- 3. Run build on the affected projects to improve the speed of the next step.
223
- 4. Run release-local script on the affected projects to verify and increase the version according to commits.
224
- 5. Push updated `alpha/beta` branch to origin.
225
- - A GHA will publish the release on npm and GitHub with `@alpha` or `@beta` tag.
226
- 6. Merge changes from `alpha/beta` back to your feature branch.
364
+ 1. Merge your changes to the branch you want to release, commit and push to origin.
365
+ 2. Go to [GitHub](https://github.com/dialpad/dialtone/actions/workflows/release.yml) and click on `Run workflow`.
366
+ 3. Select `alpha`, `beta` or `next` branch.
367
+ 4. Select the `package` that you want to release or leave it empty to release all of them.
227
368
 
228
- ```bash
229
- nx run dialtone:release:alpha
230
- ```
369
+ This will trigger the [release action](.github/workflows/release.yml), release changes on the selected branch and automatically publish the selected packages following the next steps:
231
370
 
232
- ```bash
233
- nx run dialtone:release:beta
234
- ```
371
+ 1. Run the `nx release` on selected packages (all if `package` is empty).
372
+ 2. An [action](https://github.com/dialpad/dialtone/actions/workflows/publish.yml) will publish the packages with its corresponding tag.
235
373
 
236
374
  ## Usage
237
375
 
@@ -293,12 +431,6 @@ import { DtIconArrowUp } from '@dialpad/dialtone-icons/vue3';
293
431
  import DtIconArrowUp from '@dialpad/dialtone-icons/vue3/arrow-up';
294
432
  ```
295
433
 
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
434
  - Importing json files
303
435
 
304
436
  ```js
@@ -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 Tue, 07 May 2024 22:12:36 GMT
7488
+ * Generated on Tue, 14 May 2024 20:31:24 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 Tue, 07 May 2024 22:12:36 GMT
8305
+ * Generated on Tue, 14 May 2024 20:31:24 GMT
8301
8306
  */
8302
8307
 
8303
8308
  .dialtone-theme-dark {