@dialpad/dialtone 7.25.0 → 7.26.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.
Files changed (46) hide show
  1. package/lib/build/js/dialtone_migration_helper/configs/tokens-migration.mjs +13 -0
  2. package/lib/build/js/dialtone_migration_helper/helpers.mjs +214 -0
  3. package/lib/build/js/dialtone_migration_helper/index.mjs +131 -0
  4. package/lib/build/less/components/avatar.less +19 -19
  5. package/lib/build/less/components/badge.less +2 -2
  6. package/lib/build/less/components/banner.less +2 -2
  7. package/lib/build/less/components/breadcrumbs.less +3 -3
  8. package/lib/build/less/components/button.less +7 -7
  9. package/lib/build/less/components/card.less +2 -2
  10. package/lib/build/less/components/chip.less +10 -10
  11. package/lib/build/less/components/forms.less +1 -1
  12. package/lib/build/less/components/input.less +4 -4
  13. package/lib/build/less/components/list-group.less +1 -1
  14. package/lib/build/less/components/modal.less +6 -6
  15. package/lib/build/less/components/notice.less +3 -3
  16. package/lib/build/less/components/popover.less +2 -2
  17. package/lib/build/less/components/radio-checkbox.less +1 -1
  18. package/lib/build/less/components/root-layout.less +90 -3
  19. package/lib/build/less/components/selects.less +4 -4
  20. package/lib/build/less/components/stack.less +1 -1
  21. package/lib/build/less/components/tabs.less +2 -2
  22. package/lib/build/less/components/toast.less +1 -1
  23. package/lib/build/less/components/toggle.less +7 -7
  24. package/lib/build/less/components/tooltip.less +19 -19
  25. package/lib/build/less/utilities/backgrounds.less +1 -1
  26. package/lib/build/less/utilities/borders.less +15 -15
  27. package/lib/build/less/utilities/colors.less +2 -2
  28. package/lib/build/less/utilities/effects.less +20 -20
  29. package/lib/build/less/utilities/flex.less +11 -11
  30. package/lib/build/less/utilities/internals.less +168 -18
  31. package/lib/build/less/utilities/spacing.less +36 -37
  32. package/lib/build/less/utilities/svg.less +8 -8
  33. package/lib/build/less/utilities/typography.less +2 -2
  34. package/lib/build/less/variables/borders.less +2 -2
  35. package/lib/build/less/variables/icons.less +19 -17
  36. package/lib/build/less/variables/layout.less +2 -1
  37. package/lib/build/less/variables/sizes.less +10 -11
  38. package/lib/build/less/variables/spacing.less +3 -0
  39. package/lib/build/less/variables/typography.less +4 -2
  40. package/lib/build/less/variables/visual-styles.less +4 -1
  41. package/lib/dist/css/dialtone.css +1527 -322
  42. package/lib/dist/css/dialtone.min.css +1 -1
  43. package/lib/dist/js/dialtone_migration_helper/configs/tokens-migration.mjs +13 -0
  44. package/lib/dist/js/dialtone_migration_helper/helpers.mjs +214 -0
  45. package/lib/dist/js/dialtone_migration_helper/index.mjs +131 -0
  46. package/package.json +9 -2
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,214 @@
1
+ import chalk from 'chalk';
2
+ import { globby } from 'globby';
3
+ import inquirer from 'inquirer';
4
+ import path from 'path';
5
+ import fs from 'fs';
6
+ const { readdir, readFile, writeFile } = fs.promises;
7
+
8
+ // confirm prompt for starting operations, display warning and y/n dialog
9
+ export const confirmStart = () => {
10
+ return new Promise((resolve, reject) => {
11
+ inquirer
12
+ .prompt([
13
+ {
14
+ type: 'confirm',
15
+ name: 'yesno',
16
+ prefix: `
17
+ ${chalk.bgRed(
18
+ '┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !!! CAUTION !!! ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓',
19
+ )}
20
+ ${chalk.bgRed(
21
+ '┃',
22
+ )} Please be sure you are running this in a code repository where changes can be rolled back. ${chalk.bgRed(
23
+ '┃',
24
+ )}
25
+ ${chalk.bgRed(
26
+ '┃',
27
+ )} Modifications will occur to files listed above. Proceed at your own risk. ${chalk.bgRed(
28
+ '┃',
29
+ )}
30
+ ${chalk.bgRed(
31
+ '┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛',
32
+ )}\n
33
+ `,
34
+ message: 'Start modification?',
35
+ default: true,
36
+ },
37
+ ])
38
+ .then((choice) => {
39
+ resolve(choice.yesno);
40
+ })
41
+ .catch((err) => {
42
+ reject(err);
43
+ });
44
+ });
45
+ };
46
+
47
+ // return array of all globby pattern matches in one level
48
+ export const doPatternSearch = async (config) => {
49
+ const res = [];
50
+ for (const p of config.patterns) {
51
+ res.push(
52
+ ...(await getGlob(p, config.globbyConfig).catch((err) => error('doPatternSearch: ' + err))),
53
+ );
54
+ }
55
+ return res;
56
+ };
57
+
58
+ // error and quit
59
+ export const error = (message) => {
60
+ console.log(`\n${chalk.red('!!')} Error: ${message}\n`);
61
+ process.exit(1);
62
+ };
63
+
64
+ export const findMatchedFiles = async (fileList, config) => {
65
+ return getAllFileContents(fileList, config.globbyConfig.cwd).then((globbed) => {
66
+ // filter out minified files
67
+ const filtered = globbed
68
+ .filter((f) => {
69
+ return (f.data.match(/[\n\r]/g) || []).length > 3;
70
+ })
71
+ .filter((f) => {
72
+ config.expressions.forEach((e) => {
73
+ if (e.from.test(f.data)) f.matches++;
74
+ });
75
+ return f.matches > 0;
76
+ });
77
+
78
+ const matchedFiles = filtered.reduce((prev, current) => {
79
+ const fn = path.relative(config.globbyConfig.cwd, current.file);
80
+ return [...prev, fn];
81
+ }, []);
82
+
83
+ return matchedFiles;
84
+ });
85
+ };
86
+
87
+ // read file contents of all matched files, return filename and data, default matches (0)
88
+ export const getAllFileContents = (fileList, cwd) => {
89
+ const readPromises = fileList.map(async (file) => {
90
+ file = cwd + path.sep + file;
91
+ return readFile(file, 'utf8')
92
+ .then((data) => {
93
+ return { file, data, matches: 0 };
94
+ })
95
+ .catch((err) => error('getAllFileContents: ' + err));
96
+ });
97
+ return Promise.all(readPromises);
98
+ };
99
+
100
+ // return list of files from path
101
+ export const getConfigFileList = (path) => {
102
+ return new Promise((resolve, reject) => {
103
+ readdir(path)
104
+ .then((files) => {
105
+ resolve(
106
+ files.map((file) => ({
107
+ name: file.replace(/-/g, ' ').split('.')[0],
108
+ value: file,
109
+ })),
110
+ );
111
+ })
112
+ .catch((err) => reject(err));
113
+ });
114
+ };
115
+
116
+ // returns globby promise based on search pattern and configuration
117
+ // https://github.com/sindresorhus/globby
118
+ export const getGlob = (pattern, config) => {
119
+ return new Promise((resolve, reject) => {
120
+ globby(pattern, config)
121
+ .then((matches) => resolve(matches))
122
+ .catch((err) => reject(err));
123
+ });
124
+ };
125
+
126
+ // display list of configuration files retreived by readConfigFile
127
+ export const inquireForFile = (folder, options) => {
128
+ return new Promise((resolve, reject) => {
129
+ inquirer
130
+ .prompt([
131
+ {
132
+ type: 'list',
133
+ name: 'file',
134
+ choices: options,
135
+ pageSize: 4,
136
+ prefix: `\n${chalk.green('?')} Choose a migration configuration to use:\n`,
137
+ },
138
+ ])
139
+ .then((choice) => {
140
+ const configPath = `${folder}/${choice.file}`;
141
+ resolve(readConfigFile(configPath));
142
+ })
143
+ .catch((err) => {
144
+ reject(err);
145
+ });
146
+ });
147
+ };
148
+
149
+ // for each expression (string.replace(from, to)) iterate over each file and make
150
+ // changes where a match was found. Records number of matches per file.
151
+ // @TODO: could probably be sped up but it already seems pretty fast.
152
+ export const modifyFileContents = async (content, expr) => {
153
+ // filter out files with less than 3 newlines, likely compressed/minified files
154
+ content
155
+ .filter((f) => {
156
+ return (f.data.match(/[\n\r]/g) || []).length > 3;
157
+ })
158
+ .map((f) => {
159
+ expr.forEach((e) => {
160
+ f.data = f.data.replace(e.from, (match) => {
161
+ f.matches++;
162
+ return match.replace(e.from, e.to);
163
+ });
164
+ });
165
+ return f;
166
+ });
167
+
168
+ // promise map for writing file to the FS
169
+ const writePromises = content.map(async (content) => {
170
+ if (content.matches > 0) {
171
+ return writeFile(content.file, content.data, 'utf8')
172
+ .then(() => {
173
+ return { file: content.file, matches: content.matches };
174
+ })
175
+ .catch((err) => error('writePromises: ' + err));
176
+ } else {
177
+ return { file: content.file, matches: 0 };
178
+ }
179
+ });
180
+
181
+ // write out list of files that changed and how many changes were made
182
+ return await Promise.all(writePromises).then((results) => {
183
+ results.forEach((result) => {
184
+ if (result.matches > 0) {
185
+ // gives a shorter name
186
+ const shortname = path.relative(process.cwd(), result.file);
187
+ console.log(
188
+ `${chalk.yellow('>>')} ${shortname}${chalk.gray(',')} ${chalk.whiteBright(
189
+ result.matches,
190
+ )} changes`,
191
+ );
192
+ }
193
+ });
194
+ });
195
+ };
196
+
197
+ // read configuration file and return array with data and config filename
198
+ export const readConfigFile = async (file) => {
199
+ const config = await import(file);
200
+ return [config.default, path.basename(file)];
201
+ };
202
+
203
+ export default {
204
+ confirmStart,
205
+ doPatternSearch,
206
+ error,
207
+ findMatchedFiles,
208
+ getAllFileContents,
209
+ getConfigFileList,
210
+ getGlob,
211
+ inquireForFile,
212
+ modifyFileContents,
213
+ readConfigFile,
214
+ };
@@ -0,0 +1,131 @@
1
+ #!/usr/bin/env node
2
+
3
+ import chalk from 'chalk';
4
+ import {
5
+ confirmStart,
6
+ doPatternSearch,
7
+ error,
8
+ findMatchedFiles,
9
+ getConfigFileList,
10
+ getAllFileContents,
11
+ inquireForFile,
12
+ modifyFileContents,
13
+ readConfigFile,
14
+ } from './helpers.mjs';
15
+ import ora from 'ora';
16
+ import { dirname, normalize } from 'path';
17
+ import { fileURLToPath } from 'url';
18
+ import { hideBin } from 'yargs/helpers';
19
+ import yargs from 'yargs';
20
+
21
+ // eslint-disable-next-line complexity
22
+ (async () => {
23
+ // get command line args
24
+ const argv = yargs(hideBin(process.argv))
25
+ .scriptName('dialtone-migration-helper')
26
+ .usage(
27
+ '$0 --file migration-config-file.js --cwd "../root/directory --ignore "**/ignored/**", "**/another_ignored/**"',
28
+ )
29
+ .options({
30
+ config: {
31
+ type: 'string',
32
+ description: 'Migration configuration module.',
33
+ },
34
+ cwd: {
35
+ type: 'string',
36
+ description: 'Root directory for scan. Defaults to CWD.',
37
+ default: process.cwd(),
38
+ },
39
+ ignore: {
40
+ type: 'array',
41
+ description: 'Other glob patterns to ignore during search. .gitignore included by default.',
42
+ },
43
+ force: {
44
+ boolean: true,
45
+ description: 'Skip interactive prompts, use caution!',
46
+ default: false,
47
+ },
48
+ })
49
+ .help().argv;
50
+
51
+ // get list of configuration files
52
+ const __filename = fileURLToPath(import.meta.url);
53
+ const __dirname = dirname(__filename);
54
+ const CONFIG_FOLDER = __dirname + '/configs';
55
+ const configList = await getConfigFileList(CONFIG_FOLDER).catch((err) =>
56
+ error('getConfigFileList: ' + err),
57
+ );
58
+
59
+ // load configuration from arg or list
60
+ const [configData, configFile] = !argv.config
61
+ ? await inquireForFile(CONFIG_FOLDER, configList).catch((err) =>
62
+ error('inquireForFile: ' + err),
63
+ )
64
+ : await readConfigFile(argv.config).catch((err) => error('readConfigFile: ' + err));
65
+
66
+ // set up some globby defaults
67
+ configData.globbyConfig = configData.globbyConfig || {};
68
+ configData.globbyConfig.gitignore = configData.globbyConfig.gitignore || true;
69
+
70
+ console.log(
71
+ `\n${chalk.green('++')} Configuration Loaded! (${configFile}) ${chalk.green('++')}\n`,
72
+ );
73
+
74
+ // take CWD if specified from command line
75
+ const cwd = !argv.cwd ? process.cwd() : normalize(argv.cwd);
76
+ configData.globbyConfig.cwd = configData.globbyConfig.cwd || cwd;
77
+ // push ignore list to configuration array
78
+ if (argv.ignore) {
79
+ configData.globbyConfig.ignore.push(...argv.ignore);
80
+ }
81
+
82
+ // run glob search with configData.patterns
83
+ const globSpinner = ora('Performing pattern search').start();
84
+ const files = await doPatternSearch(configData).then((f) => {
85
+ return findMatchedFiles(f, configData);
86
+ });
87
+ if (files.length <= 0) {
88
+ console.log(
89
+ '\n' +
90
+ chalk.cyan('??') +
91
+ ' No matches found! Check your patterns and cwd settings if you think this is an error.',
92
+ );
93
+ process.exit(0);
94
+ }
95
+
96
+ globSpinner.stop();
97
+ console.log(`[ ${chalk.whiteBright(files.length)} ] files queued for modification:\n`);
98
+ console.log(files);
99
+ console.log(
100
+ `\n${chalk.yellow('Configuration Description')}${chalk.gray(':')}\n${configData.description}\n`,
101
+ );
102
+
103
+ // kick off file search and replace
104
+ const startModification = () => {
105
+ console.log(`\n${chalk.blue('__')} Starting ...`);
106
+
107
+ getAllFileContents(files, configData.globbyConfig.cwd)
108
+ .then((content) => {
109
+ modifyFileContents(content, configData.expressions).then(() => {
110
+ console.log(`${chalk.magenta('==')} Modification complete!\n`);
111
+ });
112
+ })
113
+ .catch((err) => error('getAllFileContents: ' + err));
114
+ };
115
+
116
+ // begin file modification based on configuration rules
117
+ // start automatically if --force is specified
118
+ if (!argv.force) {
119
+ confirmStart()
120
+ .then((val) => {
121
+ if (val) {
122
+ startModification();
123
+ } else {
124
+ console.log(`\n${chalk.red('__')} Cancelling ...\n`);
125
+ }
126
+ })
127
+ .catch((err) => error('confirmStart ' + err));
128
+ } else {
129
+ startModification();
130
+ }
131
+ })();
@@ -34,8 +34,8 @@
34
34
  --avatar-size-shape: var(--size-600);
35
35
  --avatar-size-image: 100%;
36
36
  --avatar-size-text: var(--fs-200);
37
- --avatar-presence-position-right: calc(var(--space-200) * -1); // -2
38
- --avatar-presence-position-bottom: calc(var(--space-200) * -1); // -2
37
+ --avatar-presence-position-right: var(--space-200-negative);
38
+ --avatar-presence-position-bottom: var(--space-200-negative);
39
39
  --avatar-count-color-shadow: var(--theme-sidebar-color-background);
40
40
 
41
41
  position: relative;
@@ -115,37 +115,37 @@
115
115
  // ------------------------------------------------------------------------
116
116
 
117
117
  &--xs {
118
- --avatar-size-shape: calc(var(--size-500) + var(--size-200)); // 18
119
- --avatar-presence-position-right: calc(var(--space-300) * -1); // -4
120
- --avatar-presence-position-bottom: calc(var(--space-300) * -1); // -4
118
+ --avatar-size-shape: calc(var(--size-500) + var(--size-200));
119
+ --avatar-presence-position-right: var(--space-300-negative);
120
+ --avatar-presence-position-bottom: var(--space-300-negative);
121
121
  }
122
122
 
123
123
  &--sm {
124
- --avatar-size-shape: calc(var(--size-500) + var(--size-400)); // 24
124
+ --avatar-size-shape: var(--size-550);
125
125
  --avatar-size-text: var(--fs-100);
126
- --avatar-presence-position-right: calc(var(--space-200) * -1); // -2
127
- --avatar-presence-position-bottom: calc(var(--space-200) * -1); // -2
126
+ --avatar-presence-position-right: var(--space-200-negative);
127
+ --avatar-presence-position-bottom: var(--space-200-negative);
128
128
  }
129
129
 
130
130
  &--md {
131
- --avatar-size-shape: var(--size-600); // 32
131
+ --avatar-size-shape: var(--size-600);
132
132
  --avatar-size-text: var(--fs-200);
133
- --avatar-presence-position-right: calc(var(--space-100) * -1); // -1
134
- --avatar-presence-position-bottom: calc(var(--space-100) * -1); // -1
133
+ --avatar-presence-position-right: var(--space-100-negative);
134
+ --avatar-presence-position-bottom: var(--space-100-negative);
135
135
  }
136
136
 
137
137
  &--lg {
138
- --avatar-size-shape: calc(var(--size-600) + var(--size-500)); // 48
138
+ --avatar-size-shape: var(--size-650);
139
139
  --avatar-size-text: var(--fs-300);
140
- --avatar-presence-position-right: var(--space-100); // 1
141
- --avatar-presence-position-bottom: var(--space-100); // 1
140
+ --avatar-presence-position-right: var(--space-100);
141
+ --avatar-presence-position-bottom: var(--space-100);
142
142
  }
143
143
 
144
144
  &--xl {
145
- --avatar-size-shape: var(--size-700); // 64
145
+ --avatar-size-shape: var(--size-700);
146
146
  --avatar-size-text: var(--fs-400);
147
- --avatar-presence-position-right: var(--space-300); // 4
148
- --avatar-presence-position-bottom: var(--space-300); // 4
147
+ --avatar-presence-position-right: var(--space-300);
148
+ --avatar-presence-position-bottom: var(--space-300);
149
149
  }
150
150
 
151
151
  // -- GROUP
@@ -154,7 +154,7 @@
154
154
  &--group {
155
155
  --avatar-size-shape: calc(var(--size-300) * 4.5);
156
156
 
157
- width: calc(var(--size-300) * 6);
158
- height: calc(var(--size-300) * 6);
157
+ width: var(--size-550);
158
+ height: var(--size-550);
159
159
  }
160
160
  }
@@ -28,7 +28,7 @@
28
28
  --badge-font-size: var(--fs-100);
29
29
  --badge-font-weight: var(--fw-semibold);
30
30
  --badge-gap: var(--space-300);
31
- --badge-letter-spacing: calc(var(--size-100) / 2);
31
+ --badge-letter-spacing: var(--size-50);
32
32
  --badge-padding-y: var(--space-100);
33
33
  --badge-padding-x: var(--space-400);
34
34
  --badge-text-case: none;
@@ -41,7 +41,7 @@
41
41
  align-items: center;
42
42
  justify-content: center;
43
43
  box-sizing: border-box;
44
- min-width: calc(var(--size-400) + var(--size-500));
44
+ min-width: var(--size-550);
45
45
  padding: var(--badge-padding-y) var(--badge-padding-x);
46
46
  color: var(--badge-color-text);
47
47
  font-weight: var(--badge-font-weight);
@@ -32,7 +32,7 @@
32
32
  display: flex;
33
33
  box-sizing: border-box;
34
34
  width: 100%;
35
- min-height: calc(var(--size-300) * 12); // 48
35
+ min-height: var(--size-650); // 48
36
36
  color: var(--banner-color-text);
37
37
  font-size: var(--banner-font-size);
38
38
  line-height: var(--banner-line-height);
@@ -43,7 +43,7 @@
43
43
 
44
44
  // If you want to hide and reveal the banner
45
45
  &[aria-hidden='true'] {
46
- --topbar-height: calc(var(--size-3) * 16); // -64
46
+ --topbar-height: var(--size-650);
47
47
 
48
48
  visibility: hidden;
49
49
  opacity: 0;
@@ -52,12 +52,12 @@
52
52
 
53
53
  // Provide a forward slash with each element except when it's the last one.
54
54
  &:not(:last-of-type) {
55
- margin-right: calc(var(--space-400) + var(--space-300));
55
+ margin-right: var(--space-450);
56
56
 
57
57
  &::before {
58
58
  position: absolute;
59
- right: calc(calc(var(--space-400) + var(--space-300)) * -1);
60
- margin-top: calc(var(--space-100) * -1);
59
+ right: var(--space-450-negative);
60
+ margin-top: var(--space-100-negative);
61
61
  color: var(--breadcrumbs-color-separator);
62
62
  content: '/';
63
63
  }
@@ -39,12 +39,12 @@
39
39
  --button-padding-y-xs: calc(calc(var(--space-400) - var(--space-100)) - var(--button-border-width)); // ((8 - 1) - border-width)
40
40
  --button-padding-x-xs: calc(var(--space-400) - var(--button-border-width)); // 8 minus border-width
41
41
  --button-padding-y-sm: calc(var(--space-400) - var(--button-border-width)); // 8 minus border-width
42
- --button-padding-x-sm: calc((var(--space-500) - var(--space-300)) - var(--button-border-width)); // 12 minus border-width
42
+ --button-padding-x-sm: calc(var(--space-450) - var(--button-border-width)); // 12 minus border-width
43
43
  --button-padding-y-md: calc(var(--space-400) - var(--button-border-width)); // 8 minus border-width
44
- --button-padding-x-md: calc((var(--space-500) - var(--space-300)) - var(--button-border-width)); // 12 minus border-width
44
+ --button-padding-x-md: calc(var(--space-450) - var(--button-border-width)); // 12 minus border-width
45
45
  --button-padding-y-lg: calc((var(--space-400) + var(--space-200)) - var(--button-border-width)); // 10 minus border-width
46
46
  --button-padding-x-lg: calc(var(--space-500) - var(--button-border-width)); // 16 minus border-width
47
- --button-padding-y-xl: calc((var(--space-500) - var(--space-300)) - var(--button-border-width)); // 12 minus border-width
47
+ --button-padding-y-xl: calc(var(--space-450) - var(--button-border-width)); // 12 minus border-width
48
48
  --button-padding-x-xl: calc(var(--space-500) - var(--button-border-width)); // 16 minus border-width
49
49
  --button-padding-y: var(--button-padding-y-md);
50
50
  --button-padding-x: var(--button-padding-x-md);
@@ -157,7 +157,7 @@
157
157
  --button-padding-x: var(--button-padding-x-lg);
158
158
  --button-font-size: var(--fs-300);
159
159
  --button-line-height: var(--button-line-height-lg);
160
- --button-border-radius: calc(var(--size-300) * 3);
160
+ --button-border-radius: var(--size-450);
161
161
 
162
162
  .d-btn__icon .d-svg {
163
163
  width: @icon20;
@@ -220,11 +220,11 @@
220
220
  }
221
221
 
222
222
  .d-btn__icon--left:not(:only-child) {
223
- margin-left: calc(var(--space-200) * -1);
223
+ margin-left: var(--space-200-negative);
224
224
  }
225
225
 
226
226
  .d-btn__icon--right:not(:only-child) {
227
- margin-right: calc(var(--space-200) * -1);
227
+ margin-right: var(--space-200-negative);
228
228
  }
229
229
 
230
230
  // ============================================================================
@@ -501,7 +501,7 @@
501
501
  width: 2em;
502
502
  height: 2em;
503
503
  margin-right: var(--space-400);
504
- margin-left: calc(var(--space-300) * -1);
504
+ margin-left: var(--space-300-negative);
505
505
  background-color: var(--white);
506
506
  border-radius: var(--br2);
507
507
  }
@@ -45,7 +45,7 @@
45
45
  // $$ CONTENT
46
46
  // ----------------------------------------------------------------------------
47
47
  .d-card__content {
48
- padding: var(--size-500);
48
+ padding: var(--space-500);
49
49
  overflow-y: auto;
50
50
  }
51
51
 
@@ -54,5 +54,5 @@
54
54
  .d-card__footer {
55
55
  display: flex;
56
56
  align-items: center;
57
- padding: 0 var(--size-500) var(--size-500);
57
+ padding: 0 var(--space-500) var(--space-500);
58
58
  }
@@ -76,9 +76,9 @@
76
76
  }
77
77
 
78
78
  .d-avatar {
79
- --avatar-size-shape: calc(var(--size-600) - var(--space-400));
79
+ --avatar-size-shape: var(--space-550);
80
80
 
81
- margin: calc(var(--space-200) * -1) var(--space-300) calc(var(--space-200) * -1) calc(calc(var(--space-300) + var(--space-200)) * -1);
81
+ margin: var(--space-200-negative) var(--space-300) var(--space-200-negative) var(--space-350-negative);
82
82
  }
83
83
 
84
84
  .d-svg {
@@ -134,7 +134,7 @@
134
134
  // $$ EXTRA SMALL
135
135
  // ----------------------------------------------------------------------------
136
136
  .d-chip__label--xs {
137
- padding: var(--space-200) calc(var(--space-200) + var(--space-300));
137
+ padding: var(--space-200) var(--space-350);
138
138
  font-size: var(--fs-100);
139
139
 
140
140
  .d-svg {
@@ -146,8 +146,8 @@
146
146
  // not nested within the chip.
147
147
  &:not(:only-child)::after {
148
148
  flex-shrink: 0;
149
- width: calc(var(--size-400) + var(--size-300));
150
- height: calc(var(--size-400) + var(--size-300));
149
+ width: var(--size-450);
150
+ height: var(--size-450);
151
151
  content: '';
152
152
  }
153
153
 
@@ -155,7 +155,7 @@
155
155
  --avatar-size-shape: var(--size-500);
156
156
 
157
157
  margin-right: var(--space-300);
158
- margin-left: calc(var(--space-300) * -1);
158
+ margin-left: var(--space-300-negative);
159
159
  }
160
160
  }
161
161
 
@@ -164,8 +164,8 @@
164
164
 
165
165
  // Clickable area for the close button.
166
166
  &::before {
167
- width: calc(var(--size-600) - var(--size-400)); // 24
168
- height: calc(var(--size-600) - var(--size-400)); // 24
167
+ width: var(--size-550);
168
+ height: var(--size-550);
169
169
  }
170
170
 
171
171
  .d-btn__icon .d-svg {
@@ -205,8 +205,8 @@
205
205
  padding: var(--space-200);
206
206
 
207
207
  &::before {
208
- width: calc(var(--size-600) - var(--space-400)); // 24
209
- height: calc(var(--size-600) - var(--space-400)); // 24
208
+ width: var(--space-550);
209
+ height: var(--space-550);
210
210
  }
211
211
 
212
212
  .d-btn__icon .d-svg {
@@ -81,7 +81,7 @@ fieldset {
81
81
  }
82
82
 
83
83
  .d-label + .d-description {
84
- margin-top: calc(var(--space-300) * -1);
84
+ margin-top: var(--space-300-negative);
85
85
  margin-bottom: var(--space-300);
86
86
  }
87
87
 
@@ -33,7 +33,7 @@
33
33
  --input-color-background: hsla(var(--black-900-hsl) / 0.03);
34
34
  --input-color-background-disabled: hsla(var(--black-900-hsl) / 0.12);
35
35
  --input-color-text: var(--fc-secondary);
36
- --input-border-width: calc(var(--size-100) + calc(var(--size-100) / 2)); // 1.5
36
+ --input-border-width: calc(var(--size-100) + var(--size-50)); // 1.5
37
37
  --input-border-radius: var(--size-400);
38
38
  --input-padding-y: calc(var(--space-400) - var(--input-border-width));
39
39
  --input-padding-x: calc((var(--space-500) - var(--space-300)) - var(--input-border-width));
@@ -143,11 +143,11 @@
143
143
  }
144
144
 
145
145
  &.d-input-icon--right {
146
- padding-right: calc(var(--space-300) + var(--space-200));
146
+ padding-right: var(--space-350);
147
147
  }
148
148
 
149
149
  &.d-input-icon--left {
150
- padding-left: calc(var(--space-300) + var(--space-200));
150
+ padding-left: var(--space-350);
151
151
  }
152
152
  }
153
153
  }
@@ -193,7 +193,7 @@
193
193
  .d-textarea--sm {
194
194
  #d-internal__input-and-select-sm();
195
195
 
196
- min-height: calc(var(--size-300) * 12); // 48
196
+ min-height: var(--size-650); // 48
197
197
  }
198
198
 
199
199
  .d-textarea--lg {
@@ -17,7 +17,7 @@
17
17
  .d-list-group--header,
18
18
  .d-list-group--link {
19
19
  display: block;
20
- padding: var(--size-300) calc(var(--size-300) * 6); // 4 24
20
+ padding: var(--space-300) var(--space-550); // 4 24
21
21
  }
22
22
 
23
23
  .d-list-group--header {