@pingux/astro 2.172.0 → 2.173.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +53 -1
- package/lib/cjs/components/PopoverMenu/PopoverMenu.js +1 -1
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/listview.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +1 -1
- package/lib/components/ListViewItem/ListViewItem.stories.js +53 -1
- package/lib/components/PopoverMenu/PopoverMenu.js +2 -2
- package/lib/styles/themes/next-gen/convertedComponentList.js +1 -0
- package/lib/styles/themes/next-gen/variants/listview.js +1 -1
- package/lib/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -8,10 +8,11 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
8
8
|
_Object$defineProperty(exports, "__esModule", {
|
|
9
9
|
value: true
|
|
10
10
|
});
|
|
11
|
-
exports["default"] = exports.WithSubtext = exports.WithRightOfDataSlot = exports.WithLeftOfDataSlot = exports.WithImage = exports.WithExtraLongText = exports.WithControls = exports.WithCharts = exports.Default = void 0;
|
|
11
|
+
exports["default"] = exports.WithSubtext = exports.WithRightOfDataSlot = exports.WithLeftOfDataSlot = exports.WithImage = exports.WithExtraLongText = exports.WithExpandableItem = exports.WithControls = exports.WithCharts = exports.Default = void 0;
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactStately = require("react-stately");
|
|
14
14
|
var _AccountIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountIcon"));
|
|
15
|
+
var _AccountOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/AccountOutlineIcon"));
|
|
15
16
|
var _ClockOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/ClockOutlineIcon"));
|
|
16
17
|
var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
|
|
17
18
|
var _ = require("../..");
|
|
@@ -325,4 +326,55 @@ WithExtraLongText.parameters = {
|
|
|
325
326
|
type: 'figma',
|
|
326
327
|
url: _figmaLinks.FIGMA_LINKS.listViewItem.withExtraLongText
|
|
327
328
|
}
|
|
329
|
+
};
|
|
330
|
+
var WithExpandableItem = exports.WithExpandableItem = function WithExpandableItem() {
|
|
331
|
+
return (0, _react2.jsx)(_.ListView, {
|
|
332
|
+
items: [{
|
|
333
|
+
key: 'Fons Vernall',
|
|
334
|
+
name: 'Fons Vernall',
|
|
335
|
+
subtext: 'rad_developer@pingidentity.com',
|
|
336
|
+
id: '1',
|
|
337
|
+
icon: _AccountOutlineIcon["default"]
|
|
338
|
+
}],
|
|
339
|
+
selectionMode: "expansion"
|
|
340
|
+
}, function (item) {
|
|
341
|
+
return (0, _react2.jsx)(_reactStately.Item, {
|
|
342
|
+
key: item.key,
|
|
343
|
+
textValue: item.name
|
|
344
|
+
}, (0, _react2.jsx)(_.Box, {
|
|
345
|
+
isRow: true,
|
|
346
|
+
sx: {
|
|
347
|
+
alignItems: 'center'
|
|
348
|
+
},
|
|
349
|
+
gap: "lg"
|
|
350
|
+
}, (0, _react2.jsx)(_.IconWrapper, {
|
|
351
|
+
icon: item.icon,
|
|
352
|
+
size: "sm",
|
|
353
|
+
title: {
|
|
354
|
+
name: item.name
|
|
355
|
+
},
|
|
356
|
+
isCircle: true,
|
|
357
|
+
color: "blue"
|
|
358
|
+
}), (0, _react2.jsx)(_.Box, null, (0, _react2.jsx)(_.Text, {
|
|
359
|
+
variant: "listViewItemText"
|
|
360
|
+
}, item.name), (0, _react2.jsx)(_.Text, {
|
|
361
|
+
variant: "listViewItemSubtext"
|
|
362
|
+
}, item.subtext))), (0, _react2.jsx)(_.Box, {
|
|
363
|
+
sx: {
|
|
364
|
+
my: '20px'
|
|
365
|
+
}
|
|
366
|
+
}, (0, _react2.jsx)(_.SearchField, {
|
|
367
|
+
maxWidth: "400px",
|
|
368
|
+
"aria-label": "Search",
|
|
369
|
+
placeholder: "Search"
|
|
370
|
+
}), (0, _react2.jsx)(_.Text, {
|
|
371
|
+
variant: "listViewItemExpandedText"
|
|
372
|
+
}, "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.")));
|
|
373
|
+
});
|
|
374
|
+
};
|
|
375
|
+
WithExpandableItem.parameters = {
|
|
376
|
+
design: {
|
|
377
|
+
type: 'figma',
|
|
378
|
+
url: _figmaLinks.FIGMA_LINKS.listViewItem["default"]
|
|
379
|
+
}
|
|
328
380
|
};
|
|
@@ -54,7 +54,7 @@ var PopoverMenu = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
54
54
|
var _useMenuTrigger = (0, _reactAria.useMenuTrigger)({}, state, triggerRef),
|
|
55
55
|
menuTriggerProps = _useMenuTrigger.menuTriggerProps,
|
|
56
56
|
menuProps = _useMenuTrigger.menuProps;
|
|
57
|
-
var trigger = /*#__PURE__*/_react["default"].isValidElement(menuTrigger) ? /*#__PURE__*/_react["default"].cloneElement(menuTrigger, _objectSpread(_objectSpread({}, menuTriggerProps), {}, {
|
|
57
|
+
var trigger = /*#__PURE__*/_react["default"].isValidElement(menuTrigger) ? /*#__PURE__*/_react["default"].cloneElement(menuTrigger, _objectSpread(_objectSpread({}, (0, _reactAria.mergeProps)(menuTrigger.props, menuTriggerProps)), {}, {
|
|
58
58
|
ref: triggerRef
|
|
59
59
|
})) : menuTrigger;
|
|
60
60
|
|
|
@@ -29,6 +29,7 @@ var astroBlacklistStory = exports.astroBlacklistStory = {
|
|
|
29
29
|
Text: ['Onyx'],
|
|
30
30
|
Loader: ['Circular', 'Custom Circular'],
|
|
31
31
|
Card: ['With Shadow'],
|
|
32
|
+
ListViewItem: ['With Expandable Item'],
|
|
32
33
|
MaterialSymbolIcon: ['Default', 'Sizes', 'Commonly Used']
|
|
33
34
|
};
|
|
34
35
|
var nextGenOnlyComponents = exports.nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer', 'Onyx Input Patterns'];
|
|
@@ -5520,7 +5520,7 @@ declare const _default: {
|
|
|
5520
5520
|
'&.is-last-item': {
|
|
5521
5521
|
borderBottomLeftRadius: string;
|
|
5522
5522
|
borderBottomRightRadius: string;
|
|
5523
|
-
'&.is-hovered, &.is-expanded': {
|
|
5523
|
+
'&.is-expanded.is-hovered, &.is-expanded.is-expanded': {
|
|
5524
5524
|
borderBottomLeftRadius: string;
|
|
5525
5525
|
borderBottomRightRadius: string;
|
|
5526
5526
|
};
|
|
@@ -60,7 +60,7 @@ export declare const listViewItem: {
|
|
|
60
60
|
'&.is-last-item': {
|
|
61
61
|
borderBottomLeftRadius: string;
|
|
62
62
|
borderBottomRightRadius: string;
|
|
63
|
-
'&.is-hovered, &.is-expanded': {
|
|
63
|
+
'&.is-expanded.is-hovered, &.is-expanded.is-expanded': {
|
|
64
64
|
borderBottomLeftRadius: string;
|
|
65
65
|
borderBottomRightRadius: string;
|
|
66
66
|
};
|
|
@@ -67,7 +67,7 @@ var listViewItem = exports.listViewItem = {
|
|
|
67
67
|
'&.is-last-item': {
|
|
68
68
|
borderBottomLeftRadius: borderRadius,
|
|
69
69
|
borderBottomRightRadius: borderRadius,
|
|
70
|
-
'&.is-hovered, &.is-expanded': {
|
|
70
|
+
'&.is-expanded.is-hovered, &.is-expanded.is-expanded': {
|
|
71
71
|
borderBottomLeftRadius: '0',
|
|
72
72
|
borderBottomRightRadius: '0'
|
|
73
73
|
}
|
|
@@ -907,7 +907,7 @@ declare const _default: {
|
|
|
907
907
|
'&.is-last-item': {
|
|
908
908
|
borderBottomLeftRadius: string;
|
|
909
909
|
borderBottomRightRadius: string;
|
|
910
|
-
'&.is-hovered, &.is-expanded': {
|
|
910
|
+
'&.is-expanded.is-hovered, &.is-expanded.is-expanded': {
|
|
911
911
|
borderBottomLeftRadius: string;
|
|
912
912
|
borderBottomRightRadius: string;
|
|
913
913
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useRef } from 'react';
|
|
2
2
|
import { Item } from 'react-stately';
|
|
3
3
|
import AccountIcon from '@pingux/mdi-react/AccountIcon';
|
|
4
|
+
import AccountOutlineIcon from '@pingux/mdi-react/AccountOutlineIcon';
|
|
4
5
|
import ClockOutlineIcon from '@pingux/mdi-react/ClockOutlineIcon';
|
|
5
6
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
6
|
-
import { Badge, Box, ListViewItem, ListViewItemChart, ListViewItemMenu, ListViewItemSwitchField, Separator, Text } from '../..';
|
|
7
|
+
import { Badge, Box, IconWrapper, ListView, ListViewItem, ListViewItemChart, ListViewItemMenu, ListViewItemSwitchField, SearchField, Separator, Text } from '../..';
|
|
7
8
|
import { useGetTheme } from '../../hooks';
|
|
8
9
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
9
10
|
import { userImagePanelHeader } from '../../utils/devUtils/constants/images';
|
|
@@ -313,4 +314,55 @@ WithExtraLongText.parameters = {
|
|
|
313
314
|
type: 'figma',
|
|
314
315
|
url: FIGMA_LINKS.listViewItem.withExtraLongText
|
|
315
316
|
}
|
|
317
|
+
};
|
|
318
|
+
export var WithExpandableItem = function WithExpandableItem() {
|
|
319
|
+
return ___EmotionJSX(ListView, {
|
|
320
|
+
items: [{
|
|
321
|
+
key: 'Fons Vernall',
|
|
322
|
+
name: 'Fons Vernall',
|
|
323
|
+
subtext: 'rad_developer@pingidentity.com',
|
|
324
|
+
id: '1',
|
|
325
|
+
icon: AccountOutlineIcon
|
|
326
|
+
}],
|
|
327
|
+
selectionMode: "expansion"
|
|
328
|
+
}, function (item) {
|
|
329
|
+
return ___EmotionJSX(Item, {
|
|
330
|
+
key: item.key,
|
|
331
|
+
textValue: item.name
|
|
332
|
+
}, ___EmotionJSX(Box, {
|
|
333
|
+
isRow: true,
|
|
334
|
+
sx: {
|
|
335
|
+
alignItems: 'center'
|
|
336
|
+
},
|
|
337
|
+
gap: "lg"
|
|
338
|
+
}, ___EmotionJSX(IconWrapper, {
|
|
339
|
+
icon: item.icon,
|
|
340
|
+
size: "sm",
|
|
341
|
+
title: {
|
|
342
|
+
name: item.name
|
|
343
|
+
},
|
|
344
|
+
isCircle: true,
|
|
345
|
+
color: "blue"
|
|
346
|
+
}), ___EmotionJSX(Box, null, ___EmotionJSX(Text, {
|
|
347
|
+
variant: "listViewItemText"
|
|
348
|
+
}, item.name), ___EmotionJSX(Text, {
|
|
349
|
+
variant: "listViewItemSubtext"
|
|
350
|
+
}, item.subtext))), ___EmotionJSX(Box, {
|
|
351
|
+
sx: {
|
|
352
|
+
my: '20px'
|
|
353
|
+
}
|
|
354
|
+
}, ___EmotionJSX(SearchField, {
|
|
355
|
+
maxWidth: "400px",
|
|
356
|
+
"aria-label": "Search",
|
|
357
|
+
placeholder: "Search"
|
|
358
|
+
}), ___EmotionJSX(Text, {
|
|
359
|
+
variant: "listViewItemExpandedText"
|
|
360
|
+
}, "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.")));
|
|
361
|
+
});
|
|
362
|
+
};
|
|
363
|
+
WithExpandableItem.parameters = {
|
|
364
|
+
design: {
|
|
365
|
+
type: 'figma',
|
|
366
|
+
url: FIGMA_LINKS.listViewItem["default"]
|
|
367
|
+
}
|
|
316
368
|
};
|
|
@@ -13,7 +13,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
13
13
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
15
15
|
import React, { forwardRef, useRef } from 'react';
|
|
16
|
-
import { DismissButton, FocusScope, OverlayContainer, useMenuTrigger } from 'react-aria';
|
|
16
|
+
import { DismissButton, FocusScope, mergeProps, OverlayContainer, useMenuTrigger } from 'react-aria';
|
|
17
17
|
import { useMenuTriggerState } from 'react-stately';
|
|
18
18
|
import { PressResponder } from '@react-aria/interactions';
|
|
19
19
|
import { MenuContext } from '../../context/MenuContext';
|
|
@@ -44,7 +44,7 @@ var PopoverMenu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
44
44
|
var _useMenuTrigger = useMenuTrigger({}, state, triggerRef),
|
|
45
45
|
menuTriggerProps = _useMenuTrigger.menuTriggerProps,
|
|
46
46
|
menuProps = _useMenuTrigger.menuProps;
|
|
47
|
-
var trigger = /*#__PURE__*/React.isValidElement(menuTrigger) ? /*#__PURE__*/React.cloneElement(menuTrigger, _objectSpread(_objectSpread({}, menuTriggerProps), {}, {
|
|
47
|
+
var trigger = /*#__PURE__*/React.isValidElement(menuTrigger) ? /*#__PURE__*/React.cloneElement(menuTrigger, _objectSpread(_objectSpread({}, mergeProps(menuTrigger.props, menuTriggerProps)), {}, {
|
|
48
48
|
ref: triggerRef
|
|
49
49
|
})) : menuTrigger;
|
|
50
50
|
|
|
@@ -22,6 +22,7 @@ export var astroBlacklistStory = {
|
|
|
22
22
|
Text: ['Onyx'],
|
|
23
23
|
Loader: ['Circular', 'Custom Circular'],
|
|
24
24
|
Card: ['With Shadow'],
|
|
25
|
+
ListViewItem: ['With Expandable Item'],
|
|
25
26
|
MaterialSymbolIcon: ['Default', 'Sizes', 'Commonly Used']
|
|
26
27
|
};
|
|
27
28
|
export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer', 'Onyx Input Patterns'];
|
|
@@ -60,7 +60,7 @@ export var listViewItem = {
|
|
|
60
60
|
'&.is-last-item': {
|
|
61
61
|
borderBottomLeftRadius: borderRadius,
|
|
62
62
|
borderBottomRightRadius: borderRadius,
|
|
63
|
-
'&.is-hovered, &.is-expanded': {
|
|
63
|
+
'&.is-expanded.is-hovered, &.is-expanded.is-expanded': {
|
|
64
64
|
borderBottomLeftRadius: '0',
|
|
65
65
|
borderBottomRightRadius: '0'
|
|
66
66
|
}
|