@pega/cosmos-react-build 2.0.0-dev.17.0 → 2.0.0-dev.21.0

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 (133) hide show
  1. package/lib/components/AppHeader/AppHeader.js +3 -3
  2. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  3. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  4. package/lib/components/AppShell/AppShell.js +44 -47
  5. package/lib/components/AppShell/AppShell.js.map +1 -1
  6. package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
  7. package/lib/components/AppShell/AppShell.styles.js +22 -18
  8. package/lib/components/AppShell/AppShell.styles.js.map +1 -1
  9. package/lib/components/AppShell/AppShell.types.d.ts +14 -9
  10. package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
  11. package/lib/components/AppShell/AppShell.types.js.map +1 -1
  12. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  13. package/lib/components/AppShell/AppShellContext.js +5 -3
  14. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  15. package/lib/components/FlowModeller/FlowModeller.d.ts +6 -5
  16. package/lib/components/FlowModeller/FlowModeller.d.ts.map +1 -1
  17. package/lib/components/FlowModeller/FlowModeller.js +184 -61
  18. package/lib/components/FlowModeller/FlowModeller.js.map +1 -1
  19. package/lib/components/FlowModeller/Node/Node.types.d.ts +26 -16
  20. package/lib/components/FlowModeller/Node/Node.types.d.ts.map +1 -1
  21. package/lib/components/FlowModeller/Node/Node.types.js +27 -1
  22. package/lib/components/FlowModeller/Node/Node.types.js.map +1 -1
  23. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts +10 -5
  24. package/lib/components/FlowModeller/Node/NodeTemplate.styles.d.ts.map +1 -1
  25. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js +38 -31
  26. package/lib/components/FlowModeller/Node/NodeTemplate.styles.js.map +1 -1
  27. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts +1 -4
  28. package/lib/components/FlowModeller/Node/NodeTemplates.d.ts.map +1 -1
  29. package/lib/components/FlowModeller/Node/NodeTemplates.js +25 -19
  30. package/lib/components/FlowModeller/Node/NodeTemplates.js.map +1 -1
  31. package/lib/components/FlowModeller/NodeLibrary.d.ts +12 -0
  32. package/lib/components/FlowModeller/NodeLibrary.d.ts.map +1 -0
  33. package/lib/components/FlowModeller/NodeLibrary.js +49 -0
  34. package/lib/components/FlowModeller/NodeLibrary.js.map +1 -0
  35. package/lib/components/FlowModeller/Renderer/AddNode.d.ts +10 -0
  36. package/lib/components/FlowModeller/Renderer/AddNode.d.ts.map +1 -0
  37. package/lib/components/FlowModeller/Renderer/AddNode.js +42 -0
  38. package/lib/components/FlowModeller/Renderer/AddNode.js.map +1 -0
  39. package/lib/components/FlowModeller/Renderer/Connector.d.ts +5 -0
  40. package/lib/components/FlowModeller/Renderer/Connector.d.ts.map +1 -0
  41. package/lib/components/FlowModeller/Renderer/Connector.js +50 -0
  42. package/lib/components/FlowModeller/Renderer/Connector.js.map +1 -0
  43. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts +12 -0
  44. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.d.ts.map +1 -0
  45. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js +15 -0
  46. package/lib/components/FlowModeller/Renderer/ConnectorsContainer.js.map +1 -0
  47. package/lib/components/FlowModeller/Renderer/Node.d.ts +5 -0
  48. package/lib/components/FlowModeller/Renderer/Node.d.ts.map +1 -0
  49. package/lib/components/FlowModeller/Renderer/Node.js +18 -0
  50. package/lib/components/FlowModeller/Renderer/Node.js.map +1 -0
  51. package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts +8 -0
  52. package/lib/components/FlowModeller/Renderer/NodesContainer.d.ts.map +1 -0
  53. package/lib/components/FlowModeller/Renderer/NodesContainer.js +15 -0
  54. package/lib/components/FlowModeller/Renderer/NodesContainer.js.map +1 -0
  55. package/lib/components/FlowModeller/Renderer/Renderer.d.ts +5 -0
  56. package/lib/components/FlowModeller/Renderer/Renderer.d.ts.map +1 -0
  57. package/lib/components/FlowModeller/Renderer/Renderer.js +17 -0
  58. package/lib/components/FlowModeller/Renderer/Renderer.js.map +1 -0
  59. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts +18 -0
  60. package/lib/components/FlowModeller/Renderer/Renderer.types.d.ts.map +1 -0
  61. package/lib/components/FlowModeller/Renderer/Renderer.types.js +2 -0
  62. package/lib/components/FlowModeller/Renderer/Renderer.types.js.map +1 -0
  63. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts +51 -0
  64. package/lib/components/FlowModeller/Renderer/Utils/Graph.d.ts.map +1 -0
  65. package/lib/components/FlowModeller/Renderer/Utils/Graph.js +247 -0
  66. package/lib/components/FlowModeller/Renderer/Utils/Graph.js.map +1 -0
  67. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts +35 -0
  68. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.d.ts.map +1 -0
  69. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js +104 -0
  70. package/lib/components/FlowModeller/Renderer/Utils/GraphLayout.js.map +1 -0
  71. package/lib/components/FlowModeller/helper.d.ts +22 -0
  72. package/lib/components/FlowModeller/helper.d.ts.map +1 -0
  73. package/lib/components/FlowModeller/helper.js +97 -0
  74. package/lib/components/FlowModeller/helper.js.map +1 -0
  75. package/lib/components/LifeCycle/Category.js +5 -5
  76. package/lib/components/LifeCycle/Category.js.map +1 -1
  77. package/lib/components/LifeCycle/LifeCycle.js +5 -5
  78. package/lib/components/LifeCycle/LifeCycle.js.map +1 -1
  79. package/lib/components/LifeCycle/LifeCycleList.js +2 -2
  80. package/lib/components/LifeCycle/LifeCycleList.js.map +1 -1
  81. package/lib/components/LifeCycle/Stage.d.ts +3 -1
  82. package/lib/components/LifeCycle/Stage.d.ts.map +1 -1
  83. package/lib/components/LifeCycle/Stage.js +9 -2
  84. package/lib/components/LifeCycle/Stage.js.map +1 -1
  85. package/lib/components/LifeCycle/Step.d.ts +4 -1
  86. package/lib/components/LifeCycle/Step.d.ts.map +1 -1
  87. package/lib/components/LifeCycle/Step.js +12 -2
  88. package/lib/components/LifeCycle/Step.js.map +1 -1
  89. package/lib/components/LifeCycle/Task.d.ts +3 -1
  90. package/lib/components/LifeCycle/Task.d.ts.map +1 -1
  91. package/lib/components/LifeCycle/Task.js +14 -5
  92. package/lib/components/LifeCycle/Task.js.map +1 -1
  93. package/lib/components/PageTemplates/GalleryPage.d.ts +23 -0
  94. package/lib/components/PageTemplates/GalleryPage.d.ts.map +1 -0
  95. package/lib/components/PageTemplates/GalleryPage.js +23 -0
  96. package/lib/components/PageTemplates/GalleryPage.js.map +1 -0
  97. package/lib/components/PageTemplates/GalleryPage.styles.d.ts +9 -0
  98. package/lib/components/PageTemplates/GalleryPage.styles.d.ts.map +1 -0
  99. package/lib/components/PageTemplates/GalleryPage.styles.js +70 -0
  100. package/lib/components/PageTemplates/GalleryPage.styles.js.map +1 -0
  101. package/lib/components/PageTemplates/PageTemplates.d.ts +10 -3
  102. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  103. package/lib/components/PageTemplates/PageTemplates.js +48 -8
  104. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  105. package/lib/components/PageTemplates/index.d.ts +2 -0
  106. package/lib/components/PageTemplates/index.d.ts.map +1 -1
  107. package/lib/components/PageTemplates/index.js +1 -0
  108. package/lib/components/PageTemplates/index.js.map +1 -1
  109. package/lib/components/SummaryCard/SummaryCard.d.ts +16 -0
  110. package/lib/components/SummaryCard/SummaryCard.d.ts.map +1 -0
  111. package/lib/components/SummaryCard/SummaryCard.js +31 -0
  112. package/lib/components/SummaryCard/SummaryCard.js.map +1 -0
  113. package/lib/components/SummaryCard/index.d.ts +3 -0
  114. package/lib/components/SummaryCard/index.d.ts.map +1 -0
  115. package/lib/components/SummaryCard/index.js +3 -0
  116. package/lib/components/SummaryCard/index.js.map +1 -0
  117. package/lib/components/Visual/Visual.d.ts +17 -0
  118. package/lib/components/Visual/Visual.d.ts.map +1 -0
  119. package/lib/components/Visual/Visual.js +28 -0
  120. package/lib/components/Visual/Visual.js.map +1 -0
  121. package/lib/components/Visual/index.d.ts +3 -0
  122. package/lib/components/Visual/index.d.ts.map +1 -0
  123. package/lib/components/Visual/index.js +3 -0
  124. package/lib/components/Visual/index.js.map +1 -0
  125. package/lib/index.d.ts +2 -0
  126. package/lib/index.d.ts.map +1 -1
  127. package/lib/index.js +2 -0
  128. package/lib/index.js.map +1 -1
  129. package/package.json +5 -4
  130. package/lib/components/FlowModeller/Connector.d.ts +0 -30
  131. package/lib/components/FlowModeller/Connector.d.ts.map +0 -1
  132. package/lib/components/FlowModeller/Connector.js +0 -89
  133. package/lib/components/FlowModeller/Connector.js.map +0 -1
@@ -1,3 +1,5 @@
1
1
  export { OneColumnPage } from './PageTemplates';
2
2
  export { TabbedPage } from './PageTemplates';
3
+ export { default as GalleryPage } from './GalleryPage';
4
+ export { GalleryPageProps } from './GalleryPage';
3
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { OneColumnPage } from './PageTemplates';
2
2
  export { TabbedPage } from './PageTemplates';
3
+ export { default as GalleryPage } from './GalleryPage';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { OneColumnPage } from './PageTemplates';\nexport { TabbedPage } from './PageTemplates';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PageTemplates/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC","sourcesContent":["export { OneColumnPage } from './PageTemplates';\nexport { TabbedPage } from './PageTemplates';\nexport { default as GalleryPage } from './GalleryPage';\nexport { GalleryPageProps } from './GalleryPage';\n"]}
@@ -0,0 +1,16 @@
1
+ import { FC, MouseEvent } from 'react';
2
+ import { Text, Card, MetaListProps } from '@pega/cosmos-react-core';
3
+ import { VisualProps } from '../Visual';
4
+ export interface SummaryCardProps {
5
+ id: string;
6
+ title: string;
7
+ description?: string;
8
+ onClick?: (id: string, e: MouseEvent<HTMLDivElement>) => void;
9
+ meta: MetaListProps['items'];
10
+ visual?: VisualProps;
11
+ }
12
+ export declare const StyledTitle: typeof Text;
13
+ export declare const StyledSummaryCard: typeof Card;
14
+ declare const SummaryCard: FC<SummaryCardProps>;
15
+ export default SummaryCard;
16
+ //# sourceMappingURL=SummaryCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryCard.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryCard/SummaryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EACL,IAAI,EAGJ,IAAI,EAEJ,aAAa,EACd,MAAM,yBAAyB,CAAC;AAIjC,OAAe,EAAE,WAAW,EAAyB,MAAM,WAAW,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC;IAC9D,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,EAAE,OAAO,IAIhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,OAAO,IAarC,CAAC;AAIH,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAkBrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled, { css } from 'styled-components';
3
+ import { Text, Flex, MetaList, Card, defaultThemeProp } from '@pega/cosmos-react-core';
4
+ import BareRoleButton from '@pega/cosmos-react-core/lib/components/Button/BareRoleButton';
5
+ import { StyledDescription } from '../PageTemplates/GalleryPage.styles';
6
+ import Visual, { StyledVisualContainer } from '../Visual';
7
+ export const StyledTitle = styled(Text) `
8
+ overflow: hidden;
9
+ text-overflow: ellipsis;
10
+ white-space: nowrap;
11
+ `;
12
+ export const StyledSummaryCard = styled(Card)(({ theme }) => {
13
+ return css `
14
+ padding: calc(2 * ${theme.base.spacing});
15
+ &:hover,
16
+ &:focus {
17
+ cursor: pointer;
18
+ box-shadow: ${theme.base.shadow.focus};
19
+ }
20
+
21
+ ${StyledVisualContainer} {
22
+ flex-shrink: 0;
23
+ }
24
+ `;
25
+ });
26
+ StyledSummaryCard.defaultProps = defaultThemeProp;
27
+ const SummaryCard = ({ id, title, description, visual, meta, onClick }) => {
28
+ return (_jsxs(BareRoleButton, { container: { direction: 'column', rowGap: 2, justify: 'between' }, as: StyledSummaryCard, onClick: (e) => onClick?.(id, e), children: [_jsxs(Flex, { container: { alignItems: 'center', colGap: 1 }, children: [visual && _jsx(Visual, { ...visual }, void 0), _jsx(StyledTitle, { variant: 'h3', children: title }, void 0)] }, void 0), _jsx(Flex, { item: { grow: 1 }, children: _jsx(StyledDescription, { children: description }, void 0) }, void 0), _jsx(MetaList, { items: meta, wrapItems: false }, void 0)] }, id));
29
+ };
30
+ export default SummaryCard;
31
+ //# sourceMappingURL=SummaryCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SummaryCard.js","sourceRoot":"","sources":["../../../src/components/SummaryCard/SummaryCard.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,cAAc,MAAM,8DAA8D,CAAC;AAE1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,MAAM,EAAE,EAAe,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAWvE,MAAM,CAAC,MAAM,WAAW,GAAgB,MAAM,CAAC,IAAI,CAAC,CAAA;;;;CAInD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAgB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACvE,OAAO,GAAG,CAAA;wBACY,KAAK,CAAC,IAAI,CAAC,OAAO;;;;oBAItB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;;MAGrC,qBAAqB;;;GAGxB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD,MAAM,WAAW,GAAyB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC9F,OAAO,CACL,MAAC,cAAc,IACb,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EACjE,EAAE,EAAE,iBAAiB,EAErB,OAAO,EAAE,CAAC,CAA6B,EAAE,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,aAE5D,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,EAAE,aACjD,MAAM,IAAI,KAAC,MAAM,OAAK,MAAM,WAAI,EACjC,KAAC,WAAW,IAAC,OAAO,EAAC,IAAI,YAAE,KAAK,WAAe,YAC1C,EACP,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YACrB,KAAC,iBAAiB,cAAE,WAAW,WAAqB,WAC/C,EACP,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,WAAI,KAVtC,EAAE,CAWQ,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { FC, MouseEvent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Text,\n Flex,\n MetaList,\n Card,\n defaultThemeProp,\n MetaListProps\n} from '@pega/cosmos-react-core';\nimport BareRoleButton from '@pega/cosmos-react-core/lib/components/Button/BareRoleButton';\n\nimport { StyledDescription } from '../PageTemplates/GalleryPage.styles';\nimport Visual, { VisualProps, StyledVisualContainer } from '../Visual';\n\nexport interface SummaryCardProps {\n id: string;\n title: string;\n description?: string;\n onClick?: (id: string, e: MouseEvent<HTMLDivElement>) => void;\n meta: MetaListProps['items'];\n visual?: VisualProps;\n}\n\nexport const StyledTitle: typeof Text = styled(Text)`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nexport const StyledSummaryCard: typeof Card = styled(Card)(({ theme }) => {\n return css`\n padding: calc(2 * ${theme.base.spacing});\n &:hover,\n &:focus {\n cursor: pointer;\n box-shadow: ${theme.base.shadow.focus};\n }\n\n ${StyledVisualContainer} {\n flex-shrink: 0;\n }\n `;\n});\n\nStyledSummaryCard.defaultProps = defaultThemeProp;\n\nconst SummaryCard: FC<SummaryCardProps> = ({ id, title, description, visual, meta, onClick }) => {\n return (\n <BareRoleButton\n container={{ direction: 'column', rowGap: 2, justify: 'between' }}\n as={StyledSummaryCard}\n key={id}\n onClick={(e: MouseEvent<HTMLDivElement>) => onClick?.(id, e)}\n >\n <Flex container={{ alignItems: 'center', colGap: 1 }}>\n {visual && <Visual {...visual} />}\n <StyledTitle variant='h3'>{title}</StyledTitle>\n </Flex>\n <Flex item={{ grow: 1 }}>\n <StyledDescription>{description}</StyledDescription>\n </Flex>\n <MetaList items={meta} wrapItems={false} />\n </BareRoleButton>\n );\n};\n\nexport default SummaryCard;\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './SummaryCard';
2
+ export * from './SummaryCard';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './SummaryCard';
2
+ export * from './SummaryCard';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SummaryCard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC","sourcesContent":["export { default } from './SummaryCard';\nexport * from './SummaryCard';\n"]}
@@ -0,0 +1,17 @@
1
+ import { FC } from 'react';
2
+ import { ImageProps, IconProps, RequiredByKey } from '@pega/cosmos-react-core';
3
+ interface IconWithColor extends IconProps {
4
+ bgColor?: string;
5
+ color?: string;
6
+ }
7
+ interface VisualPropsInterface {
8
+ /** displays the image */
9
+ image?: ImageProps;
10
+ /** displays icon if image is not available */
11
+ icon?: IconWithColor;
12
+ }
13
+ export declare type VisualProps = RequiredByKey<VisualPropsInterface, 'icon'> | RequiredByKey<VisualPropsInterface, 'image'>;
14
+ export declare const StyledVisualContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
15
+ declare const Visual: FC<VisualProps>;
16
+ export default Visual;
17
+ //# sourceMappingURL=Visual.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Visual.d.ts","sourceRoot":"","sources":["../../../src/components/Visual/Visual.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,EAAE,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,EAEL,UAAU,EACV,SAAS,EAMT,aAAa,EACd,MAAM,yBAAyB,CAAC;AAEjC,UAAU,aAAc,SAAQ,SAAS;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,oBAAoB;IAE5B,yBAAyB;IACzB,KAAK,CAAC,EAAE,UAAU,CAAC;IAEnB,8CAA8C;IAC9C,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,oBAAY,WAAW,GACnB,aAAa,CAAC,oBAAoB,EAAE,MAAM,CAAC,GAC3C,aAAa,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;AAEjD,eAAO,MAAM,qBAAqB,yGAWhC,CAAC;AAIH,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAmB3B,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import styled, { css } from 'styled-components';
3
+ import { readableColor } from 'polished';
4
+ import { Image, Icon, Flex, useTheme, StyledIcon, defaultThemeProp } from '@pega/cosmos-react-core';
5
+ export const StyledVisualContainer = styled.div(({ theme }) => {
6
+ return css `
7
+ width: 2rem;
8
+ height: 2rem;
9
+ border-radius: ${theme.base['border-radius']};
10
+ background-color: var(--bg-color);
11
+ color: var(--fg-color);
12
+ ${StyledIcon} {
13
+ color: var(--fg-color);
14
+ }
15
+ `;
16
+ });
17
+ StyledVisualContainer.defaultProps = defaultThemeProp;
18
+ const Visual = ({ image, icon }) => {
19
+ const theme = useTheme();
20
+ const color = (icon && icon.color) || theme.base.colors.white;
21
+ const bgColor = (icon && icon.bgColor) || readableColor(color);
22
+ return (_jsxs(Flex, { as: StyledVisualContainer, container: { justify: 'center', alignItems: 'center' }, style: {
23
+ '--bg-color': bgColor,
24
+ '--fg-color': color
25
+ }, children: [image && image.src && _jsx(Image, { src: image.src, alt: image.alt }, void 0), icon && icon.name && _jsx(Icon, { name: icon.name }, void 0)] }, void 0));
26
+ };
27
+ export default Visual;
28
+ //# sourceMappingURL=Visual.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Visual.js","sourceRoot":"","sources":["../../../src/components/Visual/Visual.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EACL,KAAK,EAGL,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,gBAAgB,EAEjB,MAAM,yBAAyB,CAAC;AAoBjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC5D,OAAO,GAAG,CAAA;;;qBAGS,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;;MAG1C,UAAU;;;GAGb,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,MAAM,GAAoB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE;IAClD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9D,MAAM,OAAO,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/D,OAAO,CACL,MAAC,IAAI,IACH,EAAE,EAAE,qBAAqB,EACzB,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EACtD,KAAK,EACH;YACE,YAAY,EAAE,OAAO;YACrB,YAAY,EAAE,KAAK;SACH,aAGnB,KAAK,IAAI,KAAK,CAAC,GAAG,IAAI,KAAC,KAAK,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,WAAI,EAC/D,IAAI,IAAI,IAAI,CAAC,IAAI,IAAI,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,WAAI,YAC1C,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC","sourcesContent":["import { CSSProperties, FC } from 'react';\nimport styled, { css } from 'styled-components';\nimport { readableColor } from 'polished';\n\nimport {\n Image,\n ImageProps,\n IconProps,\n Icon,\n Flex,\n useTheme,\n StyledIcon,\n defaultThemeProp,\n RequiredByKey\n} from '@pega/cosmos-react-core';\n\ninterface IconWithColor extends IconProps {\n bgColor?: string;\n color?: string;\n}\n\ninterface VisualPropsInterface {\n // visual: ImageProps | (IconProps & { color?: string; bgColor?: string });\n /** displays the image */\n image?: ImageProps;\n\n /** displays icon if image is not available */\n icon?: IconWithColor;\n}\n\nexport type VisualProps =\n | RequiredByKey<VisualPropsInterface, 'icon'>\n | RequiredByKey<VisualPropsInterface, 'image'>;\n\nexport const StyledVisualContainer = styled.div(({ theme }) => {\n return css`\n width: 2rem;\n height: 2rem;\n border-radius: ${theme.base['border-radius']};\n background-color: var(--bg-color);\n color: var(--fg-color);\n ${StyledIcon} {\n color: var(--fg-color);\n }\n `;\n});\n\nStyledVisualContainer.defaultProps = defaultThemeProp;\n\nconst Visual: FC<VisualProps> = ({ image, icon }) => {\n const theme = useTheme();\n const color = (icon && icon.color) || theme.base.colors.white;\n const bgColor = (icon && icon.bgColor) || readableColor(color);\n return (\n <Flex\n as={StyledVisualContainer}\n container={{ justify: 'center', alignItems: 'center' }}\n style={\n {\n '--bg-color': bgColor,\n '--fg-color': color\n } as CSSProperties\n }\n >\n {image && image.src && <Image src={image.src} alt={image.alt} />}\n {icon && icon.name && <Icon name={icon.name} />}\n </Flex>\n );\n};\n\nexport default Visual;\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './Visual';
2
+ export * from './Visual';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Visual/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from './Visual';
2
+ export * from './Visual';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Visual/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,cAAc,UAAU,CAAC","sourcesContent":["export { default } from './Visual';\nexport * from './Visual';\n"]}
package/lib/index.d.ts CHANGED
@@ -7,4 +7,6 @@ export * from './components/FlowModeller';
7
7
  export { default as LifeCycle } from './components/LifeCycle';
8
8
  export * from './components/LifeCycle';
9
9
  export * from './components/PageTemplates';
10
+ export * from './components/SummaryCard';
11
+ export * from './components/Visual';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC"}
package/lib/index.js CHANGED
@@ -8,4 +8,6 @@ export * from './components/FlowModeller';
8
8
  export { default as LifeCycle } from './components/LifeCycle';
9
9
  export * from './components/LifeCycle';
10
10
  export * from './components/PageTemplates';
11
+ export * from './components/SummaryCard';
12
+ export * from './components/Visual';
11
13
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppHeader } from './components/AppHeader';\nexport * from './components/AppHeader';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as FlowModeller } from './components/FlowModeller';\nexport * from './components/FlowModeller';\nexport { default as LifeCycle } from './components/LifeCycle';\nexport * from './components/LifeCycle';\nexport * from './components/PageTemplates';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppHeader } from './components/AppHeader';\nexport * from './components/AppHeader';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as FlowModeller } from './components/FlowModeller';\nexport * from './components/FlowModeller';\nexport { default as LifeCycle } from './components/LifeCycle';\nexport * from './components/LifeCycle';\nexport * from './components/PageTemplates';\nexport * from './components/SummaryCard';\nexport * from './components/Visual';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-build",
3
- "version": "2.0.0-dev.17.0",
3
+ "version": "2.0.0-dev.21.0",
4
4
  "author": "Pegasystems",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -20,8 +20,9 @@
20
20
  "build": "tsc -b"
21
21
  },
22
22
  "dependencies": {
23
- "@pega/cosmos-react-core": "2.0.0-dev.17.0",
24
- "@pega/cosmos-react-dnd": "2.0.0-dev.17.0",
23
+ "@pega/cosmos-react-core": "2.0.0-dev.21.0",
24
+ "@pega/cosmos-react-dnd": "2.0.0-dev.21.0",
25
+ "dagre": "^0.8.5",
25
26
  "polished": "^4.1.0",
26
27
  "react": "^16.14.0 || ^17.0.0",
27
28
  "react-dom": "^16.14.0 || ^17.0.0",
@@ -39,6 +40,6 @@
39
40
  "@storybook/testing-react": "0.0.18",
40
41
  "@storybook/theming": "^6.3.8",
41
42
  "enzyme": "^3.11.0",
42
- "typescript": "~4.4.2"
43
+ "typescript": "~4.5.2"
43
44
  }
44
45
  }
@@ -1,30 +0,0 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { ForwardProps } from '@pega/cosmos-react-core';
3
- export interface ConnectorProps {
4
- /** Unique id of connector */
5
- id: string;
6
- /** Label for connector if there */
7
- label?: string;
8
- /** Node id which connector should connect to */
9
- targetNodeId?: string;
10
- /** Callback for adding the nodes */
11
- onAddClick?: () => void;
12
- /** Ref of the connector */
13
- ref?: Ref<HTMLButtonElement>;
14
- /** Boolean if the button on the connector is active */
15
- active?: boolean;
16
- }
17
- export declare const StyledWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
18
- withLabel: boolean;
19
- }, never>;
20
- export declare const StyledConnector: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
21
- export declare const StyledButtonWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
22
- export declare const StyledDot: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
23
- export declare const StyledButton: import("styled-components").StyledComponent<FunctionComponent<import("@pega/cosmos-react-core").ButtonProps & ForwardProps>, import("styled-components").DefaultTheme, {
24
- active: ConnectorProps;
25
- }, never>;
26
- export declare const StyledLabelWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
27
- export declare const StyledLabel: import("styled-components").StyledComponent<FunctionComponent<import("@pega/cosmos-react-core").LabelProps & ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
28
- declare const Connector: FunctionComponent<ConnectorProps & ForwardProps>;
29
- export default Connector;
30
- //# sourceMappingURL=Connector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Connector.d.ts","sourceRoot":"","sources":["../../../src/components/FlowModeller/Connector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EAIL,YAAY,EAOb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oCAAoC;IACpC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,2BAA2B;IAC3B,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAC7B,uDAAuD;IACvD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,aAAa;eAA2B,OAAO;SAY1D,CAAC;AAIH,eAAO,MAAM,eAAe,yGAO3B,CAAC;AAIF,eAAO,MAAM,mBAAmB,yGAM/B,CAAC;AAIF,eAAO,MAAM,SAAS,yGAMpB,CAAC;AAIH,eAAO,MAAM,YAAY;YAA4B,cAAc;SAmBjE,CAAC;AAIH,eAAO,MAAM,kBAAkB,yGAG9B,CAAC;AAIF,eAAO,MAAM,WAAW,kLAStB,CAAC;AAIH,QAAA,MAAM,SAAS,EAAE,iBAAiB,CAAC,cAAc,GAAG,YAAY,CA8C/D,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,89 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { forwardRef } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Button, defaultThemeProp, Flex, Icon, Label, useConsolidatedRef, useElement, useI18n, useTheme } from '@pega/cosmos-react-core';
5
- export const StyledWrapper = styled.div(({ withLabel }) => {
6
- return css `
7
- width: 17.5rem;
8
- ${withLabel
9
- ? css `
10
- height: 6rem;
11
- `
12
- : css `
13
- height: 4.5rem;
14
- `}
15
- align-self: center;
16
- `;
17
- });
18
- StyledWrapper.defaultProps = defaultThemeProp;
19
- export const StyledConnector = styled.div `
20
- width: 2rem;
21
- align-self: center;
22
- height: 100%;
23
- svg {
24
- width: 100%;
25
- }
26
- `;
27
- StyledConnector.defaultProps = defaultThemeProp;
28
- export const StyledButtonWrapper = styled.div `
29
- height: 0;
30
- width: 100%;
31
- display: flex;
32
- justify-content: center;
33
- position: relative;
34
- `;
35
- StyledButtonWrapper.defaultProps = defaultThemeProp;
36
- export const StyledDot = styled.div(({ theme }) => {
37
- return css `
38
- top: -3rem;
39
- position: absolute;
40
- color: ${theme.base.colors.slate.medium};
41
- `;
42
- });
43
- StyledDot.defaultProps = defaultThemeProp;
44
- export const StyledButton = styled(Button)(({ theme, active }) => {
45
- return css `
46
- opacity: 0;
47
- top: -3.25rem;
48
- border: 0;
49
- color: ${theme.base.colors.black};
50
- background: ${theme.base.colors.white};
51
- ${active &&
52
- css `
53
- box-shadow: 0 0 0.2rem 0.0625rem ${theme.base.colors.blue.medium};
54
- opacity: 1;
55
- `}
56
- &:hover,
57
- &:active,
58
- &:focus {
59
- opacity: 1;
60
- background: ${theme.base.colors.white};
61
- }
62
- `;
63
- });
64
- StyledButton.defaultProps = defaultThemeProp;
65
- export const StyledLabelWrapper = styled.div `
66
- position: relative;
67
- width: 100%;
68
- `;
69
- StyledLabelWrapper.defaultProps = defaultThemeProp;
70
- export const StyledLabel = styled(Label)(({ theme }) => {
71
- return css `
72
- padding: calc(0.5 * ${theme.base.spacing});
73
- border-radius: 0.25rem;
74
- position: absolute;
75
- bottom: -2.25rem;
76
- background: ${theme.base.colors.slate.medium};
77
- color: ${theme.base.colors.white};
78
- `;
79
- });
80
- StyledLabel.defaultProps = defaultThemeProp;
81
- const Connector = forwardRef(({ label, onAddClick, active = false }, ref) => {
82
- const theme = useTheme();
83
- const t = useI18n();
84
- const [, setButtonEl] = useElement();
85
- const buttonRef = useConsolidatedRef(ref, setButtonEl);
86
- return (_jsx(_Fragment, { children: _jsxs(Flex, Object.assign({ as: StyledWrapper, withLabel: !!label, container: { alignItems: 'center', direction: 'column' } }, { children: [label && (_jsx(Flex, Object.assign({ as: StyledLabelWrapper, container: { justify: 'center' } }, { children: _jsx(StyledLabel, { children: label }, void 0) }), void 0)), _jsx(Flex, Object.assign({ "aria-disabled": 'true', as: StyledConnector }, { children: _jsx("svg", { children: _jsx("path", { strokeWidth: '2', stroke: theme.base.colors.slate.light, d: 'M 16 0 v100' }, void 0) }, void 0) }), void 0), _jsxs(Flex, Object.assign({ as: StyledButtonWrapper }, { children: [_jsx(StyledDot, { children: _jsx(Icon, { name: 'circle-solid' }, void 0) }, void 0), _jsx(StyledButton, Object.assign({ label: t('add_noun', [t('node').toLowerCase()]), active: active, icon: true, onClick: onAddClick, ref: buttonRef }, { children: _jsx(Icon, { name: 'plus' }, void 0) }), void 0)] }), void 0)] }), void 0) }, void 0));
87
- });
88
- export default Connector;
89
- //# sourceMappingURL=Connector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Connector.js","sourceRoot":"","sources":["../../../src/components/FlowModeller/Connector.tsx"],"names":[],"mappings":"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","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n defaultThemeProp,\n Flex,\n ForwardProps,\n Icon,\n Label,\n useConsolidatedRef,\n useElement,\n useI18n,\n useTheme\n} from '@pega/cosmos-react-core';\n\nexport interface ConnectorProps {\n /** Unique id of connector */\n id: string;\n /** Label for connector if there */\n label?: string;\n /** Node id which connector should connect to */\n targetNodeId?: string;\n /** Callback for adding the nodes */\n onAddClick?: () => void;\n /** Ref of the connector */\n ref?: Ref<HTMLButtonElement>;\n /** Boolean if the button on the connector is active */\n active?: boolean;\n}\n\nexport const StyledWrapper = styled.div<{ withLabel: boolean }>(({ withLabel }) => {\n return css`\n width: 17.5rem;\n ${withLabel\n ? css`\n height: 6rem;\n `\n : css`\n height: 4.5rem;\n `}\n align-self: center;\n `;\n});\n\nStyledWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledConnector = styled.div`\n width: 2rem;\n align-self: center;\n height: 100%;\n svg {\n width: 100%;\n }\n`;\n\nStyledConnector.defaultProps = defaultThemeProp;\n\nexport const StyledButtonWrapper = styled.div`\n height: 0;\n width: 100%;\n display: flex;\n justify-content: center;\n position: relative;\n`;\n\nStyledButtonWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledDot = styled.div(({ theme }) => {\n return css`\n top: -3rem;\n position: absolute;\n color: ${theme.base.colors.slate.medium};\n `;\n});\n\nStyledDot.defaultProps = defaultThemeProp;\n\nexport const StyledButton = styled(Button)<{ active: ConnectorProps }>(({ theme, active }) => {\n return css`\n opacity: 0;\n top: -3.25rem;\n border: 0;\n color: ${theme.base.colors.black};\n background: ${theme.base.colors.white};\n ${active &&\n css`\n box-shadow: 0 0 0.2rem 0.0625rem ${theme.base.colors.blue.medium};\n opacity: 1;\n `}\n &:hover,\n &:active,\n &:focus {\n opacity: 1;\n background: ${theme.base.colors.white};\n }\n `;\n});\n\nStyledButton.defaultProps = defaultThemeProp;\n\nexport const StyledLabelWrapper = styled.div`\n position: relative;\n width: 100%;\n`;\n\nStyledLabelWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledLabel = styled(Label)(({ theme }) => {\n return css`\n padding: calc(0.5 * ${theme.base.spacing});\n border-radius: 0.25rem;\n position: absolute;\n bottom: -2.25rem;\n background: ${theme.base.colors.slate.medium};\n color: ${theme.base.colors.white};\n `;\n});\n\nStyledLabel.defaultProps = defaultThemeProp;\n\nconst Connector: FunctionComponent<ConnectorProps & ForwardProps> = forwardRef(\n (\n { label, onAddClick, active = false }: PropsWithoutRef<ConnectorProps>,\n ref: ConnectorProps['ref']\n ) => {\n const theme = useTheme();\n const t = useI18n();\n const [, setButtonEl] = useElement<HTMLButtonElement>();\n const buttonRef = useConsolidatedRef(ref, setButtonEl);\n\n return (\n <>\n <Flex\n as={StyledWrapper}\n withLabel={!!label}\n container={{ alignItems: 'center', direction: 'column' }}\n >\n {label && (\n <Flex as={StyledLabelWrapper} container={{ justify: 'center' }}>\n <StyledLabel>{label}</StyledLabel>\n </Flex>\n )}\n <Flex aria-disabled='true' as={StyledConnector}>\n <svg>\n <path strokeWidth='2' stroke={theme.base.colors.slate.light} d='M 16 0 v100' />\n </svg>\n </Flex>\n\n <Flex as={StyledButtonWrapper}>\n <StyledDot>\n <Icon name='circle-solid' />\n </StyledDot>\n <StyledButton\n label={t('add_noun', [t('node').toLowerCase()])}\n active={active}\n icon\n onClick={onAddClick}\n ref={buttonRef}\n >\n <Icon name='plus' />\n </StyledButton>\n </Flex>\n </Flex>\n </>\n );\n }\n);\n\nexport default Connector;\n"]}