@pega/cosmos-react-work 10.0.0-build.1.11 → 10.0.0-build.1.13

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.
Files changed (29) hide show
  1. package/lib/components/Details/Details.styles.js +5 -5
  2. package/lib/components/Details/Details.styles.js.map +1 -1
  3. package/lib/components/Shortcuts/Shortcuts.d.ts.map +1 -1
  4. package/lib/components/Shortcuts/Shortcuts.js +5 -8
  5. package/lib/components/Shortcuts/Shortcuts.js.map +1 -1
  6. package/lib/components/Shortcuts/Shortcuts.styles.d.ts +4 -7
  7. package/lib/components/Shortcuts/Shortcuts.styles.d.ts.map +1 -1
  8. package/lib/components/Shortcuts/Shortcuts.styles.js +29 -32
  9. package/lib/components/Shortcuts/Shortcuts.styles.js.map +1 -1
  10. package/lib/components/Stages/Stages.d.ts +4 -2
  11. package/lib/components/Stages/Stages.d.ts.map +1 -1
  12. package/lib/components/Stages/Stages.js +99 -88
  13. package/lib/components/Stages/Stages.js.map +1 -1
  14. package/lib/components/Stages/Stages.styles.d.ts +14 -0
  15. package/lib/components/Stages/Stages.styles.d.ts.map +1 -1
  16. package/lib/components/Stages/Stages.styles.js +179 -39
  17. package/lib/components/Stages/Stages.styles.js.map +1 -1
  18. package/lib/components/Stages/Stages.test-ids.d.ts +2 -0
  19. package/lib/components/Stages/Stages.test-ids.d.ts.map +1 -0
  20. package/lib/components/Stages/Stages.test-ids.js +3 -0
  21. package/lib/components/Stages/Stages.test-ids.js.map +1 -0
  22. package/lib/components/Stages/Stages.types.d.ts +3 -3
  23. package/lib/components/Stages/Stages.types.d.ts.map +1 -1
  24. package/lib/components/Stages/Stages.types.js.map +1 -1
  25. package/lib/components/Stages/index.d.ts +1 -0
  26. package/lib/components/Stages/index.d.ts.map +1 -1
  27. package/lib/components/Stages/index.js +1 -0
  28. package/lib/components/Stages/index.js.map +1 -1
  29. package/package.json +3 -3
@@ -1,4 +1,5 @@
1
1
  import styled, { css } from 'styled-components';
2
+ import { transparentize } from 'polished';
2
3
  import { calculateFontSize, DateTimeDisplay, defaultThemeProp, Icon, Text, StyledIcon, calculateForegroundColor } from '@pega/cosmos-react-core';
3
4
  const stageClipPath = (leftNotch, rightPoint, mirrored = false) => {
4
5
  if (mirrored) {
@@ -32,14 +33,24 @@ const stageClipPath = (leftNotch, rightPoint, mirrored = false) => {
32
33
  // === Chevron Configuration ===
33
34
  // Centralizes spacing and border thickness via CSS custom properties set at StyledStages
34
35
  const chevronConfig = {
36
+ // Horizontal projection of the rotated border-square forming the chevron point (fine pointer).
37
+ // Derived from the border-square size × cos(45° + skew). Tuned to visually align with the stage height.
35
38
  width: 'calc(1.156 * var(--chevron-spacing))',
39
+ // Same horizontal projection for coarse/touch pointer (larger square, proportionally wider point).
36
40
  coarseWidth: 'calc(1.4375 * var(--chevron-spacing))',
41
+ // Side length of the rotated border-square forming the chevron (fine pointer: 3× base spacing).
37
42
  squareSize: 'calc(3 * var(--chevron-spacing))',
38
- coarseSquareSize: 'calc(3.5 * var(--chevron-spacing))',
43
+ // Side length of the rotated border-square for coarse/touch pointer ( base spacing).
44
+ coarseSquareSize: 'calc(4 * var(--chevron-spacing))',
45
+ // Distance to inset the ::before notch from the left edge of the stage (fine pointer).
46
+ // 0.688 ≈ width − half-border-overlap, keeps the notch flush with the preceding chevron point.
39
47
  offsetLeft: 'calc(0.688 * var(--chevron-spacing))',
48
+ // Distance to inset the ::after point from the right edge of the stage (fine pointer).
49
+ // Equal to `width` so the point extends exactly one chevron-width beyond the stage boundary.
40
50
  offsetRight: 'calc(1.156 * var(--chevron-spacing))',
41
- coarseOffsetLeft: 'calc(0.688 * var(--chevron-spacing))',
42
- coarseOffsetRight: 'calc(1.5 * var(--chevron-spacing))'
51
+ // Coarse-pointer equivalents of offsetLeft/offsetRight, scaled to match coarseWidth/coarseSquareSize.
52
+ coarseOffsetLeft: 'calc(1.03 * var(--chevron-spacing))',
53
+ coarseOffsetRight: 'calc(1.4375 * var(--chevron-spacing))'
43
54
  };
44
55
  // === Chevron Helpers ===
45
56
  // After team discussion we decided to use logical properties throughout — `inset-block-start`
@@ -62,17 +73,17 @@ const createChevronPseudo = (borderWidth, borderColor, size) => `
62
73
  pointer-events: none;
63
74
  `;
64
75
  const createChevronBaseStyles = (config, borderThicknessVar) => css `
65
- &:not(:first-of-type)::before,
66
- &:not(:last-of-type)::after {
76
+ &:not(:nth-of-type(-n + 2))::before,
77
+ &:not(:nth-last-of-type(-n + 2))::after {
67
78
  border-inline-end-width: calc(1.5 * ${borderThicknessVar});
68
79
  border-block-start-width: calc(1.5 * ${borderThicknessVar});
69
80
  }
70
81
 
71
- &:not(:first-of-type)::before {
82
+ &:not(:nth-of-type(-n + 2))::before {
72
83
  inset-inline-start: calc(-1 * ${config.width} - ${config.offsetLeft});
73
84
  }
74
85
 
75
- &:not(:last-of-type)::after {
86
+ &:not(:nth-last-of-type(-n + 2))::after {
76
87
  inset-inline-end: calc(-1 * ${config.width} + ${config.offsetRight});
77
88
  }
78
89
  `;
@@ -93,30 +104,147 @@ const createChevronInteractiveStates = (config, borderThicknessVar, includeHover
93
104
  border-block-start-width: calc(2 * ${borderThicknessVar});
94
105
  }
95
106
  `;
107
+ export const StyledStagesWrapper = styled.div(({ theme }) => {
108
+ return css `
109
+ --stages-fade-width: calc(${theme.base.spacing} * 2);
110
+ --stages-fade-start: 0;
111
+ --stages-fade-end: 0;
112
+ --stages-scrollbar-reserve: calc(${theme.base.spacing} * 0.25);
113
+ position: relative;
114
+ width: 100%;
115
+ overflow: hidden;
116
+ border-radius: ${theme.components.card['border-radius']};
117
+ mask-image: linear-gradient(black, black),
118
+ linear-gradient(
119
+ to right,
120
+ transparent 0,
121
+ black var(--stages-fade-start),
122
+ black calc(100% - var(--stages-fade-end)),
123
+ transparent 100%
124
+ );
125
+ mask-size:
126
+ 100% var(--stages-scrollbar-reserve),
127
+ 100% calc(100% - var(--stages-scrollbar-reserve));
128
+ mask-position:
129
+ 0 100%,
130
+ 0 0;
131
+ mask-repeat: no-repeat, no-repeat;
132
+
133
+ [dir='rtl'] & {
134
+ mask-image: linear-gradient(black, black),
135
+ linear-gradient(
136
+ to right,
137
+ transparent 0,
138
+ black var(--stages-fade-end),
139
+ black calc(100% - var(--stages-fade-start)),
140
+ transparent 100%
141
+ );
142
+ }
143
+
144
+ &:has(:focus-visible) {
145
+ box-shadow: ${theme.base.shadow['focus-group']};
146
+ }
147
+
148
+ @media (pointer: coarse) {
149
+ --stages-fade-width: calc(${theme.base.spacing} * 3);
150
+ mask-image: linear-gradient(
151
+ to right,
152
+ transparent 0,
153
+ black var(--stages-fade-start),
154
+ black calc(100% - var(--stages-fade-end)),
155
+ transparent 100%
156
+ );
157
+ mask-size: 100% 100%;
158
+ mask-position: 0 0;
159
+ mask-repeat: no-repeat;
160
+
161
+ [dir='rtl'] & {
162
+ mask-image: linear-gradient(
163
+ to right,
164
+ transparent 0,
165
+ black var(--stages-fade-end),
166
+ black calc(100% - var(--stages-fade-start)),
167
+ transparent 100%
168
+ );
169
+ }
170
+ }
171
+ `;
172
+ });
173
+ StyledStagesWrapper.defaultProps = defaultThemeProp;
96
174
  export const StyledStages = styled.ol(({ theme }) => {
97
175
  return css `
98
176
  --chevron-spacing: ${theme.base.spacing};
99
177
  --chevron-border-thickness: ${theme.components.button['border-width']};
100
- background-color: ${theme.base.palette['primary-background']};
101
178
  border-radius: ${theme.components.card['border-radius']};
102
179
  display: flex;
103
180
  padding: 0;
104
181
  width: 100%;
105
- overflow: hidden;
182
+ overflow-x: auto;
183
+ overflow-y: hidden;
106
184
  list-style: none;
185
+ scrollbar-width: thin;
186
+ scrollbar-color: transparent transparent;
187
+
188
+ &:hover,
189
+ &:focus-within {
190
+ scrollbar-color: var(
191
+ --stages-scrollbar-thumb,
192
+ ${transparentize(0.4, theme.base.palette['border-line'])}
193
+ )
194
+ var(--stages-scrollbar-track, transparent);
195
+ }
107
196
 
108
- &:has(:focus-visible) {
109
- box-shadow: ${theme.base.shadow['focus-group']};
197
+ &::-webkit-scrollbar {
198
+ height: 0.25rem;
199
+ }
200
+
201
+ @media (pointer: coarse) {
202
+ scrollbar-width: none;
203
+
204
+ &::-webkit-scrollbar {
205
+ display: none;
206
+ }
110
207
  }
111
208
  `;
112
209
  });
113
210
  StyledStages.defaultProps = defaultThemeProp;
114
- export const StyledInnerStage = styled.span(props => {
211
+ /**
212
+ * A sentinel is an invisible 1 px <li> placed at each end of the scrollable stage list.
213
+ * It is observed by an IntersectionObserver; when it scrolls out of view, the component sets
214
+ * --stages-fade-start or --stages-fade-end to show a gradient fade indicating more stages
215
+ * are reachable by scrolling. When it comes back into view the property is reset to 0.
216
+ *
217
+ * Sentinel elements carry aria-hidden="true" so they are valid list items semantically.
218
+ * Because styled-components scopes all CSS to a generated class, the chevron and layout rules
219
+ * in StyledStageContainer never apply to these elements — they carry a different class.
220
+ * CSS type-based selectors (:nth-of-type, :nth-last-of-type) in StyledStageContainer are
221
+ * offset by 1 at each end to skip the sentinels and target only real stage items.
222
+ */
223
+ export const StyledSentinel = styled.li `
224
+ flex-shrink: 0;
225
+
226
+ /* NOTE: the sentinel must occupy
227
+ a single physical pixel so IntersectionObserver can detect it at threshold 0 while having
228
+ negligible layout impact. A rem value could collapse to zero at small font sizes. */
229
+ /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */
230
+ width: 1px;
231
+ /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */
232
+ height: 1px;
233
+ padding: 0;
234
+ margin: 0;
235
+ pointer-events: none;
236
+ `;
237
+ StyledSentinel.defaultProps = defaultThemeProp;
238
+ export const StyledInnerStage = styled.span(({ theme, ellipsis }) => {
115
239
  return css `
116
- display: inline-block;
240
+ display: inline-flex;
241
+ align-items: center;
242
+ gap: calc(0.25 * ${theme.base.spacing});
117
243
  text-align: center;
118
244
  white-space: nowrap;
119
- ${props.ellipsis &&
245
+ padding-inline-start: calc(0.875 * ${theme.base.spacing});
246
+ padding-inline-end: calc(1.125 * ${theme.base.spacing});
247
+ ${ellipsis &&
120
248
  css `
121
249
  overflow: hidden;
122
250
  text-overflow: ellipsis;
@@ -146,12 +274,12 @@ export const StyledStage = styled.button(({ theme: { base: { palette, 'hit-area'
146
274
  width: calc(100% + ${chevronConfig.width});
147
275
  --stage-chevron-width: ${chevronConfig.width};
148
276
 
149
- ${StyledIcon}, ${StyledInnerStage} {
277
+ ${StyledInnerStage} {
150
278
  transform: translateX(calc(-0.25 * var(--chevron-spacing)));
279
+ opacity: ${transparency['transparent-2']};
151
280
  }
152
281
  ${stageClipPath(true, true)}
153
282
 
154
- [dir='rtl'] & ${StyledIcon},
155
283
  [dir='rtl'] & ${StyledInnerStage} {
156
284
  transform: translateX(calc(0.25 * var(--chevron-spacing)));
157
285
  }
@@ -201,16 +329,6 @@ export const StyledStage = styled.button(({ theme: { base: { palette, 'hit-area'
201
329
  width: calc(100% + ${chevronConfig.coarseWidth});
202
330
  --stage-chevron-width: ${chevronConfig.coarseWidth};
203
331
  }
204
-
205
- ${StyledIcon} {
206
- & ~ ${StyledInnerStage} {
207
- margin-inline-start: 0.25rem;
208
- }
209
- }
210
-
211
- ${StyledInnerStage} {
212
- opacity: ${transparency['transparent-2']};
213
- }
214
332
  `;
215
333
  });
216
334
  StyledStage.defaultProps = defaultThemeProp;
@@ -231,7 +349,7 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
231
349
  position: relative;
232
350
  margin-inline-start: calc(-1 * ${chevronConfig.width});
233
351
 
234
- &:first-of-type {
352
+ &:nth-of-type(2) {
235
353
  margin-inline-start: 0;
236
354
  }
237
355
 
@@ -240,7 +358,7 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
240
358
  * at internal boundaries; the last <li> has no z-index so its left neighbor's ::after
241
359
  * wins at the final boundary. On hover/focus/active, the interacting <li> gains z:2/3
242
360
  * and its own pseudo-element surfaces for that boundary, regardless of which side. */
243
- &:not(:last-of-type) {
361
+ &:not(:nth-last-of-type(-n + 2)) {
244
362
  z-index: 1;
245
363
  }
246
364
 
@@ -260,7 +378,7 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
260
378
  margin-inline-start: calc(-1 * ${chevronConfig.coarseWidth});
261
379
  }
262
380
 
263
- &:not(:first-of-type)::before {
381
+ &:not(:nth-of-type(-n + 2))::before {
264
382
  ${createChevronPseudo('calc(2 * var(--chevron-border-thickness))', palette['border-line'], chevronConfig.squareSize)}
265
383
  /* Elevate ::before above the button so it renders via the same pathway as ::after.
266
384
  * Without z-index, ::before (first in DOM) is painted first and then covered by the
@@ -272,7 +390,7 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
272
390
  z-index: 1;
273
391
  }
274
392
 
275
- &:not(:last-of-type)::after {
393
+ &:not(:nth-last-of-type(-n + 2))::after {
276
394
  ${createChevronPseudo('calc(2 * var(--chevron-border-thickness))', palette['border-line'], chevronConfig.squareSize)}
277
395
  }
278
396
 
@@ -308,27 +426,27 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
308
426
  }
309
427
 
310
428
  @media (pointer: coarse) {
311
- &:not(:first-of-type)::before,
312
- &:not(:last-of-type)::after {
429
+ &:not(:nth-of-type(-n + 2))::before,
430
+ &:not(:nth-last-of-type(-n + 2))::after {
313
431
  inset-block-start: calc(50% - ${chevronConfig.coarseSquareSize} / 2);
314
432
  width: ${chevronConfig.coarseSquareSize};
315
433
  height: ${chevronConfig.coarseSquareSize};
316
434
  }
317
435
 
318
- &:not(:first-of-type)::before {
436
+ &:not(:nth-of-type(-n + 2))::before {
319
437
  inset-inline-start: calc(
320
438
  -1 * ${chevronConfig.coarseWidth} - ${chevronConfig.coarseOffsetLeft}
321
439
  );
322
440
  }
323
441
 
324
- &:not(:last-of-type)::after {
442
+ &:not(:nth-last-of-type(-n + 2))::after {
325
443
  inset-inline-end: calc(
326
444
  -1 * ${chevronConfig.coarseWidth} + ${chevronConfig.coarseOffsetRight}
327
445
  );
328
446
  }
329
447
  }
330
448
 
331
- &:first-of-type > ${StyledStage} {
449
+ &:nth-of-type(2) > ${StyledStage} {
332
450
  --stage-chevron-width: ${chevronConfig.width};
333
451
  border-start-start-radius: ${borderRadius};
334
452
  border-end-start-radius: ${borderRadius};
@@ -365,25 +483,47 @@ export const StyledStageContainer = styled.li(({ theme: { base: { palette }, com
365
483
  }
366
484
  }
367
485
 
368
- &:last-of-type > ${StyledStage} {
486
+ &:nth-last-of-type(2) > ${StyledStage} {
369
487
  --stage-chevron-width: ${chevronConfig.width};
370
488
  border-start-end-radius: ${borderRadius};
371
489
  border-end-end-radius: ${borderRadius};
372
- border-inline-end-width: calc(2 * var(--chevron-border-thickness));
373
490
  padding-inline-end: 0;
374
491
  width: 100%;
375
492
  ${stageClipPath(true, false)}
376
493
 
494
+ ${!readOnly &&
495
+ css `
496
+ /* Inline-end interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */
497
+ &:hover {
498
+ box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0
499
+ ${palette['border-line']};
500
+
501
+ [dir='rtl'] & {
502
+ box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0
503
+ ${palette['border-line']};
504
+ }
505
+ }
506
+ `}
507
+
508
+ &:focus-visible,
509
+ &:active {
510
+ box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};
511
+
512
+ [dir='rtl'] & {
513
+ box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};
514
+ }
515
+ }
516
+
377
517
  @media (pointer: coarse) {
378
518
  --stage-chevron-width: ${chevronConfig.coarseWidth};
379
519
  }
380
520
  }
381
521
 
382
- [dir='rtl'] &:first-of-type > ${StyledStage} {
522
+ [dir='rtl'] &:nth-of-type(2) > ${StyledStage} {
383
523
  ${stageClipPath(true, false, true)}
384
524
  }
385
525
 
386
- [dir='rtl'] &:last-of-type > ${StyledStage} {
526
+ [dir='rtl'] &:nth-last-of-type(2) > ${StyledStage} {
387
527
  ${stageClipPath(false, true, true)}
388
528
  }
389
529
  `;
@@ -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,\n Text,\n StyledIcon,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\n\nconst stageClipPath = (leftNotch: boolean, rightPoint: boolean, mirrored = false): string => {\n if (mirrored) {\n // RTL: mirror the LTR clip-path polygon\n const points = ['100% 0', '0 0'];\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 0', '0 50%', 'var(--stage-chevron-width) 100%');\n } else {\n points.push('0 100%');\n }\n points.push('100% 100%');\n if (rightPoint) {\n points.push('calc(100% - var(--stage-chevron-width)) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n }\n\n const points = ['0 0', '100% 0'];\n if (rightPoint) {\n points.push(\n 'calc(100% - var(--stage-chevron-width)) 0',\n '100% 50%',\n 'calc(100% - var(--stage-chevron-width)) 100%'\n );\n } else {\n points.push('100% 100%');\n }\n points.push('0 100%');\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n};\n\n// === Chevron Configuration ===\n// Centralizes spacing and border thickness via CSS custom properties set at StyledStages\nconst chevronConfig = {\n width: 'calc(1.156 * var(--chevron-spacing))',\n coarseWidth: 'calc(1.4375 * var(--chevron-spacing))',\n squareSize: 'calc(3 * var(--chevron-spacing))',\n coarseSquareSize: 'calc(3.5 * var(--chevron-spacing))',\n offsetLeft: 'calc(0.688 * var(--chevron-spacing))',\n offsetRight: 'calc(1.156 * var(--chevron-spacing))',\n coarseOffsetLeft: 'calc(0.688 * var(--chevron-spacing))',\n coarseOffsetRight: 'calc(1.5 * var(--chevron-spacing))'\n} as const;\n\n// === Chevron Helpers ===\n// After team discussion we decided to use logical properties throughout — `inset-block-start`\n// instead of `top`, and `border-block-start/end-width` instead of `border-top/bottom-width` —\n// for consistency with the rest of the file (which already uses logical inline-axis properties).\nconst createChevronPseudo = (borderWidth: string, borderColor: string, size: string): string => `\n content: '';\n position: absolute;\n display: block;\n inset-block-start: calc(50% - ${size} / 2);\n width: ${size};\n height: ${size};\n border-style: solid;\n border-color: ${borderColor};\n border-inline-end-width: ${borderWidth};\n border-inline-start-width: 0;\n border-block-start-width: ${borderWidth};\n border-block-end-width: 0;\n transform: rotateZ(45deg) skew(15deg, 15deg);\n pointer-events: none;\n`;\n\nconst createChevronBaseStyles = (config: typeof chevronConfig, borderThicknessVar: string) => css`\n &:not(:first-of-type)::before,\n &:not(:last-of-type)::after {\n border-inline-end-width: calc(1.5 * ${borderThicknessVar});\n border-block-start-width: calc(1.5 * ${borderThicknessVar});\n }\n\n &:not(:first-of-type)::before {\n inset-inline-start: calc(-1 * ${config.width} - ${config.offsetLeft});\n }\n\n &:not(:last-of-type)::after {\n inset-inline-end: calc(-1 * ${config.width} + ${config.offsetRight});\n }\n`;\n\nconst createChevronInteractiveStates = (\n config: typeof chevronConfig,\n borderThicknessVar: string,\n includeHover = true\n) => css`\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n `}\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n`;\n\nexport const StyledStages = styled.ol(({ theme }) => {\n return css`\n --chevron-spacing: ${theme.base.spacing};\n --chevron-border-thickness: ${theme.components.button['border-width']};\n background-color: ${theme.base.palette['primary-background']};\n border-radius: ${theme.components.card['border-radius']};\n display: flex;\n padding: 0;\n width: 100%;\n overflow: hidden;\n list-style: none;\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(props => {\n return css`\n display: inline-block;\n text-align: center;\n white-space: nowrap;\n ${props.ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nStyledInnerStage.defaultProps = defaultThemeProp;\n\nexport const StyledStage = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n}>(\n ({\n theme: {\n base: { palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status,\n readOnly\n }) => {\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n return css`\n background: ${stages.status[status].background};\n color: ${stageForeground};\n outline: none;\n border-color: transparent;\n border-width: calc(2 * var(--chevron-border-thickness)) 0;\n border-style: solid;\n position: relative;\n\n /* Browsers do not reliably apply flex align-items: stretch to <button> elements.\n * Adding 0.0625rem (1px at default font size) to min-height compensates so the button fills its <li> container,\n * keeping the clipped chevron background flush with the top and bottom borders. */\n min-height: calc(4 * var(--chevron-spacing) + 0.0625rem);\n padding-inline-start: calc(2 * var(--chevron-spacing));\n padding-inline-end: var(--chevron-spacing);\n margin-inline-start: 0;\n margin-inline-end: 0;\n width: calc(100% + ${chevronConfig.width});\n --stage-chevron-width: ${chevronConfig.width};\n\n ${StyledIcon}, ${StyledInnerStage} {\n transform: translateX(calc(-0.25 * var(--chevron-spacing)));\n }\n ${stageClipPath(true, true)}\n\n [dir='rtl'] & ${StyledIcon},\n [dir='rtl'] & ${StyledInnerStage} {\n transform: translateX(calc(0.25 * var(--chevron-spacing)));\n }\n\n [dir='rtl'] & {\n ${stageClipPath(true, true, true)}\n }\n\n ${!readOnly &&\n css`\n &:hover {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:focus-visible {\n border-color: ${palette.interactive};\n }\n\n &:active {\n border-color: ${palette.interactive};\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n ${!readOnly &&\n css`\n &:hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n `}\n }\n\n @media (pointer: coarse) {\n min-height: ${hitArea['finger-min']};\n padding-inline-start: calc(2.25 * var(--chevron-spacing));\n width: calc(100% + ${chevronConfig.coarseWidth});\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n\n ${StyledIcon} {\n & ~ ${StyledInnerStage} {\n margin-inline-start: 0.25rem;\n }\n }\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledStageCompleteIcon = styled(Icon)(({\n theme: {\n components: {\n 'case-view': {\n stages: {\n status: {\n completed: { 'foreground-color': foregroundColor, background }\n }\n }\n }\n }\n }\n}) => {\n const stageForeground = calculateForegroundColor(background, foregroundColor);\n return css`\n color: ${stageForeground};\n `;\n});\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\nexport const StyledStageText = styled(Text)<{ isCurrent?: boolean }>(\n ({ theme, isCurrent }) => css`\n font-weight: ${isCurrent ? theme.base['font-weight'].bold : theme.base['font-weight'].normal};\n `\n);\n\nStyledStageText.defaultProps = defaultThemeProp;\n\nexport const StyledStageContainer = styled.li<{\n readOnly?: boolean;\n}>(\n ({\n theme: {\n base: { palette },\n components: {\n card: { 'border-radius': borderRadius }\n }\n },\n readOnly\n }) => {\n return css`\n display: flex;\n position: relative;\n margin-inline-start: calc(-1 * ${chevronConfig.width});\n\n &:first-of-type {\n margin-inline-start: 0;\n }\n\n /* Resting z-index: for same-z siblings, DOM order determines paint order.\n * All non-last <li>s have z-index:1 so the later (right) <li>'s ::before paints on top\n * at internal boundaries; the last <li> has no z-index so its left neighbor's ::after\n * wins at the final boundary. On hover/focus/active, the interacting <li> gains z:2/3\n * and its own pseudo-element surfaces for that boundary, regardless of which side. */\n &:not(:last-of-type) {\n z-index: 1;\n }\n\n &:has(button:focus-visible),\n &:has(button:active) {\n z-index: 2;\n }\n\n ${!readOnly &&\n css`\n &:has(button:hover) {\n z-index: 3;\n }\n `}\n\n @media (pointer: coarse) {\n margin-inline-start: calc(-1 * ${chevronConfig.coarseWidth});\n }\n\n &:not(:first-of-type)::before {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n palette['border-line'],\n chevronConfig.squareSize\n )}\n /* Elevate ::before above the button so it renders via the same pathway as ::after.\n * Without z-index, ::before (first in DOM) is painted first and then covered by the\n * button, making it only partially visible through the clip-path notch window. This\n * causes thicker interactive-state borders (3×) to look thinner on the left boundary\n * than on the right (::after, which paints last and is always fully visible).\n * The ::before tip's rightmost extent is at --stage-chevron-width from the <li> start,\n * which is before the stage text (padding-inline-start: 2 × spacing), so no content overlap. */\n z-index: 1;\n }\n\n &:not(:last-of-type)::after {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n palette['border-line'],\n chevronConfig.squareSize\n )}\n }\n\n /* Chevron positioning: 45° rotated squares create visual tips via offsets:\n * left ≈ 0.688 × spacing, right ≈ 1.15 × spacing (accounts for skew correction) */\n\n [dir='rtl'] &::before,\n [dir='rtl'] &::after {\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n }\n\n /* Thicken chevrons to visually match button top/bottom border on any colored state.\n * At 45° rotation, border appears 1/sin(45°) ≈ 0.707× thinner, so 2× border ≈ 1.4× horizontal border weight. */\n ${createChevronBaseStyles(chevronConfig, 'var(--chevron-border-thickness)')}\n ${createChevronInteractiveStates(chevronConfig, 'var(--chevron-border-thickness)', !readOnly)}\n\n ${!readOnly &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after {\n border-color: ${palette.interactive};\n }\n\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-color: ${palette.interactive};\n }\n\n @media (pointer: coarse) {\n &:not(:first-of-type)::before,\n &:not(:last-of-type)::after {\n inset-block-start: calc(50% - ${chevronConfig.coarseSquareSize} / 2);\n width: ${chevronConfig.coarseSquareSize};\n height: ${chevronConfig.coarseSquareSize};\n }\n\n &:not(:first-of-type)::before {\n inset-inline-start: calc(\n -1 * ${chevronConfig.coarseWidth} - ${chevronConfig.coarseOffsetLeft}\n );\n }\n\n &:not(:last-of-type)::after {\n inset-inline-end: calc(\n -1 * ${chevronConfig.coarseWidth} + ${chevronConfig.coarseOffsetRight}\n );\n }\n }\n\n &:first-of-type > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n padding-inline-start: calc(var(--chevron-spacing));\n ${stageClipPath(false, true)}\n\n ${!readOnly &&\n css`\n /* Inline-start interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n }\n }\n\n &:last-of-type > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n border-inline-end-width: calc(2 * var(--chevron-border-thickness));\n padding-inline-end: 0;\n width: 100%;\n ${stageClipPath(true, false)}\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n [dir='rtl'] &:first-of-type > ${StyledStage} {\n ${stageClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:last-of-type > ${StyledStage} {\n ${stageClipPath(false, true, true)}\n }\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.ol(({ theme }) => {\n return css`\n list-style-type: none;\n margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});\n\n &:empty {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.li<{ completed: boolean }>(({ completed, theme }) => {\n const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;\n\n return css`\n border-radius: 0;\n margin-block-end: calc(${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n\n &:last-child {\n margin-block-end: 0;\n }\n\n & > ${StyledIcon} {\n text-align: center;\n }\n\n div {\n opacity: ${textOpacity};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nexport const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-size: ${fontSize.xs};\n opacity: ${theme.base.transparency['transparent-2']};\n `;\n});\n\nStyledDateTimeDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledStageGlimpse = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n `;\n});\n\nStyledStageGlimpse.defaultProps = defaultThemeProp;\n\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n\nStyledStagesDescription.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Stages.styles.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,wBAAwB,EACzB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,aAAa,GAAG,CAAC,S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,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IACtF,OAAO,GAAG,CAAA;iBACK,QAAQ,CAAC,EAAE;eACb,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC;GACpD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,qBAAqB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEtD,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,OAAO,GAAG,CAAA;iBACK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE;GAC5C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,CAAC,CAAA;;CAE9C,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import styled, { css } from 'styled-components';\nimport { transparentize } from 'polished';\n\nimport {\n calculateFontSize,\n DateTimeDisplay,\n defaultThemeProp,\n Icon,\n Text,\n StyledIcon,\n calculateForegroundColor\n} from '@pega/cosmos-react-core';\n\nconst stageClipPath = (leftNotch: boolean, rightPoint: boolean, mirrored = false): string => {\n if (mirrored) {\n // RTL: mirror the LTR clip-path polygon\n const points = ['100% 0', '0 0'];\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 0', '0 50%', 'var(--stage-chevron-width) 100%');\n } else {\n points.push('0 100%');\n }\n points.push('100% 100%');\n if (rightPoint) {\n points.push('calc(100% - var(--stage-chevron-width)) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n }\n\n const points = ['0 0', '100% 0'];\n if (rightPoint) {\n points.push(\n 'calc(100% - var(--stage-chevron-width)) 0',\n '100% 50%',\n 'calc(100% - var(--stage-chevron-width)) 100%'\n );\n } else {\n points.push('100% 100%');\n }\n points.push('0 100%');\n if (leftNotch) {\n points.push('var(--stage-chevron-width) 50%');\n }\n return `clip-path: polygon(${points.join(', ')});`;\n};\n\n// === Chevron Configuration ===\n// Centralizes spacing and border thickness via CSS custom properties set at StyledStages\nconst chevronConfig = {\n // Horizontal projection of the rotated border-square forming the chevron point (fine pointer).\n // Derived from the border-square size × cos(45° + skew). Tuned to visually align with the stage height.\n width: 'calc(1.156 * var(--chevron-spacing))',\n // Same horizontal projection for coarse/touch pointer (larger square, proportionally wider point).\n coarseWidth: 'calc(1.4375 * var(--chevron-spacing))',\n // Side length of the rotated border-square forming the chevron (fine pointer: 3× base spacing).\n squareSize: 'calc(3 * var(--chevron-spacing))',\n // Side length of the rotated border-square for coarse/touch pointer (4× base spacing).\n coarseSquareSize: 'calc(4 * var(--chevron-spacing))',\n // Distance to inset the ::before notch from the left edge of the stage (fine pointer).\n // 0.688 ≈ width − half-border-overlap, keeps the notch flush with the preceding chevron point.\n offsetLeft: 'calc(0.688 * var(--chevron-spacing))',\n // Distance to inset the ::after point from the right edge of the stage (fine pointer).\n // Equal to `width` so the point extends exactly one chevron-width beyond the stage boundary.\n offsetRight: 'calc(1.156 * var(--chevron-spacing))',\n // Coarse-pointer equivalents of offsetLeft/offsetRight, scaled to match coarseWidth/coarseSquareSize.\n coarseOffsetLeft: 'calc(1.03 * var(--chevron-spacing))',\n coarseOffsetRight: 'calc(1.4375 * var(--chevron-spacing))'\n} as const;\n\n// === Chevron Helpers ===\n// After team discussion we decided to use logical properties throughout — `inset-block-start`\n// instead of `top`, and `border-block-start/end-width` instead of `border-top/bottom-width` —\n// for consistency with the rest of the file (which already uses logical inline-axis properties).\nconst createChevronPseudo = (borderWidth: string, borderColor: string, size: string): string => `\n content: '';\n position: absolute;\n display: block;\n inset-block-start: calc(50% - ${size} / 2);\n width: ${size};\n height: ${size};\n border-style: solid;\n border-color: ${borderColor};\n border-inline-end-width: ${borderWidth};\n border-inline-start-width: 0;\n border-block-start-width: ${borderWidth};\n border-block-end-width: 0;\n transform: rotateZ(45deg) skew(15deg, 15deg);\n pointer-events: none;\n`;\n\nconst createChevronBaseStyles = (config: typeof chevronConfig, borderThicknessVar: string) => css`\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n border-inline-end-width: calc(1.5 * ${borderThicknessVar});\n border-block-start-width: calc(1.5 * ${borderThicknessVar});\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: calc(-1 * ${config.width} - ${config.offsetLeft});\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: calc(-1 * ${config.width} + ${config.offsetRight});\n }\n`;\n\nconst createChevronInteractiveStates = (\n config: typeof chevronConfig,\n borderThicknessVar: string,\n includeHover = true\n) => css`\n ${includeHover &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n `}\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after,\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-inline-end-width: calc(2 * ${borderThicknessVar});\n border-block-start-width: calc(2 * ${borderThicknessVar});\n }\n`;\n\nexport const StyledStagesWrapper = styled.div(({ theme }) => {\n return css`\n --stages-fade-width: calc(${theme.base.spacing} * 2);\n --stages-fade-start: 0;\n --stages-fade-end: 0;\n --stages-scrollbar-reserve: calc(${theme.base.spacing} * 0.25);\n position: relative;\n width: 100%;\n overflow: hidden;\n border-radius: ${theme.components.card['border-radius']};\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent 0,\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent 100%\n );\n mask-size:\n 100% var(--stages-scrollbar-reserve),\n 100% calc(100% - var(--stages-scrollbar-reserve));\n mask-position:\n 0 100%,\n 0 0;\n mask-repeat: no-repeat, no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(black, black),\n linear-gradient(\n to right,\n transparent 0,\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent 100%\n );\n }\n\n &:has(:focus-visible) {\n box-shadow: ${theme.base.shadow['focus-group']};\n }\n\n @media (pointer: coarse) {\n --stages-fade-width: calc(${theme.base.spacing} * 3);\n mask-image: linear-gradient(\n to right,\n transparent 0,\n black var(--stages-fade-start),\n black calc(100% - var(--stages-fade-end)),\n transparent 100%\n );\n mask-size: 100% 100%;\n mask-position: 0 0;\n mask-repeat: no-repeat;\n\n [dir='rtl'] & {\n mask-image: linear-gradient(\n to right,\n transparent 0,\n black var(--stages-fade-end),\n black calc(100% - var(--stages-fade-start)),\n transparent 100%\n );\n }\n }\n `;\n});\n\nStyledStagesWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledStages = styled.ol(({ theme }) => {\n return css`\n --chevron-spacing: ${theme.base.spacing};\n --chevron-border-thickness: ${theme.components.button['border-width']};\n border-radius: ${theme.components.card['border-radius']};\n display: flex;\n padding: 0;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n list-style: none;\n scrollbar-width: thin;\n scrollbar-color: transparent transparent;\n\n &:hover,\n &:focus-within {\n scrollbar-color: var(\n --stages-scrollbar-thumb,\n ${transparentize(0.4, theme.base.palette['border-line'])}\n )\n var(--stages-scrollbar-track, transparent);\n }\n\n &::-webkit-scrollbar {\n height: 0.25rem;\n }\n\n @media (pointer: coarse) {\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n }\n `;\n});\n\nStyledStages.defaultProps = defaultThemeProp;\n\n/**\n * A sentinel is an invisible 1 px <li> placed at each end of the scrollable stage list.\n * It is observed by an IntersectionObserver; when it scrolls out of view, the component sets\n * --stages-fade-start or --stages-fade-end to show a gradient fade indicating more stages\n * are reachable by scrolling. When it comes back into view the property is reset to 0.\n *\n * Sentinel elements carry aria-hidden=\"true\" so they are valid list items semantically.\n * Because styled-components scopes all CSS to a generated class, the chevron and layout rules\n * in StyledStageContainer never apply to these elements — they carry a different class.\n * CSS type-based selectors (:nth-of-type, :nth-last-of-type) in StyledStageContainer are\n * offset by 1 at each end to skip the sentinels and target only real stage items.\n */\nexport const StyledSentinel = styled.li`\n flex-shrink: 0;\n\n /* NOTE: the sentinel must occupy\n a single physical pixel so IntersectionObserver can detect it at threshold 0 while having\n negligible layout impact. A rem value could collapse to zero at small font sizes. */\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n width: 1px;\n /* stylelint-disable-next-line unit-allowed-list -- 1px is intentional */\n height: 1px;\n padding: 0;\n margin: 0;\n pointer-events: none;\n`;\n\nStyledSentinel.defaultProps = defaultThemeProp;\n\nexport const StyledInnerStage = styled.span<{ ellipsis?: boolean }>(({ theme, ellipsis }) => {\n return css`\n display: inline-flex;\n align-items: center;\n gap: calc(0.25 * ${theme.base.spacing});\n text-align: center;\n white-space: nowrap;\n padding-inline-start: calc(0.875 * ${theme.base.spacing});\n padding-inline-end: calc(1.125 * ${theme.base.spacing});\n ${ellipsis &&\n css`\n overflow: hidden;\n text-overflow: ellipsis;\n `}\n `;\n});\n\nStyledInnerStage.defaultProps = defaultThemeProp;\n\nexport const StyledStage = styled.button<{\n status: 'completed' | 'current' | 'pending';\n readOnly?: boolean;\n}>(\n ({\n theme: {\n base: { palette, 'hit-area': hitArea, transparency, 'font-weight': fontWeight },\n components: {\n 'case-view': { stages }\n }\n },\n status,\n readOnly\n }) => {\n const stageForeground = calculateForegroundColor(\n stages.status[status].background,\n stages.status[status]['foreground-color']\n );\n\n return css`\n background: ${stages.status[status].background};\n color: ${stageForeground};\n outline: none;\n border-color: transparent;\n border-width: calc(2 * var(--chevron-border-thickness)) 0;\n border-style: solid;\n position: relative;\n\n /* Browsers do not reliably apply flex align-items: stretch to <button> elements.\n * Adding 0.0625rem (1px at default font size) to min-height compensates so the button fills its <li> container,\n * keeping the clipped chevron background flush with the top and bottom borders. */\n min-height: calc(4 * var(--chevron-spacing) + 0.0625rem);\n padding-inline-start: calc(2 * var(--chevron-spacing));\n padding-inline-end: var(--chevron-spacing);\n margin-inline-start: 0;\n margin-inline-end: 0;\n width: calc(100% + ${chevronConfig.width});\n --stage-chevron-width: ${chevronConfig.width};\n\n ${StyledInnerStage} {\n transform: translateX(calc(-0.25 * var(--chevron-spacing)));\n opacity: ${transparency['transparent-2']};\n }\n ${stageClipPath(true, true)}\n\n [dir='rtl'] & ${StyledInnerStage} {\n transform: translateX(calc(0.25 * var(--chevron-spacing)));\n }\n\n [dir='rtl'] & {\n ${stageClipPath(true, true, true)}\n }\n\n ${!readOnly &&\n css`\n &:hover {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:focus-visible {\n border-color: ${palette.interactive};\n }\n\n &:active {\n border-color: ${palette.interactive};\n\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-3']};\n }\n }\n\n &[aria-current] {\n ${StyledInnerStage} {\n font-weight: ${fontWeight.bold};\n opacity: 1;\n }\n\n ${!readOnly &&\n css`\n &:hover {\n ${StyledInnerStage} {\n opacity: ${transparency['transparent-2']};\n }\n }\n `}\n }\n\n @media (pointer: coarse) {\n min-height: ${hitArea['finger-min']};\n padding-inline-start: calc(2.25 * var(--chevron-spacing));\n width: calc(100% + ${chevronConfig.coarseWidth});\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n `;\n }\n);\n\nStyledStage.defaultProps = defaultThemeProp;\n\nexport const StyledStageCompleteIcon = styled(Icon)(({\n theme: {\n components: {\n 'case-view': {\n stages: {\n status: {\n completed: { 'foreground-color': foregroundColor, background }\n }\n }\n }\n }\n }\n}) => {\n const stageForeground = calculateForegroundColor(background, foregroundColor);\n return css`\n color: ${stageForeground};\n `;\n});\nStyledStageCompleteIcon.defaultProps = defaultThemeProp;\n\nexport const StyledStageText = styled(Text)<{ isCurrent?: boolean }>(\n ({ theme, isCurrent }) => css`\n font-weight: ${isCurrent ? theme.base['font-weight'].bold : theme.base['font-weight'].normal};\n `\n);\n\nStyledStageText.defaultProps = defaultThemeProp;\n\nexport const StyledStageContainer = styled.li<{\n readOnly?: boolean;\n}>(\n ({\n theme: {\n base: { palette },\n components: {\n card: { 'border-radius': borderRadius }\n }\n },\n readOnly\n }) => {\n return css`\n display: flex;\n position: relative;\n margin-inline-start: calc(-1 * ${chevronConfig.width});\n\n &:nth-of-type(2) {\n margin-inline-start: 0;\n }\n\n /* Resting z-index: for same-z siblings, DOM order determines paint order.\n * All non-last <li>s have z-index:1 so the later (right) <li>'s ::before paints on top\n * at internal boundaries; the last <li> has no z-index so its left neighbor's ::after\n * wins at the final boundary. On hover/focus/active, the interacting <li> gains z:2/3\n * and its own pseudo-element surfaces for that boundary, regardless of which side. */\n &:not(:nth-last-of-type(-n + 2)) {\n z-index: 1;\n }\n\n &:has(button:focus-visible),\n &:has(button:active) {\n z-index: 2;\n }\n\n ${!readOnly &&\n css`\n &:has(button:hover) {\n z-index: 3;\n }\n `}\n\n @media (pointer: coarse) {\n margin-inline-start: calc(-1 * ${chevronConfig.coarseWidth});\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n palette['border-line'],\n chevronConfig.squareSize\n )}\n /* Elevate ::before above the button so it renders via the same pathway as ::after.\n * Without z-index, ::before (first in DOM) is painted first and then covered by the\n * button, making it only partially visible through the clip-path notch window. This\n * causes thicker interactive-state borders (3×) to look thinner on the left boundary\n * than on the right (::after, which paints last and is always fully visible).\n * The ::before tip's rightmost extent is at --stage-chevron-width from the <li> start,\n * which is before the stage text (padding-inline-start: 2 × spacing), so no content overlap. */\n z-index: 1;\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n ${createChevronPseudo(\n 'calc(2 * var(--chevron-border-thickness))',\n palette['border-line'],\n chevronConfig.squareSize\n )}\n }\n\n /* Chevron positioning: 45° rotated squares create visual tips via offsets:\n * left ≈ 0.688 × spacing, right ≈ 1.15 × spacing (accounts for skew correction) */\n\n [dir='rtl'] &::before,\n [dir='rtl'] &::after {\n transform: rotateZ(-45deg) skew(-15deg, -15deg);\n }\n\n /* Thicken chevrons to visually match button top/bottom border on any colored state.\n * At 45° rotation, border appears 1/sin(45°) ≈ 0.707× thinner, so 2× border ≈ 1.4× horizontal border weight. */\n ${createChevronBaseStyles(chevronConfig, 'var(--chevron-border-thickness)')}\n ${createChevronInteractiveStates(chevronConfig, 'var(--chevron-border-thickness)', !readOnly)}\n\n ${!readOnly &&\n css`\n &:has(button:hover)::before,\n &:has(button:hover)::after {\n border-color: ${palette['border-line']};\n }\n `}\n\n &:has(button:focus-visible)::before,\n &:has(button:focus-visible)::after {\n border-color: ${palette.interactive};\n }\n\n &:has(button:active)::before,\n &:has(button:active)::after {\n border-color: ${palette.interactive};\n }\n\n @media (pointer: coarse) {\n &:not(:nth-of-type(-n + 2))::before,\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-block-start: calc(50% - ${chevronConfig.coarseSquareSize} / 2);\n width: ${chevronConfig.coarseSquareSize};\n height: ${chevronConfig.coarseSquareSize};\n }\n\n &:not(:nth-of-type(-n + 2))::before {\n inset-inline-start: calc(\n -1 * ${chevronConfig.coarseWidth} - ${chevronConfig.coarseOffsetLeft}\n );\n }\n\n &:not(:nth-last-of-type(-n + 2))::after {\n inset-inline-end: calc(\n -1 * ${chevronConfig.coarseWidth} + ${chevronConfig.coarseOffsetRight}\n );\n }\n }\n\n &:nth-of-type(2) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n border-start-start-radius: ${borderRadius};\n border-end-start-radius: ${borderRadius};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n padding-inline-start: calc(var(--chevron-spacing));\n ${stageClipPath(false, true)}\n\n ${!readOnly &&\n css`\n /* Inline-start interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n width: calc(100% + (2 * var(--stage-chevron-width)));\n }\n }\n\n &:nth-last-of-type(2) > ${StyledStage} {\n --stage-chevron-width: ${chevronConfig.width};\n border-start-end-radius: ${borderRadius};\n border-end-end-radius: ${borderRadius};\n padding-inline-end: 0;\n width: 100%;\n ${stageClipPath(true, false)}\n\n ${!readOnly &&\n css`\n /* Inline-end interactive indicator via inset shadow — avoids border-color bleeding through gradient backgrounds */\n &:hover {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0\n ${palette['border-line']};\n }\n }\n `}\n\n &:focus-visible,\n &:active {\n box-shadow: inset calc(-2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n\n [dir='rtl'] & {\n box-shadow: inset calc(2 * var(--chevron-border-thickness)) 0 0 ${palette.interactive};\n }\n }\n\n @media (pointer: coarse) {\n --stage-chevron-width: ${chevronConfig.coarseWidth};\n }\n }\n\n [dir='rtl'] &:nth-of-type(2) > ${StyledStage} {\n ${stageClipPath(true, false, true)}\n }\n\n [dir='rtl'] &:nth-last-of-type(2) > ${StyledStage} {\n ${stageClipPath(false, true, true)}\n }\n `;\n }\n);\n\nStyledStageContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStepsContainer = styled.ol(({ theme }) => {\n return css`\n list-style-type: none;\n margin: calc(2 * ${theme.base.spacing}) 0 calc(3 * ${theme.base.spacing});\n\n &:empty {\n margin-block-end: 0;\n }\n `;\n});\n\nStyledStepsContainer.defaultProps = defaultThemeProp;\n\nexport const StyledStep = styled.li<{ completed: boolean }>(({ completed, theme }) => {\n const textOpacity = completed ? theme.base.transparency['transparent-2'] : 1;\n\n return css`\n border-radius: 0;\n margin-block-end: calc(${theme.base.spacing});\n color: ${theme.base.palette['foreground-color']};\n\n &:last-child {\n margin-block-end: 0;\n }\n\n & > ${StyledIcon} {\n text-align: center;\n }\n\n div {\n opacity: ${textOpacity};\n }\n `;\n});\n\nStyledStep.defaultProps = defaultThemeProp;\n\nexport const StyledDateTimeDisplay = styled(DateTimeDisplay)(({ theme }) => {\n const fontSize = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);\n return css`\n font-size: ${fontSize.xs};\n opacity: ${theme.base.transparency['transparent-2']};\n `;\n});\n\nStyledDateTimeDisplay.defaultProps = defaultThemeProp;\n\nexport const StyledStageGlimpse = styled.div(({ theme }) => {\n return css`\n max-width: ${theme.base['content-width'].sm};\n `;\n});\n\nStyledStageGlimpse.defaultProps = defaultThemeProp;\n\nexport const StyledStagesDescription = styled.p`\n display: none;\n`;\n\nStyledStagesDescription.defaultProps = defaultThemeProp;\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const getStagesTestIds: (testIdProp?: import("@pega/cosmos-react-core").TestIdProp["testId"]) => import("@pega/cosmos-react-core").TestIdsRecord<readonly []>;
2
+ //# sourceMappingURL=Stages.test-ids.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.test-ids.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.test-ids.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,uIAAuC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createTestIds } from '@pega/cosmos-react-core';
2
+ export const getStagesTestIds = createTestIds('stages', []);
3
+ //# sourceMappingURL=Stages.test-ids.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stages.test-ids.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.test-ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC,QAAQ,EAAE,EAAW,CAAC,CAAC","sourcesContent":["import { createTestIds } from '@pega/cosmos-react-core';\n\nexport const getStagesTestIds = createTestIds('stages', [] as const);\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode, Ref } from 'react';
2
- import type { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';
2
+ import type { BaseProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';
3
3
  export interface StepProps {
4
4
  /** Step name - either text or link. */
5
5
  name: ReactNode;
@@ -20,7 +20,7 @@ export interface StageProps {
20
20
  /** Steps data defined in this stage. The stage is treated as not loaded if undefined. */
21
21
  steps?: StepProps[];
22
22
  }
23
- export interface StagesProps extends BaseProps, NoChildrenProp {
23
+ export interface StagesProps extends BaseProps, NoChildrenProp, TestIdProp {
24
24
  /** List of objects describing each stage and their state. */
25
25
  stages: StageProps[];
26
26
  /** Current stage id. */
@@ -38,7 +38,7 @@ export interface StagesProps extends BaseProps, NoChildrenProp {
38
38
  */
39
39
  readOnly?: boolean;
40
40
  /** Ref to the stages container. */
41
- ref?: Ref<HTMLDivElement>;
41
+ ref?: Ref<HTMLOListElement>;
42
42
  }
43
43
  export type StageStatus = 'completed' | 'current' | 'pending';
44
44
  //# sourceMappingURL=Stages.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,UAAU;IACzB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,wEAAwE;IACxE,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9B,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,cAAc;IAC5D,6DAA6D;IAC7D,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"Stages.types.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/Stages.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErF,MAAM,WAAW,SAAS;IACxB,uCAAuC;IACvC,IAAI,EAAE,SAAS,CAAC;IAChB,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,UAAU;IACzB,kBAAkB;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,wEAAwE;IACxE,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9B,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,yFAAyF;IACzF,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IACxE,6DAA6D;IAC7D,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,wBAAwB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC;IACnD;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Stages.types.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp } from '@pega/cosmos-react-core';\n\nexport interface StepProps {\n /** Step name - either text or link. */\n name: ReactNode;\n /** Flag determining whether step has been completed. */\n completed: boolean;\n /** Unique step identifier. */\n id: string;\n}\n\nexport interface StageProps {\n /** Stage name. */\n name: string;\n /** Unique identifier. */\n id: string;\n /** Date of completion. Accepts date object, ISO string or timestamp. */\n date?: Date | string | number;\n /** Flag determining whether the stage is completed. */\n completed: boolean;\n /** Steps data defined in this stage. The stage is treated as not loaded if undefined. */\n steps?: StepProps[];\n}\n\nexport interface StagesProps extends BaseProps, NoChildrenProp {\n /** List of objects describing each stage and their state. */\n stages: StageProps[];\n /** Current stage id. */\n current: string;\n /** Case title (label) */\n caseTitle?: string;\n /**\n * Callback invoked when stage details are requested to show.\n * @param stages stages' ids requested to load details for.\n */\n onLoadStage?: (stages: StageProps['id'][]) => void;\n /**\n * Render stages in read-only mode.\n * @default false\n */\n readOnly?: boolean;\n /** Ref to the stages container. */\n ref?: Ref<HTMLDivElement>;\n}\n\nexport type StageStatus = 'completed' | 'current' | 'pending';\n"]}
1
+ {"version":3,"file":"Stages.types.js","sourceRoot":"","sources":["../../../src/components/Stages/Stages.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, Ref } from 'react';\n\nimport type { BaseProps, NoChildrenProp, TestIdProp } from '@pega/cosmos-react-core';\n\nexport interface StepProps {\n /** Step name - either text or link. */\n name: ReactNode;\n /** Flag determining whether step has been completed. */\n completed: boolean;\n /** Unique step identifier. */\n id: string;\n}\n\nexport interface StageProps {\n /** Stage name. */\n name: string;\n /** Unique identifier. */\n id: string;\n /** Date of completion. Accepts date object, ISO string or timestamp. */\n date?: Date | string | number;\n /** Flag determining whether the stage is completed. */\n completed: boolean;\n /** Steps data defined in this stage. The stage is treated as not loaded if undefined. */\n steps?: StepProps[];\n}\n\nexport interface StagesProps extends BaseProps, NoChildrenProp, TestIdProp {\n /** List of objects describing each stage and their state. */\n stages: StageProps[];\n /** Current stage id. */\n current: string;\n /** Case title (label) */\n caseTitle?: string;\n /**\n * Callback invoked when stage details are requested to show.\n * @param stages stages' ids requested to load details for.\n */\n onLoadStage?: (stages: StageProps['id'][]) => void;\n /**\n * Render stages in read-only mode.\n * @default false\n */\n readOnly?: boolean;\n /** Ref to the stages container. */\n ref?: Ref<HTMLOListElement>;\n}\n\nexport type StageStatus = 'completed' | 'current' | 'pending';\n"]}
@@ -1,3 +1,4 @@
1
1
  export { default } from './Stages';
2
2
  export type { StagesProps } from './Stages.types';
3
+ export { getStagesTestIds } from './Stages.test-ids';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export { default } from './Stages';
2
+ export { getStagesTestIds } from './Stages.test-ids';
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Stages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { default } from './Stages';\nexport type { StagesProps } from './Stages.types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Stages/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { default } from './Stages';\nexport type { StagesProps } from './Stages.types';\nexport { getStagesTestIds } from './Stages.test-ids';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-work",
3
- "version": "10.0.0-build.1.11",
3
+ "version": "10.0.0-build.1.13",
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.1.11",
18
- "@pega/cosmos-react-rte": "10.0.0-build.1.11",
17
+ "@pega/cosmos-react-core": "10.0.0-build.1.13",
18
+ "@pega/cosmos-react-rte": "10.0.0-build.1.13",
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",