@dialpad/dialtone 7.25.1 → 8.0.0-version8.2

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 (66) hide show
  1. package/lib/build/js/dialtone_migration_helper/configs/box-shadows.mjs +17 -0
  2. package/lib/build/js/dialtone_migration_helper/configs/colors.mjs +63 -0
  3. package/lib/build/js/dialtone_migration_helper/configs/fonts.mjs +38 -0
  4. package/lib/build/js/dialtone_migration_helper/configs/size-and-space.mjs +77 -0
  5. package/lib/build/js/dialtone_migration_helper/index.mjs +1 -1
  6. package/lib/build/less/components/avatar.less +44 -44
  7. package/lib/build/less/components/badge.less +47 -47
  8. package/lib/build/less/components/banner.less +25 -27
  9. package/lib/build/less/components/breadcrumbs.less +13 -13
  10. package/lib/build/less/components/button.less +111 -113
  11. package/lib/build/less/components/card.less +6 -8
  12. package/lib/build/less/components/chip.less +49 -49
  13. package/lib/build/less/components/forms.less +28 -30
  14. package/lib/build/less/components/icon.less +1 -1
  15. package/lib/build/less/components/input.less +40 -43
  16. package/lib/build/less/components/link.less +15 -15
  17. package/lib/build/less/components/list-group.less +11 -11
  18. package/lib/build/less/components/modal.less +40 -42
  19. package/lib/build/less/components/notice.less +36 -38
  20. package/lib/build/less/components/popover.less +9 -9
  21. package/lib/build/less/components/presence.less +8 -10
  22. package/lib/build/less/components/radio-checkbox.less +26 -26
  23. package/lib/build/less/components/selects.less +16 -20
  24. package/lib/build/less/components/skeleton.less +2 -2
  25. package/lib/build/less/components/stack.less +6 -6
  26. package/lib/build/less/components/table.less +18 -20
  27. package/lib/build/less/components/tabs.less +40 -40
  28. package/lib/build/less/components/toast.less +34 -37
  29. package/lib/build/less/components/toggle.less +29 -31
  30. package/lib/build/less/components/tooltip.less +35 -35
  31. package/lib/build/less/dialtone-reset.less +2 -2
  32. package/lib/build/less/dialtone-variables.less +0 -4
  33. package/lib/build/less/dialtone.less +0 -3
  34. package/lib/build/less/themes/default.less +29 -188
  35. package/lib/build/less/themes/example.less +3 -2
  36. package/lib/build/less/utilities/backgrounds.less +4 -25
  37. package/lib/build/less/utilities/borders.less +37 -64
  38. package/lib/build/less/utilities/colors.less +93 -318
  39. package/lib/build/less/utilities/effects.less +25 -34
  40. package/lib/build/less/utilities/flex.less +12 -21
  41. package/lib/build/less/utilities/grid.less +0 -77
  42. package/lib/build/less/utilities/interactivity.less +2 -2
  43. package/lib/build/less/utilities/layout.less +0 -55
  44. package/lib/build/less/utilities/sizing.less +0 -34
  45. package/lib/build/less/utilities/spacing.less +62 -234
  46. package/lib/build/less/utilities/svg.less +16 -17
  47. package/lib/build/less/utilities/typography.less +78 -103
  48. package/lib/build/less/variables/layout.less +0 -97
  49. package/lib/build/less/variables/sizes.less +25 -30
  50. package/lib/build/less/variables/typography.less +2 -151
  51. package/lib/build/less/variables/visual-styles.less +4 -24
  52. package/lib/dist/css/dialtone.css +8137 -19405
  53. package/lib/dist/css/dialtone.min.css +1 -1
  54. package/lib/dist/js/dialtone_migration_helper/configs/box-shadows.mjs +17 -0
  55. package/lib/dist/js/dialtone_migration_helper/configs/colors.mjs +63 -0
  56. package/lib/dist/js/dialtone_migration_helper/configs/fonts.mjs +38 -0
  57. package/lib/dist/js/dialtone_migration_helper/configs/size-and-space.mjs +77 -0
  58. package/lib/dist/js/dialtone_migration_helper/index.mjs +1 -1
  59. package/package.json +17 -6
  60. package/lib/build/js/dialtone_migration_helper/configs/tokens-migration.mjs +0 -13
  61. package/lib/build/less/utilities/internals.less +0 -504
  62. package/lib/build/less/variables/borders.less +0 -37
  63. package/lib/build/less/variables/colors.less +0 -279
  64. package/lib/build/less/variables/icons.less +0 -43
  65. package/lib/build/less/variables/spacing.less +0 -81
  66. package/lib/dist/js/dialtone_migration_helper/configs/tokens-migration.mjs +0 -13
@@ -0,0 +1,17 @@
1
+ export default {
2
+ description:
3
+ 'Updates dialtone 7 variables to dialtone 8 design tokens.\n' +
4
+ '- Replaces var(--bs-{kind}) with var(--dt-shadow-{kind})\n\t' +
5
+ 'eg. var(--bs-sm) with var(--dt-shadow-small)\n',
6
+ patterns: ['**/*.{css,less,scss,sass,styl,html,vue,md}'],
7
+ expressions: [
8
+ // CSS variables
9
+ { from: /var\(--bs-sm\)/gi, to: 'var(--dt-shadow-small)' },
10
+ { from: /var\(--bs-md\)/gi, to: 'var(--dt-shadow-medium)' },
11
+ { from: /var\(--bs-lg\)/gi, to: 'var(--dt-shadow-large)' },
12
+ { from: /var\(--bs-xl\)/gi, to: 'var(--dt-shadow-extra-large)' },
13
+ { from: /var\(--bs-card\)/gi, to: 'var(--dt-shadow-card)' },
14
+ { from: /var\(--bs-focus-ring\)/gi, to: 'var(--dt-shadow-focus)' },
15
+ { from: /var\(--bs-focus-ring-inset\)/gi, to: 'var(--dt-shadow-focus-inset)' },
16
+ ],
17
+ };
@@ -0,0 +1,63 @@
1
+ export default {
2
+ description:
3
+ 'Updates dialtone 7 variables to dialtone 8 design tokens.\n' +
4
+ '- Replaces var(--{color}-{stop}) with var(--dt-color-{color}-{stop})\n\t' +
5
+ 'eg. var(--black-200) with var(--dt-color-black-200)\n' +
6
+ '- Replaces var(--fc-{kind}) with var(--dt-color-foreground-{kind})\n\t' +
7
+ 'eg. var(--fc-success-inverted) with var(--dt-color-foreground-success-inverted)\n',
8
+ patterns: ['**/*.{css,less,scss,sass,styl,html,vue,md}'],
9
+ expressions: [
10
+ // ------------------------------------------------------------ //
11
+ // Colors //
12
+ // ------------------------------------------------------------ //
13
+ // LESS variables
14
+ {
15
+ from: /@(black|purple|orange|magenta|gold|green|red|blue|tan)(-[1-9]00)/gi,
16
+ to: '@dt-color-$1$2',
17
+ },
18
+ // Neutral LESS variables
19
+ {
20
+ from: /@(white|black)/gi,
21
+ to: '@dt-color-neutral-$1',
22
+ },
23
+ // CSS variables
24
+ {
25
+ from: /var\(--(black|purple|orange|magenta|gold|green|red|blue|tan)(-[1-9]00)(-(h|s|l|hsl))?\)/gi,
26
+ to: 'var(--dt-color-$1$2$3)',
27
+ },
28
+ // Neutral CSS variables
29
+ {
30
+ from: /var\(--(white|black)(-(h|s|l|hsl))?\)/gi,
31
+ to: 'var(--dt-color-neutral-$1$2)',
32
+ },
33
+ // Background colors
34
+ {
35
+ // eslint-disable-next-line max-len
36
+ from: /var\(--bgc-(primary|secondary|moderate|bold|strong|contrast|critical|success|warning|info)(-(subtle|opaque|subtle-opaque|strong))?\)/gi,
37
+ to: 'var(--dt-color-surface-$1$2)',
38
+ },
39
+ // Special Background color cases
40
+ {
41
+ // eslint-disable-next-line max-len
42
+ from: /var\(--bgc-(error|danger)(-(subtle|opaque|subtle-opaque|strong))?\)/gi,
43
+ to: 'var(--dt-color-surface-critical$2)',
44
+ },
45
+ // Border colors
46
+ {
47
+ // eslint-disable-next-line max-len
48
+ from: /var\(--bc-(default|subtle|moderate|bold|focus|critical|success|warning|brand|ai|accent)(-(inverted|subtle|strong|subtle-inverted|strong-inverted))?\)/gi,
49
+ to: 'var(--dt-color-border-$1$2)',
50
+ },
51
+ // Font colors
52
+ {
53
+ // eslint-disable-next-line max-len
54
+ from: /var\(--fc-(primary|secondary|tertiary|muted|placeholder|disabled|critical|success|warning)(-(strong|inverted|strong-inverted))?\)/gi,
55
+ to: 'var(--dt-color-foreground-$1$2)',
56
+ },
57
+ // Special Font color cases
58
+ {
59
+ from: /var\(--fc-(error|danger)(-(strong|inverted|strong-inverted))?\)/gi,
60
+ to: 'var(--dt-color-foreground-critical$2)',
61
+ },
62
+ ],
63
+ };
@@ -0,0 +1,38 @@
1
+ export default {
2
+ description:
3
+ 'Updates dialtone 7 variables to dialtone 8 design tokens.\n' +
4
+ '- Replaces var(--fs-{stop}) with var(--dt-font-size-{stop})\n\t' +
5
+ 'eg. var(--fs-200) with var(--dt-font-size-200)\n' +
6
+ '- Replaces var(--fw-{kind}) with var(--dt-font-weight-{kind})\n\t' +
7
+ 'eg. var(--fw-medium) with var(--dt-font-weight-medium)\n' +
8
+ '- Replaces var(--lh-{stop}) with var(--dt-font-line-height-{stop})\n\t' +
9
+ 'eg. var(--lh-200) with var(--dt-font-line-height-200)\n' +
10
+ '- Replaces var(--ff-{kind}) with var(--dt-font-family-{kind})\n\t' +
11
+ 'eg. var(--ff-mono) with var(--dt-font-family-mono)',
12
+ patterns: ['**/*.{css,less,scss,sass,styl,html,vue,md,json}'],
13
+ expressions: [
14
+ // ------------------------------------------------------------ //
15
+ // Fonts //
16
+ // ------------------------------------------------------------ //
17
+ // Size variables
18
+ {
19
+ from: /var\(--fs(-[0-9]+)(-(mobile|tc8|tv))?\)/g,
20
+ to: 'var(--dt-font-size$1$2)',
21
+ },
22
+ // Weight variables
23
+ {
24
+ from: /var\(--fw-(normal|medium|bold)\)/g,
25
+ to: 'var(--dt-font-weight-$1)',
26
+ },
27
+ // Special weight case
28
+ {
29
+ from: /var\(--fw-semibold\)/g,
30
+ to: 'var(--dt-font-weight-semi-bold)',
31
+ },
32
+ // Font family
33
+ {
34
+ from: /var\(--ff-(mono)\)/g,
35
+ to: 'var(--dt-font-family-$1)',
36
+ },
37
+ ],
38
+ };
@@ -0,0 +1,77 @@
1
+ export default {
2
+ description:
3
+ 'Updates dialtone 7 variables to dialtone 8 design tokens.\n' +
4
+ '- Replaces var(--{size}-{stop}) with var(--dt-size-{stop})\n\t' +
5
+ 'eg. var(--size-200) with var(--dt-size-200)\n' +
6
+ '- Replaces var(--su{stop}) with var(--dt-size-{stop})\n\t' +
7
+ 'eg. var(--su0) with var(--dt-size-0)\n' +
8
+ '- Replaces var(--sun{stop}) with var(--dt-size-{stop}-negative)\n\t' +
9
+ 'eg. var(--sun1) with var(--dt-size-100-negative)\n',
10
+ patterns: ['**/*.{css,less,scss,sass,styl,html,vue,md}'],
11
+ expressions: [
12
+ // ------------------------------------------------------------ //
13
+ // Size and Space //
14
+ // ------------------------------------------------------------ //
15
+ {
16
+ from: /var\(--(size|space)(-[0-9]+)(-negative)?\)/gi,
17
+ to: 'var(--dt-$1$2$3)',
18
+ },
19
+ // Icon variables
20
+ { from: /@icon12/g, to: 'var(--dt-icon-size-100)' },
21
+ { from: /@icon14/g, to: 'var(--dt-icon-size-200)' },
22
+ { from: /@icon16/g, to: 'var(--dt-size-500)' },
23
+ { from: /@icon18/g, to: 'var(--dt-icon-size-300)' },
24
+ { from: /@icon20/g, to: 'var(--dt-icon-size-400)' },
25
+ { from: /@icon24/g, to: 'var(--dt-icon-size-500)' },
26
+ { from: /@icon32/g, to: 'var(--dt-icon-size-600)' },
27
+ { from: /@icon48/g, to: 'var(--dt-size-650)' },
28
+ { from: /@icon64/g, to: 'var(--dt-size-700)' },
29
+ // Positive spacing variables
30
+ { from: /var\(--su0\)/g, to: 'var(--dt-size-0)' },
31
+ { from: /var\(--su1\)/g, to: 'var(--dt-size-100)' },
32
+ { from: /var\(--su2\)/g, to: 'var(--dt-size-200)' },
33
+ { from: /var\(--su4\)/g, to: 'var(--dt-size-300)' },
34
+ { from: /var\(--su6\)/g, to: 'var(--dt-size-350)' },
35
+ { from: /var\(--su8\)/g, to: 'var(--dt-size-400)' },
36
+ { from: /var\(--su12\)/g, to: 'var(--dt-size-450)' },
37
+ { from: /var\(--su16\)/g, to: 'var(--dt-size-500)' },
38
+ { from: /var\(--su24\)/g, to: 'var(--dt-size-550)' },
39
+ { from: /var\(--su32\)/g, to: 'var(--dt-size-600)' },
40
+ { from: /var\(--su48\)/g, to: 'var(--dt-size-650)' },
41
+ { from: /var\(--su64\)/g, to: 'var(--dt-size-700)' },
42
+ { from: /var\(--su72\)/g, to: 'var(--dt-size-720)' },
43
+ { from: /var\(--su84\)/g, to: 'var(--dt-size-730)' },
44
+ { from: /var\(--su96\)/g, to: 'var(--dt-size-750)' },
45
+ { from: /var\(--su102\)/g, to: 'var(--dt-size-760)' },
46
+ { from: /var\(--su114\)/g, to: 'var(--dt-size-775)' },
47
+ { from: /var\(--su128\)/g, to: 'var(--dt-size-800)' },
48
+ // Negative spacing variables
49
+ { from: /var\(--sun1\)/g, to: 'var(--dt-size-100-negative)' },
50
+ { from: /var\(--sun2\)/g, to: 'var(--dt-size-200-negative)' },
51
+ { from: /var\(--sun4\)/g, to: 'var(--dt-size-300-negative)' },
52
+ { from: /var\(--sun6\)/g, to: 'var(--dt-size-350-negative)' },
53
+ { from: /var\(--sun8\)/g, to: 'var(--dt-size-400-negative)' },
54
+ { from: /var\(--sun12\)/g, to: 'var(--dt-size-450-negative)' },
55
+ { from: /var\(--sun16\)/g, to: 'var(--dt-size-500-negative)' },
56
+ { from: /var\(--sun24\)/g, to: 'var(--dt-size-550-negative)' },
57
+ { from: /var\(--sun32\)/g, to: 'var(--dt-size-600-negative)' },
58
+ { from: /var\(--sun48\)/g, to: 'var(--dt-size-650-negative)' },
59
+ { from: /var\(--sun64\)/g, to: 'var(--dt-size-700-negative)' },
60
+ { from: /var\(--sun72\)/g, to: 'var(--dt-size-720-negative)' },
61
+ { from: /var\(--sun84\)/g, to: 'var(--dt-size-730-negative)' },
62
+ { from: /var\(--sun96\)/g, to: 'var(--dt-size-750-negative)' },
63
+ { from: /var\(--sun102\)/g, to: 'var(--dt-size-760-negative)' },
64
+ { from: /var\(--sun114\)/g, to: 'var(--dt-size-775-negative)' },
65
+ { from: /var\(--sun128\)/g, to: 'var(--dt-size-800-negative)' },
66
+ // Border radius
67
+ { from: /var\(--br-(pill|circle)\)/g, to: 'var(--dt-size-radius-$1)' },
68
+ { from: /var\(--br0\)/g, to: 'var(--dt-size-radius-0)' },
69
+ { from: /var\(--br2\)/g, to: 'var(--dt-size-radius-200)' },
70
+ { from: /var\(--br4\)/g, to: 'var(--dt-size-radius-300)' },
71
+ { from: /var\(--br8\)/g, to: 'var(--dt-size-radius-400)' },
72
+ { from: /var\(--br12\)/g, to: 'var(--dt-size-450)' },
73
+ { from: /var\(--br16\)/g, to: 'var(--dt-size-radius-500)' },
74
+ { from: /var\(--br24\)/g, to: 'var(--dt-size-550)' },
75
+ { from: /var\(--br32\)/g, to: 'var(--dt-size-radius-600)' },
76
+ ],
77
+ };
@@ -76,7 +76,7 @@ import yargs from 'yargs';
76
76
  configData.globbyConfig.cwd = configData.globbyConfig.cwd || cwd;
77
77
  // push ignore list to configuration array
78
78
  if (argv.ignore) {
79
- configData.globbyConfig.ignore.push(...argv.ignore);
79
+ configData.globbyConfig.ignore = argv.ignore;
80
80
  }
81
81
 
82
82
  // run glob search with configData.patterns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dialpad/dialtone",
3
- "version": "7.25.1",
3
+ "version": "8.0.0-version8.2",
4
4
  "description": "Dialpad's design system",
5
5
  "keywords": [
6
6
  "Dialpad",
@@ -61,7 +61,8 @@
61
61
  "release": "semantic-release --no-ci --extends ./release-local.config.js",
62
62
  "start": "gulp watch",
63
63
  "stylelint": "npx stylelint 'lib/build/less/**/*.{less,css}'",
64
- "build:icons": "gulp icons"
64
+ "build:icons": "gulp icons",
65
+ "test:postcss-generator-plugin": "jest --coverage && eslint ."
65
66
  },
66
67
  "unpkg": "dist/css/dialtone.min.css",
67
68
  "browserslist": [
@@ -76,15 +77,16 @@
76
77
  },
77
78
  "dependencies": {
78
79
  "docopt": "^0.6.2",
79
- "precss": "^4.0.0"
80
+ "precss": "^4.0.0",
81
+ "tinycolor2": "^1.6.0"
80
82
  },
81
83
  "devDependencies": {
82
84
  "@commitlint/cli": "^17.4.2",
83
85
  "@commitlint/config-conventional": "^17.4.2",
84
86
  "@dialpad/conventional-changelog-angular": "^1.1.1",
85
87
  "@dialpad/dialtone-combinator": "^0.3.1",
86
- "@dialpad/dialtone-tokens": "^1.9.0",
87
- "@dialpad/dialtone-vue": "^3.61.3",
88
+ "@dialpad/dialtone-tokens": "^1.15.0",
89
+ "@dialpad/dialtone-vue": "^3.64.1",
88
90
  "@dialpad/postcss-responsive-variations": "^1.1.5",
89
91
  "@dialpad/semantic-release-changelog-json": "^1.0.0",
90
92
  "@docsearch/js": "^3.3.2",
@@ -109,6 +111,7 @@
109
111
  "eslint-config-semistandard": "^17.0.0",
110
112
  "eslint-config-standard": "^17.0.0",
111
113
  "eslint-plugin-import": "^2.27.5",
114
+ "eslint-plugin-jest": "^25.2.2",
112
115
  "eslint-plugin-node": "^11.1.0",
113
116
  "eslint-plugin-promise": "^6.1.1",
114
117
  "eslint-plugin-vue": "^9.9.0",
@@ -123,6 +126,7 @@
123
126
  "gulp-sourcemaps": "^3.0.0",
124
127
  "gulp-svgmin": "^4.1.0",
125
128
  "husky": "^8.0.3",
129
+ "jest": "^29.5.0",
126
130
  "lesshint": "^6.3.7",
127
131
  "lint-staged": "^13.1.0",
128
132
  "markdownlint": "^0.27.0",
@@ -130,7 +134,6 @@
130
134
  "npm-run-all": "^4.1.5",
131
135
  "oslllo-svg-fixer": "^2.2.0",
132
136
  "path": "^0.12.7",
133
- "postcss-focus-visible": "^7.1.0",
134
137
  "postcss-less": "^6.0.0",
135
138
  "postcss-sorting": "^7.0.1",
136
139
  "semantic-release": "^19.0.5",
@@ -141,6 +144,7 @@
141
144
  "stylelint-less": "^1.0.6",
142
145
  "stylelint-no-px": "^1.0.1",
143
146
  "through2": "^4.0.2",
147
+ "tinycolor2": "^1.6.0",
144
148
  "vuepress": "2.0.0-beta.60",
145
149
  "vuepress-plugin-seo2": "^2.0.0-beta.124",
146
150
  "vuepress-plugin-sitemap2": "2.0.0-beta.174",
@@ -153,5 +157,12 @@
153
157
  "chalk": "^5.2.0",
154
158
  "globby": "^13.1.4",
155
159
  "inquirer": "^9.1.5"
160
+ },
161
+ "jest": {
162
+ "coverageThreshold": {
163
+ "global": {
164
+ "statements": 100
165
+ }
166
+ }
156
167
  }
157
168
  }
@@ -1,13 +0,0 @@
1
- export default {
2
- description:
3
- 'Updates dialtone 7 variables to dialtone 8 design tokens.\n' +
4
- '- Replaces var(--{color}-{stop}) with var(--dt-color-{color}-{stop})\n\t' +
5
- 'eg. var(--black-200) with var(--dt-color-black-200)',
6
- patterns: ['**/*.{css,less,scss,sass,styl,html,vue}'],
7
- expressions: [
8
- {
9
- from: /var\(--(white|black|purple|orange|magenta|gold|green|red|blue|tan)(-[1-9]00)?\)/gi,
10
- to: 'var(--dt-color-$1$2)',
11
- },
12
- ],
13
- };