@pingux/astro 2.210.6-alpha.0 → 2.212.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.
Files changed (72) hide show
  1. package/lib/cjs/components/ComboBoxField/ComboBoxField.js +2 -1
  2. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.d.ts +14 -0
  3. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.js +70 -0
  4. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.mdx +69 -0
  5. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.stories.js +109 -0
  6. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.styles.d.ts +18 -0
  7. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.styles.js +28 -0
  8. package/lib/cjs/components/LabelValuePairs/LabelValuePairs.test.js +315 -0
  9. package/lib/cjs/components/LabelValuePairs/LabelValuePairsLabel.d.ts +4 -0
  10. package/lib/cjs/components/LabelValuePairs/LabelValuePairsLabel.js +47 -0
  11. package/lib/cjs/components/LabelValuePairs/LabelValuePairsRow.d.ts +3 -0
  12. package/lib/cjs/components/LabelValuePairs/LabelValuePairsRow.js +40 -0
  13. package/lib/cjs/components/LabelValuePairs/LabelValuePairsSubvalue.d.ts +4 -0
  14. package/lib/cjs/components/LabelValuePairs/LabelValuePairsSubvalue.js +29 -0
  15. package/lib/cjs/components/LabelValuePairs/LabelValuePairsValue.d.ts +4 -0
  16. package/lib/cjs/components/LabelValuePairs/LabelValuePairsValue.js +120 -0
  17. package/lib/cjs/components/LabelValuePairs/constants.d.ts +5 -0
  18. package/lib/cjs/components/LabelValuePairs/constants.js +12 -0
  19. package/lib/cjs/components/LabelValuePairs/index.d.ts +2 -0
  20. package/lib/cjs/components/LabelValuePairs/index.js +62 -0
  21. package/lib/cjs/components/LabelValuePairs/labelValuePairsAttributes.d.ts +74 -0
  22. package/lib/cjs/components/LabelValuePairs/labelValuePairsAttributes.js +20 -0
  23. package/lib/cjs/components/Popover/Popover.js +3 -2
  24. package/lib/cjs/components/Popover/Popover.test.js +8 -0
  25. package/lib/cjs/components/PopoverMenu/PopoverMenu.js +2 -1
  26. package/lib/cjs/components/SearchField/SearchAutoComplete.js +2 -1
  27. package/lib/cjs/hooks/useSelectField/useSelectField.js +1 -1
  28. package/lib/cjs/index.d.ts +3 -0
  29. package/lib/cjs/index.js +79 -52
  30. package/lib/cjs/recipes/ListAndPanel.stories.js +1 -16
  31. package/lib/cjs/recipes/PanelContent.stories.js +11 -47
  32. package/lib/cjs/recipes/items.js +38 -30
  33. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
  34. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +17 -0
  35. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +17 -0
  36. package/lib/cjs/styles/themes/next-gen/variants/variants.js +2 -0
  37. package/lib/cjs/styles/variants/variants.js +2 -0
  38. package/lib/cjs/types/index.d.ts +1 -0
  39. package/lib/cjs/types/index.js +46 -35
  40. package/lib/cjs/types/labelValuePairs.d.ts +35 -0
  41. package/lib/cjs/types/labelValuePairs.js +6 -0
  42. package/lib/cjs/utils/designUtils/figmaLinks.d.ts +3 -0
  43. package/lib/cjs/utils/designUtils/figmaLinks.js +3 -0
  44. package/lib/components/ComboBoxField/ComboBoxField.js +2 -1
  45. package/lib/components/LabelValuePairs/LabelValuePairs.js +35 -0
  46. package/lib/components/LabelValuePairs/LabelValuePairs.mdx +69 -0
  47. package/lib/components/LabelValuePairs/LabelValuePairs.stories.js +102 -0
  48. package/lib/components/LabelValuePairs/LabelValuePairs.styles.js +21 -0
  49. package/lib/components/LabelValuePairs/LabelValuePairs.test.js +309 -0
  50. package/lib/components/LabelValuePairs/LabelValuePairsLabel.js +35 -0
  51. package/lib/components/LabelValuePairs/LabelValuePairsRow.js +28 -0
  52. package/lib/components/LabelValuePairs/LabelValuePairsSubvalue.js +17 -0
  53. package/lib/components/LabelValuePairs/LabelValuePairsValue.js +108 -0
  54. package/lib/components/LabelValuePairs/constants.js +5 -0
  55. package/lib/components/LabelValuePairs/index.js +2 -0
  56. package/lib/components/LabelValuePairs/labelValuePairsAttributes.js +13 -0
  57. package/lib/components/Popover/Popover.js +3 -2
  58. package/lib/components/Popover/Popover.test.js +8 -0
  59. package/lib/components/PopoverMenu/PopoverMenu.js +2 -1
  60. package/lib/components/SearchField/SearchAutoComplete.js +2 -1
  61. package/lib/hooks/useSelectField/useSelectField.js +1 -1
  62. package/lib/index.js +3 -0
  63. package/lib/recipes/ListAndPanel.stories.js +3 -18
  64. package/lib/recipes/PanelContent.stories.js +11 -47
  65. package/lib/recipes/items.js +39 -31
  66. package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
  67. package/lib/styles/themes/next-gen/variants/variants.js +2 -0
  68. package/lib/styles/variants/variants.js +2 -0
  69. package/lib/types/index.js +1 -0
  70. package/lib/types/labelValuePairs.js +1 -0
  71. package/lib/utils/designUtils/figmaLinks.js +3 -0
  72. package/package.json +1 -1
@@ -0,0 +1,35 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
3
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["children", "helpHint", "containerProps", "textProps", "helpHintProps"];
5
+ import React, { forwardRef } from 'react';
6
+ import { Box, HelpHint, Text } from '../../index';
7
+ import { jsx as ___EmotionJSX } from "@emotion/react";
8
+ var displayName = 'PairLabel';
9
+ var PairLabel = /*#__PURE__*/forwardRef(function (props, ref) {
10
+ var children = props.children,
11
+ helpHint = props.helpHint,
12
+ containerProps = props.containerProps,
13
+ textProps = props.textProps,
14
+ helpHintProps = props.helpHintProps,
15
+ others = _objectWithoutProperties(props, _excluded);
16
+ var _React$Children$toArr = React.Children.toArray(children),
17
+ _React$Children$toArr2 = _slicedToArray(_React$Children$toArr, 2),
18
+ label = _React$Children$toArr2[0],
19
+ icon = _React$Children$toArr2[1];
20
+ return ___EmotionJSX(Box, _extends({
21
+ ref: ref,
22
+ isRow: true,
23
+ alignItems: "center",
24
+ gap: "sm"
25
+ }, others, containerProps), ___EmotionJSX(Text, _extends({
26
+ variant: "h4",
27
+ as: "h4"
28
+ }, textProps), label), icon, helpHint && ___EmotionJSX(HelpHint, _extends({
29
+ iconButtonProps: {
30
+ 'aria-label': "".concat(label, " help hint")
31
+ }
32
+ }, helpHintProps), helpHint));
33
+ });
34
+ PairLabel.displayName = displayName;
35
+ export default PairLabel;
@@ -0,0 +1,28 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["children"];
4
+ import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
5
+ import React, { forwardRef } from 'react';
6
+ import { Box } from '../../index';
7
+ import PairValue from './LabelValuePairsValue';
8
+ import { jsx as ___EmotionJSX } from "@emotion/react";
9
+ var displayName = 'Pair';
10
+ var Pair = /*#__PURE__*/forwardRef(function (props, ref) {
11
+ var children = props.children,
12
+ others = _objectWithoutProperties(props, _excluded);
13
+ var childrenArray = React.Children.toArray(children);
14
+ var valueChild = _findInstanceProperty(childrenArray).call(childrenArray, function (child) {
15
+ return /*#__PURE__*/React.isValidElement(child) && child.type === PairValue;
16
+ });
17
+ var isLoading = valueChild === null || valueChild === void 0 ? void 0 : valueChild.props.isLoading;
18
+ var hasValueContent = Boolean(valueChild === null || valueChild === void 0 ? void 0 : valueChild.props.children);
19
+ if (!hasValueContent && !isLoading) {
20
+ return null;
21
+ }
22
+ return ___EmotionJSX(Box, _extends({
23
+ ref: ref,
24
+ variant: "labelValuePairs.fieldItem"
25
+ }, others), children);
26
+ });
27
+ Pair.displayName = displayName;
28
+ export default Pair;
@@ -0,0 +1,17 @@
1
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["children"];
4
+ import React, { forwardRef } from 'react';
5
+ import { Text } from '../../index';
6
+ import { jsx as ___EmotionJSX } from "@emotion/react";
7
+ var displayName = 'PairSubvalue';
8
+ var PairSubvalue = /*#__PURE__*/forwardRef(function (props, ref) {
9
+ var children = props.children,
10
+ others = _objectWithoutProperties(props, _excluded);
11
+ return ___EmotionJSX(Text, _extends({
12
+ ref: ref,
13
+ variant: "variants.labelValuePairs.subLabel"
14
+ }, others), children);
15
+ });
16
+ PairSubvalue.displayName = displayName;
17
+ export default PairSubvalue;
@@ -0,0 +1,108 @@
1
+ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
2
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
3
+ import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
4
+ var _excluded = ["children"],
5
+ _excluded2 = ["children", "valueType", "isLoading", "containerProps", "textProps", "iconProps", "iconButtonProps", "skeletonProps"];
6
+ import _repeatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/repeat";
7
+ import React, { forwardRef, useState } from 'react';
8
+ import EyeOffIcon from '@pingux/mdi-react/EyeOffOutlineIcon';
9
+ import EyeIcon from '@pingux/mdi-react/EyeOutlineIcon';
10
+ import { Box, CopyText, Icon, IconButton, Skeleton, Text } from '../../index';
11
+ import { ValueTypes } from './constants';
12
+ import { jsx as ___EmotionJSX } from "@emotion/react";
13
+ var displayName = 'PairValue';
14
+ var MASKED_ARIA_LABELS = {
15
+ SHOW: 'Show content',
16
+ HIDE: 'Hide content'
17
+ };
18
+ var ValueText = function ValueText(_ref) {
19
+ var children = _ref.children,
20
+ others = _objectWithoutProperties(_ref, _excluded);
21
+ return ___EmotionJSX(Text, _extends({
22
+ variant: "variants.labelValuePairs.value"
23
+ }, others), children);
24
+ };
25
+ var MaskedValue = function MaskedValue(_ref2) {
26
+ var _context;
27
+ var value = _ref2.value,
28
+ containerProps = _ref2.containerProps,
29
+ textProps = _ref2.textProps,
30
+ iconProps = _ref2.iconProps,
31
+ iconButtonProps = _ref2.iconButtonProps;
32
+ var _useState = useState(false),
33
+ _useState2 = _slicedToArray(_useState, 2),
34
+ isRevealed = _useState2[0],
35
+ setIsRevealed = _useState2[1];
36
+ var bullets = _repeatInstanceProperty(_context = '•').call(_context, value.length);
37
+ return ___EmotionJSX(Box, _extends({
38
+ isRow: true,
39
+ alignItems: "center",
40
+ gap: "sm"
41
+ }, containerProps), ___EmotionJSX(ValueText, _extends({
42
+ sx: isRevealed ? undefined : {
43
+ letterSpacing: '0.25em'
44
+ }
45
+ }, textProps), isRevealed ? value : bullets), ___EmotionJSX(IconButton, _extends({
46
+ "aria-label": isRevealed ? MASKED_ARIA_LABELS.HIDE : MASKED_ARIA_LABELS.SHOW,
47
+ onPress: function onPress() {
48
+ return setIsRevealed(function (prev) {
49
+ return !prev;
50
+ });
51
+ },
52
+ sx: {
53
+ width: 'fit-content',
54
+ marginLeft: 'sm',
55
+ alignSelf: 'auto'
56
+ }
57
+ }, iconButtonProps), ___EmotionJSX(Icon, _extends({
58
+ "aria-hidden": "true",
59
+ title: {
60
+ name: isRevealed ? 'Eye Icon' : 'Eye Off Icon'
61
+ },
62
+ icon: isRevealed ? EyeIcon : EyeOffIcon,
63
+ size: "sm"
64
+ }, iconProps))));
65
+ };
66
+ var PairValue = /*#__PURE__*/forwardRef(function (props, ref) {
67
+ var children = props.children,
68
+ valueType = props.valueType,
69
+ isLoading = props.isLoading,
70
+ containerProps = props.containerProps,
71
+ textProps = props.textProps,
72
+ iconProps = props.iconProps,
73
+ iconButtonProps = props.iconButtonProps,
74
+ skeletonProps = props.skeletonProps,
75
+ others = _objectWithoutProperties(props, _excluded2);
76
+ if (isLoading) {
77
+ return ___EmotionJSX(Box, _extends({
78
+ ref: ref,
79
+ role: "alert",
80
+ "aria-live": "assertive",
81
+ "aria-label": "Loading"
82
+ }, others, containerProps), ___EmotionJSX(Skeleton, _extends({
83
+ variant: "text"
84
+ }, skeletonProps)));
85
+ }
86
+ switch (valueType) {
87
+ case ValueTypes.COPYABLE:
88
+ return ___EmotionJSX(CopyText, _extends({
89
+ ref: ref
90
+ }, others, containerProps), ___EmotionJSX(ValueText, textProps, children));
91
+ case ValueTypes.MASKED:
92
+ return ___EmotionJSX(MaskedValue, {
93
+ value: String(children),
94
+ containerProps: containerProps,
95
+ textProps: textProps,
96
+ iconProps: iconProps,
97
+ iconButtonProps: iconButtonProps
98
+ });
99
+ case ValueTypes.ELEMENT:
100
+ return children;
101
+ default:
102
+ return ___EmotionJSX(ValueText, _extends({
103
+ ref: ref
104
+ }, others, textProps), children);
105
+ }
106
+ });
107
+ PairValue.displayName = displayName;
108
+ export default PairValue;
@@ -0,0 +1,5 @@
1
+ export var ValueTypes = {
2
+ COPYABLE: 'COPYABLE',
3
+ MASKED: 'MASKED',
4
+ ELEMENT: 'ELEMENT'
5
+ };
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export { default, Pair, PairLabel, PairSubvalue, PairValue } from './LabelValuePairs';
@@ -0,0 +1,13 @@
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(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; }
11
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
12
+ import { ariaAttributeBaseArgTypes } from '../../utils/docUtils/ariaAttributes';
13
+ export var labelValuePairsArgTypes = _objectSpread({}, ariaAttributeBaseArgTypes);
@@ -9,7 +9,7 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
9
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
10
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
11
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
12
- var _excluded = ["arrowProps", "arrowCrossOffset", "direction", "popoverRef", "state", "children", "className", "isNonModal", "hasNoArrow", "width", "isDismissable", "isNotClosedOnBlur"];
12
+ var _excluded = ["arrowProps", "arrowCrossOffset", "direction", "popoverRef", "state", "children", "className", "isNonModal", "hasNoArrow", "width", "isDismissable", "isNotClosedOnBlur", "offset"];
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 _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
15
15
  import * as React from 'react';
@@ -33,9 +33,10 @@ var Popover = function Popover(props) {
33
33
  width = props.width,
34
34
  isDismissable = props.isDismissable,
35
35
  isNotClosedOnBlur = props.isNotClosedOnBlur,
36
+ offset = props.offset,
36
37
  others = _objectWithoutProperties(props, _excluded);
37
38
  var _usePopover = usePopover(_objectSpread(_objectSpread({}, props), {}, {
38
- offset: 5,
39
+ offset: offset !== null && offset !== void 0 ? offset : 0,
39
40
  popoverRef: popoverRef
40
41
  }), state),
41
42
  popoverProps = _usePopover.popoverProps,
@@ -64,4 +64,12 @@ describe('Popover', function () {
64
64
  expect((_screen$getByTestId$p = screen.getByTestId('popover').parentElement) === null || _screen$getByTestId$p === void 0 ? void 0 : _screen$getByTestId$p.querySelector('div')).toBeTruthy();
65
65
  expect(screen.getByTestId('popover')).toBeInTheDocument();
66
66
  });
67
+ test('accepts an offset prop and renders children correctly', function () {
68
+ getComponent({
69
+ state: mockState(true),
70
+ offset: 0
71
+ });
72
+ expect(screen.getByTestId('popover')).toBeInTheDocument();
73
+ expect(screen.getByTestId('popover-children')).toBeInTheDocument();
74
+ });
67
75
  });
@@ -79,7 +79,8 @@ var PopoverMenu = /*#__PURE__*/forwardRef(function (props, ref) {
79
79
  role: "presentation",
80
80
  triggerRef: triggerRef,
81
81
  state: state,
82
- direction: direction
82
+ direction: direction,
83
+ offset: 5
83
84
  }), contents))));
84
85
  });
85
86
  PopoverMenu.defaultProps = {
@@ -147,7 +147,8 @@ export var SearchAutoComplete = /*#__PURE__*/forwardRef(function (props, ref) {
147
147
  triggerRef: outerRef,
148
148
  state: comboBoxState,
149
149
  isNonModal: true,
150
- width: popoverWidth
150
+ width: popoverWidth,
151
+ offset: 5
151
152
  }, ___EmotionJSX(ScrollBox, {
152
153
  maxHeight: 200
153
154
  }, ___EmotionJSX(FocusScope, {
@@ -128,7 +128,7 @@ var useSelectField = function useSelectField(props, ref) {
128
128
  shouldFlip: !isNotFlippable,
129
129
  isOpen: state.isOpen,
130
130
  onClose: state.close,
131
- offset: 5
131
+ offset: 1
132
132
  }),
133
133
  overlayProps = _useOverlayPosition.overlayProps,
134
134
  placement = _useOverlayPosition.placement,
package/lib/index.js CHANGED
@@ -109,6 +109,8 @@ export { default as Input } from './components/Input';
109
109
  export * from './components/Input';
110
110
  export { default as Label } from './components/Label';
111
111
  export * from './components/Label';
112
+ export { default as LabelValuePairs } from './components/LabelValuePairs';
113
+ export * from './components/LabelValuePairs';
112
114
  export { default as Link } from './components/Link';
113
115
  export * from './components/Link';
114
116
  export { default as LinkSelectField } from './components/LinkSelectField';
@@ -224,6 +226,7 @@ export * from './components/TextField';
224
226
  export { default as TimeField } from './components/TimeField';
225
227
  export * from './components/TimeField';
226
228
  export { default as TimeZonePicker } from './components/TimeZonePicker';
229
+ export { default as timezones } from './components/TimeZonePicker/timezones';
227
230
  export { default as TooltipTrigger } from './components/TooltipTrigger';
228
231
  export * from './components/TooltipTrigger';
229
232
  export { default as TreeView } from './components/TreeView';
@@ -11,11 +11,11 @@ import AccountIcon from '@pingux/mdi-react/AccountIcon';
11
11
  import ChevronRightIcon from '@pingux/mdi-react/ChevronRightIcon';
12
12
  import PlusIcon from '@pingux/mdi-react/PlusIcon';
13
13
  import { useOverlappingMenuHoverState, useOverlayPanelState } from '../hooks';
14
- import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar, EditButton, Icon, IconButton, Image, ImageUploadField, Link, ListView, ListViewItem, ListViewItemMenu, ListViewItemSwitchField, OverlayPanel, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SearchField, SelectField, Separator, Tab, Tabs, Text, TextField } from '../index';
14
+ import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar, EditButton, Icon, IconButton, Image, ImageUploadField, LabelValuePairs, Link, ListView, ListViewItem, ListViewItemMenu, ListViewItemSwitchField, OverlayPanel, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SearchField, SelectField, Separator, Tab, Tabs, Text, TextField } from '../index';
15
15
  import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks';
16
16
  import UserImage from '../utils/devUtils/assets/UserImage.png';
17
17
  import { colorBlockButtons, editData, items, personalData } from './items';
18
- import { AddAttributeButton, ColorBlockButton, LabelValuePairs } from './PanelContent.stories';
18
+ import { AddAttributeButton, ColorBlockButton } from './PanelContent.stories';
19
19
  import { jsx as ___EmotionJSX } from "@emotion/react";
20
20
  export default {
21
21
  title: 'Recipes/List And Panel',
@@ -46,17 +46,6 @@ var sx = {
46
46
  top: 0,
47
47
  right: 0
48
48
  },
49
- itemLabel: {
50
- fontSize: 'sm',
51
- fontWeight: 3,
52
- lineHeight: '16px',
53
- mb: 'xs'
54
- },
55
- itemValue: {
56
- fontWeight: 0,
57
- lineHeight: '18px',
58
- mb: 'md'
59
- },
60
49
  panelHeader: {
61
50
  container: {
62
51
  bg: 'accent.99',
@@ -198,11 +187,7 @@ export var ListAndPanel = function ListAndPanel() {
198
187
  }, ___EmotionJSX(Image, {
199
188
  src: UserImage,
200
189
  alt: "user"
201
- }), ___EmotionJSX(LabelValuePairs, {
202
- fields: personalData[item].fields
203
- })) : ___EmotionJSX(LabelValuePairs, {
204
- fields: personalData[item].fields
205
- }), personalData[item].badges && ___EmotionJSX(Box, {
190
+ }), ___EmotionJSX(LabelValuePairs, null, personalData[item].rows)) : ___EmotionJSX(LabelValuePairs, null, personalData[item].rows), personalData[item].badges && ___EmotionJSX(Box, {
206
191
  isRow: true,
207
192
  gap: "sm"
208
193
  }, _mapInstanceProperty(_context3 = personalData[item].badges).call(_context3, function (badge) {
@@ -7,10 +7,9 @@ import ChevronRightIcon from '@pingux/mdi-react/ChevronRightIcon';
7
7
  import PencilIcon from '@pingux/mdi-react/PencilIcon';
8
8
  import PlusIcon from '@pingux/mdi-react/PlusIcon';
9
9
  import { useOverlayPanelState } from '../hooks';
10
- import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar, EditButton, Icon, Image, ImageUploadField, Item, NoticeIcon, OverlayPanel, OverlayProvider, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SelectField, Tab, Tabs, Text, TextField } from '../index';
10
+ import { AccordionGroup, Badge, Box, Breadcrumbs, Button, ButtonBar, EditButton, Icon, Image, ImageUploadField, Item, LabelValuePairs, OverlayPanel, OverlayProvider, PanelHeader, PanelHeaderCloseButton, PanelHeaderMenu, PanelHeaderSwitchField, SelectField, Tab, Tabs, Text, TextField } from '../index';
11
11
  import { FIGMA_LINKS } from '../utils/designUtils/figmaLinks.ts';
12
12
  import UserImage from '../utils/devUtils/assets/UserImage.png';
13
- import statuses from '../utils/devUtils/constants/statuses';
14
13
  import { colorBlockButtons, editData, personalData } from './items';
15
14
  import { jsx as ___EmotionJSX } from "@emotion/react";
16
15
  export default {
@@ -33,7 +32,8 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
33
32
  state = _useOverlayPanelState.state;
34
33
  var triggerRef = useRef();
35
34
  var personalInfo = personalData.personalInfo;
36
- var fields = personalInfo.fields;
35
+ var givenName = personalInfo.givenName,
36
+ familyName = personalInfo.familyName;
37
37
  var renderBreadcrumbs = ___EmotionJSX(Box, {
38
38
  width: "100%"
39
39
  }, ___EmotionJSX(Breadcrumbs, {
@@ -42,7 +42,7 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
42
42
  "aria-label": personalInfo.label,
43
43
  href: "https://www.pingidentity.com",
44
44
  key: personalInfo.key
45
- }, _concatInstanceProperty(_context = "".concat(fields[0].value, " ")).call(_context, fields[1].value)), ___EmotionJSX(Item, {
45
+ }, _concatInstanceProperty(_context = "".concat(givenName, " ")).call(_context, familyName)), ___EmotionJSX(Item, {
46
46
  "aria-label": "Edit",
47
47
  key: "editKey"
48
48
  }, "Edit")));
@@ -60,8 +60,8 @@ var OverlayWrapper = function OverlayWrapper(_ref) {
60
60
  } : {
61
61
  data: {
62
62
  image: image,
63
- text: _concatInstanceProperty(_context2 = "".concat(fields[0].value, " ")).call(_context2, fields[1].value),
64
- subtext: _concatInstanceProperty(_context3 = "".concat(fields[0].value.toLowerCase())).call(_context3, fields[1].value.toLowerCase())
63
+ text: _concatInstanceProperty(_context2 = "".concat(givenName, " ")).call(_context2, familyName),
64
+ subtext: _concatInstanceProperty(_context3 = "".concat(givenName.toLowerCase())).call(_context3, familyName.toLowerCase())
65
65
  }
66
66
  };
67
67
  return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(Button, {
@@ -114,11 +114,7 @@ export var DisplayPanel = function DisplayPanel() {
114
114
  }, ___EmotionJSX(Image, {
115
115
  src: UserImage,
116
116
  alt: "user"
117
- }), ___EmotionJSX(LabelValuePairs, {
118
- fields: personalData[item].fields
119
- })) : ___EmotionJSX(LabelValuePairs, {
120
- fields: personalData[item].fields
121
- }), personalData[item].badges && ___EmotionJSX(Box, {
117
+ }), ___EmotionJSX(LabelValuePairs, null, personalData[item].rows)) : ___EmotionJSX(LabelValuePairs, null, personalData[item].rows), personalData[item].badges && ___EmotionJSX(Box, {
122
118
  isRow: true,
123
119
  gap: "sm"
124
120
  }, _mapInstanceProperty(_context6 = personalData[item].badges).call(_context6, function (badge) {
@@ -208,38 +204,6 @@ export var ColorBlockButton = function ColorBlockButton(_ref2) {
208
204
  }
209
205
  }));
210
206
  };
211
- export var LabelValuePairs = function LabelValuePairs(_ref3) {
212
- var _ref3$fields = _ref3.fields,
213
- fields = _ref3$fields === void 0 ? personalData.contactInfo.fields : _ref3$fields;
214
- return ___EmotionJSX(Box, {
215
- gap: "md",
216
- maxWidth: "675px"
217
- }, _mapInstanceProperty(fields).call(fields, function (_ref4) {
218
- var label = _ref4.label,
219
- value = _ref4.value,
220
- isVerified = _ref4.isVerified;
221
- return ___EmotionJSX(Box, {
222
- gap: "xs",
223
- key: "".concat(label, "-key")
224
- }, ___EmotionJSX(Text, {
225
- variant: "h4"
226
- }, label), ___EmotionJSX(Box, {
227
- isRow: true,
228
- gap: "md"
229
- }, ___EmotionJSX(Text, null, value), isVerified && ___EmotionJSX(Box, {
230
- isRow: true,
231
- gap: "xs"
232
- }, ___EmotionJSX(NoticeIcon, {
233
- color: "success.dark",
234
- status: statuses.SUCCESS,
235
- "aria-label": "".concat(statuses.SUCCESS, "-icon"),
236
- size: "xs"
237
- }), ___EmotionJSX(Text, {
238
- variant: "listSubtitle",
239
- color: "success.dark"
240
- }, "Verified"))));
241
- }));
242
- };
243
207
  export var EditPanel = function EditPanel() {
244
208
  var _context7, _context8, _context9;
245
209
  return ___EmotionJSX(OverlayWrapper, {
@@ -281,10 +245,10 @@ export var EditPanel = function EditPanel() {
281
245
  previewHeight: 40,
282
246
  previewWidth: 40,
283
247
  previewImage: UserImage
284
- }), _mapInstanceProperty(_context0 = editData[item].fields).call(_context0, function (_ref5) {
285
- var label = _ref5.label,
286
- value = _ref5.value,
287
- slot = _ref5.slot;
248
+ }), _mapInstanceProperty(_context0 = editData[item].fields).call(_context0, function (_ref3) {
249
+ var label = _ref3.label,
250
+ value = _ref3.value,
251
+ slot = _ref3.slot;
288
252
  return ___EmotionJSX(Box, {
289
253
  key: "".concat(label, "-key")
290
254
  }, ___EmotionJSX(TextField, {
@@ -1,9 +1,28 @@
1
1
  import React from 'react';
2
2
  import AccountIcon from '@pingux/mdi-react/AccountIcon';
3
3
  import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
4
- import { CheckboxField } from '../index';
4
+ import { Box, CheckboxField, NoticeIcon, Pair, PairLabel, PairValue, Text, ValueTypes } from '../index';
5
5
  import UserImage from '../utils/devUtils/assets/UserImage.png';
6
+ import statuses from '../utils/devUtils/constants/statuses';
6
7
  import { jsx as ___EmotionJSX } from "@emotion/react";
8
+ var VerifiedValue = function VerifiedValue(_ref) {
9
+ var value = _ref.value;
10
+ return ___EmotionJSX(Box, {
11
+ isRow: true,
12
+ gap: "md"
13
+ }, ___EmotionJSX(Text, null, value), ___EmotionJSX(Box, {
14
+ isRow: true,
15
+ gap: "xs"
16
+ }, ___EmotionJSX(NoticeIcon, {
17
+ color: "success.dark",
18
+ status: statuses.SUCCESS,
19
+ "aria-label": "".concat(statuses.SUCCESS, "-icon"),
20
+ size: "xs"
21
+ }), ___EmotionJSX(Text, {
22
+ variant: "listSubtitle",
23
+ color: "success.dark"
24
+ }, "Verified")));
25
+ };
7
26
  export var items = [{
8
27
  email: 'dburkitt5@columbia.edu',
9
28
  firstName: 'Nicola',
@@ -70,58 +89,47 @@ export var items = [{
70
89
  lastName: 'Idel',
71
90
  icon: AccountIcon
72
91
  }];
92
+ var H4Label = function H4Label(_ref2) {
93
+ var children = _ref2.children;
94
+ return ___EmotionJSX(PairLabel, {
95
+ textProps: {
96
+ as: 'h3'
97
+ }
98
+ }, children);
99
+ };
73
100
  export var personalData = {
74
101
  contactInfo: {
75
102
  label: 'Contact Info',
76
103
  key: 'contactInfoKey',
77
- fields: [{
78
- label: 'Email',
79
- value: 'ednepomuceno@pingidentity.com',
80
- isVerified: true
81
- }, {
82
- label: 'Primary',
83
- value: '+1 767-777-3333'
84
- }, {
85
- label: 'Address',
86
- value: '1234 W California St, Denver CO 80101'
87
- }]
104
+ rows: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Email"), ___EmotionJSX(PairValue, {
105
+ valueType: ValueTypes.ELEMENT
106
+ }, ___EmotionJSX(VerifiedValue, {
107
+ value: "ednepomuceno@pingidentity.com"
108
+ }))), ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Primary"), ___EmotionJSX(PairValue, null, "+1 767-777-3333")), ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Address"), ___EmotionJSX(PairValue, null, "1234 W California St, Denver CO 80101")))
88
109
  },
89
110
  personalInfo: {
90
111
  label: 'Personal Info',
91
112
  key: 'personalInfoKey',
92
113
  image: UserImage,
93
- fields: [{
94
- label: 'Given Name',
95
- value: 'Ed'
96
- }, {
97
- label: 'Famile Name',
98
- value: 'Nepomuceno'
99
- }]
114
+ givenName: 'Ed',
115
+ familyName: 'Nepomuceno',
116
+ rows: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Given Name"), ___EmotionJSX(PairValue, null, "Ed")), ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Famile Name"), ___EmotionJSX(PairValue, null, "Nepomuceno")))
100
117
  },
101
118
  companyInfo: {
102
119
  label: 'Company Info',
103
120
  key: 'companyInfoKey',
104
- fields: [{
105
- label: 'Tile',
106
- value: 'Interaction Designer'
107
- }]
121
+ rows: ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Tile"), ___EmotionJSX(PairValue, null, "Interaction Designer"))
108
122
  },
109
123
  customAttributes: {
110
124
  label: 'Custom Attributes',
111
125
  key: 'customAttributesKey',
112
- fields: [{
113
- label: 'T-Shirt Size',
114
- value: 'Large'
115
- }, {
116
- label: 'Example Multi-Value Attribute',
117
- value: 'value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,value,'
118
- }]
126
+ rows: ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "T-Shirt Size"), ___EmotionJSX(PairValue, null, "Large")), ___EmotionJSX(Pair, null, ___EmotionJSX(H4Label, null, "Example Multi-Value Attribute"), ___EmotionJSX(PairValue, null, "value,value,value,value,value,value,value,value,value,value, value,value,value,value,value,value,value,value,value,")))
119
127
  },
120
128
  jsonAttributes: {
121
129
  label: 'JSON Attributes',
122
130
  key: 'jsonAttributesKey',
123
131
  badges: ['Address', 'Contact', 'Another Json'],
124
- fields: []
132
+ rows: null
125
133
  }
126
134
  };
127
135
  export var colorBlockButtons = [{
@@ -1,4 +1,4 @@
1
- var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'MaterialSymbolIcon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavList', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PhoneNumberField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RangeCalendar', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar', 'Box', 'TimeField'];
1
+ var nextGenConvertedComponents = ['AccordionGridGroup', 'AccordionGroup', 'ArrayField', 'AstroProvider', 'Avatar', 'Badge', 'Base Components', 'Breadcrumbs', 'Button', 'ButtonBar', 'Callout', 'Card', 'CheckboxField', 'CodeView', 'ColorField', 'ComboBoxField', 'CopyText', 'DataTable', 'EnvironmentBreadcrumb', 'GridList', 'HelpHint', 'Icon', 'MaterialSymbolIcon', 'IconBadge', 'IconButton', 'IconWrapper', 'ImageUploadField', 'Loader', 'Link', 'LinkSelectField', 'ListView', 'ListViewItem', 'Message', 'Messages', 'Modal', 'MultiValuesField', 'MultivaluesField', 'NavBar', 'NavList', 'NavigationHeader', 'NextGen ListViewItem', 'NumberField', 'OverlayPanel', 'PageHeader', 'Pagination', 'PanelHeader', 'PasswordField', 'PhoneNumberField', 'PopoverMenu', 'ProgressBar', 'RadioField', 'RadioGroupField', 'RangeCalendar', 'RequirementsList', 'RockerButtonGroup', 'SearchField', 'SelectField', 'Skeleton', 'SliderField', 'Stepper', 'Sticker Sheet', 'SwitchField', 'StatusIcon', 'Table', 'TableBase', 'Tabs', 'Text', 'TextAreaField', 'TextField', 'TooltipTrigger', 'ArrayField', 'ColorField', 'LinkSelectField', 'NumberField', 'SwitchField', 'Base Components', 'SliderField', 'ServerErrorBoundary', 'Avatar', 'Box', 'TimeField', 'LabelValuePairs'];
2
2
  export var componentSpecificNextGenBlacklist = {
3
3
  AstroProvider: ['Default', 'With Custom Theme Override'],
4
4
  Messages: ['Customization'],
@@ -11,6 +11,7 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  import { astroTokens } from '@pingux/onyx-tokens';
13
13
  import attachment from '../../../../components/AIComponents/Attachment/Attachment.styles';
14
+ import labelValuePairs from '../../../../components/LabelValuePairs/LabelValuePairs.styles';
14
15
  import skeleton from '../../../../components/Skeleton/Skeleton.styles';
15
16
  import codeView from '../codeView/codeView';
16
17
  import sizes from '../sizes';
@@ -469,6 +470,7 @@ export default {
469
470
  footer: footer,
470
471
  helpHint: helpHint,
471
472
  iconWrapper: iconWrapper,
473
+ labelValuePairs: labelValuePairs,
472
474
  listBox: listBox,
473
475
  listView: listView,
474
476
  listViewItem: listViewItem,
@@ -29,6 +29,7 @@ import footer from '../../components/Footer/Footer.styles';
29
29
  import gridList from '../../components/GridList/GridList.styles';
30
30
  import helpHint from '../../components/HelpHint/HelpHint.styles';
31
31
  import imageUpload from '../../components/ImageUploadField/imageUpload';
32
+ import labelValuePairs from '../../components/LabelValuePairs/LabelValuePairs.styles';
32
33
  import listBox from '../../components/ListBox/ListBox.styles';
33
34
  import listItem from '../../components/ListItem/ListItem.styles';
34
35
  import listView from '../../components/ListView/ListView.styles';
@@ -85,6 +86,7 @@ export default _objectSpread(_objectSpread({
85
86
  gridList: gridList,
86
87
  helpHint: helpHint,
87
88
  imageUpload: imageUpload,
89
+ labelValuePairs: labelValuePairs,
88
90
  listBox: listBox,
89
91
  listItem: listItem,
90
92
  listView: listView,
@@ -29,6 +29,7 @@ export * from './iconWrapper';
29
29
  export * from './input';
30
30
  export * from './item';
31
31
  export * from './label';
32
+ export * from './labelValuePairs';
32
33
  export * from './link';
33
34
  export * from './listBox';
34
35
  export * from './listItem';
@@ -0,0 +1 @@
1
+ export {};
@@ -116,6 +116,9 @@ export var FIGMA_LINKS = {
116
116
  inlineEditing: {
117
117
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=5244-14864&mode=design&t=1pPbrQvGkdMYBNqk-0'
118
118
  },
119
+ labelValuePairs: {
120
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=43431%3A4249&mode=dev'
121
+ },
119
122
  link: {
120
123
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?type=design&node-id=8708-29543&t=8Wwd3tIBh3GEjCJB-0'
121
124
  },