@pega/cosmos-react-core 2.0.0-dev.17.0 → 2.0.0-dev.18.0
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/AppShell/AppShell.styles.d.ts +11 -2
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +57 -23
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/AppShell.types.d.ts +2 -2
- package/lib/components/AppShell/AppShell.types.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.types.js.map +1 -1
- package/lib/components/AppShell/AppShellList.d.ts +4 -3
- package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
- package/lib/components/AppShell/AppShellList.js +13 -8
- package/lib/components/AppShell/AppShellList.js.map +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Configuration/Configuration.js +1 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
- package/lib/components/DateTime/Input/useAutoFocusNextInput.js +6 -4
- package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
- package/lib/components/Menu/Menu.d.ts.map +1 -1
- package/lib/components/Menu/Menu.js +48 -23
- package/lib/components/Menu/Menu.js.map +1 -1
- package/lib/components/Menu/MenuList.d.ts +1 -1
- package/lib/components/Menu/MenuList.d.ts.map +1 -1
- package/lib/components/Menu/MenuList.js +10 -10
- package/lib/components/Menu/MenuList.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +6 -4
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.d.ts +2 -2
- package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
- package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +2 -0
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.json +3 -1
- package/lib/i18n/i18n.d.ts +4 -0
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/types/types.d.ts +2 -0
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAMrC,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAA,EAAE,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAC5C,CAAC,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;IACjC,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,GAAG,CAAA;sBACQ,CAAC,GAAG,SAAS,MAAM,IAAI,CAAC,OAAO,UAAU,CAAC,GAAG,SAAS,MAAM,IAAI,CAAC,OAAO;eAC/E,GAAG,GAAG,SAAS,MAAM,IAAI,CAAC,OAAO,cAAc,IAAI,CAAC,OAAO;aAC7D,UAAU;6BACM,IAAI,CAAC,OAAO
|
|
1
|
+
{"version":3,"file":"Modal.styles.js","sourceRoot":"","sources":["../../../src/components/Modal/Modal.styles.ts"],"names":[],"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Ae;;cAEjD,CAAC,MAAM;YACT,GAAG,CAAA;;aAEF;;SAEJ;kBACS,IAAI,CAAC,MAAM,CAAC,IAAI;;MAE5B,KAAK,KAAK,QAAQ;QACpB,GAAG,CAAA;;;;;;;;;;KAUF;;;QAGG,kBAAkB;;;;;QAKlB,uBAAuB;;;;GAI5B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,WAAW,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\n\nimport { StyledButton } from '../Button';\nimport { PropsWithDefaults } from '../../types';\nimport { defaultThemeProp } from '../../theme';\nimport { StyledIcon } from '../Icon';\nimport { StyledCard } from '../Card';\n\nimport { ModalContextValue, ModalProps } from './Modal.types';\n\ntype ModalPropsWithDefaults = PropsWithDefaults<ModalProps, 'stretch' | 'center' | 'autoWidth'>;\n\nexport const StyledModalChildrenWrap = styled.div``;\n\nexport const StyledModalHeader = styled.header<{ hasAction?: boolean }>(\n ({ theme: { base }, hasAction }) => {\n const padAdjust = hasAction ? 0.75 : 0;\n\n return css`\n padding: calc(${3 - padAdjust} * ${base.spacing}) calc(${3 - padAdjust} * ${base.spacing})\n calc(${2.5 - padAdjust} * ${base.spacing}) calc(3 * ${base.spacing});\n h2 > ${StyledIcon} {\n margin-inline-end: ${base.spacing};\n }\n\n > h2 {\n overflow-x: hidden;\n > :first-child {\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n }\n\n ${StyledButton} {\n color: ${base.palette['foreground-color']};\n }\n `;\n }\n);\n\nStyledModalHeader.defaultProps = defaultThemeProp;\n\nexport const StyledModalContent = styled.div(({ theme: { base } }) => {\n return css`\n position: relative;\n padding: calc(0.5 * ${base.spacing}) calc(3 * ${base.spacing});\n overflow-y: auto;\n\n &:last-child {\n padding-bottom: calc(3 * ${base.spacing});\n }\n `;\n});\n\nStyledModalContent.defaultProps = defaultThemeProp;\n\nexport const StyledModalActions = styled.footer(({ theme: { base } }) => {\n return css`\n padding: calc(2.5 * ${base.spacing}) calc(3 * ${base.spacing}) calc(3 * ${base.spacing});\n `;\n});\n\nStyledModalActions.defaultProps = defaultThemeProp;\n\nexport const StyledModal = styled(StyledCard)<\n ModalPropsWithDefaults & Pick<ModalContextValue, 'alert' | 'state'>\n>(({ theme: { base }, alert, autoWidth, center, stretch, state }) => {\n let defaultMinWidth = '80ch';\n let defaultMaxWidth = '80ch';\n\n if (alert) {\n defaultMinWidth = '60ch';\n defaultMaxWidth = '60ch';\n } else if (autoWidth) {\n defaultMinWidth = '30ch';\n defaultMaxWidth = '100%';\n }\n\n return css`\n position: relative;\n\n ${!alert && stretch\n ? css`\n width: calc(100% - 1rem);\n height: calc(100% - 1rem);\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n width: calc(100% - 2rem);\n height: calc(100% - 2rem);\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n width: calc(100% - 4rem);\n height: calc(100% - 4rem);\n }\n `\n : css`\n min-width: min(calc(100% - 1rem), ${defaultMinWidth});\n max-width: min(calc(100% - 1rem), ${defaultMaxWidth});\n max-height: calc(100% - 1rem);\n ${!center &&\n css`\n margin-block-start: 0.5rem;\n `}\n\n @media screen and (min-width: ${base.breakpoints.sm}) {\n min-width: min(calc(100% - 2rem), ${defaultMinWidth});\n max-width: min(calc(100% - 2rem), ${defaultMaxWidth});\n max-height: calc(100% - 2rem);\n ${!center &&\n css`\n margin-block-start: 1rem;\n `}\n }\n\n @media screen and (min-width: ${base.breakpoints.md}) {\n min-width: min(calc(100% - 4rem), ${defaultMinWidth});\n max-width: min(calc(100% - 4rem), ${defaultMaxWidth});\n max-height: calc(100% - 4rem);\n ${!center &&\n css`\n margin-block-start: 2rem;\n `}\n }\n `}\n box-shadow: ${base.shadow.high};\n\n ${state === 'docked' &&\n css`\n /*\n * This seems like the most optimal of the suboptimal solutions.\n * https://styled-components.com/docs/faqs#how-can-i-override-styles-with-higher-specificity\n */\n &&& {\n /* Using non logical properties due to Safari 14.x support and since the inline bottom values are the same. */\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n `}\n\n &[aria-busy='true'] {\n ${StyledModalContent} {\n min-height: 8rem;\n overflow: hidden;\n }\n\n ${StyledModalChildrenWrap} {\n visibility: hidden;\n }\n }\n `;\n});\n\nStyledModal.defaultProps = defaultThemeProp;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode, Ref } from 'react';
|
|
1
|
+
import { FunctionComponent, ReactNode, Ref, ElementType } from 'react';
|
|
2
2
|
import { GridContainerProps } from '../Grid';
|
|
3
3
|
import { ForwardProps } from '../../types';
|
|
4
4
|
export interface SummaryItemProps {
|
|
@@ -17,7 +17,7 @@ export interface SummaryItemProps {
|
|
|
17
17
|
*/
|
|
18
18
|
overflowStrategy?: 'wrap' | 'ellipsis';
|
|
19
19
|
/** HTML tag to render the SummaryItem's element with. */
|
|
20
|
-
as?:
|
|
20
|
+
as?: ElementType;
|
|
21
21
|
/** Ref for the SummaryItem. */
|
|
22
22
|
ref?: Ref<HTMLElement>;
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryItem.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAA+B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SummaryItem.d.ts","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,GAAG,EAA+B,WAAW,EAAE,MAAM,OAAO,CAAC;AAGpG,OAAa,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,OAAO,EAAE,SAAS,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,oDAAoD;IACpD,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACvC,yDAAyD;IACzD,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,+BAA+B;IAC/B,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,yGAOxB,CAAC;AAIF,eAAO,MAAM,aAAa;;uBAEL,gBAAgB,CAAC,kBAAkB,CAAC;SAiBvD,CAAC;AAIH,eAAO,MAAM,eAAe;uBACP,gBAAgB,CAAC,kBAAkB,CAAC;SAYvD,CAAC;AAEH,eAAO,MAAM,wBAAwB,yGAEpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,yGAAe,CAAC;AAgB9C,QAAA,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,GAAG,YAAY,CAuDnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SummaryItem.js","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqC,UAAU,
|
|
1
|
+
{"version":3,"file":"SummaryItem.js","sourceRoot":"","sources":["../../../src/components/SummaryItem/SummaryItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqC,UAAU,EAAgC,MAAM,OAAO,CAAC;AACpG,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,IAA4B,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,kBAAkB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AAC,CAAC,QAAQ,EAAE,EAClE,QAAQ,EAAE,OAAO,OAAO,KAAK,QAAQ,EACrC,gBAAgB,EAAE,gBAAgB,gBAEjC,OAAO,YACM,EACf,SAAS,IAAI,CACZ,KAAC,eAAe,kBACd,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,EAC/C,gBAAgB,EAAE,gBAAgB,gBAEjC,SAAS,YACM,CACnB,EACA,OAAO,IAAI,CACV,KAAC,IAAI,kBAAC,EAAE,EAAE,wBAAwB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,gBAC/E,OAAO,YACH,CACR,aACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { FunctionComponent, ReactNode, Ref, forwardRef, PropsWithoutRef, ElementType } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Grid, { GridContainerProps } from '../Grid';\nimport { defaultThemeProp } from '../../theme';\nimport { ForwardProps } from '../../types';\nimport { StyledProgressRing } from '../Progress';\n\nexport interface SummaryItemProps {\n /** Region for the primary information. */\n primary: ReactNode;\n /** Region for displaying supporting metadata. */\n secondary?: ReactNode;\n /** Region for an Avatar, Icon, or other supporting visual. */\n visual?: ReactNode;\n /** Region for adding Actions, Buttons, or Links. */\n actions?: ReactNode;\n /* Override the default Grid container props on SummaryItem. */\n container?: GridContainerProps;\n /**\n * Determines how the text within primary and secondary fields should handle overflow.\n * @default \"wrap\"\n */\n overflowStrategy?: 'wrap' | 'ellipsis';\n /** HTML tag to render the SummaryItem's element with. */\n as?: ElementType;\n /** Ref for the SummaryItem. */\n ref?: Ref<HTMLElement>;\n}\n\nexport const StyledVisual = styled.div`\n > ${StyledProgressRing}, img {\n display: block;\n object-fit: cover;\n width: 2rem;\n height: 2rem;\n }\n`;\n\nStyledVisual.defaultProps = defaultThemeProp;\n\nexport const StyledPrimary = styled(Grid)<{\n isString?: boolean;\n overflowStrategy?: SummaryItemProps['overflowStrategy'];\n}>(({ theme, isString, overflowStrategy }) => {\n return css`\n ${overflowStrategy === 'ellipsis'\n ? css`\n overflow: hidden;\n text-overflow: ellipsis;\n `\n : css`\n word-break: break-word;\n `}\n\n ${isString &&\n css`\n font-weight: ${theme.base['font-weight']['semi-bold']};\n `}\n `;\n});\n\nStyledPrimary.defaultProps = defaultThemeProp;\n\nexport const StyledSecondary = styled(Grid)<{\n overflowStrategy?: SummaryItemProps['overflowStrategy'];\n}>(({ overflowStrategy }) => {\n return css`\n ${overflowStrategy === 'ellipsis'\n ? css`\n overflow: hidden;\n text-overflow: ellipsis;\n `\n : css`\n word-break: break-word;\n `}\n `;\n});\n\nexport const StyledSummaryItemActions = styled.div`\n white-space: nowrap;\n`;\n\nexport const StyledSummaryItem = styled.div``;\n\nconst getColumns = ({ visual, actions }: Pick<SummaryItemProps, 'visual' | 'actions'>) => {\n return `${visual ? 'auto ' : ''}minmax(0, 1fr)${actions ? ' auto' : ''}`;\n};\n\nconst getAreas = ({\n secondary,\n visual,\n actions\n}: Pick<SummaryItemProps, 'secondary' | 'visual' | 'actions'>) => {\n return `\"${visual ? 'visual ' : ''}primary${actions ? ' actions' : ''}\"${\n secondary ? `\\n\"${visual ? 'visual ' : ''}secondary${actions ? ' actions' : ''}\"` : ''\n }`;\n};\n\nconst SummaryItem: FunctionComponent<SummaryItemProps & ForwardProps> = forwardRef(\n (\n {\n visual,\n primary,\n secondary,\n actions,\n container,\n overflowStrategy = 'wrap',\n as,\n ...restProps\n }: PropsWithoutRef<SummaryItemProps>,\n ref: SummaryItemProps['ref']\n ) => {\n return (\n <Grid\n {...restProps}\n ref={ref}\n container={{\n cols: getColumns({ visual, actions }),\n colGap: 2,\n areas: getAreas({ secondary, visual, actions }),\n ...container\n }}\n as={StyledSummaryItem}\n forwardedAs={as}\n >\n {visual && (\n <Grid as={StyledVisual} item={{ area: 'visual', alignSelf: 'center' }}>\n {visual}\n </Grid>\n )}\n <StyledPrimary\n item={{ area: 'primary', alignSelf: secondary ? 'end' : 'center' }}\n isString={typeof primary === 'string'}\n overflowStrategy={overflowStrategy}\n >\n {primary}\n </StyledPrimary>\n {secondary && (\n <StyledSecondary\n item={{ area: 'secondary', alignSelf: 'start' }}\n overflowStrategy={overflowStrategy}\n >\n {secondary}\n </StyledSecondary>\n )}\n {actions && (\n <Grid as={StyledSummaryItemActions} item={{ area: 'actions', alignSelf: 'center' }}>\n {actions}\n </Grid>\n )}\n </Grid>\n );\n }\n);\n\nexport default SummaryItem;\n"]}
|
package/lib/hooks/useI18n.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
56
56
|
condition_builder_invalid_time_period: string;
|
|
57
57
|
condition_builder_invalid_relative_date: string;
|
|
58
58
|
condition_builder_invalid_value: string;
|
|
59
|
+
condition_builder_invalid_number: string;
|
|
59
60
|
condition_builder_date_function_year: string;
|
|
60
61
|
condition_builder_date_function_quarter: string;
|
|
61
62
|
condition_builder_select_placeholder: string;
|
|
@@ -342,6 +343,7 @@ declare const useI18n: () => import("../i18n/translate").TranslationFunction<Rea
|
|
|
342
343
|
activate: string;
|
|
343
344
|
uploading: string;
|
|
344
345
|
loading: string;
|
|
346
|
+
submitting: string;
|
|
345
347
|
view_all: string;
|
|
346
348
|
view_all_noun: string;
|
|
347
349
|
view_less: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,QAAA,MAAM,OAAO
|
|
1
|
+
{"version":3,"file":"useI18n.d.ts","sourceRoot":"","sources":["../../src/hooks/useI18n.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
package/lib/i18n/default.json
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"condition_builder_invalid_time_period": "Invalid time period",
|
|
53
53
|
"condition_builder_invalid_relative_date": "Invalid relative date",
|
|
54
54
|
"condition_builder_invalid_value": "Invalid value",
|
|
55
|
+
"condition_builder_invalid_number": "Invalid number",
|
|
55
56
|
"condition_builder_date_function_year": "Year",
|
|
56
57
|
"condition_builder_date_function_quarter": "Quarter",
|
|
57
58
|
"condition_builder_select_placeholder": "Select…",
|
|
@@ -253,7 +254,7 @@
|
|
|
253
254
|
"many": "Previous {0} years",
|
|
254
255
|
"other": "Previous {0} years"
|
|
255
256
|
},
|
|
256
|
-
"condition_builder_time_period_label": "Time
|
|
257
|
+
"condition_builder_time_period_label": "Time period",
|
|
257
258
|
"condition_builder_time_period_last": "Last",
|
|
258
259
|
"condition_builder_time_period_current": "Current",
|
|
259
260
|
"condition_builder_time_period_previous": "Previous",
|
|
@@ -338,6 +339,7 @@
|
|
|
338
339
|
"activate": "Activate",
|
|
339
340
|
"uploading": "Uploading",
|
|
340
341
|
"loading": "Loading…",
|
|
342
|
+
"submitting": "Submitting…",
|
|
341
343
|
"view_all": "View all",
|
|
342
344
|
"view_all_noun": "View all {0}",
|
|
343
345
|
"view_less": "View less",
|
package/lib/i18n/i18n.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ declare const create: (translations?: Partial<{
|
|
|
55
55
|
condition_builder_invalid_time_period: string;
|
|
56
56
|
condition_builder_invalid_relative_date: string;
|
|
57
57
|
condition_builder_invalid_value: string;
|
|
58
|
+
condition_builder_invalid_number: string;
|
|
58
59
|
condition_builder_date_function_year: string;
|
|
59
60
|
condition_builder_date_function_quarter: string;
|
|
60
61
|
condition_builder_select_placeholder: string;
|
|
@@ -341,6 +342,7 @@ declare const create: (translations?: Partial<{
|
|
|
341
342
|
activate: string;
|
|
342
343
|
uploading: string;
|
|
343
344
|
loading: string;
|
|
345
|
+
submitting: string;
|
|
344
346
|
view_all: string;
|
|
345
347
|
view_all_noun: string;
|
|
346
348
|
view_less: string;
|
|
@@ -616,6 +618,7 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
616
618
|
condition_builder_invalid_time_period: string;
|
|
617
619
|
condition_builder_invalid_relative_date: string;
|
|
618
620
|
condition_builder_invalid_value: string;
|
|
621
|
+
condition_builder_invalid_number: string;
|
|
619
622
|
condition_builder_date_function_year: string;
|
|
620
623
|
condition_builder_date_function_quarter: string;
|
|
621
624
|
condition_builder_select_placeholder: string;
|
|
@@ -902,6 +905,7 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
902
905
|
activate: string;
|
|
903
906
|
uploading: string;
|
|
904
907
|
loading: string;
|
|
908
|
+
submitting: string;
|
|
905
909
|
view_all: string;
|
|
906
910
|
view_all_noun: string;
|
|
907
911
|
view_less: string;
|
package/lib/i18n/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d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AC;AACF,eAAe,MAAM,CAAC;AAEtB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAW,CAAC;AAiB3C,eAAO,MAAM,SAAS,cAAe,MAAM,KAAG,KAAK,GAAG,KAErD,CAAC"}
|
package/lib/types/types.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export declare type HTMLTag = keyof JSX.IntrinsicElements;
|
|
|
13
13
|
export interface AsProp {
|
|
14
14
|
/** HTML tag or React Component to render the component as. */
|
|
15
15
|
as?: ElementType;
|
|
16
|
+
/** HTML tag or React Component to finally render the component as. */
|
|
17
|
+
forwardedAs?: ElementType;
|
|
16
18
|
}
|
|
17
19
|
export interface Action extends ForwardProps {
|
|
18
20
|
/** A string to uniquely identify this Action within the onClick handler. */
|
package/lib/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types/types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,CAAC,CAAC;CAAE,GACxC,CAAC,CAAC;AAIN,oBAAY,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAGzD,oBAAY,iBAAiB,CAC3B,KAAK,SAAS,MAAM,GAAG,EAAE,EACzB,QAAQ,SAAS,MAAM,KAAK,GAAG,KAAK,IAClC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;AAGlE,oBAAY,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACzC;KACG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACrB,GACD,CAAC,CAAC"}
|
package/lib/types/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ElementType, MouseEvent } from 'react';\n\nexport interface BaseProps {\n /** Additional CSS classes. */\n className?: string;\n}\n\nexport interface ForwardProps {\n [prop: string]: unknown;\n}\n\nexport interface NoChildrenProp {\n children?: never;\n}\n\nexport type HTMLTag = keyof JSX.IntrinsicElements;\nexport interface AsProp {\n /** HTML tag or React Component to render the component as. */\n as?: ElementType;\n}\n\nexport interface Action extends ForwardProps {\n /** A string to uniquely identify this Action within the onClick handler. */\n id: string;\n /** The text content of the Action. */\n text: string;\n /** The name of the Cosmos Icon to render, if any. */\n icon?: string;\n /** A location to navigate to. Passing an href will render a Link styled as a Button. */\n href?: string;\n /** Called when the Action is clicked. */\n onClick?: (\n id: string,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Determines if the Action will be disabled. */\n disabled?: boolean;\n}\n\n// https://github.com/microsoft/TypeScript/issues/30825\nexport type OmitStrict<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type PartialByKey<T extends object, K extends keyof T> = OmitStrict<T, K> &\n Partial<Pick<T, K>>;\nexport type RequiredByKey<T extends object, K extends keyof T> = OmitStrict<T, K> &\n Required<Pick<T, K>>;\n\nexport type DeepPartial<T> = T extends (infer U)[]\n ? DeepPartial<U>[]\n : T extends object\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : T;\n\nexport type DeepRequired<T> = T extends (infer U)[]\n ? DeepRequired<U>[]\n : T extends Function\n ? T\n : T extends object\n ? { [K in keyof T]-?: DeepRequired<T[K]> }\n : T;\n\n// Lowers type inference precedence without changing the type.\n// https://github.com/Microsoft/TypeScript/issues/14829#issue-216577598\nexport type DeferInfer<T> = T & { [K in keyof T]: T[K] };\n\n/* eslint-disable @typescript-eslint/ban-types */\nexport type PropsWithDefaults<\n Props extends object = {},\n Defaults extends keyof Props = never\n> = OmitStrict<Props, Defaults> & Required<Pick<Props, Defaults>>;\n/* eslint-enable @typescript-eslint/ban-types */\n\nexport type PrettyPrint<T> = T extends object\n ? {\n [K in keyof T]: T[K];\n }\n : T;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ElementType, MouseEvent } from 'react';\n\nexport interface BaseProps {\n /** Additional CSS classes. */\n className?: string;\n}\n\nexport interface ForwardProps {\n [prop: string]: unknown;\n}\n\nexport interface NoChildrenProp {\n children?: never;\n}\n\nexport type HTMLTag = keyof JSX.IntrinsicElements;\nexport interface AsProp {\n /** HTML tag or React Component to render the component as. */\n as?: ElementType;\n /** HTML tag or React Component to finally render the component as. */\n forwardedAs?: ElementType;\n}\n\nexport interface Action extends ForwardProps {\n /** A string to uniquely identify this Action within the onClick handler. */\n id: string;\n /** The text content of the Action. */\n text: string;\n /** The name of the Cosmos Icon to render, if any. */\n icon?: string;\n /** A location to navigate to. Passing an href will render a Link styled as a Button. */\n href?: string;\n /** Called when the Action is clicked. */\n onClick?: (\n id: string,\n e: MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLInputElement>\n ) => void;\n /** Determines if the Action will be disabled. */\n disabled?: boolean;\n}\n\n// https://github.com/microsoft/TypeScript/issues/30825\nexport type OmitStrict<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\nexport type PartialByKey<T extends object, K extends keyof T> = OmitStrict<T, K> &\n Partial<Pick<T, K>>;\nexport type RequiredByKey<T extends object, K extends keyof T> = OmitStrict<T, K> &\n Required<Pick<T, K>>;\n\nexport type DeepPartial<T> = T extends (infer U)[]\n ? DeepPartial<U>[]\n : T extends object\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : T;\n\nexport type DeepRequired<T> = T extends (infer U)[]\n ? DeepRequired<U>[]\n : T extends Function\n ? T\n : T extends object\n ? { [K in keyof T]-?: DeepRequired<T[K]> }\n : T;\n\n// Lowers type inference precedence without changing the type.\n// https://github.com/Microsoft/TypeScript/issues/14829#issue-216577598\nexport type DeferInfer<T> = T & { [K in keyof T]: T[K] };\n\n/* eslint-disable @typescript-eslint/ban-types */\nexport type PropsWithDefaults<\n Props extends object = {},\n Defaults extends keyof Props = never\n> = OmitStrict<Props, Defaults> & Required<Pick<Props, Defaults>>;\n/* eslint-enable @typescript-eslint/ban-types */\n\nexport type PrettyPrint<T> = T extends object\n ? {\n [K in keyof T]: T[K];\n }\n : T;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.18.0",
|
|
4
4
|
"description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|