@laerdal/life-react-components 6.0.0-dev.26 → 6.0.0-dev.27

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 (120) hide show
  1. package/README.md +1 -1
  2. package/dist/Button/DualFunctionButton.cjs +4 -4
  3. package/dist/Button/DualFunctionButton.cjs.map +1 -1
  4. package/dist/Button/DualFunctionButton.d.ts +2 -2
  5. package/dist/Button/DualFunctionButton.js +4 -4
  6. package/dist/Button/DualFunctionButton.js.map +1 -1
  7. package/dist/Button/{Button.cjs → TextButton.cjs} +179 -92
  8. package/dist/Button/TextButton.cjs.map +1 -0
  9. package/dist/Button/TextButton.d.ts +70 -0
  10. package/dist/Button/{Button.js → TextButton.js} +178 -91
  11. package/dist/Button/TextButton.js.map +1 -0
  12. package/dist/Button/__tests__/Button.test.tsx +8 -8
  13. package/dist/Button/__tests__/TextButton.test.tsx +45 -0
  14. package/dist/Button/index.cjs +11 -11
  15. package/dist/Button/index.cjs.map +1 -1
  16. package/dist/Button/index.d.ts +2 -2
  17. package/dist/Button/index.js +2 -2
  18. package/dist/Button/index.js.map +1 -1
  19. package/dist/Card/VerticalCard/{Card.cjs → VerticalCard.cjs} +20 -20
  20. package/dist/Card/VerticalCard/VerticalCard.cjs.map +1 -0
  21. package/dist/Card/VerticalCard/VerticalCard.d.ts +25 -0
  22. package/dist/Card/VerticalCard/{Card.js → VerticalCard.js} +19 -19
  23. package/dist/Card/VerticalCard/VerticalCard.js.map +1 -0
  24. package/dist/Card/VerticalCard/{CardBottomSection.cjs → VerticalCardBottomSection.cjs} +21 -21
  25. package/dist/Card/VerticalCard/VerticalCardBottomSection.cjs.map +1 -0
  26. package/dist/Card/VerticalCard/VerticalCardBottomSection.d.ts +53 -0
  27. package/dist/Card/VerticalCard/{CardBottomSection.js → VerticalCardBottomSection.js} +21 -21
  28. package/dist/Card/VerticalCard/VerticalCardBottomSection.js.map +1 -0
  29. package/dist/Card/VerticalCard/{CardMiddleSection.cjs → VerticalCardMiddleSection.cjs} +16 -16
  30. package/dist/Card/VerticalCard/VerticalCardMiddleSection.cjs.map +1 -0
  31. package/dist/Card/VerticalCard/VerticalCardMiddleSection.d.ts +42 -0
  32. package/dist/Card/VerticalCard/{CardMiddleSection.js → VerticalCardMiddleSection.js} +15 -15
  33. package/dist/Card/VerticalCard/VerticalCardMiddleSection.js.map +1 -0
  34. package/dist/Card/VerticalCard/{CardTopSection.cjs → VerticalCardTopSection.cjs} +15 -15
  35. package/dist/Card/VerticalCard/VerticalCardTopSection.cjs.map +1 -0
  36. package/dist/Card/VerticalCard/{CardTopSection.d.ts → VerticalCardTopSection.d.ts} +8 -8
  37. package/dist/Card/VerticalCard/{CardTopSection.js → VerticalCardTopSection.js} +14 -14
  38. package/dist/Card/VerticalCard/VerticalCardTopSection.js.map +1 -0
  39. package/dist/Card/{HorizontalCard → VerticalCard}/__tests__/VerticalCard.test.tsx +15 -15
  40. package/dist/Card/VerticalCard/index.cjs +25 -25
  41. package/dist/Card/VerticalCard/index.cjs.map +1 -1
  42. package/dist/Card/VerticalCard/index.d.ts +7 -7
  43. package/dist/Card/VerticalCard/index.js +7 -7
  44. package/dist/Card/VerticalCard/index.js.map +1 -1
  45. package/dist/Chips/__tests__/ChoiceChips.test.tsx +1 -1
  46. package/dist/Dropdown/DropdownContent.cjs +2 -2
  47. package/dist/Dropdown/DropdownContent.cjs.map +1 -1
  48. package/dist/Dropdown/DropdownContent.js +2 -2
  49. package/dist/Dropdown/DropdownContent.js.map +1 -1
  50. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +2 -2
  51. package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
  52. package/dist/GlobalNavigationBar/desktop/RightSideNav.js +3 -3
  53. package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
  54. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +1 -1
  55. package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
  56. package/dist/GlobalNavigationBar/desktop/UserMenu.js +2 -2
  57. package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
  58. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +1 -1
  59. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
  60. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +2 -2
  61. package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
  62. package/dist/GlobalNavigationBar/types.cjs.map +1 -1
  63. package/dist/GlobalNavigationBar/types.d.ts +2 -2
  64. package/dist/GlobalNavigationBar/types.js.map +1 -1
  65. package/dist/Modals/ModalContent.cjs +2 -2
  66. package/dist/Modals/ModalContent.cjs.map +1 -1
  67. package/dist/Modals/ModalContent.js +3 -3
  68. package/dist/Modals/ModalContent.js.map +1 -1
  69. package/dist/Modals/ModalDialog.cjs +2 -2
  70. package/dist/Modals/ModalDialog.cjs.map +1 -1
  71. package/dist/Modals/ModalDialog.js +3 -3
  72. package/dist/Modals/ModalDialog.js.map +1 -1
  73. package/dist/Modals/ModalTypes.cjs.map +1 -1
  74. package/dist/Modals/ModalTypes.d.ts +3 -3
  75. package/dist/Modals/ModalTypes.js.map +1 -1
  76. package/dist/Popover/Popover.cjs +1 -1
  77. package/dist/Popover/Popover.cjs.map +1 -1
  78. package/dist/Popover/Popover.js +2 -2
  79. package/dist/Popover/Popover.js.map +1 -1
  80. package/dist/SideMenu/SideMenuFooter.cjs +1 -1
  81. package/dist/SideMenu/SideMenuFooter.cjs.map +1 -1
  82. package/dist/SideMenu/SideMenuFooter.js +2 -2
  83. package/dist/SideMenu/SideMenuFooter.js.map +1 -1
  84. package/dist/SideMenu/types.cjs.map +1 -1
  85. package/dist/SideMenu/types.d.ts +2 -2
  86. package/dist/SideMenu/types.js.map +1 -1
  87. package/dist/Table/TableBody.cjs +1 -1
  88. package/dist/Table/TableBody.cjs.map +1 -1
  89. package/dist/Table/TableBody.js +2 -2
  90. package/dist/Table/TableBody.js.map +1 -1
  91. package/dist/Table/TableTypes.cjs.map +1 -1
  92. package/dist/Table/TableTypes.d.ts +2 -2
  93. package/dist/Table/TableTypes.js.map +1 -1
  94. package/dist/Tile/TileCommonItems.cjs +1 -1
  95. package/dist/Tile/TileCommonItems.cjs.map +1 -1
  96. package/dist/Tile/TileCommonItems.js +2 -2
  97. package/dist/Tile/TileCommonItems.js.map +1 -1
  98. package/dist/Tile/TileTypes.cjs.map +1 -1
  99. package/dist/Tile/TileTypes.d.ts +2 -2
  100. package/dist/Tile/TileTypes.js.map +1 -1
  101. package/dist/Toasters/Toast.cjs +1 -2
  102. package/dist/Toasters/Toast.cjs.map +1 -1
  103. package/dist/Toasters/Toast.js +2 -3
  104. package/dist/Toasters/Toast.js.map +1 -1
  105. package/package.json +1 -1
  106. package/dist/Button/Button.cjs.map +0 -1
  107. package/dist/Button/Button.d.ts +0 -70
  108. package/dist/Button/Button.js.map +0 -1
  109. package/dist/Card/VerticalCard/Card.cjs.map +0 -1
  110. package/dist/Card/VerticalCard/Card.d.ts +0 -25
  111. package/dist/Card/VerticalCard/Card.js.map +0 -1
  112. package/dist/Card/VerticalCard/CardBottomSection.cjs.map +0 -1
  113. package/dist/Card/VerticalCard/CardBottomSection.d.ts +0 -53
  114. package/dist/Card/VerticalCard/CardBottomSection.js.map +0 -1
  115. package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +0 -1
  116. package/dist/Card/VerticalCard/CardMiddleSection.d.ts +0 -42
  117. package/dist/Card/VerticalCard/CardMiddleSection.js.map +0 -1
  118. package/dist/Card/VerticalCard/CardTopSection.cjs.map +0 -1
  119. package/dist/Card/VerticalCard/CardTopSection.js.map +0 -1
  120. package/dist/Card/__tests__/Card.test.tsx +0 -146
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerticalCard.js","names":["React","styled","VerticalCardTopSection","VerticalCardMiddleSection","VerticalCardBottomSection","BOXSHADOWS","COLORS","focusStyles","useActionWithin","jsx","_jsx","jsxs","_jsxs","VerticalCardTopLevelContainerStyles","div","props","generateToken","componentType","defaultVariant","theme","BOXSHADOW_L1","VerticalCardLink","a","VerticalCardContainerStyles","state","BOXSHADOW_L3","BOXSHADOW_L2","VerticalCard","_ref","onCardClicked","topSectionProps","middleSectionProps","bottomSectionProps","disabled","variant","className","id","maxWidth","rest","_objectWithoutProperties","_excluded","actionsRefs","setActionsRefs","useState","checkBoxRef","useRef","containerRef","autoId","useId","cls","handleCardClick","e","preventDefault","_objectSpread","ref","role","tabIndex","onKeyDown","key","children","style","href","onClick","componentId","instance","propTypes","_pt","func","bool","oneOfType","number","string","oneOf"],"sources":["../../../src/Card/VerticalCard/VerticalCard.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport VerticalCardTopSection, {VerticalCardTopSectionProps} from './VerticalCardTopSection';\r\nimport VerticalCardMiddleSection, {VerticalCardMiddleSectionProps} from './VerticalCardMiddleSection';\r\nimport VerticalCardBottomSection, {VerticalCardBottomSectionProps} from './VerticalCardBottomSection';\r\nimport {BOXSHADOWS, COLORS, defaultOnMouseDownHandler, focusStyles, useActionWithin} from '../../index';\r\n\r\nexport const VerticalCardTopLevelContainerStyles = styled.div`\r\n background-color: ${props => COLORS.generateToken({componentType:'bg-surface', defaultVariant:'default'}, props.theme)};\r\n min-width: 240px;\r\n overflow: hidden;\r\n\r\n border-radius: 8px;\r\n\r\n background-clip: padding-box;\r\n box-sizing: border-box;\r\n display: flex;\r\n flex-direction: column;\r\n position: relative;\r\n\r\n .elevated & {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L1};\r\n }\r\n\r\n .outline & {\r\n border: 1px solid ${props => COLORS.generateToken({componentType:'border', defaultVariant: 'subtle'}, props.theme)};\r\n }\r\n`;\r\n\r\n// Full-card link that covers the entire card area\r\nexport const VerticalCardLink = styled.a`\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 100;\r\n text-decoration: none;\r\n color: inherit;\r\n pointer-events: auto;\r\n cursor: pointer;\r\n \r\n &:focus {\r\n outline: none;\r\n }\r\n \r\n &:focus-visible {\r\n ${focusStyles}\r\n }\r\n`;\r\n\r\nexport const VerticalCardContainerStyles = styled.div`\r\n &.interactive:not(.disabled) {\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &:not(.action-within) {\r\n ${VerticalCardTopLevelContainerStyles} {\r\n &:hover {\r\n background-color: ${props => COLORS.generateToken({componentType:'bg-surface', state:'hover'}, props.theme)};\r\n }\r\n\r\n &:active, &.active-state {\r\n background-color: ${props => COLORS.generateToken({componentType:'bg-surface', state:'active'}, props.theme)};\r\n }\r\n }\r\n }\r\n\r\n &.elevated:not(.action-within) {\r\n ${VerticalCardTopLevelContainerStyles} {\r\n &:hover {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L3};\r\n }\r\n\r\n &:active, &.active-state {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n ${VerticalCardTopLevelContainerStyles}{\r\n border: 1px solid ${props => COLORS.generateToken({componentType:'border', state:'disabled'}, props.theme)};\r\n }\r\n }\r\n`;\r\n\r\n\r\nexport interface VerticalCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'tabIndex' | 'onMouseDown' | 'onKeyDown' | 'onClick'> {\r\n /** Action to be executed when Card is clicked. */\r\n onCardClicked?: () => void;\r\n /** If disabled then users can not click on the card, also styles are greyed out.*/\r\n disabled?: boolean;\r\n /** Maximum width of the card. */\r\n maxWidth?: number | string;\r\n /** Properties of Card top section. */\r\n topSectionProps?: VerticalCardTopSectionProps;\r\n /** Properties of Card middle section. */\r\n middleSectionProps?: VerticalCardMiddleSectionProps;\r\n /** Properties of Card bottom section. */\r\n bottomSectionProps?: VerticalCardBottomSectionProps;\r\n /** Card container style variant. */\r\n variant?: 'outline' | 'elevated';\r\n}\r\n\r\nconst VerticalCard: React.FunctionComponent<VerticalCardProps> = ({\r\n onCardClicked,\r\n topSectionProps,\r\n middleSectionProps,\r\n bottomSectionProps,\r\n disabled,\r\n variant = 'elevated',\r\n className,\r\n id,\r\n maxWidth = 560,\r\n ...rest\r\n }: VerticalCardProps) => {\r\n\r\n\r\n const [actionsRefs, setActionsRefs] = React.useState<React.RefObject<HTMLElement | null>[]>([]);\r\n const checkBoxRef = React.useRef<HTMLDivElement>(null);\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n const autoId = React.useId();\r\n\r\n useActionWithin(containerRef, [...actionsRefs, checkBoxRef]);\r\n\r\n const cls = `${!!onCardClicked ? 'interactive' : ''} ${disabled ? 'disabled' : ''} ${variant} ${className || ''}`;\r\n\r\n const handleCardClick = (e: React.MouseEvent) => {\r\n e.preventDefault();\r\n if (!disabled && onCardClicked) {\r\n onCardClicked();\r\n }\r\n };\r\n\r\n return (\r\n <VerticalCardContainerStyles ref={containerRef}\r\n role=\"group\"\r\n className={cls}\r\n aria-labelledby={`${autoId}-title`}\r\n tabIndex={!!onCardClicked && !disabled ? 0 : -1}\r\n onKeyDown={e => e.key === 'Enter' && !disabled && onCardClicked && onCardClicked()}\r\n data-testid={'card-wrapper'}\r\n {...rest}>\r\n <VerticalCardTopLevelContainerStyles style={{maxWidth: maxWidth}}>\r\n {/* Full-card link for accessibility */}\r\n {onCardClicked && !disabled && (\r\n <VerticalCardLink\r\n href={'#'}\r\n data-testid={'card-link'}\r\n onClick={handleCardClick}\r\n aria-labelledby={`${autoId}-title`}\r\n tabIndex={-1}\r\n />\r\n )}\r\n \r\n {\r\n topSectionProps &&\r\n <VerticalCardTopSection ref={checkBoxRef}\r\n {...topSectionProps} disabled={disabled}/>\r\n }\r\n {\r\n middleSectionProps &&\r\n <VerticalCardMiddleSection {...middleSectionProps} componentId={autoId} disabled={disabled}/>\r\n }\r\n {\r\n bottomSectionProps &&\r\n <VerticalCardBottomSection ref={instance => {\r\n setActionsRefs(instance ?? []);\r\n }}\r\n {...bottomSectionProps} disabled={disabled}/>\r\n }\r\n </VerticalCardTopLevelContainerStyles>\r\n </VerticalCardContainerStyles>\r\n );\r\n};\r\n\r\nexport default VerticalCard;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,OAAOC,sBAAsB,MAAqC,0BAA0B;AAC5F,OAAOC,yBAAyB,MAAwC,6BAA6B;AACrG,OAAOC,yBAAyB,MAAwC,6BAA6B;AACrG,SAAQC,UAAU,EAAEC,MAAM,EAA6BC,WAAW,EAAEC,eAAe,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExG,OAAO,MAAMC,mCAAmC,GAAGZ,MAAM,CAACa,GAAG;AAC7D,sBAAsBC,KAAK,IAAIT,MAAM,CAACU,aAAa,CAAC;EAACC,aAAa,EAAC,YAAY;EAAEC,cAAc,EAAC;AAAS,CAAC,EAAEH,KAAK,CAACI,KAAK,CAAC;AACxH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkBd,UAAU,CAACe,YAAY;AACzC;AACA;AACA;AACA,wBAAwBL,KAAK,IAAIT,MAAM,CAACU,aAAa,CAAC;EAACC,aAAa,EAAC,QAAQ;EAAEC,cAAc,EAAE;AAAQ,CAAC,EAAEH,KAAK,CAACI,KAAK,CAAC;AACtH;AACA,CAAC;;AAED;AACA,OAAO,MAAME,gBAAgB,GAAGpB,MAAM,CAACqB,CAAC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMf,WAAW;AACjB;AACA,CAAC;AAED,OAAO,MAAMgB,2BAA2B,GAAGtB,MAAM,CAACa,GAAG;AACrD;AACA;AACA,QAAQP,WAAW;AACnB;AACA;AACA;AACA,QAAQM,mCAAmC;AAC3C;AACA,8BAA8BE,KAAK,IA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S,EAAC,CAAC,EAG5CF,kBAAkB,iBAClBrB,IAAA,CAACP,yBAAyB,EAAAkD,aAAA,CAAAA,aAAA,KAAKtB,kBAAkB;QAAEgC,WAAW,EAAEhB,MAAO;QAACd,QAAQ,EAAEA;MAAS,EAAC,CAAC,EAG7FD,kBAAkB,iBAClBtB,IAAA,CAACN,yBAAyB,EAAAiD,aAAA,CAAAA,aAAA;QAACC,GAAG,EAAEU,QAAQ,IAAI;UAC1CtB,cAAc,CAACsB,QAAQ,IAAI,EAAE,CAAC;QAChC;MAAE,GACqBhC,kBAAkB;QAAEC,QAAQ,EAAEA;MAAS,EAAC,CAAC;IAAA,CAE/B;EAAC,EACX,CAAC;AAElC,CAAC;AAACN,YAAA,CAAAsC,SAAA;EArFApC,aAAa,EAAAqC,GAAA,CAAAC,IAAA;EAEblC,QAAQ,EAAAiC,GAAA,CAAAE,IAAA;EAER/B,QAAQ,EAAA6B,GAAA,CAAAG,SAAA,EAAAH,GAAA,CAAAI,MAAA,EAAAJ,GAAA,CAAAK,MAAA;EAQRrC,OAAO,EAAAgC,GAAA,CAAAM,KAAA,EAAG,SAAS,EAAG,UAAU;AAAA;AA2ElC,eAAe7C,YAAY","ignoreList":[]}
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.CardBottomSectionProgressStyles = exports.CardBottomSectionNotesStyles = exports.CardBottomSectionNoteRightStyles = exports.CardBottomSectionNoteLeftStyles = exports.CardBottomSectionDivider = exports.CardBottomSectionContainer = exports.CardBottomSectionButtonRowContainerStyles = exports.CardBottomSectionAuthorStyles = void 0;
7
+ exports.default = exports.VerticalCardBottomSectionProgressStyles = exports.VerticalCardBottomSectionNotesStyles = exports.VerticalCardBottomSectionNoteRightStyles = exports.VerticalCardBottomSectionNoteLeftStyles = exports.VerticalCardBottomSectionDivider = exports.VerticalCardBottomSectionContainer = exports.VerticalCardBottomSectionButtonRowContainerStyles = exports.VerticalCardBottomSectionAuthorStyles = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -18,10 +18,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
20
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
- const CardBottomSectionProgressStyles = exports.CardBottomSectionProgressStyles = _styledComponents.default.div`
21
+ const VerticalCardBottomSectionProgressStyles = exports.VerticalCardBottomSectionProgressStyles = _styledComponents.default.div`
22
22
  padding: 8px 0;
23
23
  `;
24
- const CardBottomSectionNotesStyles = exports.CardBottomSectionNotesStyles = _styledComponents.default.div`
24
+ const VerticalCardBottomSectionNotesStyles = exports.VerticalCardBottomSectionNotesStyles = _styledComponents.default.div`
25
25
  height: 48px;
26
26
  position: relative;
27
27
  color: ${props => _index.COLORS.generateToken({
@@ -32,7 +32,7 @@ const CardBottomSectionNotesStyles = exports.CardBottomSectionNotesStyles = _sty
32
32
  flex-direction: row;
33
33
  align-items: center;
34
34
  `;
35
- const CardBottomSectionAuthorStyles = exports.CardBottomSectionAuthorStyles = _styledComponents.default.div`
35
+ const VerticalCardBottomSectionAuthorStyles = exports.VerticalCardBottomSectionAuthorStyles = _styledComponents.default.div`
36
36
  display: flex;
37
37
  flex-direction: row;
38
38
  align-items: center;
@@ -59,7 +59,7 @@ const CardBottomSectionAuthorStyles = exports.CardBottomSectionAuthorStyles = _s
59
59
 
60
60
  ` : ''}
61
61
  `;
62
- const CardBottomSectionDivider = exports.CardBottomSectionDivider = _styledComponents.default.div`
62
+ const VerticalCardBottomSectionDivider = exports.VerticalCardBottomSectionDivider = _styledComponents.default.div`
63
63
  border-top: 1px;
64
64
  border-top-color: ${props => _index.COLORS.generateToken({
65
65
  componentType: 'border',
@@ -68,7 +68,7 @@ const CardBottomSectionDivider = exports.CardBottomSectionDivider = _styledCompo
68
68
  border-top-style: solid;
69
69
  width: 100%;
70
70
  `;
71
- const CardBottomSectionNoteLeftStyles = exports.CardBottomSectionNoteLeftStyles = _styledComponents.default.div`
71
+ const VerticalCardBottomSectionNoteLeftStyles = exports.VerticalCardBottomSectionNoteLeftStyles = _styledComponents.default.div`
72
72
  position: absolute;
73
73
  left: 0px;
74
74
  display: flex;
@@ -81,7 +81,7 @@ const CardBottomSectionNoteLeftStyles = exports.CardBottomSectionNoteLeftStyles
81
81
  flex-shrink: 0;
82
82
  }
83
83
  `;
84
- const CardBottomSectionNoteRightStyles = exports.CardBottomSectionNoteRightStyles = _styledComponents.default.div`
84
+ const VerticalCardBottomSectionNoteRightStyles = exports.VerticalCardBottomSectionNoteRightStyles = _styledComponents.default.div`
85
85
  position: absolute;
86
86
  right: 0px;
87
87
  display: flex;
@@ -94,7 +94,7 @@ const CardBottomSectionNoteRightStyles = exports.CardBottomSectionNoteRightStyle
94
94
  flex-shrink: 0;
95
95
  }
96
96
  `;
97
- const CardBottomSectionButtonRowContainerStyles = exports.CardBottomSectionButtonRowContainerStyles = _styledComponents.default.div`
97
+ const VerticalCardBottomSectionButtonRowContainerStyles = exports.VerticalCardBottomSectionButtonRowContainerStyles = _styledComponents.default.div`
98
98
  display: flex;
99
99
  flex-direction: row;
100
100
  justify-content: flex-end;
@@ -129,7 +129,7 @@ const CardBottomSectionButtonRowContainerStyles = exports.CardBottomSectionButto
129
129
  }, props.theme)};
130
130
  }
131
131
  `;
132
- const CardBottomSectionContainer = exports.CardBottomSectionContainer = _styledComponents.default.div`
132
+ const VerticalCardBottomSectionContainer = exports.VerticalCardBottomSectionContainer = _styledComponents.default.div`
133
133
  padding: 0px 16px 8px 16px;
134
134
  width: calc(100% - 32px);
135
135
  `;
@@ -142,7 +142,7 @@ const RightItemContainer = _styledComponents.default.div`
142
142
  justify-content: flex-end;
143
143
  color: ${props => _index.COLORS.getColor('neutral_600', props.theme)};
144
144
  `;
145
- const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
145
+ const VerticalCardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
146
146
  let {
147
147
  progressLevel,
148
148
  progressMax,
@@ -172,7 +172,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
172
172
  onClick
173
173
  } = leftButton,
174
174
  rest = (0, _objectWithoutProperties2.default)(leftButton, _excluded);
175
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, _objectSpread(_objectSpread({
175
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.TextButton, _objectSpread(_objectSpread({
176
176
  className: "card-bottom-section-action-button",
177
177
  ref: elRefs[0],
178
178
  size: leftButton.size && [_index.Size.XSmall, _index.Size.XSmall, _index.Size.XXSmall].includes(leftButton.size) ? _index.Size.Small : leftButton.size == _index.Size.Large ? _index.Size.Large : _index.Size.Medium
@@ -185,9 +185,9 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
185
185
  }));
186
186
  }
187
187
  };
188
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionContainer, {
188
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionContainer, {
189
189
  "data-testid": 'card-bottomSection',
190
- children: [haveAtLeastSomething && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardBottomSectionDivider, {}), progressLevel != undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardBottomSectionProgressStyles, {
190
+ children: [haveAtLeastSomething && /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardBottomSectionDivider, {}), progressLevel != undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardBottomSectionProgressStyles, {
191
191
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LinearProgress, {
192
192
  size: _index.Size.Small,
193
193
  type: progressType,
@@ -195,8 +195,8 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
195
195
  value: progressLevel,
196
196
  max: progressMax ?? progressLevel
197
197
  })
198
- }), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNotesStyles, {
199
- children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNoteLeftStyles, {
198
+ }), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionNotesStyles, {
199
+ children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionNoteLeftStyles, {
200
200
  children: [noteLeftIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
201
201
  color: _index.COLORS.generateToken({
202
202
  componentType: 'icon',
@@ -205,7 +205,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
205
205
  textStyle: _index.ComponentTextStyle.Bold,
206
206
  children: noteLeft
207
207
  })]
208
- }), (noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNoteRightStyles, {
208
+ }), (noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionNoteRightStyles, {
209
209
  children: [noteRightIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
210
210
  color: _index.COLORS.generateToken({
211
211
  componentType: 'icon',
@@ -215,13 +215,13 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
215
215
  children: noteRight
216
216
  })]
217
217
  })]
218
- }), (authorName || logo) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionAuthorStyles, {
218
+ }), (authorName || logo) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionAuthorStyles, {
219
219
  $disabled: disabled,
220
220
  "data-testid": 'card-bottomSection-author',
221
221
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
222
222
  children: authorName
223
223
  }), logo]
224
- }), (actions || leftButton) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionButtonRowContainerStyles, {
224
+ }), (actions || leftButton) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardBottomSectionButtonRowContainerStyles, {
225
225
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(LeftItemContainer, {
226
226
  children: leftButton && renderLeftButton()
227
227
  }), actions && /*#__PURE__*/(0, _jsxRuntime.jsx)(RightItemContainer, {
@@ -241,7 +241,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
241
241
  })]
242
242
  });
243
243
  });
244
- CardBottomSection.propTypes = {
244
+ VerticalCardBottomSection.propTypes = {
245
245
  progressLevel: _propTypes.default.number,
246
246
  progressMax: _propTypes.default.number,
247
247
  noteLeft: _propTypes.default.string,
@@ -257,5 +257,5 @@ CardBottomSection.propTypes = {
257
257
  logo: _propTypes.default.node,
258
258
  disabled: _propTypes.default.bool
259
259
  };
260
- var _default = exports.default = CardBottomSection;
261
- //# sourceMappingURL=CardBottomSection.cjs.map
260
+ var _default = exports.default = VerticalCardBottomSection;
261
+ //# sourceMappingURL=VerticalCardBottomSection.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerticalCardBottomSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_Button","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","VerticalCardBottomSectionProgressStyles","exports","styled","div","VerticalCardBottomSectionNotesStyles","props","COLORS","generateToken","componentType","defaultVariant","theme","VerticalCardBottomSectionAuthorStyles","$disabled","state","VerticalCardBottomSectionDivider","VerticalCardBottomSectionNoteLeftStyles","VerticalCardBottomSectionNoteRightStyles","VerticalCardBottomSectionButtonRowContainerStyles","VerticalCardBottomSectionContainer","LeftItemContainer","RightItemContainer","getColor","VerticalCardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","useTheme","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","onClick","rest","_objectWithoutProperties2","jsx","TextButton","className","size","Size","XSmall","XXSmall","includes","Small","Large","Medium","stopPropagation","children","jsxs","LinearProgress","type","variant","LinearProgressVariant","Normal","value","max","ComponentXXS","color","textStyle","ComponentTextStyle","Bold","x","index","IconButton","shape","action","icon","propTypes","_propTypes","number","string","node","arrayOf","oneOf","isRequired","func","bool","_default"],"sources":["../../../src/Card/VerticalCard/VerticalCardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { TextButton, TextButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface VerticalCardActionItem {\r\n /** Optional. Variant of the action button, defaults to 'secondary'. */\r\n variant?: 'primary' | 'secondary';\r\n /** Icon to be used in the icon button. */\r\n icon: React.ReactNode;\r\n /** Click handler for the action button. */\r\n onClick: () => void;\r\n}\r\n\r\nexport type VerticalCardStandardButton = Pick<TextButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface VerticalCardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: VerticalCardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: VerticalCardActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const VerticalCardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.generateToken({ componentType:'text', defaultVariant:'subtle' }, props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.generateToken({ componentType: 'text', state: 'disabled' }, props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const VerticalCardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({componentType:'icon', defaultVariant:'subtle' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst VerticalCardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: VerticalCardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array((length || 0) + (leftButton ? 1 : 0)).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length, leftButton]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, onClick, ...rest} = leftButton;\r\n return (<TextButton className=\"card-bottom-section-action-button\"\r\n ref={elRefs[0]}\r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onClick && onClick(e);\r\n }}>\r\n {buttonText}\r\n </TextButton>)\r\n }\r\n}\r\n\r\n return (\r\n <VerticalCardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <VerticalCardBottomSectionDivider/>}\r\n {progressLevel != undefined && <VerticalCardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </VerticalCardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <VerticalCardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <VerticalCardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </VerticalCardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <VerticalCardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </VerticalCardBottomSectionNoteRightStyles>\r\n )}\r\n </VerticalCardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <VerticalCardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </VerticalCardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <VerticalCardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index + (leftButton ? 1 : 0)]}\r\n className=\"card-bottom-section-action-button\"\r\n key={index}\r\n z-index={2000}\r\n disabled={disabled}\r\n variant={x.variant ?? \"secondary\"}\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </VerticalCardBottomSectionButtonRowContainerStyles>}\r\n </VerticalCardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default VerticalCardBottomSection;\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,OAAA,GAAAH,OAAA;AAAuE,IAAAI,WAAA,GAAAJ,OAAA;AAAA,MAAAK,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAR,wBAAAQ,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAA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yD,UAAA,CAAAvH,OAAA,CAAAyH,MAAA;EAET1D,aAAa,EAAAwD,UAAA,CAAAvH,OAAA,CAAA0H,IAAA;EAMbzD,UAAU,EAAAsD,UAAA,CAAAvH,OAAA,CAAAyH,MAAA;EAEVtD,OAAO,EAAAoD,UAAA,CAAAvH,OAAA,CAAA2H,OAAA,CAAAJ,UAAA,CAAAvH,OAAA,CAAAmH,KAAA;IAnCPb,OAAO,EAAAiB,UAAA,CAAAvH,OAAA,CAAA4H,KAAA,EAAG,SAAS,EAAG,WAAW;IAEjCP,IAAI,EAAAE,UAAA,CAAAvH,OAAA,CAAA0H,IAAA,CAAAG,UAAA;IAEJ1C,OAAO,EAAAoC,UAAA,CAAAvH,OAAA,CAAA8H,IAAA,CAAAD;EAAA;EAiCP3D,IAAI,EAAAqD,UAAA,CAAAvH,OAAA,CAAA0H,IAAA;EAEJtD,QAAQ,EAAAmD,UAAA,CAAAvH,OAAA,CAAA+H;AAAA;AAAA,IAAAC,QAAA,GAAAlG,OAAA,CAAA9B,OAAA,GAgOKmD,yBAAyB","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ import * as React from 'react';
2
+ import { LinearProgressType, Size } from '../../index';
3
+ import { TextButtonProps } from '../../Button';
4
+ export interface VerticalCardActionItem {
5
+ /** Optional. Variant of the action button, defaults to 'secondary'. */
6
+ variant?: 'primary' | 'secondary';
7
+ /** Icon to be used in the icon button. */
8
+ icon: React.ReactNode;
9
+ /** Click handler for the action button. */
10
+ onClick: () => void;
11
+ }
12
+ export type VerticalCardStandardButton = Pick<TextButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {
13
+ buttonText: string;
14
+ size?: Size.Small | Size.Medium | Size.Large;
15
+ };
16
+ export interface VerticalCardBottomSectionProps {
17
+ /** Optional. Current progress level shown in the progress bar. */
18
+ progressLevel?: number;
19
+ /** Optional. Maximum level of progress in the progress bar. */
20
+ progressMax?: number;
21
+ /** Optional. Type of the progress bar. */
22
+ progressType?: LinearProgressType;
23
+ /** Optional. Note text shown on the left side of the section. */
24
+ noteLeft?: string;
25
+ /** Optional. Note icon shown on the left side of the section. */
26
+ noteLeftIcon?: React.ReactNode;
27
+ /** Optional. Note text shown on the right side of the section. */
28
+ noteRight?: string;
29
+ /** Optional. Note icon shown on the right side of the section. */
30
+ noteRightIcon?: React.ReactNode;
31
+ /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */
32
+ leftButton?: VerticalCardStandardButton;
33
+ /** Author name shown at the bottom-left part of the section. */
34
+ authorName?: string;
35
+ /** Array of actions shown on the bottom-right corner of the section. */
36
+ actions?: VerticalCardActionItem[];
37
+ /** Logo shown on the right side of the section, in front of AuthorName. */
38
+ logo?: React.ReactNode;
39
+ /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */
40
+ disabled?: boolean;
41
+ }
42
+ export declare const VerticalCardBottomSectionProgressStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
43
+ export declare const VerticalCardBottomSectionNotesStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
44
+ export declare const VerticalCardBottomSectionAuthorStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
45
+ $disabled?: boolean;
46
+ }>> & string;
47
+ export declare const VerticalCardBottomSectionDivider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
48
+ export declare const VerticalCardBottomSectionNoteLeftStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
49
+ export declare const VerticalCardBottomSectionNoteRightStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
50
+ export declare const VerticalCardBottomSectionButtonRowContainerStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
51
+ export declare const VerticalCardBottomSectionContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
52
+ declare const VerticalCardBottomSection: React.ForwardRefExoticComponent<VerticalCardBottomSectionProps & React.RefAttributes<React.RefObject<HTMLButtonElement | null>[]>>;
53
+ export default VerticalCardBottomSection;
@@ -7,12 +7,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import * as React from 'react';
8
8
  import styled, { useTheme } from 'styled-components';
9
9
  import { COLORS, ComponentTextStyle, ComponentXXS, LinearProgress, LinearProgressType, LinearProgressVariant, Size } from '../../index';
10
- import { Button, IconButton } from '../../Button';
10
+ import { TextButton, IconButton } from '../../Button';
11
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- export const CardBottomSectionProgressStyles = styled.div`
12
+ export const VerticalCardBottomSectionProgressStyles = styled.div`
13
13
  padding: 8px 0;
14
14
  `;
15
- export const CardBottomSectionNotesStyles = styled.div`
15
+ export const VerticalCardBottomSectionNotesStyles = styled.div`
16
16
  height: 48px;
17
17
  position: relative;
18
18
  color: ${props => COLORS.generateToken({
@@ -23,7 +23,7 @@ export const CardBottomSectionNotesStyles = styled.div`
23
23
  flex-direction: row;
24
24
  align-items: center;
25
25
  `;
26
- export const CardBottomSectionAuthorStyles = styled.div`
26
+ export const VerticalCardBottomSectionAuthorStyles = styled.div`
27
27
  display: flex;
28
28
  flex-direction: row;
29
29
  align-items: center;
@@ -50,7 +50,7 @@ export const CardBottomSectionAuthorStyles = styled.div`
50
50
 
51
51
  ` : ''}
52
52
  `;
53
- export const CardBottomSectionDivider = styled.div`
53
+ export const VerticalCardBottomSectionDivider = styled.div`
54
54
  border-top: 1px;
55
55
  border-top-color: ${props => COLORS.generateToken({
56
56
  componentType: 'border',
@@ -59,7 +59,7 @@ export const CardBottomSectionDivider = styled.div`
59
59
  border-top-style: solid;
60
60
  width: 100%;
61
61
  `;
62
- export const CardBottomSectionNoteLeftStyles = styled.div`
62
+ export const VerticalCardBottomSectionNoteLeftStyles = styled.div`
63
63
  position: absolute;
64
64
  left: 0px;
65
65
  display: flex;
@@ -72,7 +72,7 @@ export const CardBottomSectionNoteLeftStyles = styled.div`
72
72
  flex-shrink: 0;
73
73
  }
74
74
  `;
75
- export const CardBottomSectionNoteRightStyles = styled.div`
75
+ export const VerticalCardBottomSectionNoteRightStyles = styled.div`
76
76
  position: absolute;
77
77
  right: 0px;
78
78
  display: flex;
@@ -85,7 +85,7 @@ export const CardBottomSectionNoteRightStyles = styled.div`
85
85
  flex-shrink: 0;
86
86
  }
87
87
  `;
88
- export const CardBottomSectionButtonRowContainerStyles = styled.div`
88
+ export const VerticalCardBottomSectionButtonRowContainerStyles = styled.div`
89
89
  display: flex;
90
90
  flex-direction: row;
91
91
  justify-content: flex-end;
@@ -120,7 +120,7 @@ export const CardBottomSectionButtonRowContainerStyles = styled.div`
120
120
  }, props.theme)};
121
121
  }
122
122
  `;
123
- export const CardBottomSectionContainer = styled.div`
123
+ export const VerticalCardBottomSectionContainer = styled.div`
124
124
  padding: 0px 16px 8px 16px;
125
125
  width: calc(100% - 32px);
126
126
  `;
@@ -133,7 +133,7 @@ const RightItemContainer = styled.div`
133
133
  justify-content: flex-end;
134
134
  color: ${props => COLORS.getColor('neutral_600', props.theme)};
135
135
  `;
136
- const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
136
+ const VerticalCardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
137
137
  let {
138
138
  progressLevel,
139
139
  progressMax,
@@ -163,7 +163,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
163
163
  onClick
164
164
  } = leftButton,
165
165
  rest = _objectWithoutProperties(leftButton, _excluded);
166
- return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
166
+ return /*#__PURE__*/_jsx(TextButton, _objectSpread(_objectSpread({
167
167
  className: "card-bottom-section-action-button",
168
168
  ref: elRefs[0],
169
169
  size: leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small : leftButton.size == Size.Large ? Size.Large : Size.Medium
@@ -176,9 +176,9 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
176
176
  }));
177
177
  }
178
178
  };
179
- return /*#__PURE__*/_jsxs(CardBottomSectionContainer, {
179
+ return /*#__PURE__*/_jsxs(VerticalCardBottomSectionContainer, {
180
180
  "data-testid": 'card-bottomSection',
181
- children: [haveAtLeastSomething && /*#__PURE__*/_jsx(CardBottomSectionDivider, {}), progressLevel != undefined && /*#__PURE__*/_jsx(CardBottomSectionProgressStyles, {
181
+ children: [haveAtLeastSomething && /*#__PURE__*/_jsx(VerticalCardBottomSectionDivider, {}), progressLevel != undefined && /*#__PURE__*/_jsx(VerticalCardBottomSectionProgressStyles, {
182
182
  children: /*#__PURE__*/_jsx(LinearProgress, {
183
183
  size: Size.Small,
184
184
  type: progressType,
@@ -186,8 +186,8 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
186
186
  value: progressLevel,
187
187
  max: progressMax ?? progressLevel
188
188
  })
189
- }), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNotesStyles, {
190
- children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteLeftStyles, {
189
+ }), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(VerticalCardBottomSectionNotesStyles, {
190
+ children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/_jsxs(VerticalCardBottomSectionNoteLeftStyles, {
191
191
  children: [noteLeftIcon, /*#__PURE__*/_jsx(ComponentXXS, {
192
192
  color: COLORS.generateToken({
193
193
  componentType: 'icon',
@@ -196,7 +196,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
196
196
  textStyle: ComponentTextStyle.Bold,
197
197
  children: noteLeft
198
198
  })]
199
- }), (noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteRightStyles, {
199
+ }), (noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(VerticalCardBottomSectionNoteRightStyles, {
200
200
  children: [noteRightIcon, /*#__PURE__*/_jsx(ComponentXXS, {
201
201
  color: COLORS.generateToken({
202
202
  componentType: 'icon',
@@ -206,13 +206,13 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
206
206
  children: noteRight
207
207
  })]
208
208
  })]
209
- }), (authorName || logo) && /*#__PURE__*/_jsxs(CardBottomSectionAuthorStyles, {
209
+ }), (authorName || logo) && /*#__PURE__*/_jsxs(VerticalCardBottomSectionAuthorStyles, {
210
210
  $disabled: disabled,
211
211
  "data-testid": 'card-bottomSection-author',
212
212
  children: [/*#__PURE__*/_jsx(ComponentXXS, {
213
213
  children: authorName
214
214
  }), logo]
215
- }), (actions || leftButton) && /*#__PURE__*/_jsxs(CardBottomSectionButtonRowContainerStyles, {
215
+ }), (actions || leftButton) && /*#__PURE__*/_jsxs(VerticalCardBottomSectionButtonRowContainerStyles, {
216
216
  children: [/*#__PURE__*/_jsx(LeftItemContainer, {
217
217
  children: leftButton && renderLeftButton()
218
218
  }), actions && /*#__PURE__*/_jsx(RightItemContainer, {
@@ -232,7 +232,7 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
232
232
  })]
233
233
  });
234
234
  });
235
- CardBottomSection.propTypes = {
235
+ VerticalCardBottomSection.propTypes = {
236
236
  progressLevel: _pt.number,
237
237
  progressMax: _pt.number,
238
238
  noteLeft: _pt.string,
@@ -248,5 +248,5 @@ CardBottomSection.propTypes = {
248
248
  logo: _pt.node,
249
249
  disabled: _pt.bool
250
250
  };
251
- export default CardBottomSection;
252
- //# sourceMappingURL=CardBottomSection.js.map
251
+ export default VerticalCardBottomSection;
252
+ //# sourceMappingURL=VerticalCardBottomSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VerticalCardBottomSection.js","names":["React","styled","useTheme","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","TextButton","IconButton","jsx","_jsx","jsxs","_jsxs","VerticalCardBottomSectionProgressStyles","div","VerticalCardBottomSectionNotesStyles","props","generateToken","componentType","defaultVariant","theme","VerticalCardBottomSectionAuthorStyles","$disabled","state","VerticalCardBottomSectionDivider","VerticalCardBottomSectionNoteLeftStyles","VerticalCardBottomSectionNoteRightStyles","VerticalCardBottomSectionButtonRowContainerStyles","VerticalCardBottomSectionContainer","LeftItemContainer","RightItemContainer","getColor","VerticalCardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","onClick","rest","_objectWithoutProperties","_excluded","_objectSpread","className","size","XSmall","XXSmall","includes","Small","Large","Medium","e","stopPropagation","children","type","variant","Normal","value","max","color","textStyle","Bold","x","index","shape","action","icon","propTypes","_pt","number","string","node","arrayOf","oneOf","isRequired","func","bool"],"sources":["../../../src/Card/VerticalCard/VerticalCardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { TextButton, TextButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface VerticalCardActionItem {\r\n /** Optional. Variant of the action button, defaults to 'secondary'. */\r\n variant?: 'primary' | 'secondary';\r\n /** Icon to be used in the icon button. */\r\n icon: React.ReactNode;\r\n /** Click handler for the action button. */\r\n onClick: () => void;\r\n}\r\n\r\nexport type VerticalCardStandardButton = Pick<TextButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface VerticalCardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: VerticalCardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: VerticalCardActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const VerticalCardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.generateToken({ componentType:'text', defaultVariant:'subtle' }, props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.generateToken({ componentType: 'text', state: 'disabled' }, props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const VerticalCardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({componentType:'icon', defaultVariant:'subtle' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const VerticalCardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst VerticalCardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: VerticalCardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array((length || 0) + (leftButton ? 1 : 0)).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length, leftButton]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, onClick, ...rest} = leftButton;\r\n return (<TextButton className=\"card-bottom-section-action-button\"\r\n ref={elRefs[0]}\r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}\r\n onClick={(e) => {\r\n e.stopPropagation();\r\n onClick && onClick(e);\r\n }}>\r\n {buttonText}\r\n </TextButton>)\r\n }\r\n}\r\n\r\n return (\r\n <VerticalCardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <VerticalCardBottomSectionDivider/>}\r\n {progressLevel != undefined && <VerticalCardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </VerticalCardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <VerticalCardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <VerticalCardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </VerticalCardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <VerticalCardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </VerticalCardBottomSectionNoteRightStyles>\r\n )}\r\n </VerticalCardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <VerticalCardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </VerticalCardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <VerticalCardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index + (leftButton ? 1 : 0)]}\r\n className=\"card-bottom-section-action-button\"\r\n key={index}\r\n z-index={2000}\r\n disabled={disabled}\r\n variant={x.variant ?? \"secondary\"}\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </VerticalCardBottomSectionButtonRowContainerStyles>}\r\n </VerticalCardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default VerticalCardBottomSection;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,IAAI,QACC,aAAa;AACpB,SAASC,UAAU,EAAmBC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA8CvE,OAAO,MAAMC,uCAAuC,GAAGf,MAAM,CAACgB,GAAG;AACjE;AACA,CAAC;AAED,OAAO,MAAMC,oCAAoC,GAAGjB,MAAM,CAACgB,GAAG;AAC9D;AACA;AACA,WAAWE,KAAK,IAAIhB,MAAM,CAACiB,aAAa,CAAC;EAAEC,aAAa,EAAC,MAAM;EAAEC,cAAc,EAAC;AAAS,CAAC,EAAEH,KAAK,CAACI,KAAK,CAAC;AACxG;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,qCAAqC,GAAGvB,MAAM,CAACgB,GAA4B;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIE,KAAK,IAAIA,KAAK,CAACM,SAAS,GAAG;AAC/B,aAAatB,MAAM,CAACiB,aAAa,CAAC;EAAEC,aAAa,EAAE,MAAM;EAAEK,KAAK,EAAE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4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = exports.CardMiddleSectionTitle = exports.CardMiddleSectionTagsStyles = exports.CardMiddleSectionContainer = exports.CardMiddleSectionColorBandStyles = exports.CardMiddleSectionCategoryStyles = void 0;
7
+ exports.default = exports.VerticalCardMiddleSectionTitle = exports.VerticalCardMiddleSectionTagsStyles = exports.VerticalCardMiddleSectionContainer = exports.VerticalCardMiddleSectionColorBandStyles = exports.VerticalCardMiddleSectionCategoryStyles = void 0;
8
8
  var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
  var React = _interopRequireWildcard(require("react"));
10
10
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
@@ -12,7 +12,7 @@ var _index = require("../../index");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
- const CardMiddleSectionContainer = exports.CardMiddleSectionContainer = _styledComponents.default.div`
15
+ const VerticalCardMiddleSectionContainer = exports.VerticalCardMiddleSectionContainer = _styledComponents.default.div`
16
16
  display: flex;
17
17
  flex-grow: 1;
18
18
  width: calc(100% - 32px);
@@ -29,7 +29,7 @@ const CardMiddleSectionContainer = exports.CardMiddleSectionContainer = _styledC
29
29
  padding: 2px 0;
30
30
  }
31
31
  `;
32
- const CardMiddleSectionColorBandStyles = exports.CardMiddleSectionColorBandStyles = _styledComponents.default.div`
32
+ const VerticalCardMiddleSectionColorBandStyles = exports.VerticalCardMiddleSectionColorBandStyles = _styledComponents.default.div`
33
33
  position: absolute;
34
34
  width: 100%;
35
35
  top: 0px;
@@ -37,14 +37,14 @@ const CardMiddleSectionColorBandStyles = exports.CardMiddleSectionColorBandStyle
37
37
  height: 8px;
38
38
  background-color: ${props => props.$color};
39
39
  `;
40
- const CardMiddleSectionTagsStyles = exports.CardMiddleSectionTagsStyles = _styledComponents.default.div`
40
+ const VerticalCardMiddleSectionTagsStyles = exports.VerticalCardMiddleSectionTagsStyles = _styledComponents.default.div`
41
41
  display: flex;
42
42
  flex-direction: row;
43
43
  padding: 4px 0;
44
44
  gap: 4px;
45
45
  flex-wrap: wrap;
46
46
  `;
47
- const CardMiddleSectionCategoryStyles = exports.CardMiddleSectionCategoryStyles = _styledComponents.default.div`
47
+ const VerticalCardMiddleSectionCategoryStyles = exports.VerticalCardMiddleSectionCategoryStyles = _styledComponents.default.div`
48
48
  display: flex;
49
49
  flex-direction: row;
50
50
  align-items: center;
@@ -60,7 +60,7 @@ const CardMiddleSectionCategoryStyles = exports.CardMiddleSectionCategoryStyles
60
60
  flex-shrink: 0;
61
61
  }
62
62
  `;
63
- const CardMiddleSectionTitle = exports.CardMiddleSectionTitle = _styledComponents.default.h3`
63
+ const VerticalCardMiddleSectionTitle = exports.VerticalCardMiddleSectionTitle = _styledComponents.default.h3`
64
64
  ${props => (0, _index.ComponentXLStyling)(_index.ComponentTextStyle.Bold, props.$disabled ? _index.COLORS.generateToken({
65
65
  componentType: 'text',
66
66
  defaultVariant: 'subtle'
@@ -69,7 +69,7 @@ const CardMiddleSectionTitle = exports.CardMiddleSectionTitle = _styledComponent
69
69
  defaultVariant: 'default'
70
70
  }, props.theme))}
71
71
  `;
72
- const CardMiddleSection = _ref => {
72
+ const VerticalCardMiddleSection = _ref => {
73
73
  let {
74
74
  colorBandColor,
75
75
  categoryIcon,
@@ -82,11 +82,11 @@ const CardMiddleSection = _ref => {
82
82
  componentId
83
83
  } = _ref;
84
84
  const theme = (0, _styledComponents.useTheme)();
85
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardMiddleSectionContainer, {
85
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardMiddleSectionContainer, {
86
86
  "data-testid": 'card-middleSection',
87
- children: [colorBandColor && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionColorBandStyles, {
87
+ children: [colorBandColor && /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardMiddleSectionColorBandStyles, {
88
88
  $color: colorBandColor
89
- }), (categoryIcon || categoryLabel) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardMiddleSectionCategoryStyles, {
89
+ }), (categoryIcon || categoryLabel) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(VerticalCardMiddleSectionCategoryStyles, {
90
90
  $extraTopMargin: Boolean(colorBandColor),
91
91
  $bottomMargin: Boolean(categoryIcon || categoryLabel),
92
92
  children: [categoryIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentS, {
@@ -97,7 +97,7 @@ const CardMiddleSection = _ref => {
97
97
  }, theme),
98
98
  children: categoryLabel
99
99
  })]
100
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTitle, {
100
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardMiddleSectionTitle, {
101
101
  id: `${componentId}-title`,
102
102
  className: "titleBlock",
103
103
  $disabled: disabled,
@@ -109,13 +109,13 @@ const CardMiddleSection = _ref => {
109
109
  defaultVariant: 'subtle'
110
110
  }, theme),
111
111
  children: description
112
- }), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTagsStyles, {
112
+ }), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardMiddleSectionTagsStyles, {
113
113
  children: tags.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Tag, {
114
114
  label: x.label,
115
115
  variant: x.variant ?? 'neutral',
116
116
  icon: x.icon
117
117
  }, `${x.label}_${index}`))
118
- }), row2Tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTagsStyles, {
118
+ }), row2Tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(VerticalCardMiddleSectionTagsStyles, {
119
119
  children: row2Tags.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Tag, {
120
120
  label: x.label,
121
121
  variant: x.variant ?? 'neutral',
@@ -124,7 +124,7 @@ const CardMiddleSection = _ref => {
124
124
  })]
125
125
  });
126
126
  };
127
- CardMiddleSection.propTypes = {
127
+ VerticalCardMiddleSection.propTypes = {
128
128
  colorBandColor: _propTypes.default.string,
129
129
  categoryIcon: _propTypes.default.node,
130
130
  categoryLabel: _propTypes.default.string,
@@ -141,5 +141,5 @@ CardMiddleSection.propTypes = {
141
141
  disabled: _propTypes.default.bool,
142
142
  componentId: _propTypes.default.string
143
143
  };
144
- var _default = exports.default = CardMiddleSection;
145
- //# sourceMappingURL=CardMiddleSection.cjs.map
144
+ var _default = exports.default = VerticalCardMiddleSection;
145
+ //# sourceMappingURL=VerticalCardMiddleSection.cjs.map