@pingux/astro 2.17.0-alpha.5 → 2.17.0-alpha.6
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/lib/cjs/components/ListView/ListView.stories.js +38 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.mdx +1 -0
- package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +36 -2
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +1 -1
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.js +102 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.mdx +11 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.stories.js +50 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.styles.js +112 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.test.js +76 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChartAttributes.js +127 -0
- package/lib/cjs/components/ListViewItem/controls/chart/chartData.js +45 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +8 -0
- package/lib/cjs/styles/variants/variants.js +2 -0
- package/lib/components/ListView/ListView.stories.js +32 -2
- package/lib/components/ListViewItem/ListViewItem.mdx +1 -0
- package/lib/components/ListViewItem/ListViewItem.stories.js +30 -2
- package/lib/components/ListViewItem/ListViewItem.styles.js +1 -1
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.js +88 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.mdx +11 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.stories.js +35 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.styles.js +104 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.test.js +73 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChartAttributes.js +118 -0
- package/lib/components/ListViewItem/controls/chart/chartData.js +37 -0
- package/lib/index.js +1 -0
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +2 -2
@@ -0,0 +1,118 @@
|
|
1
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
2
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
3
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
4
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
5
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
6
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
7
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
8
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
11
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
12
|
+
import PropTypes from 'prop-types';
|
13
|
+
import { docArgTypes } from '../../../../utils/docUtils/docArgTypes';
|
14
|
+
import { buttonArgTypes } from '../../../Button/buttonAttributes';
|
15
|
+
var descriptions = {
|
16
|
+
buttonProps: 'Object includes same props as `Button` component',
|
17
|
+
chartData: 'Array with objects `{ id, keyName }` for chart',
|
18
|
+
chartDataKey: 'Name of the `keyName` in `chartData`',
|
19
|
+
chartLabel: 'Label under chart',
|
20
|
+
mobileBreakPoint: 'Container width breakpoint to hide all ListViewItemChart',
|
21
|
+
tabletBreakPoint: 'Container width breakpoint to hide content (counter and counter label)',
|
22
|
+
title: 'Main title of chart',
|
23
|
+
tooltipText: 'Text inside tooltip',
|
24
|
+
contentCount: 'Number of events',
|
25
|
+
contentCountLabel: 'Label under `contentCount`',
|
26
|
+
trend: 'Text for trend'
|
27
|
+
};
|
28
|
+
export var listViewItemChartArgTypes = {
|
29
|
+
buttonProps: _objectSpread(_objectSpread({}, buttonArgTypes), {}, {
|
30
|
+
type: {
|
31
|
+
summary: docArgTypes.object
|
32
|
+
},
|
33
|
+
description: descriptions.buttonProps,
|
34
|
+
control: 'object'
|
35
|
+
}),
|
36
|
+
chartData: {
|
37
|
+
description: descriptions.chartData,
|
38
|
+
type: {
|
39
|
+
summary: docArgTypes.object
|
40
|
+
},
|
41
|
+
control: 'object'
|
42
|
+
},
|
43
|
+
chartDataKey: {
|
44
|
+
description: descriptions.chartDataKey,
|
45
|
+
type: {
|
46
|
+
summary: docArgTypes.string
|
47
|
+
},
|
48
|
+
control: 'text'
|
49
|
+
},
|
50
|
+
chartLabel: {
|
51
|
+
description: descriptions.chartLabel,
|
52
|
+
type: {
|
53
|
+
summary: docArgTypes.string
|
54
|
+
},
|
55
|
+
control: 'text'
|
56
|
+
},
|
57
|
+
mobileBreakPoint: {
|
58
|
+
description: descriptions.mobileBreakPoint,
|
59
|
+
type: {
|
60
|
+
summary: docArgTypes.number
|
61
|
+
},
|
62
|
+
control: 'number'
|
63
|
+
},
|
64
|
+
tabletBreakPoint: {
|
65
|
+
description: descriptions.tabletBreakPoint,
|
66
|
+
type: {
|
67
|
+
summary: docArgTypes.number
|
68
|
+
},
|
69
|
+
control: 'number'
|
70
|
+
},
|
71
|
+
title: {
|
72
|
+
description: descriptions.title,
|
73
|
+
type: {
|
74
|
+
summary: docArgTypes.string
|
75
|
+
},
|
76
|
+
control: 'text'
|
77
|
+
},
|
78
|
+
tooltipText: {
|
79
|
+
description: descriptions.tooltipText,
|
80
|
+
type: {
|
81
|
+
summary: docArgTypes.string
|
82
|
+
},
|
83
|
+
control: 'text'
|
84
|
+
},
|
85
|
+
contentCount: {
|
86
|
+
description: descriptions.contentCount,
|
87
|
+
type: {
|
88
|
+
summary: docArgTypes.string
|
89
|
+
},
|
90
|
+
control: 'text'
|
91
|
+
},
|
92
|
+
contentCountLabel: {
|
93
|
+
description: descriptions.contentCountLabel,
|
94
|
+
type: {
|
95
|
+
summary: docArgTypes.string
|
96
|
+
},
|
97
|
+
control: 'text'
|
98
|
+
},
|
99
|
+
trend: {
|
100
|
+
description: descriptions.trend,
|
101
|
+
type: {
|
102
|
+
summary: docArgTypes.string
|
103
|
+
},
|
104
|
+
control: 'text'
|
105
|
+
}
|
106
|
+
};
|
107
|
+
export var listViewItemChartPropTypes = {
|
108
|
+
chartData: PropTypes.arrayOf(PropTypes.shape({})),
|
109
|
+
chartLabel: PropTypes.string,
|
110
|
+
chartDataKey: PropTypes.string,
|
111
|
+
contentCount: PropTypes.string,
|
112
|
+
contentCountLabel: PropTypes.string,
|
113
|
+
mobileBreakPoint: PropTypes.number,
|
114
|
+
tabletBreakPoint: PropTypes.number,
|
115
|
+
title: PropTypes.string,
|
116
|
+
tooltipText: PropTypes.string,
|
117
|
+
trend: PropTypes.string
|
118
|
+
};
|
@@ -0,0 +1,37 @@
|
|
1
|
+
export var chartData = [{
|
2
|
+
id: 1,
|
3
|
+
fullData: 1
|
4
|
+
}, {
|
5
|
+
id: 2,
|
6
|
+
fullData: 5
|
7
|
+
}, {
|
8
|
+
id: 3,
|
9
|
+
fullData: 3
|
10
|
+
}, {
|
11
|
+
id: 4,
|
12
|
+
fullData: 2
|
13
|
+
}, {
|
14
|
+
id: 5,
|
15
|
+
fullData: 5
|
16
|
+
}, {
|
17
|
+
id: 6,
|
18
|
+
fullData: 1
|
19
|
+
}, {
|
20
|
+
id: 7,
|
21
|
+
fullData: 5
|
22
|
+
}, {
|
23
|
+
id: 8,
|
24
|
+
fullData: 5
|
25
|
+
}, {
|
26
|
+
id: 9,
|
27
|
+
fullData: 1
|
28
|
+
}, {
|
29
|
+
id: 10,
|
30
|
+
fullData: 2
|
31
|
+
}, {
|
32
|
+
id: 11,
|
33
|
+
fullData: 4
|
34
|
+
}, {
|
35
|
+
id: 12,
|
36
|
+
fullData: 11
|
37
|
+
}];
|
package/lib/index.js
CHANGED
@@ -84,6 +84,7 @@ export * from './components/ListItem';
|
|
84
84
|
export { default as ListView } from './components/ListView';
|
85
85
|
export * from './components/ListView';
|
86
86
|
export { default as ListViewItem } from './components/ListViewItem';
|
87
|
+
export { default as ListViewItemChart } from './components/ListViewItem/controls/chart/ListViewItemChart';
|
87
88
|
export { default as ListViewItemEditButton } from './components/ListViewItem/controls/ListViewItemEditButton';
|
88
89
|
export { default as ListViewItemMenu } from './components/ListViewItem/controls/ListViewItemMenu';
|
89
90
|
export { default as ListViewItemSwitchField } from './components/ListViewItem/controls/ListViewItemSwitchField';
|
@@ -26,6 +26,7 @@ import helpHint from '../../components/HelpHint/HelpHint.styles';
|
|
26
26
|
import imageUpload from '../../components/ImageUploadField/imageUpload';
|
27
27
|
import listBox from '../../components/ListBox/ListBox.styles';
|
28
28
|
import listItem from '../../components/ListItem/ListItem.styles';
|
29
|
+
import lisViewItemChart from '../../components/ListViewItem/controls/chart/ListViewItemChart.styles';
|
29
30
|
import listViewItem from '../../components/ListViewItem/ListViewItem.styles';
|
30
31
|
import loader from '../../components/Loader/Loader.styles';
|
31
32
|
import menu from '../../components/Menu/Menu.styles';
|
@@ -63,6 +64,7 @@ export default _objectSpread({
|
|
63
64
|
listBox: listBox,
|
64
65
|
listItem: listItem,
|
65
66
|
listViewItem: listViewItem,
|
67
|
+
lisViewItemChart: lisViewItemChart,
|
66
68
|
loader: loader,
|
67
69
|
menu: menu,
|
68
70
|
menuItem: menuItem,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pingux/astro",
|
3
|
-
"version": "2.17.0-alpha.
|
3
|
+
"version": "2.17.0-alpha.6",
|
4
4
|
"description": "React component library for Ping Identity's design system",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -102,7 +102,7 @@
|
|
102
102
|
"react-color": "^2.19.3",
|
103
103
|
"react-dropzone": "^11.4.2",
|
104
104
|
"react-stately": "^3.20.0",
|
105
|
-
"recharts": "^2.
|
105
|
+
"recharts": "^2.7.0",
|
106
106
|
"regenerator-runtime": "^0.13.7",
|
107
107
|
"styled-system": "^5.1.5",
|
108
108
|
"theme-ui": "^0.10.0",
|