@perses-dev/components 0.48.0-rc0 → 0.49.0-rc.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 (61) hide show
  1. package/dist/ColorPicker/ColorPicker.d.ts +2 -1
  2. package/dist/ColorPicker/ColorPicker.d.ts.map +1 -1
  3. package/dist/ColorPicker/ColorPicker.js +24 -9
  4. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  5. package/dist/ColorPicker/OptionsColorPicker.d.ts +2 -1
  6. package/dist/ColorPicker/OptionsColorPicker.d.ts.map +1 -1
  7. package/dist/ColorPicker/OptionsColorPicker.js +10 -7
  8. package/dist/ColorPicker/OptionsColorPicker.js.map +1 -1
  9. package/dist/Table/Table.d.ts +1 -1
  10. package/dist/Table/Table.d.ts.map +1 -1
  11. package/dist/Table/Table.js +3 -2
  12. package/dist/Table/Table.js.map +1 -1
  13. package/dist/Table/TableCell.d.ts +3 -1
  14. package/dist/Table/TableCell.d.ts.map +1 -1
  15. package/dist/Table/TableCell.js +5 -1
  16. package/dist/Table/TableCell.js.map +1 -1
  17. package/dist/Table/VirtualizedTable.d.ts +3 -2
  18. package/dist/Table/VirtualizedTable.d.ts.map +1 -1
  19. package/dist/Table/VirtualizedTable.js +8 -2
  20. package/dist/Table/VirtualizedTable.js.map +1 -1
  21. package/dist/Table/model/table-model.d.ts +14 -0
  22. package/dist/Table/model/table-model.d.ts.map +1 -1
  23. package/dist/Table/model/table-model.js.map +1 -1
  24. package/dist/TransformsEditor/TransformEditor.d.ts +8 -0
  25. package/dist/TransformsEditor/TransformEditor.d.ts.map +1 -0
  26. package/dist/TransformsEditor/TransformEditor.js +291 -0
  27. package/dist/TransformsEditor/TransformEditor.js.map +1 -0
  28. package/dist/TransformsEditor/TransformEditorContainer.d.ts +9 -0
  29. package/dist/TransformsEditor/TransformEditorContainer.d.ts.map +1 -0
  30. package/dist/TransformsEditor/TransformEditorContainer.js +120 -0
  31. package/dist/TransformsEditor/TransformEditorContainer.js.map +1 -0
  32. package/dist/TransformsEditor/TransformsEditor.d.ts +8 -0
  33. package/dist/TransformsEditor/TransformsEditor.d.ts.map +1 -0
  34. package/dist/TransformsEditor/TransformsEditor.js +93 -0
  35. package/dist/TransformsEditor/TransformsEditor.js.map +1 -0
  36. package/dist/TransformsEditor/index.d.ts +2 -0
  37. package/dist/TransformsEditor/index.d.ts.map +1 -0
  38. package/dist/TransformsEditor/index.js +15 -0
  39. package/dist/TransformsEditor/index.js.map +1 -0
  40. package/dist/cjs/ColorPicker/ColorPicker.js +24 -9
  41. package/dist/cjs/ColorPicker/OptionsColorPicker.js +11 -8
  42. package/dist/cjs/Table/Table.js +3 -2
  43. package/dist/cjs/Table/TableCell.js +5 -1
  44. package/dist/cjs/Table/VirtualizedTable.js +8 -2
  45. package/dist/cjs/TransformsEditor/TransformEditor.js +299 -0
  46. package/dist/cjs/TransformsEditor/TransformEditorContainer.js +133 -0
  47. package/dist/cjs/TransformsEditor/TransformsEditor.js +106 -0
  48. package/dist/cjs/TransformsEditor/index.js +30 -0
  49. package/dist/cjs/index.js +1 -0
  50. package/dist/cjs/theme/palette/background.js +2 -0
  51. package/dist/index.d.ts +1 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +1 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/theme/index.d.ts +1 -0
  56. package/dist/theme/index.d.ts.map +1 -1
  57. package/dist/theme/index.js.map +1 -1
  58. package/dist/theme/palette/background.d.ts.map +1 -1
  59. package/dist/theme/palette/background.js +2 -0
  60. package/dist/theme/palette/background.js.map +1 -1
  61. package/package.json +3 -3
@@ -0,0 +1,133 @@
1
+ // Copyright 2024 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, "TransformEditorContainer", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return TransformEditorContainer;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _ChevronRight = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronRight"));
26
+ const _ChevronDown = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/ChevronDown"));
27
+ const _EyeOffOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/EyeOffOutline"));
28
+ const _EyeOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/EyeOutline"));
29
+ const _DeleteOutline = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/DeleteOutline"));
30
+ const _core = require("@perses-dev/core");
31
+ const _TransformEditor = require("./TransformEditor");
32
+ function _interop_require_default(obj) {
33
+ return obj && obj.__esModule ? obj : {
34
+ default: obj
35
+ };
36
+ }
37
+ function TransformEditorContainer({ index, value, isCollapsed, onChange, onCollapse, onDelete, ...props }) {
38
+ var _value_spec, _value_spec1;
39
+ function handleTransformDisable() {
40
+ var _value_spec;
41
+ onChange({
42
+ ...value,
43
+ spec: {
44
+ ...value.spec,
45
+ disabled: !((_value_spec = value.spec) === null || _value_spec === void 0 ? void 0 : _value_spec.disabled)
46
+ }
47
+ });
48
+ }
49
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
50
+ ...props,
51
+ children: [
52
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
53
+ direction: "row",
54
+ alignItems: "center",
55
+ borderBottom: 1,
56
+ borderColor: (theme)=>theme.palette.divider,
57
+ justifyContent: "space-between",
58
+ gap: 4,
59
+ children: [
60
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
61
+ direction: "row",
62
+ gap: 1,
63
+ children: [
64
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
65
+ "data-testid": `transform-toggle#${index}`,
66
+ size: "small",
67
+ onClick: ()=>onCollapse(!isCollapsed),
68
+ children: isCollapsed ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronRight.default, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_ChevronDown.default, {})
69
+ }),
70
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
71
+ variant: "overline",
72
+ component: "h4",
73
+ sx: {
74
+ textTransform: 'none'
75
+ },
76
+ children: value.kind ? /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
77
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
78
+ children: _core.TRANSFORM_TEXT[value.kind]
79
+ })
80
+ }) : /*#__PURE__*/ (0, _jsxruntime.jsx)("strong", {
81
+ children: "Select a transformation kind"
82
+ })
83
+ })
84
+ ]
85
+ }),
86
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
87
+ direction: "row",
88
+ gap: 1,
89
+ children: [
90
+ isCollapsed && /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
91
+ children: [
92
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
93
+ title: ((_value_spec = value.spec) === null || _value_spec === void 0 ? void 0 : _value_spec.disabled) ? 'Enable transformation' : 'Disable transformation',
94
+ placement: "top",
95
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
96
+ size: "small",
97
+ sx: {
98
+ marginLeft: 'auto'
99
+ },
100
+ onClick: handleTransformDisable,
101
+ children: ((_value_spec1 = value.spec) === null || _value_spec1 === void 0 ? void 0 : _value_spec1.disabled) ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_EyeOffOutline.default, {}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_EyeOutline.default, {})
102
+ })
103
+ }),
104
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Divider, {
105
+ flexItem: true,
106
+ orientation: "vertical",
107
+ variant: "middle"
108
+ })
109
+ ]
110
+ }),
111
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Tooltip, {
112
+ title: "Remove transformation",
113
+ placement: "top",
114
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.IconButton, {
115
+ size: "small",
116
+ sx: {
117
+ marginLeft: 'auto'
118
+ },
119
+ onClick: onDelete,
120
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_DeleteOutline.default, {})
121
+ })
122
+ })
123
+ ]
124
+ })
125
+ ]
126
+ }),
127
+ !isCollapsed && /*#__PURE__*/ (0, _jsxruntime.jsx)(_TransformEditor.TransformEditor, {
128
+ value: value,
129
+ onChange: onChange
130
+ })
131
+ ]
132
+ });
133
+ }
@@ -0,0 +1,106 @@
1
+ // Copyright 2024 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, "TransformsEditor", {
18
+ enumerable: true,
19
+ get: function() {
20
+ return TransformsEditor;
21
+ }
22
+ });
23
+ const _jsxruntime = require("react/jsx-runtime");
24
+ const _material = require("@mui/material");
25
+ const _react = require("react");
26
+ const _Plus = /*#__PURE__*/ _interop_require_default(require("mdi-material-ui/Plus"));
27
+ const _TransformEditorContainer = require("./TransformEditorContainer");
28
+ function _interop_require_default(obj) {
29
+ return obj && obj.__esModule ? obj : {
30
+ default: obj
31
+ };
32
+ }
33
+ function TransformsEditor({ value, onChange, ...props }) {
34
+ const [transformsCollapsed, setTransformsCollapsed] = (0, _react.useState)(value.map(()=>true));
35
+ function handleTransformChange(index, transform) {
36
+ const updatedTransforms = [
37
+ ...value
38
+ ];
39
+ updatedTransforms[index] = transform;
40
+ onChange(updatedTransforms);
41
+ }
42
+ function handleTransformAdd() {
43
+ const updatedTransforms = [
44
+ ...value
45
+ ];
46
+ // @ts-expect-error: Unknown transform
47
+ updatedTransforms.push({
48
+ kind: '',
49
+ spec: {}
50
+ });
51
+ onChange(updatedTransforms);
52
+ setTransformsCollapsed((prev)=>{
53
+ prev.push(false);
54
+ return [
55
+ ...prev
56
+ ];
57
+ });
58
+ }
59
+ function handleTransformDelete(index) {
60
+ const updatedTransforms = [
61
+ ...value
62
+ ];
63
+ updatedTransforms.splice(index, 1);
64
+ onChange(updatedTransforms);
65
+ setTransformsCollapsed((prev)=>{
66
+ prev.splice(index, 1);
67
+ return [
68
+ ...prev
69
+ ];
70
+ });
71
+ }
72
+ function handleTransformCollapseExpand(index, collapsed) {
73
+ setTransformsCollapsed((prev)=>{
74
+ prev[index] = collapsed;
75
+ return [
76
+ ...prev
77
+ ];
78
+ });
79
+ }
80
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
81
+ gap: 1,
82
+ ...props,
83
+ children: [
84
+ value.map((transform, i)=>{
85
+ var _transformsCollapsed_i;
86
+ return /*#__PURE__*/ (0, _jsxruntime.jsx)(_TransformEditorContainer.TransformEditorContainer, {
87
+ index: i,
88
+ value: transform,
89
+ isCollapsed: (_transformsCollapsed_i = transformsCollapsed[i]) !== null && _transformsCollapsed_i !== void 0 ? _transformsCollapsed_i : true,
90
+ onChange: (updatedTransform)=>handleTransformChange(i, updatedTransform),
91
+ onDelete: ()=>handleTransformDelete(i),
92
+ onCollapse: (collapsed)=>handleTransformCollapseExpand(i, collapsed)
93
+ }, i);
94
+ }),
95
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Button, {
96
+ variant: "contained",
97
+ startIcon: /*#__PURE__*/ (0, _jsxruntime.jsx)(_Plus.default, {}),
98
+ sx: {
99
+ marginTop: 1
100
+ },
101
+ onClick: handleTransformAdd,
102
+ children: "Add Transformation"
103
+ })
104
+ ]
105
+ });
106
+ }
@@ -0,0 +1,30 @@
1
+ // Copyright 2024 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
+ _export_star(require("./TransformsEditor"), exports);
18
+ function _export_star(from, to) {
19
+ Object.keys(from).forEach(function(k) {
20
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(to, k)) {
21
+ Object.defineProperty(to, k, {
22
+ enumerable: true,
23
+ get: function() {
24
+ return from[k];
25
+ }
26
+ });
27
+ }
28
+ });
29
+ return from;
30
+ }
package/dist/cjs/index.js CHANGED
@@ -50,6 +50,7 @@ _export_star(require("./utils"), exports);
50
50
  _export_star(require("./model"), exports);
51
51
  _export_star(require("./test-utils"), exports);
52
52
  _export_star(require("./theme"), exports);
53
+ _export_star(require("./TransformsEditor"), exports);
53
54
  _export_star(require("./RefreshIntervalPicker"), exports);
54
55
  _export_star(require("./PieChart"), exports);
55
56
  function _export_star(from, to) {
@@ -29,6 +29,7 @@ const background = (mode)=>{
29
29
  overlay,
30
30
  default: _colors.white,
31
31
  paper: _colors.grey[50],
32
+ code: _colors.grey[50],
32
33
  tooltip: _colors.grey[100],
33
34
  lighter: _colors.grey[50],
34
35
  border: _colors.grey[100]
@@ -37,6 +38,7 @@ const background = (mode)=>{
37
38
  overlay,
38
39
  default: _colors.grey[900],
39
40
  paper: _colors.grey[850],
41
+ code: _colors.grey[800],
40
42
  tooltip: _colors.grey[600],
41
43
  lighter: _colors.grey[700],
42
44
  border: _colors.grey[600]
package/dist/index.d.ts CHANGED
@@ -34,6 +34,7 @@ export * from './utils';
34
34
  export * from './model';
35
35
  export * from './test-utils';
36
36
  export * from './theme';
37
+ export * from './TransformsEditor';
37
38
  export * from './RefreshIntervalPicker';
38
39
  export * from './PieChart';
39
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -46,6 +46,7 @@ export * from './utils';
46
46
  export * from './model';
47
47
  export * from './test-utils';
48
48
  export * from './theme';
49
+ export * from './TransformsEditor';
49
50
  export * from './RefreshIntervalPicker';
50
51
  export * from './PieChart';
51
52
 
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 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\nexport * from './AlignSelector';\nexport * from './BarChart';\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './Dialog';\nexport * from './DensitySelector';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './FontSizeSelector';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './LinksEditor';\nexport * from './ModeSelector';\nexport * from './OptionsEditorLayout';\nexport * from './Overlay';\nexport * from './SettingsAutocomplete';\nexport * from './SortSelector';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeChart';\nexport * from './TimeRangeSelector';\nexport * from './TimeSeriesTooltip';\nexport * from './ToolbarIconButton';\nexport * from './FormatControls';\nexport * from './YAxisLabel';\nexport * from './context';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './RefreshIntervalPicker';\nexport * from './PieChart';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,0BAA0B;AACxC,cAAc,aAAa"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["// Copyright 2023 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\nexport * from './AlignSelector';\nexport * from './BarChart';\nexport * from './ColorPicker';\nexport * from './ContentWithLegend';\nexport * from './Dialog';\nexport * from './DensitySelector';\nexport * from './Drawer';\nexport * from './EChart';\nexport * from './ErrorAlert';\nexport * from './ErrorBoundary';\nexport * from './FontSizeSelector';\nexport * from './GaugeChart';\nexport * from './InfoTooltip';\nexport * from './JSONEditor';\nexport * from './Legend';\nexport * from './LineChart';\nexport * from './LinksEditor';\nexport * from './ModeSelector';\nexport * from './OptionsEditorLayout';\nexport * from './Overlay';\nexport * from './SettingsAutocomplete';\nexport * from './SortSelector';\nexport * from './StatChart';\nexport * from './Table';\nexport * from './ThresholdsEditor';\nexport * from './TimeChart';\nexport * from './TimeRangeSelector';\nexport * from './TimeSeriesTooltip';\nexport * from './ToolbarIconButton';\nexport * from './FormatControls';\nexport * from './YAxisLabel';\nexport * from './context';\nexport * from './utils';\nexport * from './model';\nexport * from './test-utils';\nexport * from './theme';\nexport * from './TransformsEditor';\nexport * from './RefreshIntervalPicker';\nexport * from './PieChart';\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,kBAAkB;AAChC,cAAc,aAAa;AAC3B,cAAc,gBAAgB;AAC9B,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,kBAAkB;AAChC,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,cAAc;AAC5B,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,YAAY;AAC1B,cAAc,yBAAyB;AACvC,cAAc,iBAAiB;AAC/B,cAAc,cAAc;AAC5B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,cAAc;AAC5B,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,sBAAsB;AACpC,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,qBAAqB;AACnC,cAAc,0BAA0B;AACxC,cAAc,aAAa"}
@@ -8,6 +8,7 @@ declare module '@mui/material/styles/createPalette' {
8
8
  overlay: string;
9
9
  border: string;
10
10
  lighter: string;
11
+ code: string;
11
12
  }
12
13
  interface TypeText {
13
14
  navigation: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAG7B,OAAO,QAAQ,oCAAoC,CAAC;IAClD,UAAU,cAAc;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;KACjB;IAED,UAAU,QAAQ;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf;;;;WAIG;QACH,YAAY,EAAE;YACZ,IAAI,EAAE,WAAW,CAAC;YAClB,KAAK,EAAE,WAAW,CAAC;YACnB,IAAI,EAAE,WAAW,CAAC;YAClB,MAAM,EAAE,WAAW,CAAC;YACpB,MAAM,EAAE,WAAW,CAAC;YACpB,GAAG,EAAE,WAAW,CAAC;SAClB,CAAC;KACH;IAED,UAAU,cAAc;QACtB,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;KACxC;CACF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAG7B,OAAO,QAAQ,oCAAoC,CAAC;IAClD,UAAU,cAAc;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAU,QAAQ;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACnB;CACF;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf;;;;WAIG;QACH,YAAY,EAAE;YACZ,IAAI,EAAE,WAAW,CAAC;YAClB,KAAK,EAAE,WAAW,CAAC;YACnB,IAAI,EAAE,WAAW,CAAC;YAClB,MAAM,EAAE,WAAW,CAAC;YACpB,MAAM,EAAE,WAAW,CAAC;YACpB,GAAG,EAAE,WAAW,CAAC;SAClB,CAAC;KACH;IAED,UAAU,cAAc;QACtB,YAAY,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;KACxC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["// Copyright 2023 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 type {} from './types/ThemeExtension';\nimport { PersesColor } from './palette';\n\nexport * from './theme';\nexport * from './typography';\n\n//Use Typescript interface augmentation to extend the MUI type definition\ndeclare module '@mui/material/styles/createPalette' {\n interface TypeBackground {\n navigation: string;\n tooltip: string;\n overlay: string;\n border: string;\n lighter: string;\n }\n\n interface TypeText {\n navigation: string;\n accent: string;\n link: string;\n linkHover: string;\n }\n}\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n /**\n * The base colors from Perses design system. Use sparingly since\n * this is meant as an escape hatch when the theme's other semantic colors\n * won't get you what you need.\n */\n designSystem: {\n blue: PersesColor;\n green: PersesColor;\n grey: PersesColor;\n orange: PersesColor;\n purple: PersesColor;\n red: PersesColor;\n };\n }\n\n interface PaletteOptions {\n designSystem?: Palette['designSystem'];\n }\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,cAAc,UAAU;AACxB,cAAc,eAAe"}
1
+ {"version":3,"sources":["../../src/theme/index.ts"],"sourcesContent":["// Copyright 2023 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 type {} from './types/ThemeExtension';\nimport { PersesColor } from './palette';\n\nexport * from './theme';\nexport * from './typography';\n\n//Use Typescript interface augmentation to extend the MUI type definition\ndeclare module '@mui/material/styles/createPalette' {\n interface TypeBackground {\n navigation: string;\n tooltip: string;\n overlay: string;\n border: string;\n lighter: string;\n code: string;\n }\n\n interface TypeText {\n navigation: string;\n accent: string;\n link: string;\n linkHover: string;\n }\n}\n\ndeclare module '@mui/material/styles' {\n interface Palette {\n /**\n * The base colors from Perses design system. Use sparingly since\n * this is meant as an escape hatch when the theme's other semantic colors\n * won't get you what you need.\n */\n designSystem: {\n blue: PersesColor;\n green: PersesColor;\n grey: PersesColor;\n orange: PersesColor;\n purple: PersesColor;\n red: PersesColor;\n };\n }\n\n interface PaletteOptions {\n designSystem?: Palette['designSystem'];\n }\n}\n"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAKjC,cAAc,UAAU;AACxB,cAAc,eAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../src/theme/palette/background.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,UAAU,SAAU,WAAW,KAAG,cAAc,CAAC,YAAY,CAsBzE,CAAC"}
1
+ {"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../src/theme/palette/background.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG5D,eAAO,MAAM,UAAU,SAAU,WAAW,KAAG,cAAc,CAAC,YAAY,CAwBzE,CAAC"}
@@ -19,6 +19,7 @@ export const background = (mode)=>{
19
19
  overlay,
20
20
  default: white,
21
21
  paper: grey[50],
22
+ code: grey[50],
22
23
  tooltip: grey[100],
23
24
  lighter: grey[50],
24
25
  border: grey[100]
@@ -27,6 +28,7 @@ export const background = (mode)=>{
27
28
  overlay,
28
29
  default: grey[900],
29
30
  paper: grey[850],
31
+ code: grey[800],
30
32
  tooltip: grey[600],
31
33
  lighter: grey[700],
32
34
  border: grey[600]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/theme/palette/background.ts"],"sourcesContent":["// Copyright 2023 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 { PaletteMode, PaletteOptions } from '@mui/material';\nimport { blue, grey, white } from './colors';\n\nexport const background = (mode: PaletteMode): PaletteOptions['background'] => {\n const navigation = blue[150];\n const overlay = 'rgba(21, 23, 33, 0.75)'; // grey[900] with opacity 75%\n return mode === 'light'\n ? {\n navigation,\n overlay,\n default: white,\n paper: grey[50],\n tooltip: grey[100],\n lighter: grey[50],\n border: grey[100],\n }\n : {\n navigation,\n overlay,\n default: grey[900],\n paper: grey[850],\n tooltip: grey[600],\n lighter: grey[700],\n border: grey[600],\n };\n};\n"],"names":["blue","grey","white","background","mode","navigation","overlay","default","paper","tooltip","lighter","border"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,WAAW;AAE7C,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAMC,aAAaL,IAAI,CAAC,IAAI;IAC5B,MAAMM,UAAU,0BAA0B,6BAA6B;IACvE,OAAOF,SAAS,UACZ;QACEC;QACAC;QACAC,SAASL;QACTM,OAAOP,IAAI,CAAC,GAAG;QACfQ,SAASR,IAAI,CAAC,IAAI;QAClBS,SAAST,IAAI,CAAC,GAAG;QACjBU,QAAQV,IAAI,CAAC,IAAI;IACnB,IACA;QACEI;QACAC;QACAC,SAASN,IAAI,CAAC,IAAI;QAClBO,OAAOP,IAAI,CAAC,IAAI;QAChBQ,SAASR,IAAI,CAAC,IAAI;QAClBS,SAAST,IAAI,CAAC,IAAI;QAClBU,QAAQV,IAAI,CAAC,IAAI;IACnB;AACN,EAAE"}
1
+ {"version":3,"sources":["../../../src/theme/palette/background.ts"],"sourcesContent":["// Copyright 2023 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 { PaletteMode, PaletteOptions } from '@mui/material';\nimport { blue, grey, white } from './colors';\n\nexport const background = (mode: PaletteMode): PaletteOptions['background'] => {\n const navigation = blue[150];\n const overlay = 'rgba(21, 23, 33, 0.75)'; // grey[900] with opacity 75%\n return mode === 'light'\n ? {\n navigation,\n overlay,\n default: white,\n paper: grey[50],\n code: grey[50],\n tooltip: grey[100],\n lighter: grey[50],\n border: grey[100],\n }\n : {\n navigation,\n overlay,\n default: grey[900],\n paper: grey[850],\n code: grey[800],\n tooltip: grey[600],\n lighter: grey[700],\n border: grey[600],\n };\n};\n"],"names":["blue","grey","white","background","mode","navigation","overlay","default","paper","code","tooltip","lighter","border"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAGjC,SAASA,IAAI,EAAEC,IAAI,EAAEC,KAAK,QAAQ,WAAW;AAE7C,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAMC,aAAaL,IAAI,CAAC,IAAI;IAC5B,MAAMM,UAAU,0BAA0B,6BAA6B;IACvE,OAAOF,SAAS,UACZ;QACEC;QACAC;QACAC,SAASL;QACTM,OAAOP,IAAI,CAAC,GAAG;QACfQ,MAAMR,IAAI,CAAC,GAAG;QACdS,SAAST,IAAI,CAAC,IAAI;QAClBU,SAASV,IAAI,CAAC,GAAG;QACjBW,QAAQX,IAAI,CAAC,IAAI;IACnB,IACA;QACEI;QACAC;QACAC,SAASN,IAAI,CAAC,IAAI;QAClBO,OAAOP,IAAI,CAAC,IAAI;QAChBQ,MAAMR,IAAI,CAAC,IAAI;QACfS,SAAST,IAAI,CAAC,IAAI;QAClBU,SAASV,IAAI,CAAC,IAAI;QAClBW,QAAQX,IAAI,CAAC,IAAI;IACnB;AACN,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perses-dev/components",
3
- "version": "0.48.0-rc0",
3
+ "version": "0.49.0-rc.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",
@@ -36,7 +36,7 @@
36
36
  "@codemirror/lang-json": "^6.0.1",
37
37
  "@fontsource/lato": "^4.5.10",
38
38
  "@mui/x-date-pickers": "^6.12.1",
39
- "@perses-dev/core": "0.48.0-rc0",
39
+ "@perses-dev/core": "0.49.0-rc.0",
40
40
  "@tanstack/react-table": "^8.19.2",
41
41
  "@uiw/react-codemirror": "^4.19.1",
42
42
  "date-fns": "^2.28.0",
@@ -53,7 +53,7 @@
53
53
  "zod": "^3.21.4"
54
54
  },
55
55
  "devDependencies": {
56
- "@perses-dev/storybook": "0.48.0-rc0"
56
+ "@perses-dev/storybook": "0.49.0-rc.0"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@mui/material": "^5.15.20",