@pingux/astro 2.129.0-alpha.4 → 2.129.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/lib/cjs/components/Callout/Callout.js +14 -16
  2. package/lib/cjs/components/Callout/Callout.stories.d.ts +9 -0
  3. package/lib/cjs/components/Callout/Callout.stories.js +24 -1
  4. package/lib/cjs/components/Callout/Callout.styles.d.ts +14 -22
  5. package/lib/cjs/components/Callout/Callout.styles.js +19 -23
  6. package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.d.ts +2 -0
  7. package/lib/cjs/components/Callout/stories/CalloutNextGenComponent.js +33 -0
  8. package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.d.ts +6 -0
  9. package/lib/cjs/components/Callout/stories/NextGenCallout.chromatic.stories.js +22 -0
  10. package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.d.ts +6 -0
  11. package/lib/cjs/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +22 -0
  12. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +3 -41
  13. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.d.ts +27 -0
  14. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/callout.js +35 -0
  15. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +26 -0
  16. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +2 -0
  17. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +4 -4
  18. package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.d.ts +4 -4
  19. package/lib/cjs/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
  20. package/lib/cjs/styles/themes/next-gen/convertedComponentList.d.ts +1 -0
  21. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +3 -2
  22. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +33 -0
  23. package/lib/cjs/styles/themes/next-gen/variants/callout.d.ts +34 -0
  24. package/lib/cjs/styles/themes/next-gen/variants/callout.js +45 -0
  25. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +33 -0
  26. package/lib/cjs/styles/themes/next-gen/variants/variants.js +2 -0
  27. package/lib/cjs/types/callout.d.ts +2 -0
  28. package/lib/components/Callout/Callout.js +14 -16
  29. package/lib/components/Callout/Callout.stories.js +22 -0
  30. package/lib/components/Callout/Callout.styles.js +19 -24
  31. package/lib/components/Callout/stories/CalloutNextGenComponent.js +24 -0
  32. package/lib/components/Callout/stories/NextGenCallout.chromatic.stories.js +12 -0
  33. package/lib/components/Callout/stories/NextGenDarkCallout.chomatic.stories.js +12 -0
  34. package/lib/styles/themeOverrides/nextGenDarkMode/variants/callout.js +27 -0
  35. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +2 -0
  36. package/lib/styles/themes/astro/customProperties/tShirtSizes.js +4 -4
  37. package/lib/styles/themes/next-gen/convertedComponentList.js +3 -2
  38. package/lib/styles/themes/next-gen/variants/callout.js +36 -0
  39. package/lib/styles/themes/next-gen/variants/variants.js +2 -0
  40. package/package.json +1 -1
@@ -14,33 +14,25 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-c
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
15
15
  var _react = _interopRequireWildcard(require("react"));
16
16
  var _ = require("../..");
17
+ var _hooks = require("../../hooks");
17
18
  var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/statuses"));
18
19
  var _NoticeIcon = require("../Icon/NoticeIcon");
19
20
  var _react2 = require("@emotion/react");
20
- var _excluded = ["children", "status", "icon"];
21
+ var _excluded = ["children", "status", "icon", "className", "iconProps"];
21
22
  var _calloutProps;
22
23
  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); }
23
24
  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; }
24
25
  var CALLOUT_TEST_ID = 'CalloutTestId';
25
26
  exports.CALLOUT_TEST_ID = CALLOUT_TEST_ID;
26
27
  var calloutProps = (_calloutProps = {}, (0, _defineProperty2["default"])(_calloutProps, _statuses["default"].DEFAULT, {
27
- color: 'text.secondary',
28
- variant: 'callout.base'
28
+ color: 'text.secondary'
29
29
  }), (0, _defineProperty2["default"])(_calloutProps, _statuses["default"].ERROR, {
30
- color: 'critical.bright',
31
- variant: 'callout.error'
30
+ color: 'critical.bright'
32
31
  }), (0, _defineProperty2["default"])(_calloutProps, _statuses["default"].SUCCESS, {
33
- color: 'success.bright',
34
- variant: 'callout.success'
32
+ color: 'success.bright'
35
33
  }), (0, _defineProperty2["default"])(_calloutProps, _statuses["default"].WARNING, {
36
- color: 'warning.bright',
37
- variant: 'callout.warning'
34
+ color: 'warning.bright'
38
35
  }), _calloutProps);
39
- var defaultIconProps = {
40
- mr: 'md',
41
- ml: 'md',
42
- size: 'md'
43
- };
44
36
 
45
37
  /**
46
38
  Please note, Callout is a static component, the [Messages](./?path=/docs/components-messages)
@@ -53,18 +45,24 @@ var Callout = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
53
45
  _ref$status = _ref.status,
54
46
  status = _ref$status === void 0 ? _statuses["default"].DEFAULT : _ref$status,
55
47
  icon = _ref.icon,
48
+ className = _ref.className,
49
+ iconProps = _ref.iconProps,
56
50
  others = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
51
+ var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (0, _defineProperty2["default"])({}, "is-".concat(status), true)),
52
+ statusClasses = _useStatusClasses.classNames;
57
53
  return (0, _react2.jsx)(_.Box, (0, _extends2["default"])({
58
54
  ref: ref,
59
55
  "data-testid": CALLOUT_TEST_ID,
60
56
  isRow: true,
61
57
  role: "note",
62
- variant: calloutProps[status].variant
58
+ variant: "callout.base",
59
+ className: statusClasses
63
60
  }, others), icon || (0, _react2.jsx)(_NoticeIcon.NoticeIcon, (0, _extends2["default"])({
64
61
  color: calloutProps[status].color,
65
62
  status: status,
63
+ variant: "callout.icon",
66
64
  "aria-label": "".concat(status, "-icon")
67
- }, defaultIconProps)), children);
65
+ }, iconProps)), children);
68
66
  });
69
67
  Callout.displayName = 'Callout';
70
68
  var _default = Callout;
@@ -4,6 +4,7 @@ import { CalloutProps } from '../../types/callout';
4
4
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("@storybook/types").Args>;
5
5
  export default _default;
6
6
  export declare const Default: StoryFn<CalloutProps>;
7
+ export declare const Customizations: () => React.JSX.Element;
7
8
  export declare const ErrorStatus: StoryFn;
8
9
  export declare const Success: StoryFn;
9
10
  export declare const WithLink: {
@@ -13,6 +14,14 @@ export declare const WithLink: {
13
14
  type: string;
14
15
  url: string;
15
16
  };
17
+ a11y: {
18
+ config: {
19
+ rules: {
20
+ id: string;
21
+ enabled: boolean;
22
+ }[];
23
+ };
24
+ };
16
25
  };
17
26
  };
18
27
  export declare const Warning: StoryFn;
@@ -12,11 +12,12 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
12
12
  _Object$defineProperty(exports, "__esModule", {
13
13
  value: true
14
14
  });
15
- exports["default"] = exports.WithLink = exports.WithCustomIcon = exports.Warning = exports.Success = exports.ErrorStatus = exports.Default = void 0;
15
+ exports["default"] = exports.WithLink = exports.WithCustomIcon = exports.Warning = exports.Success = exports.ErrorStatus = exports.Default = exports.Customizations = void 0;
16
16
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
17
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
18
18
  var _react = _interopRequireDefault(require("react"));
19
19
  var _CheckBoldIcon = _interopRequireDefault(require("@pingux/mdi-react/CheckBoldIcon"));
20
+ var _LightbulbOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/LightbulbOutlineIcon"));
20
21
  var _storybookAddonDesigns = require("storybook-addon-designs");
21
22
  var _storybookDocsLayout = _interopRequireDefault(require("../../../.storybook/storybookDocsLayout"));
22
23
  var _index = require("../../index");
@@ -56,6 +57,20 @@ Default.parameters = {
56
57
  url: _figmaLinks.FIGMA_LINKS.callout["default"]
57
58
  }
58
59
  };
60
+ var Customizations = function Customizations() {
61
+ return (0, _react2.jsx)(_index.Callout, {
62
+ icon: (0, _react2.jsx)(_index.Icon, {
63
+ icon: _LightbulbOutlineIcon["default"],
64
+ size: "sm",
65
+ color: "teal-500",
66
+ mr: "md"
67
+ }),
68
+ sx: {
69
+ borderLeftColor: 'teal-500'
70
+ }
71
+ }, (0, _react2.jsx)(_index.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat."));
72
+ };
73
+ exports.Customizations = Customizations;
59
74
  var ErrorStatus = function ErrorStatus(args) {
60
75
  return (0, _react2.jsx)(_index.Callout, (0, _extends2["default"])({
61
76
  status: _statuses["default"].ERROR
@@ -96,6 +111,14 @@ WithLink.parameters = {
96
111
  design: {
97
112
  type: 'figma',
98
113
  url: _figmaLinks.FIGMA_LINKS.callout.withLink
114
+ },
115
+ a11y: {
116
+ config: {
117
+ rules: [{
118
+ id: 'color-contrast',
119
+ enabled: false
120
+ }]
121
+ }
99
122
  }
100
123
  };
101
124
  var Warning = function Warning(args) {
@@ -6,30 +6,22 @@ declare const _default: {
6
6
  fontSize: string;
7
7
  p: string;
8
8
  width: string;
9
+ '&.is-success, > .is-success': {
10
+ borderColor: string;
11
+ };
12
+ '&.is-warning, > .is-warning': {
13
+ borderColor: string;
14
+ };
15
+ '&.is-error, > .is-error': {
16
+ borderColor: string;
17
+ };
9
18
  };
10
- error: {
11
- borderColor: string;
12
- alignItems: string;
13
- border: string;
14
- fontSize: string;
15
- p: string;
16
- width: string;
17
- };
18
- success: {
19
- borderColor: string;
20
- alignItems: string;
21
- border: string;
22
- fontSize: string;
23
- p: string;
24
- width: string;
25
- };
26
- warning: {
27
- borderColor: string;
28
- alignItems: string;
29
- border: string;
30
- fontSize: string;
31
- p: string;
19
+ icon: {
20
+ mr: string;
21
+ ml: string;
22
+ minWidth: string;
32
23
  width: string;
24
+ height: string;
33
25
  };
34
26
  };
35
27
  export default _default;
@@ -1,42 +1,38 @@
1
1
  "use strict";
2
2
 
3
- var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
4
- var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
5
- var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
6
- var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
7
- var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
8
- var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
9
- var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
10
3
  var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
11
4
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
12
5
  _Object$defineProperty(exports, "__esModule", {
13
6
  value: true
14
7
  });
15
8
  exports["default"] = void 0;
16
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
- 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; }
18
- 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; }
9
+ var _tShirtSizes = _interopRequireDefault(require("../../styles/themes/astro/customProperties/tShirtSizes"));
19
10
  var base = {
20
11
  alignItems: 'center',
21
12
  border: '1px solid',
22
13
  borderColor: 'text.secondary',
23
14
  fontSize: 'md',
24
15
  p: '15px 12px 15px 0',
25
- width: '600px'
16
+ width: '600px',
17
+ '&.is-success, > .is-success': {
18
+ borderColor: 'success.bright'
19
+ },
20
+ '&.is-warning, > .is-warning': {
21
+ borderColor: 'warning.bright'
22
+ },
23
+ '&.is-error, > .is-error': {
24
+ borderColor: 'critical.bright'
25
+ }
26
+ };
27
+ var icon = {
28
+ mr: 'md',
29
+ ml: 'md',
30
+ minWidth: "".concat(_tShirtSizes["default"].md, " !important"),
31
+ width: "".concat(_tShirtSizes["default"].md, " !important"),
32
+ height: "".concat(_tShirtSizes["default"].md, " !important")
26
33
  };
27
- var error = _objectSpread(_objectSpread({}, base), {}, {
28
- borderColor: 'critical.bright'
29
- });
30
- var success = _objectSpread(_objectSpread({}, base), {}, {
31
- borderColor: 'success.bright'
32
- });
33
- var warning = _objectSpread(_objectSpread({}, base), {}, {
34
- borderColor: 'warning.bright'
35
- });
36
34
  var _default = {
37
35
  base: base,
38
- error: error,
39
- success: success,
40
- warning: warning
36
+ icon: icon
41
37
  };
42
38
  exports["default"] = _default;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CalloutNextGenComponent: () => React.JSX.Element;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.CalloutNextGenComponent = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _LightbulbOutlineIcon = _interopRequireDefault(require("@pingux/mdi-react/LightbulbOutlineIcon"));
11
+ var _ = require("../../..");
12
+ var _statuses = _interopRequireDefault(require("../../../utils/devUtils/constants/statuses"));
13
+ var _react2 = require("@emotion/react");
14
+ var CalloutNextGenComponent = function CalloutNextGenComponent() {
15
+ return (0, _react2.jsx)(_.Box, {
16
+ gap: "md"
17
+ }, (0, _react2.jsx)(_.Callout, null, (0, _react2.jsx)(_.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), (0, _react2.jsx)(_.Callout, {
18
+ status: _statuses["default"].SUCCESS
19
+ }, (0, _react2.jsx)(_.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), (0, _react2.jsx)(_.Callout, {
20
+ status: _statuses["default"].WARNING
21
+ }, (0, _react2.jsx)(_.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), (0, _react2.jsx)(_.Callout, {
22
+ status: _statuses["default"].ERROR
23
+ }, (0, _react2.jsx)(_.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), (0, _react2.jsx)(_.Callout, {
24
+ status: _statuses["default"].SUCCESS,
25
+ icon: (0, _react2.jsx)(_.Icon, {
26
+ icon: _LightbulbOutlineIcon["default"],
27
+ size: "sm",
28
+ color: "success.bright",
29
+ mr: "md"
30
+ })
31
+ }, (0, _react2.jsx)(_.Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")));
32
+ };
33
+ exports.CalloutNextGenComponent = CalloutNextGenComponent;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const Default: () => React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.Default = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _ = require("../../..");
11
+ var _CalloutNextGenComponent = require("./CalloutNextGenComponent");
12
+ var _react2 = require("@emotion/react");
13
+ var _default = {
14
+ title: 'Chromatic Only Onyx Callout'
15
+ };
16
+ exports["default"] = _default;
17
+ var Default = function Default() {
18
+ return (0, _react2.jsx)(_.AstroProvider, {
19
+ theme: _.NextGenTheme
20
+ }, (0, _react2.jsx)(_CalloutNextGenComponent.CalloutNextGenComponent, null));
21
+ };
22
+ exports.Default = Default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const Default: () => React.JSX.Element;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = exports.Default = void 0;
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _ = require("../../..");
11
+ var _CalloutNextGenComponent = require("./CalloutNextGenComponent");
12
+ var _react2 = require("@emotion/react");
13
+ var _default = {
14
+ title: 'Chromatic Only Onyx Dark Callout'
15
+ };
16
+ exports["default"] = _default;
17
+ var Default = function Default() {
18
+ return (0, _react2.jsx)(_.AstroProvider, {
19
+ themeOverrides: [_.NextGenDarkTheme]
20
+ }, (0, _react2.jsx)(_CalloutNextGenComponent.CalloutNextGenComponent, null));
21
+ };
22
+ exports.Default = Default;
@@ -6,9 +6,6 @@ export declare const baseState: {
6
6
  isCustom: boolean;
7
7
  };
8
8
  declare const useGetTheme: () => {
9
- styles: {
10
- navButtonEstHeight: number;
11
- };
12
9
  icons: {
13
10
  [x: number]: import("@pingux/mdi-react").MdiReactIconComponentType;
14
11
  MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
@@ -16,49 +13,14 @@ declare const useGetTheme: () => {
16
13
  pingLogoHorizontalSmall: import("react").JSX.Element;
17
14
  listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
18
15
  };
16
+ styles: {
17
+ navButtonEstHeight: number;
18
+ };
19
19
  tShirtSizes: {
20
20
  xxs: string;
21
- 'icon-100': string;
22
21
  xs: string;
23
- 'icon-200': string;
24
22
  sm: string;
25
- 'icon-300': string;
26
23
  md: string;
27
- 'icon-400': string;
28
- 'icon-500': string;
29
- 'icon-600': string;
30
- 'icon-700': string;
31
- 'icon-800': string;
32
- 'icon-900': string;
33
- };
34
- iconWrapperSizes: {
35
- sm: number;
36
- md: number;
37
- lg: number;
38
- };
39
- themeState: {
40
- isOnyx: boolean;
41
- isAstro: boolean;
42
- isOnyxDark: boolean;
43
- isCustom: boolean;
44
- };
45
- name: string;
46
- } | {
47
- icons: {
48
- [x: number]: import("@pingux/mdi-react").MdiReactIconComponentType;
49
- MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
50
- MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
51
- pingLogoHorizontalSmall: import("react").JSX.Element;
52
- listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
53
- };
54
- styles: {
55
- navButtonEstHeight: number;
56
- };
57
- tShirtSizes: {
58
- xxs: number;
59
- xs: number;
60
- sm: number;
61
- md: number;
62
24
  };
63
25
  iconWrapperSizes: {
64
26
  sm: number;
@@ -0,0 +1,27 @@
1
+ declare const _default: {
2
+ base: {
3
+ color: string;
4
+ '> span': {
5
+ color: string;
6
+ };
7
+ '& > svg > path': {
8
+ fill: string;
9
+ };
10
+ '&.is-success, > .is-success': {
11
+ '& > svg > path': {
12
+ fill: string;
13
+ };
14
+ };
15
+ '&.is-warning, > .is-warning': {
16
+ '& > svg > path': {
17
+ fill: string;
18
+ };
19
+ };
20
+ '&.is-error, > .is-error': {
21
+ '& > svg > path': {
22
+ fill: string;
23
+ };
24
+ };
25
+ };
26
+ };
27
+ export default _default;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var base = {
9
+ color: 'text.secondary',
10
+ '> span': {
11
+ color: 'text.secondary'
12
+ },
13
+ '& > svg > path': {
14
+ fill: 'text.secondary'
15
+ },
16
+ '&.is-success, > .is-success': {
17
+ '& > svg > path': {
18
+ fill: 'text.secondary'
19
+ }
20
+ },
21
+ '&.is-warning, > .is-warning': {
22
+ '& > svg > path': {
23
+ fill: 'text.secondary'
24
+ }
25
+ },
26
+ '&.is-error, > .is-error': {
27
+ '& > svg > path': {
28
+ fill: 'text.secondary'
29
+ }
30
+ }
31
+ };
32
+ var _default = {
33
+ base: base
34
+ };
35
+ exports["default"] = _default;
@@ -474,6 +474,32 @@ declare const _default: {
474
474
  };
475
475
  };
476
476
  };
477
+ callout: {
478
+ base: {
479
+ color: string;
480
+ '> span': {
481
+ color: string;
482
+ };
483
+ '& > svg > path': {
484
+ fill: string;
485
+ };
486
+ '&.is-success, > .is-success': {
487
+ '& > svg > path': {
488
+ fill: string;
489
+ };
490
+ };
491
+ '&.is-warning, > .is-warning': {
492
+ '& > svg > path': {
493
+ fill: string;
494
+ };
495
+ };
496
+ '&.is-error, > .is-error': {
497
+ '& > svg > path': {
498
+ fill: string;
499
+ };
500
+ };
501
+ };
502
+ };
477
503
  table: {
478
504
  caption: {
479
505
  color: string;
@@ -7,6 +7,7 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
  var _avatar = require("./avatar");
10
+ var _callout = _interopRequireDefault(require("./callout"));
10
11
  var _footer = require("./footer");
11
12
  var _iconBadge = _interopRequireDefault(require("./iconBadge"));
12
13
  var _listview = require("./listview");
@@ -125,6 +126,7 @@ var _default = {
125
126
  }
126
127
  }
127
128
  },
129
+ callout: _callout["default"],
128
130
  table: {
129
131
  caption: {
130
132
  color: 'text.secondary'
@@ -11,10 +11,10 @@ export declare const astroThemeValues: {
11
11
  navButtonEstHeight: number;
12
12
  };
13
13
  tShirtSizes: {
14
- xxs: number;
15
- xs: number;
16
- sm: number;
17
- md: number;
14
+ xxs: string;
15
+ xs: string;
16
+ sm: string;
17
+ md: string;
18
18
  };
19
19
  iconWrapperSizes: {
20
20
  sm: number;
@@ -1,8 +1,8 @@
1
1
  declare const _default: {
2
- xxs: number;
3
- xs: number;
4
- sm: number;
5
- md: number;
2
+ xxs: string;
3
+ xs: string;
4
+ sm: string;
5
+ md: string;
6
6
  };
7
7
  export default _default;
8
8
  export declare const iconWrapperSizes: {
@@ -6,10 +6,10 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.iconWrapperSizes = exports["default"] = void 0;
8
8
  var _default = {
9
- xxs: 9,
10
- xs: 15,
11
- sm: 20,
12
- md: 25
9
+ xxs: '9px',
10
+ xs: '15px',
11
+ sm: '20px',
12
+ md: '25px'
13
13
  };
14
14
  exports["default"] = _default;
15
15
  var iconWrapperSizes = {
@@ -13,6 +13,7 @@ export declare const astroBlacklistStory: {
13
13
  DataTable: string[];
14
14
  NavBar: string[];
15
15
  SearchField: string[];
16
+ Callout: string[];
16
17
  };
17
18
  export declare const nextGenOnlyComponents: string[];
18
19
  export default nextGenConvertedComponents;
@@ -5,7 +5,7 @@ _Object$defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.nextGenOnlyComponents = exports["default"] = exports.componentSpecificNextGenBlacklist = exports.astroBlacklistStory = void 0;
8
- var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination', 'Table', 'TableBase'];
8
+ var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination', 'Callout', 'Table', 'TableBase'];
9
9
  var componentSpecificNextGenBlacklist = {
10
10
  AstroProvider: ['Default', 'With Custom Theme Override'],
11
11
  Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
@@ -20,7 +20,8 @@ exports.componentSpecificNextGenBlacklist = componentSpecificNextGenBlacklist;
20
20
  var astroBlacklistStory = {
21
21
  DataTable: ['Onyx Default'],
22
22
  NavBar: ['Onyx Default'],
23
- SearchField: ['Onyx With Filter']
23
+ SearchField: ['Onyx With Filter'],
24
+ Callout: ['Customizations']
24
25
  };
25
26
  exports.astroBlacklistStory = astroBlacklistStory;
26
27
  var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer'];
@@ -3728,6 +3728,39 @@ declare const _default: {
3728
3728
  color: string;
3729
3729
  };
3730
3730
  };
3731
+ callout: {
3732
+ base: {
3733
+ width: string;
3734
+ backgroundColor: string;
3735
+ lineHeight: string;
3736
+ p: string;
3737
+ border: string;
3738
+ borderLeft: string;
3739
+ borderLeftColor: string;
3740
+ borderRadius: string;
3741
+ alignItems: string;
3742
+ color: string;
3743
+ '&.is-success, > .is-success': {
3744
+ borderColor: string;
3745
+ borderLeftColor: string;
3746
+ };
3747
+ '&.is-warning, > .is-warning': {
3748
+ borderColor: string;
3749
+ borderLeftColor: string;
3750
+ };
3751
+ '&.is-error, > .is-error': {
3752
+ borderColor: string;
3753
+ borderLeftColor: string;
3754
+ };
3755
+ };
3756
+ icon: {
3757
+ ml: string;
3758
+ mr: string;
3759
+ minWidth: string;
3760
+ width: string;
3761
+ height: string;
3762
+ };
3763
+ };
3731
3764
  table: {
3732
3765
  container: {
3733
3766
  overflow: string;
@@ -0,0 +1,34 @@
1
+ declare const _default: {
2
+ base: {
3
+ width: string;
4
+ backgroundColor: string;
5
+ lineHeight: string;
6
+ p: string;
7
+ border: string;
8
+ borderLeft: string;
9
+ borderLeftColor: string;
10
+ borderRadius: string;
11
+ alignItems: string;
12
+ color: string;
13
+ '&.is-success, > .is-success': {
14
+ borderColor: string;
15
+ borderLeftColor: string;
16
+ };
17
+ '&.is-warning, > .is-warning': {
18
+ borderColor: string;
19
+ borderLeftColor: string;
20
+ };
21
+ '&.is-error, > .is-error': {
22
+ borderColor: string;
23
+ borderLeftColor: string;
24
+ };
25
+ };
26
+ icon: {
27
+ ml: string;
28
+ mr: string;
29
+ minWidth: string;
30
+ width: string;
31
+ height: string;
32
+ };
33
+ };
34
+ export default _default;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
5
+ _Object$defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+ var _tShirtSizes = _interopRequireDefault(require("../customProperties/tShirtSizes"));
10
+ var base = {
11
+ width: '100%',
12
+ backgroundColor: 'background.secondary',
13
+ lineHeight: 'md',
14
+ p: 'md',
15
+ border: 'none',
16
+ borderLeft: '5px solid',
17
+ borderLeftColor: 'active',
18
+ borderRadius: '.25rem',
19
+ alignItems: 'flex-start',
20
+ color: 'text.primary',
21
+ '&.is-success, > .is-success': {
22
+ borderColor: 'unset',
23
+ borderLeftColor: 'success.bright'
24
+ },
25
+ '&.is-warning, > .is-warning': {
26
+ borderColor: 'unset',
27
+ borderLeftColor: 'warning.bright'
28
+ },
29
+ '&.is-error, > .is-error': {
30
+ borderColor: 'unset',
31
+ borderLeftColor: 'critical.bright'
32
+ }
33
+ };
34
+ var icon = {
35
+ ml: '0',
36
+ mr: 'md',
37
+ minWidth: "".concat(_tShirtSizes["default"].sm, " !important"),
38
+ width: "".concat(_tShirtSizes["default"].sm, " !important"),
39
+ height: "".concat(_tShirtSizes["default"].sm, " !important")
40
+ };
41
+ var _default = {
42
+ base: base,
43
+ icon: icon
44
+ };
45
+ exports["default"] = _default;
@@ -1328,6 +1328,39 @@ declare const _default: {
1328
1328
  color: string;
1329
1329
  };
1330
1330
  };
1331
+ callout: {
1332
+ base: {
1333
+ width: string;
1334
+ backgroundColor: string;
1335
+ lineHeight: string;
1336
+ p: string;
1337
+ border: string;
1338
+ borderLeft: string;
1339
+ borderLeftColor: string;
1340
+ borderRadius: string;
1341
+ alignItems: string;
1342
+ color: string;
1343
+ '&.is-success, > .is-success': {
1344
+ borderColor: string;
1345
+ borderLeftColor: string;
1346
+ };
1347
+ '&.is-warning, > .is-warning': {
1348
+ borderColor: string;
1349
+ borderLeftColor: string;
1350
+ };
1351
+ '&.is-error, > .is-error': {
1352
+ borderColor: string;
1353
+ borderLeftColor: string;
1354
+ };
1355
+ };
1356
+ icon: {
1357
+ ml: string;
1358
+ mr: string;
1359
+ minWidth: string;
1360
+ width: string;
1361
+ height: string;
1362
+ };
1363
+ };
1331
1364
  table: {
1332
1365
  container: {
1333
1366
  overflow: string;
@@ -19,6 +19,7 @@ var _Skeleton = _interopRequireDefault(require("../../../../components/Skeleton/
19
19
  var _codeView = _interopRequireDefault(require("../codeView/codeView"));
20
20
  var _avatar = require("./avatar");
21
21
  var _button = _interopRequireDefault(require("./button"));
22
+ var _callout = _interopRequireDefault(require("./callout"));
22
23
  var _dataTable = require("./dataTable");
23
24
  var _footer = require("./footer");
24
25
  var _iconWrapper = _interopRequireDefault(require("./iconWrapper"));
@@ -392,6 +393,7 @@ var _default = {
392
393
  tooltip: _tooltip["default"],
393
394
  footer: _footer.footer,
394
395
  loader: loader,
396
+ callout: _callout["default"],
395
397
  table: _table.table,
396
398
  tableBase: _tableBase.tableBase
397
399
  };
@@ -1,7 +1,9 @@
1
1
  /// <reference types="react" />
2
+ import { IconProps } from './icon';
2
3
  import { Status } from './item';
3
4
  import { DOMAttributes, StyleProps } from './shared';
4
5
  export interface CalloutProps extends StyleProps, DOMAttributes {
5
6
  status?: Status;
6
7
  icon?: React.ReactNode;
8
+ iconProps?: IconProps;
7
9
  }
@@ -1,32 +1,24 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
3
3
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
4
- var _excluded = ["children", "status", "icon"];
4
+ var _excluded = ["children", "status", "icon", "className", "iconProps"];
5
5
  var _calloutProps;
6
6
  import React, { forwardRef } from 'react';
7
7
  import { Box } from '../..';
8
+ import { useStatusClasses } from '../../hooks';
8
9
  import statuses from '../../utils/devUtils/constants/statuses';
9
10
  import { NoticeIcon } from '../Icon/NoticeIcon';
10
11
  import { jsx as ___EmotionJSX } from "@emotion/react";
11
12
  export var CALLOUT_TEST_ID = 'CalloutTestId';
12
13
  var calloutProps = (_calloutProps = {}, _defineProperty(_calloutProps, statuses.DEFAULT, {
13
- color: 'text.secondary',
14
- variant: 'callout.base'
14
+ color: 'text.secondary'
15
15
  }), _defineProperty(_calloutProps, statuses.ERROR, {
16
- color: 'critical.bright',
17
- variant: 'callout.error'
16
+ color: 'critical.bright'
18
17
  }), _defineProperty(_calloutProps, statuses.SUCCESS, {
19
- color: 'success.bright',
20
- variant: 'callout.success'
18
+ color: 'success.bright'
21
19
  }), _defineProperty(_calloutProps, statuses.WARNING, {
22
- color: 'warning.bright',
23
- variant: 'callout.warning'
20
+ color: 'warning.bright'
24
21
  }), _calloutProps);
25
- var defaultIconProps = {
26
- mr: 'md',
27
- ml: 'md',
28
- size: 'md'
29
- };
30
22
 
31
23
  /**
32
24
  Please note, Callout is a static component, the [Messages](./?path=/docs/components-messages)
@@ -39,18 +31,24 @@ var Callout = /*#__PURE__*/forwardRef(function (_ref, ref) {
39
31
  _ref$status = _ref.status,
40
32
  status = _ref$status === void 0 ? statuses.DEFAULT : _ref$status,
41
33
  icon = _ref.icon,
34
+ className = _ref.className,
35
+ iconProps = _ref.iconProps,
42
36
  others = _objectWithoutProperties(_ref, _excluded);
37
+ var _useStatusClasses = useStatusClasses(className, _defineProperty({}, "is-".concat(status), true)),
38
+ statusClasses = _useStatusClasses.classNames;
43
39
  return ___EmotionJSX(Box, _extends({
44
40
  ref: ref,
45
41
  "data-testid": CALLOUT_TEST_ID,
46
42
  isRow: true,
47
43
  role: "note",
48
- variant: calloutProps[status].variant
44
+ variant: "callout.base",
45
+ className: statusClasses
49
46
  }, others), icon || ___EmotionJSX(NoticeIcon, _extends({
50
47
  color: calloutProps[status].color,
51
48
  status: status,
49
+ variant: "callout.icon",
52
50
  "aria-label": "".concat(status, "-icon")
53
- }, defaultIconProps)), children);
51
+ }, iconProps)), children);
54
52
  });
55
53
  Callout.displayName = 'Callout';
56
54
  export default Callout;
@@ -12,6 +12,7 @@ function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (
12
12
  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; }
13
13
  import React from 'react';
14
14
  import CheckBoldIcon from '@pingux/mdi-react/CheckBoldIcon';
15
+ import LightbulbOutlineIcon from '@pingux/mdi-react/LightbulbOutlineIcon';
15
16
  import { withDesign } from 'storybook-addon-designs';
16
17
  import DocsLayout from '../../../.storybook/storybookDocsLayout';
17
18
  import { Box, Callout, Icon, Link, Text } from '../../index';
@@ -49,6 +50,19 @@ Default.parameters = {
49
50
  url: FIGMA_LINKS.callout["default"]
50
51
  }
51
52
  };
53
+ export var Customizations = function Customizations() {
54
+ return ___EmotionJSX(Callout, {
55
+ icon: ___EmotionJSX(Icon, {
56
+ icon: LightbulbOutlineIcon,
57
+ size: "sm",
58
+ color: "teal-500",
59
+ mr: "md"
60
+ }),
61
+ sx: {
62
+ borderLeftColor: 'teal-500'
63
+ }
64
+ }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat."));
65
+ };
52
66
  export var ErrorStatus = function ErrorStatus(args) {
53
67
  return ___EmotionJSX(Callout, _extends({
54
68
  status: statuses.ERROR
@@ -86,6 +100,14 @@ WithLink.parameters = {
86
100
  design: {
87
101
  type: 'figma',
88
102
  url: FIGMA_LINKS.callout.withLink
103
+ },
104
+ a11y: {
105
+ config: {
106
+ rules: [{
107
+ id: 'color-contrast',
108
+ enabled: false
109
+ }]
110
+ }
89
111
  }
90
112
  };
91
113
  export var Warning = function Warning(args) {
@@ -1,34 +1,29 @@
1
- import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
2
- import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
3
- import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
4
- import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
5
- import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
6
- import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
- import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
- import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
- import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
- function ownKeys(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; }
11
- 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; }
1
+ import tShirtSizes from '../../styles/themes/astro/customProperties/tShirtSizes';
12
2
  var base = {
13
3
  alignItems: 'center',
14
4
  border: '1px solid',
15
5
  borderColor: 'text.secondary',
16
6
  fontSize: 'md',
17
7
  p: '15px 12px 15px 0',
18
- width: '600px'
8
+ width: '600px',
9
+ '&.is-success, > .is-success': {
10
+ borderColor: 'success.bright'
11
+ },
12
+ '&.is-warning, > .is-warning': {
13
+ borderColor: 'warning.bright'
14
+ },
15
+ '&.is-error, > .is-error': {
16
+ borderColor: 'critical.bright'
17
+ }
18
+ };
19
+ var icon = {
20
+ mr: 'md',
21
+ ml: 'md',
22
+ minWidth: "".concat(tShirtSizes.md, " !important"),
23
+ width: "".concat(tShirtSizes.md, " !important"),
24
+ height: "".concat(tShirtSizes.md, " !important")
19
25
  };
20
- var error = _objectSpread(_objectSpread({}, base), {}, {
21
- borderColor: 'critical.bright'
22
- });
23
- var success = _objectSpread(_objectSpread({}, base), {}, {
24
- borderColor: 'success.bright'
25
- });
26
- var warning = _objectSpread(_objectSpread({}, base), {}, {
27
- borderColor: 'warning.bright'
28
- });
29
26
  export default {
30
27
  base: base,
31
- error: error,
32
- success: success,
33
- warning: warning
28
+ icon: icon
34
29
  };
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import LightbulbOutlineIcon from '@pingux/mdi-react/LightbulbOutlineIcon';
3
+ import { Box, Callout, Icon, Text } from '../../..';
4
+ import statuses from '../../../utils/devUtils/constants/statuses';
5
+ import { jsx as ___EmotionJSX } from "@emotion/react";
6
+ export var CalloutNextGenComponent = function CalloutNextGenComponent() {
7
+ return ___EmotionJSX(Box, {
8
+ gap: "md"
9
+ }, ___EmotionJSX(Callout, null, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
10
+ status: statuses.SUCCESS
11
+ }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
12
+ status: statuses.WARNING
13
+ }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
14
+ status: statuses.ERROR
15
+ }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")), ___EmotionJSX(Callout, {
16
+ status: statuses.SUCCESS,
17
+ icon: ___EmotionJSX(Icon, {
18
+ icon: LightbulbOutlineIcon,
19
+ size: "sm",
20
+ color: "success.bright",
21
+ mr: "md"
22
+ })
23
+ }, ___EmotionJSX(Text, null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque vitae lacinia diam, nec ullamcorper neque. In egestas dui vel dolor tincidunt, sit amet ullamcorper leo consequat.")));
24
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { AstroProvider, NextGenTheme } from '../../..';
3
+ import { CalloutNextGenComponent } from './CalloutNextGenComponent';
4
+ import { jsx as ___EmotionJSX } from "@emotion/react";
5
+ export default {
6
+ title: 'Chromatic Only Onyx Callout'
7
+ };
8
+ export var Default = function Default() {
9
+ return ___EmotionJSX(AstroProvider, {
10
+ theme: NextGenTheme
11
+ }, ___EmotionJSX(CalloutNextGenComponent, null));
12
+ };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { AstroProvider, NextGenDarkTheme } from '../../..';
3
+ import { CalloutNextGenComponent } from './CalloutNextGenComponent';
4
+ import { jsx as ___EmotionJSX } from "@emotion/react";
5
+ export default {
6
+ title: 'Chromatic Only Onyx Dark Callout'
7
+ };
8
+ export var Default = function Default() {
9
+ return ___EmotionJSX(AstroProvider, {
10
+ themeOverrides: [NextGenDarkTheme]
11
+ }, ___EmotionJSX(CalloutNextGenComponent, null));
12
+ };
@@ -0,0 +1,27 @@
1
+ var base = {
2
+ color: 'text.secondary',
3
+ '> span': {
4
+ color: 'text.secondary'
5
+ },
6
+ '& > svg > path': {
7
+ fill: 'text.secondary'
8
+ },
9
+ '&.is-success, > .is-success': {
10
+ '& > svg > path': {
11
+ fill: 'text.secondary'
12
+ }
13
+ },
14
+ '&.is-warning, > .is-warning': {
15
+ '& > svg > path': {
16
+ fill: 'text.secondary'
17
+ }
18
+ },
19
+ '&.is-error, > .is-error': {
20
+ '& > svg > path': {
21
+ fill: 'text.secondary'
22
+ }
23
+ }
24
+ };
25
+ export default {
26
+ base: base
27
+ };
@@ -1,4 +1,5 @@
1
1
  import { avatar } from './avatar';
2
+ import callout from './callout';
2
3
  import { footer } from './footer';
3
4
  import iconBadge from './iconBadge';
4
5
  import { listView, listViewItem, lisViewItemChart } from './listview';
@@ -117,6 +118,7 @@ export default {
117
118
  }
118
119
  }
119
120
  },
121
+ callout: callout,
120
122
  table: {
121
123
  caption: {
122
124
  color: 'text.secondary'
@@ -1,8 +1,8 @@
1
1
  export default {
2
- xxs: 9,
3
- xs: 15,
4
- sm: 20,
5
- md: 25
2
+ xxs: '9px',
3
+ xs: '15px',
4
+ sm: '20px',
5
+ md: '25px'
6
6
  };
7
7
  export var iconWrapperSizes = {
8
8
  sm: 18,
@@ -1,4 +1,4 @@
1
- var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination', 'Table', 'TableBase'];
1
+ var nextGenConvertedComponents = ['DataTable', 'Message', 'Button', 'Badge', 'IconButton', 'CheckboxField', 'Messages', 'PopoverMenu', 'TextField', 'PasswordField', 'SearchField', 'SelectField', 'Modal', 'RadioField', 'MultiValuesField', 'TextAreaField', 'RadioGroupField', 'RockerButtonGroup', 'Tabs', 'ProgressBar', 'NavBar', 'OverlayPanel', 'AstroProvider', 'ListView', 'NavigationHeader', 'Avatar', 'MultivaluesField', 'Text', 'Link', 'Card', 'IconWrapper', 'ComboBoxField', 'CodeView', 'Sticker Sheet', 'NextGen ListViewItem', 'Skeleton', 'TooltipTrigger', 'ListViewItem', 'Pagination', 'Callout', 'Table', 'TableBase'];
2
2
  export var componentSpecificNextGenBlacklist = {
3
3
  AstroProvider: ['Default', 'With Custom Theme Override'],
4
4
  Badge: ['Status Badge Variants', 'Badge With Left Slot And Icon', 'Callout Badges', 'Removable'],
@@ -12,7 +12,8 @@ export var componentSpecificNextGenBlacklist = {
12
12
  export var astroBlacklistStory = {
13
13
  DataTable: ['Onyx Default'],
14
14
  NavBar: ['Onyx Default'],
15
- SearchField: ['Onyx With Filter']
15
+ SearchField: ['Onyx With Filter'],
16
+ Callout: ['Customizations']
16
17
  };
17
18
  export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response', 'Suggestions', 'Prompt Input', 'Footer'];
18
19
  export default nextGenConvertedComponents;
@@ -0,0 +1,36 @@
1
+ import tShirtSizes from '../customProperties/tShirtSizes';
2
+ var base = {
3
+ width: '100%',
4
+ backgroundColor: 'background.secondary',
5
+ lineHeight: 'md',
6
+ p: 'md',
7
+ border: 'none',
8
+ borderLeft: '5px solid',
9
+ borderLeftColor: 'active',
10
+ borderRadius: '.25rem',
11
+ alignItems: 'flex-start',
12
+ color: 'text.primary',
13
+ '&.is-success, > .is-success': {
14
+ borderColor: 'unset',
15
+ borderLeftColor: 'success.bright'
16
+ },
17
+ '&.is-warning, > .is-warning': {
18
+ borderColor: 'unset',
19
+ borderLeftColor: 'warning.bright'
20
+ },
21
+ '&.is-error, > .is-error': {
22
+ borderColor: 'unset',
23
+ borderLeftColor: 'critical.bright'
24
+ }
25
+ };
26
+ var icon = {
27
+ ml: '0',
28
+ mr: 'md',
29
+ minWidth: "".concat(tShirtSizes.sm, " !important"),
30
+ width: "".concat(tShirtSizes.sm, " !important"),
31
+ height: "".concat(tShirtSizes.sm, " !important")
32
+ };
33
+ export default {
34
+ base: base,
35
+ icon: icon
36
+ };
@@ -14,6 +14,7 @@ import skeleton from '../../../../components/Skeleton/Skeleton.styles';
14
14
  import codeView from '../codeView/codeView';
15
15
  import { avatar } from './avatar';
16
16
  import button from './button';
17
+ import callout from './callout';
17
18
  import { dataTable } from './dataTable';
18
19
  import { footer } from './footer';
19
20
  import iconWrapper from './iconWrapper';
@@ -383,6 +384,7 @@ export default {
383
384
  tooltip: tooltip,
384
385
  footer: footer,
385
386
  loader: loader,
387
+ callout: callout,
386
388
  table: table,
387
389
  tableBase: tableBase
388
390
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.129.0-alpha.4",
3
+ "version": "2.129.0-alpha.5",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",