@pega/cosmos-react-work 6.3.1-1 → 6.4.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 (29) hide show
  1. package/lib/components/DetailsV2/DetailsV2.d.ts +53 -0
  2. package/lib/components/DetailsV2/DetailsV2.d.ts.map +1 -0
  3. package/lib/components/DetailsV2/DetailsV2.js +107 -0
  4. package/lib/components/DetailsV2/DetailsV2.js.map +1 -0
  5. package/lib/components/DetailsV2/DetailsV2.styles.d.ts +40 -0
  6. package/lib/components/DetailsV2/DetailsV2.styles.d.ts.map +1 -0
  7. package/lib/components/DetailsV2/DetailsV2.styles.js +245 -0
  8. package/lib/components/DetailsV2/DetailsV2.styles.js.map +1 -0
  9. package/lib/components/DetailsV2/DetailsV2.test-ids.d.ts +2 -0
  10. package/lib/components/DetailsV2/DetailsV2.test-ids.d.ts.map +1 -0
  11. package/lib/components/DetailsV2/DetailsV2.test-ids.js +9 -0
  12. package/lib/components/DetailsV2/DetailsV2.test-ids.js.map +1 -0
  13. package/lib/components/DetailsV2/DetailsV2Context.d.ts +9 -0
  14. package/lib/components/DetailsV2/DetailsV2Context.d.ts.map +1 -0
  15. package/lib/components/DetailsV2/DetailsV2Context.js +9 -0
  16. package/lib/components/DetailsV2/DetailsV2Context.js.map +1 -0
  17. package/lib/components/DetailsV2/DetailsV2List.d.ts +15 -0
  18. package/lib/components/DetailsV2/DetailsV2List.d.ts.map +1 -0
  19. package/lib/components/DetailsV2/DetailsV2List.js +28 -0
  20. package/lib/components/DetailsV2/DetailsV2List.js.map +1 -0
  21. package/lib/components/DetailsV2/index.d.ts +5 -0
  22. package/lib/components/DetailsV2/index.d.ts.map +1 -0
  23. package/lib/components/DetailsV2/index.js +5 -0
  24. package/lib/components/DetailsV2/index.js.map +1 -0
  25. package/lib/index.d.ts +2 -0
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +2 -0
  28. package/lib/index.js.map +1 -1
  29. package/package.json +2 -2
@@ -0,0 +1,53 @@
1
+ import { type FC, type ReactNode, type Ref } from 'react';
2
+ import { type ForwardProps, type TestIdProp, type AdditionalInfoProps } from '@pega/cosmos-react-core';
3
+ export type DetailsV2TwoColumnArrangement = undefined | 'narrowWide' | 'wideNarrow';
4
+ export type DetailsV2Props = TestIdProp & {
5
+ /**
6
+ * FieldValueItems to display as highlighted data above children.
7
+ */
8
+ highlightedData?: ReactNode[];
9
+ /** Copy placed in paragraph below the name */
10
+ description?: string;
11
+ /**
12
+ * Template children separated into 1-3 columns {a, b, c} and their arrangement.
13
+ */
14
+ columns: {
15
+ a: ReactNode;
16
+ b?: never;
17
+ c?: never;
18
+ arrangement?: never;
19
+ } | {
20
+ a: ReactNode;
21
+ b: ReactNode;
22
+ c?: never;
23
+ arrangement?: DetailsV2TwoColumnArrangement;
24
+ } | {
25
+ a: ReactNode;
26
+ b: ReactNode;
27
+ c: ReactNode;
28
+ arrangement?: never;
29
+ };
30
+ ref?: Ref<HTMLDivElement>;
31
+ } & ({
32
+ /** Text used as heading of list */
33
+ name: string;
34
+ /** Pass a heading and content to show additional information on the list. */
35
+ additionalInfo?: {
36
+ heading?: AdditionalInfoProps['heading'];
37
+ content: AdditionalInfoProps['children'];
38
+ };
39
+ /**
40
+ * Whether the items children can be collapsed (only applies if name is provided)
41
+ * @default false
42
+ */
43
+ collapsible?: boolean;
44
+ } | {
45
+ name?: undefined;
46
+ additionalInfo?: never;
47
+ collapsible?: never;
48
+ });
49
+ declare const _default: FC<DetailsV2Props & ForwardProps> & {
50
+ getTestIds: (testIdProp?: string | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["heading", "description", "highlighted-data", "data", "expand-collapse"]>;
51
+ };
52
+ export default _default;
53
+ //# sourceMappingURL=DetailsV2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL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AC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB,CACJ,CAAC;;;;AAiNJ,wBAA2D"}
@@ -0,0 +1,107 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { forwardRef, Fragment, useState, useContext, useEffect, useMemo } from 'react';
3
+ import { remToPx } from 'polished';
4
+ import { AdditionalInfo, Text, useBreakpoint, useConsolidatedRef, useTheme, ExpandCollapse, Button, Flex, Icon, useChToPxConversionFactor, useI18n, HTML, useTestIds, withTestIds } from '@pega/cosmos-react-core';
5
+ import { getDetailsV2TestIds } from './DetailsV2.test-ids';
6
+ import DetailsV2Context from './DetailsV2Context';
7
+ import { StyledFieldValueGroupLabelV2, StyledDetailsV2, StyledHighlightedDetailListV2, StyledDetailDescriptionV2, StyledDetailColumnsV2, columnGapMultiplier, StyledDetailColumnV2 } from './DetailsV2.styles';
8
+ const DetailsV2 = forwardRef(function DetailsV2({ testId, highlightedData, columns, name, description, arrangement, collapsible = false, additionalInfo: additionalInfoProp }, ref) {
9
+ const testIds = useTestIds(testId, getDetailsV2TestIds);
10
+ const t = useI18n();
11
+ const { longestLabelLength, depth, ...context } = useContext(DetailsV2Context);
12
+ const containerRef = useConsolidatedRef(ref);
13
+ const [open, setOpen] = useState(true);
14
+ // Observer and state for mobile.
15
+ const columnCount = (() => {
16
+ let count = 1;
17
+ if (columns.b)
18
+ count = 2;
19
+ if (columns.c)
20
+ count = 3;
21
+ return count;
22
+ })();
23
+ const { base: { 'content-width': { sm: smContentWidth } } } = useTheme();
24
+ const chToPxConversionFactor = useChToPxConversionFactor();
25
+ const fitsThreeColumns = useBreakpoint('xl', {
26
+ breakpointRef: containerRef,
27
+ themeProp: 'content-width'
28
+ });
29
+ const fitsTwoColumns = useBreakpoint('md', {
30
+ breakpointRef: containerRef,
31
+ themeProp: 'content-width'
32
+ });
33
+ const [contentMobileView, setContentMobileView] = useState(false);
34
+ useEffect(() => {
35
+ const checkBreakpoint = (elementWidth) => {
36
+ const minWidthPx = parseInt(smContentWidth, 10) * chToPxConversionFactor;
37
+ const oneRemInPx = parseInt(remToPx(1), 10);
38
+ const colGapPxAllowance = oneRemInPx * (0.5 * columnGapMultiplier) * (columnCount - 1);
39
+ const mobileViewBreakpoint = minWidthPx * columnCount + colGapPxAllowance;
40
+ setContentMobileView(elementWidth < mobileViewBreakpoint);
41
+ };
42
+ const resizeObserver = new ResizeObserver(entries => {
43
+ const containerPxWidth = entries[0].contentRect.width;
44
+ checkBreakpoint(containerPxWidth);
45
+ });
46
+ if (containerRef.current) {
47
+ checkBreakpoint(containerRef.current.offsetWidth);
48
+ resizeObserver.observe(containerRef.current);
49
+ }
50
+ return () => {
51
+ resizeObserver.disconnect();
52
+ };
53
+ }, [columnCount]);
54
+ // Context
55
+ const headingDepth = depth ?? 1;
56
+ const contextValue = useMemo(() => {
57
+ return {
58
+ mobileView: contentMobileView,
59
+ depth: name ? headingDepth + 1 : headingDepth,
60
+ longestLabelLength,
61
+ ...context
62
+ };
63
+ }, [name, headingDepth, longestLabelLength, contentMobileView, context]);
64
+ // Memoized Elements
65
+ const nameText = useMemo(() => {
66
+ return _jsx(Text, { variant: `h${Math.min(headingDepth, 6)}`, children: name });
67
+ }, [name, headingDepth]);
68
+ const additionalInfo = useMemo(() => {
69
+ return name && additionalInfoProp ? (_jsx(AdditionalInfo, { heading: additionalInfoProp.heading, contextualLabel: name, children: additionalInfoProp.content })) : undefined;
70
+ }, [name, additionalInfoProp?.heading, additionalInfoProp?.content]);
71
+ const content = useMemo(() => {
72
+ let applyColumnCount = columnCount;
73
+ if (columnCount !== 1) {
74
+ if (columnCount === 3 && fitsThreeColumns) {
75
+ applyColumnCount = 3;
76
+ }
77
+ else if (fitsTwoColumns) {
78
+ applyColumnCount = 2;
79
+ }
80
+ else {
81
+ applyColumnCount = 1;
82
+ }
83
+ }
84
+ return (_jsxs(_Fragment, { children: [description && (_jsx(StyledDetailDescriptionV2, { "data-testid": testIds.description, children: _jsx(HTML, { as: 'p', content: description }) })), highlightedData && (_jsxs(_Fragment, { children: [_jsx(Flex, { "data-testid": testIds.highlightedData, as: StyledHighlightedDetailListV2, container: { wrap: 'wrap', colGap: 10, rowGap: 1, alignItems: 'start' }, children: highlightedData.map((child, i) => (
85
+ // eslint-disable-next-line react/no-array-index-key
86
+ _jsx(Fragment, { children: child }, i))) }), _jsx("hr", {})] })), _jsxs(Flex, { as: StyledDetailColumnsV2, container: {
87
+ direction: 'row',
88
+ colGap: columnGapMultiplier
89
+ }, "data-testid": testIds.data, arrangement: arrangement, columnCount: applyColumnCount, children: [_jsx(StyledDetailColumnV2, { children: columns.a }), columns.b && _jsx(StyledDetailColumnV2, { children: columns.b }), columns.c && _jsx(StyledDetailColumnV2, { children: columns.c })] })] }));
90
+ }, [
91
+ highlightedData,
92
+ columnCount,
93
+ columns.a,
94
+ columns.b,
95
+ columns.c,
96
+ arrangement,
97
+ testIds,
98
+ fitsTwoColumns,
99
+ fitsThreeColumns,
100
+ description
101
+ ]);
102
+ return (_jsx(DetailsV2Context.Provider, { value: contextValue, children: _jsxs(StyledDetailsV2, { "data-testid": testIds.root, ref: containerRef, children: [name && (_jsx(StyledFieldValueGroupLabelV2, { "data-testid": testIds.heading, children: _jsx(Flex, { container: { alignItems: 'center', gap: 0.5 }, children: collapsible ? (_jsxs(_Fragment, { children: [_jsx(Button, { type: 'button', variant: 'text', onClick: () => {
103
+ setOpen(cur => !cur);
104
+ }, "aria-expanded": open ? 'true' : 'false', "aria-label": t(open ? 'collapse_noun' : 'expand_noun', [name]), children: _jsxs(Flex, { container: { alignItems: 'center', gap: 0.5 }, as: 'span', children: [_jsx(Icon, { name: 'caret-right' }), nameText] }) }), additionalInfo] })) : (_jsxs(_Fragment, { children: [nameText, additionalInfo] })) }) })), collapsible ? (_jsx(ExpandCollapse, { "data-testid": testIds.expandCollapse, collapsed: !open, children: content })) : (content)] }) }));
105
+ });
106
+ export default withTestIds(DetailsV2, getDetailsV2TestIds);
107
+ //# sourceMappingURL=DetailsV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.tsx"],"names":[],"mappings":";AAAA,OAAO,EAIL,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,OAAO,EACR,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAKL,cAAc,EACd,IAAI,EACJ,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,yBAAyB,EACzB,OAAO,EACP,IAAI,EACJ,UAAU,EACV,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,4BAA4B,EAC5B,eAAe,EACf,6BAA6B,EAC7B,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAyD5B,MAAM,SAAS,GAAsC,UAAU,CAAC,SAAS,SAAS,CAChF,EACE,MAAM,EACN,eAAe,EACf,OAAO,EACP,IAAI,EACJ,WAAW,EACX,WAAW,EACX,WAAW,GAAG,KAAK,EACnB,cAAc,EAAE,kBAAkB,EACnC,EACD,GAAG;IAEH,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;IACxD,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAE/E,MAAM,YAAY,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,Q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,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,EACR,cAAc,IACd,CACJ,CAAC,CAAC,CAAC,CACF,8BACG,QAAQ,EACR,cAAc,IACd,CACJ,GACI,GACsB,CAChC,EAEA,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,cAAc,mBAAc,OAAO,CAAC,cAAc,EAAE,SAAS,EAAE,CAAC,IAAI,YAClE,OAAO,GACO,CAClB,CAAC,CAAC,CAAC,CACF,OAAO,CACR,IACe,GACQ,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import {\n type FC,\n type ReactNode,\n type Ref,\n forwardRef,\n Fragment,\n useState,\n useContext,\n useEffect,\n useMemo\n} from 'react';\nimport { remToPx } from 'polished';\n\nimport {\n type ForwardProps,\n type HeadingTag,\n type TestIdProp,\n type AdditionalInfoProps,\n AdditionalInfo,\n Text,\n useBreakpoint,\n useConsolidatedRef,\n useTheme,\n ExpandCollapse,\n Button,\n Flex,\n Icon,\n useChToPxConversionFactor,\n useI18n,\n HTML,\n useTestIds,\n withTestIds\n} from '@pega/cosmos-react-core';\n\nimport { getDetailsV2TestIds } from './DetailsV2.test-ids';\nimport DetailsV2Context from './DetailsV2Context';\nimport {\n StyledFieldValueGroupLabelV2,\n StyledDetailsV2,\n StyledHighlightedDetailListV2,\n StyledDetailDescriptionV2,\n StyledDetailColumnsV2,\n columnGapMultiplier,\n StyledDetailColumnV2\n} from './DetailsV2.styles';\n\ntype ColumnCount = 1 | 2 | 3;\n\nexport type DetailsV2TwoColumnArrangement = undefined | 'narrowWide' | 'wideNarrow';\nexport type DetailsV2Props = TestIdProp & {\n /**\n * FieldValueItems to display as highlighted data above children.\n */\n highlightedData?: ReactNode[];\n /** Copy placed in paragraph below the name */\n description?: string;\n /**\n * Template children separated into 1-3 columns {a, b, c} and their arrangement.\n */\n columns:\n | {\n a: ReactNode;\n b?: never;\n c?: never;\n arrangement?: never;\n }\n | {\n a: ReactNode;\n b: ReactNode;\n c?: never;\n arrangement?: DetailsV2TwoColumnArrangement;\n }\n | {\n a: ReactNode;\n b: ReactNode;\n c: ReactNode;\n arrangement?: never;\n };\n ref?: Ref<HTMLDivElement>;\n} & (\n | {\n /** Text used as heading of list */\n name: string;\n /** Pass a heading and content to show additional information on the list. */\n additionalInfo?: {\n heading?: AdditionalInfoProps['heading'];\n content: AdditionalInfoProps['children'];\n };\n /**\n * Whether the items children can be collapsed (only applies if name is provided)\n * @default false\n */\n collapsible?: boolean;\n }\n | {\n name?: undefined;\n additionalInfo?: never;\n collapsible?: never;\n }\n );\n\nconst DetailsV2: FC<DetailsV2Props & ForwardProps> = forwardRef(function DetailsV2(\n {\n testId,\n highlightedData,\n columns,\n name,\n description,\n arrangement,\n collapsible = false,\n additionalInfo: additionalInfoProp\n },\n ref\n) {\n const testIds = useTestIds(testId, getDetailsV2TestIds);\n const t = useI18n();\n const { longestLabelLength, depth, ...context } = useContext(DetailsV2Context);\n\n const containerRef = useConsolidatedRef(ref);\n const [open, setOpen] = useState(true);\n\n // Observer and state for mobile.\n const columnCount = (() => {\n let count: ColumnCount = 1;\n\n if (columns.b) count = 2;\n if (columns.c) count = 3;\n\n return count;\n })();\n const {\n base: {\n 'content-width': { sm: smContentWidth }\n }\n } = useTheme();\n const chToPxConversionFactor = useChToPxConversionFactor();\n\n const fitsThreeColumns = useBreakpoint('xl', {\n breakpointRef: containerRef,\n themeProp: 'content-width'\n });\n const fitsTwoColumns = useBreakpoint('md', {\n breakpointRef: containerRef,\n themeProp: 'content-width'\n });\n const [contentMobileView, setContentMobileView] = useState(false);\n\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 * columnGapMultiplier) * (columnCount - 1);\n const mobileViewBreakpoint = minWidthPx * columnCount + colGapPxAllowance;\n\n setContentMobileView(elementWidth < mobileViewBreakpoint);\n };\n const resizeObserver = new ResizeObserver(entries => {\n const containerPxWidth = entries[0].contentRect.width;\n checkBreakpoint(containerPxWidth);\n });\n\n if (containerRef.current) {\n checkBreakpoint(containerRef.current.offsetWidth);\n resizeObserver.observe(containerRef.current);\n }\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [columnCount]);\n\n // Context\n const headingDepth = depth ?? 1;\n const contextValue = useMemo(() => {\n return {\n mobileView: contentMobileView,\n depth: name ? headingDepth + 1 : headingDepth,\n longestLabelLength,\n ...context\n };\n }, [name, headingDepth, longestLabelLength, contentMobileView, context]);\n\n // Memoized Elements\n const nameText = useMemo(() => {\n return <Text variant={`h${Math.min(headingDepth, 6)}` as HeadingTag}>{name}</Text>;\n }, [name, headingDepth]);\n\n const additionalInfo = useMemo(() => {\n return name && additionalInfoProp ? (\n <AdditionalInfo heading={additionalInfoProp.heading} contextualLabel={name}>\n {additionalInfoProp.content}\n </AdditionalInfo>\n ) : undefined;\n }, [name, additionalInfoProp?.heading, additionalInfoProp?.content]);\n\n const content = useMemo(() => {\n let applyColumnCount = columnCount;\n\n if (columnCount !== 1) {\n if (columnCount === 3 && fitsThreeColumns) {\n applyColumnCount = 3;\n } else if (fitsTwoColumns) {\n applyColumnCount = 2;\n } else {\n applyColumnCount = 1;\n }\n }\n\n return (\n <>\n {description && (\n <StyledDetailDescriptionV2 data-testid={testIds.description}>\n <HTML as='p' content={description} />\n </StyledDetailDescriptionV2>\n )}\n\n {highlightedData && (\n <>\n <Flex\n data-testid={testIds.highlightedData}\n as={StyledHighlightedDetailListV2}\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 <Flex\n as={StyledDetailColumnsV2}\n container={{\n direction: 'row',\n colGap: columnGapMultiplier\n }}\n data-testid={testIds.data}\n arrangement={arrangement}\n columnCount={applyColumnCount}\n >\n <StyledDetailColumnV2>{columns.a}</StyledDetailColumnV2>\n {columns.b && <StyledDetailColumnV2>{columns.b}</StyledDetailColumnV2>}\n {columns.c && <StyledDetailColumnV2>{columns.c}</StyledDetailColumnV2>}\n </Flex>\n </>\n );\n }, [\n highlightedData,\n columnCount,\n columns.a,\n columns.b,\n columns.c,\n arrangement,\n testIds,\n fitsTwoColumns,\n fitsThreeColumns,\n description\n ]);\n\n return (\n <DetailsV2Context.Provider value={contextValue}>\n <StyledDetailsV2 data-testid={testIds.root} ref={containerRef}>\n {name && (\n <StyledFieldValueGroupLabelV2 data-testid={testIds.heading}>\n <Flex container={{ alignItems: 'center', gap: 0.5 }}>\n {collapsible ? (\n <>\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 {additionalInfo}\n </>\n ) : (\n <>\n {nameText}\n {additionalInfo}\n </>\n )}\n </Flex>\n </StyledFieldValueGroupLabelV2>\n )}\n\n {collapsible ? (\n <ExpandCollapse data-testid={testIds.expandCollapse} collapsed={!open}>\n {content}\n </ExpandCollapse>\n ) : (\n content\n )}\n </StyledDetailsV2>\n </DetailsV2Context.Provider>\n );\n});\n\nexport default withTestIds(DetailsV2, getDetailsV2TestIds);\n"]}
@@ -0,0 +1,40 @@
1
+ import { type DefaultTheme } from 'styled-components';
2
+ import { type StyledFieldValueListProps } from '@pega/cosmos-react-core';
3
+ import type { DetailsV2TwoColumnArrangement } from './DetailsV2';
4
+ interface StyledDetailsV2ListProps extends StyledFieldValueListProps {
5
+ /** Whether individual list items all have labels stacks on top */
6
+ stacked?: boolean;
7
+ /** The character length applied to all list labels */
8
+ labelLength?: number;
9
+ /**
10
+ * Whether to apply narrow list styles
11
+ * @default false
12
+ */
13
+ narrow?: boolean;
14
+ theme: DefaultTheme;
15
+ }
16
+ interface StyledDetailColumnsV2Props {
17
+ /**
18
+ * Number of columns in the list
19
+ * @default 1
20
+ */
21
+ columnCount?: 1 | 2 | 3;
22
+ /**
23
+ * Arrangement of two-column configurations.
24
+ */
25
+ arrangement?: DetailsV2TwoColumnArrangement;
26
+ theme: DefaultTheme;
27
+ }
28
+ export declare const columnGapMultiplier = 5.5;
29
+ export declare const oneColumnDetailsColumnWidth = "100ch";
30
+ export declare const multiColumnDetailsColumnWidth = "80ch";
31
+ export declare const StyledFieldValueGroupLabelV2: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
32
+ export declare const StyledDetailDescriptionV2: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
33
+ export declare const StyledDetailsV2: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
34
+ export declare const StyledDetailColumnV2: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
35
+ export declare const StyledDetailColumnsV2: import("styled-components").StyledComponent<"div", DefaultTheme, StyledDetailColumnsV2Props, never>;
36
+ export declare const StyledHighlightedDetailListV2: import("styled-components").StyledComponent<"dl", DefaultTheme, {}, never>;
37
+ export declare const StyledInlineFieldValueItemV2: import("styled-components").StyledComponent<"div", DefaultTheme, {}, never>;
38
+ export declare const StyledDetailsListV2: import("styled-components").StyledComponent<"dl", DefaultTheme, StyledFieldValueListProps & Pick<StyledDetailsV2ListProps, keyof StyledDetailsV2ListProps> & Required<Pick<StyledDetailsV2ListProps, never>>, never>;
39
+ export {};
40
+ //# sourceMappingURL=DetailsV2.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.styles.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.styles.ts"],"names":[],"mappings":"AAAA,OAAe,EAAO,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EACL,KAAK,yBAAyB,EAW/B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAEjE,UAAU,wBAAyB,SAAQ,yBAAyB;IAClE,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,UAAU,0BAA0B;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,6BAA6B,CAAC;IAC5C,KAAK,EAAE,YAAY,CAAC;CACrB;AAKD,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,2BAA2B,UAAU,CAAC;AACnD,eAAO,MAAM,6BAA6B,SAAS,CAAC;AAEpD,eAAO,MAAM,4BAA4B,6EAuBvC,CAAC;AAIH,eAAO,MAAM,yBAAyB,6EAYpC,CAAC;AAgBH,eAAO,MAAM,eAAe,6EAU1B,CAAC;AAIH,eAAO,MAAM,oBAAoB,6EAW/B,CAAC;AAIH,eAAO,MAAM,qBAAqB,qGA4EjC,CAAC;AAIF,eAAO,MAAM,6BAA6B,4EAuBxC,CAAC;AAIH,eAAO,MAAM,4BAA4B,6EAIxC,CAAC;AAEF,eAAO,MAAM,mBAAmB,sNAoF/B,CAAC"}
@@ -0,0 +1,245 @@
1
+ import styled, { css } from 'styled-components';
2
+ import { calculateFontSize, defaultThemeProp, StyledFieldValue, StyledStackedFieldValue, StyledFieldValueList, StyledIcon, useDirection, StyledButtonLink } from '@pega/cosmos-react-core';
3
+ const rowGapMultiplier = 1;
4
+ export const columnGapMultiplier = 5.5;
5
+ export const oneColumnDetailsColumnWidth = '100ch';
6
+ export const multiColumnDetailsColumnWidth = '80ch';
7
+ export const StyledFieldValueGroupLabelV2 = styled.div(({ theme }) => {
8
+ const { base: { spacing, animation } } = theme;
9
+ const { rtl } = useDirection();
10
+ return css `
11
+ width: 100%;
12
+ grid-column: 1 / -1;
13
+ margin-block-end: calc(${rowGapMultiplier} * ${spacing});
14
+
15
+ ${StyledButtonLink} ${StyledIcon} {
16
+ transition: transform ${animation.speed} ${animation.timing.ease};
17
+ }
18
+
19
+ ${StyledButtonLink}[aria-expanded='true'] ${StyledIcon} {
20
+ transform: rotate(90deg);
21
+ }
22
+
23
+ ${StyledButtonLink}[aria-expanded='false'] ${StyledIcon} {
24
+ transform: rotate(${rtl ? 180 : 0}deg);
25
+ }
26
+ `;
27
+ });
28
+ StyledFieldValueGroupLabelV2.defaultProps = defaultThemeProp;
29
+ export const StyledDetailDescriptionV2 = styled.div(({ theme }) => {
30
+ const { base: { spacing, 'content-width': { xl } } } = theme;
31
+ return css `
32
+ max-width: ${xl};
33
+ margin-block-end: calc(1.5 * ${spacing});
34
+ `;
35
+ });
36
+ StyledDetailDescriptionV2.defaultProps = defaultThemeProp;
37
+ const spacingTop = (spacing) => {
38
+ return css `
39
+ > ${StyledFieldValueGroupLabelV2} {
40
+ margin-block-start: calc((1.5 * ${rowGapMultiplier}) * ${spacing});
41
+ }
42
+
43
+ > ${StyledDetailDescriptionV2}:first-child {
44
+ margin-block-start: calc(1.5 * ${spacing});
45
+ }
46
+ `;
47
+ };
48
+ export const StyledDetailsV2 = styled.div(({ theme }) => {
49
+ const { base: { spacing } } = theme;
50
+ return css `
51
+ &:not(:first-child) {
52
+ ${spacingTop(spacing)}
53
+ }
54
+ `;
55
+ });
56
+ StyledDetailsV2.defaultProps = defaultThemeProp;
57
+ export const StyledDetailColumnV2 = styled.div(({ theme }) => {
58
+ const { base: { spacing } } = theme;
59
+ return css `
60
+ display: flex;
61
+ flex-direction: column;
62
+ row-gap: calc(${rowGapMultiplier} * ${spacing});
63
+ width: 100%;
64
+ `;
65
+ });
66
+ StyledDetailColumnV2.defaultProps = defaultThemeProp;
67
+ export const StyledDetailColumnsV2 = styled.div(({ theme, arrangement, columnCount = 1 }) => {
68
+ const { base: { spacing } } = theme;
69
+ return css `
70
+ width: 100%;
71
+
72
+ ${columnCount === 2 &&
73
+ !arrangement &&
74
+ css `
75
+ flex-wrap: wrap;
76
+ `}
77
+
78
+ ${columnCount === 1 &&
79
+ css `
80
+ flex-direction: column;
81
+ row-gap: calc(${rowGapMultiplier} * ${spacing});
82
+ `};
83
+
84
+ /* Column Widths */
85
+ > ${StyledDetailColumnV2} {
86
+ overflow: hidden;
87
+
88
+ ${columnCount === 3 &&
89
+ css `
90
+ width: ${multiColumnDetailsColumnWidth};
91
+ max-width: calc(33.33% - (${columnGapMultiplier} * ${spacing} * 2) / 3);
92
+ `}
93
+
94
+ ${columnCount === 2 &&
95
+ css `
96
+ width: calc(50% - (${columnGapMultiplier} * ${spacing}) / 2);
97
+ max-width: unset;
98
+
99
+ &:nth-child(3) > ${StyledDetailsV2}:first-child {
100
+ ${spacingTop(spacing)}
101
+ }
102
+ `}
103
+
104
+ ${columnCount !== 1 &&
105
+ css `
106
+ ${arrangement === 'narrowWide' &&
107
+ css `
108
+ &:nth-child(2) {
109
+ width: calc(
110
+ ${multiColumnDetailsColumnWidth} * 2 + ${columnGapMultiplier} * ${spacing}
111
+ );
112
+ max-width: calc(66.66% - (${columnGapMultiplier} * ${spacing}) / 3);
113
+ }
114
+ `}
115
+
116
+ ${arrangement === 'wideNarrow' &&
117
+ css `
118
+ &:nth-child(1) {
119
+ width: calc(
120
+ ${multiColumnDetailsColumnWidth} * 2 + ${columnGapMultiplier} * ${spacing}
121
+ );
122
+ max-width: calc(66.66% - (${columnGapMultiplier} * ${spacing}) / 3);
123
+ }
124
+ `}
125
+ `}
126
+
127
+ ${columnCount === 1 &&
128
+ css `
129
+ width: 100%;
130
+ max-width: 100%;
131
+
132
+ &:not(:first-child) > ${StyledDetailsV2}:first-child {
133
+ ${spacingTop(spacing)}
134
+ }
135
+ `}
136
+ }
137
+ `;
138
+ });
139
+ StyledDetailColumnsV2.defaultProps = defaultThemeProp;
140
+ export const StyledHighlightedDetailListV2 = styled.dl(({ theme }) => {
141
+ const { base: { spacing, palette } } = theme;
142
+ const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
143
+ return css `
144
+ max-width: calc(${multiColumnDetailsColumnWidth} * 3 + ${columnGapMultiplier} * ${spacing} * 2);
145
+ padding-block-end: calc(1.5 * ${spacing});
146
+
147
+ dd {
148
+ font-size: ${fontSize[theme.components.text.h1['font-size']]};
149
+ font-weight: ${theme.components.text.h1['font-weight']};
150
+ }
151
+
152
+ + hr {
153
+ border-top: unset;
154
+ border-radius: unset;
155
+ border-style: unset;
156
+ border-bottom: 0.0625rem solid ${palette['border-line']};
157
+ margin-block-end: calc(1.5 * ${spacing});
158
+ }
159
+ `;
160
+ });
161
+ StyledHighlightedDetailListV2.defaultProps = defaultThemeProp;
162
+ export const StyledInlineFieldValueItemV2 = styled.div `
163
+ > * {
164
+ min-width: 0;
165
+ }
166
+ `;
167
+ export const StyledDetailsListV2 = styled(StyledFieldValueList)(({ stacked, labelLength, variant, theme, narrow = false }) => {
168
+ const { base: { spacing } } = theme;
169
+ const labelTop = stacked && variant !== 'value-comparison';
170
+ const isValueComparison = variant === 'value-comparison';
171
+ const fieldValueGapMultiplier = 2;
172
+ return css `
173
+ /* Field Grid Styles */
174
+ display: flex;
175
+ flex-direction: column;
176
+ row-gap: calc(${rowGapMultiplier} * ${spacing});
177
+ width: 100%;
178
+ max-width: ${oneColumnDetailsColumnWidth};
179
+ height: fit-content;
180
+
181
+ ${StyledFieldValue} {
182
+ word-break: break-word;
183
+ overflow: auto;
184
+ }
185
+
186
+ ${StyledInlineFieldValueItemV2}, ${StyledStackedFieldValue} {
187
+ width: 100%;
188
+ }
189
+
190
+ ${StyledInlineFieldValueItemV2} {
191
+ grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);
192
+ grid-template-rows: max-content;
193
+ column-gap: calc(${fieldValueGapMultiplier} * ${spacing});
194
+ }
195
+
196
+ /* Stacked Label Styles */
197
+ ${labelTop &&
198
+ css `
199
+ grid-template-columns: minmax(0, 1fr);
200
+ row-gap: 0;
201
+
202
+ dt {
203
+ max-width: 100%;
204
+ }
205
+
206
+ ${!isValueComparison &&
207
+ css `
208
+ ${StyledStackedFieldValue}:not(:first-child) {
209
+ margin-block-start: calc(${rowGapMultiplier} * ${spacing});
210
+ }
211
+ `}
212
+ `}
213
+
214
+ /* Value Comparison Styles */
215
+ ${isValueComparison &&
216
+ css `
217
+ display: grid;
218
+ grid-template-columns: auto auto;
219
+ column-gap: 0;
220
+ row-gap: calc(0.5 * ${spacing});
221
+
222
+ > dd {
223
+ display: flex;
224
+ flex-direction: column;
225
+ justify-content: flex-end;
226
+ }
227
+ `}
228
+
229
+ /* Responsive behavior */
230
+ ${narrow &&
231
+ !labelTop &&
232
+ !isValueComparison &&
233
+ css `
234
+ ${StyledInlineFieldValueItemV2} {
235
+ grid-template-columns: minmax(0, ${labelLength}ch) minmax(50%, 1fr);
236
+ }
237
+
238
+ dd {
239
+ min-width: 50%;
240
+ }
241
+ `}
242
+ `;
243
+ });
244
+ StyledDetailsListV2.defaultProps = defaultThemeProp;
245
+ //# sourceMappingURL=DetailsV2.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.styles.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAqB,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAIL,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,UAAU,EACV,YA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J,CAAC,CAAC,CAAC;AAEH,6BAA6B,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIrD,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CACvC,oBAAoB,CACrB,CACC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3D,MAAM,EACJ,IAAI,EAAE,EAAE,OAAO,EAAE,EAClB,GAAG,KAAK,CAAC;IAEV,MAAM,QAAQ,GAAG,OAAO,IAAI,OAAO,KAAK,kBAAkB,CAAC;IAC3D,MAAM,iBAAiB,GAAG,OAAO,KAAK,kBAAkB,CAAC;IACzD,MAAM,uBAAuB,GAAG,CAAC,CAAC;IAElC,OAAO,GAAG,CAAA;;;;sBAIQ,gBAAgB,MAAM,OAAO;;mBAEhC,2BAA2B;;;QAGtC,gBAAgB;;;;;QAKhB,4BAA4B,KAAK,uBAAuB;;;;QAIxD,4BAA4B;8CACU,WAAW;;2BAE9B,uBAAuB,MAAM,OAAO;;;;QAIvD,QAAQ;QACV,GAAG,CAAA;;;;;;;;UAQC,CAAC,iBAAiB;YACpB,GAAG,CAAA;YACC,uBAAuB;uCACI,gBAAgB,MAAM,OAAO;;SAE3D;OACF;;;QAGC,iBAAiB;QACnB,GAAG,CAAA;;;;8BAIqB,OAAO;;;;;;;OAO9B;;;QAGC,MAAM;QACR,CAAC,QAAQ;QACT,CAAC,iBAAiB;QAClB,GAAG,CAAA;UACC,4BAA4B;6CACO,WAAW;;;;;;OAMjD;KACF,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css, type DefaultTheme } from 'styled-components';\n\nimport {\n type StyledFieldValueListProps,\n type FontSize,\n type PropsWithDefaults,\n calculateFontSize,\n defaultThemeProp,\n StyledFieldValue,\n StyledStackedFieldValue,\n StyledFieldValueList,\n StyledIcon,\n useDirection,\n StyledButtonLink\n} from '@pega/cosmos-react-core';\n\nimport type { DetailsV2TwoColumnArrangement } from './DetailsV2';\n\ninterface StyledDetailsV2ListProps extends StyledFieldValueListProps {\n /** Whether individual list items all have labels stacks on top */\n stacked?: boolean;\n /** The character length applied to all list labels */\n labelLength?: number;\n /**\n * Whether to apply narrow list styles\n * @default false\n */\n narrow?: boolean;\n theme: DefaultTheme;\n}\n\ninterface StyledDetailColumnsV2Props {\n /**\n * Number of columns in the list\n * @default 1\n */\n columnCount?: 1 | 2 | 3;\n /**\n * Arrangement of two-column configurations.\n */\n arrangement?: DetailsV2TwoColumnArrangement;\n theme: DefaultTheme;\n}\n\ntype StyledDetailsListV2PropsWithDefaults = PropsWithDefaults<StyledDetailsV2ListProps>;\n\nconst rowGapMultiplier = 1;\nexport const columnGapMultiplier = 5.5;\nexport const oneColumnDetailsColumnWidth = '100ch';\nexport const multiColumnDetailsColumnWidth = '80ch';\n\nexport const StyledFieldValueGroupLabelV2 = 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: 1 / -1;\n margin-block-end: calc(${rowGapMultiplier} * ${spacing});\n\n ${StyledButtonLink} ${StyledIcon} {\n transition: transform ${animation.speed} ${animation.timing.ease};\n }\n\n ${StyledButtonLink}[aria-expanded='true'] ${StyledIcon} {\n transform: rotate(90deg);\n }\n\n ${StyledButtonLink}[aria-expanded='false'] ${StyledIcon} {\n transform: rotate(${rtl ? 180 : 0}deg);\n }\n `;\n});\n\nStyledFieldValueGroupLabelV2.defaultProps = defaultThemeProp;\n\nexport const StyledDetailDescriptionV2 = styled.div(({ theme }) => {\n const {\n base: {\n spacing,\n 'content-width': { xl }\n }\n } = theme;\n\n return css`\n max-width: ${xl};\n margin-block-end: calc(1.5 * ${spacing});\n `;\n});\n\nStyledDetailDescriptionV2.defaultProps = defaultThemeProp;\n\nconst spacingTop = (spacing: string) => {\n return css`\n > ${StyledFieldValueGroupLabelV2} {\n margin-block-start: calc((1.5 * ${rowGapMultiplier}) * ${spacing});\n }\n\n > ${StyledDetailDescriptionV2}:first-child {\n margin-block-start: calc(1.5 * ${spacing});\n }\n `;\n};\n\nexport const StyledDetailsV2 = styled.div(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n\n return css`\n &:not(:first-child) {\n ${spacingTop(spacing)}\n }\n `;\n});\n\nStyledDetailsV2.defaultProps = defaultThemeProp;\n\nexport const StyledDetailColumnV2 = styled.div(({ theme }) => {\n const {\n base: { spacing }\n } = theme;\n\n return css`\n display: flex;\n flex-direction: column;\n row-gap: calc(${rowGapMultiplier} * ${spacing});\n width: 100%;\n `;\n});\n\nStyledDetailColumnV2.defaultProps = defaultThemeProp;\n\nexport const StyledDetailColumnsV2 = styled.div<StyledDetailColumnsV2Props>(\n ({ theme, arrangement, columnCount = 1 }) => {\n const {\n base: { spacing }\n } = theme;\n\n return css`\n width: 100%;\n\n ${columnCount === 2 &&\n !arrangement &&\n css`\n flex-wrap: wrap;\n `}\n\n ${columnCount === 1 &&\n css`\n flex-direction: column;\n row-gap: calc(${rowGapMultiplier} * ${spacing});\n `};\n\n /* Column Widths */\n > ${StyledDetailColumnV2} {\n overflow: hidden;\n\n ${columnCount === 3 &&\n css`\n width: ${multiColumnDetailsColumnWidth};\n max-width: calc(33.33% - (${columnGapMultiplier} * ${spacing} * 2) / 3);\n `}\n\n ${columnCount === 2 &&\n css`\n width: calc(50% - (${columnGapMultiplier} * ${spacing}) / 2);\n max-width: unset;\n\n &:nth-child(3) > ${StyledDetailsV2}:first-child {\n ${spacingTop(spacing)}\n }\n `}\n\n ${columnCount !== 1 &&\n css`\n ${arrangement === 'narrowWide' &&\n css`\n &:nth-child(2) {\n width: calc(\n ${multiColumnDetailsColumnWidth} * 2 + ${columnGapMultiplier} * ${spacing}\n );\n max-width: calc(66.66% - (${columnGapMultiplier} * ${spacing}) / 3);\n }\n `}\n\n ${arrangement === 'wideNarrow' &&\n css`\n &:nth-child(1) {\n width: calc(\n ${multiColumnDetailsColumnWidth} * 2 + ${columnGapMultiplier} * ${spacing}\n );\n max-width: calc(66.66% - (${columnGapMultiplier} * ${spacing}) / 3);\n }\n `}\n `}\n\n ${columnCount === 1 &&\n css`\n width: 100%;\n max-width: 100%;\n\n &:not(:first-child) > ${StyledDetailsV2}:first-child {\n ${spacingTop(spacing)}\n }\n `}\n }\n `;\n }\n);\n\nStyledDetailColumnsV2.defaultProps = defaultThemeProp;\n\nexport const StyledHighlightedDetailListV2 = 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: calc(${multiColumnDetailsColumnWidth} * 3 + ${columnGapMultiplier} * ${spacing} * 2);\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\nStyledHighlightedDetailListV2.defaultProps = defaultThemeProp;\n\nexport const StyledInlineFieldValueItemV2 = styled.div`\n > * {\n min-width: 0;\n }\n`;\n\nexport const StyledDetailsListV2 = styled(\n StyledFieldValueList\n)<StyledDetailsListV2PropsWithDefaults>(\n ({ stacked, labelLength, variant, theme, narrow = false }) => {\n const {\n base: { spacing }\n } = theme;\n\n const labelTop = stacked && variant !== 'value-comparison';\n const isValueComparison = variant === 'value-comparison';\n const fieldValueGapMultiplier = 2;\n\n return css`\n /* Field Grid Styles */\n display: flex;\n flex-direction: column;\n row-gap: calc(${rowGapMultiplier} * ${spacing});\n width: 100%;\n max-width: ${oneColumnDetailsColumnWidth};\n height: fit-content;\n\n ${StyledFieldValue} {\n word-break: break-word;\n overflow: auto;\n }\n\n ${StyledInlineFieldValueItemV2}, ${StyledStackedFieldValue} {\n width: 100%;\n }\n\n ${StyledInlineFieldValueItemV2} {\n grid-template-columns: minmax(14ch, ${labelLength}ch) minmax(14ch, 1fr);\n grid-template-rows: max-content;\n column-gap: calc(${fieldValueGapMultiplier} * ${spacing});\n }\n\n /* Stacked Label Styles */\n ${labelTop &&\n css`\n grid-template-columns: minmax(0, 1fr);\n row-gap: 0;\n\n dt {\n max-width: 100%;\n }\n\n ${!isValueComparison &&\n css`\n ${StyledStackedFieldValue}:not(:first-child) {\n margin-block-start: calc(${rowGapMultiplier} * ${spacing});\n }\n `}\n `}\n\n /* Value Comparison Styles */\n ${isValueComparison &&\n css`\n display: grid;\n grid-template-columns: auto auto;\n column-gap: 0;\n row-gap: calc(0.5 * ${spacing});\n\n > dd {\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n }\n `}\n\n /* Responsive behavior */\n ${narrow &&\n !labelTop &&\n !isValueComparison &&\n css`\n ${StyledInlineFieldValueItemV2} {\n grid-template-columns: minmax(0, ${labelLength}ch) minmax(50%, 1fr);\n }\n\n dd {\n min-width: 50%;\n }\n `}\n `;\n }\n);\n\nStyledDetailsListV2.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const getDetailsV2TestIds: (testIdProp?: string | undefined) => import("@pega/cosmos-react-core").TestIdsRecord<readonly ["heading", "description", "highlighted-data", "data", "expand-collapse"]>;
2
+ //# sourceMappingURL=DetailsV2.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,0KAMrB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createTestIds } from '@pega/cosmos-react-core';
2
+ export const getDetailsV2TestIds = createTestIds('detailsV2', [
3
+ 'heading',
4
+ 'description',
5
+ 'highlighted-data',
6
+ 'data',
7
+ 'expand-collapse'
8
+ ]);
9
+ //# sourceMappingURL=DetailsV2.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2.test-ids.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC,WAAW,EAAE;IAC5D,SAAS;IACT,aAAa;IACb,kBAAkB;IAClB,MAAM;IACN,iBAAiB;CACT,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getDetailsV2TestIds = createTestIds('detailsV2', [\n 'heading',\n 'description',\n 'highlighted-data',\n 'data',\n 'expand-collapse'\n] as const);\n"]}
@@ -0,0 +1,9 @@
1
+ export interface DetailsV2ContextValue {
2
+ longestLabelLength?: number;
3
+ setLongestLabelLength?: (val: number) => void;
4
+ mobileView?: boolean;
5
+ depth?: number;
6
+ }
7
+ declare const DetailsV2Context: import("react").Context<DetailsV2ContextValue>;
8
+ export default DetailsV2Context;
9
+ //# sourceMappingURL=DetailsV2Context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2Context.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2Context.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,qBAAqB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,gBAAgB,gDAKpB,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { createContext } from 'react';
2
+ const DetailsV2Context = createContext({
3
+ longestLabelLength: undefined,
4
+ setLongestLabelLength: () => { },
5
+ mobileView: false,
6
+ depth: 1
7
+ });
8
+ export default DetailsV2Context;
9
+ //# sourceMappingURL=DetailsV2Context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2Context.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2Context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAStC,MAAM,gBAAgB,GAAG,aAAa,CAAwB;IAC5D,kBAAkB,EAAE,SAAS;IAC7B,qBAAqB,EAAE,GAAG,EAAE,GAAE,CAAC;IAC/B,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,CAAC;CACT,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC","sourcesContent":["import { createContext } from 'react';\n\nexport interface DetailsV2ContextValue {\n longestLabelLength?: number;\n setLongestLabelLength?: (val: number) => void;\n mobileView?: boolean;\n depth?: number;\n}\n\nconst DetailsV2Context = createContext<DetailsV2ContextValue>({\n longestLabelLength: undefined,\n setLongestLabelLength: () => {},\n mobileView: false,\n depth: 1\n});\n\nexport default DetailsV2Context;\n"]}
@@ -0,0 +1,15 @@
1
+ import type { Ref } from 'react';
2
+ import { type Attributes, type ElementTag, type FieldValueListItem, type NoChildrenProp } from '@pega/cosmos-react-core';
3
+ type WithAttributes<Tag extends ElementTag, Props> = Props & Omit<Attributes<Tag>, keyof Props>;
4
+ export type DetailsV2ListProps = WithAttributes<'dl', NoChildrenProp & {
5
+ /** Field value list items */
6
+ items: FieldValueListItem[];
7
+ /** Whether to apply `value-comparison` styles to list items
8
+ * @default false
9
+ */
10
+ valueComparison?: boolean;
11
+ ref?: Ref<HTMLDListElement>;
12
+ }>;
13
+ declare const DetailsV2List: import("react").ForwardRefExoticComponent<Omit<DetailsV2ListProps, "ref"> & import("react").RefAttributes<HTMLDListElement>>;
14
+ export default DetailsV2List;
15
+ //# sourceMappingURL=DetailsV2List.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2List.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2List.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgB,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAMpB,MAAM,yBAAyB,CAAC;AAKjC,KAAK,cAAc,CAAC,GAAG,SAAS,UAAU,EAAE,KAAK,IAAI,KAAK,GAExD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,KAAK,CAAC,CAAC;AAErC,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAC7C,IAAI,EACJ,cAAc,GAAG;IACf,6BAA6B;IAC7B,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B,CACF,CAAC;AAEF,QAAA,MAAM,aAAa,8HAoDlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { createElement as _createElement } from "react";
3
+ import { forwardRef, useContext } from 'react';
4
+ import { FieldValueItem, Grid, useBreakpoint, useConsolidatedRef } from '@pega/cosmos-react-core';
5
+ import DetailsV2Context from './DetailsV2Context';
6
+ import { StyledDetailsListV2, StyledInlineFieldValueItemV2 } from './DetailsV2.styles';
7
+ const DetailsV2List = forwardRef(function DetailsV2List({ items, valueComparison = false }, ref) {
8
+ const { longestLabelLength, mobileView: inMobileView } = useContext(DetailsV2Context);
9
+ const containerRef = useConsolidatedRef(ref);
10
+ const isSmallOrAbove = useBreakpoint('sm');
11
+ const isSmContentWidthOrAbove = useBreakpoint('sm', {
12
+ breakpointRef: containerRef,
13
+ themeProp: 'content-width'
14
+ });
15
+ const isMdContentWidthOrAbove = useBreakpoint('md', {
16
+ breakpointRef: containerRef,
17
+ themeProp: 'content-width'
18
+ });
19
+ const labelLength = Math.max(14, Math.min(longestLabelLength ?? 16, 40));
20
+ const applyMobileView = inMobileView || !isSmallOrAbove || !isSmContentWidthOrAbove;
21
+ return items.length > 0 ? (_jsx(StyledDetailsListV2, { ref: containerRef, labelLength: labelLength, stacked: applyMobileView, variant: valueComparison && !applyMobileView ? 'value-comparison' : undefined, narrow: !isMdContentWidthOrAbove, children: items.map(({ id, name, value, variant: fieldVariant, ...restProps }) => {
22
+ const isStacked = applyMobileView || fieldVariant === 'stacked';
23
+ const item = (_createElement(FieldValueItem, { ...restProps, name: name, value: value, variant: isStacked ? 'stacked' : 'inline', key: id ?? name }));
24
+ return isStacked || valueComparison ? (item) : (_jsx(Grid, { as: StyledInlineFieldValueItemV2, container: { cols: '16ch minmax(0, 1fr)' }, children: item }, id ?? name));
25
+ }) })) : null;
26
+ });
27
+ export default DetailsV2List;
28
+ //# sourceMappingURL=DetailsV2List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailsV2List.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/DetailsV2List.tsx"],"names":[],"mappings":";;AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,EAML,cAAc,EACd,IAAI,EACJ,aAAa,EACb,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAmBvF,MAAM,aAAa,GAAG,UAAU,CAC9B,SAAS,aAAa,CAAC,EAAE,KAAK,EAAE,eAAe,GAAG,KAAK,EAAE,EAAE,GAAG;IAC5D,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;I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,IAAI,GACf,CACH,CAAC;YAEF,OAAO,SAAS,IAAI,eAAe,CAAC,CAAC,CAAC,CACpC,IAAI,CACL,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IACH,EAAE,EAAE,4BAA4B,EAChC,SAAS,EAAE,EAAE,IAAI,EAAE,qBAAqB,EAAE,YAGzC,IAAI,IAFA,EAAE,IAAI,IAAI,CAGV,CACR,CAAC;QACJ,CAAC,CAAC,GACkB,CACvB,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef, useContext } from 'react';\nimport type { PropsWithRef, Ref } from 'react';\n\nimport {\n type Attributes,\n type ElementTag,\n type FieldValueListItem,\n type NoChildrenProp,\n type RefElement,\n FieldValueItem,\n Grid,\n useBreakpoint,\n useConsolidatedRef\n} from '@pega/cosmos-react-core';\n\nimport DetailsV2Context from './DetailsV2Context';\nimport { StyledDetailsListV2, StyledInlineFieldValueItemV2 } from './DetailsV2.styles';\n\ntype WithAttributes<Tag extends ElementTag, Props> = Props &\n // eslint-disable-next-line @typescript-eslint/ban-types\n Omit<Attributes<Tag>, keyof Props>;\n\nexport type DetailsV2ListProps = WithAttributes<\n 'dl',\n NoChildrenProp & {\n /** Field value list items */\n items: FieldValueListItem[];\n /** Whether to apply `value-comparison` styles to list items\n * @default false\n */\n valueComparison?: boolean;\n ref?: Ref<HTMLDListElement>;\n }\n>;\n\nconst DetailsV2List = forwardRef<RefElement<DetailsV2ListProps>, PropsWithRef<DetailsV2ListProps>>(\n function DetailsV2List({ items, valueComparison = false }, ref) {\n const { longestLabelLength, mobileView: inMobileView } = useContext(DetailsV2Context);\n const containerRef = useConsolidatedRef(ref);\n const isSmallOrAbove = useBreakpoint('sm');\n const isSmContentWidthOrAbove = useBreakpoint('sm', {\n breakpointRef: containerRef,\n themeProp: 'content-width'\n });\n const isMdContentWidthOrAbove = useBreakpoint('md', {\n breakpointRef: containerRef,\n themeProp: 'content-width'\n });\n\n const labelLength = Math.max(14, Math.min(longestLabelLength ?? 16, 40));\n const applyMobileView = inMobileView || !isSmallOrAbove || !isSmContentWidthOrAbove;\n\n return items.length > 0 ? (\n <StyledDetailsListV2\n ref={containerRef}\n labelLength={labelLength}\n stacked={applyMobileView}\n variant={valueComparison && !applyMobileView ? 'value-comparison' : undefined}\n narrow={!isMdContentWidthOrAbove}\n >\n {items.map(({ id, name, value, variant: fieldVariant, ...restProps }) => {\n const isStacked = applyMobileView || fieldVariant === 'stacked';\n const item = (\n <FieldValueItem\n {...restProps}\n name={name}\n value={value}\n variant={isStacked ? 'stacked' : 'inline'}\n key={id ?? name}\n />\n );\n\n return isStacked || valueComparison ? (\n item\n ) : (\n <Grid\n as={StyledInlineFieldValueItemV2}\n container={{ cols: '16ch minmax(0, 1fr)' }}\n key={id ?? name}\n >\n {item}\n </Grid>\n );\n })}\n </StyledDetailsListV2>\n ) : null;\n }\n);\n\nexport default DetailsV2List;\n"]}
@@ -0,0 +1,5 @@
1
+ export { default } from './DetailsV2';
2
+ export { default as DetailsV2List } from './DetailsV2List';
3
+ export { default as DetailsV2Context } from './DetailsV2Context';
4
+ export { StyledFieldValueGroupLabelV2, StyledDetailsListV2, StyledDetailsV2, StyledHighlightedDetailListV2 } from './DetailsV2.styles';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DetailsV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,eAAe,EACf,6BAA6B,EAC9B,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { default } from './DetailsV2';
2
+ export { default as DetailsV2List } from './DetailsV2List';
3
+ export { default as DetailsV2Context } from './DetailsV2Context';
4
+ export { StyledFieldValueGroupLabelV2, StyledDetailsListV2, StyledDetailsV2, StyledHighlightedDetailListV2 } from './DetailsV2.styles';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DetailsV2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,eAAe,EACf,6BAA6B,EAC9B,MAAM,oBAAoB,CAAC","sourcesContent":["export { default } from './DetailsV2';\nexport { default as DetailsV2List } from './DetailsV2List';\nexport { default as DetailsV2Context } from './DetailsV2Context';\nexport {\n StyledFieldValueGroupLabelV2,\n StyledDetailsListV2,\n StyledDetailsV2,\n StyledHighlightedDetailListV2\n} from './DetailsV2.styles';\n"]}
package/lib/index.d.ts CHANGED
@@ -16,6 +16,8 @@ export { default as Confirmation } from './components/Confirmation';
16
16
  export * from './components/Confirmation';
17
17
  export { default as Details } from './components/Details';
18
18
  export * from './components/Details';
19
+ export { default as DetailsV2 } from './components/DetailsV2';
20
+ export * from './components/DetailsV2';
19
21
  export { default as Glimpse } from './components/Glimpse';
20
22
  export * from './components/Glimpse';
21
23
  export { default as IntelligentGuidance } from './components/IntelligentGuidance';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,M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AS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC"}
package/lib/index.js CHANGED
@@ -17,6 +17,8 @@ export { default as Confirmation } from './components/Confirmation';
17
17
  export * from './components/Confirmation';
18
18
  export { default as Details } from './components/Details';
19
19
  export * from './components/Details';
20
+ export { default as DetailsV2 } from './components/DetailsV2';
21
+ export * from './components/DetailsV2';
20
22
  export { default as Glimpse } from './components/Glimpse';
21
23
  export * from './components/Glimpse';
22
24
  export { default as IntelligentGuidance } from './components/IntelligentGuidance';
package/lib/index.js.map CHANGED
@@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AAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as Timeline } from './components/Timeline';\nexport * from './components/Timeline';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC1E,cAAc,8BAA8B,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,iCAAiC,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,cAAc,kCAAkC,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACpE,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as AppAnnouncement } from './components/AppAnnouncement';\nexport * from './components/AppAnnouncement';\nexport { default as Article } from './components/Article';\nexport * from './components/Article';\nexport { default as ArticleList } from './components/ArticleList';\nexport * from './components/ArticleList';\nexport { default as Assignments } from './components/Assignments';\nexport * from './components/Assignments';\nexport { default as CasePreview } from './components/CasePreview';\nexport * from './components/CasePreview';\nexport { default as CaseView } from './components/CaseView';\nexport * from './components/CaseView';\nexport { default as ConfigurableLayout } from './components/ConfigurableLayout';\nexport * from './components/ConfigurableLayout';\nexport { default as Confirmation } from './components/Confirmation';\nexport * from './components/Confirmation';\nexport { default as Details } from './components/Details';\nexport * from './components/Details';\nexport { default as DetailsV2 } from './components/DetailsV2';\nexport * from './components/DetailsV2';\nexport { default as Glimpse } from './components/Glimpse';\nexport * from './components/Glimpse';\nexport { default as IntelligentGuidance } from './components/IntelligentGuidance';\nexport * from './components/IntelligentGuidance';\nexport { default as InteractionNotification } from './components/InteractionNotification';\nexport { default as Predictions } from './components/Predictions';\nexport * from './components/Predictions';\nexport { default as SearchResults } from './components/SearchResults';\nexport * from './components/SearchResults';\nexport { default as Stages } from './components/Stages';\nexport * from './components/Stages';\nexport { default as Stakeholders } from './components/Stakeholders';\nexport * from './components/Stakeholders';\nexport { default as Tags } from './components/Tags';\nexport * from './components/Tags';\nexport { default as Tasks } from './components/Tasks';\nexport * from './components/Tasks';\nexport { default as Timeline } from './components/Timeline';\nexport * from './components/Timeline';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "6.3.1-1",
3
+ "version": "6.4.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pegasystems/cosmos-react.git",
@@ -19,7 +19,7 @@
19
19
  "build": "tsc -b tsconfig.build.json"
20
20
  },
21
21
  "dependencies": {
22
- "@pega/cosmos-react-core": "6.3.1-1",
22
+ "@pega/cosmos-react-core": "6.4.1",
23
23
  "@types/react": "^17.0.62",
24
24
  "@types/react-dom": "^17.0.20",
25
25
  "@types/styled-components": "^5.1.26",