@cloudscape-design/chat-components 1.0.27 → 1.0.29
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/avatar/styles.css.js +6 -6
- package/avatar/styles.scoped.css +15 -15
- package/avatar/styles.selectors.js +6 -6
- package/internal/base-component/use-telemetry.js +3 -1
- package/internal/base-component/use-telemetry.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/internal/utils/get-visual-theme.d.ts +1 -0
- package/internal/utils/get-visual-theme.js +9 -0
- package/internal/utils/get-visual-theme.js.map +1 -0
- package/package.json +1 -2
package/avatar/styles.css.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"avatar-color-default": "awsui_avatar-color-
|
|
6
|
-
"avatar-color-gen-ai": "awsui_avatar-color-gen-
|
|
7
|
-
"initials": "
|
|
8
|
-
"image": "
|
|
9
|
-
"content": "
|
|
4
|
+
"root": "awsui_root_1qkal_1rsnr_15",
|
|
5
|
+
"avatar-color-default": "awsui_avatar-color-default_1qkal_1rsnr_50",
|
|
6
|
+
"avatar-color-gen-ai": "awsui_avatar-color-gen-ai_1qkal_1rsnr_53",
|
|
7
|
+
"initials": "awsui_initials_1qkal_1rsnr_56",
|
|
8
|
+
"image": "awsui_image_1qkal_1rsnr_83",
|
|
9
|
+
"content": "awsui_content_1qkal_1rsnr_87"
|
|
10
10
|
};
|
|
11
11
|
|
package/avatar/styles.scoped.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
/* stylelint-disable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
14
14
|
/* stylelint-enable @cloudscape-design/no-motion-outside-of-mixin, selector-combinator-disallowed-list, selector-pseudo-class-no-unknown, selector-class-pattern */
|
|
15
|
-
.
|
|
15
|
+
.awsui_root_1qkal_1rsnr_15:not(#\9) {
|
|
16
16
|
border-collapse: separate;
|
|
17
17
|
border-spacing: 0;
|
|
18
18
|
box-sizing: border-box;
|
|
@@ -48,44 +48,44 @@
|
|
|
48
48
|
border-end-start-radius: 50%;
|
|
49
49
|
border-end-end-radius: 50%;
|
|
50
50
|
}
|
|
51
|
-
.
|
|
51
|
+
.awsui_root_1qkal_1rsnr_15.awsui_avatar-color-default_1qkal_1rsnr_50:not(#\9) {
|
|
52
52
|
background-color: var(--color-background-avatar-default-rci9zy, #424650);
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
.awsui_root_1qkal_1rsnr_15.awsui_avatar-color-gen-ai_1qkal_1rsnr_53:not(#\9) {
|
|
55
55
|
background: var(--color-background-avatar-gen-ai-i9hcw6, radial-gradient(circle farthest-corner at top left, rgb(0, 150, 250) -25%, rgba(0, 150, 250, 0) 55%), radial-gradient(circle farthest-corner at top right, rgb(216, 178, 255) -10%, rgb(115, 0, 229) 50%));
|
|
56
56
|
}
|
|
57
|
-
.
|
|
57
|
+
.awsui_root_1qkal_1rsnr_15.awsui_initials_1qkal_1rsnr_56:not(#\9) {
|
|
58
58
|
font-family: var(--font-family-base-dnvic8, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
59
59
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
60
60
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
61
61
|
font-weight: var(--font-weight-heading-l-f8711v, 700);
|
|
62
62
|
}
|
|
63
|
-
.
|
|
63
|
+
.awsui_root_1qkal_1rsnr_15:not(#\9):focus {
|
|
64
64
|
outline: none;
|
|
65
65
|
}
|
|
66
|
-
body[data-awsui-focus-visible=true] .
|
|
66
|
+
body[data-awsui-focus-visible=true] .awsui_root_1qkal_1rsnr_15:not(#\9):focus:focus {
|
|
67
67
|
position: relative;
|
|
68
68
|
box-sizing: border-box;
|
|
69
69
|
outline: 2px dotted transparent;
|
|
70
|
-
outline-offset:
|
|
70
|
+
outline-offset: 3px;
|
|
71
71
|
}
|
|
72
|
-
body[data-awsui-focus-visible=true] .
|
|
72
|
+
body[data-awsui-focus-visible=true] .awsui_root_1qkal_1rsnr_15:not(#\9):focus:focus::before {
|
|
73
73
|
content: " ";
|
|
74
74
|
display: block;
|
|
75
75
|
position: absolute;
|
|
76
76
|
box-sizing: border-box;
|
|
77
|
-
inset-inline-start: calc(-1 *
|
|
78
|
-
inset-block-start: calc(-1 *
|
|
79
|
-
inline-size: calc(100% + 2 *
|
|
80
|
-
block-size: calc(100% + 2 *
|
|
77
|
+
inset-inline-start: calc(-1 * 4px);
|
|
78
|
+
inset-block-start: calc(-1 * 4px);
|
|
79
|
+
inline-size: calc(100% + 2 * 4px);
|
|
80
|
+
block-size: calc(100% + 2 * 4px);
|
|
81
81
|
border-radius: 50%;
|
|
82
82
|
border: 2px solid var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
83
83
|
}
|
|
84
|
-
.
|
|
84
|
+
.awsui_root_1qkal_1rsnr_15:not(#\9):has(.awsui_image_1qkal_1rsnr_83) {
|
|
85
85
|
background: transparent;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
.
|
|
88
|
+
.awsui_content_1qkal_1rsnr_87:not(#\9) {
|
|
89
89
|
display: flex;
|
|
90
90
|
align-items: center;
|
|
91
91
|
justify-content: center;
|
|
@@ -93,7 +93,7 @@ body[data-awsui-focus-visible=true] .awsui_root_1qkal_155wn_15:not(#\9):focus:fo
|
|
|
93
93
|
inline-size: inherit;
|
|
94
94
|
overflow: hidden;
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.awsui_content_1qkal_1rsnr_87 .awsui_image_1qkal_1rsnr_83:not(#\9) {
|
|
97
97
|
border-start-start-radius: 50%;
|
|
98
98
|
border-start-end-radius: 50%;
|
|
99
99
|
border-end-start-radius: 50%;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"avatar-color-default": "awsui_avatar-color-
|
|
7
|
-
"avatar-color-gen-ai": "awsui_avatar-color-gen-
|
|
8
|
-
"initials": "
|
|
9
|
-
"image": "
|
|
10
|
-
"content": "
|
|
5
|
+
"root": "awsui_root_1qkal_1rsnr_15",
|
|
6
|
+
"avatar-color-default": "awsui_avatar-color-default_1qkal_1rsnr_50",
|
|
7
|
+
"avatar-color-gen-ai": "awsui_avatar-color-gen-ai_1qkal_1rsnr_53",
|
|
8
|
+
"initials": "awsui_initials_1qkal_1rsnr_56",
|
|
9
|
+
"image": "awsui_image_1qkal_1rsnr_83",
|
|
10
|
+
"content": "awsui_content_1qkal_1rsnr_87"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useComponentMetrics } from "@cloudscape-design/component-toolkit/internal";
|
|
4
4
|
import { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from "../environment";
|
|
5
|
+
import { getVisualTheme } from "../utils/get-visual-theme";
|
|
5
6
|
import { useVisualRefresh } from "./use-visual-refresh";
|
|
6
7
|
export function useTelemetry(componentName, config) {
|
|
7
|
-
const
|
|
8
|
+
const isVisualRefresh = useVisualRefresh();
|
|
9
|
+
const theme = getVisualTheme(THEME, isVisualRefresh);
|
|
8
10
|
useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);
|
|
9
11
|
}
|
|
10
12
|
//# sourceMappingURL=use-telemetry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,
|
|
1
|
+
{"version":3,"file":"use-telemetry.js","sourceRoot":"","sources":["../../../../src/internal/base-component/use-telemetry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAA0B,mBAAmB,EAAE,MAAM,+CAA+C,CAAC;AAE5G,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,MAAM,UAAU,YAAY,CAAC,aAAqB,EAAE,MAA+B;IACjF,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC;IACrD,mBAAmB,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,CAAC;AACxH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { ComponentConfiguration, useComponentMetrics } from \"@cloudscape-design/component-toolkit/internal\";\n\nimport { PACKAGE_SOURCE, PACKAGE_VERSION, THEME } from \"../environment\";\nimport { getVisualTheme } from \"../utils/get-visual-theme\";\nimport { useVisualRefresh } from \"./use-visual-refresh\";\n\nexport function useTelemetry(componentName: string, config?: ComponentConfiguration) {\n const isVisualRefresh = useVisualRefresh();\n const theme = getVisualTheme(THEME, isVisualRefresh);\n useComponentMetrics(componentName, { packageSource: PACKAGE_SOURCE, packageVersion: PACKAGE_VERSION, theme }, config);\n}\n"]}
|
package/internal/environment.js
CHANGED
package/internal/manifest.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getVisualTheme: (theme: string, isVR: boolean) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
export const getVisualTheme = (theme, isVR) => {
|
|
4
|
+
if (theme === "polaris" && isVR) {
|
|
5
|
+
return "vr";
|
|
6
|
+
}
|
|
7
|
+
return theme;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=get-visual-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-visual-theme.js","sourceRoot":"","sources":["../../../../src/internal/utils/get-visual-theme.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,IAAa,EAAE,EAAE;IAC7D,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,EAAE;QAC/B,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nexport const getVisualTheme = (theme: string, isVR: boolean) => {\n if (theme === \"polaris\" && isVR) {\n return \"vr\";\n }\n\n return theme;\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudscape-design/chat-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cloudscape-design/chat-components.git"
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@cloudscape-design/components": "^3",
|
|
26
|
-
"@cloudscape-design/design-tokens": "^3",
|
|
27
26
|
"react": "^18.2.0",
|
|
28
27
|
"react-dom": "^18.2.0"
|
|
29
28
|
},
|