@pingux/astro 1.38.0-alpha.8 → 1.38.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/CHANGELOG.md +28 -0
- package/NOTICE.html +4707 -0
- package/lib/cjs/components/Messages/Message.js +41 -27
- package/lib/cjs/components/Messages/Messages.test.js +0 -13
- package/lib/cjs/index.js +62 -85
- package/lib/cjs/styles/variants/variants.js +0 -3
- package/lib/components/Messages/Message.js +28 -21
- package/lib/components/Messages/Messages.test.js +0 -11
- package/lib/index.js +0 -2
- package/lib/styles/variants/variants.js +0 -2
- package/package.json +2 -1
- package/lib/cjs/components/Bulletin/Bulletin.js +0 -93
- package/lib/cjs/components/Bulletin/Bulletin.stories.js +0 -90
- package/lib/cjs/components/Bulletin/Bulletin.test.js +0 -70
- package/lib/cjs/components/Bulletin/index.js +0 -18
- package/lib/cjs/components/Icon/NoticeIcon.js +0 -71
- package/lib/cjs/components/Icon/NoticeIcon.test.js +0 -35
- package/lib/cjs/styles/variants/bulletin.js +0 -60
- package/lib/components/Bulletin/Bulletin.js +0 -70
- package/lib/components/Bulletin/Bulletin.stories.js +0 -59
- package/lib/components/Bulletin/Bulletin.test.js +0 -45
- package/lib/components/Bulletin/index.js +0 -1
- package/lib/components/Icon/NoticeIcon.js +0 -43
- package/lib/components/Icon/NoticeIcon.test.js +0 -24
- package/lib/styles/variants/bulletin.js +0 -41
@@ -1,59 +0,0 @@
|
|
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
|
-
};
|
@@ -1,45 +0,0 @@
|
|
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
|
-
});
|
@@ -1 +0,0 @@
|
|
1
|
-
export { default } from './Bulletin';
|
@@ -1,43 +0,0 @@
|
|
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 = ["status"];
|
5
|
-
|
6
|
-
var _noticeIcons;
|
7
|
-
|
8
|
-
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
9
|
-
import React from 'react';
|
10
|
-
import AlertCircleIcon from 'mdi-react/AlertCircleIcon';
|
11
|
-
import AlertIcon from 'mdi-react/AlertIcon';
|
12
|
-
import CheckCircleIcon from 'mdi-react/CheckCircleIcon';
|
13
|
-
import InformationIcon from 'mdi-react/InformationIcon';
|
14
|
-
import PropTypes from 'prop-types';
|
15
|
-
import { Icon } from '../..';
|
16
|
-
import statuses from '../../utils/devUtils/constants/statuses';
|
17
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
18
|
-
export var noticeIcons = (_noticeIcons = {}, _defineProperty(_noticeIcons, statuses.DEFAULT, {
|
19
|
-
icon: InformationIcon,
|
20
|
-
testid: 'default-icon-testid'
|
21
|
-
}), _defineProperty(_noticeIcons, statuses.ERROR, {
|
22
|
-
icon: AlertCircleIcon,
|
23
|
-
testid: 'error-icon-testid'
|
24
|
-
}), _defineProperty(_noticeIcons, statuses.SUCCESS, {
|
25
|
-
icon: CheckCircleIcon,
|
26
|
-
testid: 'success-icon-testid'
|
27
|
-
}), _defineProperty(_noticeIcons, statuses.WARNING, {
|
28
|
-
icon: AlertIcon,
|
29
|
-
testid: 'warning-icon-testid'
|
30
|
-
}), _noticeIcons);
|
31
|
-
export var NoticeIcon = function NoticeIcon(_ref) {
|
32
|
-
var _ref$status = _ref.status,
|
33
|
-
status = _ref$status === void 0 ? statuses.DEFAULT : _ref$status,
|
34
|
-
others = _objectWithoutProperties(_ref, _excluded);
|
35
|
-
|
36
|
-
return ___EmotionJSX(Icon, _extends({
|
37
|
-
"data-testid": noticeIcons[status].testid,
|
38
|
-
icon: noticeIcons[status].icon
|
39
|
-
}, others));
|
40
|
-
};
|
41
|
-
NoticeIcon.propTypes = {
|
42
|
-
status: PropTypes.oneOf(_Object$values(statuses))
|
43
|
-
};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { screen } from '@testing-library/react';
|
3
|
-
import statuses from '../../utils/devUtils/constants/statuses';
|
4
|
-
import { render } from '../../utils/testUtils/testWrapper';
|
5
|
-
import { NoticeIcon, noticeIcons } from './NoticeIcon';
|
6
|
-
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
-
|
8
|
-
var getComponent = function getComponent() {
|
9
|
-
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
10
|
-
return render(___EmotionJSX(NoticeIcon, props));
|
11
|
-
};
|
12
|
-
|
13
|
-
describe('NoticeIcon', function () {
|
14
|
-
test('renders', function () {
|
15
|
-
getComponent();
|
16
|
-
screen.getByTestId(noticeIcons[statuses.DEFAULT].testid);
|
17
|
-
});
|
18
|
-
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 icon with %s', function (status, icon) {
|
19
|
-
getComponent({
|
20
|
-
status: status
|
21
|
-
});
|
22
|
-
screen.getByTestId(icon);
|
23
|
-
});
|
24
|
-
});
|
@@ -1,41 +0,0 @@
|
|
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
|
-
|
11
|
-
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; }
|
12
|
-
|
13
|
-
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; }
|
14
|
-
|
15
|
-
var base = {
|
16
|
-
alignItems: 'center',
|
17
|
-
border: '1px solid',
|
18
|
-
borderColor: 'text.secondary',
|
19
|
-
fontSize: 'md',
|
20
|
-
p: '15px 12px 15px 0',
|
21
|
-
width: '600px'
|
22
|
-
};
|
23
|
-
|
24
|
-
var error = _objectSpread(_objectSpread({}, base), {}, {
|
25
|
-
borderColor: 'critical.bright'
|
26
|
-
});
|
27
|
-
|
28
|
-
var success = _objectSpread(_objectSpread({}, base), {}, {
|
29
|
-
borderColor: 'success.bright'
|
30
|
-
});
|
31
|
-
|
32
|
-
var warning = _objectSpread(_objectSpread({}, base), {}, {
|
33
|
-
borderColor: 'warning.bright'
|
34
|
-
});
|
35
|
-
|
36
|
-
export default {
|
37
|
-
base: base,
|
38
|
-
error: error,
|
39
|
-
success: success,
|
40
|
-
warning: warning
|
41
|
-
};
|