@pingux/astro 2.120.0 → 2.121.0-alpha.1
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/AIComponents/Attachment/Attachment.d.ts +1 -6
- package/lib/cjs/components/AIComponents/Attachment/Attachment.js +10 -15
- package/lib/cjs/components/AIComponents/Attachment/Attachment.test.d.ts +1 -0
- package/lib/cjs/components/AIComponents/Attachment/Attachment.test.js +67 -0
- package/lib/cjs/components/AIComponents/Attachment/constants.d.ts +38 -0
- package/lib/cjs/components/AIComponents/Attachment/constants.js +51 -0
- package/lib/cjs/components/AIComponents/PromptInput/PromptInput.stories.js +2 -4
- package/lib/cjs/components/Icon/Icon.js +13 -10
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +37 -0
- package/lib/cjs/components/IconButton/IconButton.styles.js +6 -1
- package/lib/cjs/components/IconWrapper/iconWrapperAttributes.js +1 -1
- package/lib/cjs/components/ListView/ListView.js +5 -0
- package/lib/cjs/components/ListView/ListView.stories.d.ts +3 -3
- package/lib/cjs/components/ListView/ListView.stories.js +27 -458
- package/lib/cjs/components/ListView/ListViewExpandableItem.js +1 -0
- package/lib/cjs/components/ListView/ListViewItem.js +4 -1
- package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
- package/lib/cjs/components/ListView/stories/ListViewNextGenComponent.js +144 -0
- package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.js +16 -5
- package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +40 -3
- package/lib/cjs/components/ListViewItem/ListViewItem.styles.js +15 -1
- package/lib/cjs/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
- package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
- package/lib/cjs/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
- package/lib/cjs/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
- package/lib/cjs/components/Pagination/Pagination.stories.js +3 -3
- package/lib/cjs/components/SearchField/SearchField.js +2 -8
- package/lib/cjs/components/Text/Text.styles.d.ts +840 -0
- package/lib/cjs/components/Text/Text.styles.js +5 -1
- package/lib/cjs/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +15 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +18 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.d.ts +7 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +7 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/listview.d.ts +58 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/{lsitview.js → listview.js} +37 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +15 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +23 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +40 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +11 -3
- package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +2 -1
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +14 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.d.ts +14 -0
- package/lib/cjs/styles/themes/next-gen/colors/iconWrapper.js +16 -2
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +2 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +136 -24
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +27 -6
- package/lib/cjs/styles/themes/next-gen/variants/button.js +17 -3
- package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +79 -17
- package/lib/cjs/styles/themes/next-gen/variants/listview.js +89 -24
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +13 -1
- package/lib/cjs/styles/themes/next-gen/variants/text.js +16 -4
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +82 -17
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +8 -1
- package/lib/cjs/types/iconWrapper.d.ts +1 -1
- package/lib/cjs/utils/devUtils/constants/animals.js +449 -1
- package/lib/components/AIComponents/Attachment/Attachment.js +10 -15
- package/lib/components/AIComponents/Attachment/Attachment.test.js +64 -0
- package/lib/components/AIComponents/Attachment/constants.js +42 -0
- package/lib/components/AIComponents/PromptInput/PromptInput.stories.js +3 -5
- package/lib/components/Icon/Icon.js +13 -10
- package/lib/components/IconButton/IconButton.styles.js +6 -1
- package/lib/components/IconWrapper/iconWrapperAttributes.js +1 -1
- package/lib/components/ListView/ListView.js +5 -0
- package/lib/components/ListView/ListView.stories.js +25 -455
- package/lib/components/ListView/ListViewExpandableItem.js +1 -0
- package/lib/components/ListView/ListViewItem.js +4 -1
- package/lib/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.js → components/ListView/stories/ListView.chromatic.stories.js} +2 -2
- package/lib/components/ListView/stories/ListViewNextGenComponent.js +130 -0
- package/lib/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.js → components/ListView/stories/ListViewOnyxDark.stories.js} +3 -3
- package/lib/components/ListViewItem/ListViewItem.js +18 -7
- package/lib/components/ListViewItem/ListViewItem.stories.js +40 -3
- package/lib/components/ListViewItem/ListViewItem.styles.js +15 -1
- package/lib/components/ListViewItem/controls/ListViewItemEditButton.js +1 -1
- package/lib/components/ListViewItem/controls/ListViewItemMenu.js +9 -3
- package/lib/components/ListViewItem/controls/ListViewItemMenu.test.js +1 -0
- package/lib/components/ListViewItem/controls/chart/ListViewItemChart.js +5 -1
- package/lib/components/Pagination/Pagination.stories.js +1 -1
- package/lib/components/SearchField/SearchField.js +2 -8
- package/lib/components/Text/Text.styles.js +5 -1
- package/lib/hooks/useExpandableListViewItem/useExpandableListViewItem.js +9 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +18 -3
- package/lib/styles/themeOverrides/nextGenDarkMode/nextGenDarkModeOverride.js +2 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +7 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/listview.js +58 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +15 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +9 -1
- package/lib/styles/themes/astro/customProperties/icons.js +2 -1
- package/lib/styles/themes/next-gen/colors/iconWrapper.js +16 -2
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
- package/lib/styles/themes/next-gen/customProperties/icons.js +2 -1
- package/lib/styles/themes/next-gen/variants/button.js +17 -3
- package/lib/styles/themes/next-gen/variants/listview.js +84 -22
- package/lib/styles/themes/next-gen/variants/text.js +16 -4
- package/lib/styles/themes/next-gen/variants/variants.js +9 -2
- package/lib/utils/devUtils/constants/animals.js +449 -1
- package/package.json +1 -1
- package/lib/cjs/recipes/NextGen/ListViewNextGen.stories.js +0 -23
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/lsitview.d.ts +0 -24
- package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.d.ts +0 -29
- package/lib/cjs/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -84
- package/lib/cjs/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -67
- package/lib/cjs/styles/themes/next-gen/stories/NextGenListViewItem.stories.d.ts +0 -6
- package/lib/cjs/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -35
- package/lib/recipes/NextGen/ListViewNextGen.stories.js +0 -13
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/lsitview.js +0 -24
- package/lib/styles/themes/next-gen/stories/ListViewItemNextGen.js +0 -75
- package/lib/styles/themes/next-gen/stories/ListViewNextGenComponent.js +0 -58
- package/lib/styles/themes/next-gen/stories/NextGenListViewItem.stories.js +0 -25
- /package/lib/cjs/{styles/themeOverrides/nextGenDarkMode/stories/NextGenDarkListView.chromatic.stories.d.ts → components/ListView/stories/ListView.chromatic.stories.d.ts} +0 -0
- /package/lib/cjs/{styles/themes/next-gen → components/ListView}/stories/ListViewNextGenComponent.d.ts +0 -0
- /package/lib/cjs/{styles/themes/next-gen/stories/NextGenListView.chromatic.stories.d.ts → components/ListView/stories/ListViewOnyxDark.stories.d.ts} +0 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
+
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
7
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
8
|
+
_Object$defineProperty(exports, "__esModule", {
|
9
|
+
value: true
|
10
|
+
});
|
11
|
+
exports.ListViewNextGen = void 0;
|
12
|
+
var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
|
13
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
15
|
+
var _FormSelectIcon = _interopRequireDefault(require("@pingux/mdi-react/FormSelectIcon"));
|
16
|
+
var _TrashCanOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/TrashCanOutlineIcon"));
|
17
|
+
var _2 = require("../../..");
|
18
|
+
var _chartData = require("../../ListViewItem/controls/chart/chartData");
|
19
|
+
var _react2 = require("@emotion/react");
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
21
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
22
|
+
var loremText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
23
|
+
var items = (0, _from["default"])({
|
24
|
+
length: 10
|
25
|
+
}, function (_, index) {
|
26
|
+
var id = (index + 1).toString();
|
27
|
+
return {
|
28
|
+
key: "Animal".concat(id),
|
29
|
+
name: "Animal".concat(id),
|
30
|
+
id: id
|
31
|
+
};
|
32
|
+
});
|
33
|
+
var colors = ['cyan', 'orange', 'red', 'green', 'purple', 'yellow', 'teal', 'pink', 'yellow', 'green'];
|
34
|
+
var getColor = function getColor(index) {
|
35
|
+
var lastDigit = index % 10;
|
36
|
+
return colors[lastDigit];
|
37
|
+
};
|
38
|
+
var ListViewNextGen = function ListViewNextGen() {
|
39
|
+
var chartContainerRef = (0, _react.useRef)();
|
40
|
+
var Controls = function Controls() {
|
41
|
+
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_2.ListViewItemSwitchField, null), (0, _react2.jsx)(_2.ListViewItemMenu, null, (0, _react2.jsx)(_2.Item, {
|
42
|
+
key: "enable"
|
43
|
+
}, "Enable user"), (0, _react2.jsx)(_2.Item, {
|
44
|
+
key: "disable"
|
45
|
+
}, "Disable user"), (0, _react2.jsx)(_2.Item, {
|
46
|
+
key: "delete"
|
47
|
+
}, "Delete user")));
|
48
|
+
};
|
49
|
+
return (0, _react2.jsx)(_2.Box, {
|
50
|
+
backgroundColor: "background.base",
|
51
|
+
p: "lg"
|
52
|
+
}, (0, _react2.jsx)(_2.Box, {
|
53
|
+
height: "400px",
|
54
|
+
mb: "xl"
|
55
|
+
}, (0, _react2.jsx)(_2.Text, {
|
56
|
+
as: "h2",
|
57
|
+
mb: "md"
|
58
|
+
}, "ListView"), (0, _react2.jsx)(_2.ListView, {
|
59
|
+
items: items,
|
60
|
+
selectionMode: "single"
|
61
|
+
}, (0, _map["default"])(items).call(items, function (item, index) {
|
62
|
+
return (0, _react2.jsx)(_2.Item, item, (0, _react2.jsx)(_2.ListViewItem, {
|
63
|
+
data: {
|
64
|
+
icon: _TrashCanOutlineIcon["default"],
|
65
|
+
text: item.name,
|
66
|
+
subtext: loremText
|
67
|
+
},
|
68
|
+
iconWrapperProps: {
|
69
|
+
size: 'md',
|
70
|
+
color: getColor(index)
|
71
|
+
},
|
72
|
+
hasSeparator: false
|
73
|
+
}));
|
74
|
+
}))), (0, _react2.jsx)(_2.Box, {
|
75
|
+
height: "400px",
|
76
|
+
mb: "xl"
|
77
|
+
}, (0, _react2.jsx)(_2.Text, {
|
78
|
+
as: "h2",
|
79
|
+
mb: "md"
|
80
|
+
}, "ListView with Expanded Items"), (0, _react2.jsx)(_2.ListView, {
|
81
|
+
items: items,
|
82
|
+
selectionMode: "expansion",
|
83
|
+
expandedKeys: ['Animal1']
|
84
|
+
}, function (item) {
|
85
|
+
return (0, _react2.jsx)(_2.Item, {
|
86
|
+
key: item.name,
|
87
|
+
textValue: item.name
|
88
|
+
}, (0, _react2.jsx)(_2.Box, {
|
89
|
+
isRow: true,
|
90
|
+
sx: {
|
91
|
+
alignItems: 'center'
|
92
|
+
}
|
93
|
+
}, (0, _react2.jsx)(_2.Text, {
|
94
|
+
variant: "itemTitle"
|
95
|
+
}, item.name)), (0, _react2.jsx)(_2.Box, {
|
96
|
+
sx: {
|
97
|
+
my: 'lg'
|
98
|
+
}
|
99
|
+
}, (0, _react2.jsx)(_2.SearchField, {
|
100
|
+
value: "Animal1",
|
101
|
+
maxWidth: "400px",
|
102
|
+
"aria-label": "Search",
|
103
|
+
placeholder: "Search"
|
104
|
+
}), (0, _react2.jsx)(_2.Text, {
|
105
|
+
sx: {
|
106
|
+
mt: 'md',
|
107
|
+
fontWeight: '1'
|
108
|
+
}
|
109
|
+
}, "Lorem ipsum dolor sit amet consectetur. Viverra nulla nec velit sollicitudin sed nisi mi gravida. Maecenas vestibulum pretium dictum dictum tempus. Sit et rutrum hendrerit facilisi turpis tellus elementum. Egestas consectetur in ac id. Sit aliquam et ut pellentesque in at blandit sed. Sapien morbi cras eleifend lectus.")));
|
110
|
+
})), (0, _react2.jsx)(_2.Box, {
|
111
|
+
height: "400px"
|
112
|
+
}, (0, _react2.jsx)(_2.Text, {
|
113
|
+
as: "h2",
|
114
|
+
mb: "md"
|
115
|
+
}, "ListView with Charts"), (0, _react2.jsx)(_2.ListView, {
|
116
|
+
items: items
|
117
|
+
}, function (item) {
|
118
|
+
return (0, _react2.jsx)(_2.Item, {
|
119
|
+
key: item.name
|
120
|
+
}, (0, _react2.jsx)(_2.ListViewItem, {
|
121
|
+
ref: chartContainerRef,
|
122
|
+
data: {
|
123
|
+
text: item.name,
|
124
|
+
subtext: item.subtext,
|
125
|
+
icon: _FormSelectIcon["default"]
|
126
|
+
},
|
127
|
+
iconProps: {
|
128
|
+
color: 'text.secondary'
|
129
|
+
}
|
130
|
+
}, (0, _react2.jsx)(_2.ListViewItemChart, {
|
131
|
+
containerRef: chartContainerRef,
|
132
|
+
chartData: _chartData.chartData,
|
133
|
+
chartDataKey: "fullData",
|
134
|
+
title: "Avg daily sign-ons:",
|
135
|
+
contentCount: "31",
|
136
|
+
contentCountLabel: "Past 7 days",
|
137
|
+
chartLabel: "12 wk trend",
|
138
|
+
trend: "+115.0%",
|
139
|
+
tooltipText: "See Contributing Data",
|
140
|
+
ariaLabel: item.name
|
141
|
+
}), (0, _react2.jsx)(Controls, null)));
|
142
|
+
})));
|
143
|
+
};
|
144
|
+
exports.ListViewNextGen = ListViewNextGen;
|
@@ -7,11 +7,11 @@ _Object$defineProperty(exports, "__esModule", {
|
|
7
7
|
});
|
8
8
|
exports["default"] = exports.Default = void 0;
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
10
|
-
var _ = require("
|
11
|
-
var _ListViewNextGenComponent = require("
|
10
|
+
var _ = require("../../..");
|
11
|
+
var _ListViewNextGenComponent = require("./ListViewNextGenComponent");
|
12
12
|
var _react2 = require("@emotion/react");
|
13
13
|
var _default = {
|
14
|
-
title: '
|
14
|
+
title: 'Onyx Dark ListView'
|
15
15
|
};
|
16
16
|
exports["default"] = _default;
|
17
17
|
var Default = function Default() {
|
@@ -19,18 +19,19 @@ var _hooks = require("../../hooks");
|
|
19
19
|
var _pendoID = require("../../utils/devUtils/constants/pendoID");
|
20
20
|
var _listViewItemAttributes = require("./listViewItemAttributes");
|
21
21
|
var _react2 = require("@emotion/react");
|
22
|
-
var _excluded = ["children", "className", "data", "iconProps", "isHovered", "isSelected", "linkProps", "onHoverChange", "onHoverEnd", "onHoverStart", "slots"];
|
22
|
+
var _excluded = ["children", "className", "data", "iconProps", "iconWrapperProps", "isHovered", "isSelected", "linkProps", "onHoverChange", "onHoverEnd", "onHoverStart", "slots"];
|
23
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
24
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
25
25
|
var LIST_ITEM_ICON = '-list-item-icon';
|
26
26
|
exports.LIST_ITEM_ICON = LIST_ITEM_ICON;
|
27
27
|
var displayName = 'ListViewItem';
|
28
28
|
var ListViewItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
29
|
-
var _context;
|
29
|
+
var _context, _context2;
|
30
30
|
var children = _ref.children,
|
31
31
|
className = _ref.className,
|
32
32
|
data = _ref.data,
|
33
33
|
iconProps = _ref.iconProps,
|
34
|
+
iconWrapperProps = _ref.iconWrapperProps,
|
34
35
|
isHovered = _ref.isHovered,
|
35
36
|
isSelected = _ref.isSelected,
|
36
37
|
linkProps = _ref.linkProps,
|
@@ -61,7 +62,17 @@ var ListViewItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
61
62
|
if (image && !icon) return 'listViewItem.imageWrapper';
|
62
63
|
return 'listViewItem.iconWrapper';
|
63
64
|
};
|
64
|
-
var
|
65
|
+
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
66
|
+
isOnyx = _useGetTheme.themeState.isOnyx;
|
67
|
+
var renderIcon = icon && (isOnyx ? (0, _react2.jsx)(_.IconWrapper, (0, _extends2["default"])({
|
68
|
+
icon: icon,
|
69
|
+
size: "sm",
|
70
|
+
title: {
|
71
|
+
name: (0, _concat["default"])(_context = "".concat(text)).call(_context, LIST_ITEM_ICON)
|
72
|
+
},
|
73
|
+
isCircle: true,
|
74
|
+
color: "cyan"
|
75
|
+
}, iconWrapperProps)) : (0, _react2.jsx)(_.Box, {
|
65
76
|
width: "25px",
|
66
77
|
variant: "listViewItem.iconContainer"
|
67
78
|
}, (0, _react2.jsx)(_.Icon, (0, _extends2["default"])({
|
@@ -69,9 +80,9 @@ var ListViewItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
69
80
|
icon: icon,
|
70
81
|
size: "md",
|
71
82
|
title: {
|
72
|
-
name: (0, _concat["default"])(
|
83
|
+
name: (0, _concat["default"])(_context2 = "".concat(text)).call(_context2, LIST_ITEM_ICON)
|
73
84
|
}
|
74
|
-
}, iconProps)));
|
85
|
+
}, iconProps))));
|
75
86
|
var renderImage = !icon && image && (0, _react2.jsx)(_.Box, {
|
76
87
|
width: "35px"
|
77
88
|
}, (0, _react2.jsx)(_.Image, {
|
@@ -15,6 +15,7 @@ var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon
|
|
15
15
|
var _FormSelectIcon = _interopRequireDefault(require("@pingux/mdi-react/FormSelectIcon"));
|
16
16
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
17
17
|
var _ = require("../..");
|
18
|
+
var _hooks = require("../../hooks");
|
18
19
|
var _figmaLinks = require("../../utils/designUtils/figmaLinks");
|
19
20
|
var _images = require("../../utils/devUtils/constants/images");
|
20
21
|
var _chartData = require("./controls/chart/chartData");
|
@@ -41,13 +42,21 @@ var _default = {
|
|
41
42
|
exports["default"] = _default;
|
42
43
|
var Wrapper = function Wrapper(_ref) {
|
43
44
|
var children = _ref.children;
|
45
|
+
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
46
|
+
isOnyx = _useGetTheme.themeState.isOnyx;
|
44
47
|
return (0, _react2.jsx)(_.Box, {
|
45
|
-
sx: {
|
48
|
+
sx: isOnyx ? {
|
49
|
+
bg: 'transparent',
|
50
|
+
border: '1px solid',
|
51
|
+
borderColor: 'border.base',
|
52
|
+
borderRadius: '1rem',
|
53
|
+
p: '0'
|
54
|
+
} : {
|
46
55
|
bg: 'accent.99'
|
47
56
|
}
|
48
|
-
}, (0, _react2.jsx)(_.Separator, {
|
57
|
+
}, !isOnyx && (0, _react2.jsx)(_.Separator, {
|
49
58
|
margin: 0
|
50
|
-
}), children, (0, _react2.jsx)(_.Separator, {
|
59
|
+
}), children, !isOnyx && (0, _react2.jsx)(_.Separator, {
|
51
60
|
margin: 0
|
52
61
|
}));
|
53
62
|
};
|
@@ -56,6 +65,10 @@ var Default = function Default() {
|
|
56
65
|
data: {
|
57
66
|
icon: _AccountIcon["default"],
|
58
67
|
text: 'Fons Vernall'
|
68
|
+
},
|
69
|
+
iconWrapperProps: {
|
70
|
+
size: 'sm',
|
71
|
+
color: 'green'
|
59
72
|
}
|
60
73
|
}));
|
61
74
|
};
|
@@ -72,6 +85,10 @@ var WithSubtext = function WithSubtext() {
|
|
72
85
|
icon: _AccountIcon["default"],
|
73
86
|
subtext: 'rad_developer@pingidentity.com',
|
74
87
|
text: 'Fons Vernall'
|
88
|
+
},
|
89
|
+
iconWrapperProps: {
|
90
|
+
size: 'sm',
|
91
|
+
color: 'pink'
|
75
92
|
}
|
76
93
|
}));
|
77
94
|
};
|
@@ -107,6 +124,10 @@ var WithControls = function WithControls() {
|
|
107
124
|
data: {
|
108
125
|
icon: _FormSelectIcon["default"],
|
109
126
|
text: 'Fons Vernall'
|
127
|
+
},
|
128
|
+
iconWrapperProps: {
|
129
|
+
size: 'sm',
|
130
|
+
color: 'orange'
|
110
131
|
}
|
111
132
|
}, (0, _react2.jsx)(_.ListViewItemEditButton, {
|
112
133
|
"aria-label": "edit-icon"
|
@@ -144,6 +165,10 @@ var WithRightOfDataSlot = function WithRightOfDataSlot() {
|
|
144
165
|
text: 'Fons Vernall',
|
145
166
|
subtext: 'verylongemailaddress@email.com'
|
146
167
|
},
|
168
|
+
iconWrapperProps: {
|
169
|
+
size: 'sm',
|
170
|
+
color: 'teal'
|
171
|
+
},
|
147
172
|
slots: {
|
148
173
|
rightOfData: renderRightOfData
|
149
174
|
}
|
@@ -175,6 +200,10 @@ var WithLeftOfDataSlot = function WithLeftOfDataSlot() {
|
|
175
200
|
icon: _AccountIcon["default"],
|
176
201
|
text: 'Fons Vernall',
|
177
202
|
subtext: 'verylongemailaddress@email.com'
|
203
|
+
},
|
204
|
+
iconWrapperProps: {
|
205
|
+
size: 'sm',
|
206
|
+
color: 'orange'
|
178
207
|
}
|
179
208
|
// Note that when the leftOfData slot is used, it overrides the provided icon and
|
180
209
|
// removes all margins and padding on the left of data
|
@@ -205,6 +234,10 @@ var WithCharts = function WithCharts() {
|
|
205
234
|
text: 'Kangaroo',
|
206
235
|
subtext: 'kangaroo@example.com',
|
207
236
|
icon: _FormSelectIcon["default"]
|
237
|
+
},
|
238
|
+
iconWrapperProps: {
|
239
|
+
size: 'sm',
|
240
|
+
color: 'purple'
|
208
241
|
}
|
209
242
|
}, (0, _react2.jsx)(_.ListViewItemChart, {
|
210
243
|
containerRef: containerRef,
|
@@ -250,6 +283,10 @@ var WithExtraLongText = function WithExtraLongText() {
|
|
250
283
|
text: longText,
|
251
284
|
subtext: longText
|
252
285
|
},
|
286
|
+
iconWrapperProps: {
|
287
|
+
size: 'sm',
|
288
|
+
color: 'orange'
|
289
|
+
},
|
253
290
|
slots: {
|
254
291
|
rightOfData: renderRightOfData
|
255
292
|
}
|
@@ -152,6 +152,17 @@ var expandableRow = {
|
|
152
152
|
borderBottomColor: 'line.light'
|
153
153
|
}
|
154
154
|
};
|
155
|
+
var expandIcon = {
|
156
|
+
color: 'gray-900'
|
157
|
+
};
|
158
|
+
var editIcon = {
|
159
|
+
width: '25px !important',
|
160
|
+
height: '25px !important'
|
161
|
+
};
|
162
|
+
var menuIcon = {
|
163
|
+
width: '25px !important',
|
164
|
+
height: '25px !important'
|
165
|
+
};
|
155
166
|
var _default = {
|
156
167
|
container: container,
|
157
168
|
controls: controls,
|
@@ -166,6 +177,9 @@ var _default = {
|
|
166
177
|
expandableFocusContainer: expandableFocusContainer,
|
167
178
|
expandableItemBody: expandableItemBody,
|
168
179
|
expandableStyledListItem: expandableStyledListItem,
|
169
|
-
expandableRow: expandableRow
|
180
|
+
expandableRow: expandableRow,
|
181
|
+
expandIcon: expandIcon,
|
182
|
+
editIcon: editIcon,
|
183
|
+
menuIcon: menuIcon
|
170
184
|
};
|
171
185
|
exports["default"] = _default;
|
@@ -28,7 +28,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
28
28
|
ml: "sm"
|
29
29
|
}, (0, _react2.jsx)(_.IconButton, props, (0, _react2.jsx)(_.Icon, {
|
30
30
|
icon: _CreateIcon["default"],
|
31
|
-
|
31
|
+
variant: "listViewItem.editIcon"
|
32
32
|
})));
|
33
33
|
});
|
34
34
|
ListViewItemEditButton.propTypes = _iconButtonAttributes.iconButtonPropTypes;
|
@@ -12,8 +12,8 @@ exports["default"] = void 0;
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
13
13
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
15
|
-
var _MoreVertIcon = _interopRequireDefault(require("@pingux/mdi-react/MoreVertIcon"));
|
16
15
|
var _ = require("../../..");
|
16
|
+
var _hooks = require("../../../hooks");
|
17
17
|
var _menuAttributes = require("../../Menu/menuAttributes");
|
18
18
|
var _react2 = require("@emotion/react");
|
19
19
|
var _excluded = ["children", "iconButtonProps"];
|
@@ -30,12 +30,18 @@ var ListViewItemMenu = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref)
|
|
30
30
|
var children = _ref.children,
|
31
31
|
iconButtonProps = _ref.iconButtonProps,
|
32
32
|
others = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
33
|
+
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
34
|
+
icons = _useGetTheme.icons;
|
35
|
+
var listViewMenu = icons.listViewMenu;
|
33
36
|
return (0, _react2.jsx)(_.PopoverMenu, null, (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({
|
34
37
|
"aria-label": "more",
|
35
38
|
ref: ref
|
36
39
|
}, iconButtonProps), (0, _react2.jsx)(_.Icon, {
|
37
|
-
icon:
|
38
|
-
|
40
|
+
icon: listViewMenu,
|
41
|
+
variant: "listViewItem.menuIcon",
|
42
|
+
title: {
|
43
|
+
name: 'Menu Icon'
|
44
|
+
}
|
39
45
|
})), (0, _react2.jsx)(_.Menu, others, children));
|
40
46
|
});
|
41
47
|
ListViewItemMenu.propTypes = _menuAttributes.menuPropTypes;
|
@@ -23,6 +23,7 @@ var getComponent = function getComponent() {
|
|
23
23
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
24
24
|
return (0, _testWrapper.render)((0, _react2.jsx)(_.ListViewItemMenu, props, (0, _react2.jsx)(_.Item, null, "testItem")));
|
25
25
|
};
|
26
|
+
|
26
27
|
// Needs to be added to each components test file
|
27
28
|
(0, _universalComponentTest.universalComponentTests)({
|
28
29
|
renderComponent: function renderComponent(props) {
|
@@ -24,8 +24,10 @@ var _react = _interopRequireWildcard(require("react"));
|
|
24
24
|
var _reactAria = require("react-aria");
|
25
25
|
var _recharts = require("recharts");
|
26
26
|
var _useResizeObserver2 = _interopRequireDefault(require("use-resize-observer"));
|
27
|
+
var _hooks = require("../../../../hooks");
|
27
28
|
var _index = require("../../../../index");
|
28
29
|
var _colors = require("../../../../styles/colors");
|
30
|
+
var _colorTokens = require("../../../../styles/themes/next-gen/tokens/colorTokens");
|
29
31
|
var _ListViewItemChartAttributes = require("./ListViewItemChartAttributes");
|
30
32
|
var _react2 = require("@emotion/react");
|
31
33
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -96,6 +98,8 @@ var ListViewItemChart = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
|
|
96
98
|
}
|
97
99
|
setAriaLabel();
|
98
100
|
}, [ariaLabel, containerRef]);
|
101
|
+
var _useGetTheme = (0, _hooks.useGetTheme)(),
|
102
|
+
isOnyxDark = _useGetTheme.themeState.isOnyxDark;
|
99
103
|
return (0, _react2.jsx)(_index.Box, {
|
100
104
|
isRow: true,
|
101
105
|
alignItems: "center",
|
@@ -131,7 +135,7 @@ var ListViewItemChart = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
|
|
131
135
|
type: "monotone",
|
132
136
|
dataKey: chartDataKey,
|
133
137
|
dot: false,
|
134
|
-
stroke: _colors.neutral[20]
|
138
|
+
stroke: isOnyxDark ? _colorTokens.nextGenColors['gray-100'] : _colors.neutral[20]
|
135
139
|
})))), (0, _react2.jsx)(_index.Text, {
|
136
140
|
variant: "variants.lisViewItemChart.chartLabel"
|
137
141
|
}, chartLabel)), (0, _react2.jsx)(_index.Box, {
|
@@ -17,7 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
var _FormSelectIcon = _interopRequireDefault(require("@pingux/mdi-react/FormSelectIcon"));
|
18
18
|
var _usePaginationState2 = _interopRequireDefault(require("../../hooks/usePaginationState"));
|
19
19
|
var _index = require("../../index");
|
20
|
-
var
|
20
|
+
var _animals = _interopRequireDefault(require("../../utils/devUtils/constants/animals"));
|
21
21
|
var _Pagination = _interopRequireDefault(require("./Pagination.mdx"));
|
22
22
|
var _react2 = require("@emotion/react");
|
23
23
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -65,7 +65,7 @@ var ExampleComponent = function ExampleComponent() {
|
|
65
65
|
return (0, _react2.jsx)(_index.ScrollBox, {
|
66
66
|
maxHeight: "400px"
|
67
67
|
}, (0, _react2.jsx)(_index.ListView, {
|
68
|
-
items: (0, _map["default"])(_context = (0, _slice["default"])(
|
68
|
+
items: (0, _map["default"])(_context = (0, _slice["default"])(_animals["default"]).call(_animals["default"], paginationState.firstRenderedIndex, paginationState.lastRenderedIndex + 1)).call(_context, function (_item) {
|
69
69
|
return {
|
70
70
|
name: _item.name,
|
71
71
|
key: _item.name,
|
@@ -101,7 +101,7 @@ var WithListView = function WithListView() {
|
|
101
101
|
return (0, _react2.jsx)(_index.PaginationProvider, null, (0, _react2.jsx)(_index.Box, {
|
102
102
|
gap: "sm"
|
103
103
|
}, (0, _react2.jsx)(ExampleComponent, null), (0, _react2.jsx)(_index.Pagination, {
|
104
|
-
totalCount:
|
104
|
+
totalCount: _animals["default"].length
|
105
105
|
})));
|
106
106
|
};
|
107
107
|
exports.WithListView = WithListView;
|
@@ -83,14 +83,8 @@ var SearchField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
83
83
|
}, iconProps)), !hasNoClearButton && state.value !== '' && (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({
|
84
84
|
tabIndex: 0,
|
85
85
|
onKeyDown: handleKeyDownEvent,
|
86
|
-
|
87
|
-
|
88
|
-
top: 8,
|
89
|
-
right: 10,
|
90
|
-
path: {
|
91
|
-
fill: 'text.secondary'
|
92
|
-
}
|
93
|
-
}
|
86
|
+
color: "text.secondary",
|
87
|
+
variant: "searchClearButton"
|
94
88
|
}, clearButtonProps), (0, _react2.jsx)(_.Icon, {
|
95
89
|
icon: _CloseIcon["default"],
|
96
90
|
title: {
|