@transferwise/neptune-css 14.3.49 → 14.3.51
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/dist/css/accordion.css +1 -1
- package/dist/css/alerts.css +1 -1
- package/dist/css/button-groups.css +1 -1
- package/dist/css/buttons.css +1 -1
- package/dist/css/decision.css +1 -1
- package/dist/css/dropdowns.css +1 -1
- package/dist/css/droppable.css +1 -1
- package/dist/css/footer.css +1 -1
- package/dist/css/input-groups.css +1 -1
- package/dist/css/list-group.css +1 -1
- package/dist/css/navbar.css +1 -1
- package/dist/css/neptune-addons.css +1 -1
- package/dist/css/neptune-core.css +1 -1
- package/dist/css/neptune.css +1 -1
- package/dist/css/popovers.css +1 -1
- package/dist/css/tooltip.css +1 -1
- package/dist/less/neptune-tokens.less +2 -2
- package/dist/props/neptune-tokens.css +1 -1
- package/package.json +3 -10
- package/src/less/addons/_spacing-utilities.less +4 -0
- package/src/less/alerts.less +7 -0
- package/src/less/core/_scaffolding.less +4 -16
- package/src/less/core/_typography-utilities.less +2 -20
- package/src/less/core/_typography.less +214 -272
- package/scripts/neptune-css-upgrader.js +0 -106
- package/upgrades/scripts/2021-11-v11-v12.js +0 -61
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* eslint-disable no-console, compat/compat */
|
|
3
|
-
|
|
4
|
-
const { exec } = require('child_process');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
const inquirer = require('inquirer');
|
|
8
|
-
const inquirerFileTreeSelection = require('inquirer-file-tree-selection-prompt');
|
|
9
|
-
|
|
10
|
-
inquirer.registerPrompt('file-tree-selection', inquirerFileTreeSelection);
|
|
11
|
-
|
|
12
|
-
const IGNORE_PATTERN = '**/node_modules/*';
|
|
13
|
-
const EXTENSIONS = {
|
|
14
|
-
LESS: 'less',
|
|
15
|
-
CSS: 'css',
|
|
16
|
-
BOTH: 'less,css',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const fetchSettings = () => {
|
|
20
|
-
const questions = [
|
|
21
|
-
{
|
|
22
|
-
name: 'upgradeScript',
|
|
23
|
-
type: 'file-tree-selection',
|
|
24
|
-
root: path.join(__dirname, '../upgrades/scripts'),
|
|
25
|
-
message: '✨ Which upgrade would you like to run?',
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
type: 'list',
|
|
29
|
-
name: 'extension',
|
|
30
|
-
message: '✨ What file extensions should I look at?',
|
|
31
|
-
choices: Object.values(EXTENSIONS),
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'files',
|
|
35
|
-
type: 'file-tree-selection',
|
|
36
|
-
onlyShowDir: true,
|
|
37
|
-
root: process.cwd(),
|
|
38
|
-
message: '✨ And what directory would you like to transform?',
|
|
39
|
-
},
|
|
40
|
-
];
|
|
41
|
-
return inquirer.prompt(questions);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const fetchOptions = () => {
|
|
45
|
-
const questions = [
|
|
46
|
-
{
|
|
47
|
-
name: 'dry',
|
|
48
|
-
type: 'confirm',
|
|
49
|
-
message: '✨ Dry run? (no changes are made to files)',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: 'verbose',
|
|
53
|
-
type: 'confirm',
|
|
54
|
-
message: '✨ Extra logging?',
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
];
|
|
58
|
-
return inquirer.prompt(questions);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
const okToProceed = () => {
|
|
62
|
-
const questions = [
|
|
63
|
-
{
|
|
64
|
-
name: 'confirm',
|
|
65
|
-
type: 'confirm',
|
|
66
|
-
message: 'Does everything look ok?',
|
|
67
|
-
},
|
|
68
|
-
];
|
|
69
|
-
return inquirer.prompt(questions);
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
const run = async () => {
|
|
73
|
-
const { upgradeScript, extension, files } = await fetchSettings();
|
|
74
|
-
const { dry, verbose } = await fetchOptions();
|
|
75
|
-
|
|
76
|
-
console.log(`✨ Please review the following:`);
|
|
77
|
-
console.log(`✨ Upgrade script: ${upgradeScript}`);
|
|
78
|
-
console.log(`✨ File extension(s): ${extension}`);
|
|
79
|
-
console.log(`✨ Directory: ${files}`);
|
|
80
|
-
console.log(`✨ Dry run: ${dry}`);
|
|
81
|
-
|
|
82
|
-
const { confirm } = await okToProceed();
|
|
83
|
-
|
|
84
|
-
const config = `--files=${files} --extensions=${extension} --ignore=${IGNORE_PATTERN}`;
|
|
85
|
-
const options = `${dry ? '--dry' : ''} ${verbose ? '--verbose' : ''}`;
|
|
86
|
-
|
|
87
|
-
const handleOutput = (error, stdout, stderr) => {
|
|
88
|
-
if (error) {
|
|
89
|
-
console.log(stderr);
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
console.log(stdout);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
const command = `node ${upgradeScript} ${config} ${options}`;
|
|
96
|
-
|
|
97
|
-
if (confirm) {
|
|
98
|
-
console.log('🚀 Running codemod, please wait a few seconds...');
|
|
99
|
-
console.log(command);
|
|
100
|
-
exec(command, handleOutput);
|
|
101
|
-
} else {
|
|
102
|
-
console.log('👋 Exiting');
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
run();
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/* eslint-disable no-console, compat/compat */
|
|
3
|
-
|
|
4
|
-
const replace = require('replace-in-file');
|
|
5
|
-
const { argv } = require('yargs');
|
|
6
|
-
|
|
7
|
-
const mappings = {
|
|
8
|
-
'color-text-primary': 'color-content-primary',
|
|
9
|
-
'color-text-secondary': 'color-content-secondary',
|
|
10
|
-
'color-text-link': 'color-content-accent',
|
|
11
|
-
'color-text-link-hover': 'color-content-accent-hover',
|
|
12
|
-
'color-text-link-active': 'color-content-accent-active',
|
|
13
|
-
'color-text-positive': 'color-content-positive',
|
|
14
|
-
'color-text-negative': 'color-content-negative',
|
|
15
|
-
'color-text-warning': 'color-content-warning',
|
|
16
|
-
'color-text-inactive': 'color-content-disabled',
|
|
17
|
-
'color-text-important': 'color-content-primary',
|
|
18
|
-
'color-control-accent': 'color-interactive-accent',
|
|
19
|
-
'color-control-accent-hover': 'color-interactive-accent-hover',
|
|
20
|
-
'color-control-accent-active': 'color-interactive-accent-active',
|
|
21
|
-
'color-control-positive': 'color-interactive-positive',
|
|
22
|
-
'color-control-positive-hover': 'color-interactive-positive-hover',
|
|
23
|
-
'color-control-positive-active': 'color-interactive-positive-active',
|
|
24
|
-
'color-control-negative': 'color-interactive-negative',
|
|
25
|
-
'color-control-negative-hover': 'color-interactive-negative-hover',
|
|
26
|
-
'color-control-negative-active': 'color-interactive-negative-active',
|
|
27
|
-
'color-control-warning': 'color-interactive-warning',
|
|
28
|
-
'color-control-warning-hover': 'color-interactive-warning-hover',
|
|
29
|
-
'color-control-warning-active': 'color-interactive-warning-active',
|
|
30
|
-
'color-border-focus': 'color-accent',
|
|
31
|
-
'color-border-positive': 'color-positive',
|
|
32
|
-
'color-border-warning': 'color-warning',
|
|
33
|
-
'color-border-negative': 'color-negative',
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// Special case mappings that are not exchanging variable for variable
|
|
37
|
-
const from = [new RegExp('@color-text-control', 'g'), /var\(--color-text-control\)/g];
|
|
38
|
-
const to = ['#fff', '#fff'];
|
|
39
|
-
|
|
40
|
-
Object.keys(mappings).forEach((value) => {
|
|
41
|
-
from.push(new RegExp(`@${value}`, 'g'));
|
|
42
|
-
from.push(new RegExp(`--${value}`, 'g'));
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
Object.values(mappings).forEach((value) => {
|
|
46
|
-
to.push(`@${value}`);
|
|
47
|
-
to.push(`--${value}`);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
const { files, dry, verbose, extensions, ignore } = argv;
|
|
51
|
-
|
|
52
|
-
const options = {
|
|
53
|
-
files: `${files}/**/*.{${extensions}}`,
|
|
54
|
-
from,
|
|
55
|
-
to,
|
|
56
|
-
dry: !!dry,
|
|
57
|
-
verbose: !!verbose,
|
|
58
|
-
ignore,
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
replace(options);
|