@dialpad/dialtone 9.58.0-beta.1 → 9.59.0-beta.1

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 (56) hide show
  1. package/README.md +60 -28
  2. package/dist/css/tokens/tokens-base-dark.css +1 -1
  3. package/dist/css/tokens/tokens-base-light.css +1 -1
  4. package/dist/css/tokens/tokens-dp-dark.css +1 -1
  5. package/dist/css/tokens/tokens-dp-light.css +1 -1
  6. package/dist/css/tokens/tokens-expressive-dark.css +1 -1
  7. package/dist/css/tokens/tokens-expressive-light.css +1 -1
  8. package/dist/css/tokens/tokens-expressive-sm-dark.css +1 -1
  9. package/dist/css/tokens/tokens-expressive-sm-light.css +1 -1
  10. package/dist/css/tokens/tokens-tmo-dark.css +1 -1
  11. package/dist/css/tokens/tokens-tmo-light.css +1 -1
  12. package/dist/themes/config.cjs +1 -0
  13. package/dist/themes/config.js +17 -0
  14. package/dist/themes/dp-dark.cjs +1 -0
  15. package/dist/themes/dp-dark.js +14 -0
  16. package/dist/themes/dp-light.cjs +1 -0
  17. package/dist/themes/dp-light.js +14 -0
  18. package/dist/themes/expressive-dark.cjs +1 -0
  19. package/dist/themes/expressive-dark.js +14 -0
  20. package/dist/themes/expressive-light.cjs +1 -0
  21. package/dist/themes/expressive-light.js +14 -0
  22. package/dist/themes/expressive-sm-dark.cjs +1 -0
  23. package/dist/themes/expressive-sm-dark.js +14 -0
  24. package/dist/themes/expressive-sm-light.cjs +1 -0
  25. package/dist/themes/expressive-sm-light.js +14 -0
  26. package/dist/themes/tmo-dark.cjs +1 -0
  27. package/dist/themes/tmo-dark.js +14 -0
  28. package/dist/themes/tmo-light.cjs +1 -0
  29. package/dist/themes/tmo-light.js +14 -0
  30. package/dist/tokens/css/tokens-base-dark.css +1 -1
  31. package/dist/tokens/css/tokens-base-light.css +1 -1
  32. package/dist/tokens/css/tokens-dp-dark.css +1 -1
  33. package/dist/tokens/css/tokens-dp-light.css +1 -1
  34. package/dist/tokens/css/tokens-expressive-dark.css +1 -1
  35. package/dist/tokens/css/tokens-expressive-light.css +1 -1
  36. package/dist/tokens/css/tokens-expressive-sm-dark.css +1 -1
  37. package/dist/tokens/css/tokens-expressive-sm-light.css +1 -1
  38. package/dist/tokens/css/tokens-tmo-dark.css +1 -1
  39. package/dist/tokens/css/tokens-tmo-light.css +1 -1
  40. package/dist/tokens/less/tokens-base-dark.less +1 -1
  41. package/dist/tokens/less/tokens-base-light.less +1 -1
  42. package/dist/tokens/less/tokens-dp-dark.less +1 -1
  43. package/dist/tokens/less/tokens-dp-light.less +1 -1
  44. package/dist/tokens/less/tokens-expressive-dark.less +1 -1
  45. package/dist/tokens/less/tokens-expressive-light.less +1 -1
  46. package/dist/tokens/less/tokens-expressive-sm-dark.less +1 -1
  47. package/dist/tokens/less/tokens-expressive-sm-light.less +1 -1
  48. package/dist/tokens/less/tokens-tmo-dark.less +1 -1
  49. package/dist/tokens/less/tokens-tmo-light.less +1 -1
  50. package/dist/tokens-base-dark-gxR6WJuq.js +4 -0
  51. package/dist/tokens-base-dark-lGwOt-Tx.cjs +1 -0
  52. package/dist/tokens-base-light-Exwmf79i.cjs +1 -0
  53. package/dist/tokens-base-light-Xfc5qwVj.js +4 -0
  54. package/package.json +5 -4
  55. package/dist/theme.js +0 -1
  56. package/dist/theme.mjs +0 -44
package/README.md CHANGED
@@ -26,9 +26,67 @@ npm install @dialpad/dialtone@latest @linusborg/vue-simple-portal @tiptap/vue-2
26
26
 
27
27
  ### Import packages:
28
28
 
29
+ #### Dialtone Tokens
30
+
31
+ ##### Importing tokens via javascript function
32
+
33
+ For efficiency, the Dialtone tokens are not included in the main dialtone css package, as it is an application side choice which theme to use.
34
+
35
+ The simplest way to import the you want to use, and pass it into the `setTheme` javascript function that is included with Dialtone:
36
+
37
+ ```js
38
+ import { setTheme } from '@dialpad/dialtone/themes/config';
39
+ import DpLight from '@dialpad/dialtone/themes/dp-light';
40
+ setTheme(DpLight);
41
+ ```
42
+
43
+ possible themes are as follows:
44
+
45
+ - DpLight - Dialpad Light
46
+ - DpDark - Dialpad Dark
47
+ - TmoLight - T-Mobile Light
48
+ - TmoDark - T-Mobile Dark
49
+ - ExpressiveLight - Marketing Light
50
+ - ExpressiveDark - Marketing Dark
51
+ - ExpressiveSmLight - Marketing Small Light
52
+ - ExpressiveSmDark - Marketing Small Dark
53
+
54
+ Note it is required to load a theme to use Dialtone. Without setting the theme via setTheme, or importing tokens manually, no CSS variables will be set and therefore no Dialtone styles will be displayed.
55
+
56
+ ##### Importing tokens via manually importing files
57
+
58
+ You may want to use this method if you don't want to, or are unable to use javascript.
59
+
60
+ You need to import two tokens files in order to apply a theme. A base tokens files, which is either light or dark, and
61
+ a semantic brand tokens file which is named after a brand and theme 'tokens-dp-light', 'tokens-dp-dark', 'tokens-tmo-light', ...
62
+
63
+ Dialtone tokens doesn't have a default export, so you need to access
64
+ the files directly as following:
65
+
66
+ - CSS
67
+
68
+ ```css
69
+ @import "@dialpad/dialtone/tokens/tokens-base-light.css" // Base light theme
70
+ @import "@dialpad/dialtone/tokens/tokens-dp-light.css" // Dialpad light brand
71
+ ```
72
+
73
+ - LESS
74
+
75
+ ```less
76
+ @import "@dialpad/dialtone/tokens/tokens-base-light.less" // Base light tokens
77
+ @import "@dialpad/dialtone/tokens/tokens-dp-light.less" // Dialpad light brand
78
+ ```
79
+
80
+ - JSON
81
+
82
+ ```js
83
+ import "@dialpad/dialtone/tokens/tokens-base-light.json" // Base light tokens
84
+ import "@dialpad/dialtone/tokens/tokens-dp-light.json" // Dialpad light brand
85
+ ```
86
+
29
87
  #### Dialtone CSS
30
88
 
31
- Dialtone CSS includes all utility classes as well as tokens.
89
+ Dialtone CSS includes Dialtone utility classes and CSS reset.
32
90
 
33
91
  - CSS
34
92
 
@@ -108,32 +166,6 @@ import { DtButton } from "@dialpad/dialtone/vue3"
108
166
  import { DtButton } from "@dialpad/dialtone/vue3/lib/button"
109
167
  ```
110
168
 
111
- #### Dialtone Tokens
112
-
113
- Dialtone tokens doesn't have a default export, so you need to access
114
- the files directly as following:
115
-
116
- - CSS
117
-
118
- ```css
119
- @import "@dialpad/dialtone/tokens/variables-light.css" // Light tokens
120
- @import "@dialpad/dialtone/tokens/variables-dark.css" // Dark tokens
121
- ```
122
-
123
- - LESS
124
-
125
- ```less
126
- @import "@dialpad/dialtone/tokens/variables-light.less" // Light tokens
127
- @import "@dialpad/dialtone/tokens/variables-dark.less" // Dark tokens
128
- ```
129
-
130
- - JSON
131
-
132
- ```js
133
- import "@dialpad/dialtone/tokens/tokens-light.json" // Light tokens
134
- import "@dialpad/dialtone/tokens/tokens-dark.json" // Dark tokens
135
- ```
136
-
137
169
  ## About this repo
138
170
 
139
171
  The @dialpad/dialtone repository is a monorepo composed of Dialtone NPM packages and apps.
@@ -409,7 +441,7 @@ nx run release
409
441
 
410
442
  ##### Manually
411
443
 
412
- 1. Merge your changes to the branch you want to release, commit and push to origin.
444
+ 1. Merge your changes to the branch you want to release, commit and push to origin. (Note: If your dialtone version number is behind the last production release number, it may fail. Merge in staging or update the version number manually.)
413
445
  2. Go to [GitHub](https://github.com/dialpad/dialtone/actions/workflows/release.yml) and click on `Run workflow`.
414
446
  3. Select `alpha`, `beta` or `next` branch.
415
447
  4. Select the `package` that you want to release or leave it empty to release all of them.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:12 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:22 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:12 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:22 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:04 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:14 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:03 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:13 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:08 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:18 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:07 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:17 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:11 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:21 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:09 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:20 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:06 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:16 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Sat, 27 Jul 2024 02:54:05 GMT
3
+ * Generated on Wed, 31 Jul 2024 16:26:15 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(e){s("dialtone-css-theme",e.base.css),s("dialtone-css-brand",e.brand.css),a(e.base.name,e.brand.name)}function s(e,t){if(document.getElementById(e))document.getElementById(e).innerHTML=t;else{const n=document.createElement("style");n.setAttribute("type","text/css"),n.setAttribute("id",e),n.innerHTML=t,document.head.appendChild(n)}}function a(e,t){document.documentElement.setAttribute("data-dt-theme",e),document.documentElement.setAttribute("data-dt-brand",t)}exports.setTheme=d;
@@ -0,0 +1,17 @@
1
+ function a(e) {
2
+ s("dialtone-css-theme", e.base.css), s("dialtone-css-brand", e.brand.css), d(e.base.name, e.brand.name);
3
+ }
4
+ function s(e, t) {
5
+ if (document.getElementById(e))
6
+ document.getElementById(e).innerHTML = t;
7
+ else {
8
+ const n = document.createElement("style");
9
+ n.setAttribute("type", "text/css"), n.setAttribute("id", e), n.innerHTML = t, document.head.appendChild(n);
10
+ }
11
+ }
12
+ function d(e, t) {
13
+ document.documentElement.setAttribute("data-dt-theme", e), document.documentElement.setAttribute("data-dt-brand", t);
14
+ }
15
+ export {
16
+ a as setTheme
17
+ };