@pega/cosmos-react-wss 10.0.0-build.13.0 → 10.0.0-build.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,26 @@
1
1
  import type { DefaultTheme } from 'styled-components';
2
2
  export declare const groupedMenuContentGap = 0.125;
3
+ /** Lays out menu groups in responsive columns, collapsing to one column on smaller screens. */
3
4
  export declare const groupedMenuGridStyles: (theme: DefaultTheme) => import("styled-components").RuleSet<object>;
4
5
  /** Separates adjacent columns; children marked `data-row-start` begin a wrapped row and get no divider. */
5
6
  export declare const groupedMenuColumnStyles: (theme: DefaultTheme, borderColor: string) => import("styled-components").RuleSet<object>;
7
+ /** Resets group heading margins and separates each heading from its menu items. */
6
8
  export declare const groupedMenuHeadingStyles: (theme: DefaultTheme) => import("styled-components").RuleSet<object>;
9
+ /** Keeps static and actionable group headings visually consistent. */
10
+ export declare const groupedMenuHeadingTextStyles: (theme: DefaultTheme) => import("styled-components").RuleSet<object>;
11
+ /** Applies the interactive text treatment to menu actions. */
7
12
  export declare const groupedMenuActionTextStyles: (theme: DefaultTheme) => import("styled-components").RuleSet<object>;
13
+ /** Provides semantic group headings with shared spacing and typography. */
8
14
  export declare const StyledGroupedMenuHeading: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<Omit<Omit<import("@pega/cosmos-react-core").TextProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement | HTMLSpanElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
9
15
  ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHeadingElement | HTMLSpanElement> | null | undefined;
10
16
  }, Omit<Omit<import("@pega/cosmos-react-core").TextProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement | HTMLSpanElement> & import("@pega/cosmos-react-core").ForwardProps, "ref"> & {
11
17
  ref?: ((instance: HTMLHeadingElement | HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLHeadingElement | HTMLSpanElement> | null | undefined;
12
18
  }>, never>, never>> & string & Omit<import("@pega/cosmos-react-core").ForwardRefForwardPropsComponent<import("@pega/cosmos-react-core").TextProps>, keyof import("react").Component<any, {}, any>>;
19
+ /** Styles menu action buttons for pointer, hover and keyboard focus. */
13
20
  export declare const StyledGroupedMenuAction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
14
21
  ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
15
22
  }>, never>, never>> & string;
23
+ /** Matches heading typography while indicating that the group heading is actionable. */
16
24
  export declare const StyledGroupedMenuHeadingAction: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components").FastOmit<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
17
25
  ref?: ((instance: HTMLButtonElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLButtonElement> | null | undefined;
18
26
  }>, never>, never>, never>> & string;
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedMenu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/GroupedMenu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,eAAO,MAAM,qBAAqB,GAAI,OAAO,YAAY,gDAQxD,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,uBAAuB,GAAI,OAAO,YAAY,EAAE,aAAa,MAAM,gDAY/E,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,OAAO,YAAY,gDAG3D,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,OAAO,YAAY,gDAK9D,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;kMAKnC,CAAC;AAIH,eAAO,MAAM,uBAAuB;;4BAmBlC,CAAC;AAIH,eAAO,MAAM,8BAA8B;;oCAYzC,CAAC"}
1
+ {"version":3,"file":"GroupedMenu.styles.d.ts","sourceRoot":"","sources":["../../../src/components/AppShell/GroupedMenu.styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,qBAAqB,QAAQ,CAAC;AAE3C,+FAA+F;AAC/F,eAAO,MAAM,qBAAqB,GAAI,OAAO,YAAY,gDAQxD,CAAC;AAEF,2GAA2G;AAC3G,eAAO,MAAM,uBAAuB,GAAI,OAAO,YAAY,EAAE,aAAa,MAAM,gDAY/E,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,GAAI,OAAO,YAAY,gDAG3D,CAAC;AAEF,sEAAsE;AACtE,eAAO,MAAM,4BAA4B,GAAI,OAAO,YAAY,gDAI/D,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,2BAA2B,GAAI,OAAO,YAAY,gDAK9D,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB;;;;kMAKnC,CAAC;AAIH,wEAAwE;AACxE,eAAO,MAAM,uBAAuB;;4BAmBlC,CAAC;AAIH,wFAAwF;AACxF,eAAO,MAAM,8BAA8B;;oCAUzC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import styled, { css } from 'styled-components';
2
2
  import { calculateFontSize, defaultThemeProp, Text } from '@pega/cosmos-react-core';
3
3
  export const groupedMenuContentGap = 0.125;
4
+ /** Lays out menu groups in responsive columns, collapsing to one column on smaller screens. */
4
5
  export const groupedMenuGridStyles = (theme) => css `
5
6
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
6
7
  gap: calc(2.5 * ${theme.base.spacing}) calc(3 * ${theme.base.spacing});
@@ -24,23 +25,33 @@ export const groupedMenuColumnStyles = (theme, borderColor) => css `
24
25
  }
25
26
  }
26
27
  `;
28
+ /** Resets group heading margins and separates each heading from its menu items. */
27
29
  export const groupedMenuHeadingStyles = (theme) => css `
28
30
  margin: 0;
29
31
  padding-block-end: calc(0.5 * ${theme.base.spacing});
30
32
  `;
33
+ /** Keeps static and actionable group headings visually consistent. */
34
+ export const groupedMenuHeadingTextStyles = (theme) => css `
35
+ color: ${theme.base.palette['foreground-color']};
36
+ font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).m};
37
+ font-weight: ${theme.base['font-weight'].bold};
38
+ `;
39
+ /** Applies the interactive text treatment to menu actions. */
31
40
  export const groupedMenuActionTextStyles = (theme) => css `
32
41
  color: ${theme.base.palette.interactive};
33
42
  font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).xs};
34
43
  font-weight: ${theme.base['font-weight'].normal};
35
44
  text-decoration: none;
36
45
  `;
46
+ /** Provides semantic group headings with shared spacing and typography. */
37
47
  export const StyledGroupedMenuHeading = styled(Text).attrs({ variant: 'h2' })(({ theme }) => {
38
48
  return css `
39
49
  ${groupedMenuHeadingStyles(theme)}
40
- color: ${theme.base.palette['foreground-color']};
50
+ ${groupedMenuHeadingTextStyles(theme)}
41
51
  `;
42
52
  });
43
53
  StyledGroupedMenuHeading.defaultProps = defaultThemeProp;
54
+ /** Styles menu action buttons for pointer, hover and keyboard focus. */
44
55
  export const StyledGroupedMenuAction = styled.button.attrs({ type: 'button' })(({ theme }) => {
45
56
  return css `
46
57
  padding: 0;
@@ -62,11 +73,10 @@ export const StyledGroupedMenuAction = styled.button.attrs({ type: 'button' })((
62
73
  `;
63
74
  });
64
75
  StyledGroupedMenuAction.defaultProps = defaultThemeProp;
76
+ /** Matches heading typography while indicating that the group heading is actionable. */
65
77
  export const StyledGroupedMenuHeadingAction = styled(StyledGroupedMenuAction)(({ theme }) => {
66
78
  return css `
67
- color: ${theme.base.palette['foreground-color']};
68
- font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).m};
69
- font-weight: ${theme.base['font-weight'].bold};
79
+ ${groupedMenuHeadingTextStyles(theme)}
70
80
  min-height: auto;
71
81
 
72
82
  &:hover,
@@ -1 +1 @@
1
- {"version":3,"file":"GroupedMenu.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/GroupedMenu.styles.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,GAAG,CAA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MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC3F,OAAO,GAAG,CAAA;;;;;;MAMN,2BAA2B,CAAC,KAAK,CAAC;kBACtB,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,WAAW,CAAC;;;;eAItC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;;;;oBAIjC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1F,OAAO,GAAG,CAAA;aACC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;iBAClC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;mBACpE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI;;;;;;;GAO9C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import type { DefaultTheme } from 'styled-components';\nimport styled, { css } from 'styled-components';\n\nimport { calculateFontSize, defaultThemeProp, Text } from '@pega/cosmos-react-core';\n\nexport const groupedMenuContentGap = 0.125;\n\nexport const groupedMenuGridStyles = (theme: DefaultTheme) => css`\n grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));\n gap: calc(2.5 * ${theme.base.spacing}) calc(3 * ${theme.base.spacing});\n\n @media (max-width: ${theme.base.breakpoints.md}) {\n grid-template-columns: 1fr;\n gap: calc(1.5 * ${theme.base.spacing});\n }\n`;\n\n/** Separates adjacent columns; children marked `data-row-start` begin a wrapped row and get no divider. */\nexport const groupedMenuColumnStyles = (theme: DefaultTheme, borderColor: string) => css`\n & > * + *:where(:not([data-row-start])) {\n border-inline-start: 0.0625rem solid ${borderColor};\n padding-inline-start: calc(1.5 * ${theme.base.spacing});\n }\n\n @media (max-width: ${theme.base.breakpoints.md}) {\n & > * + * {\n border-inline-start: 0;\n padding-inline-start: 0;\n }\n }\n`;\n\nexport const groupedMenuHeadingStyles = (theme: DefaultTheme) => css`\n margin: 0;\n padding-block-end: calc(0.5 * ${theme.base.spacing});\n`;\n\nexport const groupedMenuActionTextStyles = (theme: DefaultTheme) => css`\n color: ${theme.base.palette.interactive};\n font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).xs};\n font-weight: ${theme.base['font-weight'].normal};\n text-decoration: none;\n`;\n\nexport const StyledGroupedMenuHeading = styled(Text).attrs({ variant: 'h2' })(({ theme }) => {\n return css`\n ${groupedMenuHeadingStyles(theme)}\n color: ${theme.base.palette['foreground-color']};\n `;\n});\n\nStyledGroupedMenuHeading.defaultProps = defaultThemeProp;\n\nexport const StyledGroupedMenuAction = styled.button.attrs({ type: 'button' })(({ theme }) => {\n return css`\n padding: 0;\n border: 0;\n background: transparent;\n font: inherit;\n text-align: start;\n ${groupedMenuActionTextStyles(theme)}\n min-height: ${theme.base['hit-area']['mouse-min']};\n cursor: pointer;\n\n &:hover {\n color: ${theme.base.palette['foreground-color']};\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledGroupedMenuAction.defaultProps = defaultThemeProp;\n\nexport const StyledGroupedMenuHeadingAction = styled(StyledGroupedMenuAction)(({ theme }) => {\n return css`\n color: ${theme.base.palette['foreground-color']};\n font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).m};\n font-weight: ${theme.base['font-weight'].bold};\n min-height: auto;\n\n &:hover,\n &:focus-visible {\n text-decoration: underline;\n }\n `;\n});\n\nStyledGroupedMenuHeadingAction.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"GroupedMenu.styles.js","sourceRoot":"","sources":["../../../src/components/AppShell/GroupedMenu.styles.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAEpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC;AAE3C,+FAA+F;AAC/F,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,GAAG,CAAA;;oBAE7C,KAAK,CAAC,IAAI,CAAC,OAAO,cAAc,KAAK,CAAC,IAAI,CAAC,OAAO;;uBAE/C,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;;sBAE1B,KAAK,CAAC,IAAI,CAAC,OAAO;;CAEvC,CAAC;AAEF,2GAA2G;AAC3G,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAmB,EAAE,WAAmB,EAAE,EAAE,CAAC,GAAG,CAAA;;2CAE7C,WAAW;uCACf,KAAK,CAAC,IAAI,CAAC,OAAO;;;uBAGlC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;;;;;;CAM/C,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,GAAG,CAAA;;kCAElC,KAAK,CAAC,IAAI,CAAC,OAAO;CACnD,CAAC;AAEF,sEAAsE;AACtE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,GAAG,CAAA;WAC7D,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB,CAAC;eAClC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CA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AK;;GAExC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,wFAAwF;AACxF,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1F,OAAO,GAAG,CAAA;MACN,4BAA4B,CAAC,KAAK,CAAC;;;;;;;GAOtC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,8BAA8B,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import type { DefaultTheme } from 'styled-components';\nimport styled, { css } from 'styled-components';\n\nimport { calculateFontSize, defaultThemeProp, Text } from '@pega/cosmos-react-core';\n\nexport const groupedMenuContentGap = 0.125;\n\n/** Lays out menu groups in responsive columns, collapsing to one column on smaller screens. */\nexport const groupedMenuGridStyles = (theme: DefaultTheme) => css`\n grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));\n gap: calc(2.5 * ${theme.base.spacing}) calc(3 * ${theme.base.spacing});\n\n @media (max-width: ${theme.base.breakpoints.md}) {\n grid-template-columns: 1fr;\n gap: calc(1.5 * ${theme.base.spacing});\n }\n`;\n\n/** Separates adjacent columns; children marked `data-row-start` begin a wrapped row and get no divider. */\nexport const groupedMenuColumnStyles = (theme: DefaultTheme, borderColor: string) => css`\n & > * + *:where(:not([data-row-start])) {\n border-inline-start: 0.0625rem solid ${borderColor};\n padding-inline-start: calc(1.5 * ${theme.base.spacing});\n }\n\n @media (max-width: ${theme.base.breakpoints.md}) {\n & > * + * {\n border-inline-start: 0;\n padding-inline-start: 0;\n }\n }\n`;\n\n/** Resets group heading margins and separates each heading from its menu items. */\nexport const groupedMenuHeadingStyles = (theme: DefaultTheme) => css`\n margin: 0;\n padding-block-end: calc(0.5 * ${theme.base.spacing});\n`;\n\n/** Keeps static and actionable group headings visually consistent. */\nexport const groupedMenuHeadingTextStyles = (theme: DefaultTheme) => css`\n color: ${theme.base.palette['foreground-color']};\n font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).m};\n font-weight: ${theme.base['font-weight'].bold};\n`;\n\n/** Applies the interactive text treatment to menu actions. */\nexport const groupedMenuActionTextStyles = (theme: DefaultTheme) => css`\n color: ${theme.base.palette.interactive};\n font-size: ${calculateFontSize(theme.base['font-size'], theme.base['font-scale']).xs};\n font-weight: ${theme.base['font-weight'].normal};\n text-decoration: none;\n`;\n\n/** Provides semantic group headings with shared spacing and typography. */\nexport const StyledGroupedMenuHeading = styled(Text).attrs({ variant: 'h2' })(({ theme }) => {\n return css`\n ${groupedMenuHeadingStyles(theme)}\n ${groupedMenuHeadingTextStyles(theme)}\n `;\n});\n\nStyledGroupedMenuHeading.defaultProps = defaultThemeProp;\n\n/** Styles menu action buttons for pointer, hover and keyboard focus. */\nexport const StyledGroupedMenuAction = styled.button.attrs({ type: 'button' })(({ theme }) => {\n return css`\n padding: 0;\n border: 0;\n background: transparent;\n font: inherit;\n text-align: start;\n ${groupedMenuActionTextStyles(theme)}\n min-height: ${theme.base['hit-area']['mouse-min']};\n cursor: pointer;\n\n &:hover {\n color: ${theme.base.palette['foreground-color']};\n }\n\n &:focus-visible {\n box-shadow: ${theme.base.shadow.focus};\n }\n `;\n});\n\nStyledGroupedMenuAction.defaultProps = defaultThemeProp;\n\n/** Matches heading typography while indicating that the group heading is actionable. */\nexport const StyledGroupedMenuHeadingAction = styled(StyledGroupedMenuAction)(({ theme }) => {\n return css`\n ${groupedMenuHeadingTextStyles(theme)}\n min-height: auto;\n\n &:hover,\n &:focus-visible {\n text-decoration: underline;\n }\n `;\n});\n\nStyledGroupedMenuHeadingAction.defaultProps = defaultThemeProp;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-wss",
3
- "version": "10.0.0-build.13.0",
3
+ "version": "10.0.0-build.14.1",
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.13.0",
18
- "@pega/cosmos-react-work": "10.0.0-build.13.0",
17
+ "@pega/cosmos-react-core": "10.0.0-build.14.1",
18
+ "@pega/cosmos-react-work": "10.0.0-build.14.1",
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",