Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f7002b6

Browse files
committed
Upgrade to dart-sass
1 parent e7253d9 commit f7002b6

29 files changed

+129
-121
lines changed

‎package.json‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
},
99
"scripts": {
1010
"prettier": "prettier --write \"src/**/*.{js,scss}\" \"dev/**/*.{js,scss}\" \"examples/**/*.{js,scss}\"",
11-
"make:arrows": "node scripts/makeArrows.js",
12-
"make:combined-translation-keys": "npm run make:translation-keys && node scripts/combineTranslationKeys.js",
13-
"make:lib:css": "mkdirp lib && babel-node scripts/styles.js && babel-node scripts/styles.js && babel-node scripts/postcss.js && babel-node scripts/postcss.js",
14-
"make:lib:js": "mkdirp lib && babel src --out-dir lib --ignore=__tests__/* --source-maps",
15-
"make:lib": "rimraf lib && mkdir lib && npm run make:lib:js && npm run make:lib:css && npm run make:combined-translation-keys",
16-
"make:translation-keys": "node scripts/findTranslationKeys.js",
17-
"prepublishOnly": "npm run make:lib",
18-
"start": "webpack-dev-server --hot",
11+
"build:arrows": "node scripts/makeArrows.js",
12+
"build:translation-keys": "node scripts/findTranslationKeys.js",
13+
"build:combined-translation-keys": "npm run build:translation-keys && node scripts/combineTranslationKeys.js",
14+
"build:sass": "sass src/styles/main.scss:lib/react-chart-editor.css",
15+
"build:css": "mkdirp lib && sass src/styles/main.scss:lib/react-chart-editor.css && babel-node scripts/postcss.js && babel-node scripts/postcss.js",
16+
"build:js": "mkdirp lib && babel src --out-dir lib --ignore=__tests__/* --source-maps",
17+
"build": "rimraf lib && mkdir lib && npm run build:js && npm run build:css && npm run build:combined-translation-keys",
18+
"watch": "webpack-dev-server --hot",
19+
"prepublishOnly": "npm run build",
1920
"storybook": "start-storybook -p 9001 -c .storybook",
2021
"test": "npm run test:lint && npm run test:pretty && npm run test:js",
2122
"test:js": "jest --setupTestFrameworkScriptFile=raf/polyfill --maxWorkers=2",
2223
"test:lint": "eslint \"src/**/*.js\" \"dev/**/*.js\" \"examples/**/*.js\" && echo -e '\\033[0;32m'PASS'\\033[0m'",
2324
"test:pretty": "prettier -l \"src/**/*.js\" \"dev/**/*.js\" \"examples/**/*.js\" && echo -e '\\033[0;32m'PASS'\\033[0m'",
2425
"test:percy": "node --max-old-space-size=4096 $(npm bin)/build-storybook && percy storybook ./storybook-static",
2526
"test:percy-local": "node --max-old-space-size=4096 $(npm bin)/build-storybook",
26-
"watch": "babel src --watch --out-dir lib --source-maps | node-sass -w src/styles/main.scss lib/react-chart-editor.css",
27-
"watch-test": "jest --watch"
27+
"test:watch": "jest --watch"
2828
},
2929
"dependencies": {
3030
"@plotly/draft-js-export-html": "1.2.0",
@@ -84,8 +84,8 @@
8484
"jest": "26.6.3",
8585
"jest-cli": "26.6.3",
8686
"mkdirp": "1.0.4",
87-
"node-sass": "7.0.1",
88-
"postcss": "8.4.13",
87+
"sass": "1.52.1",
88+
"postcss": "8.4.14",
8989
"postcss-combine-duplicated-selectors": "10.0.3",
9090
"prettier": "2.6.2",
9191
"react": "16.14.0",

‎scripts/styles.js‎

Lines changed: 0 additions & 39 deletions
This file was deleted.

‎src/styles/_helpers.scss‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@use "sass:map";
12
.\+flex {
23
display: flex;
34
}
@@ -15,23 +16,23 @@
1516

1617
@function spacing($name, $true-val: false) {
1718
@if $true-val == true {
18-
@return map-get($spacings, $name);
19+
@return map.get($spacings, $name);
1920
} @else {
2021
@return var(--spacing-#{$name});
2122
}
2223
}
2324

2425
@function font($name, $true-val: false) {
2526
@if $true-val == true {
26-
@return map-get($fonts, $name);
27+
@return map.get($fonts, $name);
2728
} @else {
2829
@return var(--font-#{$name});
2930
}
3031
}
3132

3233
@function color($name, $true-val: false) {
3334
@if $true-val == true {
34-
@return map-get($colors, $name);
35+
@return map.get($colors, $name);
3536
} @else {
3637
@return var(--color-#{$name});
3738
}

‎src/styles/_mixins.scss‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@use 'sass:meta';
2+
@use 'variables/defaults' as *;
3+
@use 'variables/main' as *;
4+
@import 'movement';
5+
16
@mixin vendor($property, $value) {
27
-webkit-#{$property}: $value;
38
-moz-#{$property}: $value;
@@ -87,9 +92,9 @@
8792
@mixin generateVars() {
8893
// Base Color Variables
8994
@each $var, $val in $colors {
90-
@if type-of($val) == map {
95+
@if meta.type-of($val) == map {
9196
@each $var-n, $val-n in $val {
92-
@if type-of($val-n) == map {
97+
@if meta.type-of($val-n) == map {
9398
@each $var-i, $val-i in $val-n {
9499
#{--color}-#{$var}-#{$var-n}-#{$var-i}: $val-i;
95100
}
@@ -98,7 +103,7 @@
98103
}
99104
}
100105
} @else {
101-
#{--color}-#{$var}: $val;
106+
#{--color}-#{""+$var}: $val;
102107
}
103108
}
104109

@@ -120,7 +125,7 @@
120125
}
121126
// Button Color Variables
122127
@each $var, $val in $buttons {
123-
@if type-of($val) == map {
128+
@if meta.type-of($val) == map {
124129
@each $var-n, $val-n in $val {
125130
#{--color-button}-#{$var}-#{$var-n}: $val-n;
126131
}

‎src/styles/_movement.scss‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
}
4242
}
4343

44-
.animate {
44+
.animate,
45+
%animate {
4546
&--fade-in {
4647
opacity: 0;
4748
animation: fade-in 0.1s forwards cubic-bezier(0.19, 1, 0.22, 1);

‎src/styles/components/_main.scss‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'sidebar/main';
2-
@import 'containers/main';
3-
@import 'fields/main';
4-
@import 'widgets/main';
1+
@use 'sidebar/main';
2+
@use 'containers/main'asmain2;
3+
@use 'fields/main'asmain3;
4+
@use 'widgets/main'asmain4;

‎src/styles/components/containers/_fold.scss‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
@use 'sass:math';
2+
@use '../../variables/main' as *;
3+
14
.fold {
25
width: 100%;
36
user-select: none;
@@ -53,7 +56,7 @@
5356
}
5457

5558
&__title {
56-
margin-left: var(--spacing-half-unit) / 3;
59+
margin-left: calc(var(--spacing-half-unit) / 3);
5760
font-size: var(--font-size-medium);
5861
line-height: var(--font-size-medium);
5962
font-weight: var(--font-weight-semibold);
@@ -108,7 +111,9 @@
108111
opacity: 1;
109112
}
110113
&--disabled {
111-
@extend .fold__top__moving-controls--up;
114+
height: 13px;
115+
width: 18px;
116+
display: block;
112117
svg {
113118
transform: rotate(-180deg);
114119
transform-origin: center center;
@@ -129,7 +134,10 @@
129134
opacity: 1;
130135
}
131136
&--disabled {
132-
@extend .fold__top__moving-controls--down;
137+
height: 13px;
138+
width: 18px;
139+
display: block;
140+
margin-top: -2px;
133141
svg {
134142
opacity: 0.3;
135143
}

‎src/styles/components/containers/_info.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../mixins' as *;
2+
13
.info {
24
&__title {
35
@include heading('small');
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
@import 'panel';
2-
@import 'fold';
3-
@import 'section';
4-
@import 'menupanel';
5-
@import 'info';
6-
@import 'modalbox';
7-
@import 'modal';
8-
@import 'tabs';
1+
@use 'panel';
2+
@use 'fold';
3+
@use 'section';
4+
@use 'menupanel';
5+
@use 'info';
6+
@use 'modalbox';
7+
@use 'modal';
8+
@use 'tabs';

‎src/styles/components/containers/_modal.scss‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use '../../mixins' as *;
2+
13
.modal {
24
box-sizing: border-box;
35
* {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /