@perses-dev/components 0.17.0 → 0.19.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.
- package/dist/InfoTooltip/InfoTooltip.js +2 -2
- package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
- package/dist/JSONEditor.d.ts +1 -1
- package/dist/JSONEditor.d.ts.map +1 -1
- package/dist/JSONEditor.js +4 -1
- package/dist/JSONEditor.js.map +1 -1
- package/dist/Legend/CompactLegend.js +9 -2
- package/dist/Legend/CompactLegend.js.map +1 -1
- package/dist/Legend/ListLegendItem.d.ts.map +1 -1
- package/dist/Legend/ListLegendItem.js +0 -1
- package/dist/Legend/ListLegendItem.js.map +1 -1
- package/dist/LineChart/LineChart.d.ts.map +1 -1
- package/dist/LineChart/LineChart.js +3 -4
- package/dist/LineChart/LineChart.js.map +1 -1
- package/dist/cjs/InfoTooltip/InfoTooltip.js +2 -2
- package/dist/cjs/JSONEditor.js +4 -1
- package/dist/cjs/Legend/CompactLegend.js +9 -2
- package/dist/cjs/Legend/ListLegendItem.js +0 -1
- package/dist/cjs/LineChart/LineChart.js +3 -4
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/model/graph.js +3 -3
- package/dist/cjs/theme/index.js +28 -0
- package/dist/cjs/theme/palette/background.js +40 -0
- package/dist/cjs/theme/palette/colors/blue.js +35 -0
- package/dist/cjs/theme/palette/colors/common.js +28 -0
- package/dist/cjs/theme/palette/colors/green.js +35 -0
- package/dist/cjs/theme/palette/colors/grey.js +35 -0
- package/dist/cjs/theme/palette/colors/index.js +35 -0
- package/dist/cjs/theme/palette/colors/orange.js +35 -0
- package/dist/cjs/theme/palette/colors/purple.js +35 -0
- package/dist/cjs/theme/palette/colors/red.js +35 -0
- package/dist/cjs/theme/palette/colors/types.js +16 -0
- package/dist/cjs/theme/palette/error.js +32 -0
- package/dist/cjs/theme/palette/grey.js +44 -0
- package/dist/cjs/theme/palette/index.js +28 -0
- package/dist/cjs/theme/palette/palette-options.js +59 -0
- package/dist/cjs/theme/palette/primary.js +32 -0
- package/dist/cjs/theme/palette/secondary.js +32 -0
- package/dist/cjs/theme/palette/success.js +32 -0
- package/dist/cjs/theme/palette/text.js +42 -0
- package/dist/cjs/theme/palette/warning.js +32 -0
- package/dist/cjs/theme/theme.js +45 -0
- package/dist/cjs/theme/types/ThemeExtension.d.js +17 -0
- package/dist/cjs/theme/typography.js +96 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/model/graph.d.ts +1 -1
- package/dist/model/graph.d.ts.map +1 -1
- package/dist/model/graph.js +2 -1
- package/dist/model/graph.js.map +1 -1
- package/dist/theme/index.d.ts +37 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +15 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/palette/background.d.ts +3 -0
- package/dist/theme/palette/background.d.ts.map +1 -0
- package/dist/theme/palette/background.js +34 -0
- package/dist/theme/palette/background.js.map +1 -0
- package/dist/theme/palette/colors/blue.d.ts +3 -0
- package/dist/theme/palette/colors/blue.d.ts.map +1 -0
- package/dist/theme/palette/colors/blue.js +29 -0
- package/dist/theme/palette/colors/blue.js.map +1 -0
- package/dist/theme/palette/colors/common.d.ts +3 -0
- package/dist/theme/palette/colors/common.d.ts.map +1 -0
- package/dist/theme/palette/colors/common.js +16 -0
- package/dist/theme/palette/colors/common.js.map +1 -0
- package/dist/theme/palette/colors/green.d.ts +3 -0
- package/dist/theme/palette/colors/green.d.ts.map +1 -0
- package/dist/theme/palette/colors/green.js +29 -0
- package/dist/theme/palette/colors/green.js.map +1 -0
- package/dist/theme/palette/colors/grey.d.ts +3 -0
- package/dist/theme/palette/colors/grey.d.ts.map +1 -0
- package/dist/theme/palette/colors/grey.js +29 -0
- package/dist/theme/palette/colors/grey.js.map +1 -0
- package/dist/theme/palette/colors/index.d.ts +9 -0
- package/dist/theme/palette/colors/index.d.ts.map +1 -0
- package/dist/theme/palette/colors/index.js +22 -0
- package/dist/theme/palette/colors/index.js.map +1 -0
- package/dist/theme/palette/colors/orange.d.ts +3 -0
- package/dist/theme/palette/colors/orange.d.ts.map +1 -0
- package/dist/theme/palette/colors/orange.js +29 -0
- package/dist/theme/palette/colors/orange.js.map +1 -0
- package/dist/theme/palette/colors/purple.d.ts +3 -0
- package/dist/theme/palette/colors/purple.d.ts.map +1 -0
- package/dist/theme/palette/colors/purple.js +29 -0
- package/dist/theme/palette/colors/purple.js.map +1 -0
- package/dist/theme/palette/colors/red.d.ts +3 -0
- package/dist/theme/palette/colors/red.d.ts.map +1 -0
- package/dist/theme/palette/colors/red.js +29 -0
- package/dist/theme/palette/colors/red.js.map +1 -0
- package/dist/theme/palette/colors/types.d.ts +17 -0
- package/dist/theme/palette/colors/types.d.ts.map +1 -0
- package/dist/theme/palette/colors/types.js +15 -0
- package/dist/theme/palette/colors/types.js.map +1 -0
- package/dist/theme/palette/error.d.ts +3 -0
- package/dist/theme/palette/error.d.ts.map +1 -0
- package/dist/theme/palette/error.js +26 -0
- package/dist/theme/palette/error.js.map +1 -0
- package/dist/theme/palette/grey.d.ts +3 -0
- package/dist/theme/palette/grey.d.ts.map +1 -0
- package/dist/theme/palette/grey.js +38 -0
- package/dist/theme/palette/grey.js.map +1 -0
- package/dist/theme/palette/index.d.ts +3 -0
- package/dist/theme/palette/index.d.ts.map +1 -0
- package/dist/theme/palette/index.js +15 -0
- package/dist/theme/palette/index.js.map +1 -0
- package/dist/theme/palette/palette-options.d.ts +6 -0
- package/dist/theme/palette/palette-options.d.ts.map +1 -0
- package/dist/theme/palette/palette-options.js +55 -0
- package/dist/theme/palette/palette-options.js.map +1 -0
- package/dist/theme/palette/primary.d.ts +3 -0
- package/dist/theme/palette/primary.d.ts.map +1 -0
- package/dist/theme/palette/primary.js +26 -0
- package/dist/theme/palette/primary.js.map +1 -0
- package/dist/theme/palette/secondary.d.ts +3 -0
- package/dist/theme/palette/secondary.d.ts.map +1 -0
- package/dist/theme/palette/secondary.js +26 -0
- package/dist/theme/palette/secondary.js.map +1 -0
- package/dist/theme/palette/success.d.ts +3 -0
- package/dist/theme/palette/success.d.ts.map +1 -0
- package/dist/theme/palette/success.js +26 -0
- package/dist/theme/palette/success.js.map +1 -0
- package/dist/theme/palette/text.d.ts +3 -0
- package/dist/theme/palette/text.d.ts.map +1 -0
- package/dist/theme/palette/text.js +36 -0
- package/dist/theme/palette/text.js.map +1 -0
- package/dist/theme/palette/warning.d.ts +3 -0
- package/dist/theme/palette/warning.d.ts.map +1 -0
- package/dist/theme/palette/warning.js +26 -0
- package/dist/theme/palette/warning.js.map +1 -0
- package/dist/theme/theme.d.ts +13 -0
- package/dist/theme/theme.d.ts.map +1 -0
- package/dist/theme/theme.js +48 -0
- package/dist/theme/theme.js.map +1 -0
- package/dist/theme/types/ThemeExtension.d.js +16 -0
- package/dist/theme/types/ThemeExtension.d.js.map +1 -0
- package/dist/theme/typography.d.ts +10 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/dist/theme/typography.js +92 -0
- package/dist/theme/typography.js.map +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_exportStar(require("./blue"), exports);
|
|
18
|
+
_exportStar(require("./common"), exports);
|
|
19
|
+
_exportStar(require("./green"), exports);
|
|
20
|
+
_exportStar(require("./grey"), exports);
|
|
21
|
+
_exportStar(require("./orange"), exports);
|
|
22
|
+
_exportStar(require("./purple"), exports);
|
|
23
|
+
_exportStar(require("./red"), exports);
|
|
24
|
+
_exportStar(require("./types"), exports);
|
|
25
|
+
function _exportStar(from, to) {
|
|
26
|
+
Object.keys(from).forEach(function(k) {
|
|
27
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function() {
|
|
30
|
+
return from[k];
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return from;
|
|
35
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "orange", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>orange
|
|
20
|
+
});
|
|
21
|
+
const orange = {
|
|
22
|
+
50: '#FFF5E8',
|
|
23
|
+
100: '#FFECD2',
|
|
24
|
+
150: '#FFE2BB',
|
|
25
|
+
200: '#FFD9A4',
|
|
26
|
+
300: '#FFC577',
|
|
27
|
+
400: '#FFB249',
|
|
28
|
+
500: '#FF9F1C',
|
|
29
|
+
600: '#CC7F16',
|
|
30
|
+
700: '#995F11',
|
|
31
|
+
800: '#66400B',
|
|
32
|
+
850: '#4D3008',
|
|
33
|
+
900: '#332006',
|
|
34
|
+
950: '#1A1003'
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "purple", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>purple
|
|
20
|
+
});
|
|
21
|
+
const purple = {
|
|
22
|
+
50: '#EFE9FD',
|
|
23
|
+
100: '#E0D2FC',
|
|
24
|
+
150: '#D0BCFA',
|
|
25
|
+
200: '#C1A6F8',
|
|
26
|
+
300: '#A179F5',
|
|
27
|
+
400: '#824DF1',
|
|
28
|
+
500: '#6320EE',
|
|
29
|
+
600: '#4F1ABE',
|
|
30
|
+
700: '#3B138F',
|
|
31
|
+
800: '#280D5F',
|
|
32
|
+
850: '#1E0A47',
|
|
33
|
+
900: '#140630',
|
|
34
|
+
950: '#0A0318'
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "red", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>red
|
|
20
|
+
});
|
|
21
|
+
const red = {
|
|
22
|
+
50: '#FDEDED',
|
|
23
|
+
100: '#FBDADA',
|
|
24
|
+
150: '#F9C8C8',
|
|
25
|
+
200: '#F7B5B5',
|
|
26
|
+
300: '#F29191',
|
|
27
|
+
400: '#EE6C6C',
|
|
28
|
+
500: '#EA4747',
|
|
29
|
+
600: '#BD3939',
|
|
30
|
+
700: '#902B2B',
|
|
31
|
+
800: '#621D1D',
|
|
32
|
+
850: '#4C1616',
|
|
33
|
+
900: '#350F0F',
|
|
34
|
+
950: '#1F0808'
|
|
35
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "error", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>error
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const error = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
main: _colors.red[500],
|
|
25
|
+
dark: _colors.red[600],
|
|
26
|
+
light: _colors.red[50]
|
|
27
|
+
} : {
|
|
28
|
+
main: _colors.red[400],
|
|
29
|
+
dark: _colors.red[800],
|
|
30
|
+
light: _colors.red[300]
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "greyOption", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>greyOption
|
|
20
|
+
});
|
|
21
|
+
const _grey = require("./colors/grey");
|
|
22
|
+
const greyOption = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
100: _grey.grey[100],
|
|
25
|
+
200: _grey.grey[200],
|
|
26
|
+
300: _grey.grey[300],
|
|
27
|
+
400: _grey.grey[400],
|
|
28
|
+
500: _grey.grey[500],
|
|
29
|
+
600: _grey.grey[600],
|
|
30
|
+
700: _grey.grey[700],
|
|
31
|
+
800: _grey.grey[800],
|
|
32
|
+
900: _grey.grey[900]
|
|
33
|
+
} : {
|
|
34
|
+
100: _grey.grey[900],
|
|
35
|
+
200: _grey.grey[800],
|
|
36
|
+
300: _grey.grey[700],
|
|
37
|
+
400: _grey.grey[600],
|
|
38
|
+
500: _grey.grey[500],
|
|
39
|
+
600: _grey.grey[400],
|
|
40
|
+
700: _grey.grey[300],
|
|
41
|
+
800: _grey.grey[200],
|
|
42
|
+
900: _grey.grey[100]
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
_exportStar(require("./palette-options"), exports);
|
|
18
|
+
function _exportStar(from, to) {
|
|
19
|
+
Object.keys(from).forEach(function(k) {
|
|
20
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function() {
|
|
23
|
+
return from[k];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
return from;
|
|
28
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "getPaletteOptions", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>getPaletteOptions
|
|
20
|
+
});
|
|
21
|
+
const _text = require("./text");
|
|
22
|
+
const _background = require("./background");
|
|
23
|
+
const _grey = require("./grey");
|
|
24
|
+
const _common = require("./colors/common");
|
|
25
|
+
const _primary = require("./primary");
|
|
26
|
+
const _secondary = require("./secondary");
|
|
27
|
+
const _colors = require("./colors");
|
|
28
|
+
const _error = require("./error");
|
|
29
|
+
const _success = require("./success");
|
|
30
|
+
const _warning = require("./warning");
|
|
31
|
+
function getPaletteOptions(mode) {
|
|
32
|
+
// Palette options should be split out into their own files with functions
|
|
33
|
+
// for creating the option values based on light/dark mode
|
|
34
|
+
return {
|
|
35
|
+
mode,
|
|
36
|
+
primary: (0, _primary.primary)(mode),
|
|
37
|
+
secondary: (0, _secondary.secondary)(mode),
|
|
38
|
+
grey: (0, _grey.greyOption)(mode),
|
|
39
|
+
background: (0, _background.background)(mode),
|
|
40
|
+
text: (0, _text.text)(mode),
|
|
41
|
+
error: (0, _error.error)(mode),
|
|
42
|
+
warning: (0, _warning.warning)(mode),
|
|
43
|
+
info: (0, _primary.primary)(mode),
|
|
44
|
+
success: (0, _success.success)(mode),
|
|
45
|
+
common: {
|
|
46
|
+
white: _common.white,
|
|
47
|
+
black: _common.black
|
|
48
|
+
},
|
|
49
|
+
// custom colors
|
|
50
|
+
designSystem: {
|
|
51
|
+
blue: _colors.blue,
|
|
52
|
+
green: _colors.green,
|
|
53
|
+
grey: _colors.grey,
|
|
54
|
+
orange: _colors.orange,
|
|
55
|
+
purple: _colors.purple,
|
|
56
|
+
red: _colors.red
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "primary", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>primary
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const primary = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
main: _colors.blue[500],
|
|
25
|
+
dark: _colors.blue[600],
|
|
26
|
+
light: _colors.blue[50]
|
|
27
|
+
} : {
|
|
28
|
+
main: _colors.blue[400],
|
|
29
|
+
dark: _colors.blue[800],
|
|
30
|
+
light: _colors.blue[200]
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "secondary", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>secondary
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const secondary = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
main: _colors.grey[600],
|
|
25
|
+
dark: _colors.grey[900],
|
|
26
|
+
light: _colors.grey[100]
|
|
27
|
+
} : {
|
|
28
|
+
main: _colors.white,
|
|
29
|
+
dark: _colors.white,
|
|
30
|
+
light: _colors.white
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "success", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>success
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const success = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
main: _colors.green[500],
|
|
25
|
+
dark: _colors.green[700],
|
|
26
|
+
light: _colors.green[50]
|
|
27
|
+
} : {
|
|
28
|
+
main: _colors.green[400],
|
|
29
|
+
dark: _colors.green[800],
|
|
30
|
+
light: _colors.green[300]
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "text", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>text
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const text = (mode)=>{
|
|
23
|
+
const navigation = _colors.grey[800];
|
|
24
|
+
const accent = _colors.grey[300];
|
|
25
|
+
return mode === 'light' ? {
|
|
26
|
+
navigation,
|
|
27
|
+
accent,
|
|
28
|
+
primary: _colors.grey[800],
|
|
29
|
+
secondary: _colors.grey[700],
|
|
30
|
+
disabled: _colors.grey[300],
|
|
31
|
+
link: _colors.blue[500],
|
|
32
|
+
linkHover: _colors.blue[600]
|
|
33
|
+
} : {
|
|
34
|
+
navigation,
|
|
35
|
+
accent,
|
|
36
|
+
primary: _colors.white,
|
|
37
|
+
secondary: _colors.grey[50],
|
|
38
|
+
disabled: _colors.grey[600],
|
|
39
|
+
link: _colors.blue[400],
|
|
40
|
+
linkHover: _colors.blue[500]
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "warning", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>warning
|
|
20
|
+
});
|
|
21
|
+
const _colors = require("./colors");
|
|
22
|
+
const warning = (mode)=>{
|
|
23
|
+
return mode === 'light' ? {
|
|
24
|
+
main: _colors.orange[500],
|
|
25
|
+
dark: _colors.orange[700],
|
|
26
|
+
light: _colors.orange[50]
|
|
27
|
+
} : {
|
|
28
|
+
main: _colors.orange[400],
|
|
29
|
+
dark: _colors.orange[800],
|
|
30
|
+
light: _colors.orange[300]
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "getTheme", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>getTheme
|
|
20
|
+
});
|
|
21
|
+
const _material = require("@mui/material");
|
|
22
|
+
const _paletteOptions = require("./palette/palette-options");
|
|
23
|
+
const _typography = require("./typography");
|
|
24
|
+
function getTheme(mode) {
|
|
25
|
+
const theme = (0, _material.createTheme)({
|
|
26
|
+
palette: (0, _paletteOptions.getPaletteOptions)(mode),
|
|
27
|
+
typography: _typography.typography,
|
|
28
|
+
mixins: {},
|
|
29
|
+
components
|
|
30
|
+
});
|
|
31
|
+
return theme;
|
|
32
|
+
}
|
|
33
|
+
// Overrides for component default prop values and styles go here
|
|
34
|
+
const components = {
|
|
35
|
+
MuiFormControl: {
|
|
36
|
+
defaultProps: {
|
|
37
|
+
size: 'small'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
MuiTextField: {
|
|
41
|
+
defaultProps: {
|
|
42
|
+
size: 'small'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
// Allows extending Lab types/components also
|
|
14
|
+
"use strict";
|
|
15
|
+
Object.defineProperty(exports, "__esModule", {
|
|
16
|
+
value: true
|
|
17
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// Copyright 2022 The Perses Authors
|
|
2
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
3
|
+
// you may not use this file except in compliance with the License.
|
|
4
|
+
// You may obtain a copy of the License at
|
|
5
|
+
//
|
|
6
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
//
|
|
8
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
9
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
10
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
11
|
+
// See the License for the specific language governing permissions and
|
|
12
|
+
// limitations under the License.
|
|
13
|
+
"use strict";
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: true
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(exports, "typography", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: ()=>typography
|
|
20
|
+
});
|
|
21
|
+
require("@fontsource/lato/300.css");
|
|
22
|
+
require("@fontsource/lato/400.css");
|
|
23
|
+
require("@fontsource/lato/700.css");
|
|
24
|
+
require("@fontsource/lato/900.css");
|
|
25
|
+
// Font weights need to correspond with the imports at the top of the file
|
|
26
|
+
// (Lato supports 100, 300, 400, 700, 900)
|
|
27
|
+
const fontWeightLight = 300;
|
|
28
|
+
const fontWeightRegular = 400;
|
|
29
|
+
const fontWeightMedium = 700;
|
|
30
|
+
const fontWeightBold = 900;
|
|
31
|
+
const typography = {
|
|
32
|
+
fontFamily: '"Lato", sans-serif',
|
|
33
|
+
fontWeightLight,
|
|
34
|
+
fontWeightRegular,
|
|
35
|
+
fontWeightMedium,
|
|
36
|
+
fontWeightBold,
|
|
37
|
+
h1: {
|
|
38
|
+
fontSize: '1.5rem',
|
|
39
|
+
fontWeight: fontWeightMedium,
|
|
40
|
+
lineHeight: '32px'
|
|
41
|
+
},
|
|
42
|
+
h2: {
|
|
43
|
+
fontSize: '1.25rem',
|
|
44
|
+
fontWeight: fontWeightMedium,
|
|
45
|
+
lineHeight: '28px'
|
|
46
|
+
},
|
|
47
|
+
h3: {
|
|
48
|
+
fontSize: '1rem',
|
|
49
|
+
fontWeight: fontWeightMedium,
|
|
50
|
+
lineHeight: '24px'
|
|
51
|
+
},
|
|
52
|
+
h4: {
|
|
53
|
+
fontSize: '0.875rem',
|
|
54
|
+
fontWeight: fontWeightMedium,
|
|
55
|
+
lineHeight: '22px'
|
|
56
|
+
},
|
|
57
|
+
h5: undefined,
|
|
58
|
+
h6: undefined,
|
|
59
|
+
body1: {
|
|
60
|
+
fontSize: '0.875rem',
|
|
61
|
+
fontWeight: fontWeightRegular,
|
|
62
|
+
lineHeight: '20px'
|
|
63
|
+
},
|
|
64
|
+
body2: {
|
|
65
|
+
fontSize: '0.75rem',
|
|
66
|
+
fontWeight: fontWeightRegular,
|
|
67
|
+
lineHeight: '18px'
|
|
68
|
+
},
|
|
69
|
+
subtitle1: {
|
|
70
|
+
fontSize: '1rem',
|
|
71
|
+
fontWeight: fontWeightRegular,
|
|
72
|
+
lineHeight: '24px',
|
|
73
|
+
letterSpacing: '0.02rem'
|
|
74
|
+
},
|
|
75
|
+
subtitle2: {
|
|
76
|
+
fontSize: '0.875rem',
|
|
77
|
+
fontWeight: fontWeightMedium,
|
|
78
|
+
lineHeight: '22px',
|
|
79
|
+
letterSpacing: '0.03rem',
|
|
80
|
+
textTransform: 'uppercase'
|
|
81
|
+
},
|
|
82
|
+
button: {
|
|
83
|
+
// 14px
|
|
84
|
+
fontSize: '0.875rem',
|
|
85
|
+
fontWeight: fontWeightMedium,
|
|
86
|
+
// 20 px
|
|
87
|
+
lineHeight: '1.25rem',
|
|
88
|
+
textTransform: 'none',
|
|
89
|
+
letterSpacing: '0.03rem'
|
|
90
|
+
},
|
|
91
|
+
caption: {
|
|
92
|
+
fontSize: '0.6875rem',
|
|
93
|
+
fontWeight: fontWeightRegular,
|
|
94
|
+
lineHeight: '16px'
|
|
95
|
+
}
|
|
96
|
+
};
|