@pega/cosmos-react-wss 9.0.0-build.13.1 → 9.0.0-build.13.2
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.
|
@@ -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;AAoBpD,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACf,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,0OAI7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,kLAclC,CAAC;AA0BH,eAAO,MAAM,qBAAqB,gLAEjC,CAAC;AAEF,eAAO,MAAM,8BAA8B,gLAE1C,CAAC;AAgBF,QAAA,MAAM,WAAW,EAAE,+BAA+B,CAAC,gBAAgB,
|
|
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;AAoBpD,OAAO,KAAK,EACV,SAAS,EACT,+BAA+B,EAC/B,cAAc,EACf,MAAM,yBAAyB,CAAC;AAIjC,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS,EAAE,cAAc;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,iBAAiB,0OAI7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,kLAclC,CAAC;AA0BH,eAAO,MAAM,qBAAqB,gLAEjC,CAAC;AAEF,eAAO,MAAM,8BAA8B,gLAE1C,CAAC;AAgBF,QAAA,MAAM,WAAW,EAAE,+BAA+B,CAAC,gBAAgB,CAoFlE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -14,7 +14,7 @@ export const StyledQuickCreateButton = styled(Button)(({ icon, theme }) => {
|
|
|
14
14
|
height: 100%;
|
|
15
15
|
width: 100%;
|
|
16
16
|
max-height: 5.5rem;
|
|
17
|
-
padding-block: ${theme.base.spacing};
|
|
17
|
+
padding-block: calc(${theme.base.spacing} * 1.5);
|
|
18
18
|
padding-inline: calc(${theme.base.spacing} * 2);
|
|
19
19
|
border-radius: ${theme.base['border-radius']};
|
|
20
20
|
border-color: ${theme.base.palette['border-line']};
|
|
@@ -69,15 +69,14 @@ const QuickCreate = forwardRef(function QuickCreate({ heading, actions, classNam
|
|
|
69
69
|
cols: `repeat(auto-fill, minmax(min(${theme.base['content-width'].sm}, 100%), 1fr))`
|
|
70
70
|
}, children: actions.map(({ label, icon, description, onClick }, idx) => {
|
|
71
71
|
return (_jsxs("li", { children: [_jsx(StyledQuickCreateButton, { ref: setButtonEl, onClick: onClick, variant: 'secondary', icon: !!icon, children: _jsxs(StyledQuickCreateContainer, { container: {
|
|
72
|
-
|
|
73
|
-
alignItems: description ? 'start' : 'center',
|
|
72
|
+
alignItems: 'center',
|
|
74
73
|
direction: 'row'
|
|
75
|
-
}, children: [icon && (_jsx(StyledIconSection, { container: true, children: _jsx(Icon, { name: icon, foreground: 'white', background: whiteCompatibleNLPColors[idx % whiteCompatibleNLPColors.length], shape: 'square' }) })), _jsxs(StyledMiddleSection, { container: {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
74
|
+
}, children: [_jsxs(Flex, { container: { gap: 1.5, alignItems: 'center' }, item: { grow: 1 }, children: [icon && (_jsx(StyledIconSection, { container: true, children: _jsx(Icon, { name: icon, foreground: 'white', background: whiteCompatibleNLPColors[idx % whiteCompatibleNLPColors.length], shape: 'square' }) })), _jsxs(StyledMiddleSection, { container: {
|
|
75
|
+
gap: 0.25,
|
|
76
|
+
alignItems: 'start',
|
|
77
|
+
justify: description ? 'start' : 'center',
|
|
78
|
+
direction: 'column'
|
|
79
|
+
}, 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: 'm', background: 'transparent', shape: 'square' }) })] }) }), buttonEl && (_jsx(Tooltip, { target: buttonEl, smart: true, showDelay: 'none', hideDelay: 'none', children: label }))] }, label));
|
|
81
80
|
}) }) })] }));
|
|
82
81
|
});
|
|
83
82
|
export default QuickCreate;
|
|
@@ -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,UAA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jE,KAAK,EAAC,QAAQ,GACd,GACgB,CACrB,EACD,MAAC,mBAAmB,IAClB,SAAS,EAAE;4DACT,GAAG,EAAE,IAAI;4DACT,UAAU,EAAE,OAAO;4DACnB,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;4DACzC,SAAS,EAAE,QAAQ;yDACpB,EACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,aAEjB,KAAC,gBAAgB,IAAC,EAAE,EAAC,MAAM,YAAE,KAAK,GAAoB,EACrD,WAAW,IAAI,CACd,KAAC,8BAA8B,IAAC,OAAO,EAAC,WAAW,EAAC,WAAW,EAAC,GAAG,YAChE,WAAW,GACmB,CAClC,IACmB,IACjB,EACP,KAAC,kBAAkB,IAAC,SAAS,kBAC3B,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,GAAG,EAAC,UAAU,EAAC,aAAa,EAAC,KAAK,EAAC,QAAQ,GAAG,GACzD,IACM,GACL,EACzB,QAAQ,IAAI,CACX,KAAC,OAAO,IAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,QAAC,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,YAC/D,KAAK,GACE,CACX,KApDM,KAAK,CAqDT,CACN,CAAC;oBACJ,CAAC,CAAC,GACG,GACW,IACf,CACR,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 createClassName,\n defaultThemeProp,\n Flex,\n Grid,\n StyledIcon,\n Icon,\n Text,\n Tooltip,\n useElement,\n useTheme,\n whiteCompatibleNLPColors\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 onClick: MouseEventHandler;\n}\n\nexport interface QuickCreateProps extends BaseProps, NoChildrenProp {\n heading: string;\n actions: QuickCreateAction[];\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledQuickCreate = styled(CardContent)`\n ul {\n list-style: none;\n }\n`;\n\nexport const StyledQuickCreateButton = styled(Button)(({ icon, theme }) => {\n return css`\n height: 100%;\n width: 100%;\n max-height: 5.5rem;\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: ${icon ? 'start' : 'center'};\n text-align: start;\n white-space: break-spaces;\n word-break: break-word;\n `;\n});\n\nStyledQuickCreateButton.defaultProps = defaultThemeProp;\n\nconst StyledButtonText = styled.span(({ theme }) => {\n return css`\n ${lineClamp(2)}\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)`\n width: 100%;\n`;\n\nconst StyledIconSection = styled(Flex)`\n min-width: 2rem;\n stroke-width: 50%;\n`;\n\nconst StyledMiddleSection = styled(Flex)``;\n\nexport const StyledPrimaryArrowRow = styled(Flex)`\n width: 100%;\n`;\n\nexport const StyledQuickCreateSecondaryText = styled(Text)`\n ${lineClamp(2)}\n`;\n\nconst StyledArrowSection = styled(Flex)`\n min-width: 2rem;\n\n ${StyledIconShape} {\n height: 1rem;\n }\n\n ${StyledIcon} {\n fill: CanvasText;\n height: 100%;\n align-self: flex-end;\n }\n`;\n\nconst QuickCreate: ForwardRefForwardPropsComponent<QuickCreateProps> = forwardRef(\n function QuickCreate(\n { heading, actions, className, ...restProps }: QuickCreateProps,\n ref: QuickCreateProps['ref']\n ) {\n const theme = useTheme();\n const [buttonEl, setButtonEl] = useElement();\n\n return (\n <Card {...restProps} ref={ref} className={createClassName('quick-create', className)}>\n <CardHeader>\n <Text variant='h2'>{heading}</Text>\n </CardHeader>\n <StyledQuickCreate>\n <Grid\n as='ul'\n container={{\n gap: 1,\n cols: `repeat(auto-fill, minmax(min(${theme.base['content-width'].sm}, 100%), 1fr))`\n }}\n >\n {actions.map(({ label, icon, description, onClick }, idx) => {\n return (\n <li key={label}>\n <StyledQuickCreateButton\n ref={setButtonEl}\n onClick={onClick}\n variant='secondary'\n icon={!!icon}\n >\n <StyledQuickCreateContainer\n container={{\n alignItems: 'center',\n direction: 'row'\n }}\n >\n <Flex container={{ gap: 1.5, alignItems: 'center' }} item={{ grow: 1 }}>\n {icon && (\n <StyledIconSection container>\n <Icon\n name={icon}\n foreground='white'\n background={\n whiteCompatibleNLPColors[idx % whiteCompatibleNLPColors.length]\n }\n shape='square'\n />\n </StyledIconSection>\n )}\n <StyledMiddleSection\n container={{\n gap: 0.25,\n alignItems: 'start',\n justify: description ? 'start' : 'center',\n direction: 'column'\n }}\n item={{ grow: 1 }}\n >\n <StyledButtonText as='span'>{label}</StyledButtonText>\n {description && (\n <StyledQuickCreateSecondaryText variant='secondary' forwardedAs='p'>\n {description}\n </StyledQuickCreateSecondaryText>\n )}\n </StyledMiddleSection>\n </Flex>\n <StyledArrowSection container>\n <Icon name='arrow-right' size='m' background='transparent' shape='square' />\n </StyledArrowSection>\n </StyledQuickCreateContainer>\n </StyledQuickCreateButton>\n {buttonEl && (\n <Tooltip target={buttonEl} smart showDelay='none' hideDelay='none'>\n {label}\n </Tooltip>\n )}\n </li>\n );\n })}\n </Grid>\n </StyledQuickCreate>\n </Card>\n );\n }\n);\n\nexport default QuickCreate;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-wss",
|
|
3
|
-
"version": "9.0.0-build.13.
|
|
3
|
+
"version": "9.0.0-build.13.2",
|
|
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": "9.0.0-build.13.
|
|
18
|
-
"@pega/cosmos-react-work": "9.0.0-build.13.
|
|
17
|
+
"@pega/cosmos-react-core": "9.0.0-build.13.2",
|
|
18
|
+
"@pega/cosmos-react-work": "9.0.0-build.13.2",
|
|
19
19
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
20
20
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
21
21
|
"@types/styled-components": "^5.1.26",
|