@pega/cosmos-react-work 10.0.0-build.11.0 → 10.0.0-build.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/lib/components/{Shortcuts/Shortcuts.d.ts → QuickActions/QuickActions.d.ts} +3 -3
  2. package/lib/components/QuickActions/QuickActions.d.ts.map +1 -0
  3. package/lib/components/{Shortcuts/Shortcuts.js → QuickActions/QuickActions.js} +20 -19
  4. package/lib/components/QuickActions/QuickActions.js.map +1 -0
  5. package/lib/components/{Shortcuts/Shortcuts.styles.d.ts → QuickActions/QuickActions.styles.d.ts} +11 -1
  6. package/lib/components/QuickActions/QuickActions.styles.d.ts.map +1 -0
  7. package/lib/components/{Shortcuts/Shortcuts.styles.js → QuickActions/QuickActions.styles.js} +36 -6
  8. package/lib/components/QuickActions/QuickActions.styles.js.map +1 -0
  9. package/lib/components/{Shortcuts/Shortcuts.test-ids.d.ts → QuickActions/QuickActions.test-ids.d.ts} +1 -1
  10. package/lib/components/QuickActions/QuickActions.test-ids.d.ts.map +1 -0
  11. package/lib/components/{Shortcuts/Shortcuts.test-ids.js → QuickActions/QuickActions.test-ids.js} +1 -1
  12. package/lib/components/QuickActions/QuickActions.test-ids.js.map +1 -0
  13. package/lib/components/QuickActions/QuickActions.types.d.ts +70 -0
  14. package/lib/components/QuickActions/QuickActions.types.d.ts.map +1 -0
  15. package/lib/components/QuickActions/QuickActions.types.js +2 -0
  16. package/lib/components/QuickActions/QuickActions.types.js.map +1 -0
  17. package/lib/components/QuickActions/index.d.ts +3 -0
  18. package/lib/components/QuickActions/index.d.ts.map +1 -0
  19. package/lib/components/QuickActions/index.js +2 -0
  20. package/lib/components/QuickActions/index.js.map +1 -0
  21. package/lib/index.d.ts +2 -2
  22. package/lib/index.d.ts.map +1 -1
  23. package/lib/index.js +2 -2
  24. package/lib/index.js.map +1 -1
  25. package/package.json +3 -3
  26. package/lib/components/Shortcuts/Shortcuts.d.ts.map +0 -1
  27. package/lib/components/Shortcuts/Shortcuts.js.map +0 -1
  28. package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +0 -1
  29. package/lib/components/Shortcuts/Shortcuts.styles.js.map +0 -1
  30. package/lib/components/Shortcuts/Shortcuts.test-ids.d.ts.map +0 -1
  31. package/lib/components/Shortcuts/Shortcuts.test-ids.js.map +0 -1
  32. package/lib/components/Shortcuts/Shortcuts.types.d.ts +0 -80
  33. package/lib/components/Shortcuts/Shortcuts.types.d.ts.map +0 -1
  34. package/lib/components/Shortcuts/Shortcuts.types.js +0 -2
  35. package/lib/components/Shortcuts/Shortcuts.types.js.map +0 -1
  36. package/lib/components/Shortcuts/index.d.ts +0 -3
  37. package/lib/components/Shortcuts/index.d.ts.map +0 -1
  38. package/lib/components/Shortcuts/index.js +0 -2
  39. package/lib/components/Shortcuts/index.js.map +0 -1
@@ -1,7 +1,7 @@
1
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>> & {
2
+ import type { QuickActionsProps } from './QuickActions.types';
3
+ declare const _default: import("react").ForwardRefExoticComponent<PropsWithoutRef<QuickActionsProps> & import("react").RefAttributes<HTMLDivElement>> & {
4
4
  getTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["list", "empty-state", "category-section", "category-heading", "show-more-less"]>;
5
5
  };
6
6
  export default _default;
7
- //# sourceMappingURL=Shortcuts.d.ts.map
7
+ //# sourceMappingURL=QuickActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.d.ts","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,eAAe,EAAE,MAAM,OAAO,CAAC;AA0BxD,OAAO,KAAK,EAAE,iBAAiB,EAAmB,MAAM,sBAAsB,CAAC;;;;AAgR/E,wBAA8D"}
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useRef, forwardRef, useState } from 'react';
3
3
  import { calculateForegroundColor, Button, Card, CardContent, CardFooter, CardHeader, EmptyState, Flex, Text, VisuallyHiddenText, readableColor, registerIcon, isSolidColor, useArrows, useI18n, usePrevious, useTestIds, useTheme, createClassName, withTestIds } from '@pega/cosmos-react-core';
4
4
  import * as openNewTabIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';
5
- import { StyledExternalIcon, StyledLabelRow, StyledShortcutsCard, StyledShortcutsCardButton, StyledShortcutsCardsContainer, StyledShortcutsCardsWrapper, StyledShortcutsCategoriesContainer, StyledShortcutsCategoryHeading, StyledShortcutsCardIcon, StyledShortcutImageContainer, StyledShortcutImg, StyledSubtitleText, StyledText, StyledTextContent, StyledCardContentWrapper } from './Shortcuts.styles';
6
- import { getShortcutsTestIds } from './Shortcuts.test-ids';
5
+ import { StyledExternalIcon, StyledLabelRow, StyledShortcutsCard, StyledShortcutsCardButton, StyledInteractiveShortcutsCardButton, StyledShortcutsCardsContainer, StyledShortcutsCardsWrapper, StyledShortcutsCategoriesContainer, StyledShortcutsCategoryHeading, StyledShortcutsCardIcon, StyledShortcutImageContainer, StyledShortcutImg, StyledSubtitleText, StyledText, StyledTextContent, StyledCardContentWrapper } from './QuickActions.styles';
6
+ import { getShortcutsTestIds } from './QuickActions.test-ids';
7
7
  registerIcon(openNewTabIcon);
8
8
  const itemLinkProps = (item) => {
9
9
  if (item.type === 'external') {
@@ -11,33 +11,34 @@ const itemLinkProps = (item) => {
11
11
  }
12
12
  return { onClick: item.onClick };
13
13
  };
14
- const CardItem = ({ item, variant }) => {
14
+ const CardItem = ({ item, variant, interactive }) => {
15
15
  const theme = useTheme();
16
16
  const { components: { card, shortcuts: { icon: { background: configuredIconBackground, foreground: configuredIconForeground } } } } = theme;
17
17
  const cardClassName = createClassName('shortcuts-card', item.className);
18
- const isLink = item.type === 'external';
19
- const image = isLink ? item.image : undefined;
20
- const description = isLink ? item.description : undefined;
18
+ const image = item.image;
19
+ const description = item.description;
20
+ const icon = item.icon;
21
21
  const [isBrokenImage, setIsBrokenImage] = useState(false);
22
22
  const prevImage = usePrevious(image);
23
- const iconBackground = configuredIconBackground;
23
+ const iconBackground = icon?.background ?? configuredIconBackground;
24
24
  const withIconBackground = Boolean(isSolidColor(iconBackground));
25
25
  const cardForeground = calculateForegroundColor(card.background, card['foreground-color'], theme);
26
- let iconForeground = configuredIconForeground;
27
- if (configuredIconForeground === 'auto') {
26
+ let iconForeground = icon?.background ? 'auto' : configuredIconForeground;
27
+ if (iconForeground === 'auto') {
28
28
  iconForeground = withIconBackground
29
29
  ? readableColor(iconBackground, { mode: 'light', level: 'AANonText' })
30
30
  : cardForeground;
31
31
  }
32
32
  const showImage = Boolean(image) && !(isBrokenImage && image === prevImage);
33
- const commonIconProps = {
34
- name: item.icon
35
- };
36
- const iconVisual = withIconBackground ? (_jsx(StyledShortcutsCardIcon, { ...commonIconProps, background: iconBackground, foreground: iconForeground })) : (_jsx(StyledShortcutsCardIcon, { ...commonIconProps, iconColor: iconForeground, size: 'm' }));
33
+ const CardButton = interactive ? StyledInteractiveShortcutsCardButton : StyledShortcutsCardButton;
34
+ let iconVisual = null;
35
+ if (icon) {
36
+ iconVisual = withIconBackground ? (_jsx(StyledShortcutsCardIcon, { name: icon.name, background: iconBackground, foreground: iconForeground })) : (_jsx(StyledShortcutsCardIcon, { name: icon.name, iconColor: iconForeground, size: 'm' }));
37
+ }
37
38
  const visual = showImage ? (_jsx(Flex, { container: { alignItems: 'center', justify: 'center' }, as: StyledShortcutImageContainer, children: _jsx(StyledShortcutImg, { src: image, alt: item.label, onError: () => setIsBrokenImage(true), onLoad: () => setIsBrokenImage(false) }) })) : (iconVisual);
38
- return (_jsx(StyledShortcutsCard, { className: cardClassName, children: _jsx(StyledShortcutsCardButton, { variant: 'link', layoutVariant: variant, ...itemLinkProps(item), children: _jsxs(StyledCardContentWrapper, { layoutVariant: variant, hasDescription: !!description, children: [visual, _jsxs(Flex, { container: { direction: 'column', gap: 0.5 }, as: StyledTextContent, layoutVariant: variant, children: [_jsxs(StyledLabelRow, { children: [_jsx(StyledText, { children: item.label }), item.type === 'external' && _jsx(StyledExternalIcon, { name: 'open' })] }), description && (_jsx(StyledSubtitleText, { variant: 'secondary', forwardedAs: 'p', children: description }))] })] }) }) }));
39
+ return (_jsx(StyledShortcutsCard, { className: cardClassName, children: _jsx(CardButton, { variant: 'link', layoutVariant: variant, ...itemLinkProps(item), children: _jsxs(StyledCardContentWrapper, { layoutVariant: variant, hasDescription: !!description, children: [visual, _jsxs(Flex, { container: { direction: 'column', gap: 0.5 }, as: StyledTextContent, layoutVariant: variant, children: [_jsxs(StyledLabelRow, { children: [_jsx(StyledText, { children: item.label }), (item.type === 'external' || item.showExternalIcon) && (_jsx(StyledExternalIcon, { name: 'open' }))] }), description && (_jsx(StyledSubtitleText, { variant: 'secondary', forwardedAs: 'p', children: description }))] })] }) }) }));
39
40
  };
40
- const Shortcuts = forwardRef(function Shortcuts({ heading, className, items = [], categories, showHeader = true, variant = 'inline', count, onExpandToggle, testId, ...restProps }, ref) {
41
+ const QuickActions = forwardRef(function QuickActions({ heading, className, items = [], categories, showHeader = true, variant = 'inline', cardsPerRow, interactiveCards = false, count, onExpandToggle, testId, ...restProps }, ref) {
41
42
  const t = useI18n();
42
43
  const testIds = useTestIds(testId, getShortcutsTestIds);
43
44
  const rootClassName = createClassName('shortcuts', className);
@@ -54,10 +55,10 @@ const Shortcuts = forwardRef(function Shortcuts({ heading, className, items = []
54
55
  const withCardShell = (content) => (_jsxs(Card, { ...restProps, className: rootClassName, "data-testid": testIds.root, ref: ref, children: [_jsx(CardHeader, { children: _jsx(Text, { variant: 'h2', children: heading ?? t('shortcuts') }) }), _jsx(CardContent, { children: content }), expandToggle && _jsx(CardFooter, { justify: 'center', children: expandToggle })] }));
55
56
  if (categories) {
56
57
  const visibleCategories = categories.filter(cat => cat.items.length > 0);
57
- const categorySections = (_jsx(StyledShortcutsCategoriesContainer, { ref: categoriesContainerRef, 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, { role: 'list', "aria-label": cat.label, itemCount: cat.items.length, children: cat.items.map(item => (_jsx(CardItem, { item: item, variant: variant }, item.id))) })] }, cat.id))) }));
58
+ const categorySections = (_jsx(StyledShortcutsCategoriesContainer, { ref: categoriesContainerRef, children: visibleCategories.map(cat => (_jsxs(Flex, { container: { direction: 'column' }, "aria-labelledby": cat.label ? `cat-${cat.id}` : undefined, "data-testid": testIds.categorySection, as: 'section', children: [cat.label && (_jsx(StyledShortcutsCategoryHeading, { id: `cat-${cat.id}`, "data-testid": testIds.categoryHeading, variant: 'h3', children: cat.label })), _jsx(StyledShortcutsCardsContainer, { role: 'list', "aria-label": cat.label, itemCount: cat.items.length, cardsPerRow: cardsPerRow, children: cat.items.map(item => (_jsx(CardItem, { item: item, variant: variant, interactive: interactiveCards }, item.id))) })] }, cat.id))) }));
58
59
  return withCardShell(visibleCategories.length === 0 ? emptyState : categorySections);
59
60
  }
60
- const cardGrid = (_jsx(StyledShortcutsCardsWrapper, { children: _jsx(StyledShortcutsCardsContainer, { ref: flatListRef, role: 'list', "data-testid": testIds.list, "aria-label": heading ?? t('shortcuts'), itemCount: items.length, children: items.map(item => (_jsx(CardItem, { item: item, variant: variant }, item.id))) }) }));
61
+ const cardGrid = (_jsx(StyledShortcutsCardsWrapper, { children: _jsx(StyledShortcutsCardsContainer, { ref: flatListRef, role: 'list', "data-testid": testIds.list, "aria-label": heading ?? t('shortcuts'), itemCount: items.length, cardsPerRow: cardsPerRow, children: items.map(item => (_jsx(CardItem, { item: item, variant: variant, interactive: interactiveCards }, item.id))) }) }));
61
62
  if (!showHeader) {
62
63
  if (items.length === 0)
63
64
  return null;
@@ -65,5 +66,5 @@ const Shortcuts = forwardRef(function Shortcuts({ heading, className, items = []
65
66
  }
66
67
  return withCardShell(items.length === 0 ? emptyState : cardGrid);
67
68
  });
68
- export default withTestIds(Shortcuts, getShortcutsTestIds);
69
- //# sourceMappingURL=Shortcuts.js.map
69
+ export default withTestIds(QuickActions, getShortcutsTestIds);
70
+ //# sourceMappingURL=QuickActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.js","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EACL,wBAAwB,EACxB,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,OAAO,EACP,WAAW,EACX,UAAU,EACV,QAAQ,EACR,eAAe,EACf,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,cAAc,MAAM,6DAA6D,CAAC;AAG9F,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,EACzB,oCAAoC,EACpC,6BAA6B,EAC7B,2BAA2B,EAC3B,kCAAkC,EAClC,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,YAAY,CAAC,cAAc,CAAC,CAAC;AAE7B,MAAM,aAAa,GAAG,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C;AACnE,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { useRef, forwardRef, useState } from 'react';\nimport type { ReactNode, PropsWithoutRef } from 'react';\n\nimport {\n calculateForegroundColor,\n Button,\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n EmptyState,\n Flex,\n Text,\n VisuallyHiddenText,\n readableColor,\n registerIcon,\n isSolidColor,\n useArrows,\n useI18n,\n usePrevious,\n useTestIds,\n useTheme,\n createClassName,\n withTestIds\n} from '@pega/cosmos-react-core';\nimport * as openNewTabIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';\n\nimport type { QuickActionsProps, QuickActionItem } from './QuickActions.types';\nimport {\n StyledExternalIcon,\n StyledLabelRow,\n StyledShortcutsCard,\n StyledShortcutsCardButton,\n StyledInteractiveShortcutsCardButton,\n StyledShortcutsCardsContainer,\n StyledShortcutsCardsWrapper,\n StyledShortcutsCategoriesContainer,\n StyledShortcutsCategoryHeading,\n StyledShortcutsCardIcon,\n StyledShortcutImageContainer,\n StyledShortcutImg,\n StyledSubtitleText,\n StyledText,\n StyledTextContent,\n StyledCardContentWrapper\n} from './QuickActions.styles';\nimport { getShortcutsTestIds } from './QuickActions.test-ids';\n\nregisterIcon(openNewTabIcon);\n\nconst itemLinkProps = (\n item: QuickActionItem\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 CardItem = ({\n item,\n variant,\n interactive\n}: {\n item: QuickActionItem;\n variant: 'stacked' | 'inline';\n interactive: boolean;\n}) => {\n const theme = useTheme();\n const {\n components: {\n card,\n shortcuts: {\n icon: { background: configuredIconBackground, foreground: configuredIconForeground }\n }\n }\n } = theme;\n\n const cardClassName = createClassName('shortcuts-card', item.className);\n\n const image = item.image;\n const description = item.description;\n const icon = item.icon;\n\n const [isBrokenImage, setIsBrokenImage] = useState(false);\n const prevImage = usePrevious(image);\n\n const iconBackground = icon?.background ?? configuredIconBackground;\n const withIconBackground = Boolean(isSolidColor(iconBackground));\n\n const cardForeground = calculateForegroundColor(card.background, card['foreground-color'], theme);\n let iconForeground = icon?.background ? 'auto' : configuredIconForeground;\n\n if (iconForeground === 'auto') {\n iconForeground = withIconBackground\n ? readableColor(iconBackground, { mode: 'light', level: 'AANonText' })\n : cardForeground;\n }\n\n const showImage = Boolean(image) && !(isBrokenImage && image === prevImage);\n\n const CardButton = interactive ? StyledInteractiveShortcutsCardButton : StyledShortcutsCardButton;\n\n let iconVisual: ReactNode = null;\n\n if (icon) {\n iconVisual = withIconBackground ? (\n <StyledShortcutsCardIcon\n name={icon.name}\n background={iconBackground}\n foreground={iconForeground}\n />\n ) : (\n <StyledShortcutsCardIcon name={icon.name} iconColor={iconForeground} size='m' />\n );\n }\n\n const visual = showImage ? (\n <Flex container={{ alignItems: 'center', justify: 'center' }} as={StyledShortcutImageContainer}>\n <StyledShortcutImg\n src={image}\n alt={item.label}\n onError={() => setIsBrokenImage(true)}\n onLoad={() => setIsBrokenImage(false)}\n />\n </Flex>\n ) : (\n iconVisual\n );\n\n return (\n <StyledShortcutsCard className={cardClassName}>\n <CardButton variant='link' layoutVariant={variant} {...itemLinkProps(item)}>\n <StyledCardContentWrapper layoutVariant={variant} hasDescription={!!description}>\n {visual}\n <Flex\n container={{ direction: 'column', gap: 0.5 }}\n as={StyledTextContent}\n layoutVariant={variant}\n >\n <StyledLabelRow>\n <StyledText>{item.label}</StyledText>\n {(item.type === 'external' || item.showExternalIcon) && (\n <StyledExternalIcon name='open' />\n )}\n </StyledLabelRow>\n\n {description && (\n <StyledSubtitleText variant='secondary' forwardedAs='p'>\n {description}\n </StyledSubtitleText>\n )}\n </Flex>\n </StyledCardContentWrapper>\n </CardButton>\n </StyledShortcutsCard>\n );\n};\n\nconst QuickActions = forwardRef(function QuickActions(\n {\n heading,\n className,\n items = [],\n categories,\n showHeader = true,\n variant = 'inline',\n cardsPerRow,\n interactiveCards = false,\n count,\n onExpandToggle,\n testId,\n ...restProps\n }: PropsWithoutRef<QuickActionsProps>,\n ref: QuickActionsProps['ref']\n) {\n const t = useI18n();\n const testIds = useTestIds(testId, getShortcutsTestIds);\n\n const rootClassName = createClassName('shortcuts', className);\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 renderedItemCount = categories\n ? categories.reduce((total, cat) => total + cat.items.length, 0)\n : items.length;\n const hasMore = count !== undefined && count > renderedItemCount;\n\n const expandToggle =\n onExpandToggle && count !== undefined ? (\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 emptyState = <EmptyState message={t('no_items')} data-testid={testIds.emptyState} />;\n\n const withCardShell = (content: ReactNode) => (\n <Card {...restProps} className={rootClassName} data-testid={testIds.root} ref={ref}>\n <CardHeader>\n <Text variant='h2'>{heading ?? t('shortcuts')}</Text>\n </CardHeader>\n <CardContent>{content}</CardContent>\n {expandToggle && <CardFooter justify='center'>{expandToggle}</CardFooter>}\n </Card>\n );\n\n if (categories) {\n const visibleCategories = categories.filter(cat => cat.items.length > 0);\n\n const categorySections = (\n <StyledShortcutsCategoriesContainer ref={categoriesContainerRef}>\n {visibleCategories.map(cat => (\n <Flex\n container={{ direction: 'column' }}\n key={cat.id}\n aria-labelledby={cat.label ? `cat-${cat.id}` : undefined}\n data-testid={testIds.categorySection}\n as='section'\n >\n {cat.label && (\n <StyledShortcutsCategoryHeading\n id={`cat-${cat.id}`}\n data-testid={testIds.categoryHeading}\n variant='h3'\n >\n {cat.label}\n </StyledShortcutsCategoryHeading>\n )}\n\n <StyledShortcutsCardsContainer\n role='list'\n aria-label={cat.label}\n itemCount={cat.items.length}\n cardsPerRow={cardsPerRow}\n >\n {cat.items.map(item => (\n <CardItem\n key={item.id}\n item={item}\n variant={variant}\n interactive={interactiveCards}\n />\n ))}\n </StyledShortcutsCardsContainer>\n </Flex>\n ))}\n </StyledShortcutsCategoriesContainer>\n );\n\n return withCardShell(visibleCategories.length === 0 ? emptyState : categorySections);\n }\n\n const cardGrid = (\n <StyledShortcutsCardsWrapper>\n <StyledShortcutsCardsContainer\n ref={flatListRef}\n role='list'\n data-testid={testIds.list}\n aria-label={heading ?? t('shortcuts')}\n itemCount={items.length}\n cardsPerRow={cardsPerRow}\n >\n {items.map(item => (\n <CardItem key={item.id} item={item} variant={variant} interactive={interactiveCards} />\n ))}\n </StyledShortcutsCardsContainer>\n </StyledShortcutsCardsWrapper>\n );\n\n if (!showHeader) {\n if (items.length === 0) return null;\n\n return (\n <div className={rootClassName} data-testid={testIds.root} {...restProps} ref={ref}>\n <VisuallyHiddenText>{heading ?? t('shortcuts')}</VisuallyHiddenText>\n {cardGrid}\n {expandToggle && <Flex container={{ justify: 'center' }}>{expandToggle}</Flex>}\n </div>\n );\n }\n\n return withCardShell(items.length === 0 ? emptyState : cardGrid);\n});\n\nexport default withTestIds(QuickActions, getShortcutsTestIds);\n"]}
@@ -1,6 +1,7 @@
1
1
  export declare const StyledShortcutsCardsWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
2
  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>, {
3
3
  itemCount: number;
4
+ cardsPerRow?: number;
4
5
  }>> & string;
5
6
  export declare const StyledShortcutsCategoriesContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
7
  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"> & {
@@ -30,4 +31,13 @@ export declare const StyledCardContentWrapper: import("styled-components/dist/ty
30
31
  layoutVariant: "stacked" | "inline";
31
32
  hasDescription: boolean;
32
33
  }>> & string;
33
- //# sourceMappingURL=Shortcuts.styles.d.ts.map
34
+ /**
35
+ * The interactive card style, layered on top of the default card: equal padding and
36
+ * top-aligned content, a 44px icon container, and text shorter than the icon centered against it.
37
+ */
38
+ export declare const StyledInteractiveShortcutsCardButton: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<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"> & {
39
+ 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;
40
+ }, "layoutVariant"> & {
41
+ layoutVariant: "stacked" | "inline";
42
+ }, never>> & string;
43
+ //# sourceMappingURL=QuickActions.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.styles.d.ts","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,2BAA2B,6NAEvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;eAA0B,MAAM;kBAAgB,MAAM;YA0B/F,CAAC;AAIF,eAAO,MAAM,kCAAkC,6NAS9C,CAAC;AAIF,eAAO,MAAM,8BAA8B;;yLAIzC,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAG/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,SAAS,GAAG,QAAQ;YAehF,CAAC;AAIF,eAAO,MAAM,UAAU,+NAOtB,CAAC;AAIF,eAAO,MAAM,kBAAkB;;yLAK9B,CAAC;AAIF,eAAO,MAAM,yBAAyB;;;mBACrB,SAAS,GAAG,QAAQ;oLA4BnC,CAAC;AAIH,eAAO,MAAM,uBAAuB;gBACtB,MAAM;0JAUnB,CAAC;AAIF,eAAO,MAAM,cAAc,+NAM1B,CAAC;AAIF,eAAO,MAAM,kBAAkB,kaAE9B,CAAC;AAIF,eAAO,MAAM,4BAA4B,+NAaxC,CAAC;AAIF,eAAO,MAAM,iBAAiB,oOAK7B,CAAC;AAIF,eAAO,MAAM,wBAAwB;mBACpB,SAAS,GAAG,QAAQ;oBACnB,OAAO;YAsBxB,CAAC;AAIF;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;mBAzHhC,SAAS,GAAG,QAAQ;mBAoJpC,CAAC"}
@@ -5,7 +5,8 @@ import { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';
5
5
  export const StyledShortcutsCardsWrapper = styled.div `
6
6
  container-type: inline-size;
7
7
  `;
8
- export const StyledShortcutsCardsContainer = styled.ul(({ theme: { base }, itemCount }) => {
8
+ export const StyledShortcutsCardsContainer = styled.ul(({ theme: { base }, itemCount, cardsPerRow }) => {
9
+ const mediumColumns = cardsPerRow ?? (itemCount === 1 ? 2 : Math.min(Math.max(itemCount, 1), 4));
9
10
  return css `
10
11
  display: grid;
11
12
  grid-template-columns: repeat(auto-fill, minmax(min(calc(${base.spacing} * 30), 100%), 1fr));
@@ -15,7 +16,7 @@ export const StyledShortcutsCardsContainer = styled.ul(({ theme: { base }, itemC
15
16
  margin: 0;
16
17
 
17
18
  @container (min-width: ${parseFloat(base.breakpoints.sm)}rem) {
18
- grid-template-columns: repeat(2, minmax(12.5rem, 1fr));
19
+ grid-template-columns: repeat(${Math.min(cardsPerRow ?? 2, 2)}, minmax(12.5rem, 1fr));
19
20
  grid-auto-rows: 1fr;
20
21
  justify-content: start;
21
22
  align-items: stretch;
@@ -23,9 +24,7 @@ export const StyledShortcutsCardsContainer = styled.ul(({ theme: { base }, itemC
23
24
  }
24
25
 
25
26
  @container (min-width: ${parseFloat(base.breakpoints.md)}rem) {
26
- grid-template-columns: ${itemCount === 1
27
- ? 'repeat(2, minmax(12.5rem, 1fr))'
28
- : `repeat(${Math.min(Math.max(itemCount, 1), 4)}, minmax(12.5rem, 1fr))`};
27
+ grid-template-columns: repeat(${mediumColumns}, minmax(12.5rem, 1fr));
29
28
  }
30
29
  `;
31
30
  });
@@ -157,4 +156,35 @@ export const StyledCardContentWrapper = styled.div(({ layoutVariant, hasDescript
157
156
  `}
158
157
  `);
159
158
  StyledCardContentWrapper.defaultProps = defaultThemeProp;
160
- //# sourceMappingURL=Shortcuts.styles.js.map
159
+ /**
160
+ * The interactive card style, layered on top of the default card: equal padding and
161
+ * top-aligned content, a 44px icon container, and text shorter than the icon centered against it.
162
+ */
163
+ export const StyledInteractiveShortcutsCardButton = styled(StyledShortcutsCardButton)(({ theme: { base }, layoutVariant }) => css `
164
+ align-items: flex-start;
165
+ padding: calc(${base.spacing} * 1.5);
166
+
167
+ div${StyledShortcutsCardIcon}, ${StyledShortcutImageContainer} {
168
+ width: ${base['hit-area'].finger};
169
+ height: ${base['hit-area'].finger};
170
+ }
171
+
172
+ ${layoutVariant === 'inline'
173
+ ? css `
174
+ ${StyledCardContentWrapper} {
175
+ align-items: flex-start;
176
+ }
177
+
178
+ ${StyledTextContent}:not(:first-child) {
179
+ min-height: ${base['hit-area'].finger};
180
+ justify-content: center;
181
+ }
182
+ `
183
+ : css `
184
+ ${StyledCardContentWrapper} {
185
+ justify-content: flex-start;
186
+ }
187
+ `}
188
+ `);
189
+ StyledInteractiveShortcutsCardButton.defaultProps = defaultThemeProp;
190
+ //# sourceMappingURL=QuickActions.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.styles.js","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.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,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAC;AAEtE,MAAM,CAAC,MAAM,2BAA2B,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEpD,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC,EAAE,CACpD,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,EAAE;IAC9C,MAAM,aAAa,GACjB,WAAW,IAAI,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE7E,OAAO,GAAG,CAAA;;iEAEmD,IAAI,CAAC,OAAO;aAChE,IAAI,CAAC,OAAO;;iBAER,IAAI,CAAC,OAAO;;;+BAGE,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;wCACtB,IAAI,CAAC,GAAG,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,CAAC;;;;;;;+BAOtC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;wCACtB,aAAa;;KAEhD,CAAC;AACJ,CAA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;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,MAAM,CAAC,yBAAyB,CAAC,CACnF,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;oBAEzB,IAAI,CAAC,OAAO;;SAEvB,uBAAuB,KAAK,4BAA4B;eAClD,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM;gBACtB,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM;;;MAGjC,aAAa,KAAK,QAAQ;IAC1B,CAAC,CAAC,GAAG,CAAA;YACC,wBAAwB;;;;YAIxB,iBAAiB;0BACH,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM;;;SAGxC;IACH,CAAC,CAAC,GAAG,CAAA;YACC,wBAAwB;;;SAG3B;GACN,CACF,CAAC;AAEF,oCAAoC,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport { Button, defaultThemeProp, Icon, Text, tryCatch } from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\n\nexport const StyledShortcutsCardsWrapper = styled.div`\n container-type: inline-size;\n`;\n\nexport const StyledShortcutsCardsContainer = styled.ul<{ itemCount: number; cardsPerRow?: number }>(\n ({ theme: { base }, itemCount, cardsPerRow }) => {\n const mediumColumns =\n cardsPerRow ?? (itemCount === 1 ? 2 : Math.min(Math.max(itemCount, 1), 4));\n\n return css`\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(min(calc(${base.spacing} * 30), 100%), 1fr));\n gap: ${base.spacing};\n list-style: none;\n padding: ${base.spacing} 0;\n margin: 0;\n\n @container (min-width: ${parseFloat(base.breakpoints.sm)}rem) {\n grid-template-columns: repeat(${Math.min(cardsPerRow ?? 2, 2)}, minmax(12.5rem, 1fr));\n grid-auto-rows: 1fr;\n justify-content: start;\n align-items: stretch;\n width: 100%;\n }\n\n @container (min-width: ${parseFloat(base.breakpoints.md)}rem) {\n grid-template-columns: repeat(${mediumColumns}, minmax(12.5rem, 1fr));\n }\n `;\n }\n);\n\nStyledShortcutsCardsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCategoriesContainer = styled.div(\n ({ theme: { base } }) => css`\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: calc(${base.spacing} * 2);\n width: 100%;\n padding-block-start: ${base.spacing};\n container-type: inline-size;\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 StyledShortcutsCard = styled.li`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledTextContent = styled.div<{ layoutVariant: 'stacked' | 'inline' }>(\n ({ layoutVariant }) => css`\n ${layoutVariant === 'inline' &&\n css`\n flex: 1;\n min-width: 0;\n align-items: flex-start;\n `}\n\n ${layoutVariant === 'stacked' &&\n css`\n align-items: center;\n width: 100%;\n `}\n `\n);\n\nStyledTextContent.defaultProps = defaultThemeProp;\n\nexport const StyledText = styled.span(\n ({ theme: { base } }) => css`\n font-weight: ${base['font-weight']['semi-bold']};\n font-size: 1em;\n color: CanvasText;\n ${lineClamp(3)}\n `\n);\n\nStyledText.defaultProps = defaultThemeProp;\n\nexport const StyledSubtitleText = styled(Text)(\n () => css`\n ${lineClamp(3)}\n text-align: inherit;\n `\n);\n\nStyledSubtitleText.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardButton = styled(Button)<{\n layoutVariant: 'stacked' | 'inline';\n}>(({ theme: { base, components }, layoutVariant }) => {\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 align-items: center;\n justify-content: flex-start;\n text-align: ${layoutVariant === 'stacked' ? 'center' : 'start'};\n flex: 1;\n width: 100%;\n border: 0.0625rem solid ${base.palette['border-line']};\n border-radius: ${base['border-radius']};\n background: ${base.palette['primary-background']};\n padding-inline: calc(${base.spacing} * 2);\n padding-block: calc(${base.spacing} * 1.5);\n\n &:hover {\n background: ${hoverBackgroundColor};\n text-decoration: none;\n\n ${StyledText} {\n text-decoration: underline;\n }\n }\n `;\n});\n\nStyledShortcutsCardButton.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardIcon = styled(Icon)<{\n iconColor?: string;\n}>(\n ({ iconColor }) => css`\n flex-shrink: 0;\n\n ${iconColor &&\n css`\n color: ${iconColor};\n `}\n `\n);\n\nStyledShortcutsCardIcon.defaultProps = defaultThemeProp;\n\nexport const StyledLabelRow = styled.span(\n ({ theme: { base } }) => css`\n display: flex;\n align-items: center;\n gap: calc(${base.spacing} * 0.5);\n `\n);\n\nStyledLabelRow.defaultProps = defaultThemeProp;\n\nexport const StyledExternalIcon = styled(Icon)`\n flex-shrink: 0;\n`;\n\nStyledExternalIcon.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutImageContainer = styled.span(\n ({\n theme: {\n base,\n components: { icon }\n }\n }) => css`\n flex-shrink: 0;\n overflow: hidden;\n border-radius: calc(${base['border-radius']} / 2);\n width: ${icon.size.m};\n height: ${icon.size.m};\n `\n);\n\nStyledShortcutImageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutImg = styled.img`\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n`;\n\nStyledShortcutImg.defaultProps = defaultThemeProp;\n\nexport const StyledCardContentWrapper = styled.div<{\n layoutVariant: 'stacked' | 'inline';\n hasDescription: boolean;\n}>(\n ({ layoutVariant, hasDescription, theme: { base } }) => css`\n display: flex;\n flex: 1;\n min-width: 0;\n\n ${layoutVariant === 'inline' &&\n css`\n flex-direction: row;\n gap: calc(${base.spacing} * 1.5);\n align-items: ${hasDescription ? 'flex-start' : 'center'};\n `}\n\n ${layoutVariant === 'stacked' &&\n css`\n flex-direction: column;\n gap: calc(${base.spacing} * 2);\n align-items: center;\n justify-content: center;\n `}\n `\n);\n\nStyledCardContentWrapper.defaultProps = defaultThemeProp;\n\n/**\n * The interactive card style, layered on top of the default card: equal padding and\n * top-aligned content, a 44px icon container, and text shorter than the icon centered against it.\n */\nexport const StyledInteractiveShortcutsCardButton = styled(StyledShortcutsCardButton)(\n ({ theme: { base }, layoutVariant }) => css`\n align-items: flex-start;\n padding: calc(${base.spacing} * 1.5);\n\n div${StyledShortcutsCardIcon}, ${StyledShortcutImageContainer} {\n width: ${base['hit-area'].finger};\n height: ${base['hit-area'].finger};\n }\n\n ${layoutVariant === 'inline'\n ? css`\n ${StyledCardContentWrapper} {\n align-items: flex-start;\n }\n\n ${StyledTextContent}:not(:first-child) {\n min-height: ${base['hit-area'].finger};\n justify-content: center;\n }\n `\n : css`\n ${StyledCardContentWrapper} {\n justify-content: flex-start;\n }\n `}\n `\n);\n\nStyledInteractiveShortcutsCardButton.defaultProps = defaultThemeProp;\n"]}
@@ -1,2 +1,2 @@
1
1
  export declare const getShortcutsTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["list", "empty-state", "category-section", "category-heading", "show-more-less"]>;
2
- //# sourceMappingURL=Shortcuts.test-ids.d.ts.map
2
+ //# sourceMappingURL=QuickActions.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,sNAMrB,CAAC"}
@@ -6,4 +6,4 @@ export const getShortcutsTestIds = createTestIds('shortcuts', [
6
6
  'category-heading',
7
7
  'show-more-less'
8
8
  ]);
9
- //# sourceMappingURL=Shortcuts.test-ids.js.map
9
+ //# sourceMappingURL=QuickActions.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.test-ids.js","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.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,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;CACR,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getShortcutsTestIds = createTestIds('shortcuts', [\n 'list',\n 'empty-state',\n 'category-section',\n 'category-heading',\n 'show-more-less'\n] as const);\n"]}
@@ -0,0 +1,70 @@
1
+ import type { Ref } from 'react';
2
+ import type { BaseProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';
3
+ interface QuickActionItemBase {
4
+ /** Unique identifier for this shortcut. */
5
+ id: string;
6
+ /** Display label shown on the shortcut. */
7
+ label: string;
8
+ /** Optional subtitle displayed below the label. */
9
+ description?: string;
10
+ /** Optional class name applied to the rendered shortcut card. */
11
+ className?: string;
12
+ }
13
+ interface QuickActionIcon {
14
+ /** Icon name from the registered icon set. */
15
+ name: string;
16
+ /** Optional icon container color. Overrides the theme; icon foreground is calculated for contrast. */
17
+ background?: string;
18
+ }
19
+ interface QuickActionWithIcon {
20
+ /** Optional icon details. */
21
+ icon: QuickActionIcon;
22
+ image?: never;
23
+ }
24
+ interface QuickActionWithImage {
25
+ /** Optional image URL. Renders in place of the icon. */
26
+ image: string;
27
+ icon?: never;
28
+ }
29
+ interface QuickActionWithoutVisual {
30
+ icon?: undefined;
31
+ image?: undefined;
32
+ }
33
+ type QuickActionVisual = QuickActionWithIcon | QuickActionWithImage | QuickActionWithoutVisual;
34
+ export type QuickActionLinkItem = QuickActionItemBase & QuickActionVisual & {
35
+ type: 'external';
36
+ href: string;
37
+ };
38
+ export type QuickActionNavItem = QuickActionItemBase & QuickActionVisual & {
39
+ type: 'page';
40
+ onClick: () => void;
41
+ showExternalIcon?: boolean;
42
+ };
43
+ export type QuickActionItem = QuickActionLinkItem | QuickActionNavItem;
44
+ export interface QuickActionCategory {
45
+ id: string;
46
+ label: string;
47
+ items: QuickActionItem[];
48
+ }
49
+ interface QuickActionsWithItems {
50
+ items?: QuickActionItem[];
51
+ categories?: never;
52
+ showHeader?: boolean;
53
+ }
54
+ interface QuickActionsWithCategories {
55
+ items?: never;
56
+ categories: QuickActionCategory[];
57
+ showHeader?: never;
58
+ }
59
+ interface QuickActionsBaseProps extends NoChildrenProp, TestIdProp, BaseProps {
60
+ heading?: string;
61
+ variant?: 'stacked' | 'inline';
62
+ cardsPerRow?: 2 | 3 | 4;
63
+ interactiveCards?: boolean;
64
+ count?: number;
65
+ onExpandToggle?: () => void;
66
+ ref?: Ref<HTMLDivElement>;
67
+ }
68
+ export type QuickActionsProps = QuickActionsBaseProps & (QuickActionsWithItems | QuickActionsWithCategories);
69
+ export {};
70
+ //# sourceMappingURL=QuickActions.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.types.d.ts","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErF,UAAU,mBAAmB;IAC3B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,eAAe;IACvB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,sGAAsG;IACtG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,mBAAmB;IAC3B,6BAA6B;IA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AAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,GACnD,CAAC,qBAAqB,GAAG,0BAA0B,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=QuickActions.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickActions.types.js","sourceRoot":"","sources":["../../../src/components/QuickActions/QuickActions.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';\n\ninterface QuickActionItemBase {\n /** Unique identifier for this shortcut. */\n id: string;\n /** Display label shown on the shortcut. */\n label: string;\n /** Optional subtitle displayed below the label. */\n description?: string;\n /** Optional class name applied to the rendered shortcut card. */\n className?: string;\n}\n\ninterface QuickActionIcon {\n /** Icon name from the registered icon set. */\n name: string;\n /** Optional icon container color. Overrides the theme; icon foreground is calculated for contrast. */\n background?: string;\n}\n\ninterface QuickActionWithIcon {\n /** Optional icon details. */\n icon: QuickActionIcon;\n image?: never;\n}\n\ninterface QuickActionWithImage {\n /** Optional image URL. Renders in place of the icon. */\n image: string;\n icon?: never;\n}\n\ninterface QuickActionWithoutVisual {\n icon?: undefined;\n image?: undefined;\n}\n\ntype QuickActionVisual = QuickActionWithIcon | QuickActionWithImage | QuickActionWithoutVisual;\n\nexport type QuickActionLinkItem = QuickActionItemBase &\n QuickActionVisual & {\n type: 'external';\n href: string;\n };\n\nexport type QuickActionNavItem = QuickActionItemBase &\n QuickActionVisual & {\n type: 'page';\n onClick: () => void;\n showExternalIcon?: boolean;\n };\n\nexport type QuickActionItem = QuickActionLinkItem | QuickActionNavItem;\n\nexport interface QuickActionCategory {\n id: string;\n label: string;\n items: QuickActionItem[];\n}\n\ninterface QuickActionsWithItems {\n items?: QuickActionItem[];\n categories?: never;\n showHeader?: boolean;\n}\n\ninterface QuickActionsWithCategories {\n items?: never;\n categories: QuickActionCategory[];\n showHeader?: never;\n}\n\ninterface QuickActionsBaseProps extends NoChildrenProp, TestIdProp, BaseProps {\n heading?: string;\n variant?: 'stacked' | 'inline';\n cardsPerRow?: 2 | 3 | 4;\n interactiveCards?: boolean;\n count?: number;\n onExpandToggle?: () => void;\n ref?: Ref<HTMLDivElement>;\n}\n\nexport type QuickActionsProps = QuickActionsBaseProps &\n (QuickActionsWithItems | QuickActionsWithCategories);\n"]}
@@ -0,0 +1,3 @@
1
+ export { default } from './QuickActions';
2
+ export type { QuickActionsProps, QuickActionItem, QuickActionLinkItem, QuickActionNavItem, QuickActionCategory } from './QuickActions.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QuickActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,YAAY,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default } from './QuickActions';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuickActions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { default } from './QuickActions';\nexport type {\n QuickActionsProps,\n QuickActionItem,\n QuickActionLinkItem,\n QuickActionNavItem,\n QuickActionCategory\n} from './QuickActions.types';\n"]}
package/lib/index.d.ts CHANGED
@@ -33,10 +33,10 @@ export { default as MasterDetail } from './components/MasterDetail';
33
33
  export * from './components/MasterDetail';
34
34
  export { default as Predictions } from './components/Predictions';
35
35
  export * from './components/Predictions';
36
+ export { default as QuickActions } from './components/QuickActions';
37
+ export * from './components/QuickActions';
36
38
  export { default as SearchResults } from './components/SearchResults';
37
39
  export * from './components/SearchResults';
38
- export { default as Shortcuts } from './components/Shortcuts';
39
- export * from './components/Shortcuts';
40
40
  export { default as Stages } from './components/Stages';
41
41
  export * from './components/Stages';
42
42
  export { default as Stakeholders } from './components/Stakeholders';
@@ -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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,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC"}
package/lib/index.js CHANGED
@@ -34,10 +34,10 @@ export { default as MasterDetail } from './components/MasterDetail';
34
34
  export * from './components/MasterDetail';
35
35
  export { default as Predictions } from './components/Predictions';
36
36
  export * from './components/Predictions';
37
+ export { default as QuickActions } from './components/QuickActions';
38
+ export * from './components/QuickActions';
37
39
  export { default as SearchResults } from './components/SearchResults';
38
40
  export * from './components/SearchResults';
39
- export { default as Shortcuts } from './components/Shortcuts';
40
- export * from './components/Shortcuts';
41
41
  export { default as Stages } from './components/Stages';
42
42
  export * from './components/Stages';
43
43
  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;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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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 HeroBanner } from './components/HeroBanner';\nexport * from './components/HeroBanner';\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 MasterDetail } from './components/MasterDetail';\nexport * from './components/MasterDetail';\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"]}
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,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;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AAC;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 HeroBanner } from './components/HeroBanner';\nexport * from './components/HeroBanner';\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 MasterDetail } from './components/MasterDetail';\nexport * from './components/MasterDetail';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as QuickActions } from './components/QuickActions';\nexport * from './components/QuickActions';\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "10.0.0-build.11.0",
3
+ "version": "10.0.0-build.12.0",
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.11.0",
18
- "@pega/cosmos-react-rte": "10.0.0-build.11.0",
17
+ "@pega/cosmos-react-core": "10.0.0-build.12.0",
18
+ "@pega/cosmos-react-rte": "10.0.0-build.12.0",
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",
@@ -1 +0,0 @@
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;AA0BxD,OAAO,KAAK,EAAE,cAAc,EAAgB,MAAM,mBAAmB,CAAC;;;;AAwPtE,wBAA2D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shortcuts.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EACL,wBAAwB,EACxB,MAAM,EACN,IAAI,EACJ,WAAW,EACX,UAAU,EACV,UAAU,EACV,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,OAAO,EACP,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AAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AACnE,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { useRef, forwardRef, useState } from 'react';\nimport type { ReactNode, PropsWithoutRef } from 'react';\n\nimport {\n calculateForegroundColor,\n Button,\n Card,\n CardContent,\n CardFooter,\n CardHeader,\n EmptyState,\n Flex,\n Text,\n VisuallyHiddenText,\n readableColor,\n registerIcon,\n isSolidColor,\n useArrows,\n useI18n,\n usePrevious,\n useTestIds,\n useTheme,\n createClassName,\n withTestIds\n} from '@pega/cosmos-react-core';\nimport * as openNewTabIcon from '@pega/cosmos-react-core/lib/components/Icon/icons/open.icon';\n\nimport type { ShortcutsProps, ShortcutItem } from './Shortcuts.types';\nimport {\n StyledExternalIcon,\n StyledLabelRow,\n StyledShortcutsCard,\n StyledShortcutsCardButton,\n StyledShortcutsCardsContainer,\n StyledShortcutsCardsWrapper,\n StyledShortcutsCategoriesContainer,\n StyledShortcutsCategoryHeading,\n StyledShortcutsCardIcon,\n StyledShortcutImageContainer,\n StyledShortcutImg,\n StyledSubtitleText,\n StyledText,\n StyledTextContent,\n StyledCardContentWrapper\n} from './Shortcuts.styles';\nimport { getShortcutsTestIds } from './Shortcuts.test-ids';\n\nregisterIcon(openNewTabIcon);\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 CardItem = ({ item, variant }: { item: ShortcutItem; variant: 'stacked' | 'inline' }) => {\n const theme = useTheme();\n const {\n components: {\n card,\n shortcuts: {\n icon: { background: configuredIconBackground, foreground: configuredIconForeground }\n }\n }\n } = theme;\n\n const cardClassName = createClassName('shortcuts-card', item.className);\n\n const isLink = item.type === 'external';\n const image = isLink ? item.image : undefined;\n const description = isLink ? item.description : undefined;\n\n const [isBrokenImage, setIsBrokenImage] = useState(false);\n const prevImage = usePrevious(image);\n\n const iconBackground = configuredIconBackground;\n const withIconBackground = Boolean(isSolidColor(iconBackground));\n\n const cardForeground = calculateForegroundColor(card.background, card['foreground-color'], theme);\n let iconForeground = configuredIconForeground;\n\n if (configuredIconForeground === 'auto') {\n iconForeground = withIconBackground\n ? readableColor(iconBackground, { mode: 'light', level: 'AANonText' })\n : cardForeground;\n }\n\n const showImage = Boolean(image) && !(isBrokenImage && image === prevImage);\n\n const commonIconProps = {\n name: item.icon\n };\n\n const iconVisual = withIconBackground ? (\n <StyledShortcutsCardIcon\n {...commonIconProps}\n background={iconBackground}\n foreground={iconForeground}\n />\n ) : (\n <StyledShortcutsCardIcon {...commonIconProps} iconColor={iconForeground} size='m' />\n );\n\n const visual = showImage ? (\n <Flex container={{ alignItems: 'center', justify: 'center' }} as={StyledShortcutImageContainer}>\n <StyledShortcutImg\n src={image}\n alt={item.label}\n onError={() => setIsBrokenImage(true)}\n onLoad={() => setIsBrokenImage(false)}\n />\n </Flex>\n ) : (\n iconVisual\n );\n\n return (\n <StyledShortcutsCard className={cardClassName}>\n <StyledShortcutsCardButton variant='link' layoutVariant={variant} {...itemLinkProps(item)}>\n <StyledCardContentWrapper layoutVariant={variant} hasDescription={!!description}>\n {visual}\n <Flex\n container={{ direction: 'column', gap: 0.5 }}\n as={StyledTextContent}\n layoutVariant={variant}\n >\n <StyledLabelRow>\n <StyledText>{item.label}</StyledText>\n {item.type === 'external' && <StyledExternalIcon name='open' />}\n </StyledLabelRow>\n\n {description && (\n <StyledSubtitleText variant='secondary' forwardedAs='p'>\n {description}\n </StyledSubtitleText>\n )}\n </Flex>\n </StyledCardContentWrapper>\n </StyledShortcutsCardButton>\n </StyledShortcutsCard>\n );\n};\n\nconst Shortcuts = forwardRef(function Shortcuts(\n {\n heading,\n className,\n items = [],\n categories,\n showHeader = true,\n variant = 'inline',\n count,\n onExpandToggle,\n testId,\n ...restProps\n }: PropsWithoutRef<ShortcutsProps>,\n ref: ShortcutsProps['ref']\n) {\n const t = useI18n();\n const testIds = useTestIds(testId, getShortcutsTestIds);\n\n const rootClassName = createClassName('shortcuts', className);\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 renderedItemCount = categories\n ? categories.reduce((total, cat) => total + cat.items.length, 0)\n : items.length;\n const hasMore = count !== undefined && count > renderedItemCount;\n\n const expandToggle =\n onExpandToggle && count !== undefined ? (\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 emptyState = <EmptyState message={t('no_items')} data-testid={testIds.emptyState} />;\n\n const withCardShell = (content: ReactNode) => (\n <Card {...restProps} className={rootClassName} data-testid={testIds.root} ref={ref}>\n <CardHeader>\n <Text variant='h2'>{heading ?? t('shortcuts')}</Text>\n </CardHeader>\n <CardContent>{content}</CardContent>\n {expandToggle && <CardFooter justify='center'>{expandToggle}</CardFooter>}\n </Card>\n );\n\n if (categories) {\n const visibleCategories = categories.filter(cat => cat.items.length > 0);\n\n const categorySections = (\n <StyledShortcutsCategoriesContainer ref={categoriesContainerRef}>\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 role='list'\n aria-label={cat.label}\n itemCount={cat.items.length}\n >\n {cat.items.map(item => (\n <CardItem key={item.id} item={item} variant={variant} />\n ))}\n </StyledShortcutsCardsContainer>\n </Flex>\n ))}\n </StyledShortcutsCategoriesContainer>\n );\n\n return withCardShell(visibleCategories.length === 0 ? emptyState : categorySections);\n }\n\n const cardGrid = (\n <StyledShortcutsCardsWrapper>\n <StyledShortcutsCardsContainer\n ref={flatListRef}\n role='list'\n data-testid={testIds.list}\n aria-label={heading ?? t('shortcuts')}\n itemCount={items.length}\n >\n {items.map(item => (\n <CardItem key={item.id} item={item} variant={variant} />\n ))}\n </StyledShortcutsCardsContainer>\n </StyledShortcutsCardsWrapper>\n );\n\n if (!showHeader) {\n if (items.length === 0) return null;\n\n return (\n <div className={rootClassName} data-testid={testIds.root} {...restProps} ref={ref}>\n <VisuallyHiddenText>{heading ?? t('shortcuts')}</VisuallyHiddenText>\n {cardGrid}\n {expandToggle && <Flex container={{ justify: 'center' }}>{expandToggle}</Flex>}\n </div>\n );\n }\n\n return withCardShell(items.length === 0 ? emptyState : cardGrid);\n});\n\nexport default withTestIds(Shortcuts, getShortcutsTestIds);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shortcuts.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,2BAA2B,6NAEvC,CAAC;AAEF,eAAO,MAAM,6BAA6B;eAA0B,MAAM;YAyBzE,CAAC;AAIF,eAAO,MAAM,kCAAkC,6NAS9C,CAAC;AAIF,eAAO,MAAM,8BAA8B;;yLAIzC,CAAC;AAIH,eAAO,MAAM,mBAAmB,6NAG/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,SAAS,GAAG,QAAQ;YAehF,CAAC;AAIF,eAAO,MAAM,UAAU,+NAOtB,CAAC;AAIF,eAAO,MAAM,kBAAkB;;yLAK9B,CAAC;AAIF,eAAO,MAAM,yBAAyB;;;mBACrB,SAAS,GAAG,QAAQ;oLA4BnC,CAAC;AAIH,eAAO,MAAM,uBAA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wBAAwB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { mix } from 'polished';\n\nimport { Button, defaultThemeProp, Icon, Text, tryCatch } from '@pega/cosmos-react-core';\nimport { lineClamp } from '@pega/cosmos-react-core/lib/styles/mixins';\n\nexport const StyledShortcutsCardsWrapper = styled.div`\n container-type: inline-size;\n`;\n\nexport const StyledShortcutsCardsContainer = styled.ul<{ itemCount: number }>(\n ({ theme: { base }, itemCount }) => {\n return css`\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(min(calc(${base.spacing} * 30), 100%), 1fr));\n gap: ${base.spacing};\n list-style: none;\n padding: ${base.spacing} 0;\n margin: 0;\n\n @container (min-width: ${parseFloat(base.breakpoints.sm)}rem) {\n grid-template-columns: repeat(2, minmax(12.5rem, 1fr));\n grid-auto-rows: 1fr;\n justify-content: start;\n align-items: stretch;\n width: 100%;\n }\n\n @container (min-width: ${parseFloat(base.breakpoints.md)}rem) {\n grid-template-columns: ${itemCount === 1\n ? 'repeat(2, minmax(12.5rem, 1fr))'\n : `repeat(${Math.min(Math.max(itemCount, 1), 4)}, minmax(12.5rem, 1fr))`};\n }\n `;\n }\n);\n\nStyledShortcutsCardsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCategoriesContainer = styled.div(\n ({ theme: { base } }) => css`\n display: grid;\n grid-template-columns: minmax(0, 1fr);\n gap: calc(${base.spacing} * 2);\n width: 100%;\n padding-block-start: ${base.spacing};\n container-type: inline-size;\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 StyledShortcutsCard = styled.li`\n display: flex;\n flex-direction: column;\n`;\n\nexport const StyledTextContent = styled.div<{ layoutVariant: 'stacked' | 'inline' }>(\n ({ layoutVariant }) => css`\n ${layoutVariant === 'inline' &&\n css`\n flex: 1;\n min-width: 0;\n align-items: flex-start;\n `}\n\n ${layoutVariant === 'stacked' &&\n css`\n align-items: center;\n width: 100%;\n `}\n `\n);\n\nStyledTextContent.defaultProps = defaultThemeProp;\n\nexport const StyledText = styled.span(\n ({ theme: { base } }) => css`\n font-weight: ${base['font-weight']['semi-bold']};\n font-size: 1em;\n color: CanvasText;\n ${lineClamp(3)}\n `\n);\n\nStyledText.defaultProps = defaultThemeProp;\n\nexport const StyledSubtitleText = styled(Text)(\n () => css`\n ${lineClamp(3)}\n text-align: inherit;\n `\n);\n\nStyledSubtitleText.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardButton = styled(Button)<{\n layoutVariant: 'stacked' | 'inline';\n}>(({ theme: { base, components }, layoutVariant }) => {\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 align-items: center;\n justify-content: flex-start;\n text-align: ${layoutVariant === 'stacked' ? 'center' : 'start'};\n flex: 1;\n width: 100%;\n border: 0.0625rem solid ${base.palette['border-line']};\n border-radius: ${base['border-radius']};\n background: ${base.palette['primary-background']};\n padding-inline: calc(${base.spacing} * 2);\n padding-block: calc(${base.spacing} * 1.5);\n\n &:hover {\n background: ${hoverBackgroundColor};\n text-decoration: none;\n\n ${StyledText} {\n text-decoration: underline;\n }\n }\n `;\n});\n\nStyledShortcutsCardButton.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutsCardIcon = styled(Icon)<{\n iconColor?: string;\n}>(\n ({ iconColor }) => css`\n flex-shrink: 0;\n\n ${iconColor &&\n css`\n color: ${iconColor};\n `}\n `\n);\n\nStyledShortcutsCardIcon.defaultProps = defaultThemeProp;\n\nexport const StyledLabelRow = styled.span(\n ({ theme: { base } }) => css`\n display: flex;\n align-items: center;\n gap: calc(${base.spacing} * 0.5);\n `\n);\n\nStyledLabelRow.defaultProps = defaultThemeProp;\n\nexport const StyledExternalIcon = styled(Icon)`\n flex-shrink: 0;\n`;\n\nStyledExternalIcon.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutImageContainer = styled.span(\n ({\n theme: {\n base,\n components: { icon }\n }\n }) => css`\n flex-shrink: 0;\n overflow: hidden;\n border-radius: calc(${base['border-radius']} / 2);\n width: ${icon.size.m};\n height: ${icon.size.m};\n `\n);\n\nStyledShortcutImageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledShortcutImg = styled.img`\n width: 100%;\n height: 100%;\n object-fit: contain;\n display: block;\n`;\n\nStyledShortcutImg.defaultProps = defaultThemeProp;\n\nexport const StyledCardContentWrapper = styled.div<{\n layoutVariant: 'stacked' | 'inline';\n hasDescription: boolean;\n}>(\n ({ layoutVariant, hasDescription, theme: { base } }) => css`\n display: flex;\n flex: 1;\n min-width: 0;\n\n ${layoutVariant === 'inline' &&\n css`\n flex-direction: row;\n gap: calc(${base.spacing} * 1.5);\n align-items: ${hasDescription ? 'flex-start' : 'center'};\n `}\n\n ${layoutVariant === 'stacked' &&\n css`\n flex-direction: column;\n gap: calc(${base.spacing} * 2);\n align-items: center;\n justify-content: center;\n `}\n `\n);\n\nStyledCardContentWrapper.defaultProps = defaultThemeProp;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shortcuts.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,sNAMrB,CAAC"}
@@ -1 +0,0 @@
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,aAAa;IACb,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;CACR,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getShortcutsTestIds = createTestIds('shortcuts', [\n 'list',\n 'empty-state',\n 'category-section',\n 'category-heading',\n 'show-more-less'\n] as const);\n"]}
@@ -1,80 +0,0 @@
1
- import type { Ref } from 'react';
2
- import type { BaseProps, 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
- /** Optional class name applied to the rendered shortcut card. */
11
- className?: string;
12
- }
13
- export interface ShortcutLinkItem extends ShortcutItemBase {
14
- /** Discriminant — this item navigates to an external URL. */
15
- type: 'external';
16
- /** Absolute URL the link navigates to. Opens in a new tab. */
17
- href: string;
18
- /** Optional subtitle displayed below the label. */
19
- description?: string;
20
- /** Optional image URL. Renders in place of the icon; falls back to icon if the image fails to load. */
21
- image?: string;
22
- }
23
- export interface ShortcutNavItem extends ShortcutItemBase {
24
- /** Discriminant — this item navigates to a portal landing page. */
25
- type: 'page';
26
- /** Callback invoked when the user activates this shortcut. */
27
- onClick: () => void;
28
- }
29
- export type ShortcutItem = ShortcutLinkItem | ShortcutNavItem;
30
- export interface ShortcutCategory {
31
- /** Unique identifier for this category. */
32
- id: string;
33
- /** Display label shown as the category heading. */
34
- label: string;
35
- /** Shortcut items belonging to this category. */
36
- items: ShortcutItem[];
37
- }
38
- interface ShortcutsWithItems {
39
- /** Shortcut items to render as cards. */
40
- items?: ShortcutItem[];
41
- categories?: never;
42
- /**
43
- * Whether to render the outer card shell with a heading.
44
- * When `false`, only the card grid is rendered, centered within its container.
45
- * @default true
46
- */
47
- showHeader?: boolean;
48
- }
49
- interface ShortcutsWithCategories {
50
- items?: never;
51
- /** Grouped shortcut items, each rendered as cards under a category heading. */
52
- categories: ShortcutCategory[];
53
- showHeader?: never;
54
- }
55
- interface ShortcutsBaseProps extends NoChildrenProp, TestIdProp, BaseProps {
56
- /** Heading displayed above the shortcuts. */
57
- heading?: string;
58
- /**
59
- * Controls the layout variant of each shortcut card.
60
- * - `stacked`: large icon above the label (default card style).
61
- * - `inline`: small icon inline to the left of the label (list/link style).
62
- * @default 'inline'
63
- */
64
- variant?: 'stacked' | 'inline';
65
- /**
66
- * Total number of shortcut items available (may exceed the rendered list when collapsed).
67
- * Used with `onExpandToggle` to decide Show more vs Show less.
68
- */
69
- count?: number;
70
- /**
71
- * When set with `count`, renders a Show more / Show less control.
72
- * Parent owns expand state and slicing.
73
- */
74
- onExpandToggle?: () => void;
75
- /** Ref for the root card element. */
76
- ref?: Ref<HTMLDivElement>;
77
- }
78
- export type ShortcutsProps = ShortcutsBaseProps & (ShortcutsWithItems | ShortcutsWithCategories);
79
- export {};
80
- //# sourceMappingURL=Shortcuts.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shortcuts.types.d.ts","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErF,UAAU,gBAAgB;IACxB,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,gBAAgB;IACxD,6DAA6D;IAC7D,IAAI,EAAE,UAAU,CAAC;IACjB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uGAAuG;IACvG,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB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uts.types.js","sourceRoot":"","sources":["../../../src/components/Shortcuts/Shortcuts.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Ref } from 'react';\n\nimport type { BaseProps, 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 /** Optional class name applied to the rendered shortcut card. */\n className?: 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 /** Optional subtitle displayed below the label. */\n description?: string;\n /** Optional image URL. Renders in place of the icon; falls back to icon if the image fails to load. */\n image?: string;\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 /** Shortcut items to render as cards. */\n items?: ShortcutItem[];\n categories?: never;\n /**\n * 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 /** Grouped shortcut items, each rendered as cards under a category heading. */\n categories: ShortcutCategory[];\n showHeader?: never;\n}\n\ninterface ShortcutsBaseProps extends NoChildrenProp, TestIdProp, BaseProps {\n /** Heading displayed above the shortcuts. */\n heading?: string;\n /**\n * Controls the layout variant of each shortcut card.\n * - `stacked`: large icon above the label (default card style).\n * - `inline`: small icon inline to the left of the label (list/link style).\n * @default 'inline'\n */\n variant?: 'stacked' | 'inline';\n /**\n * Total number of shortcut items 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 control.\n * Parent owns expand state and slicing.\n */\n onExpandToggle?: () => void;\n /** Ref for the root card element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport type ShortcutsProps = ShortcutsBaseProps & (ShortcutsWithItems | ShortcutsWithCategories);\n"]}
@@ -1,3 +0,0 @@
1
- export { default } from './Shortcuts';
2
- export type { ShortcutsProps, ShortcutItem, ShortcutLinkItem, ShortcutNavItem, ShortcutCategory } from './Shortcuts.types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,2 +0,0 @@
1
- export { default } from './Shortcuts';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
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"]}