@perses-dev/components 0.16.0 → 0.18.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.
Files changed (149) hide show
  1. package/dist/InfoTooltip/InfoTooltip.js +2 -2
  2. package/dist/InfoTooltip/InfoTooltip.js.map +1 -1
  3. package/dist/JSONEditor.d.ts +1 -1
  4. package/dist/JSONEditor.d.ts.map +1 -1
  5. package/dist/JSONEditor.js +4 -1
  6. package/dist/JSONEditor.js.map +1 -1
  7. package/dist/Legend/CompactLegend.js +9 -2
  8. package/dist/Legend/CompactLegend.js.map +1 -1
  9. package/dist/Legend/ListLegendItem.d.ts.map +1 -1
  10. package/dist/Legend/ListLegendItem.js +0 -1
  11. package/dist/Legend/ListLegendItem.js.map +1 -1
  12. package/dist/LineChart/LineChart.d.ts +3 -2
  13. package/dist/LineChart/LineChart.d.ts.map +1 -1
  14. package/dist/LineChart/LineChart.js +4 -15
  15. package/dist/LineChart/LineChart.js.map +1 -1
  16. package/dist/LineChart/utils.d.ts +18 -0
  17. package/dist/LineChart/utils.d.ts.map +1 -1
  18. package/dist/LineChart/utils.js +35 -9
  19. package/dist/LineChart/utils.js.map +1 -1
  20. package/dist/YAxisLabel.d.ts +8 -0
  21. package/dist/YAxisLabel.d.ts.map +1 -0
  22. package/dist/YAxisLabel.js +39 -0
  23. package/dist/YAxisLabel.js.map +1 -0
  24. package/dist/cjs/InfoTooltip/InfoTooltip.js +2 -2
  25. package/dist/cjs/JSONEditor.js +4 -1
  26. package/dist/cjs/Legend/CompactLegend.js +9 -2
  27. package/dist/cjs/Legend/ListLegendItem.js +0 -1
  28. package/dist/cjs/LineChart/LineChart.js +3 -14
  29. package/dist/cjs/LineChart/utils.js +23 -1
  30. package/dist/cjs/YAxisLabel.js +45 -0
  31. package/dist/cjs/index.js +2 -0
  32. package/dist/cjs/theme/index.js +28 -0
  33. package/dist/cjs/theme/palette/background.js +40 -0
  34. package/dist/cjs/theme/palette/colors/blue.js +35 -0
  35. package/dist/cjs/theme/palette/colors/common.js +28 -0
  36. package/dist/cjs/theme/palette/colors/green.js +35 -0
  37. package/dist/cjs/theme/palette/colors/grey.js +35 -0
  38. package/dist/cjs/theme/palette/colors/index.js +35 -0
  39. package/dist/cjs/theme/palette/colors/orange.js +35 -0
  40. package/dist/cjs/theme/palette/colors/purple.js +35 -0
  41. package/dist/cjs/theme/palette/colors/red.js +35 -0
  42. package/dist/cjs/theme/palette/colors/types.js +16 -0
  43. package/dist/cjs/theme/palette/error.js +32 -0
  44. package/dist/cjs/theme/palette/grey.js +44 -0
  45. package/dist/cjs/theme/palette/index.js +28 -0
  46. package/dist/cjs/theme/palette/palette-options.js +59 -0
  47. package/dist/cjs/theme/palette/primary.js +32 -0
  48. package/dist/cjs/theme/palette/secondary.js +32 -0
  49. package/dist/cjs/theme/palette/success.js +32 -0
  50. package/dist/cjs/theme/palette/text.js +42 -0
  51. package/dist/cjs/theme/palette/warning.js +32 -0
  52. package/dist/cjs/theme/theme.js +45 -0
  53. package/dist/cjs/theme/types/ThemeExtension.d.js +17 -0
  54. package/dist/cjs/theme/typography.js +96 -0
  55. package/dist/index.d.ts +2 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +2 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/theme/index.d.ts +37 -0
  60. package/dist/theme/index.d.ts.map +1 -0
  61. package/dist/theme/index.js +15 -0
  62. package/dist/theme/index.js.map +1 -0
  63. package/dist/theme/palette/background.d.ts +3 -0
  64. package/dist/theme/palette/background.d.ts.map +1 -0
  65. package/dist/theme/palette/background.js +34 -0
  66. package/dist/theme/palette/background.js.map +1 -0
  67. package/dist/theme/palette/colors/blue.d.ts +3 -0
  68. package/dist/theme/palette/colors/blue.d.ts.map +1 -0
  69. package/dist/theme/palette/colors/blue.js +29 -0
  70. package/dist/theme/palette/colors/blue.js.map +1 -0
  71. package/dist/theme/palette/colors/common.d.ts +3 -0
  72. package/dist/theme/palette/colors/common.d.ts.map +1 -0
  73. package/dist/theme/palette/colors/common.js +16 -0
  74. package/dist/theme/palette/colors/common.js.map +1 -0
  75. package/dist/theme/palette/colors/green.d.ts +3 -0
  76. package/dist/theme/palette/colors/green.d.ts.map +1 -0
  77. package/dist/theme/palette/colors/green.js +29 -0
  78. package/dist/theme/palette/colors/green.js.map +1 -0
  79. package/dist/theme/palette/colors/grey.d.ts +3 -0
  80. package/dist/theme/palette/colors/grey.d.ts.map +1 -0
  81. package/dist/theme/palette/colors/grey.js +29 -0
  82. package/dist/theme/palette/colors/grey.js.map +1 -0
  83. package/dist/theme/palette/colors/index.d.ts +9 -0
  84. package/dist/theme/palette/colors/index.d.ts.map +1 -0
  85. package/dist/theme/palette/colors/index.js +22 -0
  86. package/dist/theme/palette/colors/index.js.map +1 -0
  87. package/dist/theme/palette/colors/orange.d.ts +3 -0
  88. package/dist/theme/palette/colors/orange.d.ts.map +1 -0
  89. package/dist/theme/palette/colors/orange.js +29 -0
  90. package/dist/theme/palette/colors/orange.js.map +1 -0
  91. package/dist/theme/palette/colors/purple.d.ts +3 -0
  92. package/dist/theme/palette/colors/purple.d.ts.map +1 -0
  93. package/dist/theme/palette/colors/purple.js +29 -0
  94. package/dist/theme/palette/colors/purple.js.map +1 -0
  95. package/dist/theme/palette/colors/red.d.ts +3 -0
  96. package/dist/theme/palette/colors/red.d.ts.map +1 -0
  97. package/dist/theme/palette/colors/red.js +29 -0
  98. package/dist/theme/palette/colors/red.js.map +1 -0
  99. package/dist/theme/palette/colors/types.d.ts +17 -0
  100. package/dist/theme/palette/colors/types.d.ts.map +1 -0
  101. package/dist/theme/palette/colors/types.js +15 -0
  102. package/dist/theme/palette/colors/types.js.map +1 -0
  103. package/dist/theme/palette/error.d.ts +3 -0
  104. package/dist/theme/palette/error.d.ts.map +1 -0
  105. package/dist/theme/palette/error.js +26 -0
  106. package/dist/theme/palette/error.js.map +1 -0
  107. package/dist/theme/palette/grey.d.ts +3 -0
  108. package/dist/theme/palette/grey.d.ts.map +1 -0
  109. package/dist/theme/palette/grey.js +38 -0
  110. package/dist/theme/palette/grey.js.map +1 -0
  111. package/dist/theme/palette/index.d.ts +3 -0
  112. package/dist/theme/palette/index.d.ts.map +1 -0
  113. package/dist/theme/palette/index.js +15 -0
  114. package/dist/theme/palette/index.js.map +1 -0
  115. package/dist/theme/palette/palette-options.d.ts +6 -0
  116. package/dist/theme/palette/palette-options.d.ts.map +1 -0
  117. package/dist/theme/palette/palette-options.js +55 -0
  118. package/dist/theme/palette/palette-options.js.map +1 -0
  119. package/dist/theme/palette/primary.d.ts +3 -0
  120. package/dist/theme/palette/primary.d.ts.map +1 -0
  121. package/dist/theme/palette/primary.js +26 -0
  122. package/dist/theme/palette/primary.js.map +1 -0
  123. package/dist/theme/palette/secondary.d.ts +3 -0
  124. package/dist/theme/palette/secondary.d.ts.map +1 -0
  125. package/dist/theme/palette/secondary.js +26 -0
  126. package/dist/theme/palette/secondary.js.map +1 -0
  127. package/dist/theme/palette/success.d.ts +3 -0
  128. package/dist/theme/palette/success.d.ts.map +1 -0
  129. package/dist/theme/palette/success.js +26 -0
  130. package/dist/theme/palette/success.js.map +1 -0
  131. package/dist/theme/palette/text.d.ts +3 -0
  132. package/dist/theme/palette/text.d.ts.map +1 -0
  133. package/dist/theme/palette/text.js +36 -0
  134. package/dist/theme/palette/text.js.map +1 -0
  135. package/dist/theme/palette/warning.d.ts +3 -0
  136. package/dist/theme/palette/warning.d.ts.map +1 -0
  137. package/dist/theme/palette/warning.js +26 -0
  138. package/dist/theme/palette/warning.js.map +1 -0
  139. package/dist/theme/theme.d.ts +13 -0
  140. package/dist/theme/theme.d.ts.map +1 -0
  141. package/dist/theme/theme.js +48 -0
  142. package/dist/theme/theme.js.map +1 -0
  143. package/dist/theme/types/ThemeExtension.d.js +16 -0
  144. package/dist/theme/types/ThemeExtension.d.js.map +1 -0
  145. package/dist/theme/typography.d.ts +10 -0
  146. package/dist/theme/typography.d.ts.map +1 -0
  147. package/dist/theme/typography.js +92 -0
  148. package/dist/theme/typography.js.map +1 -0
  149. package/package.json +4 -3
@@ -28,7 +28,6 @@ const _components = require("echarts/components");
28
28
  const _renderers = require("echarts/renderers");
29
29
  const _echart = require("../EChart");
30
30
  const _graph = require("../model/graph");
31
- const _units = require("../model/units");
32
31
  const _chartsThemeProvider = require("../context/ChartsThemeProvider");
33
32
  const _tooltip = require("../Tooltip/Tooltip");
34
33
  const _utils = require("./utils");
@@ -46,7 +45,7 @@ const _utils = require("./utils");
46
45
  _components.VisualMapComponent,
47
46
  _renderers.CanvasRenderer
48
47
  ]);
49
- function LineChart({ height , data , unit , grid , legend , visualMap , onDataZoom , onDoubleClick }) {
48
+ function LineChart({ height , data , yAxis , unit , grid , legend , visualMap , onDataZoom , onDoubleClick }) {
50
49
  const chartsTheme = (0, _chartsThemeProvider.useChartsTheme)();
51
50
  const chartRef = (0, _react.useRef)();
52
51
  const [showTooltip, setShowTooltip] = (0, _react.useState)(true);
@@ -132,18 +131,7 @@ function LineChart({ height , data , unit , grid , legend , visualMap , onDataZo
132
131
  }
133
132
  }
134
133
  },
135
- yAxis: {
136
- type: 'value',
137
- boundaryGap: [
138
- 0,
139
- '10%'
140
- ],
141
- axisLabel: {
142
- formatter: (value)=>{
143
- return (0, _units.formatValue)(value, unit);
144
- }
145
- }
146
- },
134
+ yAxis: (0, _utils.getYAxes)(yAxis, unit),
147
135
  animation: false,
148
136
  tooltip: {
149
137
  show: showPointsOnHover,
@@ -168,6 +156,7 @@ function LineChart({ height , data , unit , grid , legend , visualMap , onDataZo
168
156
  return option;
169
157
  }, [
170
158
  data,
159
+ yAxis,
171
160
  grid,
172
161
  legend,
173
162
  visualMap
@@ -24,8 +24,11 @@ _export(exports, {
24
24
  enableDataZoom: ()=>enableDataZoom,
25
25
  restoreChart: ()=>restoreChart,
26
26
  getDateRange: ()=>getDateRange,
27
- getFormattedDate: ()=>getFormattedDate
27
+ getFormattedDate: ()=>getFormattedDate,
28
+ getYAxes: ()=>getYAxes
28
29
  });
30
+ const _lodashEs = require("lodash-es");
31
+ const _model = require("../model");
29
32
  function enableDataZoom(chart) {
30
33
  const chartModel = chart['_model'];
31
34
  if (chartModel === undefined) return;
@@ -41,6 +44,7 @@ function enableDataZoom(chart) {
41
44
  }
42
45
  }
43
46
  function restoreChart(chart) {
47
+ // TODO: support incremental unzoom instead of restore to original state
44
48
  chart.dispatchAction({
45
49
  type: 'restore'
46
50
  });
@@ -70,3 +74,21 @@ function getFormattedDate(value, rangeMs) {
70
74
  // remove comma when month / day present
71
75
  return DATE_FORMAT.format(value).replace(/, /g, ' ');
72
76
  }
77
+ function getYAxes(yAxis, unit) {
78
+ // TODO: support alternate yAxis that shows on right side
79
+ const Y_AXIS_DEFAULT = {
80
+ type: 'value',
81
+ boundaryGap: [
82
+ 0,
83
+ '10%'
84
+ ],
85
+ axisLabel: {
86
+ formatter: (value)=>{
87
+ return (0, _model.formatValue)(value, unit);
88
+ }
89
+ }
90
+ };
91
+ return [
92
+ (0, _lodashEs.merge)(Y_AXIS_DEFAULT, yAxis)
93
+ ];
94
+ }
@@ -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, "YAxisLabel", {
18
+ enumerable: true,
19
+ get: ()=>YAxisLabel
20
+ });
21
+ const _jsxRuntime = require("react/jsx-runtime");
22
+ const _material = require("@mui/material");
23
+ function YAxisLabel({ name , height }) {
24
+ return /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Box, {
25
+ sx: {
26
+ display: 'inline-block',
27
+ maxWidth: height,
28
+ position: 'absolute',
29
+ top: '45%',
30
+ transform: 'translateX(-50%) rotate(-90deg)',
31
+ transformOrigin: 'top',
32
+ textAlign: 'center',
33
+ zIndex: 1
34
+ },
35
+ children: /*#__PURE__*/ (0, _jsxRuntime.jsx)(_material.Typography, {
36
+ variant: "body1",
37
+ sx: {
38
+ whiteSpace: 'nowrap',
39
+ overflow: 'hidden',
40
+ textOverflow: 'ellipsis'
41
+ },
42
+ children: name
43
+ })
44
+ });
45
+ }
package/dist/cjs/index.js CHANGED
@@ -27,10 +27,12 @@ _exportStar(require("./LineChart"), exports);
27
27
  _exportStar(require("./OptionsEditorLayout"), exports);
28
28
  _exportStar(require("./StatChart"), exports);
29
29
  _exportStar(require("./UnitSelector"), exports);
30
+ _exportStar(require("./YAxisLabel"), exports);
30
31
  _exportStar(require("./context/ChartsThemeProvider"), exports);
31
32
  _exportStar(require("./utils"), exports);
32
33
  _exportStar(require("./model"), exports);
33
34
  _exportStar(require("./test-utils"), exports);
35
+ _exportStar(require("./theme"), exports);
34
36
  function _exportStar(from, to) {
35
37
  Object.keys(from).forEach(function(k) {
36
38
  if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) Object.defineProperty(to, k, {
@@ -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("./theme"), 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,40 @@
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, "background", {
18
+ enumerable: true,
19
+ get: ()=>background
20
+ });
21
+ const _colors = require("./colors");
22
+ const background = (mode)=>{
23
+ const navigation = _colors.blue[150];
24
+ const overlay = 'rgba(21, 23, 33, 0.75)'; // grey[900] with opacity 75%
25
+ return mode === 'light' ? {
26
+ navigation,
27
+ overlay,
28
+ default: _colors.grey[50],
29
+ paper: _colors.white,
30
+ tooltip: _colors.grey[100],
31
+ border: _colors.grey[100]
32
+ } : {
33
+ navigation,
34
+ overlay,
35
+ default: _colors.grey[900],
36
+ paper: _colors.grey[850],
37
+ tooltip: _colors.grey[700],
38
+ border: _colors.grey[600]
39
+ };
40
+ };
@@ -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, "blue", {
18
+ enumerable: true,
19
+ get: ()=>blue
20
+ });
21
+ const blue = {
22
+ 50: '#E7F1FC',
23
+ 100: '#D0E3FA',
24
+ 150: '#B8D5F7',
25
+ 200: '#A1C7F5',
26
+ 300: '#72ABF0',
27
+ 400: '#438FEB',
28
+ 500: '#1473E6',
29
+ 600: '#105CB8',
30
+ 700: '#0C458A',
31
+ 800: '#082E5C',
32
+ 850: '#062345',
33
+ 900: '#04172E',
34
+ 950: '#020C17'
35
+ };
@@ -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
+ function _export(target, all) {
18
+ for(var name in all)Object.defineProperty(target, name, {
19
+ enumerable: true,
20
+ get: all[name]
21
+ });
22
+ }
23
+ _export(exports, {
24
+ white: ()=>white,
25
+ black: ()=>black
26
+ });
27
+ const white = '#FFFFFF';
28
+ const black = '#000000';
@@ -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, "green", {
18
+ enumerable: true,
19
+ get: ()=>green
20
+ });
21
+ const green = {
22
+ 50: '#EAF9F1',
23
+ 100: '#D5F2E3',
24
+ 150: '#C1ECD4',
25
+ 200: '#ACE5C6',
26
+ 300: '#82D9AA',
27
+ 400: '#59CC8D',
28
+ 500: '#2FBF71',
29
+ 600: '#26995A',
30
+ 700: '#1C7344',
31
+ 800: '#134C2D',
32
+ 850: '#0E3922',
33
+ 900: '#092617',
34
+ 950: '#05130B'
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, "grey", {
18
+ enumerable: true,
19
+ get: ()=>grey
20
+ });
21
+ const grey = {
22
+ 50: '#F0F1F6',
23
+ 100: '#E1E3ED',
24
+ 150: '#D2D5E4',
25
+ 200: '#C3C7DB',
26
+ 300: '#A4ACC8',
27
+ 400: '#8690B6',
28
+ 500: '#717CA4',
29
+ 600: '#535D83',
30
+ 700: '#3E4662',
31
+ 800: '#2A2E42',
32
+ 850: '#1F2331',
33
+ 900: '#151721',
34
+ 950: '#0A0C10'
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
+ _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
+ }