@pega/cosmos-react-work 7.0.0-build.17.4 → 7.0.0-build.17.6

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.
@@ -28,6 +28,10 @@ const StyledUtilitySummaryButton = styled(Button)(({ theme }) => css `
28
28
  border-radius: unset;
29
29
  border: none;
30
30
 
31
+ & + & {
32
+ margin: 0;
33
+ }
34
+
31
35
  &:hover {
32
36
  color: currentColor;
33
37
  }
@@ -45,10 +49,6 @@ const StyledUtilitySummaryButton = styled(Button)(({ theme }) => css `
45
49
  border-end-start-radius: inherit;
46
50
  border-end-end-radius: inherit;
47
51
  }
48
-
49
- & + & {
50
- margin: 0;
51
- }
52
52
  `);
53
53
  const UtilitySummary = ({ name, iconName, count, onClick }) => {
54
54
  const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement();
@@ -1 +1 @@
1
- {"version":3,"file":"UtilitiesSummary.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":";;AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAQjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;CAiB9C,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAC/C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;qBACC,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BpC,CACF,CAAC;AAEF,MAAM,cAAc,GAA0C,CAAC,EAC7D,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACR,EAA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'styled-components';\n\nimport {\n Button,\n Card,\n Count,\n Flex,\n Icon,\n Tooltip,\n useI18n,\n VisuallyHiddenText,\n useElement\n} from '@pega/cosmos-react-core';\n\nimport type { CaseViewProps, UtilitySummaryItem } from './CaseView.types';\n\nexport interface UtilitiesSummaryProps {\n items?: CaseViewProps['utilitiesSummaryItems'];\n}\n\nexport const StyledUtilitiesSummary = styled.ul`\n width: 2.75rem;\n list-style: none;\n\n > li {\n display: contents;\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n`;\n\nconst StyledUtilitySummaryButton = styled(Button)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n width: 100%;\n color: currentColor;\n border-radius: unset;\n border: none;\n\n &:hover {\n color: currentColor;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n\n & + & {\n margin: 0;\n }\n `\n);\n\nconst UtilitySummary: FunctionComponent<UtilitySummaryItem> = ({\n name,\n iconName,\n count,\n onClick\n}) => {\n const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement<HTMLElement>();\n return (\n // Default role is removed by \"list-style: none\" on StyledUtilitiesSummary.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li role='listitem'>\n <Flex\n container={{\n direction: 'column',\n alignItems: 'center',\n gap: 0.5\n }}\n onClick={onClick}\n ref={setUtilSummaryTooltip}\n as={StyledUtilitySummaryButton}\n >\n <Icon name={iconName} />\n {count !== undefined && <Count aria-hidden>{count}</Count>}\n <VisuallyHiddenText>{`${count ?? ''} ${name}`}</VisuallyHiddenText>\n </Flex>\n\n <Tooltip target={utilSummaryTooltip} showDelay='none' hideDelay='none'>\n {name}\n </Tooltip>\n </li>\n );\n};\n\nconst UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps> = ({ items = [] }) => {\n const t = useI18n();\n\n return (\n <Card\n container={{ direction: 'column', alignItems: 'center' }}\n as={StyledUtilitiesSummary}\n aria-label={t('utilities_summary')}\n role='list'\n >\n {items.map(item => (\n <UtilitySummary {...item} key={item.iconName} />\n ))}\n </Card>\n );\n};\n\nexport default UtilitiesSummary;\n"]}
1
+ {"version":3,"file":"UtilitiesSummary.js","sourceRoot":"","sources":["../../../src/components/CaseView/UtilitiesSummary.tsx"],"names":[],"mappings":";;AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EACL,MAAM,EACN,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,OAAO,EACP,kBAAkB,EAClB,UAAU,EACX,MAAM,yBAAyB,CAAC;AAQjC,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;;;;;;;;CAiB9C,CAAC;AAEF,MAAM,0BAA0B,GAAG,MAAM,CAAC,MAAM,CAAC,CAC/C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,CAAA;qBACC,KAAK,CAAC,IAAI,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BpC,CACF,CAAC;AAEF,MAAM,cAAc,GAA0C,CAAC,EAC7D,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,OAAO,EACR,EAAE,EAAE;IACH,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,UAAU,EAAe,CAAC;IAC9E,OAAO;IACL,2EAA2E;IAC3E,uDAAuD;IACvD,cAAI,IAAI,EAAC,UAAU,aACjB,MAAC,IAAI,IACH,SAAS,EAAE;oBACT,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,QAAQ;oBACpB,GAAG,EAAE,GAAG;iBACT,EACD,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,qBAAqB,EAC1B,EAAE,EAAE,0BAA0B,aAE9B,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,GAAI,EACvB,KAAK,KAAK,SAAS,IAAI,KAAC,KAAK,mCAAc,KAAK,GAAS,EAC1D,KAAC,kBAAkB,cAAE,GAAG,KAAK,IAAI,EAAE,IAAI,IAAI,EAAE,GAAsB,IAC9D,EAEP,KAAC,OAAO,IAAC,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,YACnE,IAAI,GACG,IACP,CACN,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAA6C,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE;IACpF,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EACxD,EAAE,EAAE,sBAAsB,gBACd,CAAC,CAAC,mBAAmB,CAAC,EAClC,IAAI,EAAC,MAAM,YAEV,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CACjB,eAAC,cAAc,OAAK,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,GAAI,CACjD,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport {\n Button,\n Card,\n Count,\n Flex,\n Icon,\n Tooltip,\n useI18n,\n VisuallyHiddenText,\n useElement\n} from '@pega/cosmos-react-core';\n\nimport type { CaseViewProps, UtilitySummaryItem } from './CaseView.types';\n\nexport interface UtilitiesSummaryProps {\n items?: CaseViewProps['utilitiesSummaryItems'];\n}\n\nexport const StyledUtilitiesSummary = styled.ul`\n width: 2.75rem;\n list-style: none;\n\n > li {\n display: contents;\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n }\n`;\n\nconst StyledUtilitySummaryButton = styled(Button)(\n ({ theme }) => css`\n padding-block: ${theme.base.spacing};\n padding-inline: 0;\n width: 100%;\n color: currentColor;\n border-radius: unset;\n border: none;\n\n & + & {\n margin: 0;\n }\n\n &:hover {\n color: currentColor;\n }\n\n &:focus {\n z-index: 1;\n }\n\n &:first-child {\n border-start-start-radius: inherit;\n border-start-end-radius: inherit;\n }\n\n &:last-child {\n border-end-start-radius: inherit;\n border-end-end-radius: inherit;\n }\n `\n);\n\nconst UtilitySummary: FunctionComponent<UtilitySummaryItem> = ({\n name,\n iconName,\n count,\n onClick\n}) => {\n const [utilSummaryTooltip, setUtilSummaryTooltip] = useElement<HTMLElement>();\n return (\n // Default role is removed by \"list-style: none\" on StyledUtilitiesSummary.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li role='listitem'>\n <Flex\n container={{\n direction: 'column',\n alignItems: 'center',\n gap: 0.5\n }}\n onClick={onClick}\n ref={setUtilSummaryTooltip}\n as={StyledUtilitySummaryButton}\n >\n <Icon name={iconName} />\n {count !== undefined && <Count aria-hidden>{count}</Count>}\n <VisuallyHiddenText>{`${count ?? ''} ${name}`}</VisuallyHiddenText>\n </Flex>\n\n <Tooltip target={utilSummaryTooltip} showDelay='none' hideDelay='none'>\n {name}\n </Tooltip>\n </li>\n );\n};\n\nconst UtilitiesSummary: FunctionComponent<UtilitiesSummaryProps> = ({ items = [] }) => {\n const t = useI18n();\n\n return (\n <Card\n container={{ direction: 'column', alignItems: 'center' }}\n as={StyledUtilitiesSummary}\n aria-label={t('utilities_summary')}\n role='list'\n >\n {items.map(item => (\n <UtilitySummary {...item} key={item.iconName} />\n ))}\n </Card>\n );\n};\n\nexport default UtilitiesSummary;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "7.0.0-build.17.4",
3
+ "version": "7.0.0-build.17.6",
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": "7.0.0-build.17.4",
22
+ "@pega/cosmos-react-core": "7.0.0-build.17.6",
23
23
  "@types/react": "^17.0.62",
24
24
  "@types/react-dom": "^17.0.20",
25
25
  "@types/styled-components": "^5.1.26",