@pega/cosmos-react-work 9.9.0 → 9.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/GenAICoach/GenAICoach.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.js +171 -29
- package/lib/components/GenAICoach/GenAICoach.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts +216 -9
- package/lib/components/GenAICoach/GenAICoach.styles.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.styles.js +148 -57
- package/lib/components/GenAICoach/GenAICoach.styles.js.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.d.ts +14 -2
- package/lib/components/GenAICoach/GenAICoach.types.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAICoach.types.js.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.d.ts.map +1 -1
- package/lib/components/GenAICoach/GenAIMessage.js +35 -17
- package/lib/components/GenAICoach/GenAIMessage.js.map +1 -1
- package/lib/components/SearchResults/SearchResults.d.ts.map +1 -1
- package/lib/components/SearchResults/SearchResults.js +4 -2
- package/lib/components/SearchResults/SearchResults.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled, { createGlobalStyle, css } from 'styled-components';
|
|
1
|
+
import styled, { createGlobalStyle, css, keyframes } from 'styled-components';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { mix, darken, meetsContrastGuidelines, transparentize } from 'polished';
|
|
4
4
|
import { AppShellContext, Button, FileList, Flex, FormControl, Icon, Image, MenuButton, InfoDialog, StyledEmptyState, StyledErrorState, StyledIcon, StyledText, SummaryItem, Text, TextArea, calculateFontSize, calculateForegroundColor, defaultThemeProp, isSolidColor, tryCatch, Avatar, Fullscreen, animations, Modal, StyledIconShape } from '@pega/cosmos-react-core';
|
|
@@ -18,7 +18,6 @@ import { StepMarker, StyledStepText } from '@pega/cosmos-react-core/lib/componen
|
|
|
18
18
|
import { StyledResizeHandle } from '@pega/cosmos-react-core/lib/components/Drawer/ResizeHandle';
|
|
19
19
|
import { StyledStages } from '../Stages/Stages.styles';
|
|
20
20
|
import { isInUtilities } from './GenAICoach.utils';
|
|
21
|
-
const maxWidthMessage = '62.5rem';
|
|
22
21
|
export const StyledComposerSection = styled.div ``;
|
|
23
22
|
export const StyledGenAIFormControl = styled(FormControl)(({ theme, focused }) => {
|
|
24
23
|
return css `
|
|
@@ -84,7 +83,14 @@ StyledMessagesContainer.defaultProps = defaultThemeProp;
|
|
|
84
83
|
export const StyledFullscreenWrapper = styled(Fullscreen) `
|
|
85
84
|
height: 100%;
|
|
86
85
|
`;
|
|
87
|
-
export const
|
|
86
|
+
export const StyledHeaderContainer = styled(Flex)(({ theme }) => {
|
|
87
|
+
return css `
|
|
88
|
+
border-block-end: 0.0625rem solid
|
|
89
|
+
${transparentize(0.88, theme.components.agent['foreground-color'])};
|
|
90
|
+
`;
|
|
91
|
+
});
|
|
92
|
+
StyledHeaderContainer.defaultProps = defaultThemeProp;
|
|
93
|
+
export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette, 'z-index': zIndex, spacing, breakpoints, animation, 'border-radius': baseBorderRadius }, components: { card: { 'border-radius': cardBorderRadius }, agent: { background: agentBackground, 'foreground-color': agentForegroundColor }, 'form-control': { 'border-radius': formControlBorderRadius } } }, variant, fullScreen, isCompact, isPortalAgent, simplifiedAgent }) => {
|
|
88
94
|
const { previewActive } = useContext(AppShellContext);
|
|
89
95
|
const foregroundColorForAgent = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
90
96
|
return css `
|
|
@@ -93,6 +99,14 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
93
99
|
min-width: var(--utilities-drawer-min-width);
|
|
94
100
|
border-radius: ${cardBorderRadius};
|
|
95
101
|
transition: height ${animation.speed} ${animation.timing.ease};
|
|
102
|
+
${simplifiedAgent
|
|
103
|
+
? css `
|
|
104
|
+
--message-container-width: 40rem;
|
|
105
|
+
--messages-list-margin-start: 0;
|
|
106
|
+
`
|
|
107
|
+
: css `
|
|
108
|
+
--message-container-width: 62.5rem;
|
|
109
|
+
`}
|
|
96
110
|
|
|
97
111
|
${variant.placement === 'dialog' &&
|
|
98
112
|
css `
|
|
@@ -140,13 +154,22 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
140
154
|
|
|
141
155
|
${variant.placement === 'fullpage' &&
|
|
142
156
|
css `
|
|
143
|
-
|
|
157
|
+
${simplifiedAgent
|
|
158
|
+
? css `
|
|
159
|
+
transition: height 0.6s cubic-bezier(0.4, 0, 0.6, 1);
|
|
160
|
+
height: var(--content-height-in-agent, var(--content-height-in-view, 100vh));
|
|
161
|
+
`
|
|
162
|
+
: css `
|
|
163
|
+
height: var(--content-height-in-view, 100vh);
|
|
164
|
+
`}
|
|
144
165
|
`}
|
|
145
166
|
|
|
146
167
|
${isCompact &&
|
|
147
168
|
css `
|
|
148
|
-
height: 100
|
|
149
|
-
max-height:
|
|
169
|
+
height: ${simplifiedAgent ? 'var(--compact-height, auto)' : '100%'};
|
|
170
|
+
max-height: ${simplifiedAgent
|
|
171
|
+
? 'var(--content-height-in-agent, var(--content-height-in-view, 100vh))'
|
|
172
|
+
: 'var(--content-height-in-view, 100vh)'};
|
|
150
173
|
|
|
151
174
|
${StyledMessagesContainer} {
|
|
152
175
|
margin-block-end: 0;
|
|
@@ -164,10 +187,16 @@ export const StyledGenAICoachContainer = styled.div(({ theme: { base: { palette,
|
|
|
164
187
|
height: calc(100vh - var(--appshell-offset, 0vh));
|
|
165
188
|
border-radius: 0;
|
|
166
189
|
`}
|
|
190
|
+
|
|
191
|
+
${StyledErrorState} {
|
|
192
|
+
${StyledText} {
|
|
193
|
+
color: ${agentForegroundColor};
|
|
194
|
+
}
|
|
195
|
+
}
|
|
167
196
|
`;
|
|
168
197
|
});
|
|
169
198
|
StyledGenAICoachContainer.defaultProps = defaultThemeProp;
|
|
170
|
-
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
199
|
+
export const StyledGenAIOptionsMenu = styled(MenuButton)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { ai } } } }) => {
|
|
171
200
|
const { l } = calculateFontSize(fontSize, fontScale);
|
|
172
201
|
return css `
|
|
173
202
|
color: inherit;
|
|
@@ -213,11 +242,17 @@ export const StyledDisclaimerText = styled(Text)(({ inFullPage, theme: { base: {
|
|
|
213
242
|
`;
|
|
214
243
|
});
|
|
215
244
|
StyledDisclaimerText.defaultProps = defaultThemeProp;
|
|
216
|
-
export const StyledFlexWrapper = styled.div `
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
245
|
+
export const StyledFlexWrapper = styled.div(({ isExpanded }) => css `
|
|
246
|
+
height: ${isExpanded ? 'auto' : '100%'};
|
|
247
|
+
overflow-y: auto;
|
|
248
|
+
position: relative;
|
|
249
|
+
|
|
250
|
+
${isExpanded &&
|
|
251
|
+
css `
|
|
252
|
+
flex: 1 1 0;
|
|
253
|
+
min-height: 0;
|
|
254
|
+
`}
|
|
255
|
+
`);
|
|
221
256
|
StyledFlexWrapper.defaultProps = defaultThemeProp;
|
|
222
257
|
export const StyledGridContainer = styled.div(({ theme: { base }, conversationHistory }) => {
|
|
223
258
|
return css `
|
|
@@ -235,11 +270,23 @@ export const StyledInitialMessageContainer = styled.div(() => {
|
|
|
235
270
|
return css `
|
|
236
271
|
${StyledFormField} {
|
|
237
272
|
width: 100%;
|
|
238
|
-
max-width:
|
|
273
|
+
max-width: var(--message-container-width);
|
|
239
274
|
}
|
|
240
275
|
`;
|
|
241
276
|
});
|
|
242
277
|
StyledInitialMessageContainer.defaultProps = defaultThemeProp;
|
|
278
|
+
export const StyledBannerSalutationBlock = styled.div(({ isExpanded }) => css `
|
|
279
|
+
transition:
|
|
280
|
+
opacity 0.45s ease,
|
|
281
|
+
transform 0.45s ease;
|
|
282
|
+
${isExpanded &&
|
|
283
|
+
css `
|
|
284
|
+
opacity: 0;
|
|
285
|
+
transform: translateY(-1.5rem);
|
|
286
|
+
pointer-events: none;
|
|
287
|
+
`}
|
|
288
|
+
`);
|
|
289
|
+
StyledBannerSalutationBlock.defaultProps = defaultThemeProp;
|
|
243
290
|
export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } } }) => {
|
|
244
291
|
return css `
|
|
245
292
|
margin-block-end: ${spacing};
|
|
@@ -248,7 +295,7 @@ export const StyledInputContainer = styled(Flex)(({ theme: { base: { spacing } }
|
|
|
248
295
|
|
|
249
296
|
${StyledFormField}, ${StyledComposerSection} {
|
|
250
297
|
width: 100%;
|
|
251
|
-
max-width:
|
|
298
|
+
max-width: var(--message-container-width);
|
|
252
299
|
}
|
|
253
300
|
`;
|
|
254
301
|
});
|
|
@@ -293,13 +340,18 @@ export const StyledSuggestionsContainer = styled.div(({ theme: { base: { spacing
|
|
|
293
340
|
`;
|
|
294
341
|
});
|
|
295
342
|
StyledSuggestionsContainer.defaultProps = defaultThemeProp;
|
|
296
|
-
export const StyledMessage = styled.p(({ theme }) => {
|
|
343
|
+
export const StyledMessage = styled.p(({ theme, simplified }) => {
|
|
297
344
|
return css `
|
|
298
345
|
margin-block-start: calc(0.5 * ${theme.base.spacing});
|
|
299
346
|
width: 100%;
|
|
300
347
|
min-width: 0;
|
|
301
348
|
overflow-wrap: break-word;
|
|
302
349
|
|
|
350
|
+
${simplified &&
|
|
351
|
+
css `
|
|
352
|
+
padding-inline-start: calc(2.5rem + ${theme.base.spacing});
|
|
353
|
+
`}
|
|
354
|
+
|
|
303
355
|
${StyledEditorContainer} {
|
|
304
356
|
padding: 0;
|
|
305
357
|
|
|
@@ -310,6 +362,14 @@ export const StyledMessage = styled.p(({ theme }) => {
|
|
|
310
362
|
`;
|
|
311
363
|
});
|
|
312
364
|
StyledMessage.defaultProps = defaultThemeProp;
|
|
365
|
+
export const StyledMessageSender = styled(Text)(({ theme: { base: { 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight } } }) => {
|
|
366
|
+
return css `
|
|
367
|
+
font-size: ${calculateFontSize(fontSize, fontScale).xl};
|
|
368
|
+
font-weight: ${fontWeight['semi-bold']};
|
|
369
|
+
opacity: 0.7;
|
|
370
|
+
`;
|
|
371
|
+
});
|
|
372
|
+
StyledMessageSender.defaultProps = defaultThemeProp;
|
|
313
373
|
export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius': borderRadius, spacing }, components: { agent: { 'user-message': { background: userMessageBackground, 'foreground-color': userMessageForegroundColor } } } } }) => {
|
|
314
374
|
const foregroundColorForUserMessage = calculateForegroundColor(userMessageBackground, userMessageForegroundColor);
|
|
315
375
|
return css `
|
|
@@ -326,15 +386,16 @@ export const StyledUserMessage = styled.li(({ theme: { base: { 'border-radius':
|
|
|
326
386
|
`;
|
|
327
387
|
});
|
|
328
388
|
StyledUserMessage.defaultProps = defaultThemeProp;
|
|
329
|
-
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight,
|
|
389
|
+
export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacing, 'font-size': fontSize, 'font-scale': fontScale, 'font-weight': fontWeight }, components: { agent: { 'foreground-color': agentForegroundColor, background: agentBackground } } } }) => {
|
|
330
390
|
const systemFontSize = calculateFontSize(fontSize, fontScale).xs;
|
|
391
|
+
const foregroundColorForSystemMessage = calculateForegroundColor(agentBackground, agentForegroundColor);
|
|
331
392
|
return css `
|
|
332
393
|
display: flex;
|
|
333
394
|
align-items: center;
|
|
334
395
|
gap: ${spacing};
|
|
335
396
|
overflow-wrap: break-word;
|
|
336
397
|
font-size: ${systemFontSize};
|
|
337
|
-
color: ${
|
|
398
|
+
color: ${foregroundColorForSystemMessage};
|
|
338
399
|
opacity: 0.7;
|
|
339
400
|
margin-block: calc(2 * ${spacing});
|
|
340
401
|
${stopped &&
|
|
@@ -346,20 +407,20 @@ export const StyledSystemMessage = styled.li(({ stopped, theme: { base: { spacin
|
|
|
346
407
|
&::after {
|
|
347
408
|
content: '';
|
|
348
409
|
flex: 1;
|
|
349
|
-
border-block-start: 0.0625rem solid ${
|
|
410
|
+
border-block-start: 0.0625rem solid ${foregroundColorForSystemMessage};
|
|
350
411
|
opacity: 0.7;
|
|
351
412
|
}
|
|
352
413
|
`;
|
|
353
414
|
});
|
|
354
415
|
StyledSystemMessage.defaultProps = defaultThemeProp;
|
|
355
|
-
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } } }) => {
|
|
416
|
+
export const StyledMessagesList = styled.ul(({ theme: { base: { shadow, spacing } }, simplified }) => {
|
|
356
417
|
return css `
|
|
357
|
-
padding-block-start: ${spacing};
|
|
418
|
+
padding-block-start: ${simplified ? `calc(4 * ${spacing})` : spacing};
|
|
358
419
|
list-style-type: none;
|
|
359
420
|
align-self: center;
|
|
360
|
-
max-width:
|
|
421
|
+
max-width: var(--message-container-width);
|
|
361
422
|
width: 100%;
|
|
362
|
-
margin-block-start: auto;
|
|
423
|
+
margin-block-start: var(--messages-list-margin-start, auto);
|
|
363
424
|
min-height: var(--stream-buffer, auto);
|
|
364
425
|
|
|
365
426
|
& > li {
|
|
@@ -427,7 +488,7 @@ export const StyledInnerList = styled.ul(({ theme }) => css `
|
|
|
427
488
|
`);
|
|
428
489
|
StyledInnerList.defaultProps = defaultThemeProp;
|
|
429
490
|
export const StyledHistorySummaryListItem = styled(SummaryItem)(({ theme }) => {
|
|
430
|
-
const hoverColor = tryCatch(() => mix(0.95, theme.
|
|
491
|
+
const hoverColor = tryCatch(() => mix(0.95, theme.components.agent.history.background, theme.base.palette.interactive));
|
|
431
492
|
return css `
|
|
432
493
|
padding-inline: calc(2 * ${theme.base.spacing});
|
|
433
494
|
padding-block: ${theme.base.spacing};
|
|
@@ -480,7 +541,7 @@ export const StyledAttachmentsList = styled(FileList)(({ theme }) => {
|
|
|
480
541
|
StyledAttachmentsList.defaultProps = defaultThemeProp;
|
|
481
542
|
export const StyledGuidedSuggestions = styled(MenuButton) `
|
|
482
543
|
width: 100%;
|
|
483
|
-
max-width:
|
|
544
|
+
max-width: var(--message-container-width);
|
|
484
545
|
> span {
|
|
485
546
|
justify-content: center;
|
|
486
547
|
}
|
|
@@ -490,7 +551,7 @@ export const StyledAgentIcon = styled.svg `
|
|
|
490
551
|
height: 3rem;
|
|
491
552
|
`;
|
|
492
553
|
StyledAgentIcon.defaultProps = defaultThemeProp;
|
|
493
|
-
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } }) => {
|
|
554
|
+
export const StyledGenAITextArea = styled(TextArea)(({ theme: { components, base }, simplified }) => {
|
|
494
555
|
return css `
|
|
495
556
|
border: none;
|
|
496
557
|
box-shadow: none;
|
|
@@ -498,6 +559,10 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
498
559
|
max-height: 6rem;
|
|
499
560
|
overflow-y: auto;
|
|
500
561
|
padding-block-end: 0;
|
|
562
|
+
${simplified &&
|
|
563
|
+
css `
|
|
564
|
+
padding: calc(2 * ${base.spacing});
|
|
565
|
+
`}
|
|
501
566
|
&:focus:not([disabled]) {
|
|
502
567
|
border: none;
|
|
503
568
|
box-shadow: none;
|
|
@@ -506,22 +571,24 @@ export const StyledGenAITextArea = styled(TextArea)(({ theme: { components } })
|
|
|
506
571
|
`;
|
|
507
572
|
});
|
|
508
573
|
StyledGenAITextArea.defaultProps = defaultThemeProp;
|
|
509
|
-
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
574
|
+
export const StyledSendButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
575
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
510
576
|
return css `
|
|
511
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
577
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
512
578
|
margin-inline-start: auto;
|
|
513
579
|
`;
|
|
514
580
|
});
|
|
515
581
|
StyledSendButton.defaultProps = defaultThemeProp;
|
|
516
|
-
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } } }) => {
|
|
582
|
+
export const StyledStopGeneratingButton = styled(Button)(({ theme: { base: { 'border-radius': baseBorderRadius }, components: { 'form-control': { 'border-radius': formControlBorderRadius } } }, simplified }) => {
|
|
583
|
+
const radiusMultiplier = simplified ? 0.5 : 1;
|
|
517
584
|
return css `
|
|
518
|
-
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius});
|
|
585
|
+
border-radius: calc(${baseBorderRadius} * ${formControlBorderRadius} * ${radiusMultiplier});
|
|
519
586
|
margin-inline-start: auto;
|
|
520
587
|
`;
|
|
521
588
|
});
|
|
522
589
|
StyledStopGeneratingButton.defaultProps = defaultThemeProp;
|
|
523
590
|
export const StyledInitialMessageGrid = styled.div `
|
|
524
|
-
max-width:
|
|
591
|
+
max-width: var(--message-container-width);
|
|
525
592
|
width: 100%;
|
|
526
593
|
`;
|
|
527
594
|
export const StyledInitialMessageButton = styled(Button)(({ theme: { base: { spacing } } }) => {
|
|
@@ -542,15 +609,16 @@ StyledInitialMessageButton.defaultProps = defaultThemeProp;
|
|
|
542
609
|
export const StyledInitialMessageText = styled.span `
|
|
543
610
|
${lineClamp(3)};
|
|
544
611
|
`;
|
|
545
|
-
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground } } } } } }) => {
|
|
612
|
+
export const StyledGenAIAvatar = styled(Avatar)(({ theme: { components: { agent: { 'coach-message': { avatar: { background: avatarBackground, 'foreground-color': avatarForegroundColor } } } } } }) => {
|
|
546
613
|
return css `
|
|
547
614
|
background: ${avatarBackground};
|
|
615
|
+
color: ${avatarForegroundColor};
|
|
548
616
|
`;
|
|
549
617
|
});
|
|
550
618
|
StyledGenAIAvatar.defaultProps = defaultThemeProp;
|
|
551
619
|
export const StyledGenAIFooter = styled.div `
|
|
552
620
|
width: 100%;
|
|
553
|
-
max-width:
|
|
621
|
+
max-width: var(--message-container-width);
|
|
554
622
|
`;
|
|
555
623
|
export const StyledToolMessage = styled.p(({ theme: { base: { spacing, palette: { 'border-line': borderLine } } } }) => {
|
|
556
624
|
return css `
|
|
@@ -593,41 +661,52 @@ export const StyledScrollButton = styled(Button)(({ theme }) => {
|
|
|
593
661
|
});
|
|
594
662
|
StyledScrollButton.defaultProps = defaultThemeProp;
|
|
595
663
|
export const ProgressAngleStyle = createGlobalStyle `
|
|
596
|
-
@property --angle {
|
|
664
|
+
@property --progress-border-angle {
|
|
597
665
|
syntax: "<angle>";
|
|
598
|
-
inherits:
|
|
666
|
+
inherits: false;
|
|
599
667
|
initial-value: 0deg;
|
|
600
668
|
}
|
|
601
669
|
`;
|
|
670
|
+
const progressBorderSpin = keyframes `
|
|
671
|
+
to { --progress-border-angle: 360deg; }
|
|
672
|
+
`;
|
|
602
673
|
export const StyledProgressContainer = styled.div(({ theme }) => {
|
|
603
|
-
const aiColor = isSolidColor(theme.
|
|
604
|
-
? theme.
|
|
674
|
+
const aiColor = isSolidColor(theme.components.agent.ai)
|
|
675
|
+
? theme.components.agent.ai
|
|
605
676
|
: theme.base.colors.purple.dark;
|
|
606
677
|
const aiTransparent = transparentize(0.85, aiColor);
|
|
678
|
+
const borderWidth = '0.0625rem';
|
|
607
679
|
return css `
|
|
608
680
|
position: relative;
|
|
609
|
-
isolation: isolate;
|
|
610
681
|
border-radius: calc(2 * ${theme.base.spacing});
|
|
611
682
|
border-start-start-radius: calc(0.5 * ${theme.base.spacing});
|
|
612
|
-
border: calc(0.125 * ${theme.base.spacing}) solid transparent;
|
|
613
|
-
background:
|
|
614
|
-
linear-gradient(${aiTransparent} 0 0) padding-box,
|
|
615
|
-
conic-gradient(
|
|
616
|
-
from var(--angle) in oklab,
|
|
617
|
-
${aiTransparent} 0%,
|
|
618
|
-
${aiTransparent} 10%,
|
|
619
|
-
${aiColor} 50%,
|
|
620
|
-
${aiTransparent} 90%,
|
|
621
|
-
${aiTransparent} 100%
|
|
622
|
-
)
|
|
623
|
-
border-box;
|
|
624
|
-
animation: spin 1s ease-in-out infinite;
|
|
625
683
|
width: fit-content;
|
|
626
684
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
}
|
|
685
|
+
&::before {
|
|
686
|
+
content: '';
|
|
687
|
+
position: absolute;
|
|
688
|
+
inset: -${borderWidth};
|
|
689
|
+
border-radius: calc(1.875 * ${theme.base.spacing} + ${borderWidth});
|
|
690
|
+
border-start-start-radius: calc(0.375 * ${theme.base.spacing} + ${borderWidth});
|
|
691
|
+
padding: ${borderWidth};
|
|
692
|
+
background: conic-gradient(
|
|
693
|
+
from var(--progress-border-angle, 0deg) in oklab,
|
|
694
|
+
${aiTransparent} 0%,
|
|
695
|
+
${aiTransparent} 10%,
|
|
696
|
+
${aiColor} 50%,
|
|
697
|
+
${aiTransparent} 90%,
|
|
698
|
+
${aiTransparent} 100%
|
|
699
|
+
);
|
|
700
|
+
-webkit-mask:
|
|
701
|
+
linear-gradient(#000000 0 0) content-box,
|
|
702
|
+
linear-gradient(#000000 0 0);
|
|
703
|
+
-webkit-mask-composite: xor;
|
|
704
|
+
mask:
|
|
705
|
+
linear-gradient(#000000 0 0) content-box,
|
|
706
|
+
linear-gradient(#000000 0 0);
|
|
707
|
+
mask-composite: exclude;
|
|
708
|
+
pointer-events: none;
|
|
709
|
+
animation: ${progressBorderSpin} 1.25s linear infinite;
|
|
631
710
|
}
|
|
632
711
|
`;
|
|
633
712
|
});
|
|
@@ -647,7 +726,7 @@ export const StyledProgressContent = styled.div(({ theme }) => {
|
|
|
647
726
|
StyledProgressContent.defaultProps = defaultThemeProp;
|
|
648
727
|
export const StyledProgressText = styled(Text)(({ theme }) => {
|
|
649
728
|
return css `
|
|
650
|
-
color: ${theme.
|
|
729
|
+
color: ${theme.components.agent.ai};
|
|
651
730
|
`;
|
|
652
731
|
});
|
|
653
732
|
StyledProgressText.defaultProps = defaultThemeProp;
|
|
@@ -1060,16 +1139,28 @@ export const StyledActiveCaseStages = styled.div(({ theme }) => {
|
|
|
1060
1139
|
`;
|
|
1061
1140
|
});
|
|
1062
1141
|
StyledActiveCaseStages.defaultProps = defaultThemeProp;
|
|
1063
|
-
export const StyledSalutation = styled(Text)(({ theme }) => {
|
|
1142
|
+
export const StyledSalutation = styled(Text)(({ theme, simplified }) => {
|
|
1064
1143
|
return css `
|
|
1065
1144
|
text-align: center;
|
|
1066
1145
|
overflow-wrap: break-word;
|
|
1067
1146
|
word-break: break-word;
|
|
1068
|
-
font-size:
|
|
1147
|
+
font-size: ${simplified
|
|
1148
|
+
? 'clamp(2.5rem, 2rem + 1vw, 3.5rem)'
|
|
1149
|
+
: 'clamp(1.5rem, 1.333rem + 0.052vw, 2rem)'};
|
|
1069
1150
|
font-weight: ${theme.base['font-weight'].bold};
|
|
1070
1151
|
`;
|
|
1071
1152
|
});
|
|
1072
1153
|
StyledSalutation.defaultProps = defaultThemeProp;
|
|
1154
|
+
export const StyledSubHeading = styled(Text)(({ theme }) => {
|
|
1155
|
+
const { xxl } = calculateFontSize(theme.base['font-size'], theme.base['font-scale']);
|
|
1156
|
+
return css `
|
|
1157
|
+
text-align: center;
|
|
1158
|
+
overflow-wrap: break-word;
|
|
1159
|
+
word-break: break-word;
|
|
1160
|
+
font-size: ${xxl};
|
|
1161
|
+
`;
|
|
1162
|
+
});
|
|
1163
|
+
StyledSubHeading.defaultProps = defaultThemeProp;
|
|
1073
1164
|
export const StyledQuestionnaireCard = styled.article(({ theme: { base: { spacing, palette: { 'border-line': borderLine } }, components: { agent: { questionnaire: { background, 'foreground-color': foregroundColor } } } } }) => {
|
|
1074
1165
|
const foreground = calculateForegroundColor(background, foregroundColor);
|
|
1075
1166
|
return css `
|