@atlaskit/smart-card 26.37.2 → 26.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.
Files changed (88) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -0
  4. package/dist/cjs/view/BlockCard/index.js +5 -18
  5. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +12 -34
  6. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +25 -51
  7. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +13 -32
  8. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +9 -31
  9. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +7 -18
  10. package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +28 -51
  11. package/dist/cjs/view/BlockCard/views/flexible/styled.js +5 -5
  12. package/dist/cjs/view/BlockCard/views/flexible/unresolved-view/index.js +41 -0
  13. package/dist/cjs/view/BlockCard/views/flexible/utils/index.js +30 -1
  14. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/index.js +12 -57
  15. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +65 -0
  16. package/dist/cjs/view/FlexibleCard/components/blocks/index.js +8 -1
  17. package/dist/cjs/view/FlexibleCard/components/blocks/snippet-block/index.js +4 -2
  18. package/dist/cjs/view/FlexibleCard/components/elements/text/index.js +3 -2
  19. package/dist/cjs/view/LinkUrl/index.js +1 -1
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -0
  22. package/dist/es2019/view/BlockCard/index.js +1 -15
  23. package/dist/es2019/view/BlockCard/views/flexible/FlexibleErroredView.js +8 -32
  24. package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenView.js +25 -52
  25. package/dist/es2019/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +12 -31
  26. package/dist/es2019/view/BlockCard/views/flexible/FlexibleNotFoundView.js +15 -41
  27. package/dist/es2019/view/BlockCard/views/flexible/FlexibleResolvedView.js +10 -21
  28. package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +24 -43
  29. package/dist/es2019/view/BlockCard/views/flexible/styled.js +3 -4
  30. package/dist/es2019/view/BlockCard/views/flexible/unresolved-view/index.js +33 -0
  31. package/dist/es2019/view/BlockCard/views/flexible/utils/index.js +27 -2
  32. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/index.js +11 -54
  33. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +56 -0
  34. package/dist/es2019/view/FlexibleCard/components/blocks/index.js +4 -1
  35. package/dist/es2019/view/FlexibleCard/components/blocks/snippet-block/index.js +3 -1
  36. package/dist/es2019/view/FlexibleCard/components/elements/text/index.js +3 -2
  37. package/dist/es2019/view/LinkUrl/index.js +1 -1
  38. package/dist/esm/utils/analytics/analytics.js +1 -1
  39. package/dist/esm/view/BlockCard/actions/flexible/AuthorizeAction.js +1 -0
  40. package/dist/esm/view/BlockCard/index.js +3 -18
  41. package/dist/esm/view/BlockCard/views/flexible/FlexibleErroredView.js +12 -34
  42. package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenView.js +26 -52
  43. package/dist/esm/view/BlockCard/views/flexible/FlexibleForbiddenViewOld.js +13 -32
  44. package/dist/esm/view/BlockCard/views/flexible/FlexibleNotFoundView.js +9 -31
  45. package/dist/esm/view/BlockCard/views/flexible/FlexibleResolvedView.js +10 -21
  46. package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +25 -45
  47. package/dist/esm/view/BlockCard/views/flexible/styled.js +4 -4
  48. package/dist/esm/view/BlockCard/views/flexible/unresolved-view/index.js +35 -0
  49. package/dist/esm/view/BlockCard/views/flexible/utils/index.js +30 -1
  50. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/index.js +13 -54
  51. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +55 -0
  52. package/dist/esm/view/FlexibleCard/components/blocks/index.js +4 -1
  53. package/dist/esm/view/FlexibleCard/components/blocks/snippet-block/index.js +4 -2
  54. package/dist/esm/view/FlexibleCard/components/elements/text/index.js +3 -2
  55. package/dist/esm/view/LinkUrl/index.js +1 -1
  56. package/dist/types/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +3 -1
  57. package/dist/types/view/BlockCard/views/flexible/styled.d.ts +0 -1
  58. package/dist/types/view/BlockCard/views/flexible/types.d.ts +2 -83
  59. package/dist/types/view/BlockCard/views/flexible/unresolved-view/index.d.ts +4 -0
  60. package/dist/types/view/BlockCard/views/flexible/unresolved-view/types.d.ts +7 -0
  61. package/dist/types/view/BlockCard/views/flexible/utils/index.d.ts +8 -0
  62. package/dist/types/view/FlexibleCard/components/blocks/footer-block/resolved/index.d.ts +4 -0
  63. package/dist/types/view/FlexibleCard/components/blocks/index.d.ts +1 -0
  64. package/dist/types/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
  65. package/dist/types/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
  66. package/dist/types-ts4.5/view/BlockCard/views/flexible/FlexibleUnauthorisedView.d.ts +3 -1
  67. package/dist/types-ts4.5/view/BlockCard/views/flexible/styled.d.ts +0 -1
  68. package/dist/types-ts4.5/view/BlockCard/views/flexible/types.d.ts +2 -83
  69. package/dist/types-ts4.5/view/BlockCard/views/flexible/unresolved-view/index.d.ts +4 -0
  70. package/dist/types-ts4.5/view/BlockCard/views/flexible/unresolved-view/types.d.ts +7 -0
  71. package/dist/types-ts4.5/view/BlockCard/views/flexible/utils/index.d.ts +8 -0
  72. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/footer-block/resolved/index.d.ts +4 -0
  73. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/index.d.ts +1 -0
  74. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/snippet-block/types.d.ts +4 -0
  75. package/dist/types-ts4.5/view/FlexibleCard/components/elements/text/types.d.ts +4 -0
  76. package/package.json +1 -1
  77. package/report.api.md +1 -0
  78. package/tmp/api-report-tmp.d.ts +1 -0
  79. package/dist/cjs/view/BlockCard/components/flexible/footer/index.js +0 -56
  80. package/dist/es2019/view/BlockCard/components/flexible/footer/index.js +0 -52
  81. package/dist/esm/view/BlockCard/components/flexible/footer/index.js +0 -49
  82. package/dist/types/view/BlockCard/components/flexible/footer/index.d.ts +0 -12
  83. package/dist/types/view/BlockCard/components/flexible/footer/types.d.ts +0 -5
  84. package/dist/types-ts4.5/view/BlockCard/components/flexible/footer/index.d.ts +0 -12
  85. package/dist/types-ts4.5/view/BlockCard/components/flexible/footer/types.d.ts +0 -5
  86. /package/dist/cjs/view/BlockCard/{components/flexible/footer → views/flexible/unresolved-view}/types.js +0 -0
  87. /package/dist/es2019/view/BlockCard/{components/flexible/footer → views/flexible/unresolved-view}/types.js +0 -0
  88. /package/dist/esm/view/BlockCard/{components/flexible/footer → views/flexible/unresolved-view}/types.js +0 -0
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
- var _react = _interopRequireDefault(require("react"));
10
- var _react2 = require("@emotion/react");
11
- var _elements = require("../../../../FlexibleCard/components/elements");
12
- var _elementGroup = _interopRequireDefault(require("../../../../FlexibleCard/components/blocks/element-group"));
13
- var _constants = require("../../../../../constants");
14
- var _actionGroup = _interopRequireDefault(require("../../../../FlexibleCard/components/blocks/action-group"));
15
- var _templateObject, _templateObject2;
16
- var getActionGroupStyles = function getActionGroupStyles(size) {
17
- if (size === _constants.SmartLinkSize.XLarge) {
18
- // The biggest height of the action button exceeds the max line-height
19
- // of the elements causing the action on the block with x-large size to
20
- // get cut at the bottom.
21
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n max-height: 2rem;\n "])));
22
- }
23
- };
24
- var providerStyles = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n span:first-child {\n margin-right: 0.375rem;\n }\n"])));
25
-
26
- /**
27
- * This Component is a footer that is used in a Block Card with Flexible UI.
28
- * It contains a provider icon if provider is present and an actions list if one is passed.
29
- * To be shown as a part of Flexible UI, needs to be wrapped inside of a CustomBlock
30
- *
31
- * @see CustomBlock
32
- * @param props are the data required for the block, such as actions to be displayed.
33
- */
34
- var BlockCardFooter = function BlockCardFooter(props) {
35
- var actions = props.actions,
36
- _props$size = props.size,
37
- size = _props$size === void 0 ? _constants.SmartLinkSize.Medium : _props$size,
38
- _props$testId = props.testId,
39
- testId = _props$testId === void 0 ? 'smart-block-card-footer' : _props$testId,
40
- _props$actionGroupApp = props.actionGroupAppearance,
41
- actionGroupAppearance = _props$actionGroupApp === void 0 ? 'default' : _props$actionGroupApp;
42
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_elements.Provider, {
43
- testId: "".concat(testId, "-provider"),
44
- overrideCss: providerStyles
45
- }), actions && actions.length > 0 ? /*#__PURE__*/_react.default.createElement(_elementGroup.default, {
46
- testId: "smart-element-group-actions",
47
- align: _constants.SmartLinkAlignment.Right,
48
- direction: _constants.SmartLinkDirection.Horizontal,
49
- overrideCss: getActionGroupStyles(size),
50
- width: _constants.SmartLinkWidth.Flexible
51
- }, /*#__PURE__*/_react.default.createElement(_actionGroup.default, {
52
- items: actions,
53
- appearance: actionGroupAppearance
54
- })) : null);
55
- };
56
- var _default = exports.default = BlockCardFooter;
@@ -1,52 +0,0 @@
1
- import React from 'react';
2
- import { css } from '@emotion/react';
3
- import { Provider } from '../../../../FlexibleCard/components/elements';
4
- import ElementGroup from '../../../../FlexibleCard/components/blocks/element-group';
5
- import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
6
- import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
7
- const getActionGroupStyles = size => {
8
- if (size === SmartLinkSize.XLarge) {
9
- // The biggest height of the action button exceeds the max line-height
10
- // of the elements causing the action on the block with x-large size to
11
- // get cut at the bottom.
12
- return css`
13
- max-height: 2rem;
14
- `;
15
- }
16
- };
17
- const providerStyles = css`
18
- span:first-child {
19
- margin-right: 0.375rem;
20
- }
21
- `;
22
-
23
- /**
24
- * This Component is a footer that is used in a Block Card with Flexible UI.
25
- * It contains a provider icon if provider is present and an actions list if one is passed.
26
- * To be shown as a part of Flexible UI, needs to be wrapped inside of a CustomBlock
27
- *
28
- * @see CustomBlock
29
- * @param props are the data required for the block, such as actions to be displayed.
30
- */
31
- const BlockCardFooter = props => {
32
- const {
33
- actions,
34
- size = SmartLinkSize.Medium,
35
- testId = 'smart-block-card-footer',
36
- actionGroupAppearance = 'default'
37
- } = props;
38
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Provider, {
39
- testId: `${testId}-provider`,
40
- overrideCss: providerStyles
41
- }), actions && actions.length > 0 ? /*#__PURE__*/React.createElement(ElementGroup, {
42
- testId: "smart-element-group-actions",
43
- align: SmartLinkAlignment.Right,
44
- direction: SmartLinkDirection.Horizontal,
45
- overrideCss: getActionGroupStyles(size),
46
- width: SmartLinkWidth.Flexible
47
- }, /*#__PURE__*/React.createElement(ActionGroup, {
48
- items: actions,
49
- appearance: actionGroupAppearance
50
- })) : null);
51
- };
52
- export default BlockCardFooter;
@@ -1,49 +0,0 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2;
3
- import React from 'react';
4
- import { css } from '@emotion/react';
5
- import { Provider } from '../../../../FlexibleCard/components/elements';
6
- import ElementGroup from '../../../../FlexibleCard/components/blocks/element-group';
7
- import { SmartLinkAlignment, SmartLinkDirection, SmartLinkSize, SmartLinkWidth } from '../../../../../constants';
8
- import ActionGroup from '../../../../FlexibleCard/components/blocks/action-group';
9
- var getActionGroupStyles = function getActionGroupStyles(size) {
10
- if (size === SmartLinkSize.XLarge) {
11
- // The biggest height of the action button exceeds the max line-height
12
- // of the elements causing the action on the block with x-large size to
13
- // get cut at the bottom.
14
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n max-height: 2rem;\n "])));
15
- }
16
- };
17
- var providerStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n span:first-child {\n margin-right: 0.375rem;\n }\n"])));
18
-
19
- /**
20
- * This Component is a footer that is used in a Block Card with Flexible UI.
21
- * It contains a provider icon if provider is present and an actions list if one is passed.
22
- * To be shown as a part of Flexible UI, needs to be wrapped inside of a CustomBlock
23
- *
24
- * @see CustomBlock
25
- * @param props are the data required for the block, such as actions to be displayed.
26
- */
27
- var BlockCardFooter = function BlockCardFooter(props) {
28
- var actions = props.actions,
29
- _props$size = props.size,
30
- size = _props$size === void 0 ? SmartLinkSize.Medium : _props$size,
31
- _props$testId = props.testId,
32
- testId = _props$testId === void 0 ? 'smart-block-card-footer' : _props$testId,
33
- _props$actionGroupApp = props.actionGroupAppearance,
34
- actionGroupAppearance = _props$actionGroupApp === void 0 ? 'default' : _props$actionGroupApp;
35
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Provider, {
36
- testId: "".concat(testId, "-provider"),
37
- overrideCss: providerStyles
38
- }), actions && actions.length > 0 ? /*#__PURE__*/React.createElement(ElementGroup, {
39
- testId: "smart-element-group-actions",
40
- align: SmartLinkAlignment.Right,
41
- direction: SmartLinkDirection.Horizontal,
42
- overrideCss: getActionGroupStyles(size),
43
- width: SmartLinkWidth.Flexible
44
- }, /*#__PURE__*/React.createElement(ActionGroup, {
45
- items: actions,
46
- appearance: actionGroupAppearance
47
- })) : null);
48
- };
49
- export default BlockCardFooter;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { BlockCardFooterProps } from './types';
3
- /**
4
- * This Component is a footer that is used in a Block Card with Flexible UI.
5
- * It contains a provider icon if provider is present and an actions list if one is passed.
6
- * To be shown as a part of Flexible UI, needs to be wrapped inside of a CustomBlock
7
- *
8
- * @see CustomBlock
9
- * @param props are the data required for the block, such as actions to be displayed.
10
- */
11
- declare const BlockCardFooter: React.FC<BlockCardFooterProps>;
12
- export default BlockCardFooter;
@@ -1,5 +0,0 @@
1
- import { Appearance } from '@atlaskit/button';
2
- import { FooterBlockProps } from '../../../../FlexibleCard/components/blocks/footer-block/types';
3
- export type BlockCardFooterProps = {
4
- actionGroupAppearance?: Appearance;
5
- } & FooterBlockProps;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import { BlockCardFooterProps } from './types';
3
- /**
4
- * This Component is a footer that is used in a Block Card with Flexible UI.
5
- * It contains a provider icon if provider is present and an actions list if one is passed.
6
- * To be shown as a part of Flexible UI, needs to be wrapped inside of a CustomBlock
7
- *
8
- * @see CustomBlock
9
- * @param props are the data required for the block, such as actions to be displayed.
10
- */
11
- declare const BlockCardFooter: React.FC<BlockCardFooterProps>;
12
- export default BlockCardFooter;
@@ -1,5 +0,0 @@
1
- import { Appearance } from '@atlaskit/button';
2
- import { FooterBlockProps } from '../../../../FlexibleCard/components/blocks/footer-block/types';
3
- export type BlockCardFooterProps = {
4
- actionGroupAppearance?: Appearance;
5
- } & FooterBlockProps;