@pingux/astro 1.38.1 → 1.39.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/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/buttons.js +4 -1
- 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/buttons.js +4 -1
- package/lib/styles/variants/variants.js +2 -0
- package/package.json +1 -1
- package/NOTICE.html +0 -4707
@@ -349,12 +349,14 @@ var EditableControl = function EditableControl(props) {
|
|
349
349
|
variant: confirmBtn.variant,
|
350
350
|
sx: sx.editableControlIconButton
|
351
351
|
}, (0, _react2.jsx)(_index.Icon, {
|
352
|
-
icon: _CheckIcon["default"]
|
352
|
+
icon: _CheckIcon["default"],
|
353
|
+
size: "sm"
|
353
354
|
})), (0, _react2.jsx)(_index.IconButton, {
|
354
355
|
"aria-label": cancelBtn.ariaLabel,
|
355
356
|
onPress: handleCancel,
|
356
357
|
variant: cancelBtn.variant
|
357
358
|
}, (0, _react2.jsx)(_index.Icon, {
|
358
|
-
icon: _CloseIcon["default"]
|
359
|
+
icon: _CloseIcon["default"],
|
360
|
+
size: "sm"
|
359
361
|
})));
|
360
362
|
};
|
@@ -255,7 +255,7 @@ var Default = function Default(_ref) {
|
|
255
255
|
"aria-label": "Menu Button"
|
256
256
|
}, (0, _react2.jsx)(_index.Icon, {
|
257
257
|
icon: _DotsVerticalIcon["default"],
|
258
|
-
size:
|
258
|
+
size: "xs",
|
259
259
|
color: "Neutral.40",
|
260
260
|
m: "0.61px"
|
261
261
|
}))), (0, _react2.jsx)(_index.Menu, {
|
@@ -238,7 +238,11 @@ var ListElement = function ListElement(_ref) {
|
|
238
238
|
}), (0, _react2.jsx)(_index.PopoverMenu, null, (0, _react2.jsx)(_index.IconButton, {
|
239
239
|
"aria-label": "more icon button",
|
240
240
|
mr: onClosePanel ? 'sm' : 0
|
241
|
-
}, (0, _react2.jsx)(
|
241
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
242
|
+
icon: _MoreVertIcon["default"],
|
243
|
+
color: "white",
|
244
|
+
size: "sm"
|
245
|
+
})), (0, _react2.jsx)(_index.Menu, null, (0, _react2.jsx)(_collections.Item, {
|
242
246
|
key: "enable"
|
243
247
|
}, "Enable user"), (0, _react2.jsx)(_collections.Item, {
|
244
248
|
key: "disable"
|
@@ -247,7 +251,10 @@ var ListElement = function ListElement(_ref) {
|
|
247
251
|
}, "Delete user"))), onClosePanel && (0, _react2.jsx)(_index.IconButton, {
|
248
252
|
"aria-label": "close icon button",
|
249
253
|
onPress: onClosePanel
|
250
|
-
}, (0, _react2.jsx)(
|
254
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
255
|
+
size: "sm",
|
256
|
+
icon: _CloseIcon["default"]
|
257
|
+
}))));
|
251
258
|
};
|
252
259
|
|
253
260
|
var Default = function Default() {
|
@@ -308,7 +315,7 @@ var Default = function Default() {
|
|
308
315
|
}, (0, _react2.jsx)(_index.Icon, {
|
309
316
|
icon: _PlusIcon["default"],
|
310
317
|
color: "white",
|
311
|
-
size:
|
318
|
+
size: "xs"
|
312
319
|
}))), (0, _react2.jsx)(_index.Text, {
|
313
320
|
variant: "bodyWeak"
|
314
321
|
}, description, (0, _react2.jsx)(_index.Link, {
|
@@ -93,7 +93,8 @@ var Default = function Default(_ref) {
|
|
93
93
|
},
|
94
94
|
sx: sx.showHideButton
|
95
95
|
}, (0, _react2.jsx)(_index.Icon, {
|
96
|
-
icon: isMasked ? _EyeOffOutlineIcon["default"] : _EyeOutlineIcon["default"]
|
96
|
+
icon: isMasked ? _EyeOffOutlineIcon["default"] : _EyeOutlineIcon["default"],
|
97
|
+
size: "sm"
|
97
98
|
}))));
|
98
99
|
};
|
99
100
|
|
@@ -142,7 +142,7 @@ var Default = function Default() {
|
|
142
142
|
defaultIcon: CustomOffSvg,
|
143
143
|
title: "Bidirectional/ Outbound toggle",
|
144
144
|
iconProps: {
|
145
|
-
size:
|
145
|
+
size: 'xs'
|
146
146
|
},
|
147
147
|
buttonProps: {
|
148
148
|
variant: 'bidirectionalIconButton'
|
@@ -172,7 +172,7 @@ var Default = function Default() {
|
|
172
172
|
}, (0, _react2.jsx)(_index.Icon, {
|
173
173
|
icon: _CogsIcon["default"],
|
174
174
|
sx: sx.actionIcon,
|
175
|
-
size:
|
175
|
+
size: "sm",
|
176
176
|
title: "edit icon"
|
177
177
|
})), (0, _react2.jsx)(_index.IconButton, {
|
178
178
|
sx: sx.iconButton,
|
@@ -180,7 +180,7 @@ var Default = function Default() {
|
|
180
180
|
}, (0, _react2.jsx)(_index.Icon, {
|
181
181
|
icon: _DeleteIcon["default"],
|
182
182
|
sx: sx.actionIcon,
|
183
|
-
size:
|
183
|
+
size: "sm",
|
184
184
|
title: "delete icon"
|
185
185
|
})))), (0, _react2.jsx)(_Box["default"], {
|
186
186
|
sx: sx.outerContainer,
|
@@ -244,7 +244,7 @@ var Default = function Default() {
|
|
244
244
|
}, (0, _react2.jsx)(_index.Icon, {
|
245
245
|
icon: _CogsIcon["default"],
|
246
246
|
sx: sx.actionIcon,
|
247
|
-
size:
|
247
|
+
size: "sm",
|
248
248
|
title: "edit icon"
|
249
249
|
})), (0, _react2.jsx)(_index.IconButton, {
|
250
250
|
sx: sx.iconButton,
|
@@ -252,7 +252,7 @@ var Default = function Default() {
|
|
252
252
|
}, (0, _react2.jsx)(_index.Icon, {
|
253
253
|
icon: _DeleteIcon["default"],
|
254
254
|
sx: sx.actionIcon,
|
255
|
-
size:
|
255
|
+
size: "sm",
|
256
256
|
title: "delete icon"
|
257
257
|
})))));
|
258
258
|
};
|
@@ -76,7 +76,7 @@ var Default = function Default() {
|
|
76
76
|
"aria-label": "Menu Button"
|
77
77
|
}, (0, _react2.jsx)(_Icon["default"], {
|
78
78
|
icon: _DotsVerticalIcon["default"],
|
79
|
-
size:
|
79
|
+
size: "xs",
|
80
80
|
color: "Neutral.40",
|
81
81
|
m: "0.61px"
|
82
82
|
})), (0, _react2.jsx)(_index.Menu, null, (0, _react2.jsx)(_index.Item, {
|
@@ -93,7 +93,7 @@ var Default = function Default() {
|
|
93
93
|
mx: "10px"
|
94
94
|
}, (0, _react2.jsx)(_Icon["default"], {
|
95
95
|
icon: _CloseIcon["default"],
|
96
|
-
size:
|
96
|
+
size: "xs",
|
97
97
|
color: "Neutral.40",
|
98
98
|
m: "0.61px"
|
99
99
|
}))));
|
@@ -113,7 +113,8 @@ var Default = function Default() {
|
|
113
113
|
onPress: onPress,
|
114
114
|
"aria-label": "close icon button"
|
115
115
|
}, (0, _react2.jsx)(_index.Icon, {
|
116
|
-
icon: _CloseIcon["default"]
|
116
|
+
icon: _CloseIcon["default"],
|
117
|
+
size: "sm"
|
117
118
|
}))), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
|
118
119
|
sx: titleSx,
|
119
120
|
mb: "xs"
|
@@ -137,12 +137,16 @@ var Default = function Default(_ref) {
|
|
137
137
|
isRow: true,
|
138
138
|
alignSelf: "center"
|
139
139
|
}, (0, _react2.jsx)(_index.IconButton, {
|
140
|
-
"aria-label": "create-icon"
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
140
|
+
"aria-label": "create-icon"
|
141
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
142
|
+
icon: _CreateIcon["default"],
|
143
|
+
size: "sm"
|
144
|
+
})), (0, _react2.jsx)(_index.IconButton, {
|
145
|
+
"aria-label": "create-icon"
|
146
|
+
}, (0, _react2.jsx)(_index.Icon, {
|
147
|
+
icon: _MoreVertIcon["default"],
|
148
|
+
size: "sm"
|
149
|
+
})))));
|
146
150
|
})));
|
147
151
|
};
|
148
152
|
|
@@ -680,11 +680,11 @@ var Default = function Default() {
|
|
680
680
|
}, (0, _react2.jsx)(_index.IconButton, {
|
681
681
|
"aria-label": "Close modal window",
|
682
682
|
"data-id": "icon-button__close-modal-window",
|
683
|
-
size: 22,
|
684
683
|
variant: "modalCloseButton",
|
685
684
|
onPress: state.close
|
686
685
|
}, (0, _react2.jsx)(_index.Icon, {
|
687
|
-
icon: _CloseIcon["default"]
|
686
|
+
icon: _CloseIcon["default"],
|
687
|
+
size: "sm"
|
688
688
|
})), (0, _react2.jsx)(_index.Text, {
|
689
689
|
sx: sx.headingTextStyle
|
690
690
|
}, "Choose Your Industry"), (0, _react2.jsx)(_index.Text, {
|
@@ -302,7 +302,7 @@ var LinkRow = function LinkRow(props) {
|
|
302
302
|
"aria-label": "completed step icon indicator"
|
303
303
|
}, (0, _react2.jsx)(_index.Icon, {
|
304
304
|
icon: isSelected ? _CheckCircleIcon["default"] : RadioButtonIcon,
|
305
|
-
size:
|
305
|
+
size: "sm",
|
306
306
|
sx: isSelected ? sx.linkRowIconButton : sx.linkRowIconNotSelected
|
307
307
|
}))), !isLastLink && isLinkSelected && (0, _react2.jsx)(_index.Separator, {
|
308
308
|
sx: sx.linkRowSeparator,
|
@@ -50,7 +50,7 @@ var CustomPopoverMenu = function CustomPopoverMenu() {
|
|
50
50
|
"aria-label": "default icon button"
|
51
51
|
}, (0, _react2.jsx)(_index.Icon, {
|
52
52
|
icon: _MenuDownIcon["default"],
|
53
|
-
size:
|
53
|
+
size: "xs",
|
54
54
|
color: "neutral.30",
|
55
55
|
sx: isOpen ? {
|
56
56
|
transform: 'rotate(180deg)'
|
@@ -0,0 +1,60 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
4
|
+
|
5
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
6
|
+
|
7
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
8
|
+
|
9
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
10
|
+
|
11
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
12
|
+
|
13
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
14
|
+
|
15
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
16
|
+
|
17
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
18
|
+
|
19
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
20
|
+
|
21
|
+
_Object$defineProperty(exports, "__esModule", {
|
22
|
+
value: true
|
23
|
+
});
|
24
|
+
|
25
|
+
exports["default"] = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
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; }
|
30
|
+
|
31
|
+
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) { (0, _defineProperty2["default"])(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; }
|
32
|
+
|
33
|
+
var base = {
|
34
|
+
alignItems: 'center',
|
35
|
+
border: '1px solid',
|
36
|
+
borderColor: 'text.secondary',
|
37
|
+
fontSize: 'md',
|
38
|
+
p: '15px 12px 15px 0',
|
39
|
+
width: '600px'
|
40
|
+
};
|
41
|
+
|
42
|
+
var error = _objectSpread(_objectSpread({}, base), {}, {
|
43
|
+
borderColor: 'critical.bright'
|
44
|
+
});
|
45
|
+
|
46
|
+
var success = _objectSpread(_objectSpread({}, base), {}, {
|
47
|
+
borderColor: 'success.bright'
|
48
|
+
});
|
49
|
+
|
50
|
+
var warning = _objectSpread(_objectSpread({}, base), {}, {
|
51
|
+
borderColor: 'warning.bright'
|
52
|
+
});
|
53
|
+
|
54
|
+
var _default = {
|
55
|
+
base: base,
|
56
|
+
error: error,
|
57
|
+
success: success,
|
58
|
+
warning: warning
|
59
|
+
};
|
60
|
+
exports["default"] = _default;
|
@@ -445,9 +445,12 @@ var chipDeleteStandard = {
|
|
445
445
|
};
|
446
446
|
|
447
447
|
var chipDeleteButton = _objectSpread(_objectSpread({}, chipDeleteStandard), {}, {
|
448
|
-
'&.is-focused
|
448
|
+
'&.is-focused': _objectSpread({
|
449
449
|
bg: 'accent.40'
|
450
450
|
}, focusWithCroppedOutline),
|
451
|
+
'&.is-hovered': {
|
452
|
+
bg: 'accent.40'
|
453
|
+
},
|
451
454
|
'&.is-pressed': {
|
452
455
|
bg: 'accent.20',
|
453
456
|
borderColor: 'accent.20'
|
@@ -76,6 +76,8 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
76
76
|
|
77
77
|
var _collapsiblePanel = _interopRequireDefault(require("./collapsiblePanel"));
|
78
78
|
|
79
|
+
var _bulletin = _interopRequireDefault(require("./bulletin"));
|
80
|
+
|
79
81
|
var _DataTable = _interopRequireDefault(require("./../../components/DataTable/DataTable.styles"));
|
80
82
|
|
81
83
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -89,6 +91,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
89
91
|
var _default = _objectSpread(_objectSpread({
|
90
92
|
accordion: _accordion["default"],
|
91
93
|
boxes: _boxes["default"],
|
94
|
+
bulletin: _bulletin["default"],
|
92
95
|
codeView: _codeView["default"],
|
93
96
|
images: _images["default"],
|
94
97
|
imageUpload: _imageUpload["default"],
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
4
4
|
import { Item } from '@react-stately/collections';
|
5
5
|
import CreateIcon from 'mdi-react/CreateIcon';
|
6
6
|
import MoreVertIcon from 'mdi-react/MoreVertIcon';
|
7
|
-
import { Box, IconButton, Text, Separator, Link, TextField } from '../../index';
|
7
|
+
import { Box, IconButton, Icon, Text, Separator, Link, TextField } from '../../index';
|
8
8
|
import AccordionGridGroup from './AccordionGridGroup';
|
9
9
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
10
10
|
var data = [{
|
@@ -120,18 +120,20 @@ var Header = function Header(props) {
|
|
120
120
|
}, ___EmotionJSX(IconButton, {
|
121
121
|
"aria-label": "create-icon",
|
122
122
|
sx: {
|
123
|
-
mr: '4px'
|
124
|
-
height: '26px',
|
125
|
-
width: '26px'
|
123
|
+
mr: '4px'
|
126
124
|
}
|
127
|
-
}, ___EmotionJSX(
|
125
|
+
}, ___EmotionJSX(Icon, {
|
126
|
+
icon: CreateIcon,
|
127
|
+
size: "sm"
|
128
|
+
})), ___EmotionJSX(IconButton, {
|
128
129
|
"aria-label": "vertical-lines-icon",
|
129
130
|
sx: {
|
130
|
-
mr: '4px'
|
131
|
-
height: '26px',
|
132
|
-
width: '26px'
|
131
|
+
mr: '4px'
|
133
132
|
}
|
134
|
-
}, ___EmotionJSX(
|
133
|
+
}, ___EmotionJSX(Icon, {
|
134
|
+
icon: MoreVertIcon,
|
135
|
+
size: "sm"
|
136
|
+
})))));
|
135
137
|
};
|
136
138
|
|
137
139
|
var Body = function Body(props) {
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
4
|
+
var _excluded = ["children", "status"];
|
5
|
+
|
6
|
+
var _bulletinProps;
|
7
|
+
|
8
|
+
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
9
|
+
import React from 'react';
|
10
|
+
import PropTypes from 'prop-types';
|
11
|
+
import { Box } from '../..';
|
12
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
13
|
+
import { NoticeIcon } from '../Icon/NoticeIcon';
|
14
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
15
|
+
export var BULLETIN_TEST_ID = 'bulletinTestId';
|
16
|
+
var bulletinProps = (_bulletinProps = {}, _defineProperty(_bulletinProps, statuses.DEFAULT, {
|
17
|
+
color: 'text.secondary',
|
18
|
+
variant: 'bulletin.base'
|
19
|
+
}), _defineProperty(_bulletinProps, statuses.ERROR, {
|
20
|
+
color: 'critical.bright',
|
21
|
+
variant: 'bulletin.error'
|
22
|
+
}), _defineProperty(_bulletinProps, statuses.SUCCESS, {
|
23
|
+
color: 'success.bright',
|
24
|
+
variant: 'bulletin.success'
|
25
|
+
}), _defineProperty(_bulletinProps, statuses.WARNING, {
|
26
|
+
color: 'warning.bright',
|
27
|
+
variant: 'bulletin.warning'
|
28
|
+
}), _bulletinProps);
|
29
|
+
var defaultIconProps = {
|
30
|
+
mr: 'md',
|
31
|
+
ml: 'md',
|
32
|
+
size: 'md'
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
*Bulletin is composed of the Box, Icon, and Text components. It's a persistent component
|
36
|
+
that should be placed at the top of panels or above related content. If the Bulletins
|
37
|
+
status is error or warning, the text should include a direct link to instructions on resolving the
|
38
|
+
issue or error.
|
39
|
+
*
|
40
|
+
*Please note, Bulletin is a static component, the [Messages](./?path=/docs/messages) component is
|
41
|
+
recommended if you need to interrupt and notify users of successful/failed actions or
|
42
|
+
give warnings of unexpected events.
|
43
|
+
*/
|
44
|
+
|
45
|
+
var Bulletin = function Bulletin(_ref) {
|
46
|
+
var children = _ref.children,
|
47
|
+
status = _ref.status,
|
48
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
49
|
+
|
50
|
+
return ___EmotionJSX(Box, _extends({
|
51
|
+
"data-testid": BULLETIN_TEST_ID,
|
52
|
+
isRow: true,
|
53
|
+
role: "note",
|
54
|
+
variant: bulletinProps[status].variant
|
55
|
+
}, others), ___EmotionJSX(NoticeIcon, _extends({
|
56
|
+
color: bulletinProps[status].color,
|
57
|
+
status: status,
|
58
|
+
"aria-label": "".concat(status, "-icon")
|
59
|
+
}, defaultIconProps)), children);
|
60
|
+
};
|
61
|
+
|
62
|
+
Bulletin.propTypes = {
|
63
|
+
/** Determines the icon and color */
|
64
|
+
status: PropTypes.oneOf(_Object$values(statuses))
|
65
|
+
};
|
66
|
+
Bulletin.defaultProps = {
|
67
|
+
status: statuses.DEFAULT
|
68
|
+
};
|
69
|
+
Bulletin.displayName = 'Bulletin';
|
70
|
+
export default Bulletin;
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
2
|
+
import React from 'react';
|
3
|
+
import { Link, Text } from '../..';
|
4
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
5
|
+
import Bulletin from './Bulletin';
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
+
export default {
|
8
|
+
title: 'Bulletin',
|
9
|
+
component: Bulletin,
|
10
|
+
argTypes: {
|
11
|
+
status: {
|
12
|
+
control: {
|
13
|
+
type: 'select',
|
14
|
+
options: _Object$values(statuses)
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}; // main
|
19
|
+
|
20
|
+
export var Default = function Default(args) {
|
21
|
+
return ___EmotionJSX(Bulletin, args, ___EmotionJSX(Text, null, "You should be aware of this. It might be good or bad, I don\u2019t know. You may already be aware of it, but I want to be sure", ___EmotionJSX(Link, {
|
22
|
+
href: "https://pingidentity.com",
|
23
|
+
target: "_blank",
|
24
|
+
"aria-label": "".concat(statuses.DEFAULT, "-bulletin"),
|
25
|
+
variant: "app"
|
26
|
+
}, " Read More")));
|
27
|
+
};
|
28
|
+
export var ErrorStatus = function ErrorStatus() {
|
29
|
+
return ___EmotionJSX(Bulletin, {
|
30
|
+
status: statuses.ERROR
|
31
|
+
}, ___EmotionJSX(Text, null, "You\u2019ve got problems. Allow me to tell you about them in some detail so that you can address them", ___EmotionJSX(Link, {
|
32
|
+
href: "https://pingidentity.com",
|
33
|
+
target: "_blank",
|
34
|
+
"aria-label": "".concat(statuses.ERROR, "-bulletin"),
|
35
|
+
variant: "app"
|
36
|
+
}, " Read More")));
|
37
|
+
}; // Avoiding using Error as the function name due to it being a JS built-in method
|
38
|
+
|
39
|
+
ErrorStatus.storyName = 'Error';
|
40
|
+
export var Success = function Success() {
|
41
|
+
return ___EmotionJSX(Bulletin, {
|
42
|
+
status: statuses.SUCCESS
|
43
|
+
}, ___EmotionJSX(Text, null, "It Worked! Maybe there is something else related to it working that I need to explain", ___EmotionJSX(Link, {
|
44
|
+
href: "https://pingidentity.com",
|
45
|
+
target: "_blank",
|
46
|
+
"aria-label": "".concat(statuses.SUCCESS, "-bulletin"),
|
47
|
+
variant: "app"
|
48
|
+
}, " Read More")));
|
49
|
+
};
|
50
|
+
export var Warning = function Warning() {
|
51
|
+
return ___EmotionJSX(Bulletin, {
|
52
|
+
status: statuses.WARNING
|
53
|
+
}, ___EmotionJSX(Text, null, "You\u2019ve got issues. Allow me to tell you about them in some detail so that you can address them. I\u2019ll continue to type enough text to demonstrate that the Bulletin box will grow in height with the content", ___EmotionJSX(Link, {
|
54
|
+
href: "https://pingidentity.com",
|
55
|
+
target: "_blank",
|
56
|
+
"aria-label": "".concat(statuses.WARNING, "-bulletin"),
|
57
|
+
variant: "app"
|
58
|
+
}, " Read More")));
|
59
|
+
};
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
2
|
+
|
3
|
+
var _testColors;
|
4
|
+
|
5
|
+
import React from 'react';
|
6
|
+
import { screen } from '@testing-library/react';
|
7
|
+
import statuses from '../../utils/devUtils/constants/statuses';
|
8
|
+
import { render } from '../../utils/testUtils/testWrapper';
|
9
|
+
import { noticeIcons } from '../Icon/NoticeIcon';
|
10
|
+
import Bulletin, { BULLETIN_TEST_ID } from './Bulletin';
|
11
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
12
|
+
var TEST_TEXT = 'test text';
|
13
|
+
var testColors = (_testColors = {}, _defineProperty(_testColors, statuses.DEFAULT, 'var(--theme-ui-colors-text-secondary)'), _defineProperty(_testColors, statuses.ERROR, 'var(--theme-ui-colors-critical-bright)'), _defineProperty(_testColors, statuses.SUCCESS, 'var(--theme-ui-colors-success-bright)'), _defineProperty(_testColors, statuses.WARNING, 'var(--theme-ui-colors-warning-bright)'), _testColors);
|
14
|
+
|
15
|
+
var getComponent = function getComponent() {
|
16
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
17
|
+
return render(___EmotionJSX(Bulletin, props, TEST_TEXT));
|
18
|
+
};
|
19
|
+
|
20
|
+
describe('Bulletin', function () {
|
21
|
+
test('renders', function () {
|
22
|
+
getComponent();
|
23
|
+
screen.getByText(TEST_TEXT);
|
24
|
+
});
|
25
|
+
test('renders the default color', function () {
|
26
|
+
getComponent();
|
27
|
+
expect(screen.getByTestId(BULLETIN_TEST_ID)).toHaveStyle({
|
28
|
+
'border-color': testColors[statuses.DEFAULT]
|
29
|
+
});
|
30
|
+
});
|
31
|
+
test.each([[statuses.DEFAULT, testColors[statuses.DEFAULT]], [statuses.ERROR, testColors[statuses.ERROR]], [statuses.SUCCESS, testColors[statuses.SUCCESS]], [statuses.WARNING, testColors[statuses.WARNING]]])('when given status %s it renders Bulletin with color %s', function (status, expected) {
|
32
|
+
getComponent({
|
33
|
+
status: status
|
34
|
+
});
|
35
|
+
expect(screen.getByTestId(BULLETIN_TEST_ID)).toHaveStyle({
|
36
|
+
'border-color': expected
|
37
|
+
});
|
38
|
+
});
|
39
|
+
test.each([[statuses.DEFAULT, noticeIcons[statuses.DEFAULT].testid], [statuses.ERROR, noticeIcons[statuses.ERROR].testid], [statuses.SUCCESS, noticeIcons[statuses.SUCCESS].testid], [statuses.WARNING, noticeIcons[statuses.WARNING].testid]])('when given status %s it renders %s', function (status, icon) {
|
40
|
+
getComponent({
|
41
|
+
status: status
|
42
|
+
});
|
43
|
+
screen.getByTestId(icon);
|
44
|
+
});
|
45
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './Bulletin';
|
@@ -104,7 +104,7 @@ var ComboBoxInput = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
104
104
|
|
105
105
|
usePropWarning(props, 'disabled', 'isDisabled');
|
106
106
|
|
107
|
-
var button = ___EmotionJSX(Box, {
|
107
|
+
var button = !isReadOnly && ___EmotionJSX(Box, {
|
108
108
|
isRow: true,
|
109
109
|
variant: "boxes.inputInContainerSlot"
|
110
110
|
}, // Render loader after delay if filtering or loading
|
@@ -10,7 +10,7 @@ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
10
10
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
11
11
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
12
12
|
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
13
|
-
var _excluded = ["hasAutoFocus", "hasAddOption", "hasCustomValue", "hasNoEmptySelection", "selectedKey", "onSelectionChange", "defaultItems", "items", "loadingState", "onLoadMore", "inputValue", "menuTrigger", "isNotFlippable", "direction", "scrollBoxProps", "controlProps", "defaultFilter", "status", "helperText"],
|
13
|
+
var _excluded = ["hasAutoFocus", "hasAddOption", "hasCustomValue", "hasNoEmptySelection", "selectedKey", "onSelectionChange", "defaultItems", "items", "loadingState", "onLoadMore", "inputValue", "isReadOnly", "menuTrigger", "isNotFlippable", "direction", "scrollBoxProps", "controlProps", "defaultFilter", "status", "helperText"],
|
14
14
|
_excluded2 = ["shouldFocusOnHover", "shouldSelectOnPressUp"];
|
15
15
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
16
16
|
import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
|
@@ -59,6 +59,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
59
59
|
loadingState = props.loadingState,
|
60
60
|
onLoadMore = props.onLoadMore,
|
61
61
|
inputValue = props.inputValue,
|
62
|
+
isReadOnly = props.isReadOnly,
|
62
63
|
menuTrigger = props.menuTrigger,
|
63
64
|
isNotFlippable = props.isNotFlippable,
|
64
65
|
direction = props.direction,
|
@@ -135,7 +136,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
135
136
|
contains = _useFilter.contains;
|
136
137
|
|
137
138
|
var state = useComboBoxState(_objectSpread(_objectSpread({}, comboBoxOptions), {}, {
|
138
|
-
defaultItems: defaultItems,
|
139
|
+
defaultItems: isReadOnly ? [] : defaultItems,
|
139
140
|
items: items,
|
140
141
|
onSelectionChange: hasAddOption || hasCustomValue ? onSelectionChangeHandler : onSelectionChange,
|
141
142
|
defaultFilter: typeof defaultFilter !== 'undefined' ? defaultFilter : contains
|
@@ -206,7 +207,16 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
206
207
|
minWidth: menuWidth
|
207
208
|
});
|
208
209
|
|
209
|
-
var
|
210
|
+
var listBox = !isReadOnly && ___EmotionJSX(PopoverContainer, {
|
211
|
+
hasNoArrow: true,
|
212
|
+
isDismissable: true,
|
213
|
+
isNonModal: true,
|
214
|
+
isOpen: state.isOpen,
|
215
|
+
onClose: state.close,
|
216
|
+
placement: placement,
|
217
|
+
ref: popoverRef,
|
218
|
+
style: style
|
219
|
+
}, ___EmotionJSX(FocusScope, {
|
210
220
|
restoreFocus: true
|
211
221
|
}, ___EmotionJSX(DismissButton, {
|
212
222
|
onDismiss: state.close
|
@@ -222,7 +232,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
222
232
|
isSelectedOnPressUp: shouldSelectOnPressUp
|
223
233
|
}, otherListBoxProps))), ___EmotionJSX(DismissButton, {
|
224
234
|
onDismiss: state.close
|
225
|
-
}));
|
235
|
+
})));
|
226
236
|
|
227
237
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(ComboBoxInput, _extends({}, props, {
|
228
238
|
isOpen: state.isOpen,
|
@@ -234,16 +244,7 @@ var ComboBoxField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
234
244
|
triggerRef: buttonRef,
|
235
245
|
controlProps: controlProps,
|
236
246
|
"aria-invalid": status === 'error' && true
|
237
|
-
})),
|
238
|
-
hasNoArrow: true,
|
239
|
-
isDismissable: true,
|
240
|
-
isNonModal: true,
|
241
|
-
isOpen: state.isOpen,
|
242
|
-
onClose: state.close,
|
243
|
-
placement: placement,
|
244
|
-
ref: popoverRef,
|
245
|
-
style: style
|
246
|
-
}, listbox));
|
247
|
+
})), listBox);
|
247
248
|
});
|
248
249
|
ComboBoxField.propTypes = _objectSpread({
|
249
250
|
/* Whether or not adding new options to the list is enabled. */
|
@@ -478,6 +478,17 @@ export var HelperText = function HelperText() {
|
|
478
478
|
}, item.name);
|
479
479
|
}));
|
480
480
|
};
|
481
|
+
export var ReadOnly = function ReadOnly() {
|
482
|
+
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(ComboBoxField, _extends({
|
483
|
+
label: "Example label",
|
484
|
+
defaultItems: items,
|
485
|
+
isReadOnly: true
|
486
|
+
}, actions), function (item) {
|
487
|
+
return ___EmotionJSX(Item, {
|
488
|
+
key: item.name
|
489
|
+
}, item.name);
|
490
|
+
}));
|
491
|
+
};
|
481
492
|
export var Required = function Required() {
|
482
493
|
return ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(ComboBoxField, _extends({
|
483
494
|
label: "Example label",
|