@pingux/astro 1.38.1 → 1.39.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/AccordionGridGroup/AccordionGridGroup.stories.js +10 -8
- package/lib/cjs/components/Bulletin/Bulletin.js +93 -0
- package/lib/cjs/components/Bulletin/Bulletin.stories.js +90 -0
- package/lib/cjs/components/Bulletin/Bulletin.test.js +70 -0
- package/lib/cjs/components/Bulletin/index.js +18 -0
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.stories.js +1 -1
- package/lib/cjs/components/ComboBox/ComboBoxInput.js +1 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.js +15 -14
- package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +15 -1
- package/lib/cjs/components/ComboBoxField/ComboBoxField.test.js +36 -0
- package/lib/cjs/components/Icon/NoticeIcon.js +71 -0
- package/lib/cjs/components/Icon/NoticeIcon.test.js +35 -0
- package/lib/cjs/components/IconButton/IconButton.stories.js +11 -2
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.stories.js +3 -0
- package/lib/cjs/components/ListItem/ListItem.stories.js +4 -8
- package/lib/cjs/components/ListView/ListView.stories.js +22 -13
- package/lib/cjs/components/Messages/Message.js +27 -41
- package/lib/cjs/components/Messages/Messages.test.js +13 -0
- package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +2 -2
- package/lib/cjs/components/TextField/TextField.stories.js +3 -3
- package/lib/cjs/index.js +85 -62
- package/lib/cjs/recipes/ApplicationSearchDropdown.stories.js +2 -1
- package/lib/cjs/recipes/AttributeMappingReadOnlyField.stories.js +1 -1
- package/lib/cjs/recipes/AttributesAndPingOneMapping.stories.js +4 -2
- package/lib/cjs/recipes/CollapsiblePanel.stories.js +1 -1
- package/lib/cjs/recipes/ConditionalFilter.stories.js +1 -1
- package/lib/cjs/recipes/DatePicker.stories.js +1 -1
- package/lib/cjs/recipes/EditableInput.stories.js +4 -2
- package/lib/cjs/recipes/LinkedListView.stories.js +1 -1
- package/lib/cjs/recipes/ListAndPanel.stories.js +10 -3
- package/lib/cjs/recipes/MaskedValue.stories.js +2 -1
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +5 -5
- package/lib/cjs/recipes/PageHeader.stories.js +1 -1
- package/lib/cjs/recipes/PanelHeader.stories.js +2 -2
- package/lib/cjs/recipes/RadioButtonsWithLinks.stories.js +2 -1
- package/lib/cjs/recipes/ScrollableListView.stories.js +10 -6
- package/lib/cjs/recipes/TrialExperienceIndustryButtons.stories.js +2 -2
- package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +1 -1
- package/lib/cjs/styles/templates/Nav/HeaderBar.js +1 -1
- package/lib/cjs/styles/variants/bulletin.js +60 -0
- package/lib/cjs/styles/variants/variants.js +3 -0
- package/lib/components/AccordionGridGroup/AccordionGridGroup.stories.js +11 -9
- package/lib/components/Bulletin/Bulletin.js +70 -0
- package/lib/components/Bulletin/Bulletin.stories.js +59 -0
- package/lib/components/Bulletin/Bulletin.test.js +45 -0
- package/lib/components/Bulletin/index.js +1 -0
- package/lib/components/CollapsiblePanel/CollapsiblePanel.stories.js +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +1 -1
- package/lib/components/ComboBoxField/ComboBoxField.js +15 -14
- package/lib/components/ComboBoxField/ComboBoxField.stories.js +11 -0
- package/lib/components/ComboBoxField/ComboBoxField.test.js +34 -0
- package/lib/components/Icon/NoticeIcon.js +43 -0
- package/lib/components/Icon/NoticeIcon.test.js +24 -0
- package/lib/components/IconButton/IconButton.stories.js +11 -2
- package/lib/components/IconButtonToggle/IconButtonToggle.stories.js +3 -0
- package/lib/components/ListItem/ListItem.stories.js +4 -8
- package/lib/components/ListView/ListView.stories.js +22 -13
- package/lib/components/Messages/Message.js +21 -28
- package/lib/components/Messages/Messages.test.js +11 -0
- package/lib/components/NavBarSection/NavBarItemHeader.js +2 -2
- package/lib/components/TextField/TextField.stories.js +3 -3
- package/lib/index.js +2 -0
- package/lib/recipes/ApplicationSearchDropdown.stories.js +2 -1
- package/lib/recipes/AttributeMappingReadOnlyField.stories.js +1 -1
- package/lib/recipes/AttributesAndPingOneMapping.stories.js +4 -2
- package/lib/recipes/CollapsiblePanel.stories.js +1 -1
- package/lib/recipes/ConditionalFilter.stories.js +1 -1
- package/lib/recipes/DatePicker.stories.js +1 -1
- package/lib/recipes/EditableInput.stories.js +4 -2
- package/lib/recipes/LinkedListView.stories.js +1 -1
- package/lib/recipes/ListAndPanel.stories.js +10 -3
- package/lib/recipes/MaskedValue.stories.js +2 -1
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +5 -5
- package/lib/recipes/PageHeader.stories.js +1 -1
- package/lib/recipes/PanelHeader.stories.js +2 -2
- package/lib/recipes/RadioButtonsWithLinks.stories.js +2 -1
- package/lib/recipes/ScrollableListView.stories.js +10 -6
- package/lib/recipes/TrialExperienceIndustryButtons.stories.js +2 -2
- package/lib/recipes/TrialExperienceStatusBar.stories.js +1 -1
- package/lib/styles/templates/Nav/HeaderBar.js +1 -1
- package/lib/styles/variants/bulletin.js +41 -0
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +1 -1
- package/NOTICE.html +0 -4707
@@ -566,7 +566,7 @@ var ListElement = function ListElement(_ref) {
|
|
566
566
|
icon: _FormSelectIcon["default"],
|
567
567
|
mr: "sm",
|
568
568
|
color: "text.primary",
|
569
|
-
size:
|
569
|
+
size: "md"
|
570
570
|
}), (0, _react2.jsx)(_Text["default"], {
|
571
571
|
variant: "itemTitle",
|
572
572
|
alignSelf: "center"
|
@@ -574,12 +574,16 @@ var ListElement = function ListElement(_ref) {
|
|
574
574
|
isRow: true,
|
575
575
|
alignSelf: "center"
|
576
576
|
}, (0, _react2.jsx)(_IconButton["default"], {
|
577
|
-
"aria-label": "create-icon"
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
577
|
+
"aria-label": "create-icon"
|
578
|
+
}, (0, _react2.jsx)(_Icon["default"], {
|
579
|
+
icon: _CreateIcon["default"],
|
580
|
+
size: "sm"
|
581
|
+
})), (0, _react2.jsx)(_IconButton["default"], {
|
582
|
+
"aria-label": "actions-icon"
|
583
|
+
}, (0, _react2.jsx)(_Icon["default"], {
|
584
|
+
icon: _MoreVertIcon["default"],
|
585
|
+
size: "sm"
|
586
|
+
}))));
|
583
587
|
};
|
584
588
|
|
585
589
|
var Default = function Default(_ref2) {
|
@@ -601,7 +605,7 @@ var Default = function Default(_ref2) {
|
|
601
605
|
icon: _FormSelectIcon["default"],
|
602
606
|
mr: "sm",
|
603
607
|
color: "text.primary",
|
604
|
-
size:
|
608
|
+
size: "md"
|
605
609
|
}), (0, _react2.jsx)(_Text["default"], {
|
606
610
|
variant: "itemTitle",
|
607
611
|
alignSelf: "center"
|
@@ -609,12 +613,17 @@ var Default = function Default(_ref2) {
|
|
609
613
|
isRow: true,
|
610
614
|
alignSelf: "center"
|
611
615
|
}, (0, _react2.jsx)(_IconButton["default"], {
|
612
|
-
"aria-label": "create-icon"
|
613
|
-
|
614
|
-
|
616
|
+
"aria-label": "create-icon"
|
617
|
+
}, (0, _react2.jsx)(_Icon["default"], {
|
618
|
+
icon: _CreateIcon["default"],
|
619
|
+
size: "sm"
|
620
|
+
})), (0, _react2.jsx)(_IconButton["default"], {
|
615
621
|
"aria-label": "actions-icon",
|
616
|
-
size:
|
617
|
-
}, (0, _react2.jsx)(
|
622
|
+
size: "sm"
|
623
|
+
}, (0, _react2.jsx)(_Icon["default"], {
|
624
|
+
icon: _MoreVertIcon["default"],
|
625
|
+
size: "sm"
|
626
|
+
})))));
|
618
627
|
});
|
619
628
|
};
|
620
629
|
|
@@ -14,7 +14,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
14
14
|
value: true
|
15
15
|
});
|
16
16
|
|
17
|
-
exports
|
17
|
+
exports["default"] = exports.ARIA_STATUSES = void 0;
|
18
18
|
|
19
19
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/values"));
|
20
20
|
|
@@ -28,29 +28,17 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-c
|
|
28
28
|
|
29
29
|
var _react = _interopRequireWildcard(require("react"));
|
30
30
|
|
31
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
32
|
-
|
33
|
-
var _AlertCircleIcon = _interopRequireDefault(require("mdi-react/AlertCircleIcon"));
|
34
|
-
|
35
|
-
var _CheckCircleIcon = _interopRequireDefault(require("mdi-react/CheckCircleIcon"));
|
36
|
-
|
37
31
|
var _CloseIcon = _interopRequireDefault(require("mdi-react/CloseIcon"));
|
38
32
|
|
39
|
-
var
|
40
|
-
|
41
|
-
var _InformationIcon = _interopRequireDefault(require("mdi-react/InformationIcon"));
|
33
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
42
34
|
|
43
|
-
var
|
35
|
+
var _NoticeIcon = require("../Icon/NoticeIcon");
|
44
36
|
|
45
37
|
var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/statuses"));
|
46
38
|
|
47
|
-
var
|
48
|
-
|
49
|
-
var _Icon = _interopRequireDefault(require("../Icon"));
|
50
|
-
|
51
|
-
var _IconButton = _interopRequireDefault(require("../IconButton"));
|
39
|
+
var _useStatusClasses4 = _interopRequireDefault(require("../../hooks/useStatusClasses"));
|
52
40
|
|
53
|
-
var
|
41
|
+
var _ = require("../..");
|
54
42
|
|
55
43
|
var _react2 = require("@emotion/react");
|
56
44
|
|
@@ -60,13 +48,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
|
|
60
48
|
|
61
49
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
62
50
|
|
63
|
-
var icons = {
|
64
|
-
"default": _InformationIcon["default"],
|
65
|
-
success: _CheckCircleIcon["default"],
|
66
|
-
error: _AlertCircleIcon["default"],
|
67
|
-
warning: _AlertIcon["default"]
|
68
|
-
};
|
69
|
-
exports.icons = icons;
|
70
51
|
var ARIA_STATUSES = {
|
71
52
|
SUCCESS: 'Success Message',
|
72
53
|
ERROR: 'Error Message',
|
@@ -77,9 +58,9 @@ exports.ARIA_STATUSES = ARIA_STATUSES;
|
|
77
58
|
var CloseButton = function CloseButton(_ref) {
|
78
59
|
var color = _ref.color,
|
79
60
|
others = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
80
|
-
return (0, _react2.jsx)(
|
61
|
+
return (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({
|
81
62
|
"aria-label": "Close"
|
82
|
-
}, others), (0, _react2.jsx)(
|
63
|
+
}, others), (0, _react2.jsx)(_.Icon, {
|
83
64
|
color: color,
|
84
65
|
icon: _CloseIcon["default"],
|
85
66
|
sx: {
|
@@ -93,10 +74,10 @@ var CloseButton = function CloseButton(_ref) {
|
|
93
74
|
CloseButton.propTypes = {
|
94
75
|
color: _propTypes["default"].string
|
95
76
|
};
|
96
|
-
var Message = /*#__PURE__*/(0, _react.forwardRef)(function (
|
97
|
-
var className =
|
98
|
-
item =
|
99
|
-
onClose =
|
77
|
+
var Message = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
|
78
|
+
var className = _ref2.className,
|
79
|
+
item = _ref2.item,
|
80
|
+
onClose = _ref2.onClose;
|
100
81
|
var key = item.key,
|
101
82
|
itemProps = item.props;
|
102
83
|
var children = itemProps.children,
|
@@ -104,8 +85,7 @@ var Message = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
104
85
|
status = _itemProps$status === void 0 ? 'default' : _itemProps$status,
|
105
86
|
bg = itemProps.bg,
|
106
87
|
color = itemProps.color,
|
107
|
-
|
108
|
-
icon = _itemProps$icon === void 0 ? icons[status] : _itemProps$icon,
|
88
|
+
icon = itemProps.icon,
|
109
89
|
_itemProps$isHidden = itemProps.isHidden,
|
110
90
|
isHidden = _itemProps$isHidden === void 0 ? false : _itemProps$isHidden,
|
111
91
|
dataId = itemProps['data-id'];
|
@@ -147,7 +127,18 @@ var Message = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
147
127
|
return '';
|
148
128
|
};
|
149
129
|
|
150
|
-
|
130
|
+
var messageIconProps = {
|
131
|
+
className: statusClasses,
|
132
|
+
color: color,
|
133
|
+
mr: 'md'
|
134
|
+
};
|
135
|
+
var messageIcon = icon ? (0, _react2.jsx)(_.Icon, (0, _extends2["default"])({
|
136
|
+
icon: icon,
|
137
|
+
"data-testid": "custom-icon-testid"
|
138
|
+
}, messageIconProps)) : (0, _react2.jsx)(_NoticeIcon.NoticeIcon, (0, _extends2["default"])({
|
139
|
+
status: status
|
140
|
+
}, messageIconProps));
|
141
|
+
return (0, _react2.jsx)(_.Box, {
|
151
142
|
variant: "messages.transition",
|
152
143
|
className: wrapperClasses,
|
153
144
|
sx: {
|
@@ -157,20 +148,15 @@ var Message = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
157
148
|
role: "status",
|
158
149
|
"aria-live": "polite",
|
159
150
|
"aria-label": ariaStatus(statusClasses)
|
160
|
-
}, (0, _react2.jsx)(
|
151
|
+
}, (0, _react2.jsx)(_.Box, {
|
161
152
|
ref: innerRef
|
162
|
-
}, (0, _react2.jsx)(
|
153
|
+
}, (0, _react2.jsx)(_.Box, {
|
163
154
|
ref: ref,
|
164
155
|
isRow: true,
|
165
156
|
variant: "messages.item",
|
166
157
|
className: statusClasses,
|
167
158
|
bg: bg
|
168
|
-
},
|
169
|
-
icon: icon,
|
170
|
-
className: statusClasses,
|
171
|
-
color: color,
|
172
|
-
mr: "md"
|
173
|
-
}), (0, _react2.jsx)(_Text["default"], {
|
159
|
+
}, messageIcon, (0, _react2.jsx)(_.Text, {
|
174
160
|
className: statusClasses,
|
175
161
|
color: color,
|
176
162
|
mr: "md"
|
@@ -24,6 +24,8 @@ var _collections = require("@react-stately/collections");
|
|
24
24
|
|
25
25
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
26
26
|
|
27
|
+
var _AccountIcon = _interopRequireDefault(require("mdi-react/AccountIcon"));
|
28
|
+
|
27
29
|
var _testAxe = _interopRequireDefault(require("../../utils/testUtils/testAxe"));
|
28
30
|
|
29
31
|
var _testWrapper = require("../../utils/testUtils/testWrapper");
|
@@ -195,4 +197,15 @@ test('should render messages with multiMessagesReducerStory', function () {
|
|
195
197
|
_.multiMessagesReducerStory.actions.showSuccessMessage();
|
196
198
|
|
197
199
|
expect(_testWrapper.screen.getByTestId(testId)).toBeInTheDocument();
|
200
|
+
});
|
201
|
+
test('should render a custom icon', function () {
|
202
|
+
getWithDynamicList({
|
203
|
+
items: [{
|
204
|
+
key: 'message1',
|
205
|
+
text: 'test text',
|
206
|
+
icon: _AccountIcon["default"]
|
207
|
+
}]
|
208
|
+
});
|
209
|
+
|
210
|
+
_testWrapper.screen.getByTestId('custom-icon-testid');
|
198
211
|
});
|
@@ -79,7 +79,7 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
|
|
79
79
|
"data-testid": heading
|
80
80
|
}, icon && (0, _react2.jsx)(_index.Icon, {
|
81
81
|
icon: icon,
|
82
|
-
size:
|
82
|
+
size: "sm",
|
83
83
|
sx: {
|
84
84
|
mr: '10px',
|
85
85
|
color: 'white',
|
@@ -96,7 +96,7 @@ var NavBarItemHeader = function NavBarItemHeader(props) {
|
|
96
96
|
}
|
97
97
|
}, (0, _react2.jsx)(_index.Icon, {
|
98
98
|
icon: isExpanded ? _MenuUpIcon["default"] : _MenuDownIcon["default"],
|
99
|
-
size:
|
99
|
+
size: "xs",
|
100
100
|
sx: {
|
101
101
|
color: 'white',
|
102
102
|
fill: 'white'
|
@@ -99,7 +99,7 @@ var Default = function Default(_ref) {
|
|
99
99
|
var variant = _ref.variant,
|
100
100
|
args = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
101
101
|
return (0, _react2.jsx)(_["default"], (0, _extends2["default"])({
|
102
|
-
id: "
|
102
|
+
id: "default-id",
|
103
103
|
name: "custom-name",
|
104
104
|
label: "Example Label"
|
105
105
|
}, variant && {
|
@@ -113,7 +113,7 @@ exports.Default = Default;
|
|
113
113
|
|
114
114
|
var SmallVariant = function SmallVariant() {
|
115
115
|
return (0, _react2.jsx)(_["default"], {
|
116
|
-
id: "
|
116
|
+
id: "small-variant-id",
|
117
117
|
name: "custom-name",
|
118
118
|
label: "Example Label",
|
119
119
|
controlProps: {
|
@@ -268,7 +268,7 @@ exports.Warning = Warning;
|
|
268
268
|
|
269
269
|
var WithHelpHint = function WithHelpHint() {
|
270
270
|
return (0, _react2.jsx)(_["default"], {
|
271
|
-
id: "
|
271
|
+
id: "with-help-hint-id",
|
272
272
|
name: "custom-name",
|
273
273
|
hintText: "Example Hint",
|
274
274
|
label: "Example Label"
|