@pega/cosmos-react-work 10.0.0-build.12.5 → 10.0.0-build.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/MasterDetail/DetailPanelHeader.js +1 -1
- package/lib/components/MasterDetail/DetailPanelHeader.js.map +1 -1
- package/lib/components/MasterDetail/MasterDetail.styles.d.ts.map +1 -1
- package/lib/components/MasterDetail/MasterDetail.styles.js +1 -2
- package/lib/components/MasterDetail/MasterDetail.styles.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,7 +8,7 @@ const DetailPanelHeader = ({ testIds, header, icon, actions, contextualLabel, cl
|
|
|
8
8
|
const t = useI18n();
|
|
9
9
|
const theme = useTheme();
|
|
10
10
|
const { start } = useDirection();
|
|
11
|
-
return (_jsxs(StyledDetailPanelHeader, { "data-testid": testIds.header, "$isNested": isNested, children: [back && (_jsx(StyledBackButton, { "data-testid": testIds.back, icon: true, compact: true, onClick: () => back.onClick(), "aria-label": back.contextualLabel ? t('back_to_noun', [back.contextualLabel]) : undefined, label: t('back'), variant: 'simple', children: _jsx(Icon, { name: `arrow-${start}` }) })), _jsxs(StyledDetailPanelIdentity, { "data-testid": testIds.identity, children: [icon && (_jsx(StyledDetailPanelIcon, { name: icon, background: theme.base.palette.interactive, size: 's', shape: 'square' })), header ? (_jsx(Text, { variant: '
|
|
11
|
+
return (_jsxs(StyledDetailPanelHeader, { "data-testid": testIds.header, "$isNested": isNested, children: [back && (_jsx(StyledBackButton, { "data-testid": testIds.back, icon: true, compact: true, onClick: () => back.onClick(), "aria-label": back.contextualLabel ? t('back_to_noun', [back.contextualLabel]) : undefined, label: t('back'), variant: 'simple', children: _jsx(Icon, { name: `arrow-${start}` }) })), _jsxs(StyledDetailPanelIdentity, { "data-testid": testIds.identity, children: [icon && (_jsx(StyledDetailPanelIcon, { name: icon, background: theme.base.palette.interactive, size: 's', shape: 'square' })), header ? (_jsx(Text, { variant: 'h4', ref: headingRef, children: header })) : null] }), (actions || onClose) && (_jsxs(StyledCloseButtonGroup, { children: [actions && _jsx(MasterDetailActions, { actions: actions, contextualLabel: contextualLabel }), onClose && (_jsx(Button, { "data-testid": testIds.close, icon: true, onClick: () => onClose(), ref: closeRef, label: closeLabel, variant: 'simple', children: _jsx(Icon, { name: 'times' }) }))] }))] }));
|
|
12
12
|
};
|
|
13
13
|
export default DetailPanelHeader;
|
|
14
14
|
//# sourceMappingURL=DetailPanelHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DetailPanelHeader.js","sourceRoot":"","sources":["../../../src/components/MasterDetail/DetailPanelHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AA4BjE,gFAAgF;AAChF,MAAM,iBAAiB,GAAG,CAAC,EACzB,OAAO,EACP,MAAM,EACN,IAAI,EACJ,OAAO,EACP,eAAe,EACf,UAAU,EACV,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACe,EAAE,EAAE;IAC3B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,OAAO,CACL,MAAC,uBAAuB,mBAAc,OAAO,CAAC,MAAM,eAAa,QAAQ,aACtE,IAAI,IAAI,CACP,KAAC,gBAAgB,mBACF,OAAO,CAAC,IAAI,EACzB,IAAI,QACJ,OAAO,QACP,OA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18n, useTheme } from '@pega/cosmos-react-core';\n\nimport {\n StyledDetailPanelHeader,\n StyledDetailPanelIcon,\n StyledDetailPanelIdentity,\n StyledCloseButtonGroup,\n StyledBackButton\n} from './MasterDetail.styles';\nimport MasterDetailActions from './MasterDetailActions';\nimport { getMasterDetailTestIds } from './MasterDetail.test-ids';\nimport type { MasterDetailNestedNavigation, MasterDetailProps } from './MasterDetail.types';\n\ninterface DetailPanelHeaderProps {\n /** Test identifiers for the header elements. */\n testIds: Partial<ReturnType<typeof getMasterDetailTestIds>>;\n /** Primary identity content shown in the header. */\n header?: ReactNode;\n /** Icon displayed with the header identity. */\n icon?: string;\n /** Static or on-demand header actions. */\n actions?: NonNullable<NonNullable<MasterDetailProps['selection']>['actions']>;\n /** Accessible context appended to the actions menu label. */\n contextualLabel?: string;\n /** Accessible name for the close control. */\n closeLabel?: string;\n /** Ref forwarded to the close control. */\n closeRef?: Ref<HTMLButtonElement>;\n /** Ref forwarded to the record heading. */\n headingRef?: Ref<HTMLSpanElement | HTMLHeadingElement>;\n /** Omit to render the header for the root record. Supply it to step back to the previous one. */\n back?: MasterDetailNestedNavigation['back'];\n /** Omit on the nested header. Only the root header owns close functionality. */\n onClose?: () => void;\n /** Applies nested-header presentation styles. */\n isNested?: boolean;\n}\n\n/** Renders the common header chrome for the root and nested detail surfaces. */\nconst DetailPanelHeader = ({\n testIds,\n header,\n icon,\n actions,\n contextualLabel,\n closeLabel,\n closeRef,\n headingRef,\n back,\n onClose,\n isNested\n}: DetailPanelHeaderProps) => {\n const t = useI18n();\n const theme = useTheme();\n const { start } = useDirection();\n\n return (\n <StyledDetailPanelHeader data-testid={testIds.header} $isNested={isNested}>\n {back && (\n <StyledBackButton\n data-testid={testIds.back}\n icon\n compact\n onClick={() => back.onClick()}\n aria-label={back.contextualLabel ? t('back_to_noun', [back.contextualLabel]) : undefined}\n label={t('back')}\n variant='simple'\n >\n <Icon name={`arrow-${start}`} />\n </StyledBackButton>\n )}\n <StyledDetailPanelIdentity data-testid={testIds.identity}>\n {icon && (\n <StyledDetailPanelIcon\n name={icon}\n background={theme.base.palette.interactive}\n size='s'\n shape='square'\n />\n )}\n {header ? (\n <Text variant='
|
|
1
|
+
{"version":3,"file":"DetailPanelHeader.js","sourceRoot":"","sources":["../../../src/components/MasterDetail/DetailPanelHeader.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAE9F,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AA4BjE,gFAAgF;AAChF,MAAM,iBAAiB,GAAG,CAAC,EACzB,OAAO,EACP,MAAM,EACN,IAAI,EACJ,OAAO,EACP,eAAe,EACf,UAAU,EACV,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACe,EAAE,EAAE;IAC3B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IACpB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,KAAK,EAAE,GAAG,YAAY,EAAE,CAAC;IAEjC,OAAO,CACL,MAAC,uBAAuB,mBAAc,OAAO,CAAC,MAAM,eAAa,QAAQ,aACtE,IAAI,IAAI,CACP,KAAC,gBAAgB,mBACF,OAAO,CAAC,IAAI,EACzB,IAAI,QACJ,OAAO,QACP,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,gBACjB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EACxF,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAChB,OAAO,EAAC,QAAQ,YAEhB,KAAC,IAAI,IAAC,IAAI,EAAE,SAAS,KAAK,EAAE,GAAI,GACf,CACpB,EACD,MAAC,yBAAyB,mBAAc,OAAO,CAAC,QAAQ,aACrD,IAAI,IAAI,CACP,KAAC,qBAAqB,IACpB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAC1C,IAAI,EAAC,GAAG,EACR,KAAK,EAAC,QAAQ,GACd,CACH,EACA,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,IAAI,IAAC,OAAO,EAAC,IAAI,EAAC,GAAG,EAAE,UAAU,YAC/B,MAAM,GACF,CACR,CAAC,CAAC,CAAC,IAAI,IACkB,EAC3B,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CACvB,MAAC,sBAAsB,eACpB,OAAO,IAAI,KAAC,mBAAmB,IAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,GAAI,EACtF,OAAO,IAAI,CACV,KAAC,MAAM,mBACQ,OAAO,CAAC,KAAK,EAC1B,IAAI,QACJ,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EACxB,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,UAAU,EACjB,OAAO,EAAC,QAAQ,YAEhB,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,GAAG,GACd,CACV,IACsB,CAC1B,IACuB,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport { Button, Icon, Text, useDirection, useI18n, useTheme } from '@pega/cosmos-react-core';\n\nimport {\n StyledDetailPanelHeader,\n StyledDetailPanelIcon,\n StyledDetailPanelIdentity,\n StyledCloseButtonGroup,\n StyledBackButton\n} from './MasterDetail.styles';\nimport MasterDetailActions from './MasterDetailActions';\nimport { getMasterDetailTestIds } from './MasterDetail.test-ids';\nimport type { MasterDetailNestedNavigation, MasterDetailProps } from './MasterDetail.types';\n\ninterface DetailPanelHeaderProps {\n /** Test identifiers for the header elements. */\n testIds: Partial<ReturnType<typeof getMasterDetailTestIds>>;\n /** Primary identity content shown in the header. */\n header?: ReactNode;\n /** Icon displayed with the header identity. */\n icon?: string;\n /** Static or on-demand header actions. */\n actions?: NonNullable<NonNullable<MasterDetailProps['selection']>['actions']>;\n /** Accessible context appended to the actions menu label. */\n contextualLabel?: string;\n /** Accessible name for the close control. */\n closeLabel?: string;\n /** Ref forwarded to the close control. */\n closeRef?: Ref<HTMLButtonElement>;\n /** Ref forwarded to the record heading. */\n headingRef?: Ref<HTMLSpanElement | HTMLHeadingElement>;\n /** Omit to render the header for the root record. Supply it to step back to the previous one. */\n back?: MasterDetailNestedNavigation['back'];\n /** Omit on the nested header. Only the root header owns close functionality. */\n onClose?: () => void;\n /** Applies nested-header presentation styles. */\n isNested?: boolean;\n}\n\n/** Renders the common header chrome for the root and nested detail surfaces. */\nconst DetailPanelHeader = ({\n testIds,\n header,\n icon,\n actions,\n contextualLabel,\n closeLabel,\n closeRef,\n headingRef,\n back,\n onClose,\n isNested\n}: DetailPanelHeaderProps) => {\n const t = useI18n();\n const theme = useTheme();\n const { start } = useDirection();\n\n return (\n <StyledDetailPanelHeader data-testid={testIds.header} $isNested={isNested}>\n {back && (\n <StyledBackButton\n data-testid={testIds.back}\n icon\n compact\n onClick={() => back.onClick()}\n aria-label={back.contextualLabel ? t('back_to_noun', [back.contextualLabel]) : undefined}\n label={t('back')}\n variant='simple'\n >\n <Icon name={`arrow-${start}`} />\n </StyledBackButton>\n )}\n <StyledDetailPanelIdentity data-testid={testIds.identity}>\n {icon && (\n <StyledDetailPanelIcon\n name={icon}\n background={theme.base.palette.interactive}\n size='s'\n shape='square'\n />\n )}\n {header ? (\n <Text variant='h4' ref={headingRef}>\n {header}\n </Text>\n ) : null}\n </StyledDetailPanelIdentity>\n {(actions || onClose) && (\n <StyledCloseButtonGroup>\n {actions && <MasterDetailActions actions={actions} contextualLabel={contextualLabel} />}\n {onClose && (\n <Button\n data-testid={testIds.close}\n icon\n onClick={() => onClose()}\n ref={closeRef}\n label={closeLabel}\n variant='simple'\n >\n <Icon name='times' />\n </Button>\n )}\n </StyledCloseButtonGroup>\n )}\n </StyledDetailPanelHeader>\n );\n};\n\nexport default DetailPanelHeader;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasterDetail.styles.d.ts","sourceRoot":"","sources":["../../../src/components/MasterDetail/MasterDetail.styles.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;mBAAmC,QAAQ,GAAG,SAAS;YAsBpF,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,6NAqBlC,CAAC;AAIF,eAAO,MAAM,uBAAuB;gBAA4B,OAAO;
|
|
1
|
+
{"version":3,"file":"MasterDetail.styles.d.ts","sourceRoot":"","sources":["../../../src/components/MasterDetail/MasterDetail.styles.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB;mBAAmC,QAAQ,GAAG,SAAS;YAsBpF,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,6NAqBlC,CAAC;AAIF,eAAO,MAAM,uBAAuB;gBAA4B,OAAO;YAiBtE,CAAC;AAIF,eAAO,MAAM,oBAAoB,6NAWhC,CAAC;AAIF,eAAO,MAAM,yBAAyB,6NAyBrC,CAAC;AAIF,eAAO,MAAM,qBAAqB,kaAIjC,CAAC;AAaF,eAAO,MAAM,oBAAoB,+NAahC,CAAC;AAIF,eAAO,MAAM,sBAAsB,+NAQlC,CAAC;AAIF,eAAO,MAAM,eAAe;;2LAmB3B,CAAC;AAIF,eAAO,MAAM,gBAAgB;;2BAM5B,CAAC;AAIF,eAAO,MAAM,qBAAqB,6NASjC,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sOAI9B,CAAC;AAIF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sOAKlC,CAAC;AAIF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBACf,MAAM;WACb,OAAO;cACJ,OAAO;kLA4ClB,CAAC"}
|
|
@@ -76,7 +76,6 @@ export const StyledDetailPanelHeader = styled.div(({ theme, $isNested }) => css
|
|
|
76
76
|
|
|
77
77
|
${$isNested &&
|
|
78
78
|
css `
|
|
79
|
-
border-radius: ${theme.base['border-radius']} ${theme.base['border-radius']} 0 0;
|
|
80
79
|
border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};
|
|
81
80
|
box-shadow: 0 -0.125rem 0.25rem 0 ${transparentize(0.9, theme.base.palette.dark)};
|
|
82
81
|
`}
|
|
@@ -109,7 +108,7 @@ export const StyledDetailPanelIdentity = styled.div(({ theme }) => css `
|
|
|
109
108
|
min-inline-size: 0;
|
|
110
109
|
}
|
|
111
110
|
|
|
112
|
-
>
|
|
111
|
+
> h4,
|
|
113
112
|
> span,
|
|
114
113
|
> p {
|
|
115
114
|
display: block;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MasterDetail.styles.js","sourceRoot":"","sources":["../../../src/components/MasterDetail/MasterDetail.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,CAC7C,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;8BACJ,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;;;;;kBAKxE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC;8BAC5B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;uBACxC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC;;MAE3E,YAAY,KAAK,SAAS;IAC5B,GAAG,CAAA;;;;;;iBAMU,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM;oBACzB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI;KACrC;GACF,CACF,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAElD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,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F,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEjD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAC7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;;;;;eAKL,KAAK,CAAC,IAAI,CAAC,OAAO;kBACf,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,sBAAsB,CAAC;GACzD,CACF,CAAC;AAEF,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAC5C,GAAG,EAAE,CAAC,GAAG,CAAA;;GAER,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,IAAI,CAAC,CAChD,GAAG,EAAE,CAAC,GAAG,CAAA;;;GAGR,CACF,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAK5C,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;yBACnB,YAAY;;;;;;;;;QAS7B,kBAAkB;;;;;MAKpB,KAAK;IACP,CAAC,QAAQ;IACT,GAAG,CAAA;UACG,kBAAkB;;;;;;UAMlB,sBAAsB;;;;;;;;UAQtB,iBAAiB;;;;KAItB;;MAEC,kBAAkB;iBACP,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG;;GAEtD,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { Button, Flex, Icon, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\n\n/**\n * The detail surface. In `docked` mode it is an in-flow flex item stretched to the host's height\n * (its body scrolls internally). In `overlay` mode it floats over the host anchored to the trailing\n * edge, lifted with a stronger shadow.\n *\n * In both modes the panel never contributes its intrinsic (content) height to the layout — its\n * content is rendered in an absolutely-positioned inner column (`StyledDetailPanelInner`). That is\n * what keeps a docked panel from growing the host past the master: the flex row's height is dictated\n * solely by the master, `align-items: stretch` on the host stretches this panel to that height, and\n * the body scrolls internally instead of overflowing.\n */\nexport const StyledDetailPanel = styled.section<{ presentation?: 'docked' | 'overlay' }>(\n ({ theme, presentation }) => css`\n --md-panel-edge-shadow: ${transparentize(0.85, theme.base.palette['foreground-color'])};\n position: relative;\n z-index: 1;\n min-inline-size: 0;\n overflow: hidden;\n background: ${theme.base.palette['primary-background']};\n border: 0.0625rem solid ${theme.base.palette['border-line']};\n border-radius: 0 ${theme.base['border-radius']} ${theme.base['border-radius']} 0;\n\n ${presentation === 'overlay' &&\n css`\n position: absolute;\n inset-block: 0;\n inset-inline-end: 0;\n inline-size: min(90%, 40rem);\n max-inline-size: 90%;\n z-index: ${theme.base['z-index'].drawer};\n box-shadow: ${theme.base.shadow.high};\n `}\n `\n);\n\nStyledDetailPanel.defaultProps = defaultThemeProp;\n\n/**\n * Absolutely-positioned column that holds the header + body. Filling the panel box (`inset: 0`) while\n * contributing zero intrinsic height is what lets the panel take its height from the host row rather\n * than dictate it — the body then scrolls within this fixed box.\n */\nexport const StyledDetailPanelInner = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n\n &::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: 0.375rem;\n pointer-events: none;\n box-shadow: 0.1875rem 0 0.1875rem 0 var(--md-panel-edge-shadow) inset;\n z-index: 1;\n }\n\n > * {\n position: relative;\n z-index: 0;\n }\n`;\n\nStyledDetailPanelInner.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelHeader = styled.div<{ $isNested?: boolean }>(\n ({ theme, $isNested }) => css`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n height: calc(${theme.base.spacing} * 4);\n flex-shrink: 0;\n padding: 0;\n background: ${theme.base.palette['primary-background']};\n\n ${$isNested &&\n css`\n border-radius: ${theme.base['border-radius']} ${theme.base['border-radius']} 0 0;\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n box-shadow: 0 -0.125rem 0.25rem 0 ${transparentize(0.9, theme.base.palette.dark)};\n `}\n `\n);\n\nStyledDetailPanelHeader.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelNav = styled.div(\n ({ theme }) => css`\n display: flex;\n flex-direction: row;\n align-items: stretch;\n justify-content: space-between;\n flex-shrink: 0;\n padding: 0;\n min-block-size: calc(${theme.base.spacing} * 4);\n border-top: 0.0625rem solid ${theme.base.palette['border-line']};\n `\n);\n\nStyledDetailPanelNav.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelIdentity = styled.div(\n ({ theme }) => css`\n flex: 1 1 auto;\n min-inline-size: 0;\n overflow: hidden;\n display: flex;\n align-self: stretch;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: calc(${theme.base.spacing} * 0.5);\n padding-inline: calc(${theme.base.spacing} * 0.5);\n\n > * {\n min-inline-size: 0;\n }\n\n > h2,\n > span,\n > p {\n display: block;\n ${ellipsisOverflow}\n color: ${theme.base.palette['foreground-color']};\n }\n `\n);\n\nStyledDetailPanelIdentity.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelIcon = styled(Icon)(\n ({ theme }) => css`\n margin-inline-start: ${theme.base.spacing};\n `\n);\n\nStyledDetailPanelIcon.defaultProps = defaultThemeProp;\n\nconst navActionGroupStyles = css`\n display: flex;\n flex-direction: row;\n\n > button:last-child:hover {\n border-radius: inherit;\n }\n`;\n\nexport const StyledNavButtonGroup = styled.span(\n ({ theme }) => css`\n ${navActionGroupStyles}\n inline-size: 100%;\n\n > * {\n flex: 1 1 0;\n }\n\n > *:not(:first-child) {\n border-inline-start: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledNavButtonGroup.defaultProps = defaultThemeProp;\n\nexport const StyledCloseButtonGroup = styled.span(\n () => css`\n ${navActionGroupStyles}\n flex: 0 0 auto;\n align-items: center;\n align-self: stretch;\n margin-inline-start: auto;\n `\n);\n\nStyledCloseButtonGroup.defaultProps = defaultThemeProp;\n\nexport const StyledNavButton = styled(Button)(\n ({ theme }) => css`\n display: flex;\n padding: 0;\n align-items: center;\n border: 0;\n border-radius: 0;\n min-width: 2rem;\n min-height: 2rem;\n\n & + & {\n margin-inline-start: 0;\n }\n\n &:not([disabled], [aria-disabled='true']):focus-visible,\n &:enabled:not([aria-disabled='true']):focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${theme.base.palette.interactive};\n }\n `\n);\n\nStyledNavButton.defaultProps = defaultThemeProp;\n\nexport const StyledBackButton = styled(StyledNavButton)(\n ({ theme }) => css`\n align-self: stretch;\n border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};\n border-start-start-radius: inherit;\n `\n);\n\nStyledBackButton.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelBody = styled.div(\n ({ theme }) => css`\n position: relative;\n flex: 1;\n min-block-size: 0;\n overflow: auto;\n padding: ${theme.base.spacing};\n background: ${theme.base.palette['secondary-background']};\n `\n);\n\nStyledDetailPanelBody.defaultProps = defaultThemeProp;\n\n/**\n * Flex layout that lets the master (e.g. a table) and the detail surface share the host box. The\n * master fills the row until the detail opens, then yields the trailing space to the panel. When\n * `--md-master-width` is set the split is controlled to that ratio (master width). On narrow hosts\n * the `overlay` modifier keeps the master full width and floats the panel over it.\n */\nexport const StyledMasterRegion = styled(Flex)(\n () => css`\n min-inline-size: 0;\n `\n);\n\nStyledMasterRegion.defaultProps = defaultThemeProp;\n\nexport const StyledResizeHandleSlot = styled(Flex)(\n () => css`\n position: relative;\n width: 0;\n `\n);\n\nStyledResizeHandleSlot.defaultProps = defaultThemeProp;\n\nexport const StyledMasterDetail = styled(Flex)<{\n $masterWidth: number;\n $open: boolean;\n $overlay: boolean;\n}>(\n ({ $masterWidth, $open, $overlay }) => css`\n --md-master-width: ${$masterWidth}%;\n position: relative;\n isolation: isolate;\n align-items: stretch;\n inline-size: 100%;\n block-size: 100%;\n min-block-size: 0;\n container-type: inline-size;\n\n > ${StyledMasterRegion} {\n flex: 1 1 auto;\n min-inline-size: 0;\n }\n\n ${$open &&\n !$overlay &&\n css`\n > ${StyledMasterRegion} {\n flex: 0 0 var(--md-master-width, 60%);\n max-inline-size: var(--md-master-width, 60%);\n order: 1;\n }\n\n > ${StyledResizeHandleSlot} {\n flex: 0 0 auto;\n display: flex;\n align-items: stretch;\n order: 2;\n position: relative;\n }\n\n > ${StyledDetailPanel} {\n order: 3;\n flex: 1 1 auto;\n }\n `}\n\n ${StyledResizeHandle} {\n z-index: ${({ theme }) => theme.base['z-index'].max};\n }\n `\n);\n\nStyledMasterDetail.defaultProps = defaultThemeProp;\n"]}
|
|
1
|
+
{"version":3,"file":"MasterDetail.styles.js","sourceRoot":"","sources":["../../../src/components/MasterDetail/MasterDetail.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAE7E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,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GAAG,gBAAgB,CAAC;AAEvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,CAK5C,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;yBACnB,YAAY;;;;;;;;;QAS7B,kBAAkB;;;;;MAKpB,KAAK;IACP,CAAC,QAAQ;IACT,GAAG,CAAA;UACG,kBAAkB;;;;;;UAMlB,sBAAsB;;;;;;;;UAQtB,iBAAiB;;;;KAItB;;MAEC,kBAAkB;iBACP,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG;;GAEtD,CACF,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { transparentize } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { Button, Flex, Icon, defaultThemeProp } from '@pega/cosmos-react-core';\nimport { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';\nimport { ellipsisOverflow } from '@pega/cosmos-react-core/lib/styles/mixins';\n\n/**\n * The detail surface. In `docked` mode it is an in-flow flex item stretched to the host's height\n * (its body scrolls internally). In `overlay` mode it floats over the host anchored to the trailing\n * edge, lifted with a stronger shadow.\n *\n * In both modes the panel never contributes its intrinsic (content) height to the layout — its\n * content is rendered in an absolutely-positioned inner column (`StyledDetailPanelInner`). That is\n * what keeps a docked panel from growing the host past the master: the flex row's height is dictated\n * solely by the master, `align-items: stretch` on the host stretches this panel to that height, and\n * the body scrolls internally instead of overflowing.\n */\nexport const StyledDetailPanel = styled.section<{ presentation?: 'docked' | 'overlay' }>(\n ({ theme, presentation }) => css`\n --md-panel-edge-shadow: ${transparentize(0.85, theme.base.palette['foreground-color'])};\n position: relative;\n z-index: 1;\n min-inline-size: 0;\n overflow: hidden;\n background: ${theme.base.palette['primary-background']};\n border: 0.0625rem solid ${theme.base.palette['border-line']};\n border-radius: 0 ${theme.base['border-radius']} ${theme.base['border-radius']} 0;\n\n ${presentation === 'overlay' &&\n css`\n position: absolute;\n inset-block: 0;\n inset-inline-end: 0;\n inline-size: min(90%, 40rem);\n max-inline-size: 90%;\n z-index: ${theme.base['z-index'].drawer};\n box-shadow: ${theme.base.shadow.high};\n `}\n `\n);\n\nStyledDetailPanel.defaultProps = defaultThemeProp;\n\n/**\n * Absolutely-positioned column that holds the header + body. Filling the panel box (`inset: 0`) while\n * contributing zero intrinsic height is what lets the panel take its height from the host row rather\n * than dictate it — the body then scrolls within this fixed box.\n */\nexport const StyledDetailPanelInner = styled.div`\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n\n &::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: 0;\n inline-size: 0.375rem;\n pointer-events: none;\n box-shadow: 0.1875rem 0 0.1875rem 0 var(--md-panel-edge-shadow) inset;\n z-index: 1;\n }\n\n > * {\n position: relative;\n z-index: 0;\n }\n`;\n\nStyledDetailPanelInner.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelHeader = styled.div<{ $isNested?: boolean }>(\n ({ theme, $isNested }) => css`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n height: calc(${theme.base.spacing} * 4);\n flex-shrink: 0;\n padding: 0;\n background: ${theme.base.palette['primary-background']};\n\n ${$isNested &&\n css`\n border-bottom: 0.0625rem solid ${theme.base.palette['border-line']};\n box-shadow: 0 -0.125rem 0.25rem 0 ${transparentize(0.9, theme.base.palette.dark)};\n `}\n `\n);\n\nStyledDetailPanelHeader.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelNav = styled.div(\n ({ theme }) => css`\n display: flex;\n flex-direction: row;\n align-items: stretch;\n justify-content: space-between;\n flex-shrink: 0;\n padding: 0;\n min-block-size: calc(${theme.base.spacing} * 4);\n border-top: 0.0625rem solid ${theme.base.palette['border-line']};\n `\n);\n\nStyledDetailPanelNav.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelIdentity = styled.div(\n ({ theme }) => css`\n flex: 1 1 auto;\n min-inline-size: 0;\n overflow: hidden;\n display: flex;\n align-self: stretch;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n gap: calc(${theme.base.spacing} * 0.5);\n padding-inline: calc(${theme.base.spacing} * 0.5);\n\n > * {\n min-inline-size: 0;\n }\n\n > h4,\n > span,\n > p {\n display: block;\n ${ellipsisOverflow}\n color: ${theme.base.palette['foreground-color']};\n }\n `\n);\n\nStyledDetailPanelIdentity.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelIcon = styled(Icon)(\n ({ theme }) => css`\n margin-inline-start: ${theme.base.spacing};\n `\n);\n\nStyledDetailPanelIcon.defaultProps = defaultThemeProp;\n\nconst navActionGroupStyles = css`\n display: flex;\n flex-direction: row;\n\n > button:last-child:hover {\n border-radius: inherit;\n }\n`;\n\nexport const StyledNavButtonGroup = styled.span(\n ({ theme }) => css`\n ${navActionGroupStyles}\n inline-size: 100%;\n\n > * {\n flex: 1 1 0;\n }\n\n > *:not(:first-child) {\n border-inline-start: 0.0625rem solid ${theme.base.palette['border-line']};\n }\n `\n);\n\nStyledNavButtonGroup.defaultProps = defaultThemeProp;\n\nexport const StyledCloseButtonGroup = styled.span(\n () => css`\n ${navActionGroupStyles}\n flex: 0 0 auto;\n align-items: center;\n align-self: stretch;\n margin-inline-start: auto;\n `\n);\n\nStyledCloseButtonGroup.defaultProps = defaultThemeProp;\n\nexport const StyledNavButton = styled(Button)(\n ({ theme }) => css`\n display: flex;\n padding: 0;\n align-items: center;\n border: 0;\n border-radius: 0;\n min-width: 2rem;\n min-height: 2rem;\n\n & + & {\n margin-inline-start: 0;\n }\n\n &:not([disabled], [aria-disabled='true']):focus-visible,\n &:enabled:not([aria-disabled='true']):focus-visible {\n box-shadow: inset 0 0 0 0.0625rem ${theme.base.palette.interactive};\n }\n `\n);\n\nStyledNavButton.defaultProps = defaultThemeProp;\n\nexport const StyledBackButton = styled(StyledNavButton)(\n ({ theme }) => css`\n align-self: stretch;\n border-inline-end: 0.0625rem solid ${theme.base.palette['border-line']};\n border-start-start-radius: inherit;\n `\n);\n\nStyledBackButton.defaultProps = defaultThemeProp;\n\nexport const StyledDetailPanelBody = styled.div(\n ({ theme }) => css`\n position: relative;\n flex: 1;\n min-block-size: 0;\n overflow: auto;\n padding: ${theme.base.spacing};\n background: ${theme.base.palette['secondary-background']};\n `\n);\n\nStyledDetailPanelBody.defaultProps = defaultThemeProp;\n\n/**\n * Flex layout that lets the master (e.g. a table) and the detail surface share the host box. The\n * master fills the row until the detail opens, then yields the trailing space to the panel. When\n * `--md-master-width` is set the split is controlled to that ratio (master width). On narrow hosts\n * the `overlay` modifier keeps the master full width and floats the panel over it.\n */\nexport const StyledMasterRegion = styled(Flex)(\n () => css`\n min-inline-size: 0;\n `\n);\n\nStyledMasterRegion.defaultProps = defaultThemeProp;\n\nexport const StyledResizeHandleSlot = styled(Flex)(\n () => css`\n position: relative;\n width: 0;\n `\n);\n\nStyledResizeHandleSlot.defaultProps = defaultThemeProp;\n\nexport const StyledMasterDetail = styled(Flex)<{\n $masterWidth: number;\n $open: boolean;\n $overlay: boolean;\n}>(\n ({ $masterWidth, $open, $overlay }) => css`\n --md-master-width: ${$masterWidth}%;\n position: relative;\n isolation: isolate;\n align-items: stretch;\n inline-size: 100%;\n block-size: 100%;\n min-block-size: 0;\n container-type: inline-size;\n\n > ${StyledMasterRegion} {\n flex: 1 1 auto;\n min-inline-size: 0;\n }\n\n ${$open &&\n !$overlay &&\n css`\n > ${StyledMasterRegion} {\n flex: 0 0 var(--md-master-width, 60%);\n max-inline-size: var(--md-master-width, 60%);\n order: 1;\n }\n\n > ${StyledResizeHandleSlot} {\n flex: 0 0 auto;\n display: flex;\n align-items: stretch;\n order: 2;\n position: relative;\n }\n\n > ${StyledDetailPanel} {\n order: 3;\n flex: 1 1 auto;\n }\n `}\n\n ${StyledResizeHandle} {\n z-index: ${({ theme }) => theme.base['z-index'].max};\n }\n `\n);\n\nStyledMasterDetail.defaultProps = defaultThemeProp;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-work",
|
|
3
|
-
"version": "10.0.0-build.12.
|
|
3
|
+
"version": "10.0.0-build.12.7",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"build": "tsc -b tsconfig.build.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pega/cosmos-react-core": "10.0.0-build.12.
|
|
18
|
-
"@pega/cosmos-react-rte": "10.0.0-build.12.
|
|
17
|
+
"@pega/cosmos-react-core": "10.0.0-build.12.7",
|
|
18
|
+
"@pega/cosmos-react-rte": "10.0.0-build.12.7",
|
|
19
19
|
"@types/react": "^17.0.62 || ^18.3.3",
|
|
20
20
|
"@types/react-dom": "^17.0.20 || ^18.3.0",
|
|
21
21
|
"polished": "^4.1.0",
|