@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,92 @@
|
|
|
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
|
+
import '@fontsource/lato/300.css';
|
|
14
|
+
import '@fontsource/lato/400.css';
|
|
15
|
+
import '@fontsource/lato/700.css';
|
|
16
|
+
import '@fontsource/lato/900.css';
|
|
17
|
+
// Font weights need to correspond with the imports at the top of the file
|
|
18
|
+
// (Lato supports 100, 300, 400, 700, 900)
|
|
19
|
+
const fontWeightLight = 300;
|
|
20
|
+
const fontWeightRegular = 400;
|
|
21
|
+
const fontWeightMedium = 700;
|
|
22
|
+
const fontWeightBold = 900;
|
|
23
|
+
/**
|
|
24
|
+
* Theme typography options that are the same across both the dark and light themes.
|
|
25
|
+
*/ export const typography = {
|
|
26
|
+
fontFamily: '"Lato", sans-serif',
|
|
27
|
+
fontWeightLight,
|
|
28
|
+
fontWeightRegular,
|
|
29
|
+
fontWeightMedium,
|
|
30
|
+
fontWeightBold,
|
|
31
|
+
h1: {
|
|
32
|
+
fontSize: '1.5rem',
|
|
33
|
+
fontWeight: fontWeightMedium,
|
|
34
|
+
lineHeight: '32px'
|
|
35
|
+
},
|
|
36
|
+
h2: {
|
|
37
|
+
fontSize: '1.25rem',
|
|
38
|
+
fontWeight: fontWeightMedium,
|
|
39
|
+
lineHeight: '28px'
|
|
40
|
+
},
|
|
41
|
+
h3: {
|
|
42
|
+
fontSize: '1rem',
|
|
43
|
+
fontWeight: fontWeightMedium,
|
|
44
|
+
lineHeight: '24px'
|
|
45
|
+
},
|
|
46
|
+
h4: {
|
|
47
|
+
fontSize: '0.875rem',
|
|
48
|
+
fontWeight: fontWeightMedium,
|
|
49
|
+
lineHeight: '22px'
|
|
50
|
+
},
|
|
51
|
+
h5: undefined,
|
|
52
|
+
h6: undefined,
|
|
53
|
+
body1: {
|
|
54
|
+
fontSize: '0.875rem',
|
|
55
|
+
fontWeight: fontWeightRegular,
|
|
56
|
+
lineHeight: '20px'
|
|
57
|
+
},
|
|
58
|
+
body2: {
|
|
59
|
+
fontSize: '0.75rem',
|
|
60
|
+
fontWeight: fontWeightRegular,
|
|
61
|
+
lineHeight: '18px'
|
|
62
|
+
},
|
|
63
|
+
subtitle1: {
|
|
64
|
+
fontSize: '1rem',
|
|
65
|
+
fontWeight: fontWeightRegular,
|
|
66
|
+
lineHeight: '24px',
|
|
67
|
+
letterSpacing: '0.02rem'
|
|
68
|
+
},
|
|
69
|
+
subtitle2: {
|
|
70
|
+
fontSize: '0.875rem',
|
|
71
|
+
fontWeight: fontWeightMedium,
|
|
72
|
+
lineHeight: '22px',
|
|
73
|
+
letterSpacing: '0.03rem',
|
|
74
|
+
textTransform: 'uppercase'
|
|
75
|
+
},
|
|
76
|
+
button: {
|
|
77
|
+
// 14px
|
|
78
|
+
fontSize: '0.875rem',
|
|
79
|
+
fontWeight: fontWeightMedium,
|
|
80
|
+
// 20 px
|
|
81
|
+
lineHeight: '1.25rem',
|
|
82
|
+
textTransform: 'none',
|
|
83
|
+
letterSpacing: '0.03rem'
|
|
84
|
+
},
|
|
85
|
+
caption: {
|
|
86
|
+
fontSize: '0.6875rem',
|
|
87
|
+
fontWeight: fontWeightRegular,
|
|
88
|
+
lineHeight: '16px'
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theme/typography.ts"],"sourcesContent":["// Copyright 2022 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport '@fontsource/lato/300.css';\nimport '@fontsource/lato/400.css';\nimport '@fontsource/lato/700.css';\nimport '@fontsource/lato/900.css';\nimport { ThemeOptions } from '@mui/material';\n\n// Font weights need to correspond with the imports at the top of the file\n// (Lato supports 100, 300, 400, 700, 900)\nconst fontWeightLight = 300;\nconst fontWeightRegular = 400;\nconst fontWeightMedium = 700;\nconst fontWeightBold = 900;\n\n/**\n * Theme typography options that are the same across both the dark and light themes.\n */\nexport const typography: ThemeOptions['typography'] = {\n fontFamily: '\"Lato\", sans-serif',\n\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n\n h1: {\n fontSize: '1.5rem', // 24px\n fontWeight: fontWeightMedium,\n lineHeight: '32px',\n },\n h2: {\n fontSize: '1.25rem', // 20px\n fontWeight: fontWeightMedium,\n lineHeight: '28px',\n },\n h3: {\n fontSize: '1rem', // 16px\n fontWeight: fontWeightMedium,\n lineHeight: '24px',\n },\n h4: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightMedium,\n lineHeight: '22px',\n },\n h5: undefined,\n h6: undefined,\n\n body1: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightRegular,\n lineHeight: '20px',\n },\n body2: {\n fontSize: '0.75rem', // 12px\n fontWeight: fontWeightRegular,\n lineHeight: '18px',\n },\n subtitle1: {\n fontSize: '1rem', // 16px\n fontWeight: fontWeightRegular,\n lineHeight: '24px',\n letterSpacing: '0.02rem',\n },\n subtitle2: {\n fontSize: '0.875rem', // 14px\n fontWeight: fontWeightMedium,\n lineHeight: '22px',\n letterSpacing: '0.03rem',\n textTransform: 'uppercase',\n },\n\n button: {\n // 14px\n fontSize: '0.875rem',\n fontWeight: fontWeightMedium,\n // 20 px\n lineHeight: '1.25rem',\n textTransform: 'none',\n letterSpacing: '0.03rem',\n },\n caption: {\n fontSize: '0.6875rem', // 11px\n fontWeight: fontWeightRegular,\n lineHeight: '16px',\n },\n};\n"],"names":["fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","typography","fontFamily","h1","fontSize","fontWeight","lineHeight","h2","h3","h4","h5","undefined","h6","body1","body2","subtitle1","letterSpacing","subtitle2","textTransform","button","caption"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAA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,EAAEP,iBAAiB;QAC7BQ,UAAU,EAAE,MAAM;QAClBU,aAAa,EAAE,SAAS;KACzB;IACDC,SAAS,EAAE;QACTb,QAAQ,EAAE,UAAU;QACpBC,UAAU,EAAEN,gBAAgB;QAC5BO,UAAU,EAAE,MAAM;QAClBU,aAAa,EAAE,SAAS;QACxBE,aAAa,EAAE,WAAW;KAC3B;IAEDC,MAAM,EAAE;QACN,OAAO;QACPf,QAAQ,EAAE,UAAU;QACpBC,UAAU,EAAEN,gBAAgB;QAC5B,QAAQ;QACRO,UAAU,EAAE,SAAS;QACrBY,aAAa,EAAE,MAAM;QACrBF,aAAa,EAAE,SAAS;KACzB;IACDI,OAAO,EAAE;QACPhB,QAAQ,EAAE,WAAW;QACrBC,UAAU,EAAEP,iBAAiB;QAC7BQ,UAAU,EAAE,MAAM;KACnB;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Common UI components used across Perses features",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -32,8 +32,9 @@
|
|
|
32
32
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@fontsource/lato": "^4.5.10",
|
|
35
36
|
"@mui/x-date-pickers": "^5.0.0-beta.1",
|
|
36
|
-
"@perses-dev/core": "^0.
|
|
37
|
+
"@perses-dev/core": "^0.19.0",
|
|
37
38
|
"date-fns": "^2.28.0",
|
|
38
39
|
"echarts": "^5.3.3",
|
|
39
40
|
"lodash-es": "^4.17.21",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"react-error-boundary": "^3.1.4"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"@mui/material": "^5.
|
|
46
|
+
"@mui/material": "^5.10.0",
|
|
46
47
|
"react": "^17.0.2 || ^18.0.0",
|
|
47
48
|
"react-dom": "^17.0.2 || ^18.0.0"
|
|
48
49
|
},
|