orcs-design-system 3.3.30 → 3.3.31
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.
|
@@ -356,19 +356,28 @@ const HeaderAvatarShape = styled("div").withConfig({
|
|
|
356
356
|
})
|
|
357
357
|
};
|
|
358
358
|
});
|
|
359
|
-
const
|
|
360
|
-
displayName: "
|
|
359
|
+
const HeaderAvatarActionPopover = styled(Popover).withConfig({
|
|
360
|
+
displayName: "Avatar__HeaderAvatarActionPopover",
|
|
361
361
|
componentId: "sc-1wtet2j-11"
|
|
362
362
|
})(_ref6 => {
|
|
363
363
|
let {
|
|
364
|
-
$shape
|
|
365
|
-
...props
|
|
364
|
+
$shape
|
|
366
365
|
} = _ref6;
|
|
367
366
|
return {
|
|
368
367
|
position: "absolute",
|
|
369
368
|
top: 0,
|
|
370
369
|
right: 0,
|
|
371
|
-
transform: $shape === "circle" ? "translate(-5%, 5%)" : "translate(20%, -20%)"
|
|
370
|
+
transform: $shape === "circle" ? "translate(-5%, 5%)" : "translate(20%, -20%)"
|
|
371
|
+
};
|
|
372
|
+
});
|
|
373
|
+
const HeaderAvatarAction = styled("button").withConfig({
|
|
374
|
+
displayName: "Avatar__HeaderAvatarAction",
|
|
375
|
+
componentId: "sc-1wtet2j-12"
|
|
376
|
+
})(_ref7 => {
|
|
377
|
+
let {
|
|
378
|
+
...props
|
|
379
|
+
} = _ref7;
|
|
380
|
+
return {
|
|
372
381
|
width: "36px",
|
|
373
382
|
height: "36px",
|
|
374
383
|
borderRadius: "50%",
|
|
@@ -387,7 +396,7 @@ const HeaderAvatarAction = styled("button").withConfig({
|
|
|
387
396
|
}
|
|
388
397
|
};
|
|
389
398
|
});
|
|
390
|
-
const Avatar =
|
|
399
|
+
const Avatar = _ref8 => {
|
|
391
400
|
let {
|
|
392
401
|
sizing,
|
|
393
402
|
image,
|
|
@@ -406,7 +415,7 @@ const Avatar = _ref7 => {
|
|
|
406
415
|
headerAvatar = false,
|
|
407
416
|
onClick,
|
|
408
417
|
...props
|
|
409
|
-
} =
|
|
418
|
+
} = _ref8;
|
|
410
419
|
const hasTitle = !!title;
|
|
411
420
|
const hasSubtitle = !!subtitle;
|
|
412
421
|
const hasSubtitleContent = !!subtitleContent;
|
|
@@ -456,20 +465,24 @@ const Avatar = _ref7 => {
|
|
|
456
465
|
icon: ["fas", "user"]
|
|
457
466
|
})
|
|
458
467
|
})
|
|
459
|
-
}), onClick && sizing === "large" && /*#__PURE__*/_jsx(
|
|
460
|
-
|
|
468
|
+
}), onClick && sizing === "large" && /*#__PURE__*/_jsx(HeaderAvatarActionPopover, {
|
|
469
|
+
direction: "right",
|
|
470
|
+
width: "fit-content",
|
|
461
471
|
$shape: shape,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
472
|
+
text: shape === "circle" ? "Upload profile picture" : "Change image",
|
|
473
|
+
children: /*#__PURE__*/_jsx(HeaderAvatarAction, {
|
|
474
|
+
onClick: onClick,
|
|
475
|
+
"aria-label": "Edit avatar",
|
|
476
|
+
children: shape === "circle" ? /*#__PURE__*/_jsx(Icon, {
|
|
477
|
+
icon: ["fas", "camera"],
|
|
478
|
+
size: "lg",
|
|
479
|
+
color: "greyDarker"
|
|
480
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
481
|
+
icon: ["fas", "edit"],
|
|
482
|
+
size: "lg",
|
|
483
|
+
color: "greyDarker",
|
|
484
|
+
transform: "right-1"
|
|
485
|
+
})
|
|
473
486
|
})
|
|
474
487
|
})]
|
|
475
488
|
});
|
|
@@ -518,7 +531,7 @@ const Avatar = _ref7 => {
|
|
|
518
531
|
}), localTime && /*#__PURE__*/_jsx(LocalTime, {
|
|
519
532
|
direction: "topRight",
|
|
520
533
|
textAlign: "center",
|
|
521
|
-
width: "
|
|
534
|
+
width: "fit-content",
|
|
522
535
|
text: localTime,
|
|
523
536
|
children: /*#__PURE__*/_jsx(StatusDot, {
|
|
524
537
|
icon: true,
|
|
@@ -46,6 +46,26 @@ export const invertedLoading = () => /*#__PURE__*/_jsx(Box, {
|
|
|
46
46
|
})
|
|
47
47
|
});
|
|
48
48
|
invertedLoading.storyName = "Inverted";
|
|
49
|
+
export const aiLoading = () => /*#__PURE__*/_jsxs(Spacer, {
|
|
50
|
+
p: "r",
|
|
51
|
+
children: [/*#__PURE__*/_jsx(Loading, {
|
|
52
|
+
variant: "AI"
|
|
53
|
+
}), /*#__PURE__*/_jsx(Loading, {
|
|
54
|
+
variant: "AI",
|
|
55
|
+
large: true
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
aiLoading.storyName = "AI Variant";
|
|
59
|
+
export const aiChatLoading = () => /*#__PURE__*/_jsxs(Spacer, {
|
|
60
|
+
p: "r",
|
|
61
|
+
children: [/*#__PURE__*/_jsx(Loading, {
|
|
62
|
+
variant: "AIchat"
|
|
63
|
+
}), /*#__PURE__*/_jsx(Loading, {
|
|
64
|
+
variant: "AIchat",
|
|
65
|
+
large: true
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
aiChatLoading.storyName = "AI Chat Variant";
|
|
49
69
|
defaultLoading.__docgenInfo = {
|
|
50
70
|
"description": "",
|
|
51
71
|
"methods": [],
|
|
@@ -70,4 +90,14 @@ invertedLoading.__docgenInfo = {
|
|
|
70
90
|
"description": "",
|
|
71
91
|
"methods": [],
|
|
72
92
|
"displayName": "invertedLoading"
|
|
93
|
+
};
|
|
94
|
+
aiLoading.__docgenInfo = {
|
|
95
|
+
"description": "",
|
|
96
|
+
"methods": [],
|
|
97
|
+
"displayName": "aiLoading"
|
|
98
|
+
};
|
|
99
|
+
aiChatLoading.__docgenInfo = {
|
|
100
|
+
"description": "",
|
|
101
|
+
"methods": [],
|
|
102
|
+
"displayName": "aiChatLoading"
|
|
73
103
|
};
|
|
@@ -5,6 +5,7 @@ import { space, layout, compose } from "styled-system";
|
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
const LoadingStyles = compose(space, layout);
|
|
7
7
|
const loadingSpin = keyframes(["to{transform:rotate(1turn);}"]);
|
|
8
|
+
const dotAnimation = keyframes(["0%,80%,100%{opacity:0;}40%{opacity:1;}"]);
|
|
8
9
|
const LoadingWrapper = styled("div").withConfig({
|
|
9
10
|
displayName: "Loading__LoadingWrapper",
|
|
10
11
|
componentId: "sc-195w3kf-0"
|
|
@@ -17,6 +18,18 @@ const LoadingIcon = styled.svg.withConfig({
|
|
|
17
18
|
displayName: "Loading__LoadingIcon",
|
|
18
19
|
componentId: "sc-195w3kf-1"
|
|
19
20
|
})(["position:relative;width:", ";height:", ";", ";", ";"], props => props.large ? "50px" : "16px", props => props.large ? "50px" : "16px", props => props.large ? css(["animation:", " 800ms infinite linear;"], loadingSpin) : css(["animation:", " 600ms infinite linear;"], loadingSpin), props => props.inverted ? css(["fill:white;"]) : props.primary ? css(["fill:#0091ea;"]) : css(["fill:black;"]));
|
|
21
|
+
const AILoadingIcon = styled.svg.withConfig({
|
|
22
|
+
displayName: "Loading__AILoadingIcon",
|
|
23
|
+
componentId: "sc-195w3kf-2"
|
|
24
|
+
})(["position:relative;width:", ";height:", ";", ";"], props => props.large ? "50px" : "24px", props => props.large ? "46px" : "22px", props => props.large ? css(["animation:", " 1000ms infinite linear;"], loadingSpin) : css(["animation:", " 800ms infinite linear;"], loadingSpin));
|
|
25
|
+
const AIChatLoadingIcon = styled.svg.withConfig({
|
|
26
|
+
displayName: "Loading__AIChatLoadingIcon",
|
|
27
|
+
componentId: "sc-195w3kf-3"
|
|
28
|
+
})(["position:relative;width:", ";height:", ";"], props => props.large ? "56px" : "28px", props => props.large ? "12px" : "6px");
|
|
29
|
+
const Dot = styled.circle.withConfig({
|
|
30
|
+
displayName: "Loading__Dot",
|
|
31
|
+
componentId: "sc-195w3kf-4"
|
|
32
|
+
})(["animation:", " 1.4s infinite ease-in-out;animation-delay:", "s;transform-origin:center;"], dotAnimation, props => props.delay);
|
|
20
33
|
|
|
21
34
|
/**
|
|
22
35
|
* As a general guide, use the large prop for when whole pages or sections are loading, and the default (small) loading for smaller elements.
|
|
@@ -29,12 +42,129 @@ export default function Loading(_ref) {
|
|
|
29
42
|
primary,
|
|
30
43
|
theme,
|
|
31
44
|
ariaLabel = "Loading",
|
|
45
|
+
variant,
|
|
32
46
|
...props
|
|
33
47
|
} = _ref;
|
|
34
48
|
const component = /*#__PURE__*/_jsx(LoadingWrapper, {
|
|
35
49
|
...props,
|
|
36
50
|
centered: centered,
|
|
37
|
-
children: /*#__PURE__*/_jsxs(
|
|
51
|
+
children: variant === "AI" ? /*#__PURE__*/_jsxs(AILoadingIcon, {
|
|
52
|
+
role: "img",
|
|
53
|
+
"aria-label": ariaLabel,
|
|
54
|
+
large: large,
|
|
55
|
+
viewBox: "0 0 24 22",
|
|
56
|
+
fill: "none",
|
|
57
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
58
|
+
children: [/*#__PURE__*/_jsx("defs", {
|
|
59
|
+
children: /*#__PURE__*/_jsxs("linearGradient", {
|
|
60
|
+
id: "pathGradient",
|
|
61
|
+
x1: "21",
|
|
62
|
+
y1: "5",
|
|
63
|
+
x2: "17",
|
|
64
|
+
y2: "20",
|
|
65
|
+
gradientUnits: "userSpaceOnUse",
|
|
66
|
+
children: [/*#__PURE__*/_jsx("stop", {
|
|
67
|
+
offset: "0%",
|
|
68
|
+
stopColor: "#42B7FF"
|
|
69
|
+
}), /*#__PURE__*/_jsx("stop", {
|
|
70
|
+
offset: "100%",
|
|
71
|
+
stopColor: "#B667FF"
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx("mask", {
|
|
75
|
+
id: "path-1-inside-1_1516_12666",
|
|
76
|
+
fill: "white",
|
|
77
|
+
children: /*#__PURE__*/_jsx("path", {
|
|
78
|
+
d: "M16.9413 19.678C17.2158 20.1574 17.0512 20.7731 16.5489 21.0029C14.8729 21.7697 13.0258 22.1053 11.1771 21.9712C8.99467 21.8129 6.90907 21.0074 5.18691 19.6576C3.46475 18.3078 2.18429 16.475 1.50923 14.3936C0.834172 12.3122 0.795197 10.0768 1.39729 7.97319C1.99938 5.86954 3.21518 3.99326 4.88923 2.58423C6.56329 1.1752 8.61954 0.297456 10.7951 0.0632129C12.9706 -0.17103 15.1666 0.248877 17.1022 1.26925C18.742 2.13365 20.1318 3.3957 21.1483 4.93302C21.453 5.39384 21.2669 6.0034 20.7803 6.26498V6.26498C20.2937 6.52657 19.6916 6.34025 19.3777 5.88569C18.5561 4.69612 17.4569 3.7177 16.1693 3.03896C14.5857 2.20416 12.7891 1.86062 11.0092 2.05226C9.22936 2.2439 7.54708 2.96202 6.17748 4.11479C4.80788 5.26756 3.8132 6.80261 3.32061 8.52367C2.82802 10.2447 2.8599 12.0736 3.41219 13.7764C3.96448 15.4793 5.01207 16.9787 6.42102 18.083C7.82998 19.1874 9.53627 19.8464 11.3217 19.9759C12.7734 20.0812 14.2239 19.8325 15.5504 19.2577C16.0573 19.0381 16.6668 19.1986 16.9413 19.678V19.678Z"
|
|
79
|
+
})
|
|
80
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
81
|
+
d: "M16.9413 19.678C17.2158 20.1574 17.0512 20.7731 16.5489 21.0029C14.8729 21.7697 13.0258 22.1053 11.1771 21.9712C8.99467 21.8129 6.90907 21.0074 5.18691 19.6576C3.46475 18.3078 2.18429 16.475 1.50923 14.3936C0.834172 12.3122 0.795197 10.0768 1.39729 7.97319C1.99938 5.86954 3.21518 3.99326 4.88923 2.58423C6.56329 1.1752 8.61954 0.297456 10.7951 0.0632129C12.9706 -0.17103 15.1666 0.248877 17.1022 1.26925C18.742 2.13365 20.1318 3.3957 21.1483 4.93302C21.453 5.39384 21.2669 6.0034 20.7803 6.26498V6.26498C20.2937 6.52657 19.6916 6.34025 19.3777 5.88569C18.5561 4.69612 17.4569 3.7177 16.1693 3.03896C14.5857 2.20416 12.7891 1.86062 11.0092 2.05226C9.22936 2.2439 7.54708 2.96202 6.17748 4.11479C4.80788 5.26756 3.8132 6.80261 3.32061 8.52367C2.82802 10.2447 2.8599 12.0736 3.41219 13.7764C3.96448 15.4793 5.01207 16.9787 6.42102 18.083C7.82998 19.1874 9.53627 19.8464 11.3217 19.9759C12.7734 20.0812 14.2239 19.8325 15.5504 19.2577C16.0573 19.0381 16.6668 19.1986 16.9413 19.678V19.678Z",
|
|
82
|
+
stroke: "url(#pathGradient)",
|
|
83
|
+
strokeWidth: "4",
|
|
84
|
+
strokeLinejoin: "round",
|
|
85
|
+
mask: "url(#path-1-inside-1_1516_12666)"
|
|
86
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
87
|
+
cx: "21.9727",
|
|
88
|
+
cy: "12.7734",
|
|
89
|
+
r: "1.5",
|
|
90
|
+
fill: "#6D74FE"
|
|
91
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
92
|
+
cx: "21.7012",
|
|
93
|
+
cy: "8.81641",
|
|
94
|
+
r: "1",
|
|
95
|
+
fill: "#42B7FF"
|
|
96
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
97
|
+
d: "M18.9019 15.0489C19.0419 14.5181 19.7952 14.5181 19.9352 15.0489V15.0489C20.1648 15.9194 20.8384 16.6031 21.7054 16.8458L21.7938 16.8705C22.3137 17.016 22.2985 17.7582 21.7731 17.8822V17.8822C20.8715 18.0951 20.1615 18.8003 19.9348 19.6985V19.6985C19.8002 20.2316 19.0369 20.2316 18.9024 19.6985V19.6985C18.6756 18.8003 17.9656 18.0951 17.0641 17.8822V17.8822C16.5387 17.7582 16.5235 17.016 17.0433 16.8705L17.1318 16.8458C17.9988 16.6031 18.6723 15.9194 18.9019 15.0489V15.0489Z",
|
|
98
|
+
fill: "#B667FF"
|
|
99
|
+
})]
|
|
100
|
+
}) : variant === "AIchat" ? /*#__PURE__*/_jsxs(AIChatLoadingIcon, {
|
|
101
|
+
role: "img",
|
|
102
|
+
"aria-label": ariaLabel,
|
|
103
|
+
large: large,
|
|
104
|
+
viewBox: "0 0 28 6",
|
|
105
|
+
fill: "none",
|
|
106
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
107
|
+
children: [/*#__PURE__*/_jsxs("defs", {
|
|
108
|
+
children: [/*#__PURE__*/_jsxs("linearGradient", {
|
|
109
|
+
id: "paint0_linear_723_3706",
|
|
110
|
+
x1: "0",
|
|
111
|
+
y1: "3",
|
|
112
|
+
x2: "28",
|
|
113
|
+
y2: "3",
|
|
114
|
+
gradientUnits: "userSpaceOnUse",
|
|
115
|
+
children: [/*#__PURE__*/_jsx("stop", {
|
|
116
|
+
stopColor: "#42B7FF"
|
|
117
|
+
}), /*#__PURE__*/_jsx("stop", {
|
|
118
|
+
offset: "1",
|
|
119
|
+
stopColor: "#B667FF"
|
|
120
|
+
})]
|
|
121
|
+
}), /*#__PURE__*/_jsxs("linearGradient", {
|
|
122
|
+
id: "paint1_linear_723_3706",
|
|
123
|
+
x1: "0",
|
|
124
|
+
y1: "3",
|
|
125
|
+
x2: "28",
|
|
126
|
+
y2: "3",
|
|
127
|
+
gradientUnits: "userSpaceOnUse",
|
|
128
|
+
children: [/*#__PURE__*/_jsx("stop", {
|
|
129
|
+
stopColor: "#42B7FF"
|
|
130
|
+
}), /*#__PURE__*/_jsx("stop", {
|
|
131
|
+
offset: "1",
|
|
132
|
+
stopColor: "#B667FF"
|
|
133
|
+
})]
|
|
134
|
+
}), /*#__PURE__*/_jsxs("linearGradient", {
|
|
135
|
+
id: "paint2_linear_723_3706",
|
|
136
|
+
x1: "0",
|
|
137
|
+
y1: "3",
|
|
138
|
+
x2: "28",
|
|
139
|
+
y2: "3",
|
|
140
|
+
gradientUnits: "userSpaceOnUse",
|
|
141
|
+
children: [/*#__PURE__*/_jsx("stop", {
|
|
142
|
+
stopColor: "#42B7FF"
|
|
143
|
+
}), /*#__PURE__*/_jsx("stop", {
|
|
144
|
+
offset: "1",
|
|
145
|
+
stopColor: "#B667FF"
|
|
146
|
+
})]
|
|
147
|
+
})]
|
|
148
|
+
}), /*#__PURE__*/_jsx(Dot, {
|
|
149
|
+
cx: "3",
|
|
150
|
+
cy: "3",
|
|
151
|
+
r: "3",
|
|
152
|
+
fill: "url(#paint0_linear_723_3706)",
|
|
153
|
+
delay: 0
|
|
154
|
+
}), /*#__PURE__*/_jsx(Dot, {
|
|
155
|
+
cx: "14",
|
|
156
|
+
cy: "3",
|
|
157
|
+
r: "3",
|
|
158
|
+
fill: "url(#paint1_linear_723_3706)",
|
|
159
|
+
delay: 0.2
|
|
160
|
+
}), /*#__PURE__*/_jsx(Dot, {
|
|
161
|
+
cx: "25",
|
|
162
|
+
cy: "3",
|
|
163
|
+
r: "3",
|
|
164
|
+
fill: "url(#paint2_linear_723_3706)",
|
|
165
|
+
delay: 0.4
|
|
166
|
+
})]
|
|
167
|
+
}) : /*#__PURE__*/_jsxs(LoadingIcon, {
|
|
38
168
|
role: "img",
|
|
39
169
|
"aria-label": ariaLabel,
|
|
40
170
|
large: large,
|
|
@@ -68,7 +198,9 @@ Loading.propTypes = {
|
|
|
68
198
|
/** Specifies the system design theme */
|
|
69
199
|
theme: PropTypes.object,
|
|
70
200
|
/** Specifies the aria-label for loading image */
|
|
71
|
-
ariaLabel: PropTypes.string
|
|
201
|
+
ariaLabel: PropTypes.string,
|
|
202
|
+
/** Specifies the variant of loading icon to display */
|
|
203
|
+
variant: PropTypes.oneOf(["AI", "AIchat"])
|
|
72
204
|
};
|
|
73
205
|
Loading.__docgenInfo = {
|
|
74
206
|
"description": "As a general guide, use the large prop for when whole pages or sections are loading, and the default (small) loading for smaller elements.",
|
|
@@ -120,6 +252,20 @@ Loading.__docgenInfo = {
|
|
|
120
252
|
"name": "object"
|
|
121
253
|
},
|
|
122
254
|
"required": false
|
|
255
|
+
},
|
|
256
|
+
"variant": {
|
|
257
|
+
"description": "Specifies the variant of loading icon to display",
|
|
258
|
+
"type": {
|
|
259
|
+
"name": "enum",
|
|
260
|
+
"value": [{
|
|
261
|
+
"value": "\"AI\"",
|
|
262
|
+
"computed": false
|
|
263
|
+
}, {
|
|
264
|
+
"value": "\"AIchat\"",
|
|
265
|
+
"computed": false
|
|
266
|
+
}]
|
|
267
|
+
},
|
|
268
|
+
"required": false
|
|
123
269
|
}
|
|
124
270
|
}
|
|
125
271
|
};
|