Skip to content

Commit 8fc3ffd

Browse files
committed
Included a static patternfly palette instead of requiring weird webpack loader's tricks to read id from patternfly. Fixes some import issues of the esm build.
1 parent a2f8be7 commit 8fc3ffd

File tree

5 files changed

+949
-1178
lines changed

5 files changed

+949
-1178
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
### [0.1.7] - 2020-07-15
5+
- Included a static patternfly palette instead of requiring weird webpack loader's tricks to read id from patternfly. Fixes some import issues of the esm build.
6+
- Updated dependencies.
7+
48
### [0.1.6] - 2020-06-11
59
### Added
610
- `pf-card`s can now override the content of the header and footer using the new slots named `header` and `footer`.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"c3": "^0.6.8",
4343
"es6-promise": "^4.2.5",
4444
"patternfly": "^3.59.1",
45-
"uiv": "^0.35.1",
45+
"uiv": "^0.36.0",
4646
"vue": "^2.6.6"
4747
},
4848
"devDependencies": {
@@ -56,7 +56,7 @@
5656
"@babel/preset-env": "^7.1.0",
5757
"@babel/runtime": "^7.1.2",
5858
"@rollup/plugin-babel": "^5.0.3",
59-
"@rollup/plugin-commonjs": "^13.0.0",
59+
"@rollup/plugin-commonjs": "^14.0.0",
6060
"@rollup/plugin-json": "^4.0.0",
6161
"@rollup/plugin-node-resolve": "^8.0.1",
6262
"autoprefixer": "^9.3.1",
@@ -69,9 +69,7 @@
6969
"eslint-loader": "^4.0.2",
7070
"eslint-plugin-import": "^2.2.0",
7171
"eslint-plugin-vue": "^6.0.1",
72-
"exports-loader": "^1.0.0",
7372
"html-loader": "^1.1.0",
74-
"imports-loader": "^0.8.0",
7573
"lodash-es": "^4.17.11",
7674
"mini-css-extract-plugin": "^0.9.0",
7775
"node-sass": "^4.11.0",
@@ -83,7 +81,7 @@
8381
"rollup": "^2.15.0",
8482
"rollup-plugin-css-only": "^2.1.0",
8583
"rollup-plugin-vue": "^5.0.0",
86-
"sass-loader": "^8.0.0",
84+
"sass-loader": "^9.0.2",
8785
"style-loader": "^1.0.0",
8886
"vue-functional-data-merge": "^3.1.0",
8987
"vue-loader": "^15.6.2",

src/components/C3Chart.vue

Lines changed: 113 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,121 @@
1111

1212
<script>
1313
import c3 from 'c3';
14-
import pfPaletteColors from 'patternfly/dist/js/patternfly-settings-colors.js';
14+
15+
// FROM node_modules/patternfly/dist/js/patternfly-settings-colors.js
16+
const patternfly = {
17+
pfPaletteColors: {
18+
black: '#030303',
19+
black100: '#fafafa',
20+
black200: '#ededed',
21+
black300: '#d1d1d1',
22+
black400: '#bbbbbb',
23+
black500: '#8b8d8f',
24+
black600: '#72767b',
25+
black700: '#4d5258',
26+
black800: '#393f44',
27+
black900: '#292e34',
28+
blue: '#0088ce',
29+
blue100: '#bee1f4',
30+
blue200: '#7dc3e8',
31+
blue300: '#39a5dc',
32+
blue400: '#0088ce',
33+
blue500: '#00659c',
34+
blue600: '#004368',
35+
blue700: '#002235',
36+
gold: '#f0ab00',
37+
gold100: '#fbeabc',
38+
gold200: '#f9d67a',
39+
gold300: '#f5c12e',
40+
gold400: '#f0ab00',
41+
gold500: '#b58100',
42+
gold600: '#795600',
43+
gold700: '#3d2c00',
44+
orange: '#ec7a08',
45+
orange100: '#fbdebf',
46+
orange200: '#f7bd7f',
47+
orange300: '#f39d3c',
48+
orange400: '#ec7a08',
49+
orange500: '#b35c00',
50+
orange600: '#773d00',
51+
orange700: '#3b1f00',
52+
lightBlue: '#00b9e4',
53+
lightBlue100: '#beedf9',
54+
lightBlue200: '#7cdbf3',
55+
lightBlue300: '#35caed',
56+
lightBlue400: '#00b9e4',
57+
lightBlue500: '#008bad',
58+
lightBlue600: '#005c73',
59+
lightBlue700: '#002d39',
60+
green: '#3f9c35',
61+
green100: '#cfe7cd',
62+
green200: '#9ecf99',
63+
green300: '#6ec664',
64+
green400: '#3f9c35',
65+
green500: '#2d7623',
66+
green600: '#1e4f18',
67+
green700: '#0f280d',
68+
lightGreen: '#92d400',
69+
lightGreen100: '#e4f5bc',
70+
lightGreen200: '#c8eb79',
71+
lightGreen300: '#ace12e',
72+
lightGreen400: '#92d400',
73+
lightGreen500: '#6ca100',
74+
lightGreen600: '#486b00',
75+
lightGreen700: '#253600',
76+
cyan: '#007a87',
77+
cyan100: '#bedee1',
78+
cyan200: '#7dbdc3',
79+
cyan300: '#3a9ca6',
80+
cyan400: '#007a87',
81+
cyan500: '#005c66',
82+
cyan600: '#003d44',
83+
cyan700: '#001f22',
84+
purple: '#703fec',
85+
purple100: '#c7bfff',
86+
purple200: '#a18fff',
87+
purple300: '#8461f7',
88+
purple400: '#703fec',
89+
purple500: '#582fc0',
90+
purple600: '#40199a',
91+
purple700: '#1f0066',
92+
red: '#cc0000',
93+
red100: '#cc0000',
94+
red200: '#a30000',
95+
red300: '#8b0000',
96+
red400: '#470000',
97+
red500: '#2c0000',
98+
},
99+
};
15100
16101
const palette = [
17-
pfPaletteColors.red,
18-
pfPaletteColors.blue,
19-
pfPaletteColors.green,
20-
pfPaletteColors.gold,
21-
pfPaletteColors.cyan,
22-
pfPaletteColors.orange,
23-
pfPaletteColors.lightGreen,
24-
pfPaletteColors.purple,
25-
pfPaletteColors.lightBlue,
26-
pfPaletteColors.red700,
27-
pfPaletteColors.blue700,
28-
pfPaletteColors.green700,
29-
pfPaletteColors.gold700,
30-
pfPaletteColors.cyan700,
31-
pfPaletteColors.orange700,
32-
pfPaletteColors.lightGree7500,
33-
pfPaletteColors.purple700,
34-
pfPaletteColors.lightBlue700,
35-
pfPaletteColors.red400,
36-
pfPaletteColors.blue400,
37-
pfPaletteColors.green400,
38-
pfPaletteColors.gold400,
39-
pfPaletteColors.cyan400,
40-
pfPaletteColors.orange400,
41-
pfPaletteColors.lightGree4500,
42-
pfPaletteColors.purple400,
43-
pfPaletteColors.lightBlue400,
102+
patternfly.pfPaletteColors.red,
103+
patternfly.pfPaletteColors.blue,
104+
patternfly.pfPaletteColors.green,
105+
patternfly.pfPaletteColors.gold,
106+
patternfly.pfPaletteColors.cyan,
107+
patternfly.pfPaletteColors.orange,
108+
patternfly.pfPaletteColors.lightGreen,
109+
patternfly.pfPaletteColors.purple,
110+
patternfly.pfPaletteColors.lightBlue,
111+
patternfly.pfPaletteColors.red700,
112+
patternfly.pfPaletteColors.blue700,
113+
patternfly.pfPaletteColors.green700,
114+
patternfly.pfPaletteColors.gold700,
115+
patternfly.pfPaletteColors.cyan700,
116+
patternfly.pfPaletteColors.orange700,
117+
patternfly.pfPaletteColors.lightGree7500,
118+
patternfly.pfPaletteColors.purple700,
119+
patternfly.pfPaletteColors.lightBlue700,
120+
patternfly.pfPaletteColors.red400,
121+
patternfly.pfPaletteColors.blue400,
122+
patternfly.pfPaletteColors.green400,
123+
patternfly.pfPaletteColors.gold400,
124+
patternfly.pfPaletteColors.cyan400,
125+
patternfly.pfPaletteColors.orange400,
126+
patternfly.pfPaletteColors.lightGree4500,
127+
patternfly.pfPaletteColors.purple400,
128+
patternfly.pfPaletteColors.lightBlue400,
44129
];
45130
46131
export default {

webpack.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ module.exports = env => {
3636
options: {
3737
formatter: require('eslint-friendly-formatter'),
3838
},
39-
}, {
40-
test: /\/patternfly-settings-colors\.js/,
41-
use: [
42-
'imports-loader?patternfly=>{},window=>{patternfly}',
43-
'exports-loader?exports=default patternfly.pfPaletteColors',
44-
],
4539
}, {
4640
test: /\.jsx?$/,
4741
loader: 'babel-loader',

0 commit comments

Comments
 (0)