@pega/cosmos-react-work 10.0.0-build.5.2 → 10.0.0-build.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,+BAA+B,EAAmB,MAAM,yBAAyB,CAAC;AAShG,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,mBAAmB,EAAE,+BAA+B,CAAC,wBAAwB,CAiLlF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"IntelligentGuidance.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,+BAA+B,EAAmB,MAAM,yBAAyB,CAAC;AAShG,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AAExE,QAAA,MAAM,mBAAmB,EAAE,+BAA+B,CAAC,wBAAwB,CAoLlF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -2,8 +2,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
3
  import { Icon, useI18n, useAfterInitialEffect, Text, Tabs, CardHeader, TabPanel, Flex, Count, Actions, useLiveLog, usePrevious, useTheme, StyledSecondary } from '@pega/cosmos-react-core';
4
4
  import { StyledIntelligentGuidanceList, StyledIntelligentGuidance, StyledNew, StyledBorderLine, StyledPrimaryItem } from './IntelligentGuidance.styles';
5
- const IntelligentGuidance = forwardRef(function IntelligentGuidance({ items, previousItems, heading, isCollapsed, onExpandCollapse, ...restProps }, ref) {
5
+ const IntelligentGuidance = forwardRef(function IntelligentGuidance(props, ref) {
6
6
  const t = useI18n();
7
+ const { items, itemsLabel = t('current'), previousItems, previousItemsLabel = t('previous'), heading, isCollapsed, onExpandCollapse, ...restProps } = props;
7
8
  const theme = useTheme();
8
9
  const headerRef = useRef(null);
9
10
  const toggleButtonRef = useRef(null);
@@ -50,7 +51,7 @@ const IntelligentGuidance = forwardRef(function IntelligentGuidance({ items, pre
50
51
  const oldItemsIds = oldItems.map(i => i.id);
51
52
  const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));
52
53
  if (itemsToAnnounce.length) {
53
- announcePolite({ message: t('items_added_to_current_list') });
54
+ announcePolite({ message: t('items_added_to_current_list', [itemsLabel]) });
54
55
  itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));
55
56
  }
56
57
  }
@@ -58,7 +59,7 @@ const IntelligentGuidance = forwardRef(function IntelligentGuidance({ items, pre
58
59
  const oldItemsIds = oldPreviousItems.map(i => i.id);
59
60
  const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));
60
61
  if (itemsToAnnounce) {
61
- announcePolite({ message: t('items_added_to_previous_list') });
62
+ announcePolite({ message: t('items_added_to_previous_list', [previousItemsLabel]) });
62
63
  itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));
63
64
  }
64
65
  }
@@ -89,12 +90,12 @@ const IntelligentGuidance = forwardRef(function IntelligentGuidance({ items, pre
89
90
  ] })] }), previousItems ? (_jsxs(_Fragment, { children: [_jsx(Tabs, { tabs: [
90
91
  {
91
92
  id: 'current',
92
- name: t('current'),
93
+ name: itemsLabel,
93
94
  count: items.filter(item => item.new).length || undefined
94
95
  },
95
96
  {
96
97
  id: 'previous',
97
- name: t('previous'),
98
+ name: previousItemsLabel,
98
99
  count: previousItems.filter(item => item.new).length || undefined
99
100
  }
100
101
  ], currentTabId: currentTab, onTabClick: setCurrentTab, ref: tabsRef }), _jsx(TabPanel, { tabId: currentTab, tablistRef: tabsRef, children: intelligentGuidanceList })] })) : (intelligentGuidanceList)] }));
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjF,OAAO,EACL,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,mBAAmB,GAA8D,UAAU,CAC/F,SAAS,mBAAmB,CAC1B,EACE,KAAK,EACL,aAAa,EACb,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,GAAG,SAAS,EAC8B,EAC5C,GAAoC;IAEpC,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,eAAe,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IACxD,MAAM,OAAO,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAC1C,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACxD,MAAM,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE,CAAC;IACxC,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,gBAAgB,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAEpD,MAAM,SAAS,GAAsB,CACnC,UAAU,KAAK,SAAS,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AC,UAAU,CAAC;gCACnB,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS;6BAClE;yBACF,EACD,YAAY,EAAE,UAAU,EACxB,UAAU,EAAE,aAAa,EACzB,GAAG,EAAE,OAAO,GACZ,EACF,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,YAC7C,uBAAuB,GACf,IACV,CACJ,CAAC,CAAC,CAAC,CACF,uBAAuB,CACxB,IACyB,CAC7B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport type { CSSProperties, KeyboardEvent, PropsWithoutRef } from 'react';\n\nimport {\n Icon,\n useI18n,\n useAfterInitialEffect,\n Text,\n Tabs,\n CardHeader,\n TabPanel,\n Flex,\n Count,\n Actions,\n useLiveLog,\n usePrevious,\n useTheme,\n StyledSecondary\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, SummaryListItem } from '@pega/cosmos-react-core';\n\nimport {\n StyledIntelligentGuidanceList,\n StyledIntelligentGuidance,\n StyledNew,\n StyledBorderLine,\n StyledPrimaryItem\n} from './IntelligentGuidance.styles';\nimport type IntelligentGuidanceProps from './IntelligentGuidance.types';\n\nconst IntelligentGuidance: ForwardRefForwardPropsComponent<IntelligentGuidanceProps> = forwardRef(\n function IntelligentGuidance(\n {\n items,\n previousItems,\n heading,\n isCollapsed,\n onExpandCollapse,\n ...restProps\n }: PropsWithoutRef<IntelligentGuidanceProps>,\n ref: IntelligentGuidanceProps['ref']\n ) {\n const t = useI18n();\n const theme = useTheme();\n const headerRef = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const tabsRef = useRef<HTMLElement>(null);\n const [currentTab, setCurrentTab] = useState('current');\n const { announcePolite } = useLiveLog();\n const oldItems = usePrevious(items);\n const oldPreviousItems = usePrevious(previousItems);\n\n const listItems: SummaryListItem[] = (\n currentTab === 'current' ? items : previousItems ?? []\n ).map(item => {\n return {\n id: item.id,\n visual: <Icon name={item.icon} />,\n primary: (\n <StyledPrimaryItem\n role='button'\n tabIndex={0}\n aria-label={t('continue_label_a11y', [item.label])}\n onClick={item.onClick}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n item.onClick(e);\n }\n }}\n >\n {item.label}\n {item.new && (\n <>\n <StyledNew>{t('new')}</StyledNew>\n {/* Can remove StyledBorderLine when Firefox supports :has selector. */}\n <StyledBorderLine />\n </>\n )}\n\n <StyledSecondary variant='secondary'>\n <Text variant='secondary'>{item.type}</Text>\n </StyledSecondary>\n </StyledPrimaryItem>\n ),\n contextualLabel: item.label,\n actions: item.onDismiss\n ? [\n {\n text: t('dismiss'),\n id: item.id,\n icon: 'times',\n onClick: (id, e) => {\n e.stopPropagation();\n item.onDismiss?.(id, e);\n }\n }\n ]\n : undefined,\n container: { colGap: 0.5 }\n };\n });\n\n const [headerHeight, setHeaderHeight] = useState(0);\n\n useLayoutEffect(() => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current?.offsetHeight || 0);\n }\n }, [headerRef.current]);\n\n useEffect(() => {\n announcePolite({ message: `${heading} ${items.length + (previousItems?.length ?? 0)}` });\n if (oldItems) {\n const oldItemsIds = oldItems.map(i => i.id);\n const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));\n if (itemsToAnnounce.length) {\n announcePolite({ message: t('items_added_to_current_list') });\n itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));\n }\n }\n if (oldPreviousItems) {\n const oldItemsIds = oldPreviousItems.map(i => i.id);\n const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));\n if (itemsToAnnounce) {\n announcePolite({ message: t('items_added_to_previous_list') });\n itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));\n }\n }\n }, [items, previousItems]);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the list is toggled.\n useAfterInitialEffect(() => {\n if (\n toggleButtonRef.current &&\n window.matchMedia(`(min-height: ${theme.base.breakpoints.sm})`).matches &&\n toggleButtonRef.current === document.activeElement\n ) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 1000);\n }\n }, [isCollapsed]);\n\n const intelligentGuidanceList = (\n <StyledIntelligentGuidanceList items={listItems} noItemsText={t('no_recommendations')} />\n );\n\n return (\n <StyledIntelligentGuidance\n {...restProps}\n ref={ref}\n role='region'\n isCollapsed={isCollapsed}\n hasItems={!!items.length}\n style={{ '--headerHeight': `${headerHeight}px` } as CSSProperties}\n data-app-region\n >\n <CardHeader ref={headerRef}>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Text variant='h2'>{heading}</Text>\n <Count>{items.length + (previousItems?.length ?? 0)}</Count>\n </Flex>\n <Actions\n items={[\n {\n text: t(isCollapsed ? 'expand' : 'collapse'),\n id: 'IntelligentGuidanceButton',\n icon: 'caret-down',\n 'aria-label': isCollapsed\n ? t('expand_noun', [heading])\n : t('collapse_noun', [heading]),\n onClick: onExpandCollapse,\n ref: toggleButtonRef\n }\n ]}\n />\n </CardHeader>\n {previousItems ? (\n <>\n <Tabs\n tabs={[\n {\n id: 'current',\n name: t('current'),\n count: items.filter(item => item.new).length || undefined\n },\n {\n id: 'previous',\n name: t('previous'),\n count: previousItems.filter(item => item.new).length || undefined\n }\n ]}\n currentTabId={currentTab}\n onTabClick={setCurrentTab}\n ref={tabsRef}\n />\n <TabPanel tabId={currentTab} tablistRef={tabsRef}>\n {intelligentGuidanceList}\n </TabPanel>\n </>\n ) : (\n intelligentGuidanceList\n )}\n </StyledIntelligentGuidance>\n );\n }\n);\n\nexport default IntelligentGuidance;\n"]}
1
+ {"version":3,"file":"IntelligentGuidance.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGu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1D;4BACD;gCACE,EAAE,EAAE,UAAU;gCACd,IAAI,EAAE,kBAAkB;gCACxB,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,SAAS;6BAClE;yBACF,EACD,YAAY,EAAE,UAAU,EACxB,UAAU,EAAE,aAAa,EACzB,GAAG,EAAE,OAAO,GACZ,EACF,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,OAAO,YAC7C,uBAAuB,GACf,IACV,CACJ,CAAC,CAAC,CAAC,CACF,uBAAuB,CACxB,IACyB,CAC7B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport type { CSSProperties, KeyboardEvent, PropsWithoutRef } from 'react';\n\nimport {\n Icon,\n useI18n,\n useAfterInitialEffect,\n Text,\n Tabs,\n CardHeader,\n TabPanel,\n Flex,\n Count,\n Actions,\n useLiveLog,\n usePrevious,\n useTheme,\n StyledSecondary\n} from '@pega/cosmos-react-core';\nimport type { ForwardRefForwardPropsComponent, SummaryListItem } from '@pega/cosmos-react-core';\n\nimport {\n StyledIntelligentGuidanceList,\n StyledIntelligentGuidance,\n StyledNew,\n StyledBorderLine,\n StyledPrimaryItem\n} from './IntelligentGuidance.styles';\nimport type IntelligentGuidanceProps from './IntelligentGuidance.types';\n\nconst IntelligentGuidance: ForwardRefForwardPropsComponent<IntelligentGuidanceProps> = forwardRef(\n function IntelligentGuidance(\n props: PropsWithoutRef<IntelligentGuidanceProps>,\n ref: IntelligentGuidanceProps['ref']\n ) {\n const t = useI18n();\n const {\n items,\n itemsLabel = t('current'),\n previousItems,\n previousItemsLabel = t('previous'),\n heading,\n isCollapsed,\n onExpandCollapse,\n ...restProps\n } = props;\n const theme = useTheme();\n const headerRef = useRef<HTMLDivElement>(null);\n const toggleButtonRef = useRef<HTMLButtonElement>(null);\n const tabsRef = useRef<HTMLElement>(null);\n const [currentTab, setCurrentTab] = useState('current');\n const { announcePolite } = useLiveLog();\n const oldItems = usePrevious(items);\n const oldPreviousItems = usePrevious(previousItems);\n\n const listItems: SummaryListItem[] = (\n currentTab === 'current' ? items : previousItems ?? []\n ).map(item => {\n return {\n id: item.id,\n visual: <Icon name={item.icon} />,\n primary: (\n <StyledPrimaryItem\n role='button'\n tabIndex={0}\n aria-label={t('continue_label_a11y', [item.label])}\n onClick={item.onClick}\n onKeyDown={(e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n item.onClick(e);\n }\n }}\n >\n {item.label}\n {item.new && (\n <>\n <StyledNew>{t('new')}</StyledNew>\n {/* Can remove StyledBorderLine when Firefox supports :has selector. */}\n <StyledBorderLine />\n </>\n )}\n\n <StyledSecondary variant='secondary'>\n <Text variant='secondary'>{item.type}</Text>\n </StyledSecondary>\n </StyledPrimaryItem>\n ),\n contextualLabel: item.label,\n actions: item.onDismiss\n ? [\n {\n text: t('dismiss'),\n id: item.id,\n icon: 'times',\n onClick: (id, e) => {\n e.stopPropagation();\n item.onDismiss?.(id, e);\n }\n }\n ]\n : undefined,\n container: { colGap: 0.5 }\n };\n });\n\n const [headerHeight, setHeaderHeight] = useState(0);\n\n useLayoutEffect(() => {\n if (headerRef.current) {\n setHeaderHeight(headerRef.current?.offsetHeight || 0);\n }\n }, [headerRef.current]);\n\n useEffect(() => {\n announcePolite({ message: `${heading} ${items.length + (previousItems?.length ?? 0)}` });\n if (oldItems) {\n const oldItemsIds = oldItems.map(i => i.id);\n const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));\n if (itemsToAnnounce.length) {\n announcePolite({ message: t('items_added_to_current_list', [itemsLabel]) });\n itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));\n }\n }\n if (oldPreviousItems) {\n const oldItemsIds = oldPreviousItems.map(i => i.id);\n const itemsToAnnounce = items.filter(i => !oldItemsIds.includes(i.id));\n if (itemsToAnnounce) {\n announcePolite({ message: t('items_added_to_previous_list', [previousItemsLabel]) });\n itemsToAnnounce.forEach(i => announcePolite({ message: `${i.label} ${i.type}` }));\n }\n }\n }, [items, previousItems]);\n\n // FIXME: This is a hack to get the Tooltip to reset its position when the list is toggled.\n useAfterInitialEffect(() => {\n if (\n toggleButtonRef.current &&\n window.matchMedia(`(min-height: ${theme.base.breakpoints.sm})`).matches &&\n toggleButtonRef.current === document.activeElement\n ) {\n toggleButtonRef.current.blur();\n setTimeout(() => {\n toggleButtonRef.current?.focus();\n }, 1000);\n }\n }, [isCollapsed]);\n\n const intelligentGuidanceList = (\n <StyledIntelligentGuidanceList items={listItems} noItemsText={t('no_recommendations')} />\n );\n\n return (\n <StyledIntelligentGuidance\n {...restProps}\n ref={ref}\n role='region'\n isCollapsed={isCollapsed}\n hasItems={!!items.length}\n style={{ '--headerHeight': `${headerHeight}px` } as CSSProperties}\n data-app-region\n >\n <CardHeader ref={headerRef}>\n <Flex container={{ alignItems: 'center', gap: 1 }}>\n <Text variant='h2'>{heading}</Text>\n <Count>{items.length + (previousItems?.length ?? 0)}</Count>\n </Flex>\n <Actions\n items={[\n {\n text: t(isCollapsed ? 'expand' : 'collapse'),\n id: 'IntelligentGuidanceButton',\n icon: 'caret-down',\n 'aria-label': isCollapsed\n ? t('expand_noun', [heading])\n : t('collapse_noun', [heading]),\n onClick: onExpandCollapse,\n ref: toggleButtonRef\n }\n ]}\n />\n </CardHeader>\n {previousItems ? (\n <>\n <Tabs\n tabs={[\n {\n id: 'current',\n name: itemsLabel,\n count: items.filter(item => item.new).length || undefined\n },\n {\n id: 'previous',\n name: previousItemsLabel,\n count: previousItems.filter(item => item.new).length || undefined\n }\n ]}\n currentTabId={currentTab}\n onTabClick={setCurrentTab}\n ref={tabsRef}\n />\n <TabPanel tabId={currentTab} tablistRef={tabsRef}>\n {intelligentGuidanceList}\n </TabPanel>\n </>\n ) : (\n intelligentGuidanceList\n )}\n </StyledIntelligentGuidance>\n );\n }\n);\n\nexport default IntelligentGuidance;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.styles.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,SAAS;;yLAuBpB,CAAC;AAIH,eAAO,MAAM,gBAAgB,+NAgB3B,CAAC;AAIH,eAAO,MAAM,6BAA6B;;gMAgDxC,CAAC;AAIH,eAAO,MAAM,iBAAiB,6NAkB5B,CAAC;AAIH,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,yBAAyB,6YAsHpC,CAAC"}
1
+ {"version":3,"file":"IntelligentGuidance.styles.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,SAAS;;yLAuBpB,CAAC;AAIH,eAAO,MAAM,gBAAgB,+NAgB3B,CAAC;AAIH,eAAO,MAAM,6BAA6B;;gMAgDxC,CAAC;AAIH,eAAO,MAAM,iBAAiB,6NAkB5B,CAAC;AAIH,MAAM,WAAW,8BAA8B;IAC7C,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,yBAAyB,6YA6HpC,CAAC"}
@@ -122,6 +122,7 @@ export const StyledIntelligentGuidance = styled(StyledCard)(({ theme, isCollapse
122
122
  const borderColor = tryCatch(() => lighten(0.1, contrastColor));
123
123
  const tabPrimaryColor = theme.base.colors.blue.light;
124
124
  const lightenedTabColor = tryCatch(() => transparentize(0.3, tabPrimaryColor)) ?? '';
125
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
125
126
  return css `
126
127
  position: fixed;
127
128
  inset-inline-start: calc(2 * ${theme.base.spacing} + var(--appshell-horizontal-offset, 0rem));
@@ -184,6 +185,12 @@ export const StyledIntelligentGuidance = styled(StyledCard)(({ theme, isCollapse
184
185
  border-radius: calc(3 * ${theme.base['border-radius']});
185
186
  background-color: ${theme.base.palette.success};
186
187
  }
188
+
189
+ ${StyledCount} {
190
+ block-size: calc(${fontSize.s} + 0.25rem);
191
+ line-height: calc(${fontSize.s} + 0.25rem);
192
+ font-size: ${fontSize.s};
193
+ }
187
194
  }
188
195
 
189
196
  ${StyledTabs} {
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.styles.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEzD,OAAO,EACL,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,IAAI,EACJ,iBAAiB,EACjB,eAAe,EACf,mCAAmC,EACnC,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,iDAAiD,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,qDAAqD,CAAC;AAClF,OAAO,EAAE,UAAU,EAAE,MAAM,yDAAyD,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAClD,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;QAC9C,U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AAO;;;;MAIhD,UAAU;wBACQ,KAAK,CAAC,IAAI,CAAC,OAAO;sCACJ,WAAW;;;QAGzC,SAAS;;;;UAIP,WAAW;8BACS,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM;;;mBAGpC,eAAe;;;8BAGJ,iBAAiB;;;qBAG1B,WAAW;qBACX,eAAe;;;gCAGJ,eAAe;;;;;8BAKjB,aAAa;;;;;;MAMrC,cAAc;;;;MAId,YAAY;oBACE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, rgba, transparentize } from 'polished';\n\nimport {\n defaultThemeProp,\n StyledButton,\n StyledCard,\n StyledFlex,\n StyledIcon,\n StyledEmptyState,\n SummaryList,\n StyledText,\n tryCatch,\n StyledSummaryItem,\n StyledVisual,\n resolveContrastColor,\n Text,\n calculateFontSize,\n StyledSecondary,\n calculateBackgroundAndContrastColor,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nconst itemIconSize = '2rem';\n\nexport const StyledNew = styled(Text)(({ theme }) => {\n const readableBackground = resolveContrastColor({\n background: theme.base.palette['primary-background'],\n foreground: theme.base.palette['brand-primary'],\n theme\n });\n const readableTextColor = resolveContrastColor({\n background: readableBackground,\n theme\n });\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n text-transform: uppercase;\n background-color: ${readableBackground};\n color: ${readableTextColor};\n padding-inline: calc(0.75 * ${theme.base.spacing});\n font-size: ${fontSize.xxs};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledNew.defaultProps = defaultThemeProp;\n\nexport const StyledBorderLine = styled.span(({ theme }) => {\n const readableBackground = resolveContrastColor({\n background: theme.base.palette['primary-background'],\n foreground: theme.base.palette['brand-primary'],\n theme\n });\n\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n content: '';\n background-color: ${readableBackground};\n height: 100%;\n width: 0.125rem;\n `;\n});\n\nStyledBorderLine.defaultProps = defaultThemeProp;\n\nexport const StyledIntelligentGuidanceList = styled(SummaryList)(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const computedFgColor = calculateForegroundColor(navBg, navFgColor, theme);\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n const borderColor = tryCatch(() => lighten(0.1, contrastColor));\n const secondaryColor = tryCatch(() =>\n rgba(computedFgColor, theme.base.transparency['transparent-2'])\n );\n\n return css`\n max-height: min(calc(100vh - var(--headerHeight) - 4ch), 21ch);\n overflow: auto;\n background-color: ${navBg};\n\n ${theme.base.animation.timing.ease};\n\n ${StyledSummaryItem} {\n position: relative;\n padding: 0 ${theme.base.spacing};\n outline: none;\n\n &:not(:first-of-type) {\n border-top: ${theme.components.button['border-width']} solid ${borderColor};\n }\n\n ${StyledVisual} ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n }\n\n ${StyledSecondary} ${StyledText} {\n color: ${secondaryColor};\n }\n\n &:not(:last-child) {\n border-bottom: none;\n }\n }\n\n ${StyledEmptyState} {\n padding-block: ${theme.base.spacing};\n ${StyledIcon}, ${StyledText} {\n color: ${computedFgColor};\n }\n }\n `;\n});\n\nStyledIntelligentGuidanceList.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryItem = styled.div(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n\n return css`\n padding: ${theme.base.spacing} calc(0.5 * ${theme.base.spacing});\n\n &:hover {\n background-color: ${contrastColor};\n cursor: pointer;\n }\n\n &:enabled:focus-visible,\n &:not([disabled]):focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n `;\n});\n\nStyledPrimaryItem.defaultProps = defaultThemeProp;\n\nexport interface StyledIntelligentGuidanceProps {\n isCollapsed: boolean;\n hasItems: boolean;\n}\n\nexport const StyledIntelligentGuidance = styled(StyledCard)<StyledIntelligentGuidanceProps>(({\n theme,\n isCollapsed\n}) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const computedFgColor = calculateForegroundColor(navBg, navFgColor, theme);\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n const borderColor = tryCatch(() => lighten(0.1, contrastColor));\n const tabPrimaryColor = theme.base.colors.blue.light;\n const lightenedTabColor = tryCatch(() => transparentize(0.3, tabPrimaryColor)) ?? '';\n\n return css`\n position: fixed;\n inset-inline-start: calc(2 * ${theme.base.spacing} + var(--appshell-horizontal-offset, 0rem));\n transition:\n inset-inline-start ${theme.base.animation.speed} ${theme.base.animation.timing.ease},\n transform calc(4 * ${theme.base.animation.speed}) ${theme.base.animation.timing.ease};\n bottom: var(--appshell-bottom-offset, 0);\n z-index: ${theme.base['z-index'].popover};\n min-width: 20rem;\n max-width: 20rem;\n color: ${computedFgColor};\n overflow: hidden;\n box-shadow: ${theme.base.shadow.low};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: absolute;\n transition: none;\n inset-inline-start: calc(2 * ${theme.base.spacing});\n min-inline-size: calc(100% - (4 * ${theme.base.spacing}));\n min-block-size: 3rem;\n\n ${isCollapsed &&\n css`\n ${StyledCardHeader} ~ * {\n display: none;\n }\n `}\n }\n\n @media (min-width: ${theme.base.breakpoints.lg}) {\n min-width: 23rem;\n max-width: 23rem;\n }\n\n ${isCollapsed &&\n css`\n transform: translateY(calc(100% - var(--headerHeight)));\n `}\n\n &:not(& &) {\n background: ${navBg};\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n ${StyledCardHeader} {\n & ${StyledButton} {\n transition: transform calc(2 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n transform: ${isCollapsed ? 'rotate(-180deg)' : 'rotate(0)'};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding: ${theme.base.spacing};\n }\n\n ${StyledFlex} > ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n border-radius: calc(3 * ${theme.base['border-radius']});\n background-color: ${theme.base.palette.success};\n }\n }\n\n ${StyledTabs} {\n padding-inline: ${theme.base.spacing};\n border-block: 0.0625rem solid ${borderColor};\n border-radius: 0;\n\n ${StyledTab} {\n flex: 1;\n justify-content: center;\n\n ${StyledCount} {\n background-color: ${theme.base.palette.urgent};\n }\n span {\n color: ${computedFgColor};\n }\n &::after {\n background-color: ${lightenedTabColor};\n }\n &[aria-selected='true'] {\n span:not(${StyledCount}) {\n color: ${tabPrimaryColor};\n }\n &::after {\n background-color: ${tabPrimaryColor};\n }\n }\n\n &:hover {\n background-color: ${contrastColor};\n border-radius: 0;\n cursor: pointer;\n }\n }\n }\n ${StyledTabPanel} {\n padding: 0;\n }\n\n ${StyledButton}:enabled:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledIntelligentGuidance.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"IntelligentGuidance.styles.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAA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AAW;qBACX,eAAe;;;gCAGJ,eAAe;;;;;8BAKjB,aAAa;;;;;;MAMrC,cAAc;;;;MAId,YAAY;oBACE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,yBAAyB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { lighten, rgba, transparentize } from 'polished';\n\nimport {\n defaultThemeProp,\n StyledButton,\n StyledCard,\n StyledFlex,\n StyledIcon,\n StyledEmptyState,\n SummaryList,\n StyledText,\n tryCatch,\n StyledSummaryItem,\n StyledVisual,\n resolveContrastColor,\n Text,\n calculateFontSize,\n StyledSecondary,\n calculateBackgroundAndContrastColor,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\nimport { StyledCardHeader } from '@pega/cosmos-react-core/lib/components/Card/CardHeader';\nimport { StyledTab } from '@pega/cosmos-react-core/lib/components/Tabs/Tab';\nimport { StyledCount } from '@pega/cosmos-react-core/lib/components/Badges/Count';\nimport { StyledTabs } from '@pega/cosmos-react-core/lib/components/Tabs/Tabs.styles';\nimport { StyledTabPanel } from '@pega/cosmos-react-core/lib/components/Tabs/TabPanel';\n\nconst itemIconSize = '2rem';\n\nexport const StyledNew = styled(Text)(({ theme }) => {\n const readableBackground = resolveContrastColor({\n background: theme.base.palette['primary-background'],\n foreground: theme.base.palette['brand-primary'],\n theme\n });\n const readableTextColor = resolveContrastColor({\n background: readableBackground,\n theme\n });\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n text-transform: uppercase;\n background-color: ${readableBackground};\n color: ${readableTextColor};\n padding-inline: calc(0.75 * ${theme.base.spacing});\n font-size: ${fontSize.xxs};\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `;\n});\n\nStyledNew.defaultProps = defaultThemeProp;\n\nexport const StyledBorderLine = styled.span(({ theme }) => {\n const readableBackground = resolveContrastColor({\n background: theme.base.palette['primary-background'],\n foreground: theme.base.palette['brand-primary'],\n theme\n });\n\n return css`\n position: absolute;\n inset-block-start: 0;\n inset-inline-start: 0;\n content: '';\n background-color: ${readableBackground};\n height: 100%;\n width: 0.125rem;\n `;\n});\n\nStyledBorderLine.defaultProps = defaultThemeProp;\n\nexport const StyledIntelligentGuidanceList = styled(SummaryList)(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const computedFgColor = calculateForegroundColor(navBg, navFgColor, theme);\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n const borderColor = tryCatch(() => lighten(0.1, contrastColor));\n const secondaryColor = tryCatch(() =>\n rgba(computedFgColor, theme.base.transparency['transparent-2'])\n );\n\n return css`\n max-height: min(calc(100vh - var(--headerHeight) - 4ch), 21ch);\n overflow: auto;\n background-color: ${navBg};\n\n ${theme.base.animation.timing.ease};\n\n ${StyledSummaryItem} {\n position: relative;\n padding: 0 ${theme.base.spacing};\n outline: none;\n\n &:not(:first-of-type) {\n border-top: ${theme.components.button['border-width']} solid ${borderColor};\n }\n\n ${StyledVisual} ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n }\n\n ${StyledSecondary} ${StyledText} {\n color: ${secondaryColor};\n }\n\n &:not(:last-child) {\n border-bottom: none;\n }\n }\n\n ${StyledEmptyState} {\n padding-block: ${theme.base.spacing};\n ${StyledIcon}, ${StyledText} {\n color: ${computedFgColor};\n }\n }\n `;\n});\n\nStyledIntelligentGuidanceList.defaultProps = defaultThemeProp;\n\nexport const StyledPrimaryItem = styled.div(({ theme }) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n\n return css`\n padding: ${theme.base.spacing} calc(0.5 * ${theme.base.spacing});\n\n &:hover {\n background-color: ${contrastColor};\n cursor: pointer;\n }\n\n &:enabled:focus-visible,\n &:not([disabled]):focus-visible {\n box-shadow: ${theme.base.shadow['focus-inset']};\n }\n `;\n});\n\nStyledPrimaryItem.defaultProps = defaultThemeProp;\n\nexport interface StyledIntelligentGuidanceProps {\n isCollapsed: boolean;\n hasItems: boolean;\n}\n\nexport const StyledIntelligentGuidance = styled(StyledCard)<StyledIntelligentGuidanceProps>(({\n theme,\n isCollapsed\n}) => {\n const navBg = theme.components['app-shell'].nav.background;\n const navFgColor = theme.components['app-shell'].nav['foreground-color'];\n const computedFgColor = calculateForegroundColor(navBg, navFgColor, theme);\n const { contrastColor } = calculateBackgroundAndContrastColor(navBg, navFgColor, theme);\n const borderColor = tryCatch(() => lighten(0.1, contrastColor));\n const tabPrimaryColor = theme.base.colors.blue.light;\n const lightenedTabColor = tryCatch(() => transparentize(0.3, tabPrimaryColor)) ?? '';\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n position: fixed;\n inset-inline-start: calc(2 * ${theme.base.spacing} + var(--appshell-horizontal-offset, 0rem));\n transition:\n inset-inline-start ${theme.base.animation.speed} ${theme.base.animation.timing.ease},\n transform calc(4 * ${theme.base.animation.speed}) ${theme.base.animation.timing.ease};\n bottom: var(--appshell-bottom-offset, 0);\n z-index: ${theme.base['z-index'].popover};\n min-width: 20rem;\n max-width: 20rem;\n color: ${computedFgColor};\n overflow: hidden;\n box-shadow: ${theme.base.shadow.low};\n\n @media (height <= ${theme.base.breakpoints.sm}) {\n position: absolute;\n transition: none;\n inset-inline-start: calc(2 * ${theme.base.spacing});\n min-inline-size: calc(100% - (4 * ${theme.base.spacing}));\n min-block-size: 3rem;\n\n ${isCollapsed &&\n css`\n ${StyledCardHeader} ~ * {\n display: none;\n }\n `}\n }\n\n @media (min-width: ${theme.base.breakpoints.lg}) {\n min-width: 23rem;\n max-width: 23rem;\n }\n\n ${isCollapsed &&\n css`\n transform: translateY(calc(100% - var(--headerHeight)));\n `}\n\n &:not(& &) {\n background: ${navBg};\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n ${StyledCardHeader} {\n & ${StyledButton} {\n transition: transform calc(2 * ${theme.base.animation.speed})\n ${theme.base.animation.timing.ease};\n transform: ${isCollapsed ? 'rotate(-180deg)' : 'rotate(0)'};\n }\n\n &:not(${StyledCard} ${StyledCard} > &) {\n padding: ${theme.base.spacing};\n }\n\n ${StyledFlex} > ${StyledIcon} {\n width: ${itemIconSize};\n height: ${itemIconSize};\n padding: calc(0.75 * ${theme.base.spacing});\n border-radius: calc(3 * ${theme.base['border-radius']});\n background-color: ${theme.base.palette.success};\n }\n\n ${StyledCount} {\n block-size: calc(${fontSize.s} + 0.25rem);\n line-height: calc(${fontSize.s} + 0.25rem);\n font-size: ${fontSize.s};\n }\n }\n\n ${StyledTabs} {\n padding-inline: ${theme.base.spacing};\n border-block: 0.0625rem solid ${borderColor};\n border-radius: 0;\n\n ${StyledTab} {\n flex: 1;\n justify-content: center;\n\n ${StyledCount} {\n background-color: ${theme.base.palette.urgent};\n }\n span {\n color: ${computedFgColor};\n }\n &::after {\n background-color: ${lightenedTabColor};\n }\n &[aria-selected='true'] {\n span:not(${StyledCount}) {\n color: ${tabPrimaryColor};\n }\n &::after {\n background-color: ${tabPrimaryColor};\n }\n }\n\n &:hover {\n background-color: ${contrastColor};\n border-radius: 0;\n cursor: pointer;\n }\n }\n }\n ${StyledTabPanel} {\n padding: 0;\n }\n\n ${StyledButton}:enabled:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledIntelligentGuidance.defaultProps = defaultThemeProp;\n"]}
@@ -21,8 +21,16 @@ export interface IntelligentGuidanceItemProps {
21
21
  export default interface IntelligentGuidanceProps extends BaseProps, NoChildrenProp {
22
22
  /** List of guidance items. */
23
23
  items: IntelligentGuidanceItemProps[];
24
+ /** Display label for the list of guidance items. The default value is a locale translation of 'Current'
25
+ * @default 'Current'
26
+ * */
27
+ itemsLabel?: string;
24
28
  /** List of guidance previous items. */
25
29
  previousItems?: IntelligentGuidanceItemProps[];
30
+ /** Display label for the list of previous guidance items. The default value is a locale translation of 'Previous'
31
+ * @default 'Previous'
32
+ * */
33
+ previousItemsLabel?: string;
26
34
  /** Header text. */
27
35
  heading: string;
28
36
  /** Flag that indicates if intelligent guidance is collapsed */
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpF,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACtC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC,KACpE,IAAI,CAAC;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,SAAS,EAAE,cAAc;IACjF,8BAA8B;IAC9B,KAAK,EAAE,4BAA4B,EAAE,CAAC;IACtC,uCAAuC;IACvC,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
1
+ {"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEpF,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD,6CAA6C;IAC7C,SAAS,CAAC,EAAE,CACV,EAAE,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACtC,CAAC,EAAE,UAAU,CAAC,iBAAiB,GAAG,iBAAiB,GAAG,gBAAgB,CAAC,KACpE,IAAI,CAAC;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,CAAC,OAAO,WAAW,wBAAyB,SAAQ,SAAS,EAAE,cAAc;IACjF,8BAA8B;IAC9B,KAAK,EAAE,4BAA4B,EAAE,CAAC;IACtC;;SAEK;IACL,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uCAAuC;IACvC,aAAa,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC/C;;SAEK;IACL,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,WAAW,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.types.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport type { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface IntelligentGuidanceItemProps {\n /** Unique id for item */\n id: string;\n /** The label text of the item. */\n label: string;\n /** Name of the icon (to be selected from default Pega icon set) */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /** Click handler for the action button. */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /** Dismiss handler for the action button. */\n onDismiss?: (\n id: IntelligentGuidanceItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Flag that indicates if item is new\n * @default false\n */\n new?: boolean;\n}\n\nexport default interface IntelligentGuidanceProps extends BaseProps, NoChildrenProp {\n /** List of guidance items. */\n items: IntelligentGuidanceItemProps[];\n /** List of guidance previous items. */\n previousItems?: IntelligentGuidanceItemProps[];\n /** Header text. */\n heading: string;\n /** Flag that indicates if intelligent guidance is collapsed */\n isCollapsed: boolean;\n /** Callback when expand/collapse button is clicked */\n onExpandCollapse: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"IntelligentGuidance.types.js","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport type { BaseProps, IconProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface IntelligentGuidanceItemProps {\n /** Unique id for item */\n id: string;\n /** The label text of the item. */\n label: string;\n /** Name of the icon (to be selected from default Pega icon set) */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /** Click handler for the action button. */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /** Dismiss handler for the action button. */\n onDismiss?: (\n id: IntelligentGuidanceItemProps['id'],\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Flag that indicates if item is new\n * @default false\n */\n new?: boolean;\n}\n\nexport default interface IntelligentGuidanceProps extends BaseProps, NoChildrenProp {\n /** List of guidance items. */\n items: IntelligentGuidanceItemProps[];\n /** Display label for the list of guidance items. The default value is a locale translation of 'Current'\n * @default 'Current'\n * */\n itemsLabel?: string;\n /** List of guidance previous items. */\n previousItems?: IntelligentGuidanceItemProps[];\n /** Display label for the list of previous guidance items. The default value is a locale translation of 'Previous'\n * @default 'Previous'\n * */\n previousItemsLabel?: string;\n /** Header text. */\n heading: string;\n /** Flag that indicates if intelligent guidance is collapsed */\n isCollapsed: boolean;\n /** Callback when expand/collapse button is clicked */\n onExpandCollapse: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "10.0.0-build.5.2",
3
+ "version": "10.0.0-build.5.3",
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.5.2",
18
- "@pega/cosmos-react-rte": "10.0.0-build.5.2",
17
+ "@pega/cosmos-react-core": "10.0.0-build.5.3",
18
+ "@pega/cosmos-react-rte": "10.0.0-build.5.3",
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",