@pega/cosmos-react-wss 10.0.0-build.4.26 → 10.0.0-build.4.28
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/QuickCreate/QuickCreate.d.ts +17 -4
- package/lib/components/QuickCreate/QuickCreate.d.ts.map +1 -1
- package/lib/components/QuickCreate/QuickCreate.js +19 -6
- package/lib/components/QuickCreate/QuickCreate.js.map +1 -1
- package/lib/components/QuickCreate/QuickCreate.test-ids.d.ts +2 -0
- package/lib/components/QuickCreate/QuickCreate.test-ids.d.ts.map +1 -0
- package/lib/components/QuickCreate/QuickCreate.test-ids.js +6 -0
- package/lib/components/QuickCreate/QuickCreate.test-ids.js.map +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref, MouseEventHandler } from 'react';
|
|
2
|
-
import type { BaseProps, ForwardRefForwardPropsComponent, NoChildrenProp } from '@pega/cosmos-react-core';
|
|
2
|
+
import type { BaseProps, ForwardRefForwardPropsComponent, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';
|
|
3
3
|
export interface QuickCreateAction {
|
|
4
4
|
label: string;
|
|
5
5
|
icon?: string;
|
|
@@ -8,16 +8,27 @@ export interface QuickCreateAction {
|
|
|
8
8
|
onClick: MouseEventHandler;
|
|
9
9
|
}
|
|
10
10
|
export type QuickCreateVariant = 'inline' | 'stacked';
|
|
11
|
-
export interface QuickCreateProps extends BaseProps, NoChildrenProp {
|
|
11
|
+
export interface QuickCreateProps extends BaseProps, NoChildrenProp, TestIdProp {
|
|
12
12
|
heading: string;
|
|
13
13
|
actions: QuickCreateAction[];
|
|
14
14
|
variant?: QuickCreateVariant;
|
|
15
15
|
showHeader?: boolean;
|
|
16
16
|
backgroundColor?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Total number of actions available (may exceed the rendered list when collapsed).
|
|
19
|
+
* Used with `onExpandToggle` to decide Show more vs Show less.
|
|
20
|
+
*/
|
|
21
|
+
count?: number;
|
|
22
|
+
/**
|
|
23
|
+
* When set with `count`, renders a Show more / Show less footer.
|
|
24
|
+
* Parent owns expand state and slicing.
|
|
25
|
+
*/
|
|
26
|
+
onExpandToggle?: () => void;
|
|
17
27
|
ref?: Ref<HTMLDivElement>;
|
|
18
28
|
}
|
|
19
29
|
export declare const StyledQuickCreate: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("@pega/cosmos-react-core").CardContentProps & import("@pega/cosmos-react-core").ForwardProps, {
|
|
20
30
|
showHeader?: boolean;
|
|
31
|
+
hasExpandToggle?: boolean;
|
|
21
32
|
}>> & string & Omit<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardContentProps & import("@pega/cosmos-react-core").ForwardProps>, keyof import("react").Component<any, {}, any>>;
|
|
22
33
|
export declare const StyledQuickCreateButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<Omit<Omit<import("@pega/cosmos-react-core").ButtonProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
|
|
23
34
|
ref?: ((instance: HTMLAnchorElement | HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLAnchorElement | HTMLButtonElement> | null | undefined;
|
|
@@ -28,6 +39,8 @@ export declare const StyledQuickCreateButton: import("styled-components/dist/typ
|
|
|
28
39
|
export declare const StyledQuickCreateSecondaryText: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").TextProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement | HTMLSpanElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
|
|
29
40
|
ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHeadingElement | HTMLSpanElement> | null | undefined;
|
|
30
41
|
}, never>> & string & Omit<ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, keyof import("react").Component<any, {}, any>>;
|
|
31
|
-
declare const
|
|
32
|
-
|
|
42
|
+
declare const _default: ForwardRefForwardPropsComponent<QuickCreateProps> & {
|
|
43
|
+
getTestIds: (testIdProp?: TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["list", "show-more-less"]>;
|
|
44
|
+
};
|
|
45
|
+
export default _default;
|
|
33
46
|
//# sourceMappingURL=QuickCreate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickCreate.d.ts","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"QuickCreate.d.ts","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AA6BpD,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACd,UAAU,EACX,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEtD,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAiBD,eAAO,MAAM,iBAAiB;iBAGf,OAAO;sBACF,OAAO;0MAoBzB,CAAC;AAIH,eAAO,MAAM,uBAAuB;;;oBAClB,kBAAkB;sBAChB,MAAM;kJAkBxB,CAAC;AAiDH,eAAO,MAAM,8BAA8B;;uJAIzC,CAAC;;;;AA8NH,wBAA+D"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
|
-
import { Button, Card, CardContent, CardHeader, defaultThemeProp, Flex, Grid, StyledIcon, Icon, Text, VisuallyHiddenText, useBreakpoint, useTheme, supplementalColors, resolveSupplementalColor, isSolidColor, readableColor, useConsolidatedRef, createClassName } from '@pega/cosmos-react-core';
|
|
4
|
+
import { Button, Card, CardContent, CardFooter, CardHeader, defaultThemeProp, Flex, Grid, StyledIcon, Icon, Text, VisuallyHiddenText, omitProps, useBreakpoint, useI18n, useTheme, supplementalColors, resolveSupplementalColor, isSolidColor, readableColor, useConsolidatedRef, createClassName, useTestIds, withTestIds } from '@pega/cosmos-react-core';
|
|
5
5
|
import { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';
|
|
6
6
|
import { StyledIconShape } from '@pega/cosmos-react-core/lib/components/Icon/Icon';
|
|
7
|
+
import { getQuickCreateTestIds } from './QuickCreate.test-ids';
|
|
7
8
|
const StyledQuickCreateCard = styled(Card)(({ theme, showHeader }) => {
|
|
8
9
|
const background = showHeader ? theme.components.card.background : 'transparent';
|
|
9
10
|
return css `
|
|
@@ -16,12 +17,18 @@ const StyledQuickCreateCard = styled(Card)(({ theme, showHeader }) => {
|
|
|
16
17
|
`;
|
|
17
18
|
});
|
|
18
19
|
StyledQuickCreateCard.defaultProps = defaultThemeProp;
|
|
19
|
-
export const StyledQuickCreate = styled(CardContent)(({ showHeader }) => {
|
|
20
|
+
export const StyledQuickCreate = styled(CardContent).withConfig(omitProps('showHeader', 'hasExpandToggle'))(({ theme, showHeader, hasExpandToggle }) => {
|
|
20
21
|
return css `
|
|
21
22
|
${!showHeader &&
|
|
22
23
|
css `
|
|
23
24
|
&&&& {
|
|
24
25
|
padding: 0;
|
|
26
|
+
|
|
27
|
+
/* Keep gap above Show more when CardContent/CardFooter padding is cleared. */
|
|
28
|
+
${hasExpandToggle &&
|
|
29
|
+
css `
|
|
30
|
+
padding-block-end: calc(1.5 * ${theme.base.spacing});
|
|
31
|
+
`}
|
|
25
32
|
}
|
|
26
33
|
`}
|
|
27
34
|
|
|
@@ -104,9 +111,14 @@ const StyledArrowSection = styled(Flex)(() => {
|
|
|
104
111
|
`;
|
|
105
112
|
});
|
|
106
113
|
StyledArrowSection.defaultProps = defaultThemeProp;
|
|
107
|
-
const QuickCreate = forwardRef(function QuickCreate({ heading, actions, className, variant = 'inline', backgroundColor, showHeader = true, ...restProps }, ref) {
|
|
114
|
+
const QuickCreate = forwardRef(function QuickCreate({ heading, actions, className, variant = 'inline', backgroundColor, showHeader = true, count, onExpandToggle, testId, ...restProps }, ref) {
|
|
108
115
|
const theme = useTheme();
|
|
116
|
+
const t = useI18n();
|
|
117
|
+
const testIds = useTestIds(testId, getQuickCreateTestIds);
|
|
109
118
|
const consolidatedRef = useConsolidatedRef(ref);
|
|
119
|
+
const showExpandToggle = onExpandToggle !== undefined && count !== undefined;
|
|
120
|
+
const hasMore = count !== undefined && count > actions.length;
|
|
121
|
+
const expandToggle = showExpandToggle ? (_jsx(Button, { "data-testid": testIds.showMoreLess, variant: showHeader ? 'link' : 'simple', onClick: onExpandToggle, children: t(hasMore ? 'show_more' : 'show_less') })) : null;
|
|
110
122
|
const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: consolidatedRef });
|
|
111
123
|
const isMediumOrAbove = useBreakpoint('md', { breakpointRef: consolidatedRef });
|
|
112
124
|
const displayVariant = variant === 'stacked' ? 'stacked' : 'inline';
|
|
@@ -139,7 +151,7 @@ const QuickCreate = forwardRef(function QuickCreate({ heading, actions, classNam
|
|
|
139
151
|
return 'repeat(2, minmax(0, 1fr))';
|
|
140
152
|
return `repeat(auto-fill, minmax(min(calc(${theme.base.spacing} * 30), 100%), 1fr))`;
|
|
141
153
|
};
|
|
142
|
-
return (_jsxs(StyledQuickCreateCard, { ...restProps, ref: consolidatedRef, showHeader: showHeader, className: createClassName('quick-create', className), children: [showHeader ? (_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: heading }) })) : (_jsx(VisuallyHiddenText, { as: 'h2', children: heading })), _jsx(StyledQuickCreate, { showHeader: showHeader, children: _jsx(Grid, { as: 'ul', container: {
|
|
154
|
+
return (_jsxs(StyledQuickCreateCard, { "data-testid": testIds.root, ...restProps, ref: consolidatedRef, showHeader: showHeader, className: createClassName('quick-create', className), children: [showHeader ? (_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: heading }) })) : (_jsx(VisuallyHiddenText, { as: 'h2', children: heading })), _jsx(StyledQuickCreate, { showHeader: showHeader, hasExpandToggle: showExpandToggle, children: _jsx(Grid, { as: 'ul', "data-testid": testIds.list, container: {
|
|
143
155
|
gap: 1.5,
|
|
144
156
|
cols: getGridCols(),
|
|
145
157
|
...(showHeader ? {} : { justifyContent: 'center' })
|
|
@@ -154,7 +166,8 @@ const QuickCreate = forwardRef(function QuickCreate({ heading, actions, classNam
|
|
|
154
166
|
alignItems: 'start',
|
|
155
167
|
justify: 'center'
|
|
156
168
|
}, item: { grow: 1 }, children: [_jsx(StyledButtonText, { as: 'span', children: label }), description && (_jsx(StyledQuickCreateSecondaryText, { variant: 'secondary', forwardedAs: 'p', children: description }))] })] }), _jsx(StyledArrowSection, { container: true, children: _jsx(Icon, { name: 'arrow-right', size: 's' }) })] })) }) }, label));
|
|
157
|
-
}) }) })
|
|
169
|
+
}) }) }), expandToggle &&
|
|
170
|
+
(showHeader ? (_jsx(CardFooter, { justify: 'center', children: expandToggle })) : (_jsx(Flex, { container: { justify: 'center' }, children: expandToggle })))] }));
|
|
158
171
|
});
|
|
159
|
-
export default QuickCreate;
|
|
172
|
+
export default withTestIds(QuickCreate, getQuickCreateTestIds);
|
|
160
173
|
//# sourceMappingURL=QuickCreate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickCreate.js","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAqBnF,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,CAA2B,CAAC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KAAK,CA2ET,CACN,CAAC;oBACJ,CAAC,CAAC,GACG,GACW,IACE,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { Ref, MouseEventHandler } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n CardContent,\n CardHeader,\n defaultThemeProp,\n Flex,\n Grid,\n StyledIcon,\n Icon,\n Text,\n VisuallyHiddenText,\n useBreakpoint,\n useTheme,\n supplementalColors,\n resolveSupplementalColor,\n isSolidColor,\n readableColor,\n useConsolidatedRef,\n createClassName\n} from '@pega/cosmos-react-core';\nimport type {\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { StyledIconShape } from '@pega/cosmos-react-core/lib/components/Icon/Icon';\n\nexport interface QuickCreateAction {\n label: string;\n icon?: string;\n description?: string;\n color?: string;\n onClick: MouseEventHandler;\n}\n\nexport type QuickCreateVariant = 'inline' | 'stacked';\n\nexport interface QuickCreateProps extends BaseProps, NoChildrenProp {\n heading: string;\n actions: QuickCreateAction[];\n variant?: QuickCreateVariant;\n showHeader?: boolean;\n backgroundColor?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledQuickCreateCard = styled(Card)<{ showHeader?: boolean }>(({ theme, showHeader }) => {\n const background = showHeader ? theme.components.card.background : 'transparent';\n\n return css`\n background: ${background};\n\n ${!showHeader &&\n css`\n padding: 0;\n `}\n `;\n});\n\nStyledQuickCreateCard.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreate = styled(CardContent)<{ showHeader?: boolean }>(({ showHeader }) => {\n return css`\n ${!showHeader &&\n css`\n &&&& {\n padding: 0;\n }\n `}\n\n ul {\n list-style: none;\n }\n `;\n});\n\nStyledQuickCreate.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreateButton = styled(Button)<{\n displayVariant: QuickCreateVariant;\n backgroundColor?: string;\n}>(({ theme, displayVariant, backgroundColor }) => {\n const background = backgroundColor || theme.base.palette['primary-background'];\n\n return css`\n height: 100%;\n width: 100%;\n max-height: none;\n padding-block: calc(${theme.base.spacing} * 1.5);\n padding-inline: calc(${theme.base.spacing} * 2);\n border-radius: ${theme.base['border-radius']};\n border-color: ${theme.base.palette['border-line']};\n justify-content: ${displayVariant === 'stacked' ? 'center' : 'start'};\n text-align: ${displayVariant === 'stacked' ? 'center' : 'start'};\n white-space: break-spaces;\n word-break: break-word;\n background: ${background};\n `;\n});\n\nStyledQuickCreateButton.defaultProps = defaultThemeProp;\n\nconst StyledButtonText = styled.span(({ theme }) => {\n return css`\n ${lineClamp(3)}\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: 1em;\n color: CanvasText;\n `;\n});\n\nStyledButtonText.defaultProps = defaultThemeProp;\n\nconst StyledQuickCreateContainer = styled(Flex)<{ variant: QuickCreateVariant }>(({ variant }) => {\n return css`\n width: 100%;\n\n ${variant === 'stacked' &&\n css`\n text-align: center;\n `}\n `;\n});\n\nStyledQuickCreateContainer.defaultProps = defaultThemeProp;\n\nconst StyledIconSection = styled(Flex)<{ variant: QuickCreateVariant }>(({ variant }) => {\n return css`\n min-width: ${variant === 'stacked' ? 'auto' : '2rem'};\n `;\n});\n\nStyledIconSection.defaultProps = defaultThemeProp;\n\nconst StyledMiddleSection = styled(Flex)``;\n\nStyledMiddleSection.defaultProps = defaultThemeProp;\n\nconst StyledStackedRow = styled(Flex)(() => {\n return css`\n width: 100%;\n justify-content: center;\n `;\n});\n\nStyledStackedRow.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreateSecondaryText = styled(Text)(() => {\n return css`\n ${lineClamp(3)}\n `;\n});\n\nStyledQuickCreateSecondaryText.defaultProps = defaultThemeProp;\n\nconst StyledArrowSection = styled(Flex)(() => {\n return css`\n ${StyledIconShape} {\n height: 1rem;\n }\n\n ${StyledIcon} {\n fill: CanvasText;\n height: 100%;\n align-self: flex-end;\n }\n `;\n});\n\nStyledArrowSection.defaultProps = defaultThemeProp;\n\nconst QuickCreate: ForwardRefForwardPropsComponent<QuickCreateProps> = forwardRef(\n function QuickCreate(\n {\n heading,\n actions,\n className,\n variant = 'inline',\n backgroundColor,\n showHeader = true,\n ...restProps\n }: QuickCreateProps,\n ref: QuickCreateProps['ref']\n ) {\n const theme = useTheme();\n const consolidatedRef = useConsolidatedRef<HTMLDivElement>(ref);\n\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: consolidatedRef });\n const isMediumOrAbove = useBreakpoint('md', { breakpointRef: consolidatedRef });\n\n const displayVariant: QuickCreateVariant = variant === 'stacked' ? 'stacked' : 'inline';\n const isStacked = displayVariant === 'stacked';\n\n const supplementalColorsList = supplementalColors(theme);\n\n const getActionColor = (actionColor: string | undefined, idx: number): string | undefined => {\n const isColorIgnored = theme.base['case-type-colors'] === 'ignored';\n\n if (isColorIgnored) return undefined;\n\n if (actionColor !== undefined) {\n const supplementalColor = resolveSupplementalColor(theme, actionColor);\n\n return supplementalColor ?? (isSolidColor(actionColor) ? actionColor : undefined);\n }\n\n return supplementalColorsList[idx % supplementalColorsList.length];\n };\n\n const getIconComp = (iconName: string, iconBackground: string | undefined) => {\n return iconBackground !== undefined ? (\n <Icon\n name={iconName}\n foreground={readableColor(iconBackground, {\n mode: 'light',\n level: 'AANonText'\n })}\n background={iconBackground}\n />\n ) : (\n <Icon size='m' name={iconName} />\n );\n };\n\n const getGridCols = () => {\n if (isMediumOrAbove) {\n if (actions.length === 1) return 'repeat(2, minmax(0, 1fr))';\n const cols = Math.min(Math.max(actions.length, 1), 4);\n return `repeat(${cols}, minmax(0, 1fr))`;\n }\n if (isSmallOrAbove) return 'repeat(2, minmax(0, 1fr))';\n\n return `repeat(auto-fill, minmax(min(calc(${theme.base.spacing} * 30), 100%), 1fr))`;\n };\n\n return (\n <StyledQuickCreateCard\n {...restProps}\n ref={consolidatedRef}\n showHeader={showHeader}\n className={createClassName('quick-create', className)}\n >\n {showHeader ? (\n <CardHeader>\n <Text variant='h2'>{heading}</Text>\n </CardHeader>\n ) : (\n <VisuallyHiddenText as='h2'>{heading}</VisuallyHiddenText>\n )}\n\n <StyledQuickCreate showHeader={showHeader}>\n <Grid\n as='ul'\n container={{\n gap: 1.5,\n cols: getGridCols(),\n ...(showHeader ? {} : { justifyContent: 'center' })\n }}\n >\n {actions.map(({ label, icon, description, color, onClick }, idx) => {\n const iconBackground = getActionColor(color, idx);\n\n return (\n <li key={label}>\n <StyledQuickCreateButton\n onClick={onClick}\n variant='secondary'\n displayVariant={displayVariant}\n backgroundColor={backgroundColor}\n >\n {isStacked ? (\n <StyledQuickCreateContainer\n variant={displayVariant}\n container={{ gap: 0.75, alignItems: 'center', direction: 'column' }}\n >\n {icon && (\n <StyledStackedRow container>\n <StyledIconSection variant={displayVariant} container>\n {getIconComp(icon, iconBackground)}\n </StyledIconSection>\n </StyledStackedRow>\n )}\n\n <StyledStackedRow container>\n <StyledButtonText as='span'>{label}</StyledButtonText>\n </StyledStackedRow>\n\n {description && (\n <StyledStackedRow container>\n <StyledQuickCreateSecondaryText variant='secondary' forwardedAs='p'>\n {description}\n </StyledQuickCreateSecondaryText>\n </StyledStackedRow>\n )}\n </StyledQuickCreateContainer>\n ) : (\n <StyledQuickCreateContainer\n variant={displayVariant}\n container={{ gap: 0, alignItems: 'center' }}\n >\n <Flex\n container={{\n gap: 1.5,\n alignItems: description ? 'start' : 'center'\n }}\n item={{ grow: 1 }}\n >\n {icon && (\n <StyledIconSection variant={displayVariant} container>\n {getIconComp(icon, iconBackground)}\n </StyledIconSection>\n )}\n\n <StyledMiddleSection\n container={{\n direction: 'column',\n gap: 0.25,\n alignItems: 'start',\n justify: 'center'\n }}\n item={{ grow: 1 }}\n >\n <StyledButtonText as='span'>{label}</StyledButtonText>\n\n {description && (\n <StyledQuickCreateSecondaryText variant='secondary' forwardedAs='p'>\n {description}\n </StyledQuickCreateSecondaryText>\n )}\n </StyledMiddleSection>\n </Flex>\n\n <StyledArrowSection container>\n <Icon name='arrow-right' size='s' />\n </StyledArrowSection>\n </StyledQuickCreateContainer>\n )}\n </StyledQuickCreateButton>\n </li>\n );\n })}\n </Grid>\n </StyledQuickCreate>\n </StyledQuickCreateCard>\n );\n }\n);\n\nexport default QuickCreate;\n"]}
|
|
1
|
+
{"version":3,"file":"QuickCreate.js","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,OAAO,EACP,QAAQ,EACR,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAOjC,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AA+B/D,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,CAA2B,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE;IAC7F,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC;IAEjF,OAAO,GAAG,CAAA;kBACM,UAAU;;MAEtB,CAAC,UAAU;QACb,GAAG,CAAA;;KAEF;GACF,CAAC;AACJ,CAAC,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Ac,EAAE,SAAS,kBAClD,WAAW,CAAC,IAAI,EAAE,cAAc,CAAC,GAChB,CACrB,EAED,MAAC,mBAAmB,IAClB,SAAS,EAAE;wDACT,SAAS,EAAE,QAAQ;wDACnB,GAAG,EAAE,IAAI;wDACT,UAAU,EAAE,OAAO;wDACnB,OAAO,EAAE,QAAQ;qDAClB,EACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aAEjB,KAAC,gBAAgB,IAAC,EAAE,EAAC,MAAM,YAAE,KAAK,GAAoB,EAErD,WAAW,IAAI,CACd,KAAC,8BAA8B,IAAC,OAAO,EAAC,WAAW,EAAC,WAAW,EAAC,GAAG,YAChE,WAAW,GACmB,CAClC,IACmB,IACjB,EAEP,KAAC,kBAAkB,IAAC,SAAS,kBAC3B,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,GAAG,GAAG,GACjB,IACM,CAC9B,GACuB,IA1EnB,KAAK,CA2ET,CACN,CAAC;oBACJ,CAAC,CAAC,GACG,GACW,EAEnB,YAAY;gBACX,CAAC,UAAU,CAAC,CAAC,CAAC,CACZ,KAAC,UAAU,IAAC,OAAO,EAAC,QAAQ,YAAE,YAAY,GAAc,CACzD,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAG,YAAY,GAAQ,CAC9D,CAAC,IACkB,CACzB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC,WAAW,EAAE,qBAAqB,CAAC,CAAC","sourcesContent":["import { forwardRef } from 'react';\nimport type { Ref, MouseEventHandler } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n defaultThemeProp,\n Flex,\n Grid,\n StyledIcon,\n Icon,\n Text,\n VisuallyHiddenText,\n omitProps,\n useBreakpoint,\n useI18n,\n useTheme,\n supplementalColors,\n resolveSupplementalColor,\n isSolidColor,\n readableColor,\n useConsolidatedRef,\n createClassName,\n useTestIds,\n withTestIds\n} from '@pega/cosmos-react-core';\nimport type {\n BaseProps,\n ForwardRefForwardPropsComponent,\n NoChildrenProp,\n TestIdProp\n} from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\nimport { StyledIconShape } from '@pega/cosmos-react-core/lib/components/Icon/Icon';\n\nimport { getQuickCreateTestIds } from './QuickCreate.test-ids';\n\nexport interface QuickCreateAction {\n label: string;\n icon?: string;\n description?: string;\n color?: string;\n onClick: MouseEventHandler;\n}\n\nexport type QuickCreateVariant = 'inline' | 'stacked';\n\nexport interface QuickCreateProps extends BaseProps, NoChildrenProp, TestIdProp {\n heading: string;\n actions: QuickCreateAction[];\n variant?: QuickCreateVariant;\n showHeader?: boolean;\n backgroundColor?: string;\n /**\n * Total number of actions available (may exceed the rendered list when collapsed).\n * Used with `onExpandToggle` to decide Show more vs Show less.\n */\n count?: number;\n /**\n * When set with `count`, renders a Show more / Show less footer.\n * Parent owns expand state and slicing.\n */\n onExpandToggle?: () => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst StyledQuickCreateCard = styled(Card)<{ showHeader?: boolean }>(({ theme, showHeader }) => {\n const background = showHeader ? theme.components.card.background : 'transparent';\n\n return css`\n background: ${background};\n\n ${!showHeader &&\n css`\n padding: 0;\n `}\n `;\n});\n\nStyledQuickCreateCard.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreate = styled(CardContent).withConfig(\n omitProps('showHeader', 'hasExpandToggle')\n)<{\n showHeader?: boolean;\n hasExpandToggle?: boolean;\n}>(({ theme, showHeader, hasExpandToggle }) => {\n return css`\n ${!showHeader &&\n css`\n &&&& {\n padding: 0;\n\n /* Keep gap above Show more when CardContent/CardFooter padding is cleared. */\n ${hasExpandToggle &&\n css`\n padding-block-end: calc(1.5 * ${theme.base.spacing});\n `}\n }\n `}\n\n ul {\n list-style: none;\n }\n `;\n});\n\nStyledQuickCreate.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreateButton = styled(Button)<{\n displayVariant: QuickCreateVariant;\n backgroundColor?: string;\n}>(({ theme, displayVariant, backgroundColor }) => {\n const background = backgroundColor || theme.base.palette['primary-background'];\n\n return css`\n height: 100%;\n width: 100%;\n max-height: none;\n padding-block: calc(${theme.base.spacing} * 1.5);\n padding-inline: calc(${theme.base.spacing} * 2);\n border-radius: ${theme.base['border-radius']};\n border-color: ${theme.base.palette['border-line']};\n justify-content: ${displayVariant === 'stacked' ? 'center' : 'start'};\n text-align: ${displayVariant === 'stacked' ? 'center' : 'start'};\n white-space: break-spaces;\n word-break: break-word;\n background: ${background};\n `;\n});\n\nStyledQuickCreateButton.defaultProps = defaultThemeProp;\n\nconst StyledButtonText = styled.span(({ theme }) => {\n return css`\n ${lineClamp(3)}\n font-weight: ${theme.base['font-weight']['semi-bold']};\n font-size: 1em;\n color: CanvasText;\n `;\n});\n\nStyledButtonText.defaultProps = defaultThemeProp;\n\nconst StyledQuickCreateContainer = styled(Flex)<{ variant: QuickCreateVariant }>(({ variant }) => {\n return css`\n width: 100%;\n\n ${variant === 'stacked' &&\n css`\n text-align: center;\n `}\n `;\n});\n\nStyledQuickCreateContainer.defaultProps = defaultThemeProp;\n\nconst StyledIconSection = styled(Flex)<{ variant: QuickCreateVariant }>(({ variant }) => {\n return css`\n min-width: ${variant === 'stacked' ? 'auto' : '2rem'};\n `;\n});\n\nStyledIconSection.defaultProps = defaultThemeProp;\n\nconst StyledMiddleSection = styled(Flex)``;\n\nStyledMiddleSection.defaultProps = defaultThemeProp;\n\nconst StyledStackedRow = styled(Flex)(() => {\n return css`\n width: 100%;\n justify-content: center;\n `;\n});\n\nStyledStackedRow.defaultProps = defaultThemeProp;\n\nexport const StyledQuickCreateSecondaryText = styled(Text)(() => {\n return css`\n ${lineClamp(3)}\n `;\n});\n\nStyledQuickCreateSecondaryText.defaultProps = defaultThemeProp;\n\nconst StyledArrowSection = styled(Flex)(() => {\n return css`\n ${StyledIconShape} {\n height: 1rem;\n }\n\n ${StyledIcon} {\n fill: CanvasText;\n height: 100%;\n align-self: flex-end;\n }\n `;\n});\n\nStyledArrowSection.defaultProps = defaultThemeProp;\n\nconst QuickCreate: ForwardRefForwardPropsComponent<QuickCreateProps> = forwardRef(\n function QuickCreate(\n {\n heading,\n actions,\n className,\n variant = 'inline',\n backgroundColor,\n showHeader = true,\n count,\n onExpandToggle,\n testId,\n ...restProps\n }: QuickCreateProps,\n ref: QuickCreateProps['ref']\n ) {\n const theme = useTheme();\n const t = useI18n();\n const testIds = useTestIds(testId, getQuickCreateTestIds);\n const consolidatedRef = useConsolidatedRef<HTMLDivElement>(ref);\n const showExpandToggle = onExpandToggle !== undefined && count !== undefined;\n const hasMore = count !== undefined && count > actions.length;\n const expandToggle = showExpandToggle ? (\n <Button\n data-testid={testIds.showMoreLess}\n variant={showHeader ? 'link' : 'simple'}\n onClick={onExpandToggle}\n >\n {t(hasMore ? 'show_more' : 'show_less')}\n </Button>\n ) : null;\n\n const isSmallOrAbove = useBreakpoint('sm', { breakpointRef: consolidatedRef });\n const isMediumOrAbove = useBreakpoint('md', { breakpointRef: consolidatedRef });\n\n const displayVariant: QuickCreateVariant = variant === 'stacked' ? 'stacked' : 'inline';\n const isStacked = displayVariant === 'stacked';\n\n const supplementalColorsList = supplementalColors(theme);\n\n const getActionColor = (actionColor: string | undefined, idx: number): string | undefined => {\n const isColorIgnored = theme.base['case-type-colors'] === 'ignored';\n\n if (isColorIgnored) return undefined;\n\n if (actionColor !== undefined) {\n const supplementalColor = resolveSupplementalColor(theme, actionColor);\n\n return supplementalColor ?? (isSolidColor(actionColor) ? actionColor : undefined);\n }\n\n return supplementalColorsList[idx % supplementalColorsList.length];\n };\n\n const getIconComp = (iconName: string, iconBackground: string | undefined) => {\n return iconBackground !== undefined ? (\n <Icon\n name={iconName}\n foreground={readableColor(iconBackground, {\n mode: 'light',\n level: 'AANonText'\n })}\n background={iconBackground}\n />\n ) : (\n <Icon size='m' name={iconName} />\n );\n };\n\n const getGridCols = () => {\n if (isMediumOrAbove) {\n if (actions.length === 1) return 'repeat(2, minmax(0, 1fr))';\n const cols = Math.min(Math.max(actions.length, 1), 4);\n return `repeat(${cols}, minmax(0, 1fr))`;\n }\n if (isSmallOrAbove) return 'repeat(2, minmax(0, 1fr))';\n\n return `repeat(auto-fill, minmax(min(calc(${theme.base.spacing} * 30), 100%), 1fr))`;\n };\n\n return (\n <StyledQuickCreateCard\n data-testid={testIds.root}\n {...restProps}\n ref={consolidatedRef}\n showHeader={showHeader}\n className={createClassName('quick-create', className)}\n >\n {showHeader ? (\n <CardHeader>\n <Text variant='h2'>{heading}</Text>\n </CardHeader>\n ) : (\n <VisuallyHiddenText as='h2'>{heading}</VisuallyHiddenText>\n )}\n\n <StyledQuickCreate showHeader={showHeader} hasExpandToggle={showExpandToggle}>\n <Grid\n as='ul'\n data-testid={testIds.list}\n container={{\n gap: 1.5,\n cols: getGridCols(),\n ...(showHeader ? {} : { justifyContent: 'center' })\n }}\n >\n {actions.map(({ label, icon, description, color, onClick }, idx) => {\n const iconBackground = getActionColor(color, idx);\n\n return (\n <li key={label}>\n <StyledQuickCreateButton\n onClick={onClick}\n variant='secondary'\n displayVariant={displayVariant}\n backgroundColor={backgroundColor}\n >\n {isStacked ? (\n <StyledQuickCreateContainer\n variant={displayVariant}\n container={{ gap: 0.75, alignItems: 'center', direction: 'column' }}\n >\n {icon && (\n <StyledStackedRow container>\n <StyledIconSection variant={displayVariant} container>\n {getIconComp(icon, iconBackground)}\n </StyledIconSection>\n </StyledStackedRow>\n )}\n\n <StyledStackedRow container>\n <StyledButtonText as='span'>{label}</StyledButtonText>\n </StyledStackedRow>\n\n {description && (\n <StyledStackedRow container>\n <StyledQuickCreateSecondaryText variant='secondary' forwardedAs='p'>\n {description}\n </StyledQuickCreateSecondaryText>\n </StyledStackedRow>\n )}\n </StyledQuickCreateContainer>\n ) : (\n <StyledQuickCreateContainer\n variant={displayVariant}\n container={{ gap: 0, alignItems: 'center' }}\n >\n <Flex\n container={{\n gap: 1.5,\n alignItems: description ? 'start' : 'center'\n }}\n item={{ grow: 1 }}\n >\n {icon && (\n <StyledIconSection variant={displayVariant} container>\n {getIconComp(icon, iconBackground)}\n </StyledIconSection>\n )}\n\n <StyledMiddleSection\n container={{\n direction: 'column',\n gap: 0.25,\n alignItems: 'start',\n justify: 'center'\n }}\n item={{ grow: 1 }}\n >\n <StyledButtonText as='span'>{label}</StyledButtonText>\n\n {description && (\n <StyledQuickCreateSecondaryText variant='secondary' forwardedAs='p'>\n {description}\n </StyledQuickCreateSecondaryText>\n )}\n </StyledMiddleSection>\n </Flex>\n\n <StyledArrowSection container>\n <Icon name='arrow-right' size='s' />\n </StyledArrowSection>\n </StyledQuickCreateContainer>\n )}\n </StyledQuickCreateButton>\n </li>\n );\n })}\n </Grid>\n </StyledQuickCreate>\n\n {expandToggle &&\n (showHeader ? (\n <CardFooter justify='center'>{expandToggle}</CardFooter>\n ) : (\n <Flex container={{ justify: 'center' }}>{expandToggle}</Flex>\n ))}\n </StyledQuickCreateCard>\n );\n }\n);\n\nexport default withTestIds(QuickCreate, getQuickCreateTestIds);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickCreate.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,+JAGvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickCreate.test-ids.js","sourceRoot":"","sources":["../../../src/components/QuickCreate/QuickCreate.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,cAAc,EAAE;IACjE,MAAM;IACN,gBAAgB;CACR,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getQuickCreateTestIds = createTestIds('quick-create', [\n 'list',\n 'show-more-less'\n] as const);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-wss",
|
|
3
|
-
"version": "10.0.0-build.4.
|
|
3
|
+
"version": "10.0.0-build.4.28",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-core": "10.0.0-build.4.
|
|
18
|
-
"@pega/cosmos-react-work": "10.0.0-build.4.
|
|
17
|
+
"@pega/cosmos-react-core": "10.0.0-build.4.28",
|
|
18
|
+
"@pega/cosmos-react-work": "10.0.0-build.4.28",
|
|
19
19
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
20
20
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
21
21
|
"polished": "^4.1.0",
|