@atlaskit/smart-card 46.10.2 → 46.10.3

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 (117) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/analytics.spec.yaml +2 -39
  3. package/compass.yml +3 -0
  4. package/dist/cjs/messages.js +15 -45
  5. package/dist/cjs/utils/analytics/analytics.js +1 -1
  6. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  7. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
  8. package/dist/cjs/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
  9. package/dist/cjs/view/FlexibleCard/components/actions/action/index.js +1 -0
  10. package/dist/cjs/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  11. package/dist/cjs/view/LinkUrl/index.js +1 -1
  12. package/dist/es2019/messages.js +15 -57
  13. package/dist/es2019/utils/analytics/analytics.js +1 -1
  14. package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  15. package/dist/es2019/view/FlexibleCard/components/actions/action/action-button/index.js +12 -5
  16. package/dist/es2019/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +3 -0
  17. package/dist/es2019/view/FlexibleCard/components/actions/action/index.js +1 -0
  18. package/dist/es2019/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  19. package/dist/es2019/view/LinkUrl/index.js +1 -1
  20. package/dist/esm/messages.js +15 -45
  21. package/dist/esm/utils/analytics/analytics.js +1 -1
  22. package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +1 -9
  23. package/dist/esm/view/FlexibleCard/components/actions/action/action-button/index.js +14 -5
  24. package/dist/esm/view/FlexibleCard/components/actions/action/action-dropdown-item/index.js +4 -1
  25. package/dist/esm/view/FlexibleCard/components/actions/action/index.js +1 -0
  26. package/dist/esm/view/FlexibleCard/components/actions/preview-action/index.js +13 -2
  27. package/dist/esm/view/LinkUrl/index.js +1 -1
  28. package/dist/types/common/analytics/generated/analytics.types.d.ts +1 -17
  29. package/dist/types/messages.d.ts +1 -1
  30. package/dist/types/view/EmbedCard/views/unauthorized-view/index.d.ts +2 -2
  31. package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/index.d.ts +1 -1
  32. package/dist/types/view/FlexibleCard/components/actions/action/action-dropdown-item/types.d.ts +1 -0
  33. package/package.json +5 -5
  34. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  35. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  36. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  37. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  38. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  39. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  40. package/dist/cjs/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  41. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  42. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +0 -158
  43. package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  44. package/dist/cjs/view/EmbedCard/components/carousel/index.js +0 -127
  45. package/dist/cjs/view/EmbedCard/components/carousel/types.js +0 -5
  46. package/dist/cjs/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -207
  47. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  48. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -31
  49. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -16
  50. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -16
  51. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  52. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -22
  53. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -47
  54. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -359
  55. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -281
  56. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -364
  57. package/dist/cjs/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  58. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  59. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  60. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  61. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  62. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  63. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  64. package/dist/es2019/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  65. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  66. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +0 -145
  67. package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  68. package/dist/es2019/view/EmbedCard/components/carousel/index.js +0 -105
  69. package/dist/es2019/view/EmbedCard/components/carousel/types.js +0 -1
  70. package/dist/es2019/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -200
  71. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  72. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -25
  73. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -3
  74. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -3
  75. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  76. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -13
  77. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
  78. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -353
  79. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -269
  80. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -358
  81. package/dist/es2019/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  82. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-dropbox-in-atlas-slide1--default.png +0 -3
  83. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide1--default.png +0 -3
  84. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide2--default.png +0 -3
  85. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-figma-in-trello-slide3--default.png +0 -3
  86. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide1--default.png +0 -3
  87. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide2--default.png +0 -3
  88. package/dist/esm/__tests__/vr-tests/__snapshots__/embed-card/embed-card-unauthorized-carousel-google-in-confluence-slide3--default.png +0 -3
  89. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +0 -64
  90. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +0 -149
  91. package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +0 -12
  92. package/dist/esm/view/EmbedCard/components/carousel/index.js +0 -118
  93. package/dist/esm/view/EmbedCard/components/carousel/types.js +0 -1
  94. package/dist/esm/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.js +0 -198
  95. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.compiled.css +0 -7
  96. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.js +0 -24
  97. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.js +0 -5
  98. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.js +0 -5
  99. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.compiled.css +0 -6
  100. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.js +0 -15
  101. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.js +0 -40
  102. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.js +0 -352
  103. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.js +0 -274
  104. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.js +0 -357
  105. package/dist/esm/view/EmbedCard/views/unauthorized-view/carousel-images/assets/rovo-chat-avatar.png +0 -0
  106. package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +0 -39
  107. package/dist/types/view/EmbedCard/components/carousel/index.d.ts +0 -26
  108. package/dist/types/view/EmbedCard/components/carousel/types.d.ts +0 -32
  109. package/dist/types/view/EmbedCard/views/unauthorized-view/UnauthorizedCarouselView.d.ts +0 -4
  110. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/IconSlot.d.ts +0 -14
  111. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoChatBenefitImage.d.ts +0 -3
  112. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/LazyRovoSearchBenefitImage.d.ts +0 -3
  113. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/NoAuthAvailableImage.d.ts +0 -7
  114. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/ProductIcon.d.ts +0 -9
  115. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoChatBenefitImage.d.ts +0 -8
  116. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/RovoSearchBenefitImage.d.ts +0 -8
  117. package/dist/types/view/EmbedCard/views/unauthorized-view/carousel-images/SmartLinkBenefitImage.d.ts +0 -7
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:55cb12f84d40dd2b6bee4db43867a39dbf2b0d05c3e2308b8ef34d8b28bb27d1
3
- size 25709
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:989ac8f92f0c838230266ab902f9d9e7379935da694fb537e85a26f435921de8
3
- size 32759
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:4c2eb37ff49aa3c03c7a8988b9cdfdbda7ebca007a41ad5d91679cc08a0349f1
3
- size 36663
@@ -1,64 +0,0 @@
1
- ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
2
- ._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
3
- ._zulp1ejb{gap:var(--ds-space-300,24px)}
4
- ._zulppxbi{gap:var(--ds-space-200,1pc)}
5
- ._zulpu2gc{gap:var(--ds-space-100,8px)}
6
- ._zulpze3t{gap:var(--ds-space-0,0)}._154iidpf{top:0}
7
- ._16jlkb7n{flex-grow:1}
8
- ._18m915vq{overflow-y:hidden}
9
- ._18m91wug{overflow-y:auto}
10
- ._19bv1jfw{padding-left:var(--ds-space-500,40px)}
11
- ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
12
- ._19bvze3t{padding-left:var(--ds-space-0,0)}
13
- ._1bah1h6o{justify-content:center}
14
- ._1bah1y6m{justify-content:flex-start}
15
- ._1bah1yb4{justify-content:space-between}
16
- ._1bsb1osq{width:100%}
17
- ._1bsb1tcg{width:24px}
18
- ._1bsb7vkz{width:1pc}
19
- ._1bsbftgi{width:8px}
20
- ._1e0c1txw{display:flex}
21
- ._1e0c1ule{display:block}
22
- ._1ltvidpf{left:0}
23
- ._1n261g80{flex-wrap:wrap}
24
- ._1n261q9c{flex-wrap:nowrap}
25
- ._1o9zidpf{flex-shrink:0}
26
- ._1o9zkb7n{flex-shrink:1}
27
- ._1oecfnf5{transition-duration:.2s}
28
- ._1reo15vq{overflow-x:hidden}
29
- ._1reo1wug{overflow-x:auto}
30
- ._1tkeidpf{min-height:0}
31
- ._1ul9idpf{min-width:0}
32
- ._2lx21bp4{flex-direction:column}
33
- ._2lx2vrvc{flex-direction:row}
34
- ._4cvr1fhb{align-items:stretch}
35
- ._4cvr1h6o{align-items:center}
36
- ._4cvr1y6m{align-items:flex-start}
37
- ._4t3i1osq{height:100%}
38
- ._4t3i1tcg{height:24px}
39
- ._4t3i7vkz{height:1pc}
40
- ._4t3iftgi{height:8px}
41
- ._5ral1f51{object-fit:contain}
42
- ._6fl45ucs{transition-timing-function:ease}
43
- ._bfhk9pm7{background-color:var(--ds-background-information-subtle,#8fb8f6)}
44
- ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
45
- ._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
46
- ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
47
- ._c71l1wdt{max-height:220px}
48
- ._ca0q1jfw{padding-top:var(--ds-space-500,40px)}
49
- ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
50
- ._ca0qze3t{padding-top:var(--ds-space-0,0)}
51
- ._i0dlghg7{flex-basis:240px}
52
- ._i0dluuw1{flex-basis:200px}
53
- ._k8m01k61{transition-property:background-color}
54
- ._kqswh2mm{position:relative}
55
- ._kqswstnw{position:absolute}
56
- ._lcxvglyw{pointer-events:none}
57
- ._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
58
- ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
59
- ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
60
- ._rsufaqso{object-position:center center}
61
- ._u5f31jfw{padding-right:var(--ds-space-500,40px)}
62
- ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
63
- ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
64
- ._vchhusvi{box-sizing:border-box}
@@ -1,145 +0,0 @@
1
- /* CarouselSlide.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import "./CarouselSlide.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React, { useMemo } from 'react';
5
- import { useIntl } from 'react-intl';
6
- import Button from '@atlaskit/button/default/button';
7
- import { cx } from '@atlaskit/css';
8
- import Heading from '@atlaskit/heading/heading';
9
- import SmartLinkIcon from '@atlaskit/icon/core/smart-link';
10
- import IconTile from '@atlaskit/icon/icon-tile';
11
- import Image from '@atlaskit/image';
12
- import { Box } from '@atlaskit/primitives/compiled/box';
13
- import { Pressable } from '@atlaskit/primitives/compiled/pressable';
14
- import { Text } from '@atlaskit/primitives/compiled/text';
15
- import { messages } from '../../../../messages';
16
- const styles = {
17
- columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7 _1reo15vq _18m915vq _1e0c1txw _4cvr1fhb _1bah1y6m _1tkeidpf _1ul9idpf _bfhk9pm7",
18
- imageContainer: "_kqswh2mm _1bsb1osq _4t3i1osq",
19
- imageAbsolute: "_kqswstnw _154iidpf _1ltvidpf _1bsb1osq",
20
- columnContent: "_zulp1ejb _16jlkb7n _1o9zkb7n _i0dluuw1 _1reo1wug _18m91wug _1e0c1txw _2lx21bp4 _1tkeidpf _ca0q1jfw _u5f31jfw _n3td1jfw _19bv1jfw _4cvr1y6m _1bah1yb4",
21
- columnContentTop: "_zulppxbi _1e0c1txw _2lx21bp4 _4cvr1y6m _1bsb1osq",
22
- columnContentBody: "_zulp1ejb _1e0c1txw _2lx21bp4 _4cvr1y6m _1bsb1osq",
23
- columnContentCompact: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
24
- dot: "_2rko1rr0 _1bsbftgi _4t3iftgi _bfhki8nm _1oecfnf5 _k8m01k61 _6fl45ucs _lcxvglyw",
25
- dotActive: "_bfhkjmqp",
26
- dotPassable: "_2rko1rr0 _1e0c1txw _4cvr1h6o _1bah1h6o _1bsb7vkz _4t3i7vkz _bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
27
- icon: "_2rko12b0 _1reo15vq _18m915vq _1o9zidpf _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o",
28
- iconImage: "_1bsb1osq _4t3i1osq _5ral1f51",
29
- image: "_1bsb1osq _c71l1wdt _5ral1f51 _rsufaqso _1e0c1ule",
30
- rowButton: "_zulpu2gc _1e0c1txw _2lx2vrvc _1n261g80 _4cvr1h6o",
31
- rowButtonCompact: "_1bsb1osq",
32
- rowDot: "_zulpze3t _1e0c1txw _2lx2vrvc _4cvr1h6o",
33
- rowIcon: "_zulpu2gc _1e0c1txw _4cvr1h6o",
34
- slide: "_1reo15vq _18m915vq _1e0c1txw _1n261q9c _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
35
- };
36
- const CarouselSlide = ({
37
- icon,
38
- iconLabel = '',
39
- title,
40
- description,
41
- image,
42
- primaryButtonLabel,
43
- onPrimaryButtonClick,
44
- onDotClick,
45
- onNextClick,
46
- slideIndex,
47
- totalSlides,
48
- size,
49
- testId = 'embed-card-carousel-slide'
50
- }) => {
51
- const {
52
- formatMessage
53
- } = useIntl();
54
- const isCompact = size !== 'full';
55
- const showPrimaryButton = typeof onPrimaryButtonClick === 'function';
56
- const showNavigation = totalSlides > 1;
57
- const renderedIcon = useMemo(() => {
58
- if (typeof icon === 'string') {
59
- return /*#__PURE__*/React.createElement(Box, {
60
- xcss: styles.icon
61
- }, /*#__PURE__*/React.createElement(Image, {
62
- src: icon,
63
- alt: iconLabel,
64
- className: ax([styles.iconImage])
65
- }));
66
- }
67
- if (icon) {
68
- return /*#__PURE__*/React.createElement(Box, {
69
- xcss: styles.icon
70
- }, icon);
71
- }
72
- return /*#__PURE__*/React.createElement(IconTile, {
73
- appearance: "blue",
74
- icon: SmartLinkIcon,
75
- label: iconLabel,
76
- size: "small",
77
- testId: "embed-card-fallback-icon"
78
- });
79
- }, [icon, iconLabel]);
80
- const renderedImage = image == null ? null : typeof image === 'string' ? /*#__PURE__*/React.createElement(Image, {
81
- src: image,
82
- alt: title,
83
- className: ax([styles.image])
84
- }) : image;
85
- return /*#__PURE__*/React.createElement(Box, {
86
- xcss: styles.slide,
87
- testId: testId
88
- }, /*#__PURE__*/React.createElement(Box, {
89
- xcss: cx(styles.columnContent, isCompact && styles.columnContentCompact)
90
- }, /*#__PURE__*/React.createElement(Box, {
91
- xcss: styles.columnContentTop
92
- }, showPrimaryButton && isCompact && /*#__PURE__*/React.createElement(Box, {
93
- xcss: cx(styles.rowButton, styles.rowButtonCompact)
94
- }, /*#__PURE__*/React.createElement(Button, {
95
- appearance: "primary",
96
- onClick: onPrimaryButtonClick,
97
- shouldFitContainer: true,
98
- testId: `${testId}-connect-compact`
99
- }, primaryButtonLabel)), renderedIcon && /*#__PURE__*/React.createElement(Box, {
100
- xcss: styles.rowIcon
101
- }, renderedIcon), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Heading, {
102
- size: "medium",
103
- testId: `${testId}-title`
104
- }, title)), /*#__PURE__*/React.createElement(Box, {
105
- xcss: styles.columnContentBody
106
- }, /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
107
- testId: `${testId}-description`
108
- }, description)), (showPrimaryButton && !isCompact || showNavigation && onNextClick) && /*#__PURE__*/React.createElement(Box, {
109
- xcss: styles.rowButton
110
- }, showPrimaryButton && !isCompact && /*#__PURE__*/React.createElement(Button, {
111
- appearance: "primary",
112
- onClick: onPrimaryButtonClick,
113
- testId: `${testId}-connect`
114
- }, primaryButtonLabel), showNavigation && onNextClick && /*#__PURE__*/React.createElement(Button, {
115
- appearance: "subtle",
116
- onClick: onNextClick,
117
- testId: `${testId}-next`
118
- }, formatMessage(messages.connect_link_account_embed_carousel_button_next))))), showNavigation && /*#__PURE__*/React.createElement(Box, {
119
- xcss: styles.rowDot,
120
- role: "group",
121
- "aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_row_label)
122
- }, Array.from({
123
- length: totalSlides
124
- }, (_, i) => /*#__PURE__*/React.createElement(Pressable, {
125
- key: i,
126
- xcss: styles.dotPassable,
127
- onClick: () => onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(i),
128
- "aria-label": formatMessage(messages.connect_link_account_embed_carousel_dot_label, {
129
- index: i + 1,
130
- total: totalSlides
131
- }),
132
- "aria-current": i === slideIndex ? 'true' : undefined,
133
- testId: `${testId}-dot-${i}`
134
- }, /*#__PURE__*/React.createElement(Box, {
135
- xcss: cx(styles.dot, i === slideIndex && styles.dotActive)
136
- }))))), !isCompact && /*#__PURE__*/React.createElement(Box, {
137
- xcss: styles.columnImage,
138
- testId: `${testId}-image-panel-${slideIndex}`
139
- }, /*#__PURE__*/React.createElement(Box, {
140
- xcss: styles.imageContainer
141
- }, /*#__PURE__*/React.createElement(Box, {
142
- xcss: styles.imageAbsolute
143
- }, renderedImage))));
144
- };
145
- export default CarouselSlide;
@@ -1,12 +0,0 @@
1
- ._18m915vq{overflow-y:hidden}
2
- ._1bsb1osq{width:100%}
3
- ._1e0c1txw{display:flex}
4
- ._1o511hrf{animation-fill-mode:both}
5
- ._1pglafbj{animation-timing-function:cubic-bezier(.25,.46,.45,.94)}
6
- ._1reo15vq{overflow-x:hidden}
7
- ._4t3i1osq{height:100%}
8
- ._5sagjx92{animation-duration:.28s}
9
- ._j7hq1wwu{animation-name:kgnpaw5}
10
- ._kqswh2mm{position:relative}
11
- @keyframes kgnpaw5{0%{opacity:0}to{opacity:1}}
12
- @media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._2hwzhgkh{animation-duration:.01ms}}
@@ -1,105 +0,0 @@
1
- /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import "./index.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React, { useCallback, useEffect, useRef, useState } from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled/box';
6
- import CarouselSlide from './CarouselSlide';
7
- const styles = {
8
- carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
9
- };
10
- const fadeIn = null;
11
- const slideWrapperMap = {
12
- static: "_1bsb1osq _4t3i1osq",
13
- animated: "_1bsb1osq _4t3i1osq _j7hq1wwu _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
14
- };
15
- /**
16
- * Derives layout size bucket from pixel dimensions.
17
- * Used instead of CSS @container queries (which are blocked by the linter)
18
- * to control which elements are shown at different card sizes.
19
- */
20
- const getSize = (width, height) => {
21
- if (width < 200 || height < 100) {
22
- return 'minimal';
23
- }
24
- if (width < 400 || height < 140) {
25
- return 'compact';
26
- }
27
- return 'full';
28
- };
29
- const Carousel = ({
30
- icon,
31
- iconLabel,
32
- initialSlideIndex = 0,
33
- items,
34
- onNextClick,
35
- onPrimaryButtonClick,
36
- primaryButtonLabel,
37
- testId = 'embed-card-teaser-carousel'
38
- }) => {
39
- const [activeIndex, setActiveIndex] = useState(initialSlideIndex);
40
- const [size, setSize] = useState('full');
41
-
42
- // Tracks whether the user has navigated at least once.
43
- // The first slide is rendered statically (no animation) to avoid any
44
- // CSS animation running during SSR or on the initial paint.
45
- const hasNavigated = useRef(false);
46
- const containerRef = useRef(null);
47
-
48
- // Observe the carousel container's size and update the layout bucket.
49
- useEffect(() => {
50
- const el = containerRef.current;
51
- if (!el) {
52
- return;
53
- }
54
- const observer = new ResizeObserver(([entry]) => {
55
- const {
56
- width,
57
- height
58
- } = entry.contentRect;
59
- setSize(getSize(width, height));
60
- });
61
- observer.observe(el);
62
- return () => observer.disconnect();
63
- }, []);
64
- const goNext = useCallback(() => {
65
- hasNavigated.current = true;
66
- onNextClick === null || onNextClick === void 0 ? void 0 : onNextClick(items[activeIndex].id);
67
- setActiveIndex(current => (current + 1) % items.length);
68
- }, [items, activeIndex, onNextClick]);
69
- const goTo = useCallback(index => {
70
- if (index === activeIndex) {
71
- return;
72
- }
73
- hasNavigated.current = true;
74
- setActiveIndex(index);
75
- }, [activeIndex]);
76
- const handlePrimaryButtonClick = useCallback(() => {
77
- onPrimaryButtonClick === null || onPrimaryButtonClick === void 0 ? void 0 : onPrimaryButtonClick(items[activeIndex].id);
78
- }, [onPrimaryButtonClick, items, activeIndex]);
79
- const currentSlide = items[activeIndex];
80
- const isLastSlide = activeIndex === items.length - 1;
81
- return /*#__PURE__*/React.createElement(Box, {
82
- ref: containerRef,
83
- xcss: styles.carousel,
84
- testId: testId
85
- }, /*#__PURE__*/React.createElement(Box, {
86
- key: activeIndex,
87
- xcss: slideWrapperMap[hasNavigated.current ? 'animated' : 'static'],
88
- "aria-live": "polite"
89
- }, /*#__PURE__*/React.createElement(CarouselSlide, {
90
- primaryButtonLabel: primaryButtonLabel,
91
- description: currentSlide.description,
92
- icon: icon,
93
- iconLabel: iconLabel,
94
- image: currentSlide.image,
95
- title: currentSlide.title,
96
- onPrimaryButtonClick: onPrimaryButtonClick ? handlePrimaryButtonClick : undefined,
97
- onDotClick: goTo,
98
- onNextClick: !isLastSlide ? goNext : undefined,
99
- size: size,
100
- slideIndex: activeIndex,
101
- testId: `${testId}-slide`,
102
- totalSlides: items.length
103
- })));
104
- };
105
- export default Carousel;
@@ -1,200 +0,0 @@
1
- import React, { Suspense, useCallback, useMemo } from 'react';
2
- import { useIntl } from 'react-intl';
3
- import { di } from 'react-magnetic-di';
4
- import LinkGlyph from '@atlaskit/icon/core/link';
5
- import SmartLinkIcon from '@atlaskit/icon/core/smart-link';
6
- import IconTile from '@atlaskit/icon/icon-tile';
7
- import Image from '@atlaskit/image/image';
8
- import { useAnalyticsEvents } from '../../../../common/analytics/generated/use-analytics-events';
9
- import { messages } from '../../../../messages';
10
- import useRovoConfig from '../../../../state/hooks/use-rovo-config';
11
- import Carousel from '../../components/carousel';
12
- import { ExpandedFrame } from '../../components/ExpandedFrame';
13
- import { ImageIcon } from '../../components/ImageIcon';
14
- import LazyRovoChatBenefitImage from './carousel-images/LazyRovoChatBenefitImage';
15
- import LazyRovoSearchBenefitImage from './carousel-images/LazyRovoSearchBenefitImage';
16
- import NoAuthAvailableImage from './carousel-images/NoAuthAvailableImage';
17
- import ProductIcon from './carousel-images/ProductIcon';
18
- import SmartLinkBenefitImage from './carousel-images/SmartLinkBenefitImage';
19
- const PARENT_PRODUCT = {
20
- ATLAS: 'ATLAS',
21
- BITBUCKET: 'BITBUCKET',
22
- CONFLUENCE: 'CONFLUENCE',
23
- CSM: 'JIRA',
24
- JPD: 'JIRA',
25
- JSM: 'JIRA',
26
- JSW: 'JIRA',
27
- JWM: 'JIRA',
28
- TRELLO: 'TRELLO'
29
- };
30
- const PRODUCT_COMPANION = {
31
- ATLAS: 'ATLAS',
32
- BITBUCKET: 'BITBUCKET',
33
- CONFLUENCE: 'JIRA',
34
- JIRA: 'CONFLUENCE',
35
- TRELLO: 'TRELLO'
36
- };
37
- const UnauthorizedCarouselView = ({
38
- context,
39
- frameStyle,
40
- inheritDimensions,
41
- isSelected,
42
- onAuthorize,
43
- onClick,
44
- testId = 'embed-card-unauthorized-view',
45
- url
46
- }) => {
47
- const intl = useIntl();
48
- const {
49
- fireEvent
50
- } = useAnalyticsEvents();
51
- const {
52
- rovoOptions,
53
- product
54
- } = useRovoConfig();
55
- const canAuthorize = typeof onAuthorize === 'function';
56
- const providerName = context === null || context === void 0 ? void 0 : context.text;
57
- const providerIcon = useMemo(() => {
58
- var _ref, _context$iconLabel;
59
- const iconLabel = (_ref = (_context$iconLabel = context === null || context === void 0 ? void 0 : context.iconLabel) !== null && _context$iconLabel !== void 0 ? _context$iconLabel : context === null || context === void 0 ? void 0 : context.text) !== null && _ref !== void 0 ? _ref : '';
60
- if (typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string') {
61
- return /*#__PURE__*/React.createElement(Image, {
62
- src: context.icon,
63
- alt: iconLabel
64
- });
65
- }
66
- if (context !== null && context !== void 0 && context.icon) {
67
- return context.icon;
68
- }
69
- return /*#__PURE__*/React.createElement(IconTile, {
70
- appearance: "blue",
71
- icon: SmartLinkIcon,
72
- label: iconLabel,
73
- size: "small",
74
- testId: "embed-card-fallback-icon"
75
- });
76
- }, [context]);
77
- const items = useMemo(() => {
78
- if (!canAuthorize) {
79
- return [{
80
- id: 'no-auth-available',
81
- title: intl.formatMessage(messages.unauthorised_account_name_no_provider),
82
- description: intl.formatMessage(messages.unauthorised_account_description_no_provider),
83
- image: /*#__PURE__*/React.createElement(NoAuthAvailableImage, null)
84
- }];
85
- }
86
- const parentProduct = product ? PARENT_PRODUCT[product] : undefined;
87
- const parentProductIcon = /*#__PURE__*/React.createElement(ProductIcon, {
88
- product: parentProduct
89
- });
90
- const parentProductAlt = parentProduct ? PRODUCT_COMPANION[parentProduct] : parentProduct;
91
- const parentProductIconAlt = /*#__PURE__*/React.createElement(ProductIcon, {
92
- product: parentProductAlt
93
- });
94
-
95
- // We only have special text for Google Drive and i18n select takes only one word (no space).
96
- const i18nSelectContext = (context === null || context === void 0 ? void 0 : context.text) === 'Google Drive' ? 'Google' : context === null || context === void 0 ? void 0 : context.text;
97
- const slides = [{
98
- id: 'smart-link-benefit',
99
- title: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_title),
100
- description: intl.formatMessage(messages.connect_link_account_embed_carousel_sl_description, {
101
- context: i18nSelectContext,
102
- product: parentProduct
103
- }),
104
- image: /*#__PURE__*/React.createElement(SmartLinkBenefitImage, {
105
- productIcon: parentProductIcon,
106
- providerIcon: providerIcon
107
- })
108
- }];
109
-
110
- // If the link has an unauthorized status and provides an onAuthorize callback,
111
- // it is likely a 3P (third-party) link and is supported by Rovo. In that case,
112
- // we show additional Rovo-specific teaser slides to encourage the user to connect their account.
113
- if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled) {
114
- slides.push({
115
- id: 'rovo-search-benefit',
116
- title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_title),
117
- description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovo_description, {
118
- context: providerName,
119
- product: parentProduct
120
- }),
121
- image: /*#__PURE__*/React.createElement(Suspense, {
122
- fallback: null
123
- }, /*#__PURE__*/React.createElement(LazyRovoSearchBenefitImage, {
124
- productIcon: parentProductIcon,
125
- productIconAlt: parentProductIconAlt,
126
- providerIcon: providerIcon
127
- }))
128
- });
129
- }
130
- if (rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoEnabled && rovoOptions !== null && rovoOptions !== void 0 && rovoOptions.isRovoLLMEnabled) {
131
- slides.push({
132
- id: 'rovo-chat-benefit',
133
- title: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_title),
134
- description: intl.formatMessage(messages.connect_link_account_embed_carousel_rovochat_description, {
135
- context: providerName
136
- }),
137
- image: /*#__PURE__*/React.createElement(Suspense, {
138
- fallback: null
139
- }, /*#__PURE__*/React.createElement(LazyRovoChatBenefitImage, {
140
- productIcon: parentProductIcon,
141
- productIconAlt: parentProductIconAlt,
142
- providerIcon: providerIcon
143
- }))
144
- });
145
- }
146
- return slides;
147
- }, [canAuthorize, context, intl, product, providerName, providerIcon, rovoOptions]);
148
- const handleOnAuthorizeClick = useCallback(slideId => {
149
- if (onAuthorize) {
150
- fireEvent('track.applicationAccount.authStarted', {});
151
- fireEvent('ui.button.clicked.carouselConnect', {
152
- display: 'embed',
153
- slideId
154
- });
155
- onAuthorize();
156
- }
157
- }, [onAuthorize, fireEvent]);
158
- const handleOnNextClick = useCallback(slideId => {
159
- fireEvent('ui.button.clicked.carouselNext', {
160
- display: 'embed',
161
- slideId
162
- });
163
- }, [fireEvent]);
164
- const buttonLabel = context !== null && context !== void 0 && context.text ? intl.formatMessage(messages.connect_3p_account, {
165
- context: context.text
166
- }) : intl.formatMessage(messages.connect_link_account_card);
167
- const icon = useMemo(() => {
168
- if ( /*#__PURE__*/React.isValidElement(context === null || context === void 0 ? void 0 : context.icon)) {
169
- return context.icon;
170
- }
171
- return /*#__PURE__*/React.createElement(ImageIcon, {
172
- default: /*#__PURE__*/React.createElement(LinkGlyph, {
173
- label: "icon",
174
- color: "currentColor"
175
- }),
176
- src: typeof (context === null || context === void 0 ? void 0 : context.icon) === 'string' ? context.icon : undefined
177
- });
178
- }, [context === null || context === void 0 ? void 0 : context.icon]);
179
- return /*#__PURE__*/React.createElement(ExpandedFrame, {
180
- allowScrollBar: true,
181
- frameStyle: frameStyle !== null && frameStyle !== void 0 ? frameStyle : 'show',
182
- href: url,
183
- icon: icon,
184
- isSelected: isSelected,
185
- inheritDimensions: inheritDimensions,
186
- onClick: onClick,
187
- setOverflow: true,
188
- testId: testId,
189
- text: context === null || context === void 0 ? void 0 : context.text
190
- }, /*#__PURE__*/React.createElement(Carousel, {
191
- icon: context === null || context === void 0 ? void 0 : context.icon,
192
- iconLabel: context === null || context === void 0 ? void 0 : context.text,
193
- items: items,
194
- onNextClick: handleOnNextClick,
195
- onPrimaryButtonClick: canAuthorize ? handleOnAuthorizeClick : undefined,
196
- primaryButtonLabel: buttonLabel,
197
- testId: `${testId}-carousel`
198
- }));
199
- };
200
- export default UnauthorizedCarouselView;
@@ -1,7 +0,0 @@
1
- ._2rko12b0{border-radius:var(--ds-radius-small,4px)}._18m915vq{overflow-y:hidden}
2
- ._1bah1h6o{justify-content:center}
3
- ._1bsb1osq{width:100%}
4
- ._1e0c1txw{display:flex}
5
- ._1reo15vq{overflow-x:hidden}
6
- ._4cvr1h6o{align-items:center}
7
- ._4t3i1osq{height:100%}
@@ -1,25 +0,0 @@
1
- /* IconSlot.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import "./IconSlot.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- const iconSlotDivStyles = null;
6
- const IconSlot = ({
7
- icon,
8
- x,
9
- y,
10
- w,
11
- h
12
- }) => {
13
- if (!icon) {
14
- return null;
15
- }
16
- return /*#__PURE__*/React.createElement("foreignObject", {
17
- x: x,
18
- y: y,
19
- width: w,
20
- height: h
21
- }, /*#__PURE__*/React.createElement("div", {
22
- className: ax(["_2rko12b0 _1reo15vq _18m915vq _1bsb1osq _4t3i1osq _1e0c1txw _4cvr1h6o _1bah1h6o"])
23
- }, icon));
24
- };
25
- export default IconSlot;
@@ -1,3 +0,0 @@
1
- import { lazy } from 'react';
2
- const LazyRovoChatBenefitImage = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "smart-card-embed-carousel-rovo-chat-benefit-image" */'./RovoChatBenefitImage'));
3
- export default LazyRovoChatBenefitImage;
@@ -1,3 +0,0 @@
1
- import { lazy } from 'react';
2
- const LazyRovoSearchBenefitImage = /*#__PURE__*/lazy(() => import( /* webpackChunkName: "smart-card-embed-carousel-rovo-search-benefit-image" */'./RovoSearchBenefitImage'));
3
- export default LazyRovoSearchBenefitImage;
@@ -1,6 +0,0 @@
1
- ._1bah1h6o{justify-content:center}
2
- ._1bsb1osq{width:100%}
3
- ._1e0c1txw{display:flex}
4
- ._4cvr1h6o{align-items:center}
5
- ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
6
- ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
@@ -1,13 +0,0 @@
1
- /* NoAuthAvailableImage.tsx generated by @compiled/babel-plugin v3.0.2 */
2
- import "./NoAuthAvailableImage.compiled.css";
3
- import { ax, ix } from "@compiled/react/runtime";
4
- import React from 'react';
5
- import { Box } from '@atlaskit/primitives/compiled/box';
6
- import { UnauthorizedSVG } from '../unauthorized-svg';
7
- const styles = {
8
- container: "_1bsb1osq _1e0c1txw _4cvr1h6o _1bah1h6o _ca0q1ejb _n3td1ejb"
9
- };
10
- const NoAuthAvailableImage = () => /*#__PURE__*/React.createElement(Box, {
11
- xcss: styles.container
12
- }, /*#__PURE__*/React.createElement(UnauthorizedSVG, null));
13
- export default NoAuthAvailableImage;
@@ -1,40 +0,0 @@
1
- import React from 'react';
2
- import { AtlassianIcon } from '@atlaskit/logo/atlassian-icon';
3
- import { BitbucketIcon } from '@atlaskit/logo/bitbucket-icon';
4
- import { ConfluenceIcon } from '@atlaskit/logo/confluence-icon';
5
- import { JiraIcon } from '@atlaskit/logo/jira-icon';
6
- import { ProjectsIcon } from '@atlaskit/logo/projects/icon';
7
- import { TrelloIcon } from '@atlaskit/logo/trello-icon';
8
- const ProductIcon = ({
9
- product,
10
- size = 'xsmall'
11
- }) => {
12
- switch (product) {
13
- case 'ATLAS':
14
- return /*#__PURE__*/React.createElement(ProjectsIcon, {
15
- size: size
16
- });
17
- case 'BITBUCKET':
18
- return /*#__PURE__*/React.createElement(BitbucketIcon, {
19
- size: size
20
- });
21
- case 'CONFLUENCE':
22
- return /*#__PURE__*/React.createElement(ConfluenceIcon, {
23
- size: size
24
- });
25
- case 'JIRA':
26
- return /*#__PURE__*/React.createElement(JiraIcon, {
27
- size: size
28
- });
29
- case 'TRELLO':
30
- return /*#__PURE__*/React.createElement(TrelloIcon, {
31
- size: size
32
- });
33
- default:
34
- return /*#__PURE__*/React.createElement(AtlassianIcon, {
35
- appearance: "brand",
36
- size: size
37
- });
38
- }
39
- };
40
- export default ProductIcon;