@pega/cosmos-react-work 4.0.0-dev.13.0 → 4.0.0-dev.14.1

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 (89) hide show
  1. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts +7 -21
  2. package/lib/components/AppAnnouncement/AppAnnouncement.d.ts.map +1 -1
  3. package/lib/components/AppAnnouncement/AppAnnouncement.js +2 -1
  4. package/lib/components/AppAnnouncement/AppAnnouncement.js.map +1 -1
  5. package/lib/components/CasePreview/CasePreview.d.ts +1 -3
  6. package/lib/components/CasePreview/CasePreview.d.ts.map +1 -1
  7. package/lib/components/CasePreview/CasePreview.js.map +1 -1
  8. package/lib/components/CaseView/CaseHeader/CaseHeader.d.ts.map +1 -0
  9. package/lib/components/CaseView/CaseHeader/CaseHeader.js +132 -0
  10. package/lib/components/CaseView/CaseHeader/CaseHeader.js.map +1 -0
  11. package/lib/components/CaseView/CaseHeader/Summary.d.ts +6 -0
  12. package/lib/components/CaseView/CaseHeader/Summary.d.ts.map +1 -0
  13. package/lib/components/CaseView/CaseHeader/Summary.js +186 -0
  14. package/lib/components/CaseView/CaseHeader/Summary.js.map +1 -0
  15. package/lib/components/CaseView/CaseSummary.d.ts.map +1 -1
  16. package/lib/components/CaseView/CaseSummary.js +3 -3
  17. package/lib/components/CaseView/CaseSummary.js.map +1 -1
  18. package/lib/components/CaseView/CaseView.d.ts.map +1 -1
  19. package/lib/components/CaseView/CaseView.js +38 -9
  20. package/lib/components/CaseView/CaseView.js.map +1 -1
  21. package/lib/components/CaseView/CaseView.styles.d.ts +39 -22
  22. package/lib/components/CaseView/CaseView.styles.d.ts.map +1 -1
  23. package/lib/components/CaseView/CaseView.styles.js +163 -24
  24. package/lib/components/CaseView/CaseView.styles.js.map +1 -1
  25. package/lib/components/CaseView/CaseView.test-ids.d.ts +1 -1
  26. package/lib/components/CaseView/CaseView.test-ids.d.ts.map +1 -1
  27. package/lib/components/CaseView/CaseView.test-ids.js +1 -0
  28. package/lib/components/CaseView/CaseView.test-ids.js.map +1 -1
  29. package/lib/components/CaseView/CaseView.types.d.ts +16 -18
  30. package/lib/components/CaseView/CaseView.types.d.ts.map +1 -1
  31. package/lib/components/CaseView/CaseView.types.js.map +1 -1
  32. package/lib/components/CaseView/UtilitiesSummary.d.ts +0 -1
  33. package/lib/components/CaseView/UtilitiesSummary.d.ts.map +1 -1
  34. package/lib/components/CaseView/UtilitiesSummary.js.map +1 -1
  35. package/lib/components/CaseView/index.d.ts +0 -3
  36. package/lib/components/CaseView/index.d.ts.map +1 -1
  37. package/lib/components/CaseView/index.js +0 -3
  38. package/lib/components/CaseView/index.js.map +1 -1
  39. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts +1 -3
  40. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.d.ts.map +1 -1
  41. package/lib/components/ConfigurableLayout/ConfigurableLayout.types.js.map +1 -1
  42. package/lib/components/Confirmation/Confirmation.d.ts +1 -1
  43. package/lib/components/Confirmation/Confirmation.d.ts.map +1 -1
  44. package/lib/components/Confirmation/Confirmation.js.map +1 -1
  45. package/lib/components/Details/Details.d.ts.map +1 -1
  46. package/lib/components/Details/Details.js +10 -21
  47. package/lib/components/Details/Details.js.map +1 -1
  48. package/lib/components/Details/Details.styles.d.ts.map +1 -1
  49. package/lib/components/Details/Details.styles.js +22 -10
  50. package/lib/components/Details/Details.styles.js.map +1 -1
  51. package/lib/components/Glimpse/Glimpse.d.ts +10 -10
  52. package/lib/components/Glimpse/Glimpse.d.ts.map +1 -1
  53. package/lib/components/Glimpse/Glimpse.js +7 -17
  54. package/lib/components/Glimpse/Glimpse.js.map +1 -1
  55. package/lib/components/Glimpse/index.d.ts +1 -1
  56. package/lib/components/Glimpse/index.d.ts.map +1 -1
  57. package/lib/components/Glimpse/index.js +0 -1
  58. package/lib/components/Glimpse/index.js.map +1 -1
  59. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts +3 -9
  60. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.d.ts.map +1 -1
  61. package/lib/components/IntelligentGuidance/IntelligentGuidance.types.js.map +1 -1
  62. package/lib/components/SearchResults/SearchResults.types.d.ts +2 -2
  63. package/lib/components/SearchResults/SearchResults.types.js.map +1 -1
  64. package/lib/components/Stakeholders/Stakeholders.types.d.ts +4 -12
  65. package/lib/components/Stakeholders/Stakeholders.types.d.ts.map +1 -1
  66. package/lib/components/Stakeholders/Stakeholders.types.js.map +1 -1
  67. package/lib/components/Tags/Tags.d.ts +1 -1
  68. package/lib/components/Tags/Tags.d.ts.map +1 -1
  69. package/lib/components/Tags/Tags.js +1 -17
  70. package/lib/components/Tags/Tags.js.map +1 -1
  71. package/lib/components/Tasks/Tasks.d.ts +13 -12
  72. package/lib/components/Tasks/Tasks.d.ts.map +1 -1
  73. package/lib/components/Tasks/Tasks.js +7 -9
  74. package/lib/components/Tasks/Tasks.js.map +1 -1
  75. package/lib/components/Tasks/Tasks.test-ids.d.ts +1 -1
  76. package/lib/components/Tasks/Tasks.test-ids.d.ts.map +1 -1
  77. package/lib/components/Tasks/Tasks.test-ids.js +1 -5
  78. package/lib/components/Tasks/Tasks.test-ids.js.map +1 -1
  79. package/lib/components/Tasks/index.d.ts +3 -5
  80. package/lib/components/Tasks/index.d.ts.map +1 -1
  81. package/lib/components/Tasks/index.js +1 -0
  82. package/lib/components/Tasks/index.js.map +1 -1
  83. package/lib/components/Timeline/Timeline.types.d.ts +4 -4
  84. package/lib/components/Timeline/Timeline.types.js.map +1 -1
  85. package/package.json +5 -3
  86. package/lib/components/CaseView/CaseHeader.d.ts.map +0 -1
  87. package/lib/components/CaseView/CaseHeader.js +0 -49
  88. package/lib/components/CaseView/CaseHeader.js.map +0 -1
  89. /package/lib/components/CaseView/{CaseHeader.d.ts → CaseHeader/CaseHeader.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigurableLayout.types.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type widthConfigOptions from './options';\n\n/**\n * Type for config of a single ConfigurableLayout item.\n */\nexport interface Config {\n /** Unique identifier in render region */\n id: string;\n /** Element to render */\n content: JSX.Element;\n /** Config for element */\n layoutConfig: {\n /** Responsive width option */\n width: keyof typeof widthConfigOptions;\n /**\n * Fills remaining space if true, else does not grow beyond `width` value.\n * @default true\n */\n fillAvailable?: boolean;\n /** Flex basis (minimum fixed width) of element as:\n * - a numeric value to be applied in __pixels__\n * - a tuple of a numeric value and string unit\n */\n minWidth?: number | [number, 'px' | 'ch' | 'rem' | 'em'];\n };\n}\n\nexport interface ConfigurableLayoutProps {\n /** Array of configs for individual layout cells */\n items: Config[];\n /** Arrangement properties */\n arrangement?: {\n /** Defines the arrangement size of the given ConfigurableLayout.\n * Used to determine what width to apply to the given item when the arrangement is applied,\n * with the following mapping:\n * - 'narrow' --> applies 'full' width\n * - 'main' --> applies configured width\n * - 'half' --> applies double the configured width, or 'full' width (whichever is smaller)\n */\n size: 'narrow' | 'main' | 'half';\n /** Indicates when the ConfigurableLayout has wrapped to the full width of it's container */\n hasWrapped: boolean;\n };\n}\n"]}
1
+ {"version":3,"file":"ConfigurableLayout.types.js","sourceRoot":"","sources":["../../../src/components/ConfigurableLayout/ConfigurableLayout.types.ts"],"names":[],"mappings":"","sourcesContent":["import type widthConfigOptions from './options';\n\n/** Type for config of a single ConfigurableLayout item. */\nexport interface Config {\n /** Unique identifier in render region */\n id: string;\n /** Element to render */\n content: JSX.Element;\n /** Config for element */\n layoutConfig: {\n /** Responsive width option */\n width: keyof typeof widthConfigOptions;\n /**\n * Fills remaining space if true, else does not grow beyond `width` value.\n * @default true\n */\n fillAvailable?: boolean;\n /** Flex basis (minimum fixed width) of element as:\n * - a numeric value to be applied in __pixels__\n * - a tuple of a numeric value and string unit\n */\n minWidth?: number | [number, 'px' | 'ch' | 'rem' | 'em'];\n };\n}\n\nexport interface ConfigurableLayoutProps {\n /** Array of configs for individual layout cells */\n items: Config[];\n /** Arrangement properties */\n arrangement?: {\n /** Defines the arrangement size of the given ConfigurableLayout.\n * Used to determine what width to apply to the given item when the arrangement is applied,\n * with the following mapping:\n * - 'narrow' --> applies 'full' width\n * - 'main' --> applies configured width\n * - 'half' --> applies double the configured width, or 'full' width (whichever is smaller)\n */\n size: 'narrow' | 'main' | 'half';\n /** Indicates when the ConfigurableLayout has wrapped to the full width of it's container */\n hasWrapped: boolean;\n };\n}\n"]}
@@ -5,7 +5,7 @@ export interface ConfirmationProps extends NoChildrenProp {
5
5
  title?: string;
6
6
  /** Region for a Field Value List component */
7
7
  details?: ReactNode;
8
- /** Array of React nodes to be put into a list */
8
+ /** Array of React nodes to be put into a list */
9
9
  whatsNext?: UnorderedListProps['items'];
10
10
  /** Region for a Tasks component */
11
11
  tasks?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAGL,YAAY,EAOZ,kBAAkB,EAClB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAQjC,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kDAAkD;IAClD,SAAS,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,mCAAmC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAqCrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Confirmation.d.ts","sourceRoot":"","sources":["../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAGL,YAAY,EAOZ,kBAAkB,EAClB,cAAc,EACf,MAAM,yBAAyB,CAAC;AAQjC,MAAM,WAAW,iBAAkB,SAAQ,cAAc;IACvD,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iDAAiD;IACjD,SAAS,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACxC,mCAAmC;IACnC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAqCrE,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAsD,MAAM,OAAO,CAAC;AACvF,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EACL,IAAI,EACJ,WAAW,EAEX,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,aAAa,EACb,MAAM,EACN,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,mBAAmB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA;;CAEhD,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC;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Ref, FunctionComponent, PropsWithoutRef, ReactNode, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Card,\n CardContent,\n ForwardProps,\n Flex,\n Text,\n useI18n,\n UnorderedList,\n Button,\n defaultThemeProp,\n UnorderedListProps,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\n\nconst StyledWhatsNextList = styled(UnorderedList)`\n padding-inline-start: 0;\n`;\n\nStyledWhatsNextList.defaultProps = defaultThemeProp;\n\nexport interface ConfirmationProps extends NoChildrenProp {\n /** The title of the confirmation */\n title?: string;\n /** Region for a Field Value List component */\n details?: ReactNode;\n /** Array of React nodes to be put into a list */\n whatsNext?: UnorderedListProps['items'];\n /** Region for a Tasks component */\n tasks?: ReactNode;\n /** Called when the done/close button is clicked */\n onClose?: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLElement>;\n}\n\nconst Confirmation: FunctionComponent<ConfirmationProps & ForwardProps> = forwardRef(\n (\n { title, details, whatsNext, tasks, onClose, ...restProps }: PropsWithoutRef<ConfirmationProps>,\n ref\n ) => {\n const t = useI18n();\n\n return (\n <Card {...restProps} ref={ref}>\n <CardContent>\n <Flex container={{ gap: 3, direction: 'column' }}>\n {title && <Text variant='h2'>{title}</Text>}\n {details && (\n <Flex container={{ gap: 1, direction: 'column' }}>\n <Text variant='h3'>{t('confirmation_details')}</Text>\n {details}\n </Flex>\n )}\n {whatsNext && (\n <Flex container={{ gap: 1, direction: 'column' }}>\n <Text variant='h3'>{t('confirmation_whats_next')}</Text>\n <StyledWhatsNextList items={whatsNext} as={StyledWhatsNextList} />\n </Flex>\n )}\n {tasks}\n {onClose && (\n <Flex container={{ justify: 'end' }}>\n <Button onClick={onClose} variant='primary'>\n {t('done')}\n </Button>\n </Flex>\n )}\n </Flex>\n </CardContent>\n </Card>\n );\n }\n);\n\nexport default Confirmation;\n"]}
1
+ {"version":3,"file":"Confirmation.js","sourceRoot":"","sources":["../../../src/components/Confirmation/Confirmation.tsx"],"names":[],"mappings":";AAAA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EAAE,EAAE,EAAE,mBAAmB,GAAI,IAC7D,CACR,EACA,KAAK,EACL,OAAO,IAAI,CACV,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YACjC,KAAC,MAAM,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAC,SAAS,YACxC,CAAC,CAAC,MAAM,CAAC,GACH,GACJ,CACR,IACI,GACK,GACT,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, ReactNode, Ref } from 'react';\nimport styled from 'styled-components';\n\nimport {\n Card,\n CardContent,\n ForwardProps,\n Flex,\n Text,\n useI18n,\n UnorderedList,\n Button,\n defaultThemeProp,\n UnorderedListProps,\n NoChildrenProp\n} from '@pega/cosmos-react-core';\n\nconst StyledWhatsNextList = styled(UnorderedList)`\n padding-inline-start: 0;\n`;\n\nStyledWhatsNextList.defaultProps = defaultThemeProp;\n\nexport interface ConfirmationProps extends NoChildrenProp {\n /** The title of the confirmation */\n title?: string;\n /** Region for a Field Value List component */\n details?: ReactNode;\n /** Array of React nodes to be put into a list */\n whatsNext?: UnorderedListProps['items'];\n /** Region for a Tasks component */\n tasks?: ReactNode;\n /** Called when the done/close button is clicked */\n onClose?: () => void;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLElement>;\n}\n\nconst Confirmation: FunctionComponent<ConfirmationProps & ForwardProps> = forwardRef(\n (\n { title, details, whatsNext, tasks, onClose, ...restProps }: PropsWithoutRef<ConfirmationProps>,\n ref\n ) => {\n const t = useI18n();\n\n return (\n <Card {...restProps} ref={ref}>\n <CardContent>\n <Flex container={{ gap: 3, direction: 'column' }}>\n {title && <Text variant='h2'>{title}</Text>}\n {details && (\n <Flex container={{ gap: 1, direction: 'column' }}>\n <Text variant='h3'>{t('confirmation_details')}</Text>\n {details}\n </Flex>\n )}\n {whatsNext && (\n <Flex container={{ gap: 1, direction: 'column' }}>\n <Text variant='h3'>{t('confirmation_whats_next')}</Text>\n <StyledWhatsNextList items={whatsNext} as={StyledWhatsNextList} />\n </Flex>\n )}\n {tasks}\n {onClose && (\n <Flex container={{ justify: 'end' }}>\n <Button onClick={onClose} variant='primary'>\n {t('done')}\n </Button>\n </Flex>\n )}\n </Flex>\n </CardContent>\n </Card>\n );\n }\n);\n\nexport default Confirmation;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EAEF,SAAS,EACT,GAAG,EAKJ,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,YAAY,EAMb,MAAM,yBAAyB,CAAC;AAWjC,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,GAAG,YAAY,CA0L5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,EAAE,EAEF,SAAS,EACT,GAAG,EAKJ,MAAM,OAAO,CAAC;AAGf,OAAO,EAKL,YAAY,EAOb,MAAM,yBAAyB,CAAC;AAWjC,MAAM,WAAW,YAAY;IAC3B,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,QAAA,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,GAAG,YAAY,CAoL5C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, Fragment, useState, useContext, useEffect, useMemo } from 'react';
3
3
  import { remToPx } from 'polished';
4
- import { Text, useBreakpoint, useConsolidatedRef, useTheme, ExpandCollapse, Button, Flex, Icon, useI18n } from '@pega/cosmos-react-core';
4
+ import { Text, useBreakpoint, useConsolidatedRef, useTheme, ExpandCollapse, Button, Flex, Icon, useChToPxConversionFactor, useI18n } from '@pega/cosmos-react-core';
5
5
  import DetailsContext from './DetailsContext';
6
6
  import { StyledFieldValueGroupLabel, StyledDetails, StyledDetailList, StyledHighlightedDetailList, flexGapProp } from './Details.styles';
7
7
  const Details = forwardRef(({ highlightedData, children, name, columnCount = 1, nested = false, asFlex = false, valueComparison = false, collapsible = false }, ref) => {
8
- const { longestLabelLength, mobileView, depth, ...context } = useContext(DetailsContext);
9
- const { base: { 'content-width': { sm } } } = useTheme();
8
+ const { longestLabelLength, mobileView: inMobileView, depth, ...context } = useContext(DetailsContext);
9
+ const { base: { 'content-width': { sm: smContentWidth } } } = useTheme();
10
10
  const isSmallOrAbove = useBreakpoint('sm');
11
11
  const listRef = useConsolidatedRef(ref);
12
12
  const isXsContentWidthOrAbove = useBreakpoint('xs', {
@@ -26,26 +26,15 @@ const Details = forwardRef(({ highlightedData, children, name, columnCount = 1,
26
26
  const [open, setOpen] = useState(true);
27
27
  const labelLength = Math.max(14, Math.min(longestLabelLength ?? 16, 40));
28
28
  const headingDepth = depth ?? 1;
29
- const applyMobileView = asFlex
30
- ? mobileView ||
31
- (flexRow && flexContextMobileView) ||
32
- !isSmallOrAbove ||
33
- !isXsContentWidthOrAbove
34
- : mobileView || !isSmallOrAbove || !isXsContentWidthOrAbove;
35
- const chToPxConversionFactor = useMemo(() => {
36
- const chToPxDiv = document.createElement('div');
37
- chToPxDiv.style.width = '1ch';
38
- document.body.append(chToPxDiv);
39
- const conversionFactor = chToPxDiv.offsetWidth;
40
- chToPxDiv.remove();
41
- return conversionFactor;
42
- }, []);
43
- /**
44
- * Mount resize observer to update flex context mobile view & run initial check.
45
- */
29
+ const applyMobileView = inMobileView ||
30
+ !isSmallOrAbove ||
31
+ !isXsContentWidthOrAbove ||
32
+ (asFlex && flexRow && flexContextMobileView);
33
+ const chToPxConversionFactor = useChToPxConversionFactor();
34
+ // Mount resize observer to update flex context mobile view & run initial check.
46
35
  useEffect(() => {
47
36
  const checkBreakpoint = (elementWidth) => {
48
- const minWidthPx = parseInt(sm, 10) * chToPxConversionFactor;
37
+ const minWidthPx = parseInt(smContentWidth, 10) * chToPxConversionFactor;
49
38
  const oneRemInPx = parseInt(remToPx(1), 10);
50
39
  const colGapPxAllowance = oneRemInPx * (0.5 * flexGapProp) * (columnCount - 1);
51
40
  const mobileViewBreakpoint = minWidthPx * columnCount + colGapPxAllowance;
@@ -1 +1 @@
1
- {"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mapp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\n FC,\n Fragment,\n ReactNode,\n Ref,\n useState,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport { remToPx } from 'polished';\n\nimport {\n Text,\n useBreakpoint,\n useConsolidatedRef,\n useTheme,\n ForwardProps,\n ExpandCollapse,\n Button,\n Flex,\n Icon,\n useI18n\n} from '@pega/cosmos-react-core';\n\nimport DetailsContext from './DetailsContext';\nimport {\n StyledFieldValueGroupLabel,\n StyledDetails,\n StyledDetailList,\n StyledHighlightedDetailList,\n flexGapProp\n} from './Details.styles';\n\nexport interface DetailsProps {\n highlightedData?: ReactNode[];\n children?: ReactNode;\n /** Text used as heading of list */\n name?: string;\n /**\n * Whether the items children can be collapsed (only applies if name is provided)\n * @default false\n */\n collapsible?: boolean;\n /**\n * Number of columns in detail layout\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /** Whether detail list is rendering within another detail list\n * @default false\n */\n nested?: boolean;\n /** Whether detail list is rendering multiple sub-lists in columns (passed as children)\n * @default false\n */\n asFlex?: boolean;\n /** Whether to apply `value-comparison` styles to list items\n * @default false\n */\n valueComparison?: boolean;\n ref?: Ref<HTMLDListElement>;\n}\n\nconst Details: FC<DetailsProps & ForwardProps> = forwardRef(\n (\n {\n highlightedData,\n children,\n name,\n columnCount = 1,\n nested = false,\n asFlex = false,\n valueComparison = false,\n collapsible = false\n },\n ref\n ) => {\n const { longestLabelLength, mobileView, depth, ...context } = useContext(DetailsContext);\n const {\n base: {\n 'content-width': { sm }\n }\n } = useTheme();\n const isSmallOrAbove = useBreakpoint('sm');\n const listRef = useConsolidatedRef<HTMLDListElement>(ref);\n const isXsContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const isMdContentWidthOrAbove = useBreakpoint('md', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const flexRow = useBreakpoint(columnCount > 2 ? 'lg' : 'md', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const t = useI18n();\n\n const [flexContextMobileView, setFlexContextMobileView] = useState(false);\n const [open, setOpen] = useState(true);\n\n const labelLength = Math.max(14, Math.min(longestLabelLength ?? 16, 40));\n const headingDepth = depth ?? 1;\n const applyMobileView = asFlex\n ? mobileView ||\n (flexRow && flexContextMobileView) ||\n !isSmallOrAbove ||\n !isXsContentWidthOrAbove\n : mobileView || !isSmallOrAbove || !isXsContentWidthOrAbove;\n\n const chToPxConversionFactor = useMemo(() => {\n const chToPxDiv = document.createElement('div');\n chToPxDiv.style.width = '1ch';\n document.body.append(chToPxDiv);\n const conversionFactor = chToPxDiv.offsetWidth;\n chToPxDiv.remove();\n\n return conversionFactor;\n }, []);\n\n /**\n * Mount resize observer to update flex context mobile view & run initial check.\n */\n useEffect(() => {\n const checkBreakpoint = (elementWidth: number) => {\n const minWidthPx = parseInt(sm, 10) * chToPxConversionFactor;\n const oneRemInPx = parseInt(remToPx(1), 10);\n const colGapPxAllowance = oneRemInPx * (0.5 * flexGapProp) * (columnCount - 1);\n const mobileViewBreakpoint = minWidthPx * columnCount + colGapPxAllowance;\n\n setFlexContextMobileView(elementWidth < mobileViewBreakpoint);\n };\n const resizeObserver = new ResizeObserver(entries => {\n const containerPxWidth = entries[0].contentRect.width;\n checkBreakpoint(containerPxWidth);\n });\n\n if (listRef.current) {\n checkBreakpoint(listRef.current.offsetWidth);\n resizeObserver.observe(listRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [listRef, columnCount]);\n\n const contextValue = useMemo(() => {\n return {\n mobileView: applyMobileView,\n depth: name ? headingDepth + 1 : headingDepth,\n longestLabelLength,\n ...context\n };\n }, [applyMobileView, name, headingDepth, longestLabelLength, context]);\n\n const nameText = useMemo(() => {\n return (\n <Text variant={`h${Math.min(headingDepth, 6)}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'}>\n {name}\n </Text>\n );\n }, [name, headingDepth]);\n\n const details = useMemo(() => {\n return (\n <>\n {highlightedData && (\n <>\n <Flex\n as={StyledHighlightedDetailList}\n forwardedAs={nested ? 'div' : 'dl'}\n container={{ wrap: 'wrap', colGap: 10, rowGap: 1, alignItems: 'start' }}\n >\n {highlightedData.map((child, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Fragment key={i}>{child}</Fragment>\n ))}\n </Flex>\n\n <hr />\n </>\n )}\n\n {children ? (\n <StyledDetailList\n ref={listRef}\n as={nested ? 'div' : 'dl'}\n columnCount={columnCount}\n labelLength={labelLength}\n stacked={applyMobileView}\n nested={nested}\n flex={asFlex}\n wrapped={asFlex ? !flexRow : false}\n variant={valueComparison ? 'value-comparison' : undefined}\n narrow={!isMdContentWidthOrAbove}\n >\n {children}\n </StyledDetailList>\n ) : null}\n </>\n );\n }, [\n highlightedData,\n nested,\n columnCount,\n labelLength,\n applyMobileView,\n name,\n asFlex,\n flexRow,\n valueComparison,\n children\n ]);\n\n if (!name && !children && !highlightedData) return null;\n\n return (\n <DetailsContext.Provider value={contextValue}>\n <StyledDetails>\n {name && (\n <StyledFieldValueGroupLabel>\n {collapsible ? (\n <Button\n type='button'\n variant='text'\n onClick={() => {\n setOpen(cur => !cur);\n }}\n aria-expanded={open ? 'true' : 'false'}\n aria-label={t(open ? 'collapse_noun' : 'expand_noun', [name])}\n >\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as='span'>\n <Icon name='caret-right' />\n {nameText}\n </Flex>\n </Button>\n ) : (\n nameText\n )}\n </StyledFieldValueGroupLabel>\n )}\n\n {collapsible ? <ExpandCollapse collapsed={!open}>{details}</ExpandCollapse> : details}\n </StyledDetails>\n </DetailsContext.Provider>\n );\n }\n);\n\nexport default Details;\n"]}
1
+ {"version":3,"file":"Details.js","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAEV,QAAQ,EAGR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,OAAO,EACR,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC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OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;wBACvB,CAAC,mBACc,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,gBAC1B,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC,CAAC,YAE7D,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,EAAC,MAAM,aAC5D,KAAC,IAAI,IAAC,IAAI,EAAC,aAAa,GAAG,EAC1B,QAAQ,IACJ,GACA,CACV,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GAC0B,CAC9B,EAEA,WAAW,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,SAAS,EAAE,CAAC,IAAI,YAAG,OAAO,GAAkB,CAAC,CAAC,CAAC,OAAO,IACvE,GACQ,CAC3B,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n FC,\n Fragment,\n ReactNode,\n Ref,\n useState,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport { remToPx } from 'polished';\n\nimport {\n Text,\n useBreakpoint,\n useConsolidatedRef,\n useTheme,\n ForwardProps,\n ExpandCollapse,\n Button,\n Flex,\n Icon,\n useChToPxConversionFactor,\n useI18n\n} from '@pega/cosmos-react-core';\n\nimport DetailsContext from './DetailsContext';\nimport {\n StyledFieldValueGroupLabel,\n StyledDetails,\n StyledDetailList,\n StyledHighlightedDetailList,\n flexGapProp\n} from './Details.styles';\n\nexport interface DetailsProps {\n highlightedData?: ReactNode[];\n children?: ReactNode;\n /** Text used as heading of list */\n name?: string;\n /**\n * Whether the items children can be collapsed (only applies if name is provided)\n * @default false\n */\n collapsible?: boolean;\n /**\n * Number of columns in detail layout\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /** Whether detail list is rendering within another detail list\n * @default false\n */\n nested?: boolean;\n /** Whether detail list is rendering multiple sub-lists in columns (passed as children)\n * @default false\n */\n asFlex?: boolean;\n /** Whether to apply `value-comparison` styles to list items\n * @default false\n */\n valueComparison?: boolean;\n ref?: Ref<HTMLDListElement>;\n}\n\nconst Details: FC<DetailsProps & ForwardProps> = forwardRef(\n (\n {\n highlightedData,\n children,\n name,\n columnCount = 1,\n nested = false,\n asFlex = false,\n valueComparison = false,\n collapsible = false\n },\n ref\n ) => {\n const {\n longestLabelLength,\n mobileView: inMobileView,\n depth,\n ...context\n } = useContext(DetailsContext);\n const {\n base: {\n 'content-width': { sm: smContentWidth }\n }\n } = useTheme();\n const isSmallOrAbove = useBreakpoint('sm');\n const listRef = useConsolidatedRef<HTMLDListElement>(ref);\n const isXsContentWidthOrAbove = useBreakpoint('xs', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const isMdContentWidthOrAbove = useBreakpoint('md', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const flexRow = useBreakpoint(columnCount > 2 ? 'lg' : 'md', {\n breakpointRef: listRef,\n themeProp: 'content-width'\n });\n const t = useI18n();\n\n const [flexContextMobileView, setFlexContextMobileView] = useState(false);\n const [open, setOpen] = useState(true);\n\n const labelLength = Math.max(14, Math.min(longestLabelLength ?? 16, 40));\n const headingDepth = depth ?? 1;\n const applyMobileView =\n inMobileView ||\n !isSmallOrAbove ||\n !isXsContentWidthOrAbove ||\n (asFlex && flexRow && flexContextMobileView);\n\n const chToPxConversionFactor = useChToPxConversionFactor();\n\n // Mount resize observer to update flex context mobile view & run initial check.\n useEffect(() => {\n const checkBreakpoint = (elementWidth: number) => {\n const minWidthPx = parseInt(smContentWidth, 10) * chToPxConversionFactor;\n const oneRemInPx = parseInt(remToPx(1), 10);\n const colGapPxAllowance = oneRemInPx * (0.5 * flexGapProp) * (columnCount - 1);\n const mobileViewBreakpoint = minWidthPx * columnCount + colGapPxAllowance;\n\n setFlexContextMobileView(elementWidth < mobileViewBreakpoint);\n };\n const resizeObserver = new ResizeObserver(entries => {\n const containerPxWidth = entries[0].contentRect.width;\n checkBreakpoint(containerPxWidth);\n });\n\n if (listRef.current) {\n checkBreakpoint(listRef.current.offsetWidth);\n resizeObserver.observe(listRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [listRef, columnCount]);\n\n const contextValue = useMemo(() => {\n return {\n mobileView: applyMobileView,\n depth: name ? headingDepth + 1 : headingDepth,\n longestLabelLength,\n ...context\n };\n }, [applyMobileView, name, headingDepth, longestLabelLength, context]);\n\n const nameText = useMemo(() => {\n return (\n <Text variant={`h${Math.min(headingDepth, 6)}` as 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'}>\n {name}\n </Text>\n );\n }, [name, headingDepth]);\n\n const details = useMemo(() => {\n return (\n <>\n {highlightedData && (\n <>\n <Flex\n as={StyledHighlightedDetailList}\n forwardedAs={nested ? 'div' : 'dl'}\n container={{ wrap: 'wrap', colGap: 10, rowGap: 1, alignItems: 'start' }}\n >\n {highlightedData.map((child, i) => (\n // eslint-disable-next-line react/no-array-index-key\n <Fragment key={i}>{child}</Fragment>\n ))}\n </Flex>\n\n <hr />\n </>\n )}\n\n {children ? (\n <StyledDetailList\n ref={listRef}\n as={nested ? 'div' : 'dl'}\n columnCount={columnCount}\n labelLength={labelLength}\n stacked={applyMobileView}\n nested={nested}\n flex={asFlex}\n wrapped={asFlex ? !flexRow : false}\n variant={valueComparison ? 'value-comparison' : undefined}\n narrow={!isMdContentWidthOrAbove}\n >\n {children}\n </StyledDetailList>\n ) : null}\n </>\n );\n }, [\n highlightedData,\n nested,\n columnCount,\n labelLength,\n applyMobileView,\n name,\n asFlex,\n flexRow,\n valueComparison,\n children\n ]);\n\n if (!name && !children && !highlightedData) return null;\n\n return (\n <DetailsContext.Provider value={contextValue}>\n <StyledDetails>\n {name && (\n <StyledFieldValueGroupLabel>\n {collapsible ? (\n <Button\n type='button'\n variant='text'\n onClick={() => {\n setOpen(cur => !cur);\n }}\n aria-expanded={open ? 'true' : 'false'}\n aria-label={t(open ? 'collapse_noun' : 'expand_noun', [name])}\n >\n <Flex container={{ alignItems: 'center', gap: 0.5 }} as='span'>\n <Icon name='caret-right' />\n {nameText}\n </Flex>\n </Button>\n ) : (\n nameText\n )}\n </StyledFieldValueGroupLabel>\n )}\n\n {collapsible ? <ExpandCollapse collapsed={!open}>{details}</ExpandCollapse> : details}\n </StyledDetails>\n </DetailsContext.Provider>\n );\n }\n);\n\nexport default Details;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Details.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAML,yBAAyB,EAM1B,MAAM,yBAAyB,CAAC;AAEjC,UAAU,qBAAsB,SAAQ,yBAAyB;IAC/D,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;CACrB;AAUD,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAa3B,CAAC;AAEF,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,eAAO,MAAM,0BAA0B,6EAyBrC,CAAC;AAIH,eAAO,MAAM,2BAA2B,4EAuBtC,CAAC;AAIH,eAAO,MAAM,aAAa,6EAKxB,CAAC;AAIH,eAAO,MAAM,gBAAgB,uQA6G5B,CAAC"}
1
+ {"version":3,"file":"Details.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAe,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAML,yBAAyB,EAM1B,MAAM,yBAAyB,CAAC;AAEjC,UAAU,qBAAsB,SAAQ,yBAAyB;IAC/D,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oDAAoD;IACpD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;CACrB;AAUD,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAa3B,CAAC;AAEF,eAAO,MAAM,WAAW,MAAM,CAAC;AAE/B,eAAO,MAAM,0BAA0B,6EAyBrC,CAAC;AAIH,eAAO,MAAM,2BAA2B,4EAuBtC,CAAC;AAIH,eAAO,MAAM,aAAa,6EAAe,CAAC;AAE1C,eAAO,MAAM,gBAAgB,uQA+H5B,CAAC"}
@@ -25,7 +25,7 @@ export const StyledFieldValueGroupLabel = styled.div(({ theme }) => {
25
25
  grid-column-start: 1;
26
26
  grid-column-end: -1;
27
27
  margin-block-end: calc(0.5 * ${spacing});
28
- margin-block-start: calc(3 * ${spacing});
28
+ margin-block-start: calc(1.5 * ${spacing});
29
29
 
30
30
  ${StyledButton} ${StyledIcon} {
31
31
  transition: transform ${animation.speed} ${animation.timing.ease};
@@ -63,17 +63,12 @@ export const StyledHighlightedDetailList = styled.dl(({ theme }) => {
63
63
  `;
64
64
  });
65
65
  StyledHighlightedDetailList.defaultProps = defaultThemeProp;
66
- export const StyledDetails = styled.div(({ theme }) => {
67
- return css `
68
- grid-column: 1 / -1;
69
- margin-block-end: ${theme.base.spacing};
70
- `;
71
- });
72
- StyledDetails.defaultProps = defaultThemeProp;
66
+ export const StyledDetails = styled.div ``;
73
67
  export const StyledDetailList = styled(StyledFieldValueList)(({ stacked, flex, nested, labelLength, variant, theme, wrapped = false, columnCount = 1, narrow = false }) => {
74
68
  const { base: { spacing } } = theme;
75
69
  const isValueComparison = variant === 'value-comparison';
76
70
  const containerWidthCh = colCountChWidth[columnCount].containerWidth;
71
+ const columnWidthCh = colCountChWidth[columnCount].colWidth;
77
72
  const containerWidthMinusLabel = `${containerWidthCh - (labelLength ?? 0)}ch`;
78
73
  return css `
79
74
  /* Top Level Styles */
@@ -128,7 +123,17 @@ export const StyledDetailList = styled(StyledFieldValueList)(({ stacked, flex, n
128
123
  column-gap: 0;
129
124
  row-gap: calc(0.5 * ${spacing});
130
125
  max-width: ${containerWidthCh}ch;
126
+
127
+ > dd {
128
+ display: flex;
129
+ flex-direction: column;
130
+ justify-content: flex-end;
131
+ }
131
132
  `}
133
+
134
+ > ${StyledDetails} {
135
+ grid-column: 1 / -1;
136
+ }
132
137
  `}
133
138
 
134
139
  /* As Flex Container */
@@ -143,15 +148,21 @@ export const StyledDetailList = styled(StyledFieldValueList)(({ stacked, flex, n
143
148
  ${!wrapped &&
144
149
  css `
145
150
  > * {
146
- max-width: ${`${100 / columnCount}%`};
151
+ width: 100%;
152
+ max-width: ${columnWidthCh}%;
147
153
  }
148
154
  `}
155
+
156
+ > ${StyledDetails} {
157
+ width: 100%;
158
+ }
149
159
  `}
150
160
 
151
161
  /* Key / Group Label Spacing */
152
162
  ${stacked &&
163
+ !isValueComparison &&
153
164
  css `
154
- dt {
165
+ > dt {
155
166
  margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});
156
167
  }
157
168
  `}
@@ -159,6 +170,7 @@ export const StyledDetailList = styled(StyledFieldValueList)(({ stacked, flex, n
159
170
  /* Responsive behavior */
160
171
  ${narrow &&
161
172
  !stacked &&
173
+ !isValueComparison &&
162
174
  css `
163
175
  grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(50%, 1fr);
164
176
  `}
@@ -1 +1 @@
1
- {"version":3,"file":"Details.styles.js","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EAEpB,UAAU,EAGV,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC;AAkCjC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAEvC,oDAAoD;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,EAAE;QACH,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,GAAG;KACd;IACD,GAAG,EAAE;QACH,cAAc,EAAE,EAAE,GAAG,CAAC;QACtB,QAAQ,EAAE,EAAE;KACb;IACD,GAAG,EAAE;QACH,cAAc,EAAE,EAAE,GAAG,CAAC;QACtB,QAAQ,EAAE,EAAE;KACb;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACjE,MAAM,EACJ,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,EAC7B,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAE/B,OAAO,GAAG,CAAA;;;;mCAIuB,OAAO;mCACP,OAAO;;MAEpC,YAAY,IAAI,UAAU;8BACF,SAAS,CAAC,KAAK,IAAI,SAAS,CAAC,MAAM,CAA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OAAO;QACR,GAAG,CAAA;8CACqC,WAAW;OAClD;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, DefaultTheme } from 'styled-components';\n\nimport {\n calculateFontSize,\n defaultThemeProp,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledFieldValueList,\n StyledFieldValueListProps,\n StyledIcon,\n FontSize,\n PropsWithDefaults,\n useDirection,\n StyledButton\n} from '@pega/cosmos-react-core';\n\ninterface StyledDetailListProps extends StyledFieldValueListProps {\n /** Whether individual list items all have labels stacks on top */\n stacked?: boolean;\n /** Whether the list is a flex row of other lists */\n flex?: boolean;\n /** Whether the list is nested */\n nested?: boolean;\n /** The character length applied to all list labels */\n labelLength?: number;\n /**\n * Whether the list is wrapped to 1 column\n * @default false\n */\n wrapped?: boolean;\n /**\n * Number of columns in the list\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /**\n * Whether to apply narrow list styles\n * @default false\n */\n narrow?: boolean;\n theme: DefaultTheme;\n}\n\ntype StyledDetailListPropsWithDefaults = PropsWithDefaults<\n StyledDetailListProps,\n 'wrapped' | 'columnCount'\n>;\n\nconst verticalGapSpacingMultiplier = 1;\n\n// colWidth reduces by 20% as column count increases\nexport const colCountChWidth = {\n '1': {\n containerWidth: 100,\n colWidth: 100\n },\n '2': {\n containerWidth: 80 * 2,\n colWidth: 80\n },\n '3': {\n containerWidth: 64 * 3,\n colWidth: 64\n }\n};\n\nexport const flexGapProp = 5.5;\n\nexport const StyledFieldValueGroupLabel = styled.div(({ theme }) => {\n const {\n base: { spacing, animation }\n } = theme;\n const { rtl } = useDirection();\n\n return css`\n width: 100%;\n grid-column-start: 1;\n grid-column-end: -1;\n margin-block-end: calc(0.5 * ${spacing});\n margin-block-start: calc(3 * ${spacing});\n\n ${StyledButton} ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n ${StyledButton}[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n ${StyledButton}[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledFieldValueGroupLabel.defaultProps = defaultThemeProp;\n\nexport const StyledHighlightedDetailList = styled.dl(({ theme }) => {\n const {\n base: { spacing, palette }\n } = theme;\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n max-width: ${colCountChWidth[3].containerWidth}ch;\n padding-block-end: calc(1.5 * ${spacing});\n\n dd {\n font-size: ${fontSize[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n }\n\n + hr {\n border-top: unset;\n border-radius: unset;\n border-style: unset;\n border-bottom: 0.0625rem solid ${palette['border-line']};\n margin-block-end: calc(1.5 * ${spacing});\n }\n `;\n});\n\nStyledHighlightedDetailList.defaultProps = defaultThemeProp;\n\nexport const StyledDetails = styled.div(({ theme }) => {\n return css`\n grid-column: 1 / -1;\n margin-block-end: ${theme.base.spacing};\n `;\n});\n\nStyledDetails.defaultProps = defaultThemeProp;\n\nexport const StyledDetailList = styled(StyledFieldValueList)<StyledDetailListPropsWithDefaults>(\n ({\n stacked,\n flex,\n nested,\n labelLength,\n variant,\n theme,\n wrapped = false,\n columnCount = 1,\n narrow = false\n }): any => {\n const {\n base: { spacing }\n } = theme;\n\n const isValueComparison = variant === 'value-comparison';\n const containerWidthCh = colCountChWidth[columnCount].containerWidth;\n const containerWidthMinusLabel = `${containerWidthCh - (labelLength ?? 0)}ch`;\n\n return css`\n /* Top Level Styles */\n ${!nested &&\n css`\n ${StyledFieldValue} {\n word-break: break-word;\n overflow: auto;\n }\n\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `}\n\n /* Nested List */\n ${nested &&\n css`\n grid-column: 1 / -1;\n `}\n\n /* As Field Grid */\n ${!flex &&\n css`\n display: grid;\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);\n column-gap: calc(2 * ${spacing});\n row-gap: calc(${verticalGapSpacingMultiplier} * ${spacing});\n\n ${stacked &&\n css`\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n `}\n\n > ${StyledStackedFieldValue} {\n max-width: ${containerWidthCh}ch;\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${containerWidthMinusLabel} - calc(2 * ${spacing}));\n\n ${!isValueComparison &&\n css`\n width: 100%;\n `}\n }\n\n ${isValueComparison &&\n css`\n grid-template-columns: auto auto;\n column-gap: 0;\n row-gap: calc(0.5 * ${spacing});\n max-width: ${containerWidthCh}ch;\n `}\n `}\n\n /* As Flex Container */\n ${flex &&\n css`\n display: flex;\n flex-direction: ${wrapped ? 'column' : 'row'};\n column-gap: calc(${flexGapProp} * ${spacing});\n align-items: flex-start;\n max-width: ${containerWidthCh}ch;\n\n ${!wrapped &&\n css`\n > * {\n max-width: ${`${100 / columnCount}%`};\n }\n `}\n `}\n\n /* Key / Group Label Spacing */\n ${stacked &&\n css`\n dt {\n margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});\n }\n `}\n\n /* Responsive behavior */\n ${narrow &&\n !stacked &&\n css`\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(50%, 1fr);\n `}\n `;\n }\n);\n\nStyledDetailList.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Details.styles.js","sourceRoot":"","sources":["../../../src/components/Details/Details.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EAEpB,UAAU,EAGV,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC;AAkCjC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAEvC,oDAAoD;AACpD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,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O;YACT,GAAG,CAAA;;;SAGF;;YAEG,uBAAuB;uBACZ,gBAAgB;;;YAG3B,gBAAgB;4BACA,wBAAwB,eAAe,OAAO;;YAE9D,CAAC,iBAAiB;YACpB,GAAG,CAAA;;WAEF;;;UAGD,iBAAiB;YACnB,GAAG,CAAA;;;gCAGqB,OAAO;uBAChB,gBAAgB;;;;;;;SAO9B;;YAEG,aAAa;;;OAGlB;;;QAGC,IAAI;QACN,GAAG,CAAA;;0BAEiB,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK;2BACzB,WAAW,MAAM,OAAO;;qBAE9B,gBAAgB;;UAE3B,CAAC,OAAO;YACV,GAAG,CAAA;;;yBAGc,aAAa;;SAE7B;;YAEG,aAAa;;;OAGlB;;;QAGC,OAAO;QACT,CAAC,iBAAiB;QAClB,GAAG,CAAA;;qCAE4B,4BAA4B,MAAM,OAAO;;OAEvE;;;QAGC,MAAM;QACR,CAAC,OAAO;QACR,CAAC,iBAAiB;QAClB,GAAG,CAAA;8CACqC,WAAW;OAClD;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, DefaultTheme } from 'styled-components';\n\nimport {\n calculateFontSize,\n defaultThemeProp,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledFieldValueList,\n StyledFieldValueListProps,\n StyledIcon,\n FontSize,\n PropsWithDefaults,\n useDirection,\n StyledButton\n} from '@pega/cosmos-react-core';\n\ninterface StyledDetailListProps extends StyledFieldValueListProps {\n /** Whether individual list items all have labels stacks on top */\n stacked?: boolean;\n /** Whether the list is a flex row of other lists */\n flex?: boolean;\n /** Whether the list is nested */\n nested?: boolean;\n /** The character length applied to all list labels */\n labelLength?: number;\n /**\n * Whether the list is wrapped to 1 column\n * @default false\n */\n wrapped?: boolean;\n /**\n * Number of columns in the list\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /**\n * Whether to apply narrow list styles\n * @default false\n */\n narrow?: boolean;\n theme: DefaultTheme;\n}\n\ntype StyledDetailListPropsWithDefaults = PropsWithDefaults<\n StyledDetailListProps,\n 'wrapped' | 'columnCount'\n>;\n\nconst verticalGapSpacingMultiplier = 1;\n\n// colWidth reduces by 20% as column count increases\nexport const colCountChWidth = {\n '1': {\n containerWidth: 100,\n colWidth: 100\n },\n '2': {\n containerWidth: 80 * 2,\n colWidth: 80\n },\n '3': {\n containerWidth: 64 * 3,\n colWidth: 64\n }\n};\n\nexport const flexGapProp = 5.5;\n\nexport const StyledFieldValueGroupLabel = styled.div(({ theme }) => {\n const {\n base: { spacing, animation }\n } = theme;\n const { rtl } = useDirection();\n\n return css`\n width: 100%;\n grid-column-start: 1;\n grid-column-end: -1;\n margin-block-end: calc(0.5 * ${spacing});\n margin-block-start: calc(1.5 * ${spacing});\n\n ${StyledButton} ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n ${StyledButton}[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n ${StyledButton}[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledFieldValueGroupLabel.defaultProps = defaultThemeProp;\n\nexport const StyledHighlightedDetailList = styled.dl(({ theme }) => {\n const {\n base: { spacing, palette }\n } = theme;\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n\n return css`\n max-width: ${colCountChWidth[3].containerWidth}ch;\n padding-block-end: calc(1.5 * ${spacing});\n\n dd {\n font-size: ${fontSize[theme.components.text.h1['font-size'] as FontSize]};\n font-weight: ${theme.components.text.h1['font-weight']};\n }\n\n + hr {\n border-top: unset;\n border-radius: unset;\n border-style: unset;\n border-bottom: 0.0625rem solid ${palette['border-line']};\n margin-block-end: calc(1.5 * ${spacing});\n }\n `;\n});\n\nStyledHighlightedDetailList.defaultProps = defaultThemeProp;\n\nexport const StyledDetails = styled.div``;\n\nexport const StyledDetailList = styled(StyledFieldValueList)<StyledDetailListPropsWithDefaults>(\n ({\n stacked,\n flex,\n nested,\n labelLength,\n variant,\n theme,\n wrapped = false,\n columnCount = 1,\n narrow = false\n }): any => {\n const {\n base: { spacing }\n } = theme;\n\n const isValueComparison = variant === 'value-comparison';\n const containerWidthCh = colCountChWidth[columnCount].containerWidth;\n const columnWidthCh = colCountChWidth[columnCount].colWidth;\n const containerWidthMinusLabel = `${containerWidthCh - (labelLength ?? 0)}ch`;\n\n return css`\n /* Top Level Styles */\n ${!nested &&\n css`\n ${StyledFieldValue} {\n word-break: break-word;\n overflow: auto;\n }\n\n ${StyledStackedFieldValue} {\n grid-column: 1 / -1;\n }\n `}\n\n /* Nested List */\n ${nested &&\n css`\n grid-column: 1 / -1;\n `}\n\n /* As Field Grid */\n ${!flex &&\n css`\n display: grid;\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);\n column-gap: calc(2 * ${spacing});\n row-gap: calc(${verticalGapSpacingMultiplier} * ${spacing});\n\n ${stacked &&\n css`\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n `}\n\n > ${StyledStackedFieldValue} {\n max-width: ${containerWidthCh}ch;\n }\n\n > ${StyledFieldValue} {\n max-width: calc(${containerWidthMinusLabel} - calc(2 * ${spacing}));\n\n ${!isValueComparison &&\n css`\n width: 100%;\n `}\n }\n\n ${isValueComparison &&\n css`\n grid-template-columns: auto auto;\n column-gap: 0;\n row-gap: calc(0.5 * ${spacing});\n max-width: ${containerWidthCh}ch;\n\n > dd {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n `}\n\n > ${StyledDetails} {\n grid-column: 1 / -1;\n }\n `}\n\n /* As Flex Container */\n ${flex &&\n css`\n display: flex;\n flex-direction: ${wrapped ? 'column' : 'row'};\n column-gap: calc(${flexGapProp} * ${spacing});\n align-items: flex-start;\n max-width: ${containerWidthCh}ch;\n\n ${!wrapped &&\n css`\n > * {\n width: 100%;\n max-width: ${columnWidthCh}%;\n }\n `}\n\n > ${StyledDetails} {\n width: 100%;\n }\n `}\n\n /* Key / Group Label Spacing */\n ${stacked &&\n !isValueComparison &&\n css`\n > dt {\n margin-block-start: calc(${verticalGapSpacingMultiplier} * ${spacing});\n }\n `}\n\n /* Responsive behavior */\n ${narrow &&\n !stacked &&\n !isValueComparison &&\n css`\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(50%, 1fr);\n `}\n `;\n }\n);\n\nStyledDetailList.defaultProps = defaultThemeProp;\n"]}
@@ -1,20 +1,20 @@
1
- import { FunctionComponent, Ref } from 'react';
2
- import { BaseProps, FieldValueListProps, ForwardProps, MenuItemProps, NoChildrenProp } from '@pega/cosmos-react-core';
3
- export interface GlimpseProps extends BaseProps, NoChildrenProp {
1
+ import { FunctionComponent, MouseEventHandler, Ref } from 'react';
2
+ import { BaseProps, ButtonProps, FieldValueListProps, ForwardProps, InfoDialogProps, NoChildrenProp, OmitStrict } from '@pega/cosmos-react-core';
3
+ type InfoDialogSummaryHeading = Extract<InfoDialogProps['heading'], object>;
4
+ export interface GlimpseProps extends BaseProps, OmitStrict<InfoDialogProps, 'children'>, NoChildrenProp {
4
5
  /** The unique id for the operator. */
5
6
  id: string;
6
- /** The primary piece of item information as a string. */
7
- primary: MenuItemProps['primary'];
8
- /** Secondary info about an item. Useful for additional metadata or context. */
9
- secondary?: MenuItemProps['secondary'];
10
- /** A visual to assist identifying an item. e.g. Avatar or Icon. */
11
- visual?: MenuItemProps['visual'];
7
+ /** Primary, secondary and avatar for the glimpse. */
8
+ heading?: InfoDialogSummaryHeading;
12
9
  /** The set of field values to render in the list. */
13
10
  fields?: FieldValueListProps['fields'];
14
11
  /** Ref for the wrapping element. */
15
12
  ref?: Ref<HTMLDivElement>;
13
+ /** Callback for click event on View profile button. Passing this will render View profile button */
14
+ onViewProfile?: MouseEventHandler<HTMLButtonElement>;
15
+ /** A URL location to navigate to. Passing an href will render View profile button as a link. */
16
+ href?: ButtonProps['href'];
16
17
  }
17
- export declare const StyledGlimpse: import("styled-components").StyledComponent<FunctionComponent<import("@pega/cosmos-react-core").CardProps & ForwardProps>, import("styled-components").DefaultTheme, {}, never>;
18
18
  declare const Glimpse: FunctionComponent<GlimpseProps & ForwardProps>;
19
19
  export default Glimpse;
20
20
  //# sourceMappingURL=Glimpse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Glimpse.d.ts","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAmB,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5E,OAAO,EACL,SAAS,EAMT,mBAAmB,EACnB,YAAY,EACZ,aAAa,EAEb,cAAc,EAGf,MAAM,yBAAyB,CAAC;AAGjC,MAAM,WAAW,YAAa,SAAQ,SAAS,EAAE,cAAc;IAC7D,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,yDAAyD;IACzD,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAClC,+EAA+E;IAC/E,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,mEAAmE;IACnE,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,qDAAqD;IACrD,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,iLAUxB,CAAC;AAIH,QAAA,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAsB3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Glimpse.d.ts","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAEjB,iBAAiB,EAEjB,GAAG,EACJ,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,SAAS,EAET,WAAW,EAEX,mBAAmB,EAEnB,YAAY,EAEZ,eAAe,EACf,cAAc,EACd,UAAU,EAEX,MAAM,yBAAyB,CAAC;AAEjC,KAAK,wBAAwB,GAAG,OAAO,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;AAE5E,MAAM,WAAW,YACf,SAAQ,SAAS,EACf,UAAU,CAAC,eAAe,EAAE,UAAU,CAAC,EACvC,cAAc;IAChB,sCAAsC;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,OAAO,CAAC,EAAE,wBAAwB,CAAC;IACnC,qDAAqD;IACrD,MAAM,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACvC,oCAAoC;IACpC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,oGAAoG;IACpG,aAAa,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,gGAAgG;IAChG,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,QAAA,MAAM,OAAO,EAAE,iBAAiB,CAAC,YAAY,GAAG,YAAY,CA2C3D,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,22 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- import styled, { css } from 'styled-components';
4
- import { Card, CardContent, CardHeader, defaultThemeProp, FieldValueList, MetaList, StyledFieldValueList, SummaryItem } from '@pega/cosmos-react-core';
5
- import { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';
6
- export const StyledGlimpse = styled(Card)(({ theme }) => {
7
- return css `
8
- ${StyledCardContent} {
9
- border-top: solid 0.0625rem ${theme.base.palette['border-line']};
10
- }
11
-
12
- ${StyledFieldValueList} {
13
- padding-top: calc(1.5 * ${theme.base.spacing});
14
- }
15
- `;
16
- });
17
- StyledGlimpse.defaultProps = defaultThemeProp;
18
- const Glimpse = forwardRef(({ primary, visual, secondary = [], fields = [] }, ref) => {
19
- return (_jsxs(StyledGlimpse, { ref: ref, children: [_jsx(CardHeader, { children: _jsx(SummaryItem, { primary: primary, secondary: _jsx(MetaList, { items: secondary }), visual: visual }) }), !!fields.length && (_jsx(CardContent, { children: _jsx(FieldValueList, { fields: fields }) }))] }));
3
+ import { Button, FieldValueList, Flex, InfoDialog, useI18n } from '@pega/cosmos-react-core';
4
+ const Glimpse = forwardRef(({ heading, fields = [], target, onDismiss, href, progress, onViewProfile, ...restProps }, ref) => {
5
+ const t = useI18n();
6
+ return (_jsx(InfoDialog, { ...restProps, target: target, heading: heading, progress: progress, onDismiss: onDismiss, ref: ref, children: _jsxs(Flex, { container: { direction: 'column', alignItems: 'start', gap: 2 }, children: [fields.length > 0 && _jsx(FieldValueList, { fields: fields }), (onViewProfile || href) && (_jsx(Button, { href: href, onClick: (e) => {
7
+ onViewProfile?.(e);
8
+ onDismiss();
9
+ }, children: t('view_profile') }))] }) }));
20
10
  });
21
11
  export default Glimpse;
22
12
  //# sourceMappingURL=Glimpse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Glimpse.js","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAC5E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAEL,IAAI,EACJ,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,cAAc,EAId,QAAQ,EAER,oBAAoB,EACpB,WAAW,EACZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yDAAyD,CAAC;AAiB5F,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACtD,OAAO,GAAG,CAAA;MACN,iBAAiB;oCACa,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;;;MAG/D,oBAAoB;gCACM,KAAK,CAAC,IAAI,CAAC,OAAO;;GAE/C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,aAAa,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9C,MAAM,OAAO,GAAmD,UAAU,CACxE,CACE,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,EAAiC,EAC/E,GAAwB,EACxB,EAAE;IACF,OAAO,CACL,MAAC,aAAa,IAAC,GAAG,EAAE,GAAG,aACrB,KAAC,UAAU,cACT,KAAC,WAAW,IACV,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,KAAC,QAAQ,IAAC,KAAK,EAAE,SAAS,GAAI,EACzC,MAAM,EAAE,MAAM,GACd,GACS,EACZ,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAClB,KAAC,WAAW,cACV,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,GACtB,CACf,IACa,CACjB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n BaseProps,\n Card,\n CardContent,\n CardHeader,\n defaultThemeProp,\n FieldValueList,\n FieldValueListProps,\n ForwardProps,\n MenuItemProps,\n MetaList,\n NoChildrenProp,\n StyledFieldValueList,\n SummaryItem\n} from '@pega/cosmos-react-core';\nimport { StyledCardContent } from '@pega/cosmos-react-core/lib/components/Card/CardContent';\n\nexport interface GlimpseProps extends BaseProps, NoChildrenProp {\n /** The unique id for the operator. */\n id: string;\n /** The primary piece of item information as a string. */\n primary: MenuItemProps['primary'];\n /** Secondary info about an item. Useful for additional metadata or context. */\n secondary?: MenuItemProps['secondary'];\n /** A visual to assist identifying an item. e.g. Avatar or Icon. */\n visual?: MenuItemProps['visual'];\n /** The set of field values to render in the list. */\n fields?: FieldValueListProps['fields'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport const StyledGlimpse = styled(Card)(({ theme }) => {\n return css`\n ${StyledCardContent} {\n border-top: solid 0.0625rem ${theme.base.palette['border-line']};\n }\n\n ${StyledFieldValueList} {\n padding-top: calc(1.5 * ${theme.base.spacing});\n }\n `;\n});\n\nStyledGlimpse.defaultProps = defaultThemeProp;\n\nconst Glimpse: FunctionComponent<GlimpseProps & ForwardProps> = forwardRef(\n (\n { primary, visual, secondary = [], fields = [] }: PropsWithoutRef<GlimpseProps>,\n ref: GlimpseProps['ref']\n ) => {\n return (\n <StyledGlimpse ref={ref}>\n <CardHeader>\n <SummaryItem\n primary={primary}\n secondary={<MetaList items={secondary} />}\n visual={visual}\n />\n </CardHeader>\n {!!fields.length && (\n <CardContent>\n <FieldValueList fields={fields} />\n </CardContent>\n )}\n </StyledGlimpse>\n );\n }\n);\n\nexport default Glimpse;\n"]}
1
+ {"version":3,"file":"Glimpse.js","sourceRoot":"","sources":["../../../src/components/Glimpse/Glimpse.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,UAAU,EAMX,MAAM,OAAO,CAAC;AAEf,OAAO,EAEL,MAAM,EAEN,cAAc,EAEd,IAAI,EAEJ,UAAU,EAIV,OAAO,EACR,MAAM,yBAAyB,CAAC;AAsBjC,MAAM,OAAO,GAAmD,UAAU,CACxE,CACE,EACE,OAAO,EACP,MAAM,GAAG,EAAE,EACX,MAAM,EACN,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,GAAG,SAAS,EACkB,EAChC,GAAwB,EACxB,EAAE;IACF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,UAAU,OACL,SAAS,EACb,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,GAAG,YAER,MAAC,IAAI,IAAC,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,aAClE,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,GAAI,EAEvD,CAAC,aAAa,IAAI,IAAI,CAAC,IAAI,CAC1B,KAAC,MAAM,IACL,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,CAAC,CAAgC,EAAE,EAAE;wBAC5C,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;wBACnB,SAAS,EAAE,CAAC;oBACd,CAAC,YAEA,CAAC,CAAC,cAAc,CAAC,GACX,CACV,IACI,GACI,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,OAAO,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MouseEvent,\n MouseEventHandler,\n PropsWithoutRef,\n Ref\n} from 'react';\n\nimport {\n BaseProps,\n Button,\n ButtonProps,\n FieldValueList,\n FieldValueListProps,\n Flex,\n ForwardProps,\n InfoDialog,\n InfoDialogProps,\n NoChildrenProp,\n OmitStrict,\n useI18n\n} from '@pega/cosmos-react-core';\n\ntype InfoDialogSummaryHeading = Extract<InfoDialogProps['heading'], object>;\n\nexport interface GlimpseProps\n extends BaseProps,\n OmitStrict<InfoDialogProps, 'children'>,\n NoChildrenProp {\n /** The unique id for the operator. */\n id: string;\n /** Primary, secondary and avatar for the glimpse. */\n heading?: InfoDialogSummaryHeading;\n /** The set of field values to render in the list. */\n fields?: FieldValueListProps['fields'];\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n /** Callback for click event on View profile button. Passing this will render View profile button */\n onViewProfile?: MouseEventHandler<HTMLButtonElement>;\n /** A URL location to navigate to. Passing an href will render View profile button as a link. */\n href?: ButtonProps['href'];\n}\n\nconst Glimpse: FunctionComponent<GlimpseProps & ForwardProps> = forwardRef(\n (\n {\n heading,\n fields = [],\n target,\n onDismiss,\n href,\n progress,\n onViewProfile,\n ...restProps\n }: PropsWithoutRef<GlimpseProps>,\n ref: GlimpseProps['ref']\n ) => {\n const t = useI18n();\n\n return (\n <InfoDialog\n {...restProps}\n target={target}\n heading={heading}\n progress={progress}\n onDismiss={onDismiss}\n ref={ref}\n >\n <Flex container={{ direction: 'column', alignItems: 'start', gap: 2 }}>\n {fields.length > 0 && <FieldValueList fields={fields} />}\n\n {(onViewProfile || href) && (\n <Button\n href={href}\n onClick={(e: MouseEvent<HTMLButtonElement>) => {\n onViewProfile?.(e);\n onDismiss();\n }}\n >\n {t('view_profile')}\n </Button>\n )}\n </Flex>\n </InfoDialog>\n );\n }\n);\n\nexport default Glimpse;\n"]}
@@ -1,3 +1,3 @@
1
1
  export { default } from './Glimpse';
2
- export { GlimpseProps, StyledGlimpse } from './Glimpse';
2
+ export { GlimpseProps } from './Glimpse';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Glimpse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Glimpse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export { default } from './Glimpse';
2
- export { StyledGlimpse } from './Glimpse';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Glimpse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAgB,aAAa,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { default } from './Glimpse';\nexport { GlimpseProps, StyledGlimpse } from './Glimpse';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Glimpse/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { default } from './Glimpse';\nexport { GlimpseProps } from './Glimpse';\n"]}
@@ -5,19 +5,13 @@ export interface IntelligentGuidanceItemProps {
5
5
  id: string;
6
6
  /** The label text of the item. */
7
7
  label: string;
8
- /**
9
- * Name of the icon (to be selected from default Pega icon set)
10
- */
8
+ /** Name of the icon (to be selected from default Pega icon set) */
11
9
  icon: IconProps['name'];
12
10
  /** Represents the type of task */
13
11
  type: string;
14
- /**
15
- * Click handler for the action button.
16
- */
12
+ /** Click handler for the action button. */
17
13
  onClick: (e: MouseEvent | KeyboardEvent) => void;
18
- /**
19
- * Dismiss handler for the action button.
20
- */
14
+ /** Dismiss handler for the action button. */
21
15
  onDismiss?: (id: IntelligentGuidanceItemProps['id'], e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>) => void;
22
16
  /** Flag that indicates if item is new
23
17
  * @default false
@@ -1 +1 @@
1
- {"version":3,"file":"IntelligentGuidance.types.d.ts","sourceRoot":"","sources":["../../../src/components/IntelligentGuidance/IntelligentGuidance.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,MAAM,WAAW,4BAA4B;IAC3C,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACxB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,aAAa,KAAK,IAAI,CAAC;IACjD;;OAEG;IACH,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,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,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE/E,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,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 { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport { 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 /**\n * Name of the icon (to be selected from default Pega icon set)\n */\n icon: IconProps['name'];\n /** Represents the type of task */\n type: string;\n /**\n * Click handler for the action button.\n */\n onClick: (e: MouseEvent | KeyboardEvent) => void;\n /**\n * Dismiss handler for the action button.\n */\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 /** 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 { MouseEvent, KeyboardEvent, Ref } from 'react';\n\nimport { 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 /** 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"]}
@@ -26,7 +26,7 @@ export interface SelectFilterProps extends BaseFilterProps {
26
26
  items: SelectFilterItemProps[];
27
27
  /**
28
28
  * Determines if the filter will render as a RadioButtonGroup or CheckboxGroup.
29
- * @default "multi-select"
29
+ * @default 'multi-select'
30
30
  */
31
31
  selectType?: 'single-select' | 'multi-select';
32
32
  }
@@ -46,7 +46,7 @@ export interface TextFilterProps extends BaseFilterProps {
46
46
  value?: string;
47
47
  /**
48
48
  * Placeholder text. The default value is a locale translation of 'Search…'
49
- * @default "Search…"
49
+ * @default 'Search…'
50
50
  */
51
51
  placeholder?: string;
52
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SearchResults.types.js","sourceRoot":"","sources":["../../../src/components/SearchResults/SearchResults.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport {\n LinkProps,\n MetaListProps,\n NoChildrenProp,\n OmitStrict,\n RadioCheckProps,\n SearchInputProps\n} from '@pega/cosmos-react-core';\n\ninterface BaseFilterProps {\n /** The name of the filter. */\n name: string;\n /**\n * Determines if the filter will start in an expanded state.\n * @default true\n */\n expanded?: boolean;\n}\n\nexport interface SelectFilterItemProps {\n /** The id for the filter option. */\n id: NonNullable<RadioCheckProps['id']>;\n /** The label for the filter option. */\n label: RadioCheckProps['label'];\n /** Determines if the filter option is active or not. */\n checked: RadioCheckProps['checked'];\n /** The name for the filter item that will show in the selected filters section */\n name: NonNullable<RadioCheckProps['name']>;\n}\n\nexport interface SelectFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a select filter. */\n type: 'select';\n /** The set of options for the filter. */\n items: SelectFilterItemProps[];\n /**\n * Determines if the filter will render as a RadioButtonGroup or CheckboxGroup.\n * @default \"multi-select\"\n */\n selectType?: 'single-select' | 'multi-select';\n}\n\nexport interface ActiveSelectFilter {\n id: SelectFilterItemProps['id'];\n name: SelectFilterItemProps['name'];\n resetValue: SelectFilterItemProps & { checked: false };\n groupName: SelectFilterProps['name'];\n type: SelectFilterProps['type'];\n}\n\nexport interface TextFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a text filter. */\n type: 'text';\n /** The value of the filter. */\n value?: string;\n /**\n * Placeholder text. The default value is a locale translation of 'Search…'\n * @default \"Search…\"\n */\n placeholder?: string;\n}\n\n// For use later: export type FilterProps = TextFilterProps | SelectFilterProps;\nexport type FilterProps = SelectFilterProps;\n\nexport type ActiveFilters = ActiveSelectFilter;\n\nexport interface SearchResultProps {\n /** The id of the search result to be displayed. */\n id: string;\n /** The title of the search result. */\n title: string;\n /** LinkProps to be passed to . */\n link: OmitStrict<LinkProps, 'children' | 'variant' | 'icon'>;\n /** A description for the search result. */\n description?: string;\n /** A list of elements to be rendered within a MetaList categorizing the result. */\n meta?: MetaListProps['items'];\n /** Accents the search results with text that matches the regex */\n accent?: RegExp;\n}\n\ninterface BaseFilterEvent {\n name: string;\n}\ninterface SelectFilterEvent extends BaseFilterEvent {\n type: 'select';\n value: SelectFilterItemProps;\n}\n\n// For use later: export type FilterEvent = SelectFilterEvent | TextFilterEvent;\nexport type FilterEvent = SelectFilterEvent;\n\nexport interface SearchResultsProps extends NoChildrenProp {\n /** A set of results to render for a given search. */\n results: SearchResultProps[];\n /** Props related to the SearchInput. */\n searchInputProps: SearchInputProps;\n /** The number of total results related to a given search. */\n count: number;\n /** A set of filters and their current states for a given search. */\n filters: FilterProps[];\n /** Callback that is fired when the value of a filter changes. */\n onFilterChange?: (filter: FilterEvent) => void;\n /** Callback that is fired when the Clear all button is clicked. */\n onClearAllFilters?: () => void;\n /** Callback that is fired when the Clear button is clicked within a filter. */\n onClearFilter?: (name: BaseFilterProps['name']) => void;\n /** Callback that will render a Show more button at the bottom of the results and is fired when that button is clicked. */\n onShowMore?: () => void;\n /** Sets a loading indicator if true */\n loading?: boolean;\n /** A ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
1
+ {"version":3,"file":"SearchResults.types.js","sourceRoot":"","sources":["../../../src/components/SearchResults/SearchResults.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Ref } from 'react';\n\nimport {\n LinkProps,\n MetaListProps,\n NoChildrenProp,\n OmitStrict,\n RadioCheckProps,\n SearchInputProps\n} from '@pega/cosmos-react-core';\n\ninterface BaseFilterProps {\n /** The name of the filter. */\n name: string;\n /**\n * Determines if the filter will start in an expanded state.\n * @default true\n */\n expanded?: boolean;\n}\n\nexport interface SelectFilterItemProps {\n /** The id for the filter option. */\n id: NonNullable<RadioCheckProps['id']>;\n /** The label for the filter option. */\n label: RadioCheckProps['label'];\n /** Determines if the filter option is active or not. */\n checked: RadioCheckProps['checked'];\n /** The name for the filter item that will show in the selected filters section */\n name: NonNullable<RadioCheckProps['name']>;\n}\n\nexport interface SelectFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a select filter. */\n type: 'select';\n /** The set of options for the filter. */\n items: SelectFilterItemProps[];\n /**\n * Determines if the filter will render as a RadioButtonGroup or CheckboxGroup.\n * @default 'multi-select'\n */\n selectType?: 'single-select' | 'multi-select';\n}\n\nexport interface ActiveSelectFilter {\n id: SelectFilterItemProps['id'];\n name: SelectFilterItemProps['name'];\n resetValue: SelectFilterItemProps & { checked: false };\n groupName: SelectFilterProps['name'];\n type: SelectFilterProps['type'];\n}\n\nexport interface TextFilterProps extends BaseFilterProps {\n /** Internal prop designating this object as a text filter. */\n type: 'text';\n /** The value of the filter. */\n value?: string;\n /**\n * Placeholder text. The default value is a locale translation of 'Search…'\n * @default 'Search…'\n */\n placeholder?: string;\n}\n\n// For use later: export type FilterProps = TextFilterProps | SelectFilterProps;\nexport type FilterProps = SelectFilterProps;\n\nexport type ActiveFilters = ActiveSelectFilter;\n\nexport interface SearchResultProps {\n /** The id of the search result to be displayed. */\n id: string;\n /** The title of the search result. */\n title: string;\n /** LinkProps to be passed to . */\n link: OmitStrict<LinkProps, 'children' | 'variant' | 'icon'>;\n /** A description for the search result. */\n description?: string;\n /** A list of elements to be rendered within a MetaList categorizing the result. */\n meta?: MetaListProps['items'];\n /** Accents the search results with text that matches the regex */\n accent?: RegExp;\n}\n\ninterface BaseFilterEvent {\n name: string;\n}\ninterface SelectFilterEvent extends BaseFilterEvent {\n type: 'select';\n value: SelectFilterItemProps;\n}\n\n// For use later: export type FilterEvent = SelectFilterEvent | TextFilterEvent;\nexport type FilterEvent = SelectFilterEvent;\n\nexport interface SearchResultsProps extends NoChildrenProp {\n /** A set of results to render for a given search. */\n results: SearchResultProps[];\n /** Props related to the SearchInput. */\n searchInputProps: SearchInputProps;\n /** The number of total results related to a given search. */\n count: number;\n /** A set of filters and their current states for a given search. */\n filters: FilterProps[];\n /** Callback that is fired when the value of a filter changes. */\n onFilterChange?: (filter: FilterEvent) => void;\n /** Callback that is fired when the Clear all button is clicked. */\n onClearAllFilters?: () => void;\n /** Callback that is fired when the Clear button is clicked within a filter. */\n onClearFilter?: (name: BaseFilterProps['name']) => void;\n /** Callback that will render a Show more button at the bottom of the results and is fired when that button is clicked. */\n onShowMore?: () => void;\n /** Sets a loading indicator if true */\n loading?: boolean;\n /** A ref for the wrapping element. */\n ref?: Ref<HTMLDivElement>;\n}\n"]}
@@ -26,9 +26,7 @@ export interface StakeholdersProps extends NoChildrenProp, Pick<SummaryListProps
26
26
  loading?: boolean;
27
27
  /** An array of available roles a stakeholder may be assigned. */
28
28
  roles?: Role[];
29
- /**
30
- * Use this when onAdd or onEdit is invoked to indicate to the component which role option to select.
31
- */
29
+ /** Use this when onAdd or onEdit is invoked to indicate to the component which role option to select. */
32
30
  currentRole?: Role;
33
31
  /**
34
32
  * A component to render the main portion of the add/edit stakeholder form.
@@ -37,9 +35,7 @@ export interface StakeholdersProps extends NoChildrenProp, Pick<SummaryListProps
37
35
  renderer: ComponentType<{
38
36
  selectedRoleName?: Role['name'];
39
37
  }>;
40
- /**
41
- * A props object that will be passed to the form renderer.
42
- */
38
+ /** A props object that will be passed to the form renderer. */
43
39
  rendererProps?: {
44
40
  [key: string]: unknown;
45
41
  };
@@ -60,9 +56,7 @@ export interface StakeholdersProps extends NoChildrenProp, Pick<SummaryListProps
60
56
  onDismiss: ({ closeForm }: {
61
57
  closeForm: () => void;
62
58
  }) => void;
63
- /**
64
- * Called after the modal or popover transitions and un-mounts as a result of a closeForm call or user dismissal.
65
- */
59
+ /** Called after the modal or popover transitions and un-mounts as a result of a closeForm call or user dismissal. */
66
60
  onAfterClose?: () => void;
67
61
  };
68
62
  /** Called when a user opens the view all modal. */
@@ -74,9 +68,7 @@ export interface StakeholdersProps extends NoChildrenProp, Pick<SummaryListProps
74
68
  items: StakeholdersProps['items'];
75
69
  /** Called when a user enters a view all search. Return a filtered array to viewAll['items'] with matching stakeholders. */
76
70
  onSearch?: (value: string) => void;
77
- /**
78
- * Called after the modal or popover transitions and un-mounts as a result of a closeForm call or user dismissal.
79
- */
71
+ /** Called after the modal or popover transitions and un-mounts as a result of a closeForm call or user dismissal. */
80
72
  onAfterClose?: () => void;
81
73
  };
82
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Stakeholders.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stakeholders/Stakeholders.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,sHAAsH;AACtH,MAAM,WAAW,WAAY,SAAQ,eAAe,EAAE,YAAY;IAChE,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,iBACf,SAAQ,cAAc,EACpB,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IAC/D;;;OAGG;IACH,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,IAAI,EAAE;QACJ,gGAAgG;QAChG,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,iEAAiE;QACjE,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;QACf;;WAEG;QACH,WAAW,CAAC,EAAE,IAAI,CAAC;QACnB;;;WAGG;QACH,QAAQ,EAAE,aAAa,CAAC;YAAE,gBAAgB,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;SAAE,CAAC,CAAC;QAC7D;;WAEG;QACH,aAAa,CAAC,EAAE;YACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;SACxB,CAAC;QACF;;;;;WAKG;QACH,QAAQ,EAAE,CAAC,EACT,gBAAgB,EAChB,SAAS,EACV,EAAE;YACD,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;YAC3C,SAAS,EAAE,MAAM,IAAI,CAAC;SACvB,KAAK,IAAI,CAAC;QACX;;;WAGG;QACH,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE;YAAE,SAAS,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;QAC9D;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;KAC3B,CAAC;IACF,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE;QACP,+EAA+E;QAC/E,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,uFAAuF;QACvF,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAClC,2HAA2H;QAC3H,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;QACnC;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;KAC3B,CAAC;CACH"}
1
+ {"version":3,"file":"Stakeholders.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stakeholders/Stakeholders.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EA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