@pega/cosmos-react-cs 2.0.0-dev.2.1 → 2.0.0-dev.20.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.
- package/lib/components/Article/Article.d.ts.map +1 -1
- package/lib/components/Article/Article.js +4 -19
- package/lib/components/Article/Article.js.map +1 -1
- package/lib/components/Article/ArticleFooter.d.ts.map +1 -1
- package/lib/components/Article/ArticleFooter.js +6 -7
- package/lib/components/Article/ArticleFooter.js.map +1 -1
- package/lib/components/Article/ArticleSkeleton.d.ts.map +1 -1
- package/lib/components/Article/ArticleSkeleton.js +7 -8
- package/lib/components/Article/ArticleSkeleton.js.map +1 -1
- package/lib/components/ArticleList/ArticleList.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleList.js +6 -10
- package/lib/components/ArticleList/ArticleList.js.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts +4 -1
- package/lib/components/ArticleList/ArticleListHeader.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleListHeader.js +43 -34
- package/lib/components/ArticleList/ArticleListHeader.js.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.d.ts.map +1 -1
- package/lib/components/ArticleList/ArticleSummary.js +10 -7
- package/lib/components/ArticleList/ArticleSummary.js.map +1 -1
- package/lib/components/ArticleList/SummarySkeleton.d.ts.map +1 -1
- package/lib/components/ArticleList/SummarySkeleton.js +3 -11
- package/lib/components/ArticleList/SummarySkeleton.js.map +1 -1
- package/lib/components/CSCaseView/CSCaseView.d.ts +9 -0
- package/lib/components/CSCaseView/CSCaseView.d.ts.map +1 -0
- package/lib/components/CSCaseView/CSCaseView.js +16 -0
- package/lib/components/CSCaseView/CSCaseView.js.map +1 -0
- package/lib/components/CSCaseView/index.d.ts +3 -0
- package/lib/components/CSCaseView/index.d.ts.map +1 -0
- package/lib/components/CSCaseView/index.js +2 -0
- package/lib/components/CSCaseView/index.js.map +1 -0
- package/lib/components/CallControlPanel/Call.d.ts +6 -0
- package/lib/components/CallControlPanel/Call.d.ts.map +1 -0
- package/lib/components/CallControlPanel/Call.js +145 -0
- package/lib/components/CallControlPanel/Call.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.d.ts +6 -0
- package/lib/components/CallControlPanel/CallControlPanel.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.js +68 -0
- package/lib/components/CallControlPanel/CallControlPanel.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts +15 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.js +118 -0
- package/lib/components/CallControlPanel/CallControlPanel.styles.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.d.ts +112 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.js +2 -0
- package/lib/components/CallControlPanel/CallControlPanel.types.js.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.d.ts +19 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.js +74 -0
- package/lib/components/CallControlPanel/CallControlPanelIcon.js.map +1 -0
- package/lib/components/CallControlPanel/CallTransfer.d.ts +19 -0
- package/lib/components/CallControlPanel/CallTransfer.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CallTransfer.js +121 -0
- package/lib/components/CallControlPanel/CallTransfer.js.map +1 -0
- package/lib/components/CallControlPanel/CalleePicker.d.ts +20 -0
- package/lib/components/CallControlPanel/CalleePicker.d.ts.map +1 -0
- package/lib/components/CallControlPanel/CalleePicker.js +61 -0
- package/lib/components/CallControlPanel/CalleePicker.js.map +1 -0
- package/lib/components/CallControlPanel/ContactsList.d.ts +23 -0
- package/lib/components/CallControlPanel/ContactsList.d.ts.map +1 -0
- package/lib/components/CallControlPanel/ContactsList.js +88 -0
- package/lib/components/CallControlPanel/ContactsList.js.map +1 -0
- package/lib/components/CallControlPanel/DTMFKeypad.d.ts +11 -0
- package/lib/components/CallControlPanel/DTMFKeypad.d.ts.map +1 -0
- package/lib/components/CallControlPanel/DTMFKeypad.js +23 -0
- package/lib/components/CallControlPanel/DTMFKeypad.js.map +1 -0
- package/lib/components/CallControlPanel/StopWatch.d.ts +9 -0
- package/lib/components/CallControlPanel/StopWatch.d.ts.map +1 -0
- package/lib/components/CallControlPanel/StopWatch.js +28 -0
- package/lib/components/CallControlPanel/StopWatch.js.map +1 -0
- package/lib/components/CallControlPanel/index.d.ts +4 -0
- package/lib/components/CallControlPanel/index.d.ts.map +1 -0
- package/lib/components/CallControlPanel/index.js +3 -0
- package/lib/components/CallControlPanel/index.js.map +1 -0
- package/lib/components/CallControlPanel/utils.d.ts +7 -0
- package/lib/components/CallControlPanel/utils.d.ts.map +1 -0
- package/lib/components/CallControlPanel/utils.js +35 -0
- package/lib/components/CallControlPanel/utils.js.map +1 -0
- package/lib/components/DialPad/DialPad.d.ts +16 -0
- package/lib/components/DialPad/DialPad.d.ts.map +1 -0
- package/lib/components/DialPad/DialPad.js +33 -0
- package/lib/components/DialPad/DialPad.js.map +1 -0
- package/lib/components/DialPad/DialPad.types.d.ts +33 -0
- package/lib/components/DialPad/DialPad.types.d.ts.map +1 -0
- package/lib/components/DialPad/DialPad.types.js +2 -0
- package/lib/components/DialPad/DialPad.types.js.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.d.ts +12 -0
- package/lib/components/DialPad/DialPadKeyboard.d.ts.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.js +87 -0
- package/lib/components/DialPad/DialPadKeyboard.js.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.d.ts +5 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.d.ts.map +1 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.js +76 -0
- package/lib/components/DialPad/DialPadKeyboard.styles.js.map +1 -0
- package/lib/components/DialPad/KeyboardNavigation.d.ts +6 -0
- package/lib/components/DialPad/KeyboardNavigation.d.ts.map +1 -0
- package/lib/components/DialPad/KeyboardNavigation.js +156 -0
- package/lib/components/DialPad/KeyboardNavigation.js.map +1 -0
- package/lib/components/DialPad/utils.d.ts +4 -0
- package/lib/components/DialPad/utils.d.ts.map +1 -0
- package/lib/components/DialPad/utils.js +7 -0
- package/lib/components/DialPad/utils.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts +6 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js +75 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts +9 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js +142 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.styles.js.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +31 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js +2 -0
- package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -0
- package/lib/components/IntelligentGuidance/index.d.ts +3 -0
- package/lib/components/IntelligentGuidance/index.d.ts.map +1 -0
- package/lib/components/IntelligentGuidance/index.js +2 -0
- package/lib/components/IntelligentGuidance/index.js.map +1 -0
- package/lib/components/InteractionNotification/InteractionNotification.d.ts.map +1 -1
- package/lib/components/InteractionNotification/InteractionNotification.js +19 -26
- package/lib/components/InteractionNotification/InteractionNotification.js.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.d.ts +2 -4
- package/lib/components/InteractionTimer/InteractionTimer.d.ts.map +1 -1
- package/lib/components/InteractionTimer/InteractionTimer.js +14 -11
- package/lib/components/InteractionTimer/InteractionTimer.js.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.d.ts.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.js +138 -48
- package/lib/components/TaskManager/Picker/Picker.js.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.types.d.ts +11 -2
- package/lib/components/TaskManager/Picker/Picker.types.d.ts.map +1 -1
- package/lib/components/TaskManager/Picker/Picker.types.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.context.d.ts +1 -0
- package/lib/components/TaskManager/TaskManager.context.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.js +54 -83
- package/lib/components/TaskManager/TaskManager.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.styles.d.ts +15 -20
- package/lib/components/TaskManager/TaskManager.styles.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.styles.js +173 -166
- package/lib/components/TaskManager/TaskManager.styles.js.map +1 -1
- package/lib/components/TaskManager/TaskManager.types.d.ts +12 -6
- package/lib/components/TaskManager/TaskManager.types.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskManager.types.js.map +1 -1
- package/lib/components/TaskManager/TaskManagerTabs.d.ts +6 -0
- package/lib/components/TaskManager/TaskManagerTabs.d.ts.map +1 -0
- package/lib/components/TaskManager/TaskManagerTabs.js +159 -0
- package/lib/components/TaskManager/TaskManagerTabs.js.map +1 -0
- package/lib/components/TaskManager/TaskView.d.ts.map +1 -1
- package/lib/components/TaskManager/TaskView.js +3 -6
- package/lib/components/TaskManager/TaskView.js.map +1 -1
- package/lib/components/TaskManager/index.d.ts +1 -1
- package/lib/components/TaskManager/index.d.ts.map +1 -1
- package/lib/components/TaskManager/index.js.map +1 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -1
- package/package.json +14 -14
- package/lib/components/TaskManager/TaskDrawer.d.ts +0 -6
- package/lib/components/TaskManager/TaskDrawer.d.ts.map +0 -1
- package/lib/components/TaskManager/TaskDrawer.js +0 -84
- package/lib/components/TaskManager/TaskDrawer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Article.d.ts","sourceRoot":"","sources":["../../../src/components/Article/Article.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Article.d.ts","sourceRoot":"","sources":["../../../src/components/Article/Article.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EACL,aAAa,EAOb,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAG5C,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,0BAA0B;IAC1B,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gEAAgE;IAChE,gBAAgB,CAAC,EAAE;QACjB,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KAChC,EAAE,CAAC;IACJ,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,IAAI,CAAC,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,sBAAsB;IACtB,OAAO,EAAE,SAAS,CAAC;IACnB,aAAa;IACb,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;IAC5C,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,oBAAY,YAAY,GACpB,CAAC,gBAAgB,GAAG;IAAE,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,GAC5C,CAAC,OAAO,CAAC,gBAAgB,CAAC,GAAG;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAiDxD,QAAA,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAkE3D,CAAC;AAMF,eAAe,OAAO,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
import { Flex, LineSkeleton, MenuButton, MetaList, Text, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
4
4
|
import ArticleSkeleton from './ArticleSkeleton';
|
|
@@ -40,24 +40,9 @@ const Locale = {
|
|
|
40
40
|
};
|
|
41
41
|
const Article = (props) => {
|
|
42
42
|
const { meta, title, navigation, content, primaryActions, secondaryActions, footer, skeletonize, ...restProps } = props;
|
|
43
|
-
return (
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
React.createElement(Flex, { container: { alignItems: 'center' } },
|
|
47
|
-
primaryActions,
|
|
48
|
-
secondaryActions && (React.createElement(MenuButton, { variant: 'simple', text: Locale.moreActions, icon: 'more', iconOnly: true, menu: {
|
|
49
|
-
items: secondaryActions.map(({ text, ...rest }) => ({ ...rest, primary: text }))
|
|
50
|
-
} }))))),
|
|
51
|
-
title ? (React.createElement(Flex, { container: true, as: StyledArticleHeader },
|
|
52
|
-
React.createElement(Text, { variant: 'h3' }, title))) : (skeletonize && React.createElement(LineSkeleton, { width: 'l' })),
|
|
53
|
-
meta && meta.length > 0 ? (React.createElement(Flex, { container: true, item: { shrink: 0 } },
|
|
54
|
-
React.createElement(MetaList, { items: meta }))) : (skeletonize && (React.createElement(Flex, { container: true },
|
|
55
|
-
React.createElement(LineSkeleton, { width: 's' }),
|
|
56
|
-
React.createElement(LineSkeleton, { width: 's' }),
|
|
57
|
-
React.createElement(LineSkeleton, { width: 's' })))),
|
|
58
|
-
skeletonize ? (React.createElement(StyledArticleContent, null,
|
|
59
|
-
React.createElement(ArticleSkeleton, null))) : (React.createElement(StyledArticleContent, null, content)),
|
|
60
|
-
footer));
|
|
43
|
+
return (_jsxs(Flex, { container: { direction: 'column', gap: 1 }, as: StyledArticleWrapper, ...restProps, children: [(navigation || primaryActions || secondaryActions) && (_jsxs(Flex, { container: { gap: 1, alignItems: 'center' }, children: [_jsx(Flex, { container: true, item: { grow: 1 }, children: navigation }, void 0), _jsxs(Flex, { container: { alignItems: 'center' }, children: [primaryActions, secondaryActions && (_jsx(MenuButton, { variant: 'simple', text: Locale.moreActions, icon: 'more', iconOnly: true, menu: {
|
|
44
|
+
items: secondaryActions.map(({ text, ...rest }) => ({ ...rest, primary: text }))
|
|
45
|
+
} }, void 0))] }, void 0)] }, void 0)), title ? (_jsx(Flex, { container: true, as: StyledArticleHeader, children: _jsx(Text, { variant: 'h3', children: title }, void 0) }, void 0)) : (skeletonize && _jsx(LineSkeleton, { width: 'l' }, void 0)), meta && meta.length > 0 ? (_jsx(Flex, { container: true, item: { shrink: 0 }, children: _jsx(MetaList, { items: meta }, void 0) }, void 0)) : (skeletonize && (_jsxs(Flex, { container: true, children: [_jsx(LineSkeleton, { width: 's' }, void 0), _jsx(LineSkeleton, { width: 's' }, void 0), _jsx(LineSkeleton, { width: 's' }, void 0)] }, void 0))), skeletonize ? (_jsx(StyledArticleContent, { children: _jsx(ArticleSkeleton, {}, void 0) }, void 0)) : (_jsx(StyledArticleContent, { children: content }, void 0)), footer] }, void 0));
|
|
61
46
|
};
|
|
62
47
|
Article.defaultProps = {
|
|
63
48
|
skeletonize: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Article.js","sourceRoot":"","sources":["../../../src/components/Article/Article.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Article.js","sourceRoot":"","sources":["../../../src/components/Article/Article.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,IAAI,EACJ,YAAY,EACZ,UAAU,EACV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ACF,WAAW,IAAI,CACb,MAAC,IAAI,IAAC,SAAS,mBACb,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,YACrB,CACR,CACF,EACA,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,oBAAoB,cACnB,KAAC,eAAe,aAAG,WACE,CACxB,CAAC,CAAC,CAAC,CACF,KAAC,oBAAoB,cAAE,OAAO,WAAwB,CACvD,EACA,MAAM,YACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,YAAY,GAAG;IACrB,WAAW,EAAE,KAAK;CACnB,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { ReactElement, ReactNode, FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n MenuItemProps,\n Flex,\n LineSkeleton,\n MenuButton,\n MetaList,\n Text,\n defaultThemeProp,\n BaseProps,\n ForwardProps\n} from '@pega/cosmos-react-core';\n\nimport ArticleFooter from './ArticleFooter';\nimport ArticleSkeleton from './ArticleSkeleton';\n\nexport interface BaseArticleProps extends BaseProps {\n /** Navigation elements */\n navigation?: ReactNode;\n /** Primary actions which needs to be displayed with an icon */\n primaryActions?: ReactNode;\n /** Secondary actions that needs to be pushed under more icon */\n secondaryActions?: {\n id: MenuItemProps['id'];\n text: MenuItemProps['primary'];\n }[];\n /** Article title */\n title: string;\n /** Array of meta data rendered through MetaList component */\n meta?: (ReactElement | string)[];\n /** Article content */\n content: ReactNode;\n /** Footer */\n footer?: ReactElement<typeof ArticleFooter>;\n /** Prop to check visibility of skeleton */\n skeletonize: boolean;\n}\n\nexport type ArticleProps =\n | (BaseArticleProps & { skeletonize?: false })\n | (Partial<BaseArticleProps> & { skeletonize: true });\n\nconst StyledArticleWrapper = styled.div(props => {\n const { theme } = props;\n return css`\n background: ${theme.base.palette['primary-background']};\n padding: calc(1.5 * ${theme.base.spacing});\n border-radius: calc(0.5 * ${theme.base['border-radius']});\n max-height: inherit;\n `;\n});\n\nconst StyledArticleHeader = styled.header`\n flex-shrink: 0;\n`;\n\nconst StyledArticleContent = styled.div(props => {\n const {\n theme,\n theme: {\n base: { spacing }\n }\n } = props;\n\n return css`\n flex-grow: 1;\n overflow-y: auto;\n padding: 0 calc(1.5 * ${spacing});\n margin: 0 calc(-1.5 * ${spacing});\n\n /* TODO - We need to think of handling this such way RTE content is not impacted with the styles inside styles/GlobalStyle.tsx */\n ul,\n ol {\n padding-left: calc(3 * ${spacing});\n }\n a {\n color: ${theme.components.link.color};\n }\n `;\n});\n\nStyledArticleContent.defaultProps = defaultThemeProp;\nStyledArticleWrapper.defaultProps = defaultThemeProp;\n\nconst Locale = {\n // FIXME: TR\n moreActions: 'More actions'\n};\n\nconst Article: FunctionComponent<ArticleProps & ForwardProps> = (props: ArticleProps) => {\n const {\n meta,\n title,\n navigation,\n content,\n primaryActions,\n secondaryActions,\n footer,\n skeletonize,\n ...restProps\n } = props;\n\n return (\n <Flex container={{ direction: 'column', gap: 1 }} as={StyledArticleWrapper} {...restProps}>\n {(navigation || primaryActions || secondaryActions) && (\n <Flex container={{ gap: 1, alignItems: 'center' }}>\n <Flex container item={{ grow: 1 }}>\n {navigation}\n </Flex>\n <Flex container={{ alignItems: 'center' }}>\n {primaryActions}\n {secondaryActions && (\n <MenuButton\n variant='simple'\n text={Locale.moreActions}\n icon='more'\n iconOnly\n menu={{\n items: secondaryActions.map(({ text, ...rest }) => ({ ...rest, primary: text }))\n }}\n />\n )}\n </Flex>\n </Flex>\n )}\n {title ? (\n <Flex container as={StyledArticleHeader}>\n <Text variant='h3'>{title}</Text>\n </Flex>\n ) : (\n skeletonize && <LineSkeleton width='l' />\n )}\n {meta && meta.length > 0 ? (\n <Flex container item={{ shrink: 0 }}>\n <MetaList items={meta} />\n </Flex>\n ) : (\n skeletonize && (\n <Flex container>\n <LineSkeleton width='s' />\n <LineSkeleton width='s' />\n <LineSkeleton width='s' />\n </Flex>\n )\n )}\n {skeletonize ? (\n <StyledArticleContent>\n <ArticleSkeleton />\n </StyledArticleContent>\n ) : (\n <StyledArticleContent>{content}</StyledArticleContent>\n )}\n {footer}\n </Flex>\n );\n};\n\nArticle.defaultProps = {\n skeletonize: false\n};\n\nexport default Article;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleFooter.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ArticleFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAA2B,MAAM,OAAO,CAAC;AAG9E,OAAO,EAA+B,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG/F,MAAM,WAAW,UAAU;IACzB,eAAe;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,mBAAmB;IACnB,IAAI,CAAC,EAAE,UAAU,EAAE,CAAC;IACpB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC5C,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AA6BD,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAyCvE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback } from 'react';
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
3
4
|
import { Flex, Tag, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
4
5
|
import { StyledTag } from '@pega/cosmos-react-core/lib/components/Badges/Tag';
|
|
@@ -28,14 +29,12 @@ StyledTags.defaultProps = defaultThemeProp;
|
|
|
28
29
|
const ArticleFooter = (props) => {
|
|
29
30
|
const { content, tags, onTagClick, ...restProps } = props;
|
|
30
31
|
const onTagClickHandler = useCallback((event) => {
|
|
31
|
-
onTagClick
|
|
32
|
+
onTagClick?.(event.currentTarget.dataset.tagId);
|
|
32
33
|
}, [onTagClick]);
|
|
33
|
-
return (
|
|
34
|
+
return (_jsxs(Flex, { as: StyledArticleFooter, container: {
|
|
34
35
|
direction: 'column',
|
|
35
|
-
|
|
36
|
-
}, ...restProps },
|
|
37
|
-
content,
|
|
38
|
-
tags && (React.createElement(Flex, { container: { wrap: 'wrap' }, as: StyledTags }, tags.map(tag => (React.createElement(Tag, { tabIndex: 0, type: 'pill', variant: 'light', key: tag.id, "data-tag-id": tag.id, title: tag.tagName, onClick: onTagClickHandler, rel: 'tag' }, tag.tagName)))))));
|
|
36
|
+
gap: 2
|
|
37
|
+
}, ...restProps, children: [content, tags && (_jsx(Flex, { container: { wrap: 'wrap' }, as: StyledTags, children: tags.map(tag => (_jsx(Tag, { tabIndex: 0, type: 'pill', variant: 'light', "data-tag-id": tag.id, onClick: onTagClickHandler, rel: 'tag', children: tag.tagName }, tag.id))) }, void 0))] }, void 0));
|
|
39
38
|
};
|
|
40
39
|
export default ArticleFooter;
|
|
41
40
|
//# sourceMappingURL=ArticleFooter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleFooter.js","sourceRoot":"","sources":["../../../src/components/Article/ArticleFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ArticleFooter.js","sourceRoot":"","sources":["../../../src/components/Article/ArticleFooter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA4C,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,MAA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AAE,CAAC;SACP,KACG,SAAS,aAEZ,OAAO,EACP,IAAI,IAAI,CACP,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,UAAU,YAC9C,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACf,KAAC,GAAG,IACF,QAAQ,EAAE,CAAC,EACX,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,OAAO,iBAEF,GAAG,CAAC,EAAE,EACnB,OAAO,EAAE,iBAAiB,EAC1B,GAAG,EAAC,KAAK,YAER,GAAG,CAAC,OAAO,IALP,GAAG,CAAC,EAAE,CAMP,CACP,CAAC,WACG,CACR,YACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { ReactNode, FunctionComponent, MouseEvent, useCallback } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex, Tag, defaultThemeProp, BaseProps, ForwardProps } from '@pega/cosmos-react-core';\nimport { StyledTag } from '@pega/cosmos-react-core/lib/components/Badges/Tag';\n\nexport interface ArticleTag {\n /** Tag name */\n tagName: string;\n /** Tag id. If not set tagName is treated as id */\n id: string;\n}\n\nexport interface ArticleFooterProps extends BaseProps {\n /** Article tags */\n tags?: ArticleTag[];\n /** Callback that triggers on click of tag */\n onTagClick?: (id: ArticleTag['id']) => void;\n /** Footer content */\n content?: ReactNode;\n}\n\nconst StyledArticleFooter = styled.div(({ theme }) => {\n return css`\n flex-shrink: 0;\n &::before {\n content: '';\n display: block;\n background: ${theme.base.palette['border-line']};\n height: 0.0625rem;\n margin-bottom: calc(2 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledArticleFooter.defaultProps = defaultThemeProp;\n\nconst StyledTags = styled.div(({ theme }) => {\n return css`\n padding: calc(0.25 * ${theme.base.spacing});\n margin: 0 calc(-0.5 * ${theme.base.spacing});\n & > ${StyledTag} {\n margin: calc(0.25 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledTags.defaultProps = defaultThemeProp;\n\nconst ArticleFooter: FunctionComponent<ArticleFooterProps & ForwardProps> = (\n props: ArticleFooterProps\n) => {\n const { content, tags, onTagClick, ...restProps } = props;\n\n const onTagClickHandler = useCallback(\n (event: MouseEvent<HTMLElement>) => {\n onTagClick?.(event.currentTarget.dataset.tagId!);\n },\n [onTagClick]\n );\n\n return (\n <Flex\n as={StyledArticleFooter}\n container={{\n direction: 'column',\n gap: 2\n }}\n {...restProps}\n >\n {content}\n {tags && (\n <Flex container={{ wrap: 'wrap' }} as={StyledTags}>\n {tags.map(tag => (\n <Tag\n tabIndex={0}\n type='pill'\n variant='light'\n key={tag.id}\n data-tag-id={tag.id}\n onClick={onTagClickHandler}\n rel='tag'\n >\n {tag.tagName}\n </Tag>\n ))}\n </Flex>\n )}\n </Flex>\n );\n};\n\nexport default ArticleFooter;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleSkeleton.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ArticleSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Article/ArticleSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAKL,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,oBAAqB,SAAQ,SAAS;CAAG;AAE1D,eAAO,MAAM,qBAAqB,yGAAe,CAAC;AAElD,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CAqB3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
import { Flex, LineSkeleton, ParagraphSkeleton } from '@pega/cosmos-react-core';
|
|
4
4
|
export const StyledArticleSkeleton = styled.div ``;
|
|
5
5
|
const ArticleSkeleton = (props) => {
|
|
6
6
|
const numberOfLines = 18;
|
|
7
|
-
return (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}))));
|
|
7
|
+
return (_jsx(StyledArticleSkeleton, { ...props, "aria-disabled": 'true', children: _jsx(ParagraphSkeleton, { children: Array.from({ length: numberOfLines }, (_, i) => {
|
|
8
|
+
const lines = i % 3 === 0 ? ['s', 'm'] : ['s', 's', 's'];
|
|
9
|
+
return (_jsx(Flex, { container: { alignItems: 'center' }, children: lines.map((size, j) => (
|
|
10
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
11
|
+
_jsx(LineSkeleton, { width: size }, j))) }, i));
|
|
12
|
+
}) }, void 0) }, void 0));
|
|
14
13
|
};
|
|
15
14
|
export default ArticleSkeleton;
|
|
16
15
|
//# sourceMappingURL=ArticleSkeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSkeleton.js","sourceRoot":"","sources":["../../../src/components/Article/ArticleSkeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleSkeleton.js","sourceRoot":"","sources":["../../../src/components/Article/ArticleSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,YAAY,EAEZ,iBAAiB,EAGlB,MAAM,yBAAyB,CAAC;AAIjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAElD,MAAM,eAAe,GAA2D,CAC9E,KAA2B,EAC3B,EAAE;IACF,MAAM,aAAa,GAAG,EAAE,CAAC;IACzB,OAAO,CACL,KAAC,qBAAqB,OAAK,KAAK,mBAAgB,MAAM,YACpD,KAAC,iBAAiB,cACf,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC9C,MAAM,KAAK,GAAiC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;gBACvF,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,YACtC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;oBACtB,oDAAoD;oBACpD,KAAC,YAAY,IAAC,KAAK,EAAE,IAAI,IAAO,CAAC,CAAI,CACtC,CAAC,IAJ4C,CAAC,CAK1C,CACR,CAAC;YACJ,CAAC,CAAC,WACgB,WACE,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Flex,\n LineSkeleton,\n LineSkeletonProps,\n ParagraphSkeleton,\n BaseProps,\n ForwardProps\n} from '@pega/cosmos-react-core';\n\nexport interface ArticleSkeletonProps extends BaseProps {}\n\nexport const StyledArticleSkeleton = styled.div``;\n\nconst ArticleSkeleton: FunctionComponent<ArticleSkeletonProps & ForwardProps> = (\n props: ArticleSkeletonProps\n) => {\n const numberOfLines = 18;\n return (\n <StyledArticleSkeleton {...props} aria-disabled='true'>\n <ParagraphSkeleton>\n {Array.from({ length: numberOfLines }, (_, i) => {\n const lines: LineSkeletonProps['width'][] = i % 3 === 0 ? ['s', 'm'] : ['s', 's', 's'];\n return (\n <Flex container={{ alignItems: 'center' }} key={i}>\n {lines.map((size, j) => (\n // eslint-disable-next-line react/no-array-index-key\n <LineSkeleton width={size} key={j} />\n ))}\n </Flex>\n );\n })}\n </ParagraphSkeleton>\n </StyledArticleSkeleton>\n );\n};\n\nexport default ArticleSkeleton;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleList.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ArticleList.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleList.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,YAAY,EAEZ,GAAG,EAEJ,MAAM,OAAO,CAAC;AAGf,OAAO,EAAmC,SAAS,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAGnG,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AAGpD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,iDAAiD;IACjD,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAChD,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,2CAA2C;IAC3C,WAAW,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AA2DD,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CA0CnE,CAAC;AAIF,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import styled, { css } from 'styled-components';
|
|
3
4
|
import { Flex, useI18n, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
4
5
|
import { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';
|
|
@@ -12,12 +13,13 @@ const StyledArticleList = styled.div(props => {
|
|
|
12
13
|
overflow: auto;
|
|
13
14
|
padding: 0 calc(2 * ${theme.base.spacing});
|
|
14
15
|
background: ${theme.base.palette['primary-background']};
|
|
16
|
+
border-radius: ${theme.components.card['border-radius']};
|
|
15
17
|
${StyledCard} {
|
|
16
18
|
margin-bottom: calc(2 * ${theme.base.spacing});
|
|
17
19
|
}
|
|
18
20
|
${StyledSummaryList} {
|
|
19
21
|
flex-grow: 1;
|
|
20
|
-
margin: ${theme.base.spacing} 0;
|
|
22
|
+
margin: 0 0 ${theme.base.spacing} 0;
|
|
21
23
|
list-style-type: none;
|
|
22
24
|
> li:not(:last-child) {
|
|
23
25
|
border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
@@ -36,7 +38,7 @@ const StyledArticleListHeader = styled.div(props => {
|
|
|
36
38
|
position: sticky;
|
|
37
39
|
top: 0;
|
|
38
40
|
background: ${theme.base.palette['primary-background']};
|
|
39
|
-
padding: calc(2 * ${theme.base.spacing}) 0
|
|
41
|
+
padding: calc(2 * ${theme.base.spacing}) 0 0 0;
|
|
40
42
|
z-index: 2;
|
|
41
43
|
`;
|
|
42
44
|
});
|
|
@@ -56,13 +58,7 @@ StyledArticleListFooter.defaultProps = defaultThemeProp;
|
|
|
56
58
|
const ArticleList = forwardRef((props, ref) => {
|
|
57
59
|
const { header, children, skeletonize, footer, ...restProps } = props;
|
|
58
60
|
const t = useI18n();
|
|
59
|
-
return (
|
|
60
|
-
header && (React.createElement(Flex, { container: true, as: StyledArticleListHeader, "aria-label": t('article_list_filter_label_a11y').toString() }, header)),
|
|
61
|
-
React.createElement(Flex, { container: { direction: 'column' }, as: StyledSummaryList, role: 'feed' }, skeletonize ? (React.createElement(React.Fragment, null,
|
|
62
|
-
React.createElement(SummarySkeleton, null),
|
|
63
|
-
React.createElement(SummarySkeleton, null),
|
|
64
|
-
React.createElement(SummarySkeleton, null))) : (children)),
|
|
65
|
-
footer && (React.createElement(Flex, { container: true, as: StyledArticleListFooter }, footer))));
|
|
61
|
+
return (_jsxs(Flex, { container: { direction: 'column' }, as: StyledArticleList, "aria-label": t('article_list_label_a11y').toString(), ref: ref, ...restProps, children: [header && (_jsx(Flex, { container: true, as: StyledArticleListHeader, "aria-label": t('article_list_filter_label_a11y').toString(), children: header }, void 0)), _jsx(Flex, { container: { direction: 'column' }, as: StyledSummaryList, role: 'feed', children: skeletonize ? (_jsxs(_Fragment, { children: [_jsx(SummarySkeleton, {}, void 0), _jsx(SummarySkeleton, {}, void 0), _jsx(SummarySkeleton, {}, void 0)] }, void 0)) : (children) }, void 0), footer && (_jsx(Flex, { container: true, as: StyledArticleListFooter, children: footer }, void 0))] }, void 0));
|
|
66
62
|
});
|
|
67
63
|
ArticleList.defaultProps = defaultProps;
|
|
68
64
|
export default ArticleList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleList.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ArticleList.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAIL,UAAU,EAGX,MAAM,OAAO,CAAC;AACf,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,EAA2B,MAAM,yBAAyB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAG9E,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAchD,MAAM,YAAY,GAA8B,EAAE,CAAC;AACnD,MAAM,iBAAiB,GAAG,MAAM,CAAC,EAAE,CAAA,EAAE,CAAC;AACtC,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;IAC3C,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,OAAO,GAAG,CAAA;;;0BAGc,KAAK,CAAC,IAAI,CAAC,OAAO;kBAC1B,KAAK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EAAE,GAAG,KAAK,CAAC;IAEtE,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAClC,EAAE,EAAE,iBAAiB,gBACT,CAAC,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE,EACnD,GAAG,EAAE,GAAG,KACJ,SAAS,aAEZ,MAAM,IAAI,CACT,KAAC,IAAI,IACH,SAAS,QACT,EAAE,EAAE,uBAAuB,gBACf,CAAC,CAAC,gCAAgC,CAAC,CAAC,QAAQ,EAAE,YAEzD,MAAM,WACF,CACR,EACD,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAC,MAAM,YACzE,WAAW,CAAC,CAAC,CAAC,CACb,8BACE,KAAC,eAAe,aAAG,EACnB,KAAC,eAAe,aAAG,EACnB,KAAC,eAAe,aAAG,YAClB,CACJ,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,WACI,EACN,MAAM,IAAI,CACT,KAAC,IAAI,IAAC,SAAS,QAAC,EAAE,EAAE,uBAAuB,YACxC,MAAM,WACF,CACR,YACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,WAAW,CAAC,YAAY,GAAG,YAAY,CAAC;AAExC,eAAe,WAAW,CAAC","sourcesContent":["import {\n FunctionComponent,\n ReactNode,\n ReactElement,\n forwardRef,\n Ref,\n PropsWithoutRef\n} from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { Flex, useI18n, defaultThemeProp, BaseProps, ForwardProps } from '@pega/cosmos-react-core';\nimport { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';\n\nimport ArticleListHeader from './ArticleListHeader';\nimport SummarySkeleton from './SummarySkeleton';\n\nexport interface ArticleListProps extends BaseProps {\n /** Search/filtering criteria for article list */\n header?: ReactElement<typeof ArticleListHeader>;\n /** Content for article list */\n children?: ReactNode;\n /** Prop to check visibility of skeleton */\n skeletonize: boolean;\n /** Footer for article list */\n footer?: ReactNode;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst defaultProps: Partial<ArticleListProps> = {};\nconst StyledSummaryList = styled.ul``;\nconst StyledArticleList = styled.div(props => {\n const { theme } = props;\n return css`\n max-height: inherit;\n overflow: auto;\n padding: 0 calc(2 * ${theme.base.spacing});\n background: ${theme.base.palette['primary-background']};\n border-radius: ${theme.components.card['border-radius']};\n ${StyledCard} {\n margin-bottom: calc(2 * ${theme.base.spacing});\n }\n ${StyledSummaryList} {\n flex-grow: 1;\n margin: 0 0 ${theme.base.spacing} 0;\n list-style-type: none;\n > li:not(:last-child) {\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n border-radius: 0;\n padding-bottom: ${theme.base.spacing};\n margin-bottom: ${theme.base.spacing};\n }\n }\n `;\n});\n\nStyledArticleList.defaultProps = defaultThemeProp;\n\nconst StyledArticleListHeader = styled.div(props => {\n const { theme } = props;\n return css`\n flex-shrink: 0;\n position: sticky;\n top: 0;\n background: ${theme.base.palette['primary-background']};\n padding: calc(2 * ${theme.base.spacing}) 0 0 0;\n z-index: 2;\n `;\n});\n\nStyledArticleListHeader.defaultProps = defaultThemeProp;\n\nconst StyledArticleListFooter = styled.div(props => {\n const { theme } = props;\n return css`\n flex-shrink: 0;\n position: sticky;\n bottom: 0;\n background: ${theme.base.palette['primary-background']};\n padding: ${theme.base.spacing} 0;\n z-index: 2;\n `;\n});\n\nStyledArticleListFooter.defaultProps = defaultThemeProp;\n\nconst ArticleList: FunctionComponent<ArticleListProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<ArticleListProps>, ref: Ref<HTMLDivElement>) => {\n const { header, children, skeletonize, footer, ...restProps } = props;\n\n const t = useI18n();\n\n return (\n <Flex\n container={{ direction: 'column' }}\n as={StyledArticleList}\n aria-label={t('article_list_label_a11y').toString()}\n ref={ref}\n {...restProps}\n >\n {header && (\n <Flex\n container\n as={StyledArticleListHeader}\n aria-label={t('article_list_filter_label_a11y').toString()}\n >\n {header}\n </Flex>\n )}\n <Flex container={{ direction: 'column' }} as={StyledSummaryList} role='feed'>\n {skeletonize ? (\n <>\n <SummarySkeleton />\n <SummarySkeleton />\n <SummarySkeleton />\n </>\n ) : (\n children\n )}\n </Flex>\n {footer && (\n <Flex container as={StyledArticleListFooter}>\n {footer}\n </Flex>\n )}\n </Flex>\n );\n }\n);\n\nArticleList.defaultProps = defaultProps;\n\nexport default ArticleList;\n"]}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { FunctionComponent, ReactNode, EventHandler, MouseEvent, ReactElement } from 'react';
|
|
2
|
-
import { SearchInput, BaseProps, AsProp, Action } from '@pega/cosmos-react-core';
|
|
2
|
+
import { SearchInput, BaseProps, AsProp, Action, Icon } from '@pega/cosmos-react-core';
|
|
3
3
|
export interface ArticleListHeaderProps extends BaseProps, AsProp {
|
|
4
|
+
/** Header Icon and Text */
|
|
5
|
+
icon?: ReactElement<typeof Icon>;
|
|
6
|
+
headerText: string;
|
|
4
7
|
/** Primary data: Drop in elements related to search or filtering of articles */
|
|
5
8
|
primary: {
|
|
6
9
|
search: ReactElement<typeof SearchInput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleListHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleListHeader.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ArticleListHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleListHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG7F,OAAO,EAKL,WAAW,EAEX,SAAS,EACT,MAAM,EACN,MAAM,EACN,IAAI,EAGL,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,sBAAuB,SAAQ,SAAS,EAAE,MAAM;IAC/D,2BAA2B;IAC3B,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IAEnB,gFAAgF;IAChF,OAAO,EAAE;QACP,MAAM,EAAE,YAAY,CAAC,OAAO,WAAW,CAAC,CAAC;QACzC,cAAc,CAAC,EAAE,YAAY,CAAC;QAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IACF,+CAA+C;IAC/C,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CACrC;AA2DD,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,CA+ChE,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
import
|
|
2
|
-
import styled from 'styled-components';
|
|
3
|
-
import { Button, Flex, Form, MenuButton, useI18n } from '@pega/cosmos-react-core';
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
import { Button, Flex, Form, MenuButton, useI18n, Text, defaultThemeProp } from '@pega/cosmos-react-core';
|
|
4
|
+
import { StyledFormContent } from '@pega/cosmos-react-core/lib/components/Form/Form';
|
|
5
|
+
const StyledArticleHeader = styled.div(({ theme }) => {
|
|
6
|
+
return css `
|
|
7
|
+
width: 100%;
|
|
8
|
+
gap: 0;
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
10
|
+
button[type='submit'] {
|
|
11
|
+
height: 0;
|
|
12
|
+
min-height: 0;
|
|
13
|
+
width: 0.0625rem;
|
|
14
|
+
clip-path: inset(50%);
|
|
15
|
+
clip: rect(0, 0, 0, 0);
|
|
16
|
+
margin: 0;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
padding: 0;
|
|
19
|
+
border: 0;
|
|
20
|
+
}
|
|
21
|
+
> div:last-child {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
${StyledFormContent} {
|
|
26
|
+
gap: ${theme.base.spacing};
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
});
|
|
30
|
+
StyledArticleHeader.defaultProps = defaultThemeProp;
|
|
31
|
+
const StyledSecondaryContainer = styled(Flex) `
|
|
32
|
+
margin: 0.5rem 0;
|
|
33
|
+
& > * {
|
|
25
34
|
flex-grow: 1;
|
|
26
35
|
}
|
|
27
36
|
`;
|
|
@@ -34,26 +43,26 @@ const StyledHeaderActions = styled.div `
|
|
|
34
43
|
margin: 0;
|
|
35
44
|
}
|
|
36
45
|
`;
|
|
46
|
+
const StyledArticleListHeaderText = styled(Text) `
|
|
47
|
+
text-overflow: ellipsis;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
flex: 1;
|
|
51
|
+
`;
|
|
37
52
|
const Locale = {
|
|
38
53
|
// FIXME: TR
|
|
39
54
|
moreActions: 'More actions'
|
|
40
55
|
};
|
|
41
56
|
const ArticleListHeader = (props) => {
|
|
42
|
-
const { as = Form, primary, secondary, onSubmit, ...restProps } = props;
|
|
57
|
+
const { as = Form, primary, secondary, onSubmit, icon, headerText, ...restProps } = props;
|
|
43
58
|
const t = useI18n();
|
|
44
|
-
return (
|
|
59
|
+
return (_jsxs(StyledArticleHeader, { as: as, actions: _jsx(Button, { type: 'submit', "aria-hidden": 'true', tabIndex: '-1', children: t('article_list_header_submit_label') }, void 0), role: 'search', onSubmit: (ev) => {
|
|
45
60
|
ev.preventDefault();
|
|
46
61
|
if (onSubmit)
|
|
47
62
|
onSubmit(ev);
|
|
48
|
-
}, ...restProps },
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
React.createElement(Flex, { container: true, as: StyledHeaderActions },
|
|
52
|
-
primary.followedFilter,
|
|
53
|
-
primary.actions && (React.createElement(MenuButton, { variant: 'simple', text: Locale.moreActions, icon: 'more', iconOnly: true, menu: {
|
|
54
|
-
items: primary.actions.map(({ text, ...rest }) => ({ ...rest, primary: text }))
|
|
55
|
-
} })))),
|
|
56
|
-
secondary && (React.createElement(Flex, { container: { itemGap: 1 }, className: 'secondary' }, secondary))));
|
|
63
|
+
}, ...restProps, children: [_jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [icon, _jsx(StyledArticleListHeaderText, { variant: 'h2', children: headerText }, void 0), primary.actions && (_jsx(MenuButton, { variant: 'simple', text: Locale.moreActions, icon: 'more', iconOnly: true, menu: {
|
|
64
|
+
items: primary.actions.map(({ text, ...rest }) => ({ ...rest, primary: text }))
|
|
65
|
+
} }, void 0))] }, void 0), _jsxs(Flex, { container: { alignItems: 'center', gap: 1 }, children: [_jsx(Flex, { item: { grow: 1 }, children: primary.search }, void 0), _jsx(Flex, { container: true, as: StyledHeaderActions, children: primary.followedFilter }, void 0)] }, void 0), secondary && (_jsx(StyledSecondaryContainer, { container: { gap: 1 }, children: secondary }, void 0))] }, void 0));
|
|
57
66
|
};
|
|
58
67
|
export default ArticleListHeader;
|
|
59
68
|
//# sourceMappingURL=ArticleListHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleListHeader.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleListHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleListHeader.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleListHeader.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,m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AAC,EAAc,EAAE,EAAE;YAC3B,EAAE,CAAC,cAAc,EAAE,CAAC;YACpB,IAAI,QAAQ;gBAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,KACG,SAAS,aAEb,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC9C,IAAI,EACL,KAAC,2BAA2B,IAAC,OAAO,EAAC,IAAI,YAAE,UAAU,WAA+B,EACnF,OAAO,CAAC,OAAO,IAAI,CAClB,KAAC,UAAU,IACT,OAAO,EAAC,QAAQ,EAChB,IAAI,EAAE,MAAM,CAAC,WAAW,EACxB,IAAI,EAAC,MAAM,EACX,QAAQ,QACR,IAAI,EAAE;4BACJ,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;yBAChF,WACD,CACH,YACI,EACP,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,aAC/C,KAAC,IAAI,IAAC,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,YAAG,OAAO,CAAC,MAAM,WAAQ,EAChD,KAAC,IAAI,IAAC,SAAS,QAAC,EAAE,EAAE,mBAAmB,YACpC,OAAO,CAAC,cAAc,WAClB,YACF,EACN,SAAS,IAAI,CACZ,KAAC,wBAAwB,IAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,YAAG,SAAS,WAA4B,CACxF,YACmB,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { FunctionComponent, ReactNode, EventHandler, MouseEvent, ReactElement } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Flex,\n Form,\n MenuButton,\n SearchInput,\n useI18n,\n BaseProps,\n AsProp,\n Action,\n Icon,\n Text,\n defaultThemeProp\n} from '@pega/cosmos-react-core';\nimport { StyledFormContent } from '@pega/cosmos-react-core/lib/components/Form/Form';\n\nexport interface ArticleListHeaderProps extends BaseProps, AsProp {\n /** Header Icon and Text */\n icon?: ReactElement<typeof Icon>;\n headerText: string;\n\n /** Primary data: Drop in elements related to search or filtering of articles */\n primary: {\n search: ReactElement<typeof SearchInput>;\n followedFilter?: ReactElement;\n actions?: Action[];\n };\n /** Any other filter components to be passed */\n secondary?: ReactNode;\n /** Callback that triggers on enter */\n onSubmit?: EventHandler<MouseEvent>;\n}\n\nconst StyledArticleHeader = styled.div(({ theme }) => {\n return css`\n width: 100%;\n gap: 0;\n\n button[type='submit'] {\n height: 0;\n min-height: 0;\n width: 0.0625rem;\n clip-path: inset(50%);\n clip: rect(0, 0, 0, 0);\n margin: 0;\n overflow: hidden;\n padding: 0;\n border: 0;\n }\n > div:last-child {\n margin: 0;\n }\n\n ${StyledFormContent} {\n gap: ${theme.base.spacing};\n }\n `;\n});\n\nStyledArticleHeader.defaultProps = defaultThemeProp;\n\nconst StyledSecondaryContainer = styled(Flex)`\n margin: 0.5rem 0;\n & > * {\n flex-grow: 1;\n }\n`;\n\n/* This below style will be removed once we have margin auto support from Flex\ncomponent */\nconst StyledHeaderActions = styled.div`\n margin-left: auto;\n\n .radio-check {\n margin: 0;\n }\n`;\n\nconst StyledArticleListHeaderText = styled(Text)`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n flex: 1;\n`;\n\nconst Locale = {\n // FIXME: TR\n moreActions: 'More actions'\n};\n\nconst ArticleListHeader: FunctionComponent<ArticleListHeaderProps> = (\n props: ArticleListHeaderProps\n) => {\n const { as = Form, primary, secondary, onSubmit, icon, headerText, ...restProps } = props;\n const t = useI18n();\n\n return (\n <StyledArticleHeader\n as={as}\n actions={\n <Button type='submit' aria-hidden='true' tabIndex='-1'>\n {t('article_list_header_submit_label')}\n </Button>\n }\n role='search'\n onSubmit={(ev: MouseEvent) => {\n ev.preventDefault();\n if (onSubmit) onSubmit(ev);\n }}\n {...restProps}\n >\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n {icon}\n <StyledArticleListHeaderText variant='h2'>{headerText}</StyledArticleListHeaderText>\n {primary.actions && (\n <MenuButton\n variant='simple'\n text={Locale.moreActions}\n icon='more'\n iconOnly\n menu={{\n items: primary.actions.map(({ text, ...rest }) => ({ ...rest, primary: text }))\n }}\n />\n )}\n </Flex>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Flex item={{ grow: 1 }}>{primary.search}</Flex>\n <Flex container as={StyledHeaderActions}>\n {primary.followedFilter}\n </Flex>\n </Flex>\n {secondary && (\n <StyledSecondaryContainer container={{ gap: 1 }}>{secondary}</StyledSecondaryContainer>\n )}\n </StyledArticleHeader>\n );\n};\n\nexport default ArticleListHeader;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"ArticleSummary.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAIL,IAAI,EAEJ,IAAI,EACJ,SAAS,EACT,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,4BAA4B;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,IAAI,CAAC,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;IAC/D,6BAA6B;IAC7B,OAAO,EAAE,SAAS,CAAC;IACnB,6DAA6D;IAC7D,IAAI,CAAC,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB;AAoBD,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,mBAAmB,GAAG,YAAY,CAezE,CAAC;AAIF,eAAe,cAAc,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
-
import { CardContent, CardFooter, CardHeader, MetaList } from '@pega/cosmos-react-core';
|
|
3
|
+
import { CardContent, CardFooter, CardHeader, MetaList, StyledText } from '@pega/cosmos-react-core';
|
|
4
4
|
import { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';
|
|
5
5
|
import { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';
|
|
6
6
|
import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
|
|
@@ -12,15 +12,18 @@ const ArticleCard = styled(StyledCard) `
|
|
|
12
12
|
padding-left: 0;
|
|
13
13
|
padding-right: 0;
|
|
14
14
|
}
|
|
15
|
+
|
|
16
|
+
> ${StyledCardContent} > ${StyledText} {
|
|
17
|
+
display: -webkit-box;
|
|
18
|
+
-webkit-line-clamp: 3;
|
|
19
|
+
-webkit-box-orient: vertical;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
`;
|
|
17
24
|
const ArticleSummary = (props) => {
|
|
18
25
|
const { header, content, meta, articleID, ...restProps } = props;
|
|
19
|
-
return (
|
|
20
|
-
header ? React.createElement(CardHeader, null, header) : null,
|
|
21
|
-
React.createElement(CardContent, null, content),
|
|
22
|
-
meta && (React.createElement(CardFooter, null,
|
|
23
|
-
React.createElement(MetaList, { items: meta })))));
|
|
26
|
+
return (_jsxs(ArticleCard, { as: 'li', role: 'article', ...restProps, children: [header ? _jsx(CardHeader, { children: header }, void 0) : null, _jsx(CardContent, { children: content }, void 0), meta && (_jsx(CardFooter, { children: _jsx(MetaList, { items: meta }, void 0) }, void 0))] }, articleID));
|
|
24
27
|
};
|
|
25
28
|
ArticleSummary.defaultProps = defaultProps;
|
|
26
29
|
export default ArticleSummary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArticleSummary.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ArticleSummary.js","sourceRoot":"","sources":["../../../src/components/ArticleList/ArticleSummary.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,WAAW,EACX,UAAU,EACV,UAAU,EAEV,QAAQ,EAIR,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAY1F,MAAM,YAAY,GAAiC,EAAE,CAAC;AAEtD,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;;QAE9B,gBAAgB,OAAO,iBAAiB,OAAO,gBAAgB;;;;;QAK/D,iBAAiB,MAAM,UAAU;;;;;;;CAOxC,CAAC;AAEF,MAAM,cAAc,GAA0D,CAC5E,KAA0B,EAC1B,EAAE;IACF,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IACjE,OAAO,CACL,MAAC,WAAW,IAAC,EAAE,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,KAAqB,SAAS,aAC9D,MAAM,CAAC,CAAC,CAAC,KAAC,UAAU,cAAE,MAAM,WAAc,CAAC,CAAC,CAAC,IAAI,EAClD,KAAC,WAAW,cAAE,OAAO,WAAe,EACnC,IAAI,IAAI,CACP,KAAC,UAAU,cACT,KAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,WAAI,WACd,CACd,KAPsC,SAAS,CAQpC,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;AAE3C,eAAe,cAAc,CAAC","sourcesContent":["import { FunctionComponent, ReactElement, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport {\n CardContent,\n CardFooter,\n CardHeader,\n Link,\n MetaList,\n Text,\n BaseProps,\n ForwardProps,\n StyledText\n} from '@pega/cosmos-react-core';\nimport { StyledCard } from '@pega/cosmos-react-core/lib/components/Card/Card';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\nimport { StyledCardFooter } from '@pega/cosmos-react-core/lib/components/Card/CardFooter';\n\nexport interface ArticleSummaryProps extends BaseProps {\n /** Article summary title */\n header?: ReactElement<typeof Text> | ReactElement<typeof Link>;\n /** Summary of the article */\n content: ReactNode;\n /** Array of meta data rendered through MetaList component */\n meta?: (ReactElement | string)[];\n articleID: string;\n}\n\nconst defaultProps: Partial<ArticleSummaryProps> = {};\n\nconst ArticleCard = styled(StyledCard)`\n &&& {\n > ${StyledCardHeader}, > ${StyledCardContent}, > ${StyledCardFooter} {\n padding-left: 0;\n padding-right: 0;\n }\n\n > ${StyledCardContent} > ${StyledText} {\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n }\n`;\n\nconst ArticleSummary: FunctionComponent<ArticleSummaryProps & ForwardProps> = (\n props: ArticleSummaryProps\n) => {\n const { header, content, meta, articleID, ...restProps } = props;\n return (\n <ArticleCard as='li' role='article' key={articleID} {...restProps}>\n {header ? <CardHeader>{header}</CardHeader> : null}\n <CardContent>{content}</CardContent>\n {meta && (\n <CardFooter>\n <MetaList items={meta} />\n </CardFooter>\n )}\n </ArticleCard>\n );\n};\n\nArticleSummary.defaultProps = defaultProps;\n\nexport default ArticleSummary;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummarySkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/SummarySkeleton.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"SummarySkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ArticleList/SummarySkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAIL,SAAS,EACT,YAAY,EACb,MAAM,yBAAyB,CAAC;AAEjC,MAAM,WAAW,oBAAqB,SAAQ,SAAS;CAAG;AAE1D,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,GAAG,YAAY,CAwB3E,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Flex, LineSkeleton, ParagraphSkeleton } from '@pega/cosmos-react-core';
|
|
3
3
|
const SummarySkeleton = (props) => {
|
|
4
|
-
return (
|
|
4
|
+
return (_jsxs(Flex, { as: 'li', container: {
|
|
5
5
|
direction: 'column'
|
|
6
|
-
}, ...props, "aria-disabled": 'true' },
|
|
7
|
-
React.createElement(LineSkeleton, { variant: 'link', width: 'l' }),
|
|
8
|
-
React.createElement(ParagraphSkeleton, null,
|
|
9
|
-
React.createElement(LineSkeleton, null),
|
|
10
|
-
React.createElement(LineSkeleton, { width: 's' })),
|
|
11
|
-
React.createElement(Flex, { container: { alignItems: 'center' } },
|
|
12
|
-
React.createElement(LineSkeleton, { width: 's' }),
|
|
13
|
-
React.createElement(LineSkeleton, { width: 's' }),
|
|
14
|
-
React.createElement(LineSkeleton, { width: 's' }))));
|
|
6
|
+
}, ...props, "aria-disabled": 'true', children: [_jsx(LineSkeleton, { variant: 'link', width: 'l' }, void 0), _jsxs(ParagraphSkeleton, { children: [_jsx(LineSkeleton, {}, void 0), _jsx(LineSkeleton, { width: 's' }, void 0)] }, void 0), _jsxs(Flex, { container: { alignItems: 'center' }, children: [_jsx(LineSkeleton, { width: 's' }, void 0), _jsx(LineSkeleton, { width: 's' }, void 0), _jsx(LineSkeleton, { width: 's' }, void 0)] }, void 0)] }, void 0));
|
|
15
7
|
};
|
|
16
8
|
export default SummarySkeleton;
|
|
17
9
|
//# sourceMappingURL=SummarySkeleton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummarySkeleton.js","sourceRoot":"","sources":["../../../src/components/ArticleList/SummarySkeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SummarySkeleton.js","sourceRoot":"","sources":["../../../src/components/ArticleList/SummarySkeleton.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,iBAAiB,EAGlB,MAAM,yBAAyB,CAAC;AAIjC,MAAM,eAAe,GAA2D,CAC9E,KAA2B,EAC3B,EAAE;IACF,OAAO,CACL,MAAC,IAAI,IACH,EAAE,EAAC,IAAI,EACP,SAAS,EAAE;YACT,SAAS,EAAE,QAAQ;SACpB,KACG,KAAK,mBACK,MAAM,aAEpB,KAAC,YAAY,IAAC,OAAO,EAAC,MAAM,EAAC,KAAK,EAAC,GAAG,WAAG,EACzC,MAAC,iBAAiB,eAChB,KAAC,YAAY,aAAG,EAChB,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,YACR,EACpB,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,aACvC,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,EAC1B,KAAC,YAAY,IAAC,KAAK,EAAC,GAAG,WAAG,YACrB,YACF,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\n\nimport {\n Flex,\n LineSkeleton,\n ParagraphSkeleton,\n BaseProps,\n ForwardProps\n} from '@pega/cosmos-react-core';\n\nexport interface SummarySkeletonProps extends BaseProps {}\n\nconst SummarySkeleton: FunctionComponent<SummarySkeletonProps & ForwardProps> = (\n props: SummarySkeletonProps\n) => {\n return (\n <Flex\n as='li'\n container={{\n direction: 'column'\n }}\n {...props}\n aria-disabled='true'\n >\n <LineSkeleton variant='link' width='l' />\n <ParagraphSkeleton>\n <LineSkeleton />\n <LineSkeleton width='s' />\n </ParagraphSkeleton>\n <Flex container={{ alignItems: 'center' }}>\n <LineSkeleton width='s' />\n <LineSkeleton width='s' />\n <LineSkeleton width='s' />\n </Flex>\n </Flex>\n );\n};\n\nexport default SummarySkeleton;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ForwardProps } from '@pega/cosmos-react-core';
|
|
3
|
+
import { CaseViewProps } from '@pega/cosmos-react-work';
|
|
4
|
+
export interface CSCaseViewProps extends CaseViewProps {
|
|
5
|
+
intelligentGuidance?: JSX.Element;
|
|
6
|
+
}
|
|
7
|
+
declare const CSCaseView: FC<CSCaseViewProps & ForwardProps>;
|
|
8
|
+
export default CSCaseView;
|
|
9
|
+
//# sourceMappingURL=CSCaseView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSCaseView.d.ts","sourceRoot":"","sources":["../../../src/components/CSCaseView/CSCaseView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAoC,MAAM,OAAO,CAAC;AAG7D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAY,aAAa,EAAuB,MAAM,yBAAyB,CAAC;AAEvF,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,mBAAmB,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACnC;AAUD,QAAA,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,GAAG,YAAY,CAYlD,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { CaseView, StyledSummaryRegion } from '@pega/cosmos-react-work';
|
|
5
|
+
const StyledCSCaseView = styled(CaseView)(({ theme }) => {
|
|
6
|
+
return css `
|
|
7
|
+
${StyledSummaryRegion} {
|
|
8
|
+
padding-block-end: calc(${theme.base.spacing} + 3rem);
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
});
|
|
12
|
+
const CSCaseView = forwardRef(({ intelligentGuidance, ...restProps }, ref) => {
|
|
13
|
+
return (_jsxs(_Fragment, { children: [_jsx(StyledCSCaseView, { ...restProps, ref: ref }, void 0), intelligentGuidance] }, void 0));
|
|
14
|
+
});
|
|
15
|
+
export default CSCaseView;
|
|
16
|
+
//# sourceMappingURL=CSCaseView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CSCaseView.js","sourceRoot":"","sources":["../../../src/components/CSCaseView/CSCaseView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,UAAU,EAAwB,MAAM,OAAO,CAAC;AAC7D,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAiB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAMvF,MAAM,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,GAAG,CAAA;MACN,mBAAmB;gCACO,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE/C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,GAAuC,UAAU,CAC/D,CACE,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAAoC,EACvE,GAAwB,EACxB,EAAE;IACF,OAAO,CACL,8BACE,KAAC,gBAAgB,OAAK,SAAS,EAAE,GAAG,EAAE,GAAG,WAAI,EAC5C,mBAAmB,YACnB,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { FC, forwardRef, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { ForwardProps } from '@pega/cosmos-react-core';\nimport { CaseView, CaseViewProps, StyledSummaryRegion } from '@pega/cosmos-react-work';\n\nexport interface CSCaseViewProps extends CaseViewProps {\n intelligentGuidance?: JSX.Element;\n}\n\nconst StyledCSCaseView = styled(CaseView)(({ theme }) => {\n return css`\n ${StyledSummaryRegion} {\n padding-block-end: calc(${theme.base.spacing} + 3rem);\n }\n `;\n});\n\nconst CSCaseView: FC<CSCaseViewProps & ForwardProps> = forwardRef(\n (\n { intelligentGuidance, ...restProps }: PropsWithoutRef<CSCaseViewProps>,\n ref: Ref<HTMLDivElement>\n ) => {\n return (\n <>\n <StyledCSCaseView {...restProps} ref={ref} />\n {intelligentGuidance}\n </>\n );\n }\n);\n\nexport default CSCaseView;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CSCaseView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|