@pingux/astro 2.54.0-alpha.4 → 2.55.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/ArrayField/ArrayField.js +2 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.test.js +2 -3
- package/lib/cjs/components/Button/Button.js +4 -2
- package/lib/cjs/components/CheckboxField/CheckboxField.js +4 -2
- package/lib/cjs/components/ColorField/ColorField.js +4 -2
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +4 -2
- package/lib/cjs/components/DatePicker/DatePicker.js +4 -2
- package/lib/cjs/components/FileInputField/FileInputField.js +4 -2
- package/lib/cjs/components/HelpHint/HelpHint.stories.js +7 -7
- package/lib/cjs/components/IconButton/IconButton.js +4 -2
- package/lib/cjs/components/IconButton/IconButton.styles.d.ts +72 -1
- package/lib/cjs/components/ImageUploadField/ImageUploadField.js +4 -2
- package/lib/cjs/components/Input/Input.js +7 -6
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +4 -2
- package/lib/cjs/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/cjs/components/Messages/Message.d.ts +9 -0
- package/lib/cjs/components/Messages/Message.js +16 -46
- package/lib/cjs/components/Messages/Message.styles.d.ts +151 -0
- package/lib/cjs/components/Messages/Messages.d.ts +4 -0
- package/lib/cjs/components/Messages/Messages.js +2 -15
- package/lib/cjs/components/Messages/Messages.stories.d.ts +128 -0
- package/lib/cjs/components/Messages/Messages.stories.js +96 -16
- package/lib/cjs/components/Messages/Messages.test.d.ts +1 -0
- package/lib/cjs/components/Messages/Messages.test.js +9 -9
- package/lib/cjs/components/Messages/index.d.ts +3 -0
- package/lib/cjs/components/Messages/index.js +2 -3
- package/lib/cjs/components/Messages/utils/index.d.ts +2 -0
- package/lib/cjs/components/Messages/utils/messagesReducer.d.ts +107 -0
- package/lib/cjs/components/Messages/utils/messagesReducer.js +29 -15
- package/lib/cjs/components/Messages/utils/multiMessagesReducer.d.ts +83 -0
- package/lib/cjs/components/Messages/utils/multiMessagesReducer.js +20 -14
- package/lib/cjs/components/Messages/utils/tests/messagesReducer.test.d.ts +1 -0
- package/lib/cjs/components/Messages/utils/tests/messagesReducer.test.js +4 -3
- package/lib/cjs/components/Messages/utils/tests/multiMessagesReducer.test.d.ts +1 -0
- package/lib/cjs/components/Messages/utils/tests/multiMessagesReducer.test.js +3 -2
- package/lib/cjs/components/MultivaluesField/MultivaluesField.js +2 -3
- package/lib/cjs/components/NumberField/NumberField.js +2 -1
- package/lib/cjs/components/PasswordField/PasswordField.js +4 -2
- package/lib/cjs/components/RadioGroupField/RadioGroupField.js +4 -2
- package/lib/cjs/components/SearchField/SearchField.js +4 -2
- package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +2 -1
- package/lib/cjs/components/SwitchField/SwitchField.js +5 -3
- package/lib/cjs/components/Tab/Tab.js +2 -1
- package/lib/cjs/components/TextAreaField/TextAreaField.js +4 -2
- package/lib/cjs/components/TextField/TextField.js +4 -2
- package/lib/cjs/components/TimeZonePicker/TimeZonePicker.js +2 -1
- package/lib/cjs/recipes/ListAndPanel.stories.js +315 -115
- package/lib/cjs/recipes/PanelContent.stories.js +26 -168
- package/lib/cjs/recipes/items.js +152 -2
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +25 -14
- package/lib/cjs/types/item.d.ts +2 -0
- package/lib/cjs/types/messages.d.ts +43 -0
- package/lib/cjs/types/messages.js +6 -0
- package/lib/cjs/utils/devUtils/constants/pendoID.d.ts +3 -0
- package/lib/cjs/utils/devUtils/constants/pendoID.js +13 -0
- package/lib/components/ArrayField/ArrayField.js +2 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.js +1 -1
- package/lib/components/Breadcrumbs/Breadcrumbs.test.js +2 -3
- package/lib/components/Button/Button.js +4 -2
- package/lib/components/CheckboxField/CheckboxField.js +4 -2
- package/lib/components/ColorField/ColorField.js +4 -2
- package/lib/components/ComboBoxField/ComboBoxField.js +4 -2
- package/lib/components/DatePicker/DatePicker.js +4 -2
- package/lib/components/FileInputField/FileInputField.js +4 -2
- package/lib/components/HelpHint/HelpHint.stories.js +7 -7
- package/lib/components/IconButton/IconButton.js +4 -2
- package/lib/components/ImageUploadField/ImageUploadField.js +4 -2
- package/lib/components/Input/Input.js +6 -5
- package/lib/components/LinkSelectField/LinkSelectField.js +4 -2
- package/lib/components/ListViewItem/ListViewItem.js +4 -2
- package/lib/components/Messages/Message.js +14 -46
- package/lib/components/Messages/Messages.js +2 -15
- package/lib/components/Messages/Messages.stories.js +95 -15
- package/lib/components/Messages/Messages.test.js +9 -9
- package/lib/components/Messages/index.js +1 -1
- package/lib/components/Messages/utils/messagesReducer.js +27 -13
- package/lib/components/Messages/utils/multiMessagesReducer.js +20 -10
- package/lib/components/Messages/utils/tests/messagesReducer.test.js +4 -3
- package/lib/components/Messages/utils/tests/multiMessagesReducer.test.js +9 -8
- package/lib/components/MultivaluesField/MultivaluesField.js +3 -4
- package/lib/components/NumberField/NumberField.js +2 -1
- package/lib/components/PasswordField/PasswordField.js +4 -2
- package/lib/components/RadioGroupField/RadioGroupField.js +4 -2
- package/lib/components/SearchField/SearchField.js +4 -2
- package/lib/components/SelectFieldBase/SelectFieldBase.js +2 -1
- package/lib/components/SwitchField/SwitchField.js +5 -3
- package/lib/components/Tab/Tab.js +2 -1
- package/lib/components/TextAreaField/TextAreaField.js +4 -2
- package/lib/components/TextField/TextField.js +4 -2
- package/lib/components/TimeZonePicker/TimeZonePicker.js +2 -1
- package/lib/recipes/ListAndPanel.stories.js +315 -115
- package/lib/recipes/PanelContent.stories.js +16 -158
- package/lib/recipes/items.js +148 -1
- package/lib/types/index.js +1 -0
- package/lib/types/messages.js +1 -0
- package/lib/utils/devUtils/constants/pendoID.js +5 -0
- package/package.json +1 -1
- package/lib/cjs/components/Messages/Messages.reducer.js +0 -51
- package/lib/components/Messages/Messages.reducer.js +0 -41
@@ -21,6 +21,7 @@ import { mergeProps, useLabel } from 'react-aria';
|
|
21
21
|
import PropTypes from 'prop-types';
|
22
22
|
import { v4 as uuid } from 'uuid';
|
23
23
|
import { Box, Button, FieldHelperText, Label, Text } from '../..';
|
24
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
24
25
|
import statuses from '../../utils/devUtils/constants/statuses';
|
25
26
|
import isValidPositiveInt from '../../utils/devUtils/props/isValidPositiveInt';
|
26
27
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
@@ -119,7 +120,7 @@ var ArrayField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
119
120
|
var _getAriaAttributeProp = getAriaAttributeProps(others),
|
120
121
|
ariaProps = _getAriaAttributeProp.ariaProps,
|
121
122
|
nonAriaProps = _getAriaAttributeProp.nonAriaProps;
|
122
|
-
return ___EmotionJSX(Box, _extends({}, nonAriaProps, {
|
123
|
+
return ___EmotionJSX(Box, _extends({}, getPendoID('ArrayField'), nonAriaProps, {
|
123
124
|
ref: ref
|
124
125
|
}), ___EmotionJSX(Label, _extends({}, raLabelProps, mergeProps(labelProps, raLabelProps, {
|
125
126
|
children: label
|
@@ -26,7 +26,7 @@ var Breadcrumbs = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
26
|
var breadcrumbsRef = useLocalOrForwardRef(ref);
|
27
27
|
usePropWarning(props, 'disabled', 'isDisabled');
|
28
28
|
var createBreadcrumb = useCallback(function (child, idx) {
|
29
|
-
var isCurrentItem =
|
29
|
+
var isCurrentItem = _Array$isArray(filteredChildren) && filteredChildren.length > 1 ? idx === React.Children.toArray(children).length - 1 : true;
|
30
30
|
return ___EmotionJSX(React.Fragment, {
|
31
31
|
key: "li-".concat(child.key)
|
32
32
|
}, ___EmotionJSX(BreadcrumbItem, _extends({
|
@@ -51,11 +51,10 @@ test('should render nodes from the children', function () {
|
|
51
51
|
test('should render correct amount of icons', function () {
|
52
52
|
getComponent({
|
53
53
|
iconProps: {
|
54
|
-
'data-testid': testIconId
|
55
|
-
icon: ChevronRightIcon
|
54
|
+
'data-testid': testIconId
|
56
55
|
}
|
57
56
|
});
|
58
|
-
expect(screen.getAllByTestId(testIconId).length).toBe(testItemsArr.length -
|
57
|
+
expect(screen.getAllByTestId(testIconId).length).toBe(testItemsArr.length - 1);
|
59
58
|
});
|
60
59
|
test('breadcrumbItem should render breadcrumbItem as a Text component when appropriate elementType passed', function () {
|
61
60
|
getComponent({}, {
|
@@ -17,8 +17,10 @@ import { mergeProps, useButton, useFocusRing } from 'react-aria';
|
|
17
17
|
import { Pressable, useHover, usePress } from '@react-aria/interactions';
|
18
18
|
import { Button as ThemeUIButton } from 'theme-ui';
|
19
19
|
import { useAriaLabelWarning, useLocalOrForwardRef, usePropWarning, useStatusClasses } from '../../hooks';
|
20
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
20
21
|
import Loader from '../Loader';
|
21
22
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
23
|
+
var displayName = 'Button';
|
22
24
|
var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
23
25
|
var children = props.children,
|
24
26
|
className = props.className,
|
@@ -91,7 +93,7 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
91
93
|
alignItems: 'center'
|
92
94
|
} : {},
|
93
95
|
variant: variant
|
94
|
-
}, others, mergeProps(_objectSpread(_objectSpread({}, buttonProps), {}, {
|
96
|
+
}, getPendoID(displayName), others, mergeProps(_objectSpread(_objectSpread({}, buttonProps), {}, {
|
95
97
|
tabIndex: tabIndex
|
96
98
|
}), hoverProps, focusProps)), isLoading ? ___EmotionJSX("span", {
|
97
99
|
style: {
|
@@ -108,5 +110,5 @@ Button.defaultProps = {
|
|
108
110
|
isDisabled: false,
|
109
111
|
variant: 'default'
|
110
112
|
};
|
111
|
-
Button.displayName =
|
113
|
+
Button.displayName = displayName;
|
112
114
|
export default Button;
|
@@ -18,10 +18,12 @@ import PropTypes from 'prop-types';
|
|
18
18
|
import { v4 as uuid } from 'uuid';
|
19
19
|
import { Box, Checkbox, FieldHelperText, Label } from '../..';
|
20
20
|
import { useField, usePropWarning } from '../../hooks';
|
21
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
21
22
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
22
23
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
23
24
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
24
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
26
|
+
var displayName = 'CheckboxField';
|
25
27
|
var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
26
28
|
var label = props.label,
|
27
29
|
_props$controlProps = props.controlProps,
|
@@ -68,7 +70,7 @@ var CheckboxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
68
70
|
var helperTextId = useMemo(function () {
|
69
71
|
return uuid();
|
70
72
|
}, []);
|
71
|
-
return ___EmotionJSX(Box, fieldContainerProps, ___EmotionJSX(Label, _extends({
|
73
|
+
return ___EmotionJSX(Box, _extends({}, getPendoID(displayName), fieldContainerProps), ___EmotionJSX(Label, _extends({
|
72
74
|
variant: "forms.label.checkbox"
|
73
75
|
}, fieldLabelProps), ___EmotionJSX(Checkbox, _extends({
|
74
76
|
ref: checkboxRef,
|
@@ -124,5 +126,5 @@ CheckboxField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
|
124
126
|
/** Handler that is called when a key is released. */
|
125
127
|
onKeyUp: PropTypes.func
|
126
128
|
}, statusPropTypes), ariaAttributesBasePropTypes), inputFieldAttributesBasePropTypes);
|
127
|
-
CheckboxField.displayName =
|
129
|
+
CheckboxField.displayName = displayName;
|
128
130
|
export default CheckboxField;
|
@@ -20,11 +20,13 @@ import { useColorFieldState } from '@react-stately/color';
|
|
20
20
|
import PropTypes from 'prop-types';
|
21
21
|
import { Box, Button, FieldHelperText, Input, Label } from '../..';
|
22
22
|
import useField from '../../hooks/useField';
|
23
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
23
24
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
24
25
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
25
26
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
26
27
|
import PopoverContainer from '../PopoverContainer';
|
27
28
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
29
|
+
var displayName = 'ColorField';
|
28
30
|
var ColorField = /*#__PURE__*/forwardRef(function (props, ref) {
|
29
31
|
var _context;
|
30
32
|
var align = props.align,
|
@@ -91,7 +93,7 @@ var ColorField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
91
93
|
var colorValue = _ref.colorValue;
|
92
94
|
return _concatInstanceProperty(_context2 = _concatInstanceProperty(_context3 = _concatInstanceProperty(_context4 = "rgba(".concat(colorValue === null || colorValue === void 0 ? void 0 : colorValue.red, ", ")).call(_context4, colorValue === null || colorValue === void 0 ? void 0 : colorValue.green, ", ")).call(_context3, colorValue === null || colorValue === void 0 ? void 0 : colorValue.blue, ", ")).call(_context2, colorValue === null || colorValue === void 0 ? void 0 : colorValue.alpha, ")");
|
93
95
|
}, []);
|
94
|
-
return ___EmotionJSX(Box, fieldContainerProps, label && ___EmotionJSX(Label, fieldLabelProps), ___EmotionJSX(Button, _extends({
|
96
|
+
return ___EmotionJSX(Box, _extends({}, getPendoID(displayName), fieldContainerProps), label && ___EmotionJSX(Label, fieldLabelProps), ___EmotionJSX(Button, _extends({
|
95
97
|
"aria-label": "Select color",
|
96
98
|
bg: getRgbaFromState(state),
|
97
99
|
onPress: handleButtonPress,
|
@@ -144,5 +146,5 @@ ColorField.defaultProps = {
|
|
144
146
|
align: 'middle',
|
145
147
|
direction: 'bottom'
|
146
148
|
};
|
147
|
-
ColorField.displayName =
|
149
|
+
ColorField.displayName = displayName;
|
148
150
|
export default ColorField;
|
@@ -25,6 +25,7 @@ import { useLayoutEffect, useResizeObserver } from '@react-aria/utils';
|
|
25
25
|
import PropTypes from 'prop-types';
|
26
26
|
import { usePropWarning } from '../../hooks';
|
27
27
|
import loadingStates from '../../utils/devUtils/constants/loadingStates';
|
28
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
28
29
|
import { isIterableProp } from '../../utils/devUtils/props/isIterable';
|
29
30
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
30
31
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
@@ -33,6 +34,7 @@ import ListBox from '../ListBox';
|
|
33
34
|
import PopoverContainer from '../PopoverContainer';
|
34
35
|
import ScrollBox from '../ScrollBox';
|
35
36
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
37
|
+
var displayName = 'ComboBoxField';
|
36
38
|
var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
37
39
|
var hasAutoFocus = props.hasAutoFocus,
|
38
40
|
hasAddOption = props.hasAddOption,
|
@@ -198,7 +200,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
198
200
|
}, otherListBoxProps))), ___EmotionJSX(DismissButton, {
|
199
201
|
onDismiss: state.close
|
200
202
|
})));
|
201
|
-
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ComboBoxInput, _extends({}, props, {
|
203
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ComboBoxInput, _extends({}, getPendoID(displayName), props, {
|
202
204
|
isOpen: state.isOpen,
|
203
205
|
inputProps: inputProps,
|
204
206
|
labelProps: labelProps,
|
@@ -337,5 +339,5 @@ ComboBoxField.defaultProps = {
|
|
337
339
|
},
|
338
340
|
defaultItems: []
|
339
341
|
};
|
340
|
-
ComboBoxField.displayName =
|
342
|
+
ComboBoxField.displayName = displayName;
|
341
343
|
export default ComboBoxField;
|
@@ -18,8 +18,10 @@ import { FocusScope } from '@react-aria/focus';
|
|
18
18
|
import { useOverlayPosition } from '@react-aria/overlays';
|
19
19
|
import { mergeProps } from '@react-aria/utils';
|
20
20
|
import { useDatePickerState } from '@react-stately/datepicker';
|
21
|
+
import { omit } from 'lodash/object';
|
21
22
|
import PropTypes from 'prop-types';
|
22
23
|
import { Calendar, FieldHelperText, PopoverContainer } from '../../index';
|
24
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
23
25
|
import statuses from '../../utils/devUtils/constants/statuses';
|
24
26
|
import { isDateWithinRanges } from '../../utils/devUtils/props/isDateWithinRanges';
|
25
27
|
import DateField from './DateField';
|
@@ -96,11 +98,11 @@ var DatePicker = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
96
98
|
contain: true,
|
97
99
|
restoreFocus: true
|
98
100
|
}, ___EmotionJSX(Calendar, calendarProps)));
|
99
|
-
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(DateField, _extends({}, props, {
|
101
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(DateField, _extends({}, getPendoID('DatePicker'), props, {
|
100
102
|
ref: ref,
|
101
103
|
buttonProps: buttonProps,
|
102
104
|
fieldProps: fieldProps,
|
103
|
-
groupProps: groupProps,
|
105
|
+
groupProps: omit(groupProps, 'data-pendo-id'),
|
104
106
|
groupRef: groupRef,
|
105
107
|
helperText: helperText,
|
106
108
|
labelProps: labelProps,
|
@@ -27,6 +27,7 @@ import { v4 as uuidv4 } from 'uuid';
|
|
27
27
|
import { Box, FieldHelperText, Input, Label, Loader } from '../..';
|
28
28
|
import useField from '../../hooks/useField';
|
29
29
|
import useStatusClasses from '../../hooks/useStatusClasses';
|
30
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
30
31
|
import statuses from '../../utils/devUtils/constants/statuses';
|
31
32
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
32
33
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
@@ -34,6 +35,7 @@ import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusP
|
|
34
35
|
import FileItem from './FileItem';
|
35
36
|
import FileSelect from './FileSelect';
|
36
37
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
38
|
+
var displayName = 'FileInputField';
|
37
39
|
var FILE_CHANGE_STATUS = {
|
38
40
|
ADDED: 'added',
|
39
41
|
DELETED: 'deleted'
|
@@ -194,7 +196,7 @@ var FileInputField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
194
196
|
fieldContainerProps: fieldContainerProps
|
195
197
|
}, ___EmotionJSX(Label, fieldLabelProps), ___EmotionJSX(Box, _extends({
|
196
198
|
variant: "forms.fileInputField.wrapper"
|
197
|
-
}, mergeProps(fieldControlWrapperProps, nonAriaProps), {
|
199
|
+
}, getPendoID(displayName), mergeProps(fieldControlWrapperProps, nonAriaProps), {
|
198
200
|
className: classNames
|
199
201
|
}, getRootProps(), {
|
200
202
|
// to pass accessibility test, this removes focusable dependents
|
@@ -227,7 +229,7 @@ var FileInputField = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
227
229
|
role: "status"
|
228
230
|
}, ___EmotionJSX(VisuallyHidden, null, ___EmotionJSX("h1", null, fileChangeMessage))));
|
229
231
|
});
|
230
|
-
FileInputField.displayName =
|
232
|
+
FileInputField.displayName = displayName;
|
231
233
|
FileInputField.propTypes = _objectSpread(_objectSpread(_objectSpread({
|
232
234
|
/** The rendered label for the field. */
|
233
235
|
label: PropTypes.node,
|
@@ -26,12 +26,12 @@ export default {
|
|
26
26
|
}
|
27
27
|
},
|
28
28
|
args: {
|
29
|
-
children: '
|
29
|
+
children: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua'
|
30
30
|
}
|
31
31
|
};
|
32
32
|
export var Default = function Default(args) {
|
33
33
|
return ___EmotionJSX(Box, {
|
34
|
-
p:
|
34
|
+
p: 100
|
35
35
|
}, ___EmotionJSX(HelpHint, args));
|
36
36
|
};
|
37
37
|
Default.parameters = {
|
@@ -42,7 +42,7 @@ Default.parameters = {
|
|
42
42
|
};
|
43
43
|
export var WithPopoverAndIconButtonProps = function WithPopoverAndIconButtonProps() {
|
44
44
|
return ___EmotionJSX(Box, {
|
45
|
-
p:
|
45
|
+
p: 100
|
46
46
|
}, ___EmotionJSX(HelpHint, {
|
47
47
|
popoverProps: {
|
48
48
|
'data-testid': 'popover-container'
|
@@ -51,14 +51,14 @@ export var WithPopoverAndIconButtonProps = function WithPopoverAndIconButtonProp
|
|
51
51
|
'aria-label': 'Help hint'
|
52
52
|
},
|
53
53
|
direction: "bottom"
|
54
|
-
}, "
|
54
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"));
|
55
55
|
};
|
56
56
|
export var ContentWithLink = function ContentWithLink() {
|
57
57
|
return ___EmotionJSX(Box, {
|
58
|
-
p:
|
58
|
+
p: 100
|
59
59
|
}, ___EmotionJSX(HelpHint, null, ___EmotionJSX(Text, {
|
60
60
|
variant: "popover"
|
61
|
-
}, "
|
61
|
+
}, "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"), ___EmotionJSX(Link, {
|
62
62
|
variant: "popover",
|
63
63
|
href: "https://uilibrary.ping-eng.com/",
|
64
64
|
target: "_blank"
|
@@ -72,7 +72,7 @@ ContentWithLink.parameters = {
|
|
72
72
|
};
|
73
73
|
export var WithDelay = function WithDelay(args) {
|
74
74
|
return ___EmotionJSX(Box, {
|
75
|
-
p:
|
75
|
+
p: 100
|
76
76
|
}, ___EmotionJSX(HelpHint, _extends({}, args, {
|
77
77
|
closeDelay: 5000
|
78
78
|
})));
|
@@ -18,8 +18,10 @@ import { Pressable, useHover, usePress } from '@react-aria/interactions';
|
|
18
18
|
import { IconButton as ThemeUIIconButton } from 'theme-ui';
|
19
19
|
import { BadgeContext } from '../../context/BadgeContext';
|
20
20
|
import { useAriaLabelWarning, useStatusClasses } from '../../hooks';
|
21
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
21
22
|
import TooltipTrigger, { Tooltip } from '../TooltipTrigger';
|
22
23
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
|
+
var displayName = 'IconButton';
|
23
25
|
var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
24
26
|
var children = props.children,
|
25
27
|
className = props.className,
|
@@ -86,7 +88,7 @@ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
86
88
|
useAriaLabelWarning('IconButton', ariaLabel);
|
87
89
|
var button = ___EmotionJSX(Pressable, _extends({
|
88
90
|
ref: buttonRef
|
89
|
-
}, mergeProps(buttonProps, others, hoverProps, focusProps)), ___EmotionJSX(ThemeUIIconButton, {
|
91
|
+
}, getPendoID(displayName), mergeProps(buttonProps, others, hoverProps, focusProps)), ___EmotionJSX(ThemeUIIconButton, {
|
90
92
|
tabIndex: 0,
|
91
93
|
className: classNames,
|
92
94
|
"aria-label": ariaLabel,
|
@@ -109,5 +111,5 @@ IconButton.defaultProps = {
|
|
109
111
|
variant: 'base',
|
110
112
|
isDisabled: false
|
111
113
|
};
|
112
|
-
IconButton.displayName =
|
114
|
+
IconButton.displayName = displayName;
|
113
115
|
export default IconButton;
|
@@ -16,12 +16,14 @@ import PropTypes from 'prop-types';
|
|
16
16
|
import { v4 as uuid } from 'uuid';
|
17
17
|
import { Item, Menu } from '../..';
|
18
18
|
import { useImageUploadState } from '../../hooks/useImageUploadState';
|
19
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
19
20
|
import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
|
20
21
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
21
22
|
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
22
23
|
import ImagePreviewButton from './ImagePreviewButton';
|
23
24
|
import ImageUploadFieldBase from './ImageUploadFieldBase';
|
24
25
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
26
|
+
var displayName = 'ImageUploadField';
|
25
27
|
var ImageUploadField = /*#__PURE__*/forwardRef(function (props, ref) {
|
26
28
|
var isLoading = props.isLoading,
|
27
29
|
loaderSize = props.loaderSize,
|
@@ -62,7 +64,7 @@ var ImageUploadField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
62
64
|
isMenuOpen: state.isMenuOpen,
|
63
65
|
ref: inputRef,
|
64
66
|
widthHeightSx: state.widthHeightSx
|
65
|
-
}, props), ___EmotionJSX(ImagePreviewButton, {
|
67
|
+
}, getPendoID(displayName), props), ___EmotionJSX(ImagePreviewButton, {
|
66
68
|
defaultPreviewImage: state.defaultPreviewImage,
|
67
69
|
defaultPreviewNode: state.defaultPreviewNode,
|
68
70
|
isImageType: state.isImageType,
|
@@ -135,5 +137,5 @@ ImageUploadField.defaultProps = {
|
|
135
137
|
uploadItemText: 'Upload New Image',
|
136
138
|
removeItemText: 'Remove Image'
|
137
139
|
};
|
138
|
-
ImageUploadField.displayName =
|
140
|
+
ImageUploadField.displayName = displayName;
|
139
141
|
export default ImageUploadField;
|
@@ -5,7 +5,7 @@ var _excluded = ["name", "placeholder", "maxLength"];
|
|
5
5
|
import React, { forwardRef } from 'react';
|
6
6
|
import { flexbox, layout, typography } from 'styled-system';
|
7
7
|
import { Input as ThemeUIInput } from 'theme-ui';
|
8
|
-
import {
|
8
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
9
9
|
/**
|
10
10
|
* Base input component.
|
11
11
|
*
|
@@ -16,13 +16,14 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
16
16
|
* We instead encourage developers to utilize our Field components wherever possible.
|
17
17
|
* If this component is used, accessibility is left to the developer.
|
18
18
|
*/
|
19
|
-
|
19
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
20
|
+
var displayName = 'Input';
|
20
21
|
var ExtendedInput = /*#__PURE__*/_styled(ThemeUIInput, process.env.NODE_ENV === "production" ? {
|
21
22
|
target: "e1lpwkt50"
|
22
23
|
} : {
|
23
24
|
target: "e1lpwkt50",
|
24
25
|
label: "ExtendedInput"
|
25
|
-
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
26
|
+
})(layout, flexbox, typography, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0lucHV0L0lucHV0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQnNCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9jb21wb25lbnRzL0lucHV0L0lucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCwgeyBmb3J3YXJkUmVmIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgZmxleGJveCwgbGF5b3V0LCB0eXBvZ3JhcGh5IH0gZnJvbSAnc3R5bGVkLXN5c3RlbSc7XG5pbXBvcnQgeyBJbnB1dCBhcyBUaGVtZVVJSW5wdXQgfSBmcm9tICd0aGVtZS11aSc7XG5cbmltcG9ydCB7IElucHV0UHJvcHMgfSBmcm9tICcuLi8uLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRQZW5kb0lEIH0gZnJvbSAnLi4vLi4vdXRpbHMvZGV2VXRpbHMvY29uc3RhbnRzL3BlbmRvSUQnO1xuLyoqXG4gKiBCYXNlIGlucHV0IGNvbXBvbmVudC5cbiAqXG4gKiBBY2NlcHRzIHJlbGV2YW50IHN0eWxpbmcgcHJvcHMgZnJvbSBbc3R5bGVkLXN5c3RlbV0oaHR0cHM6Ly9zdHlsZWQtc3lzdGVtLmNvbS90YWJsZSkuXG4gKiBCdWlsdCBvbiB0b3Agb2YgW0lucHV0IGZyb20gVGhlbWUtVUldKGh0dHBzOi8vdGhlbWUtdWkuY29tL2NvbXBvbmVudHMvaW5wdXQvKS5cbiAqXG4gKiAqKk5vdGUqKjogVGhpcyBjb21wb25lbnQgZG9lcyBub3Qgc3VwcGx5IGFsbCBvZiB0aGUgYWNjZXNzaWJpbGl0eSBhc3Npc3RhbmNlIG9uIGl0cyBvd24uXG4gKiBXZSBpbnN0ZWFkIGVuY291cmFnZSBkZXZlbG9wZXJzIHRvIHV0aWxpemUgb3VyIEZpZWxkIGNvbXBvbmVudHMgd2hlcmV2ZXIgcG9zc2libGUuXG4gKiBJZiB0aGlzIGNvbXBvbmVudCBpcyB1c2VkLCBhY2Nlc3NpYmlsaXR5IGlzIGxlZnQgdG8gdGhlIGRldmVsb3Blci5cbiAqL1xuXG5jb25zdCBkaXNwbGF5TmFtZSA9ICdJbnB1dCc7XG5cbmNvbnN0IEV4dGVuZGVkSW5wdXQgPSBzdHlsZWQoVGhlbWVVSUlucHV0KShcbiAgbGF5b3V0LFxuICBmbGV4Ym94LFxuICB0eXBvZ3JhcGh5LFxuKTtcblxuY29uc3QgSW5wdXQgPSBmb3J3YXJkUmVmPEhUTUxJbnB1dEVsZW1lbnQsIElucHV0UHJvcHM+KChwcm9wcywgcmVmKSA9PiB7XG4gIGNvbnN0IHsgbmFtZSwgcGxhY2Vob2xkZXIsIG1heExlbmd0aCwgLi4ub3RoZXJzIH0gPSBwcm9wcztcblxuICByZXR1cm4gKFxuICAgIDxFeHRlbmRlZElucHV0XG4gICAgICByZWY9e3JlZn1cbiAgICAgIG5hbWU9e25hbWV9XG4gICAgICBwbGFjZWhvbGRlcj17cGxhY2Vob2xkZXJ9XG4gICAgICBtYXhMZW5ndGg9e21heExlbmd0aCAmJiBtYXhMZW5ndGh9XG4gICAgICB7Li4uZ2V0UGVuZG9JRChkaXNwbGF5TmFtZSl9XG4gICAgICB7Li4ub3RoZXJzfVxuICAgIC8+XG4gICk7XG59KTtcblxuSW5wdXQuZGlzcGxheU5hbWUgPSBkaXNwbGF5TmFtZTtcblxuZXhwb3J0IGRlZmF1bHQgSW5wdXQ7XG4iXX0= */");
|
26
27
|
var Input = /*#__PURE__*/forwardRef(function (props, ref) {
|
27
28
|
var name = props.name,
|
28
29
|
placeholder = props.placeholder,
|
@@ -33,7 +34,7 @@ var Input = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
33
34
|
name: name,
|
34
35
|
placeholder: placeholder,
|
35
36
|
maxLength: maxLength && maxLength
|
36
|
-
}, others));
|
37
|
+
}, getPendoID(displayName), others));
|
37
38
|
});
|
38
|
-
Input.displayName =
|
39
|
+
Input.displayName = displayName;
|
39
40
|
export default Input;
|
@@ -18,12 +18,14 @@ import PropTypes from 'prop-types';
|
|
18
18
|
import { v4 as uuid } from 'uuid';
|
19
19
|
import { Box, Button, Icon, Loader, Text } from '../..';
|
20
20
|
import { usePropWarning, useSelectField } from '../../hooks';
|
21
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
21
22
|
import statuses from '../../utils/devUtils/constants/statuses';
|
22
23
|
import { ariaAttributesBasePropTypes, getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
23
24
|
import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
|
24
25
|
import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
|
25
26
|
import SelectFieldBase from '../SelectFieldBase';
|
26
27
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
28
|
+
var displayName = 'LinkSelectField';
|
27
29
|
var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
28
30
|
var placeholder = props.placeholder,
|
29
31
|
isDisabled = props.isDisabled,
|
@@ -52,7 +54,7 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
52
54
|
ref: triggerRef,
|
53
55
|
variant: "link",
|
54
56
|
tabIndex: isDisabled ? -1 : 0
|
55
|
-
}, triggerProps, ariaProps, {
|
57
|
+
}, getPendoID(displayName), triggerProps, ariaProps, {
|
56
58
|
"aria-describedby": helperText && helperTextId
|
57
59
|
}), ___EmotionJSX(Text, {
|
58
60
|
variant: "label",
|
@@ -149,5 +151,5 @@ LinkSelectField.defaultProps = _objectSpread({
|
|
149
151
|
align: 'start',
|
150
152
|
direction: 'bottom'
|
151
153
|
}, statusDefaultProp);
|
152
|
-
LinkSelectField.displayName =
|
154
|
+
LinkSelectField.displayName = displayName;
|
153
155
|
export default LinkSelectField;
|
@@ -6,9 +6,11 @@ import React, { forwardRef } from 'react';
|
|
6
6
|
import { useHover } from '@react-aria/interactions';
|
7
7
|
import { Box, Icon, Image, Text } from '../..';
|
8
8
|
import { useStatusClasses } from '../../hooks';
|
9
|
+
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
9
10
|
import { listViewItemPropTypes } from './listViewItemAttributes';
|
10
11
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
11
12
|
export var LIST_ITEM_ICON = '-list-item-icon';
|
13
|
+
var displayName = 'ListViewItem';
|
12
14
|
var ListViewItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
13
15
|
var _context;
|
14
16
|
var children = _ref.children,
|
@@ -75,7 +77,7 @@ var ListViewItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
75
77
|
className: classNames,
|
76
78
|
ref: ref,
|
77
79
|
variant: "listViewItem.styledContainer"
|
78
|
-
}, hoverProps, others), ___EmotionJSX(Box, {
|
80
|
+
}, hoverProps, getPendoID(displayName), others), ___EmotionJSX(Box, {
|
79
81
|
isRow: true,
|
80
82
|
variant: getWrapperVariant()
|
81
83
|
}, renderData, (slots === null || slots === void 0 ? void 0 : slots.rightOfData) && ___EmotionJSX(Box, {
|
@@ -88,5 +90,5 @@ var ListViewItem = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
88
90
|
}, children)));
|
89
91
|
});
|
90
92
|
ListViewItem.propTypes = listViewItemPropTypes;
|
91
|
-
ListViewItem.displayName =
|
93
|
+
ListViewItem.displayName = displayName;
|
92
94
|
export default ListViewItem;
|
@@ -1,24 +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
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
10
2
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
11
3
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
12
4
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
13
5
|
var _excluded = ["color"];
|
14
|
-
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; }
|
15
|
-
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; }
|
16
6
|
import React, { forwardRef, useLayoutEffect, useRef, useState } from 'react';
|
17
7
|
import CloseIcon from '@pingux/mdi-react/CloseIcon';
|
18
|
-
import PropTypes from 'prop-types';
|
19
8
|
import { Box, Icon, IconButton, Text } from '../..';
|
20
9
|
import useStatusClasses from '../../hooks/useStatusClasses';
|
21
|
-
import
|
10
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
22
11
|
import { NoticeIcon } from '../Icon/NoticeIcon';
|
23
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
24
13
|
export var ARIA_STATUSES = {
|
@@ -44,28 +33,26 @@ var CloseButton = function CloseButton(_ref) {
|
|
44
33
|
}
|
45
34
|
}));
|
46
35
|
};
|
47
|
-
CloseButton.propTypes = {
|
48
|
-
color: PropTypes.string
|
49
|
-
};
|
50
36
|
var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
51
37
|
var className = _ref2.className,
|
52
38
|
item = _ref2.item,
|
53
39
|
onClose = _ref2.onClose;
|
54
40
|
var key = item.key,
|
55
41
|
itemProps = item.props;
|
56
|
-
var
|
57
|
-
|
58
|
-
status =
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
isHidden =
|
64
|
-
|
42
|
+
var _ref3 = itemProps,
|
43
|
+
children = _ref3.children,
|
44
|
+
_ref3$status = _ref3.status,
|
45
|
+
status = _ref3$status === void 0 ? statuses.DEFAULT : _ref3$status,
|
46
|
+
bg = _ref3.bg,
|
47
|
+
color = _ref3.color,
|
48
|
+
icon = _ref3.icon,
|
49
|
+
_ref3$isHidden = _ref3.isHidden,
|
50
|
+
isHidden = _ref3$isHidden === void 0 ? false : _ref3$isHidden,
|
51
|
+
dataId = _ref3['data-id'];
|
65
52
|
var _useStatusClasses = useStatusClasses(className, _defineProperty({}, "is-".concat(status), true)),
|
66
53
|
statusClasses = _useStatusClasses.classNames;
|
67
54
|
var onCloseHandler = function onCloseHandler() {
|
68
|
-
if (onClose) {
|
55
|
+
if (onClose && key) {
|
69
56
|
onClose(key);
|
70
57
|
}
|
71
58
|
};
|
@@ -75,7 +62,8 @@ var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
75
62
|
innerHeight = _useState2[0],
|
76
63
|
setInnerHeight = _useState2[1];
|
77
64
|
useLayoutEffect(function () {
|
78
|
-
|
65
|
+
var _innerRef$current$cli, _innerRef$current;
|
66
|
+
setInnerHeight((_innerRef$current$cli = (_innerRef$current = innerRef.current) === null || _innerRef$current === void 0 ? void 0 : _innerRef$current.clientHeight) !== null && _innerRef$current$cli !== void 0 ? _innerRef$current$cli : 0);
|
79
67
|
}, [children]);
|
80
68
|
var _useStatusClasses3 = useStatusClasses(className, {
|
81
69
|
isHidden: isHidden
|
@@ -133,24 +121,4 @@ var Message = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
133
121
|
color: color
|
134
122
|
}))));
|
135
123
|
});
|
136
|
-
Message.propTypes = {
|
137
|
-
item: PropTypes.shape({
|
138
|
-
key: PropTypes.string,
|
139
|
-
props: PropTypes.shape({
|
140
|
-
children: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
141
|
-
/* Background color */
|
142
|
-
bg: PropTypes.string,
|
143
|
-
/* Text color */
|
144
|
-
color: PropTypes.string,
|
145
|
-
/* Message icon */
|
146
|
-
icon: PropTypes.elementType,
|
147
|
-
/* Hides the message with an animated transition */
|
148
|
-
isHidden: PropTypes.bool,
|
149
|
-
'data-id': PropTypes.string,
|
150
|
-
status: _objectSpread({}, statusPropTypes).status
|
151
|
-
})
|
152
|
-
}),
|
153
|
-
/* Callback for clicking the message's close button */
|
154
|
-
onClose: PropTypes.func
|
155
|
-
};
|
156
124
|
export default Message;
|
@@ -9,7 +9,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
9
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
10
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
11
11
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
12
|
-
var _excluded = ["
|
12
|
+
var _excluded = ["onClose"];
|
13
13
|
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; }
|
14
14
|
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; }
|
15
15
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
@@ -19,14 +19,11 @@ import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
19
19
|
import React, { forwardRef, useCallback, useEffect, useState } from 'react';
|
20
20
|
import { useCollection } from '@react-stately/collections';
|
21
21
|
import { ListCollection } from '@react-stately/list';
|
22
|
-
import PropTypes from 'prop-types';
|
23
|
-
import { statusPropTypes } from '../../utils/docUtils/statusProp';
|
24
22
|
import Box from '../Box';
|
25
23
|
import Message from './Message';
|
26
24
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
27
25
|
var Messages = /*#__PURE__*/forwardRef(function (props, ref) {
|
28
|
-
var
|
29
|
-
onClose = props.onClose,
|
26
|
+
var onClose = props.onClose,
|
30
27
|
others = _objectWithoutProperties(props, _excluded);
|
31
28
|
var _useState = useState([]),
|
32
29
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -70,16 +67,6 @@ var Messages = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
70
67
|
});
|
71
68
|
}));
|
72
69
|
});
|
73
|
-
Messages.propTypes = {
|
74
|
-
/* For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections). */
|
75
|
-
items: PropTypes.arrayOf(PropTypes.shape(_objectSpread({
|
76
|
-
key: PropTypes.string,
|
77
|
-
text: PropTypes.string,
|
78
|
-
node: PropTypes.node
|
79
|
-
}, statusPropTypes))),
|
80
|
-
/* Callback for clicking the message's close button */
|
81
|
-
onClose: PropTypes.func
|
82
|
-
};
|
83
70
|
Messages.defaultProps = {
|
84
71
|
items: []
|
85
72
|
};
|