@pega/cosmos-react-work 9.0.0-build.29.21 → 9.0.0-build.29.23
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/Shortcuts/Shortcuts.d.ts +7 -0
- package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.js +55 -0
- package/lib/components/Shortcuts/Shortcuts.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts +39 -0
- package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.styles.js +241 -0
- package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts +2 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.js +8 -0
- package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.types.d.ts +69 -0
- package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +1 -0
- package/lib/components/Shortcuts/Shortcuts.types.js +2 -0
- package/lib/components/Shortcuts/Shortcuts.types.js.map +1 -0
- package/lib/components/Shortcuts/index.d.ts +3 -0
- package/lib/components/Shortcuts/index.d.ts.map +1 -0
- package/lib/components/Shortcuts/index.js +2 -0
- package/lib/components/Shortcuts/index.js.map +1 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropsWithoutRef } from 'react';
|
|
2
|
+
import type { ShortcutsProps } from './Shortcuts.types';
|
|
3
|
+
declare const _default: import("react").ForwardRefExoticComponent<PropsWithoutRef<ShortcutsProps> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
4
|
+
getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["list", "emptyState", "categorySection", "categoryHeading"]>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=Shortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,OAAO,CAAC;AAmBxD,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,mBAAmB,CAAC;;;;AAqQtE,wBAA2D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, forwardRef } from 'react';
|
|
3
|
+
import { Card, EmptyState, Flex, Icon, Text, Tooltip, VisuallyHiddenText, useArrows, useBreakpoint, useElement, useI18n, useTestIds, useTheme, withTestIds } from '@pega/cosmos-react-core';
|
|
4
|
+
import { StyledInlineLinkLabel, StyledLinksListItem, StyledShortcutsButton, StyledShortcutsCard, StyledShortcutsCardButton, StyledPreviewShell, StyledShortcutsPreviewItem, StyledShortcutsCardsContainer, StyledCategoryItemIcon, StyledShortcutsCategoriesContainer, StyledShortcutsCategoryHeading, StyledShortcutsList, StyledShortcutsLinksWrapper, StyledShortcutsStackedButton, StyledShortcutsCardIcon, StyledShortcutsHeader, StyledShortcutCardContent } from './Shortcuts.styles';
|
|
5
|
+
import { getShortcutsTestIds } from './Shortcuts.test-ids';
|
|
6
|
+
const itemLinkProps = (item) => {
|
|
7
|
+
if (item.type === 'external') {
|
|
8
|
+
return { href: item.href, target: '_blank', rel: 'noopener noreferrer' };
|
|
9
|
+
}
|
|
10
|
+
return { onClick: item.onClick };
|
|
11
|
+
};
|
|
12
|
+
const InlineLinkItem = ({ item, iconBackground }) => {
|
|
13
|
+
const [buttonEl, setButtonEl] = useElement();
|
|
14
|
+
return (_jsxs(StyledLinksListItem, { isSmallOrAbove: true, children: [_jsxs(StyledShortcutsButton, { isInline: true, variant: 'link', ref: setButtonEl, ...itemLinkProps(item), children: [_jsx(Icon, { name: item.icon, background: iconBackground, shape: 'square' }), _jsx(StyledInlineLinkLabel, { children: item.label })] }), buttonEl && (_jsx(Tooltip, { target: buttonEl, smart: true, children: item.label }))] }));
|
|
15
|
+
};
|
|
16
|
+
const Shortcuts = forwardRef(function Shortcuts({ heading, items = [], categories, displayMode = 'links', showHeader = true, testId, ...restProps }, ref) {
|
|
17
|
+
const t = useI18n();
|
|
18
|
+
const testIds = useTestIds(testId, getShortcutsTestIds);
|
|
19
|
+
const { base: { palette: { interactive: iconBackground } } } = useTheme();
|
|
20
|
+
const flatListRef = useRef(null);
|
|
21
|
+
const categoriesContainerRef = useRef(null);
|
|
22
|
+
useArrows(flatListRef, { dir: 'both', cycle: true });
|
|
23
|
+
useArrows(categoriesContainerRef, { dir: 'both', cycle: true });
|
|
24
|
+
const isWide = useBreakpoint('sm', {
|
|
25
|
+
breakpointRef: categories ? categoriesContainerRef : flatListRef
|
|
26
|
+
});
|
|
27
|
+
const emptyState = _jsx(EmptyState, { message: t('no_items'), "data-testid": testIds.emptyState });
|
|
28
|
+
const renderCardItem = (item) => {
|
|
29
|
+
if (item.type === 'external' && item.preview) {
|
|
30
|
+
return (_jsx(Flex, { container: { direction: 'column' }, as: StyledShortcutsPreviewItem, children: _jsx(StyledPreviewShell, { children: item.preview }) }, item.id));
|
|
31
|
+
}
|
|
32
|
+
return (_jsx(StyledShortcutsCard, { children: _jsxs(StyledShortcutsCardButton, { variant: 'link', ...itemLinkProps(item), children: [_jsx(StyledShortcutsCardIcon, { name: item.icon, background: iconBackground, shape: 'square' }), _jsx(Text, { as: 'span', variant: 'h3', children: item.label })] }) }, item.id));
|
|
33
|
+
};
|
|
34
|
+
const renderStackedLinkItem = (item) => (_jsx(StyledLinksListItem, { isSmallOrAbove: false, children: _jsxs(StyledShortcutsStackedButton, { variant: 'link', ...itemLinkProps(item), children: [_jsx(Icon, { name: item.icon, background: iconBackground, shape: 'square' }), item.label] }) }, item.id));
|
|
35
|
+
const renderCategoryLinkItem = (item) => isWide ? (_jsx(Flex, { container: { alignItems: 'center', pad: [1.5, undefined] }, as: 'li', children: _jsxs(StyledShortcutsButton, { variant: 'link', ...itemLinkProps(item), children: [_jsx(StyledCategoryItemIcon, { name: item.icon, background: iconBackground, shape: 'square' }), item.label] }) }, item.id)) : (renderStackedLinkItem(item));
|
|
36
|
+
const withCardShell = (content) => (_jsxs(Card, { ...restProps, "data-testid": testIds.root, ref: ref, children: [_jsx(StyledShortcutsHeader, { children: _jsx(Text, { variant: 'h2', children: heading ?? t('shortcuts') }) }), _jsx(StyledShortcutCardContent, { isNonCategoryLink: !categories && displayMode === 'links', children: content })] }));
|
|
37
|
+
if (displayMode === 'card' && !categories) {
|
|
38
|
+
const cardGrid = (_jsx(StyledShortcutsCardsContainer, { ref: flatListRef, isSmallOrAbove: isWide, showHeader: showHeader, role: 'list', "data-testid": testIds.list, "aria-label": heading ?? t('shortcuts'), children: items.map(renderCardItem) }));
|
|
39
|
+
if (!showHeader) {
|
|
40
|
+
if (items.length === 0)
|
|
41
|
+
return null;
|
|
42
|
+
return (_jsxs("div", { "data-testid": testIds.root, ...restProps, ref: ref, children: [_jsx(VisuallyHiddenText, { children: heading ?? t('shortcuts') }), cardGrid] }));
|
|
43
|
+
}
|
|
44
|
+
return withCardShell(items.length === 0 ? emptyState : cardGrid);
|
|
45
|
+
}
|
|
46
|
+
if (categories) {
|
|
47
|
+
const visibleCategories = categories.filter(cat => cat.items.length > 0);
|
|
48
|
+
const categorySections = displayMode === 'card' ? (_jsx(StyledShortcutsCategoriesContainer, { ref: categoriesContainerRef, isSmallOrAbove: false, children: visibleCategories.map(cat => (_jsxs(Flex, { container: { direction: 'column' }, "aria-labelledby": `cat-${cat.id}`, "data-testid": testIds.categorySection, as: 'section', children: [_jsx(StyledShortcutsCategoryHeading, { id: `cat-${cat.id}`, "data-testid": testIds.categoryHeading, variant: 'h3', children: cat.label }), _jsx(StyledShortcutsCardsContainer, { isSmallOrAbove: isWide, showHeader: true, role: 'list', "aria-label": cat.label, children: cat.items.map(renderCardItem) })] }, cat.id))) })) : (_jsx(StyledShortcutsCategoriesContainer, { ref: categoriesContainerRef, isSmallOrAbove: isWide, children: visibleCategories.map(cat => (_jsxs(Flex, { container: { direction: 'column' }, "aria-labelledby": `cat-${cat.id}`, "data-testid": testIds.categorySection, as: 'section', children: [_jsx(StyledShortcutsCategoryHeading, { id: `cat-${cat.id}`, "data-testid": testIds.categoryHeading, variant: 'h3', children: cat.label }), _jsx(StyledShortcutsList, { isSmallOrAbove: false, role: 'list', "aria-label": cat.label, children: cat.items.map(renderCategoryLinkItem) })] }, cat.id))) }));
|
|
49
|
+
return withCardShell(visibleCategories.length === 0 ? emptyState : categorySections);
|
|
50
|
+
}
|
|
51
|
+
const flatLinkList = (_jsx(StyledShortcutsLinksWrapper, { children: _jsx(StyledShortcutsList, { ref: flatListRef, isSmallOrAbove: isWide, role: 'list', "data-testid": testIds.list, "aria-label": heading ?? t('shortcuts'), children: items.map(item => isWide ? (_jsx(InlineLinkItem, { item: item, iconBackground: iconBackground }, item.id)) : (renderStackedLinkItem(item))) }) }));
|
|
52
|
+
return withCardShell(items.length === 0 ? emptyState : flatLinkList);
|
|
53
|
+
});
|
|
54
|
+
export default withTestIds(Shortcuts, getShortcutsTestIds);
|
|
55
|
+
//# sourceMappingURL=Shortcuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,EACL,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ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,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { useRef, forwardRef } from 'react';\nimport type { ReactNode, PropsWithoutRef } from 'react';\n\nimport {\n Card,\n EmptyState,\n Flex,\n Icon,\n Text,\n Tooltip,\n VisuallyHiddenText,\n useArrows,\n useBreakpoint,\n useElement,\n useI18n,\n useTestIds,\n useTheme,\n withTestIds\n} from '@pega/cosmos-react-core';\n\nimport type { ShortcutsProps, ShortcutItem } from './Shortcuts.types';\nimport {\n StyledInlineLinkLabel,\n StyledLinksListItem,\n StyledShortcutsButton,\n StyledShortcutsCard,\n StyledShortcutsCardButton,\n StyledPreviewShell,\n StyledShortcutsPreviewItem,\n StyledShortcutsCardsContainer,\n StyledCategoryItemIcon,\n StyledShortcutsCategoriesContainer,\n StyledShortcutsCategoryHeading,\n StyledShortcutsList,\n StyledShortcutsLinksWrapper,\n StyledShortcutsStackedButton,\n StyledShortcutsCardIcon,\n StyledShortcutsHeader,\n StyledShortcutCardContent\n} from './Shortcuts.styles';\nimport { getShortcutsTestIds } from './Shortcuts.test-ids';\n\nconst itemLinkProps = (\n item: ShortcutItem\n): {\n href?: string;\n target?: string;\n rel?: string;\n onClick?: () => void;\n} => {\n if (item.type === 'external') {\n return { href: item.href, target: '_blank', rel: 'noopener noreferrer' };\n }\n\n return { onClick: item.onClick };\n};\n\nconst InlineLinkItem = ({\n item,\n iconBackground\n}: {\n item: ShortcutItem;\n iconBackground: string;\n}) => {\n const [buttonEl, setButtonEl] = useElement();\n\n return (\n <StyledLinksListItem isSmallOrAbove>\n <StyledShortcutsButton isInline variant='link' ref={setButtonEl} {...itemLinkProps(item)}>\n <Icon name={item.icon} background={iconBackground} shape='square' />\n <StyledInlineLinkLabel>{item.label}</StyledInlineLinkLabel>\n </StyledShortcutsButton>\n\n {buttonEl && (\n <Tooltip target={buttonEl} smart>\n {item.label}\n </Tooltip>\n )}\n </StyledLinksListItem>\n );\n};\n\nconst Shortcuts = forwardRef(function Shortcuts(\n {\n heading,\n items = [],\n categories,\n displayMode = 'links',\n showHeader = true,\n testId,\n ...restProps\n }: PropsWithoutRef<ShortcutsProps>,\n ref: ShortcutsProps['ref']\n) {\n const t = useI18n();\n const testIds = useTestIds(testId, getShortcutsTestIds);\n const {\n base: {\n palette: { interactive: iconBackground }\n }\n } = useTheme();\n\n const flatListRef = useRef<HTMLUListElement>(null);\n const categoriesContainerRef = useRef<HTMLDivElement>(null);\n\n useArrows(flatListRef, { dir: 'both', cycle: true });\n useArrows(categoriesContainerRef, { dir: 'both', cycle: true });\n\n const isWide = useBreakpoint('sm', {\n breakpointRef: categories ? categoriesContainerRef : flatListRef\n });\n\n const emptyState = <EmptyState message={t('no_items')} data-testid={testIds.emptyState} />;\n\n const renderCardItem = (item: ShortcutItem) => {\n if (item.type === 'external' && item.preview) {\n return (\n <Flex container={{ direction: 'column' }} key={item.id} as={StyledShortcutsPreviewItem}>\n <StyledPreviewShell>{item.preview}</StyledPreviewShell>\n </Flex>\n );\n }\n\n return (\n <StyledShortcutsCard key={item.id}>\n <StyledShortcutsCardButton variant='link' {...itemLinkProps(item)}>\n <StyledShortcutsCardIcon name={item.icon} background={iconBackground} shape='square' />\n <Text as='span' variant='h3'>\n {item.label}\n </Text>\n </StyledShortcutsCardButton>\n </StyledShortcutsCard>\n );\n };\n\n const renderStackedLinkItem = (item: ShortcutItem) => (\n <StyledLinksListItem key={item.id} isSmallOrAbove={false}>\n <StyledShortcutsStackedButton variant='link' {...itemLinkProps(item)}>\n <Icon name={item.icon} background={iconBackground} shape='square' />\n {item.label}\n </StyledShortcutsStackedButton>\n </StyledLinksListItem>\n );\n\n const renderCategoryLinkItem = (item: ShortcutItem) =>\n isWide ? (\n <Flex container={{ alignItems: 'center', pad: [1.5, undefined] }} key={item.id} as='li'>\n <StyledShortcutsButton variant='link' {...itemLinkProps(item)}>\n <StyledCategoryItemIcon name={item.icon} background={iconBackground} shape='square' />\n {item.label}\n </StyledShortcutsButton>\n </Flex>\n ) : (\n renderStackedLinkItem(item)\n );\n\n const withCardShell = (content: ReactNode) => (\n <Card {...restProps} data-testid={testIds.root} ref={ref}>\n <StyledShortcutsHeader>\n <Text variant='h2'>{heading ?? t('shortcuts')}</Text>\n </StyledShortcutsHeader>\n\n <StyledShortcutCardContent isNonCategoryLink={!categories && displayMode === 'links'}>\n {content}\n </StyledShortcutCardContent>\n </Card>\n );\n\n if (displayMode === 'card' && !categories) {\n const cardGrid = (\n <StyledShortcutsCardsContainer\n ref={flatListRef}\n isSmallOrAbove={isWide}\n showHeader={showHeader}\n role='list'\n data-testid={testIds.list}\n aria-label={heading ?? t('shortcuts')}\n >\n {items.map(renderCardItem)}\n </StyledShortcutsCardsContainer>\n );\n\n if (!showHeader) {\n if (items.length === 0) return null;\n\n return (\n <div data-testid={testIds.root} {...restProps} ref={ref}>\n <VisuallyHiddenText>{heading ?? t('shortcuts')}</VisuallyHiddenText>\n {cardGrid}\n </div>\n );\n }\n\n return withCardShell(items.length === 0 ? emptyState : cardGrid);\n }\n\n if (categories) {\n const visibleCategories = categories.filter(cat => cat.items.length > 0);\n\n const categorySections =\n displayMode === 'card' ? (\n <StyledShortcutsCategoriesContainer ref={categoriesContainerRef} isSmallOrAbove={false}>\n {visibleCategories.map(cat => (\n <Flex\n container={{ direction: 'column' }}\n key={cat.id}\n aria-labelledby={`cat-${cat.id}`}\n data-testid={testIds.categorySection}\n as='section'\n >\n <StyledShortcutsCategoryHeading\n id={`cat-${cat.id}`}\n data-testid={testIds.categoryHeading}\n variant='h3'\n >\n {cat.label}\n </StyledShortcutsCategoryHeading>\n\n <StyledShortcutsCardsContainer\n isSmallOrAbove={isWide}\n showHeader\n role='list'\n aria-label={cat.label}\n >\n {cat.items.map(renderCardItem)}\n </StyledShortcutsCardsContainer>\n </Flex>\n ))}\n </StyledShortcutsCategoriesContainer>\n ) : (\n <StyledShortcutsCategoriesContainer ref={categoriesContainerRef} isSmallOrAbove={isWide}>\n {visibleCategories.map(cat => (\n <Flex\n container={{ direction: 'column' }}\n key={cat.id}\n aria-labelledby={`cat-${cat.id}`}\n data-testid={testIds.categorySection}\n as='section'\n >\n <StyledShortcutsCategoryHeading\n id={`cat-${cat.id}`}\n data-testid={testIds.categoryHeading}\n variant='h3'\n >\n {cat.label}\n </StyledShortcutsCategoryHeading>\n\n <StyledShortcutsList isSmallOrAbove={false} role='list' aria-label={cat.label}>\n {cat.items.map(renderCategoryLinkItem)}\n </StyledShortcutsList>\n </Flex>\n ))}\n </StyledShortcutsCategoriesContainer>\n );\n\n return withCardShell(visibleCategories.length === 0 ? emptyState : categorySections);\n }\n\n const flatLinkList = (\n <StyledShortcutsLinksWrapper>\n <StyledShortcutsList\n ref={flatListRef}\n isSmallOrAbove={isWide}\n role='list'\n data-testid={testIds.list}\n aria-label={heading ?? t('shortcuts')}\n >\n {items.map(item =>\n isWide ? (\n <InlineLinkItem key={item.id} item={item} iconBackground={iconBackground} />\n ) : (\n renderStackedLinkItem(item)\n )\n )}\n </StyledShortcutsList>\n </StyledShortcutsLinksWrapper>\n );\n\n return withCardShell(items.length === 0 ? emptyState : flatLinkList);\n});\n\nexport default withTestIds(Shortcuts, getShortcutsTestIds);\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const StyledShortcutsHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
2
|
+
export declare const StyledShortcutCardContent: 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, {
|
|
3
|
+
isNonCategoryLink?: boolean;
|
|
4
|
+
}>> & string & Omit<import("react").FunctionComponent<import("@pega/cosmos-react-core").CardContentProps & import("@pega/cosmos-react-core").ForwardProps>, keyof import("react").Component<any, {}, any>>;
|
|
5
|
+
export declare const StyledShortcutsLinksWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const StyledShortcutsList: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
7
|
+
isSmallOrAbove: boolean;
|
|
8
|
+
}>> & string;
|
|
9
|
+
export declare const StyledLinksListItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {
|
|
10
|
+
isSmallOrAbove: boolean;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const StyledShortcutsButton: 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"> & {
|
|
13
|
+
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;
|
|
14
|
+
}, {
|
|
15
|
+
isInline?: boolean;
|
|
16
|
+
}>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
17
|
+
export declare const StyledInlineLinkLabel: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
18
|
+
export declare const StyledShortcutsStackedButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").ButtonProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
|
|
19
|
+
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;
|
|
20
|
+
}, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
21
|
+
export declare const StyledShortcutsCardsContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {
|
|
22
|
+
isSmallOrAbove: boolean;
|
|
23
|
+
showHeader: boolean;
|
|
24
|
+
}>> & string;
|
|
25
|
+
export declare const StyledShortcutsCard: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
26
|
+
export declare const StyledShortcutsPreviewItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
27
|
+
export declare const StyledPreviewShell: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
|
+
export declare const StyledShortcutsCardButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<import("@pega/cosmos-react-core").ButtonProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
|
|
29
|
+
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;
|
|
30
|
+
}, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").ButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
31
|
+
export declare const StyledShortcutsCardIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("@pega/cosmos-react-core").IconProps & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, keyof import("react").Component<any, {}, any>>;
|
|
32
|
+
export declare const StyledShortcutsCategoriesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
33
|
+
isSmallOrAbove: boolean;
|
|
34
|
+
}>> & string;
|
|
35
|
+
export declare const StyledShortcutsCategoryHeading: 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"> & {
|
|
36
|
+
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;
|
|
37
|
+
}, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, keyof import("react").Component<any, {}, any>>;
|
|
38
|
+
export declare const StyledCategoryItemIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("@pega/cosmos-react-core").IconProps & import("styled-components/dist/types").BaseObject, import("styled-components/dist/types").BaseObject>> & string & Omit<import("react").ForwardRefExoticComponent<import("@pega/cosmos-react-core").IconProps>, keyof import("react").Component<any, {}, any>>;
|
|
39
|
+
//# sourceMappingURL=Shortcuts.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.styles.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,qBAAqB,uNAKhC,CAAC;AAIH,eAAO,MAAM,yBAAyB;wBAA6C,OAAO;0MAWxF,CAAC;AAIH,eAAO,MAAM,2BAA2B,6NAOtC,CAAC;AAIH,eAAO,MAAM,mBAAmB;oBAA+B,OAAO;YAuBrE,CAAC;AAIF,eAAO,MAAM,mBAAmB;oBAA+B,OAAO;YAqBrE,CAAC;AAIF,eAAO,MAAM,qBAAqB;;;eAA+B,OAAO;oLAetE,CAAC;AAIH,eAAO,MAAM,qBAAqB,+NAMjC,CAAC;AAIF,eAAO,MAAM,4BAA4B;;2LAOvC,CAAC;AAIH,eAAO,MAAM,6BAA6B;oBACxB,OAAO;gBACX,OAAO;YAqBnB,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAkB9B,CAAC;AAIH,eAAO,MAAM,0BAA0B,6NAEtC,CAAC;AAIF,eAAO,MAAM,kBAAkB,6NAkC7B,CAAC;AAIH,eAAO,MAAM,yBAAyB;;2LAoBpC,CAAC;AAIH,eAAO,MAAM,uBAAuB,kaAKlC,CAAC;AAIH,eAAO,MAAM,kCAAkC;oBAAgC,OAAO;YAoBrF,CAAC;AAIF,eAAO,MAAM,8BAA8B;;yLAIzC,CAAC;AAIH,eAAO,MAAM,sBAAsB,kaAElC,CAAC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { mix } from 'polished';
|
|
3
|
+
import { Button, CardContent, defaultThemeProp, Icon, Text, tryCatch } from '@pega/cosmos-react-core';
|
|
4
|
+
export const StyledShortcutsHeader = styled.header(({ theme: { base, components } }) => {
|
|
5
|
+
return css `
|
|
6
|
+
padding: calc(${base.spacing} * 1.5) calc(${components.card.padding} * 2);
|
|
7
|
+
padding-block-end: 0;
|
|
8
|
+
`;
|
|
9
|
+
});
|
|
10
|
+
StyledShortcutsHeader.defaultProps = defaultThemeProp;
|
|
11
|
+
export const StyledShortcutCardContent = styled(CardContent)(({ isNonCategoryLink }) => {
|
|
12
|
+
return css `
|
|
13
|
+
${isNonCategoryLink &&
|
|
14
|
+
css `
|
|
15
|
+
&&&& {
|
|
16
|
+
padding-inline: 0;
|
|
17
|
+
}
|
|
18
|
+
`}
|
|
19
|
+
`;
|
|
20
|
+
});
|
|
21
|
+
StyledShortcutCardContent.defaultProps = defaultThemeProp;
|
|
22
|
+
export const StyledShortcutsLinksWrapper = styled.div(({ theme }) => {
|
|
23
|
+
return css `
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
width: 100%;
|
|
26
|
+
padding-block: calc(${theme.base.spacing} * 0.5);
|
|
27
|
+
margin-block: calc(${theme.base.spacing} * -0.5);
|
|
28
|
+
`;
|
|
29
|
+
});
|
|
30
|
+
StyledShortcutsLinksWrapper.defaultProps = defaultThemeProp;
|
|
31
|
+
export const StyledShortcutsList = styled.ul(({ theme: { base }, isSmallOrAbove }) => {
|
|
32
|
+
return css `
|
|
33
|
+
display: grid;
|
|
34
|
+
grid-template-columns: minmax(0, 1fr);
|
|
35
|
+
list-style: none;
|
|
36
|
+
padding: 0;
|
|
37
|
+
margin: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
|
|
40
|
+
${isSmallOrAbove &&
|
|
41
|
+
css `
|
|
42
|
+
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
|
43
|
+
row-gap: calc(${base.spacing} * 1.5);
|
|
44
|
+
margin-inline-start: -0.0625rem;
|
|
45
|
+
`}
|
|
46
|
+
|
|
47
|
+
${!isSmallOrAbove &&
|
|
48
|
+
css `
|
|
49
|
+
padding-inline: calc(${base.spacing} * 2);
|
|
50
|
+
`}
|
|
51
|
+
`;
|
|
52
|
+
});
|
|
53
|
+
StyledShortcutsList.defaultProps = defaultThemeProp;
|
|
54
|
+
export const StyledLinksListItem = styled.li(({ theme: { base }, isSmallOrAbove }) => {
|
|
55
|
+
return css `
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
|
|
59
|
+
${isSmallOrAbove &&
|
|
60
|
+
css `
|
|
61
|
+
border-inline-start: 0.0625rem solid ${base.palette['border-line']};
|
|
62
|
+
padding-inline: calc(${base.spacing} * 2);
|
|
63
|
+
min-height: 100%;
|
|
64
|
+
`}
|
|
65
|
+
|
|
66
|
+
${!isSmallOrAbove &&
|
|
67
|
+
css `
|
|
68
|
+
padding-block: calc(${base.spacing} * 1.5);
|
|
69
|
+
padding-inline: calc(${base.spacing} * 1.5);
|
|
70
|
+
width: 100%;
|
|
71
|
+
`}
|
|
72
|
+
`;
|
|
73
|
+
});
|
|
74
|
+
StyledLinksListItem.defaultProps = defaultThemeProp;
|
|
75
|
+
export const StyledShortcutsButton = styled(Button)(({ theme: { base }, isInline }) => {
|
|
76
|
+
return css `
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
gap: ${base.spacing};
|
|
80
|
+
|
|
81
|
+
${isInline &&
|
|
82
|
+
css `
|
|
83
|
+
flex: 1 1 0;
|
|
84
|
+
min-width: 0;
|
|
85
|
+
`}
|
|
86
|
+
`;
|
|
87
|
+
});
|
|
88
|
+
StyledShortcutsButton.defaultProps = defaultThemeProp;
|
|
89
|
+
export const StyledInlineLinkLabel = styled.span `
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
min-width: 0;
|
|
94
|
+
flex: 1;
|
|
95
|
+
`;
|
|
96
|
+
StyledInlineLinkLabel.defaultProps = defaultThemeProp;
|
|
97
|
+
export const StyledShortcutsStackedButton = styled(Button)(({ theme: { base } }) => {
|
|
98
|
+
return css `
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
width: 100%;
|
|
102
|
+
gap: calc(${base.spacing} * 2);
|
|
103
|
+
`;
|
|
104
|
+
});
|
|
105
|
+
StyledShortcutsStackedButton.defaultProps = defaultThemeProp;
|
|
106
|
+
export const StyledShortcutsCardsContainer = styled.ul(({ theme: { base }, isSmallOrAbove, showHeader }) => {
|
|
107
|
+
return css `
|
|
108
|
+
display: grid;
|
|
109
|
+
grid-template-columns: minmax(0, 1fr);
|
|
110
|
+
gap: ${base.spacing};
|
|
111
|
+
list-style: none;
|
|
112
|
+
padding: 0;
|
|
113
|
+
margin: 0;
|
|
114
|
+
|
|
115
|
+
${isSmallOrAbove &&
|
|
116
|
+
css `
|
|
117
|
+
grid-auto-rows: 1fr;
|
|
118
|
+
grid-template-columns: ${showHeader
|
|
119
|
+
? 'repeat(auto-fill, minmax(14rem, 1fr))'
|
|
120
|
+
: 'repeat(auto-fit, minmax(14rem, 14rem))'};
|
|
121
|
+
justify-content: ${showHeader ? 'start' : 'center'};
|
|
122
|
+
align-items: stretch;
|
|
123
|
+
width: 100%;
|
|
124
|
+
`}
|
|
125
|
+
`;
|
|
126
|
+
});
|
|
127
|
+
StyledShortcutsCardsContainer.defaultProps = defaultThemeProp;
|
|
128
|
+
export const StyledShortcutsCard = styled.li(({ theme: { base, components } }) => {
|
|
129
|
+
const hoverBackgroundColor = tryCatch(() => mix(0.9, base.palette['primary-background'], components.button['secondary-color']));
|
|
130
|
+
return css `
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
min-height: 8rem;
|
|
134
|
+
border: 0.0625rem solid ${base.palette['border-line']};
|
|
135
|
+
border-radius: ${base['border-radius']};
|
|
136
|
+
background: ${base.palette['primary-background']};
|
|
137
|
+
box-shadow: ${base.shadow.low};
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
background: ${hoverBackgroundColor};
|
|
141
|
+
}
|
|
142
|
+
`;
|
|
143
|
+
});
|
|
144
|
+
StyledShortcutsCard.defaultProps = defaultThemeProp;
|
|
145
|
+
export const StyledShortcutsPreviewItem = styled.li `
|
|
146
|
+
min-height: 8rem;
|
|
147
|
+
`;
|
|
148
|
+
StyledShortcutsPreviewItem.defaultProps = defaultThemeProp;
|
|
149
|
+
export const StyledPreviewShell = styled.div(({ theme: { base, components } }) => {
|
|
150
|
+
const hoverBackgroundColor = tryCatch(() => mix(0.9, base.palette['primary-background'], components.button['secondary-color']));
|
|
151
|
+
return css `
|
|
152
|
+
flex: 1;
|
|
153
|
+
min-height: 0;
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
|
|
157
|
+
&& > * > * > * {
|
|
158
|
+
flex: 1;
|
|
159
|
+
min-height: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&& > * {
|
|
163
|
+
flex: 1;
|
|
164
|
+
min-height: 0;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&& > * > * {
|
|
170
|
+
flex: 1;
|
|
171
|
+
min-height: 0;
|
|
172
|
+
box-shadow: ${base.shadow.low};
|
|
173
|
+
--border-radius: ${base['border-radius']};
|
|
174
|
+
|
|
175
|
+
&:hover {
|
|
176
|
+
background: ${hoverBackgroundColor};
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
180
|
+
});
|
|
181
|
+
StyledPreviewShell.defaultProps = defaultThemeProp;
|
|
182
|
+
export const StyledShortcutsCardButton = styled(Button)(({ theme: { base } }) => {
|
|
183
|
+
return css `
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
align-items: center;
|
|
187
|
+
justify-content: flex-start;
|
|
188
|
+
gap: calc(${base.spacing} * 2);
|
|
189
|
+
padding-block-start: calc(${base.spacing} * 4);
|
|
190
|
+
padding-block-end: calc(${base.spacing} * 3);
|
|
191
|
+
padding-inline: calc(${base.spacing} * 2);
|
|
192
|
+
width: 100%;
|
|
193
|
+
text-align: center;
|
|
194
|
+
flex: 1;
|
|
195
|
+
border-radius: inherit;
|
|
196
|
+
|
|
197
|
+
&:focus-visible {
|
|
198
|
+
outline: none;
|
|
199
|
+
box-shadow: ${base.shadow.focus};
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
});
|
|
203
|
+
StyledShortcutsCardButton.defaultProps = defaultThemeProp;
|
|
204
|
+
export const StyledShortcutsCardIcon = styled(Icon)(() => {
|
|
205
|
+
return css `
|
|
206
|
+
width: 3rem;
|
|
207
|
+
height: 3rem;
|
|
208
|
+
`;
|
|
209
|
+
});
|
|
210
|
+
StyledShortcutsCardIcon.defaultProps = defaultThemeProp;
|
|
211
|
+
export const StyledShortcutsCategoriesContainer = styled.div(({ theme: { base }, isSmallOrAbove }) => {
|
|
212
|
+
return css `
|
|
213
|
+
display: grid;
|
|
214
|
+
grid-template-columns: minmax(0, 1fr);
|
|
215
|
+
gap: calc(${base.spacing} * 3);
|
|
216
|
+
width: 100%;
|
|
217
|
+
|
|
218
|
+
${isSmallOrAbove &&
|
|
219
|
+
css `
|
|
220
|
+
grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
|
|
221
|
+
align-items: start;
|
|
222
|
+
`}
|
|
223
|
+
|
|
224
|
+
${!isSmallOrAbove &&
|
|
225
|
+
css `
|
|
226
|
+
padding-inline: calc(${base.spacing} * 0.5);
|
|
227
|
+
`}
|
|
228
|
+
`;
|
|
229
|
+
});
|
|
230
|
+
StyledShortcutsCategoriesContainer.defaultProps = defaultThemeProp;
|
|
231
|
+
export const StyledShortcutsCategoryHeading = styled(Text)(({ theme: { base } }) => {
|
|
232
|
+
return css `
|
|
233
|
+
margin-block-end: ${base.spacing};
|
|
234
|
+
`;
|
|
235
|
+
});
|
|
236
|
+
StyledShortcutsCategoryHeading.defaultProps = defaultThemeProp;
|
|
237
|
+
export const StyledCategoryItemIcon = styled(Icon) `
|
|
238
|
+
flex-shrink: 0;
|
|
239
|
+
`;
|
|
240
|
+
StyledCategoryItemIcon.defaultProps = defaultThemeProp;
|
|
241
|
+
//# sourceMappingURL=Shortcuts.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.styles.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EACL,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACT,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,EAAE;IACrF,OAAO,GAAG,CAAA;oBACQ,IAAI,CAAC,OAAO,gBAAgB,UAAU,CAAC,IAAI,CAAC,OAAO;;GAEpE,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,yBAAyB,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AAC;AACJ,CAAC,CAAC,CAAC;AAEH,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/D,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;CAEjD,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport {\n Button,\n CardContent,\n defaultThemeProp,\n Icon,\n Text,\n tryCatch\n} from '@pega/cosmos-react-core';\n\nexport const StyledShortcutsHeader = styled.header(({ theme: { base, components } }) => {\n return css`\n padding: calc(${base.spacing} * 1.5) calc(${components.card.padding} * 2);\n padding-block-end: 0;\n `;\n});\n\nStyledShortcutsHeader.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutCardContent = styled(CardContent)<{ isNonCategoryLink?: boolean }>(({\n isNonCategoryLink\n}) => {\n return css`\n ${isNonCategoryLink &&\n css`\n &&&& {\n padding-inline: 0;\n }\n `}\n `;\n});\n\nStyledShortcutCardContent.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsLinksWrapper = styled.div(({ theme }) => {\n return css`\n overflow: hidden;\n width: 100%;\n padding-block: calc(${theme.base.spacing} * 0.5);\n margin-block: calc(${theme.base.spacing} * -0.5);\n `;\n});\n\nStyledShortcutsLinksWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsList = styled.ul<{ isSmallOrAbove: boolean }>(\n ({ theme: { base }, isSmallOrAbove }) => {\n return css`\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n list-style: none;\n padding: 0;\n margin: 0;\n width: 100%;\n\n ${isSmallOrAbove &&\n css`\n grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));\n row-gap: calc(${base.spacing} * 1.5);\n margin-inline-start: -0.0625rem;\n `}\n\n ${!isSmallOrAbove &&\n css`\n padding-inline: calc(${base.spacing} * 2);\n `}\n `;\n }\n);\n\nStyledShortcutsList.defaultProps = defaultThemeProp;\n\nexport const StyledLinksListItem = styled.li<{ isSmallOrAbove: boolean }>(\n ({ theme: { base }, isSmallOrAbove }) => {\n return css`\n display: flex;\n align-items: center;\n\n ${isSmallOrAbove &&\n css`\n border-inline-start: 0.0625rem solid ${base.palette['border-line']};\n padding-inline: calc(${base.spacing} * 2);\n min-height: 100%;\n `}\n\n ${!isSmallOrAbove &&\n css`\n padding-block: calc(${base.spacing} * 1.5);\n padding-inline: calc(${base.spacing} * 1.5);\n width: 100%;\n `}\n `;\n }\n);\n\nStyledLinksListItem.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsButton = styled(Button)<{ isInline?: boolean }>(({\n theme: { base },\n isInline\n}) => {\n return css`\n display: flex;\n align-items: center;\n gap: ${base.spacing};\n\n ${isInline &&\n css`\n flex: 1 1 0;\n min-width: 0;\n `}\n `;\n});\n\nStyledShortcutsButton.defaultProps = defaultThemeProp;\n\nexport const StyledInlineLinkLabel = styled.span`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n flex: 1;\n`;\n\nStyledInlineLinkLabel.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsStackedButton = styled(Button)(({ theme: { base } }) => {\n return css`\n display: flex;\n align-items: center;\n width: 100%;\n gap: calc(${base.spacing} * 2);\n `;\n});\n\nStyledShortcutsStackedButton.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardsContainer = styled.ul<{\n isSmallOrAbove: boolean;\n showHeader: boolean;\n}>(({ theme: { base }, isSmallOrAbove, showHeader }) => {\n return css`\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: ${base.spacing};\n list-style: none;\n padding: 0;\n margin: 0;\n\n ${isSmallOrAbove &&\n css`\n grid-auto-rows: 1fr;\n grid-template-columns: ${showHeader\n ? 'repeat(auto-fill, minmax(14rem, 1fr))'\n : 'repeat(auto-fit, minmax(14rem, 14rem))'};\n justify-content: ${showHeader ? 'start' : 'center'};\n align-items: stretch;\n width: 100%;\n `}\n `;\n});\n\nStyledShortcutsCardsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCard = styled.li(({ theme: { base, components } }) => {\n const hoverBackgroundColor = tryCatch(() =>\n mix(0.9, base.palette['primary-background'], components.button['secondary-color'])\n );\n\n return css`\n display: flex;\n flex-direction: column;\n min-height: 8rem;\n border: 0.0625rem solid ${base.palette['border-line']};\n border-radius: ${base['border-radius']};\n background: ${base.palette['primary-background']};\n box-shadow: ${base.shadow.low};\n\n &:hover {\n background: ${hoverBackgroundColor};\n }\n `;\n});\n\nStyledShortcutsCard.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsPreviewItem = styled.li`\n min-height: 8rem;\n`;\n\nStyledShortcutsPreviewItem.defaultProps = defaultThemeProp;\n\nexport const StyledPreviewShell = styled.div(({ theme: { base, components } }) => {\n const hoverBackgroundColor = tryCatch(() =>\n mix(0.9, base.palette['primary-background'], components.button['secondary-color'])\n );\n\n return css`\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n\n && > * > * > * {\n flex: 1;\n min-height: 0;\n }\n\n && > * {\n flex: 1;\n min-height: 0;\n display: flex;\n flex-direction: column;\n }\n\n && > * > * {\n flex: 1;\n min-height: 0;\n box-shadow: ${base.shadow.low};\n --border-radius: ${base['border-radius']};\n\n &:hover {\n background: ${hoverBackgroundColor};\n }\n }\n `;\n});\n\nStyledPreviewShell.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardButton = styled(Button)(({ theme: { base } }) => {\n return css`\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: flex-start;\n gap: calc(${base.spacing} * 2);\n padding-block-start: calc(${base.spacing} * 4);\n padding-block-end: calc(${base.spacing} * 3);\n padding-inline: calc(${base.spacing} * 2);\n width: 100%;\n text-align: center;\n flex: 1;\n border-radius: inherit;\n\n &:focus-visible {\n outline: none;\n box-shadow: ${base.shadow.focus};\n }\n `;\n});\n\nStyledShortcutsCardButton.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardIcon = styled(Icon)(() => {\n return css`\n width: 3rem;\n height: 3rem;\n `;\n});\n\nStyledShortcutsCardIcon.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCategoriesContainer = styled.div<{ isSmallOrAbove: boolean }>(\n ({ theme: { base }, isSmallOrAbove }) => {\n return css`\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: calc(${base.spacing} * 3);\n width: 100%;\n\n ${isSmallOrAbove &&\n css`\n grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));\n align-items: start;\n `}\n\n ${!isSmallOrAbove &&\n css`\n padding-inline: calc(${base.spacing} * 0.5);\n `}\n `;\n }\n);\n\nStyledShortcutsCategoriesContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCategoryHeading = styled(Text)(({ theme: { base } }) => {\n return css`\n margin-block-end: ${base.spacing};\n `;\n});\n\nStyledShortcutsCategoryHeading.defaultProps = defaultThemeProp;\n\nexport const StyledCategoryItemIcon = styled(Icon)`\n flex-shrink: 0;\n`;\n\nStyledCategoryItemIcon.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const getShortcutsTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["list", "emptyState", "categorySection", "categoryHeading"]>;
|
|
2
|
+
//# sourceMappingURL=Shortcuts.test-ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,iMAKrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.test-ids.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,WAAW,EAAE;IAC5D,MAAM;IACN,YAAY;IACZ,iBAAiB;IACjB,iBAAiB;CACT,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getShortcutsTestIds = createTestIds('shortcuts', [\n 'list',\n 'emptyState',\n 'categorySection',\n 'categoryHeading'\n] as const);\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ReactNode, Ref } from 'react';
|
|
2
|
+
import type { NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';
|
|
3
|
+
interface ShortcutItemBase {
|
|
4
|
+
/** Unique identifier for this shortcut. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Display label shown on the shortcut. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Icon name from the registered icon set. */
|
|
9
|
+
icon: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ShortcutLinkItem extends ShortcutItemBase {
|
|
12
|
+
/** Discriminant — this item navigates to an external URL. */
|
|
13
|
+
type: 'external';
|
|
14
|
+
/** Absolute URL the link navigates to. Opens in a new tab. */
|
|
15
|
+
href: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional preview content rendered inside the card (e.g. an Open Graph preview card).
|
|
18
|
+
* Only rendered in `card` display mode — ignored in links mode.
|
|
19
|
+
*/
|
|
20
|
+
preview?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export interface ShortcutNavItem extends ShortcutItemBase {
|
|
23
|
+
/** Discriminant — this item navigates to a portal landing page. */
|
|
24
|
+
type: 'page';
|
|
25
|
+
/** Callback invoked when the user activates this shortcut. */
|
|
26
|
+
onClick: () => void;
|
|
27
|
+
}
|
|
28
|
+
export type ShortcutItem = ShortcutLinkItem | ShortcutNavItem;
|
|
29
|
+
export interface ShortcutCategory {
|
|
30
|
+
/** Unique identifier for this category. */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Display label shown as the category heading. */
|
|
33
|
+
label: string;
|
|
34
|
+
/** Shortcut items belonging to this category. */
|
|
35
|
+
items: ShortcutItem[];
|
|
36
|
+
}
|
|
37
|
+
interface ShortcutsWithItems {
|
|
38
|
+
/** Resolved shortcut items to render. */
|
|
39
|
+
items?: ShortcutItem[];
|
|
40
|
+
categories?: never;
|
|
41
|
+
/** Whether to render each item as an individual card or all items as links inside a single card. */
|
|
42
|
+
displayMode?: 'card' | 'links';
|
|
43
|
+
/**
|
|
44
|
+
* Cards display mode only — whether to render the outer card shell with a heading.
|
|
45
|
+
* When `false`, only the card grid is rendered, centered within its container.
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showHeader?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface ShortcutsWithCategories {
|
|
51
|
+
items?: never;
|
|
52
|
+
/**
|
|
53
|
+
* Grouped shortcut items.
|
|
54
|
+
*/
|
|
55
|
+
categories: ShortcutCategory[];
|
|
56
|
+
/** Whether to render each category's items as cards or links. Defaults to `'links'`. */
|
|
57
|
+
displayMode?: 'card' | 'links';
|
|
58
|
+
/** Not applicable for categorized mode — the outer card heading is always shown. */
|
|
59
|
+
showHeader?: never;
|
|
60
|
+
}
|
|
61
|
+
interface ShortcutsBaseProps extends NoChildrenProp, TestIdProp {
|
|
62
|
+
/** Heading displayed above the shortcuts. */
|
|
63
|
+
heading?: string;
|
|
64
|
+
/** Ref for the Shortcuts root card element. */
|
|
65
|
+
ref?: Ref<HTMLDivElement>;
|
|
66
|
+
}
|
|
67
|
+
export type ShortcutsProps = ShortcutsBaseProps & (ShortcutsWithItems | ShortcutsWithCategories);
|
|
68
|
+
export {};
|
|
69
|
+
//# sourceMappingURL=Shortcuts.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.types.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EA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FAAoF;IACpF,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;AAED,UAAU,kBAAmB,SAAQ,cAAc,EAAE,UAAU;IAC7D,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,CAAC,kBAAkB,GAAG,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Shortcuts.types.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';\n\ninterface ShortcutItemBase {\n /** Unique identifier for this shortcut. */\n id: string;\n /** Display label shown on the shortcut. */\n label: string;\n /** Icon name from the registered icon set. */\n icon: string;\n}\n\nexport interface ShortcutLinkItem extends ShortcutItemBase {\n /** Discriminant — this item navigates to an external URL. */\n type: 'external';\n /** Absolute URL the link navigates to. Opens in a new tab. */\n href: string;\n /**\n * Optional preview content rendered inside the card (e.g. an Open Graph preview card).\n * Only rendered in `card` display mode — ignored in links mode.\n */\n preview?: ReactNode;\n}\n\nexport interface ShortcutNavItem extends ShortcutItemBase {\n /** Discriminant — this item navigates to a portal landing page. */\n type: 'page';\n /** Callback invoked when the user activates this shortcut. */\n onClick: () => void;\n}\n\nexport type ShortcutItem = ShortcutLinkItem | ShortcutNavItem;\n\nexport interface ShortcutCategory {\n /** Unique identifier for this category. */\n id: string;\n /** Display label shown as the category heading. */\n label: string;\n /** Shortcut items belonging to this category. */\n items: ShortcutItem[];\n}\n\ninterface ShortcutsWithItems {\n /** Resolved shortcut items to render. */\n items?: ShortcutItem[];\n categories?: never;\n /** Whether to render each item as an individual card or all items as links inside a single card. */\n displayMode?: 'card' | 'links';\n /**\n * Cards display mode only — whether to render the outer card shell with a heading.\n * When `false`, only the card grid is rendered, centered within its container.\n * @default true\n */\n showHeader?: boolean;\n}\n\ninterface ShortcutsWithCategories {\n items?: never;\n /**\n * Grouped shortcut items.\n */\n categories: ShortcutCategory[];\n /** Whether to render each category's items as cards or links. Defaults to `'links'`. */\n displayMode?: 'card' | 'links';\n /** Not applicable for categorized mode — the outer card heading is always shown. */\n showHeader?: never;\n}\n\ninterface ShortcutsBaseProps extends NoChildrenProp, TestIdProp {\n /** Heading displayed above the shortcuts. */\n heading?: string;\n /** Ref for the Shortcuts root card element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport type ShortcutsProps = ShortcutsBaseProps & (ShortcutsWithItems | ShortcutsWithCategories);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,YAAY,EACV,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EACjB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { default } from './Shortcuts';\nexport type {\n ShortcutsProps,\n ShortcutItem,\n ShortcutLinkItem,\n ShortcutNavItem,\n ShortcutCategory\n} from './Shortcuts.types';\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export { default as Predictions } from './components/Predictions';
|
|
|
31
31
|
export * from './components/Predictions';
|
|
32
32
|
export { default as SearchResults } from './components/SearchResults';
|
|
33
33
|
export * from './components/SearchResults';
|
|
34
|
+
export { default as Shortcuts } from './components/Shortcuts';
|
|
35
|
+
export * from './components/Shortcuts';
|
|
34
36
|
export { default as Stages } from './components/Stages';
|
|
35
37
|
export * from './components/Stages';
|
|
36
38
|
export { default as Stakeholders } from './components/Stakeholders';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI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AAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -32,6 +32,8 @@ export { default as Predictions } from './components/Predictions';
|
|
|
32
32
|
export * from './components/Predictions';
|
|
33
33
|
export { default as SearchResults } from './components/SearchResults';
|
|
34
34
|
export * from './components/SearchResults';
|
|
35
|
+
export { default as Shortcuts } from './components/Shortcuts';
|
|
36
|
+
export * from './components/Shortcuts';
|
|
35
37
|
export { default as Stages } from './components/Stages';
|
|
36
38
|
export * from './components/Stages';
|
|
37
39
|
export { default as Stakeholders } from './components/Stakeholders';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;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,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CaseHierarchy } from './components/CaseHierarchy';\nexport * from './components/CaseHierarchy';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as GenAICoach } from './components/GenAICoach';\nexport * from './components/GenAICoach';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as HierarchicalAssignments } from './components/HierarchicalAssignments';\nexport * from './components/HierarchicalAssignments';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as UtilitiesLayout } from './components/UtilitiesLayout';\nexport * from './components/UtilitiesLayout';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,YAAY,EA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e,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CaseHierarchy } from './components/CaseHierarchy';\nexport * from './components/CaseHierarchy';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as GenAICoach } from './components/GenAICoach';\nexport * from './components/GenAICoach';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as HierarchicalAssignments } from './components/HierarchicalAssignments';\nexport * from './components/HierarchicalAssignments';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Shortcuts } from './components/Shortcuts';\nexport * from './components/Shortcuts';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as UtilitiesLayout } from './components/UtilitiesLayout';\nexport * from './components/UtilitiesLayout';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-work",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.23",
|
|
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.29.
|
|
18
|
-
"@pega/cosmos-react-rte": "9.0.0-build.29.
|
|
17
|
+
"@pega/cosmos-react-core": "9.0.0-build.29.23",
|
|
18
|
+
"@pega/cosmos-react-rte": "9.0.0-build.29.23",
|
|
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",
|