@pega/cosmos-react-core 9.0.0-build.29.2 → 9.0.0-build.29.21
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.d.ts +0 -2
- package/lib/components/AppShell/AppShell.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.js +19 -24
- package/lib/components/AppShell/AppShell.js.map +1 -1
- package/lib/components/AppShell/AppShell.styles.d.ts +5 -2
- package/lib/components/AppShell/AppShell.styles.d.ts.map +1 -1
- package/lib/components/AppShell/AppShell.styles.js +47 -40
- package/lib/components/AppShell/AppShell.styles.js.map +1 -1
- package/lib/components/AppShell/Drawer.d.ts +1 -1
- package/lib/components/AppShell/Drawer.d.ts.map +1 -1
- package/lib/components/AppShell/Drawer.js +5 -9
- package/lib/components/AppShell/Drawer.js.map +1 -1
- package/lib/components/Button/Button.d.ts +5 -0
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +8 -4
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.d.ts +6 -1
- package/lib/components/Checkbox/CheckboxCard.d.ts.map +1 -1
- package/lib/components/Checkbox/CheckboxCard.js +2 -2
- package/lib/components/Checkbox/CheckboxCard.js.map +1 -1
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.d.ts.map +1 -1
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js +0 -3
- package/lib/components/ClassificationMarking/ClassificationMarking.styles.js.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +5 -3
- package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
- package/lib/components/FormField/FormField.d.ts +3 -2
- package/lib/components/FormField/FormField.d.ts.map +1 -1
- package/lib/components/FormField/FormField.js +23 -19
- package/lib/components/FormField/FormField.js.map +1 -1
- package/lib/components/Fullscreen/Fullscreen.js +1 -1
- package/lib/components/Fullscreen/Fullscreen.js.map +1 -1
- package/lib/components/Icon/Icon.d.ts.map +1 -1
- package/lib/components/Icon/Icon.js +1 -1
- package/lib/components/Icon/Icon.js.map +1 -1
- package/lib/components/Icon/iconNames.d.ts +1 -1
- package/lib/components/Icon/iconNames.d.ts.map +1 -1
- package/lib/components/Icon/iconNames.js +1 -0
- package/lib/components/Icon/iconNames.js.map +1 -1
- package/lib/components/Icon/icons/preview-hide.icon.d.ts +5 -0
- package/lib/components/Icon/icons/preview-hide.icon.d.ts.map +1 -0
- package/lib/components/Icon/icons/preview-hide.icon.js +7 -0
- package/lib/components/Icon/icons/preview-hide.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/doc-ai.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/field-group.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-bottom.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-hide.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview-rtl.icon.js.map +1 -0
- package/lib/components/Icon/streamline-icons/preview.icon.d.ts +5 -0
- package/lib/components/Icon/streamline-icons/preview.icon.d.ts.map +1 -0
- package/lib/components/Icon/streamline-icons/preview.icon.js +7 -0
- package/lib/components/Icon/streamline-icons/preview.icon.js.map +1 -0
- package/lib/components/Icon/streamlineIconNames.d.ts +1 -1
- package/lib/components/Icon/streamlineIconNames.d.ts.map +1 -1
- package/lib/components/Icon/streamlineIconNames.js +6 -0
- package/lib/components/Icon/streamlineIconNames.js.map +1 -1
- package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
- package/lib/components/Lightbox/Lightbox.js +1 -6
- package/lib/components/Lightbox/Lightbox.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.js +2 -2
- package/lib/components/LiveLog/LiveLog.js.map +1 -1
- package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
- package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.d.ts +1 -2
- package/lib/components/Location/GoogleMapsAPI.d.ts.map +1 -1
- package/lib/components/Location/GoogleMapsAPI.js +45 -45
- package/lib/components/Location/GoogleMapsAPI.js.map +1 -1
- package/lib/components/Location/LocationAPI.types.d.ts +1 -2
- package/lib/components/Location/LocationAPI.types.d.ts.map +1 -1
- package/lib/components/Location/LocationAPI.types.js.map +1 -1
- package/lib/components/Location/LocationInput.d.ts.map +1 -1
- package/lib/components/Location/LocationInput.js +52 -44
- package/lib/components/Location/LocationInput.js.map +1 -1
- package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
- package/lib/components/Modal/Modal.styles.js +1 -0
- package/lib/components/Modal/Modal.styles.js.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
- package/lib/components/MultiStepForm/HorizontalFormProgress.js +4 -3
- package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
- package/lib/components/PageTemplates/CategorySubPage.styles.js +24 -5
- package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.d.ts +6 -1
- package/lib/components/RadioButton/RadioButtonCard.d.ts.map +1 -1
- package/lib/components/RadioButton/RadioButtonCard.js +2 -2
- package/lib/components/RadioButton/RadioButtonCard.js.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js +18 -10
- package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCard.js +1 -1
- package/lib/components/SelectionCard/SelectionCard.js.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts +6 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.d.ts.map +1 -1
- package/lib/components/SelectionCard/SelectionCardDisplay.js +2 -2
- package/lib/components/SelectionCard/SelectionCardDisplay.js.map +1 -1
- package/lib/components/TextArea/TextArea.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.js +21 -2
- package/lib/components/TextArea/TextArea.js.map +1 -1
- package/lib/components/TextArea/TextArea.styles.d.ts +1 -0
- package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
- package/lib/components/TextArea/TextArea.styles.js +2 -1
- package/lib/components/TextArea/TextArea.styles.js.map +1 -1
- package/lib/components/Toaster/Toaster.d.ts.map +1 -1
- package/lib/components/Toaster/Toaster.js +0 -1
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Tree/StandardTree.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.js +4 -3
- package/lib/components/Tree/StandardTree.js.map +1 -1
- package/lib/components/Tree/StandardTree.styles.d.ts +6 -4
- package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.styles.js +10 -11
- package/lib/components/Tree/StandardTree.styles.js.map +1 -1
- package/lib/components/Tree/StandardTree.types.d.ts +2 -2
- package/lib/components/Tree/StandardTree.types.d.ts.map +1 -1
- package/lib/components/Tree/StandardTree.types.js.map +1 -1
- package/lib/hooks/useI18n.d.ts +6 -1
- package/lib/hooks/useI18n.d.ts.map +1 -1
- package/lib/i18n/default.d.ts +6 -1
- package/lib/i18n/default.d.ts.map +1 -1
- package/lib/i18n/default.js +7 -1
- package/lib/i18n/default.js.map +1 -1
- package/lib/i18n/i18n.d.ts +6 -1
- package/lib/i18n/i18n.d.ts.map +1 -1
- package/lib/styles/GlobalStyle.js +2 -2
- package/lib/styles/GlobalStyle.js.map +1 -1
- package/lib/theme/themes/orionDarkTheme.json +77 -57
- package/lib/utils/getEffectiveRect.d.ts +1 -5
- package/lib/utils/getEffectiveRect.d.ts.map +1 -1
- package/lib/utils/getEffectiveRect.js +78 -10
- package/lib/utils/getEffectiveRect.js.map +1 -1
- package/package.json +2 -2
package/lib/i18n/i18n.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
78
78
|
workflow: string;
|
|
79
79
|
panel: string;
|
|
80
80
|
other: string;
|
|
81
|
+
columns: string;
|
|
81
82
|
remove: string;
|
|
82
83
|
follow: string;
|
|
83
84
|
unfollow: string;
|
|
@@ -122,6 +123,7 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
122
123
|
regenerate: string;
|
|
123
124
|
generation_failed: string;
|
|
124
125
|
retry: string;
|
|
126
|
+
hide: string;
|
|
125
127
|
view_all: string;
|
|
126
128
|
view_less: string;
|
|
127
129
|
show_more: string;
|
|
@@ -507,6 +509,8 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
507
509
|
active_cases_trigger: string;
|
|
508
510
|
your_chats: string;
|
|
509
511
|
reset_width: string;
|
|
512
|
+
split_width: string;
|
|
513
|
+
full_width: string;
|
|
510
514
|
accept_suggestion_button_a11y: string;
|
|
511
515
|
reject_suggestion_button_a11y: string;
|
|
512
516
|
suggestion_info: string;
|
|
@@ -551,7 +555,6 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
551
555
|
assignment_item_urgency: string;
|
|
552
556
|
assignment_announcement_label: string;
|
|
553
557
|
case_announcement_label: string;
|
|
554
|
-
assignments_go_announcement_label: string;
|
|
555
558
|
assignments_sla: string;
|
|
556
559
|
key_navigation_instruction: string;
|
|
557
560
|
article_list_label_a11y: string;
|
|
@@ -1630,6 +1633,8 @@ export declare const DefaultTranslation: Readonly<Readonly<{
|
|
|
1630
1633
|
creating_tab: string;
|
|
1631
1634
|
create_tab_failure_message: string;
|
|
1632
1635
|
loading_configure_dialog: string;
|
|
1636
|
+
insight_datapage_picker_limited_features: string;
|
|
1637
|
+
data_page: string;
|
|
1633
1638
|
delete_parameter_filter: string;
|
|
1634
1639
|
insight_field_applied_on: string;
|
|
1635
1640
|
please_fill_the_required_fields: string;
|
package/lib/i18n/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,WAAW,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE7D,QAAA,MAAM,MAAM,GAAI,eAAe,WAAW,KAAG,QAAQ,CAAC,eAAe,CAEpE,CAAC;AACF,eAAe,MAAM,CAAC;AAEtB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,MAAM,WAAW,CAAC;AAE3C,MAAM,MA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;;;;;GAAW,CAAC;AAiB3C,eAAO,MAAM,SAAS,GAAI,WAAW,MAAM,KAAG,KAAK,GAAG,KAErD,CAAC"}
|
|
@@ -22,8 +22,8 @@ export const createGlobalRootStyles = ({ base: { scale, 'hit-area': hitArea, pal
|
|
|
22
22
|
font-size: calc(${scale} * 1rem);
|
|
23
23
|
--hit-area: ${hitArea.compact};
|
|
24
24
|
/* stylelint-disable unit-allowed-list, length-zero-no-unit */
|
|
25
|
-
--safe-area-inset-
|
|
26
|
-
--safe-area-inset-
|
|
25
|
+
--safe-area-inset-block-start: env(safe-area-inset-top, 0px);
|
|
26
|
+
--safe-area-inset-block-end: env(safe-area-inset-bottom, 0px);
|
|
27
27
|
&:dir(ltr) {
|
|
28
28
|
--safe-area-inset-inline-start: env(safe-area-inset-left, 0px);
|
|
29
29
|
--safe-area-inset-inline-end: env(safe-area-inset-right, 0px);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalStyle.js","sourceRoot":"","sources":["../../src/styles/GlobalStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;CAQrC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,IAAI,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,EAChC,EAAE,EAAE;IACjB,OAAO,GAAG,CAAA;;;;;;wBAMY,KAAK;oBACT,OAAO,CAAC,OAAO;;;;;;;;;;;;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E,EACxD,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;MACN,mBAAmB;;;;;;;;;;;;;;;oBAeL,KAAK;;;;eAIV,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,eAAe,CAAC;;;;MAItD,eAAe;QACjB,GAAG,CAAA;;;;KAIF;;MAEC,sBAAsB,CAAC,KAAK,CAAC;;MAE7B,sBAAsB,CAAC,KAAK,CAAC;;MAE7B,qBAAqB,CAAC,KAAK,CAAC;;;;;;;;;;;;GAY/B,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { mix, getLuminance } from 'polished';\nimport { createGlobalStyle, css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport { createHighlightStyles } from '../hooks/useHighlight';\nimport { defaultThemeProp } from '../theme';\n\nimport { calculateFontSize } from './utils';\nimport type { FontSize } from './utils';\n\nexport const globalSpacingStyles = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const createGlobalRootStyles = ({\n base: { scale, 'hit-area': hitArea, palette }\n}: DefaultTheme) => {\n return css`\n :root,\n :host {\n height: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n font-size: calc(${scale} * 1rem);\n --hit-area: ${hitArea.compact};\n /* stylelint-disable unit-allowed-list, length-zero-no-unit */\n --safe-area-inset-
|
|
1
|
+
{"version":3,"file":"GlobalStyle.js","sourceRoot":"","sources":["../../src/styles/GlobalStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MA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G,gBAAgB,CAAC,KAAK,EAAE,EAAE,EAAE;IACtE,MAAM,EACJ,IAAI,EAAE,EACJ,kBAAkB,EAAE,eAAe,EACnC,OAAO,EAAE,EAAE,kBAAkB,EAAE,UAAU,EAAE,EAC3C,MAAM,EAAE,EAAE,KAAK,EAAE,EACjB,YAAY,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,EAC/C,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EACxD,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;MACN,mBAAmB;;;;;;;;;;;;;;;oBAeL,KAAK;;;;eAIV,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,eAAe,CAAC;;;;MAItD,eAAe;QACjB,GAAG,CAAA;;;;KAIF;;MAEC,sBAAsB,CAAC,KAAK,CAAC;;MAE7B,sBAAsB,CAAC,KAAK,CAAC;;MAE7B,qBAAqB,CAAC,KAAK,CAAC;;;;;;;;;;;;GAY/B,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { mix, getLuminance } from 'polished';\nimport { createGlobalStyle, css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport { createHighlightStyles } from '../hooks/useHighlight';\nimport { defaultThemeProp } from '../theme';\n\nimport { calculateFontSize } from './utils';\nimport type { FontSize } from './utils';\n\nexport const globalSpacingStyles = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const createGlobalRootStyles = ({\n base: { scale, 'hit-area': hitArea, palette }\n}: DefaultTheme) => {\n return css`\n :root,\n :host {\n height: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n font-size: calc(${scale} * 1rem);\n --hit-area: ${hitArea.compact};\n /* stylelint-disable unit-allowed-list, length-zero-no-unit */\n --safe-area-inset-block-start: env(safe-area-inset-top, 0px);\n --safe-area-inset-block-end: env(safe-area-inset-bottom, 0px);\n &:dir(ltr) {\n --safe-area-inset-inline-start: env(safe-area-inset-left, 0px);\n --safe-area-inset-inline-end: env(safe-area-inset-right, 0px);\n }\n\n &:dir(rtl) {\n --safe-area-inset-inline-start: env(safe-area-inset-right, 0px);\n --safe-area-inset-inline-end: env(safe-area-inset-left, 0px);\n }\n /* stylelint-enable unit-allowed-list, length-zero-no-unit */\n scroll-padding-block-start: calc(4rem + var(--appshell-top-offset, 0rem));\n\n @media (pointer: coarse) {\n --hit-area: ${hitArea.finger};\n }\n color-scheme: ${getLuminance(palette['foreground-color']) > 0.5 ? 'dark' : 'light'};\n }\n `.join('');\n};\n\nexport const createGlobalBodyStyles = ({\n base: {\n 'font-size': baseFontSize,\n 'font-scale': baseFontScale,\n 'font-stretch': baseFontStretch,\n 'letter-spacing': baseLetterSpacing,\n 'font-family': fontFamily,\n palette: { 'foreground-color': foregroundColor, 'app-background': background },\n 'line-height': lineHeight\n },\n components: { text }\n}: DefaultTheme) => {\n // Can't call a hook here\n const fontSize = calculateFontSize(baseFontSize, baseFontScale);\n\n return css`\n body,\n :host {\n min-height: 100%;\n margin: 0;\n padding: 0;\n font-size: ${fontSize[text.primary['font-size'] as FontSize]};\n font-family: ${fontFamily};\n color: ${foregroundColor};\n line-height: ${lineHeight};\n font-stretch: ${baseFontStretch};\n letter-spacing: ${baseLetterSpacing};\n }\n\n body {\n background: ${background};\n }\n `.join('');\n};\n\nexport default createGlobalStyle(({ theme = defaultThemeProp.theme }) => {\n const {\n base: {\n 'custom-scrollbar': customScrollbar,\n palette: { 'foreground-color': foreground },\n shadow: { focus },\n transparency: { 'transparent-3': transparent }\n },\n components: {\n 'form-control': { 'background-color': backgroundColor }\n }\n } = theme;\n return css`\n ${globalSpacingStyles}\n\n body {\n overscroll-behavior: none;\n }\n\n h1:focus-visible,\n h2:focus-visible,\n h3:focus-visible,\n h4:focus-visible,\n h5:focus-visible,\n h6:focus-visible {\n @media (forced-colors: none) {\n outline: transparent;\n }\n box-shadow: ${focus};\n }\n\n ::placeholder {\n color: ${mix(transparent, foreground, backgroundColor)};\n opacity: unset;\n }\n\n ${customScrollbar &&\n css`\n * {\n scrollbar-width: thin;\n }\n `}\n\n ${createGlobalRootStyles(theme)}\n\n ${createGlobalBodyStyles(theme)}\n\n ${createHighlightStyles(theme)}\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n `;\n});\n"]}
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
"border-radius": "0.5rem",
|
|
4
4
|
"font-family": "'Poppins', sans-serif",
|
|
5
5
|
"palette": {
|
|
6
|
-
"app-background": "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"brand-foreground": "#001D54",
|
|
13
|
-
"dark": "#32375F",
|
|
14
|
-
"border-line": "#A1BBFEB3"
|
|
6
|
+
"app-background": "#13183E",
|
|
7
|
+
"secondary-background": "#2C4182",
|
|
8
|
+
"interactive": "#49B7FF",
|
|
9
|
+
"foreground-color": "#E7ECFF",
|
|
10
|
+
"primary-background": "#1F2758",
|
|
11
|
+
"border-line": "#536294"
|
|
15
12
|
},
|
|
16
13
|
"font-weight": {
|
|
17
14
|
"bold": 500,
|
|
@@ -22,115 +19,138 @@
|
|
|
22
19
|
},
|
|
23
20
|
"components": {
|
|
24
21
|
"agent": {
|
|
25
|
-
"background": "#
|
|
22
|
+
"background": "#28346E",
|
|
26
23
|
"user-message": {
|
|
27
|
-
"background": "
|
|
28
|
-
"foreground-color": "#
|
|
24
|
+
"background": "#1F2A5E",
|
|
25
|
+
"foreground-color": "#E7ECFF"
|
|
29
26
|
},
|
|
30
|
-
"foreground-color": "#
|
|
31
|
-
"history": {
|
|
32
|
-
"item": {
|
|
33
|
-
"selected-background": "#CDCFD7"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
"questionnaire": {
|
|
37
|
-
"background": "#FFFFFF80"
|
|
38
|
-
}
|
|
27
|
+
"foreground-color": "#E7ECFF"
|
|
39
28
|
},
|
|
40
29
|
"app-shell": {
|
|
41
30
|
"nav": {
|
|
42
31
|
"detached": true,
|
|
43
|
-
"background": "#
|
|
32
|
+
"background": "#12163E",
|
|
44
33
|
"border-color": "transparent",
|
|
45
|
-
"foreground-color": "#
|
|
46
|
-
"create-button-background": "#
|
|
47
|
-
"nested-list-background": "#
|
|
34
|
+
"foreground-color": "#E7ECFF",
|
|
35
|
+
"create-button-background": "#34427D4D",
|
|
36
|
+
"nested-list-background": "#34427D4D",
|
|
48
37
|
"expand-button": {
|
|
49
|
-
"background": "#
|
|
50
|
-
"foreground-color": "#
|
|
38
|
+
"background": "#34427D4D",
|
|
39
|
+
"foreground-color": "#E7ECFF"
|
|
51
40
|
},
|
|
52
41
|
"item-border-radius": "0.5rem",
|
|
53
|
-
"selected-background": "#
|
|
42
|
+
"selected-background": "#324278"
|
|
54
43
|
},
|
|
55
44
|
"header": {
|
|
56
|
-
"background": "linear-gradient(135deg, #
|
|
45
|
+
"background": "linear-gradient(135deg, #0C134C 0%, #3B5AA9 100%)",
|
|
57
46
|
"border-color": "transparent",
|
|
58
|
-
"foreground-color": "#
|
|
59
|
-
"app-name-color": "#
|
|
47
|
+
"foreground-color": "#E7ECFF",
|
|
48
|
+
"app-name-color": "#E7ECFF",
|
|
60
49
|
"search-input": {
|
|
61
|
-
"background-color": "#
|
|
62
|
-
"foreground-color": "#
|
|
50
|
+
"background-color": "#12184066",
|
|
51
|
+
"foreground-color": "#E7ECFF",
|
|
63
52
|
"border-color": "transparent"
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
55
|
},
|
|
67
56
|
"case-view": {
|
|
68
57
|
"icon": {
|
|
69
|
-
"background": "#
|
|
58
|
+
"background": "#2C468E"
|
|
70
59
|
},
|
|
71
60
|
"summary": {
|
|
72
61
|
"detached": true
|
|
73
62
|
},
|
|
74
63
|
"assignments": {
|
|
75
64
|
"detached": true,
|
|
76
|
-
"background": "#
|
|
65
|
+
"background": "#34427D4D"
|
|
77
66
|
},
|
|
78
67
|
"stages": {
|
|
79
68
|
"status": {
|
|
80
69
|
"completed": {
|
|
81
|
-
"background": "#
|
|
82
|
-
"foreground-color": "#
|
|
70
|
+
"background": "#243F2C",
|
|
71
|
+
"foreground-color": "#96CFA5"
|
|
83
72
|
},
|
|
84
73
|
"current": {
|
|
85
|
-
"background": "#
|
|
74
|
+
"background": "#2C468E"
|
|
86
75
|
},
|
|
87
76
|
"pending": {
|
|
88
|
-
"background": "#
|
|
89
|
-
"foreground-color": "#
|
|
77
|
+
"background": "#1F2D64",
|
|
78
|
+
"foreground-color": "#E7ECFF"
|
|
90
79
|
}
|
|
91
80
|
}
|
|
92
81
|
},
|
|
93
82
|
"header": {
|
|
94
|
-
"background": "#
|
|
95
|
-
"foreground-color": "#3B3965"
|
|
83
|
+
"background": "#1F2758"
|
|
96
84
|
}
|
|
97
85
|
},
|
|
98
86
|
"card": {
|
|
99
87
|
"border-radius": "0.5rem",
|
|
100
|
-
"background": "#
|
|
101
|
-
"foreground-color": "#
|
|
88
|
+
"background": "#1F2758",
|
|
89
|
+
"foreground-color": "#E7ECFF"
|
|
102
90
|
},
|
|
103
91
|
"button": {
|
|
104
92
|
"border-radius": 1,
|
|
105
|
-
"color": "#
|
|
106
|
-
"secondary-color": "#
|
|
107
|
-
"foreground-color": "
|
|
93
|
+
"color": "#49B7FF",
|
|
94
|
+
"secondary-color": "#49B7FF",
|
|
95
|
+
"foreground-color": "auto"
|
|
96
|
+
},
|
|
97
|
+
"link": {
|
|
98
|
+
"color": "#49B7FF"
|
|
108
99
|
},
|
|
109
100
|
"form-control": {
|
|
110
101
|
"border-radius": 1,
|
|
111
|
-
"border-color": "#
|
|
102
|
+
"border-color": "#536294",
|
|
103
|
+
"background-color": "#1F2758",
|
|
112
104
|
":hover": {
|
|
113
|
-
"border-color": "#
|
|
105
|
+
"border-color": "#7081B6"
|
|
106
|
+
},
|
|
107
|
+
":read-only": {
|
|
108
|
+
"background-color": "#41475C"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"badges": {
|
|
112
|
+
"font-stretch": "60%",
|
|
113
|
+
"status": {
|
|
114
|
+
"success": {
|
|
115
|
+
"foreground": "#86EFAC",
|
|
116
|
+
"background": "#1A3549"
|
|
117
|
+
},
|
|
118
|
+
"urgent": {
|
|
119
|
+
"foreground": "#FFA4A4",
|
|
120
|
+
"background": "#3E2141"
|
|
121
|
+
},
|
|
122
|
+
"warn": {
|
|
123
|
+
"foreground": "#FFAB4B",
|
|
124
|
+
"background": "#342C38"
|
|
125
|
+
},
|
|
126
|
+
"pending": {
|
|
127
|
+
"foreground": "#D4BBFF",
|
|
128
|
+
"background": "#2D2C5D"
|
|
129
|
+
},
|
|
130
|
+
"info": {
|
|
131
|
+
"foreground": "#DADFEC",
|
|
132
|
+
"background": "#3B4060"
|
|
133
|
+
}
|
|
114
134
|
}
|
|
115
135
|
},
|
|
116
136
|
"tabs": {
|
|
117
137
|
"detached": true
|
|
118
138
|
},
|
|
119
139
|
"announcement": {
|
|
120
|
-
"background": "
|
|
121
|
-
"foreground-color": "#
|
|
140
|
+
"background": "#2C468E",
|
|
141
|
+
"foreground-color": "#E7ECFF"
|
|
122
142
|
},
|
|
123
143
|
"avatar": {
|
|
124
|
-
"background-color": "#
|
|
144
|
+
"background-color": "#2D4066"
|
|
125
145
|
},
|
|
126
146
|
"table": {
|
|
127
147
|
"header": {
|
|
128
|
-
"background-color": "#
|
|
148
|
+
"background-color": "#32427F",
|
|
129
149
|
"border-color": "transparent"
|
|
130
150
|
},
|
|
131
151
|
"body": {
|
|
132
152
|
"border-color": "transparent",
|
|
133
|
-
"secondary-background-color": "#
|
|
153
|
+
"secondary-background-color": "#2A356A"
|
|
134
154
|
},
|
|
135
155
|
"spacing": {
|
|
136
156
|
"horizontal-inner": true
|
|
@@ -143,13 +163,13 @@
|
|
|
143
163
|
}
|
|
144
164
|
},
|
|
145
165
|
"label": {
|
|
146
|
-
"foreground-color": "#
|
|
166
|
+
"foreground-color": "#D4DDFA"
|
|
147
167
|
},
|
|
148
168
|
"progress": {
|
|
149
|
-
"progress-color": "#
|
|
169
|
+
"progress-color": "#4D63B3"
|
|
150
170
|
},
|
|
151
171
|
"select": {
|
|
152
|
-
"border-color": "#
|
|
172
|
+
"border-color": "#6F7DA680"
|
|
153
173
|
}
|
|
154
174
|
}
|
|
155
175
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEffectiveRect.d.ts","sourceRoot":"","sources":["../../src/utils/getEffectiveRect.ts"],"names":[],"mappings":"AAAA,UAAU,
|
|
1
|
+
{"version":3,"file":"getEffectiveRect.d.ts","sourceRoot":"","sources":["../../src/utils/getEffectiveRect.ts"],"names":[],"mappings":"AAAA,UAAU,IAAK,SAAQ,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;CAAG;AAiD5E;;;;;;;GAOG;AACH,QAAA,MAAM,gBAAgB,GAAI,IAAI,OAAO,KAAG,IAkDvC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recursively union the bounding rects of all element descendants of `el`
|
|
3
|
+
* that have a non-zero size. Zero-size children (e.g. `display: contents`
|
|
4
|
+
* wrappers such as Pega's `Inspectable`) are descended into rather than
|
|
5
|
+
* skipped, so that deeply nested editable wrappers contribute their
|
|
6
|
+
* children's rects to the parent's effective rect.
|
|
7
|
+
*
|
|
8
|
+
* Only element children are visited — bare text nodes are intentionally
|
|
9
|
+
* excluded to avoid the multi-layout-column spanning issue that affected
|
|
10
|
+
* the previous `Range.getBoundingClientRect` approach.
|
|
11
|
+
*/
|
|
12
|
+
const unionChildRects = (el) => {
|
|
13
|
+
return [...el.children].reduce((union, child) => {
|
|
14
|
+
const childRect = child.getBoundingClientRect();
|
|
15
|
+
if (childRect.width !== 0 || childRect.height !== 0) {
|
|
16
|
+
return {
|
|
17
|
+
left: Math.min(union.left, childRect.left),
|
|
18
|
+
top: Math.min(union.top, childRect.top),
|
|
19
|
+
right: Math.max(union.right, childRect.right),
|
|
20
|
+
bottom: Math.max(union.bottom, childRect.bottom)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
// Zero-size child (e.g. display:contents Inspectable wrapper) — recurse
|
|
24
|
+
// so its element descendants are still included in the union.
|
|
25
|
+
const nested = unionChildRects(child);
|
|
26
|
+
return {
|
|
27
|
+
left: Math.min(union.left, nested.left),
|
|
28
|
+
top: Math.min(union.top, nested.top),
|
|
29
|
+
right: Math.max(union.right, nested.right),
|
|
30
|
+
bottom: Math.max(union.bottom, nested.bottom)
|
|
31
|
+
};
|
|
32
|
+
}, {
|
|
33
|
+
left: Infinity,
|
|
34
|
+
top: Infinity,
|
|
35
|
+
right: -Infinity,
|
|
36
|
+
bottom: -Infinity
|
|
37
|
+
});
|
|
38
|
+
};
|
|
1
39
|
/**
|
|
2
40
|
* Returns the visible bounding rect for an element, robust to wrappers
|
|
3
41
|
* that use `display: contents`. Such wrappers have no box of their own
|
|
@@ -7,19 +45,49 @@
|
|
|
7
45
|
* geometry reports.
|
|
8
46
|
*/
|
|
9
47
|
const getEffectiveRect = (el) => {
|
|
48
|
+
const win = el.ownerDocument?.defaultView ?? window;
|
|
49
|
+
const docEl = el.ownerDocument?.documentElement;
|
|
10
50
|
let { left, top, width, height } = el.getBoundingClientRect();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
51
|
+
// display:contents (and other no-box elements) return 0/0.
|
|
52
|
+
// Union element-children rects recursively (zero-size children such as
|
|
53
|
+
// display:contents Inspectable wrappers are descended into rather than
|
|
54
|
+
// skipped), instead of using Range which walks ALL text descendants and
|
|
55
|
+
// can span multiple layout columns.
|
|
56
|
+
if (width === 0 && height === 0) {
|
|
57
|
+
const union = unionChildRects(el);
|
|
58
|
+
if (union.left !== Infinity) {
|
|
59
|
+
left = union.left;
|
|
60
|
+
top = union.top;
|
|
61
|
+
width = union.right - union.left;
|
|
62
|
+
height = union.bottom - union.top;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// Clip to overflow-constraining ancestors.
|
|
66
|
+
let right = left + width;
|
|
67
|
+
let bottom = top + height;
|
|
68
|
+
let ancestor = el.parentElement;
|
|
69
|
+
while (ancestor && ancestor !== docEl) {
|
|
70
|
+
const style = win.getComputedStyle(ancestor);
|
|
71
|
+
const ox = style.overflowX;
|
|
72
|
+
const oy = style.overflowY;
|
|
73
|
+
const clips = ox === 'hidden' ||
|
|
74
|
+
ox === 'clip' ||
|
|
75
|
+
ox === 'scroll' ||
|
|
76
|
+
ox === 'auto' ||
|
|
77
|
+
oy === 'hidden' ||
|
|
78
|
+
oy === 'clip' ||
|
|
79
|
+
oy === 'scroll' ||
|
|
80
|
+
oy === 'auto';
|
|
81
|
+
if (clips) {
|
|
82
|
+
const ar = ancestor.getBoundingClientRect();
|
|
83
|
+
left = Math.max(left, ar.left);
|
|
84
|
+
top = Math.max(top, ar.top);
|
|
85
|
+
right = Math.min(right, ar.right);
|
|
86
|
+
bottom = Math.min(bottom, ar.bottom);
|
|
20
87
|
}
|
|
88
|
+
ancestor = ancestor.parentElement;
|
|
21
89
|
}
|
|
22
|
-
return { left, top, width, height };
|
|
90
|
+
return { left, top, width: Math.max(0, right - left), height: Math.max(0, bottom - top) };
|
|
23
91
|
};
|
|
24
92
|
export default getEffectiveRect;
|
|
25
93
|
//# sourceMappingURL=getEffectiveRect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEffectiveRect.js","sourceRoot":"","sources":["../../src/utils/getEffectiveRect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getEffectiveRect.js","sourceRoot":"","sources":["../../src/utils/getEffectiveRect.ts"],"names":[],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,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,CAAC;QAC3B,MAAM,KAAK,GACT,EAAE,KAAK,QAAQ;YACf,EAAE,KAAK,MAAM;YACb,EAAE,KAAK,QAAQ;YACf,EAAE,KAAK,MAAM;YACb,EAAE,KAAK,QAAQ;YACf,EAAE,KAAK,MAAM;YACb,EAAE,KAAK,QAAQ;YACf,EAAE,KAAK,MAAM,CAAC;QAChB,IAAI,KAAK,EAAE,CAAC;YACV,MAAM,EAAE,GAAG,QAAQ,CAAC,qBAAqB,EAAE,CAAC;YAC5C,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YAC/B,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;YAC5B,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC;YAClC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;QACvC,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC;IACpC,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC;AAC5F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["interface Rect extends Pick<DOMRect, 'left' | 'top' | 'width' | 'height'> {}\n\ninterface UnionResult extends Pick<DOMRect, 'left' | 'top' | 'right' | 'bottom'> {}\n\n/**\n * Recursively union the bounding rects of all element descendants of `el`\n * that have a non-zero size. Zero-size children (e.g. `display: contents`\n * wrappers such as Pega's `Inspectable`) are descended into rather than\n * skipped, so that deeply nested editable wrappers contribute their\n * children's rects to the parent's effective rect.\n *\n * Only element children are visited — bare text nodes are intentionally\n * excluded to avoid the multi-layout-column spanning issue that affected\n * the previous `Range.getBoundingClientRect` approach.\n */\nconst unionChildRects = (el: Element): UnionResult => {\n return [...el.children].reduce(\n (union, child) => {\n const childRect = child.getBoundingClientRect();\n\n if (childRect.width !== 0 || childRect.height !== 0) {\n return {\n left: Math.min(union.left, childRect.left),\n top: Math.min(union.top, childRect.top),\n right: Math.max(union.right, childRect.right),\n bottom: Math.max(union.bottom, childRect.bottom)\n };\n }\n\n // Zero-size child (e.g. display:contents Inspectable wrapper) — recurse\n // so its element descendants are still included in the union.\n const nested = unionChildRects(child);\n\n return {\n left: Math.min(union.left, nested.left),\n top: Math.min(union.top, nested.top),\n right: Math.max(union.right, nested.right),\n bottom: Math.max(union.bottom, nested.bottom)\n };\n },\n {\n left: Infinity,\n top: Infinity,\n right: -Infinity,\n bottom: -Infinity\n }\n );\n};\n\n/**\n * Returns the visible bounding rect for an element, robust to wrappers\n * that use `display: contents`. Such wrappers have no box of their own\n * but the content they enclose still paints — `Range.getBoundingClientRect`\n * yields the union of the rendered content (including text nodes), which\n * is what we want for both Inspector highlight frames and UI Designer\n * geometry reports.\n */\nconst getEffectiveRect = (el: Element): Rect => {\n const win = el.ownerDocument?.defaultView ?? window;\n const docEl = el.ownerDocument?.documentElement;\n\n let { left, top, width, height } = el.getBoundingClientRect();\n\n // display:contents (and other no-box elements) return 0/0.\n // Union element-children rects recursively (zero-size children such as\n // display:contents Inspectable wrappers are descended into rather than\n // skipped), instead of using Range which walks ALL text descendants and\n // can span multiple layout columns.\n if (width === 0 && height === 0) {\n const union = unionChildRects(el);\n if (union.left !== Infinity) {\n left = union.left;\n top = union.top;\n width = union.right - union.left;\n height = union.bottom - union.top;\n }\n }\n\n // Clip to overflow-constraining ancestors.\n let right = left + width;\n let bottom = top + height;\n let ancestor = el.parentElement;\n\n while (ancestor && ancestor !== docEl) {\n const style = win.getComputedStyle(ancestor);\n const ox = style.overflowX;\n const oy = style.overflowY;\n const clips =\n ox === 'hidden' ||\n ox === 'clip' ||\n ox === 'scroll' ||\n ox === 'auto' ||\n oy === 'hidden' ||\n oy === 'clip' ||\n oy === 'scroll' ||\n oy === 'auto';\n if (clips) {\n const ar = ancestor.getBoundingClientRect();\n left = Math.max(left, ar.left);\n top = Math.max(top, ar.top);\n right = Math.min(right, ar.right);\n bottom = Math.min(bottom, ar.bottom);\n }\n ancestor = ancestor.parentElement;\n }\n\n return { left, top, width: Math.max(0, right - left), height: Math.max(0, bottom - top) };\n};\n\nexport default getEffectiveRect;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "9.0.0-build.29.
|
|
3
|
+
"version": "9.0.0-build.29.21",
|
|
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
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Pegasystems",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-popper": "^2.3.0",
|
|
52
52
|
"react-resizable": "^3.0.5",
|
|
53
53
|
"shortcuts": "^2.0.3",
|
|
54
|
-
"styled-components": "
|
|
54
|
+
"styled-components": "~6.3.11",
|
|
55
55
|
"timezoned-date": "^3.0.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|