@cloudscape-design/chat-components 1.0.150 → 1.0.151
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/chat-bubble/internal-interfaces.d.ts +11 -0
- package/chat-bubble/internal-interfaces.js +2 -0
- package/chat-bubble/internal-interfaces.js.map +1 -0
- package/chat-bubble/style.js +14 -12
- package/chat-bubble/style.js.map +1 -1
- package/internal/api-docs/components/avatar.js +1 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChatBubbleProps } from "./interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* `ChatBubbleProps.Style` plus the internal `_borderStyle` escape hatch on `bubble`.
|
|
4
|
+
* Consumers pass it by casting the `style` value to this type.
|
|
5
|
+
*/
|
|
6
|
+
export type ChatBubbleInternalStyle = ChatBubbleProps.Style & {
|
|
7
|
+
bubble?: NonNullable<ChatBubbleProps.Style["bubble"]> & {
|
|
8
|
+
/** CSS `border-style`. Defaults to `"solid"` when `borderWidth` is set and this is not. */
|
|
9
|
+
_borderStyle?: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/chat-bubble/internal-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { ChatBubbleProps } from \"./interfaces\";\n\n/**\n * `ChatBubbleProps.Style` plus the internal `_borderStyle` escape hatch on `bubble`.\n * Consumers pass it by casting the `style` value to this type.\n */\nexport type ChatBubbleInternalStyle = ChatBubbleProps.Style & {\n bubble?: NonNullable<ChatBubbleProps.Style[\"bubble\"]> & {\n /** CSS `border-style`. Defaults to `\"solid\"` when `borderWidth` is set and this is not. */\n _borderStyle?: string;\n };\n};\n"]}
|
package/chat-bubble/style.js
CHANGED
|
@@ -11,25 +11,27 @@ export function getChatBubbleRootStyle(style) {
|
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
export function getBubbleStyle(style) {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
15
15
|
if (SYSTEM !== "core") {
|
|
16
16
|
return {};
|
|
17
17
|
}
|
|
18
|
+
// `_borderStyle`: internal escape hatch, not part of the public Style.
|
|
19
|
+
const internalBubble = style === null || style === void 0 ? void 0 : style.bubble;
|
|
18
20
|
return {
|
|
19
21
|
background: (_a = style === null || style === void 0 ? void 0 : style.bubble) === null || _a === void 0 ? void 0 : _a.background,
|
|
20
22
|
borderColor: (_b = style === null || style === void 0 ? void 0 : style.bubble) === null || _b === void 0 ? void 0 : _b.borderColor,
|
|
21
23
|
borderRadius: (_c = style === null || style === void 0 ? void 0 : style.bubble) === null || _c === void 0 ? void 0 : _c.borderRadius,
|
|
22
|
-
borderStyle: (
|
|
23
|
-
borderWidth: (
|
|
24
|
-
boxShadow: (
|
|
25
|
-
color: (
|
|
26
|
-
fontFamily: (
|
|
27
|
-
fontSize: (
|
|
28
|
-
fontWeight: (
|
|
29
|
-
letterSpacing: (
|
|
30
|
-
paddingBlock: (
|
|
31
|
-
paddingInline: (
|
|
32
|
-
rowGap: (
|
|
24
|
+
borderStyle: (_d = internalBubble === null || internalBubble === void 0 ? void 0 : internalBubble._borderStyle) !== null && _d !== void 0 ? _d : (((_e = style === null || style === void 0 ? void 0 : style.bubble) === null || _e === void 0 ? void 0 : _e.borderWidth) ? "solid" : undefined),
|
|
25
|
+
borderWidth: (_f = style === null || style === void 0 ? void 0 : style.bubble) === null || _f === void 0 ? void 0 : _f.borderWidth,
|
|
26
|
+
boxShadow: (_g = style === null || style === void 0 ? void 0 : style.bubble) === null || _g === void 0 ? void 0 : _g.boxShadow,
|
|
27
|
+
color: (_h = style === null || style === void 0 ? void 0 : style.bubble) === null || _h === void 0 ? void 0 : _h.color,
|
|
28
|
+
fontFamily: (_j = style === null || style === void 0 ? void 0 : style.bubble) === null || _j === void 0 ? void 0 : _j.fontFamily,
|
|
29
|
+
fontSize: (_k = style === null || style === void 0 ? void 0 : style.bubble) === null || _k === void 0 ? void 0 : _k.fontSize,
|
|
30
|
+
fontWeight: (_l = style === null || style === void 0 ? void 0 : style.bubble) === null || _l === void 0 ? void 0 : _l.fontWeight,
|
|
31
|
+
letterSpacing: (_m = style === null || style === void 0 ? void 0 : style.bubble) === null || _m === void 0 ? void 0 : _m.letterSpacing,
|
|
32
|
+
paddingBlock: (_o = style === null || style === void 0 ? void 0 : style.bubble) === null || _o === void 0 ? void 0 : _o.paddingBlock,
|
|
33
|
+
paddingInline: (_p = style === null || style === void 0 ? void 0 : style.bubble) === null || _p === void 0 ? void 0 : _p.paddingInline,
|
|
34
|
+
rowGap: (_q = style === null || style === void 0 ? void 0 : style.bubble) === null || _q === void 0 ? void 0 : _q.rowGap,
|
|
33
35
|
};
|
|
34
36
|
}
|
|
35
37
|
//# sourceMappingURL=style.js.map
|
package/chat-bubble/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/chat-bubble/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/chat-bubble/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD,MAAM,UAAU,sBAAsB,CAAC,KAAwC;;IAC7E,IAAI,MAAM,KAAK,MAAM,EAAE;QACrB,OAAO,EAAE,CAAC;KACX;IAED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AM,0CAAE,UAAU;QACrC,aAAa,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,aAAa;QAC3C,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,YAAY;QACzC,aAAa,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,aAAa;QAC3C,MAAM,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,0CAAE,MAAM;KAC9B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from \"../internal/environment\";\nimport { ChatBubbleProps } from \"./interfaces\";\nimport { ChatBubbleInternalStyle } from \"./internal-interfaces\";\n\nexport function getChatBubbleRootStyle(style: ChatBubbleProps.Style | undefined) {\n if (SYSTEM !== \"core\") {\n return {};\n }\n\n return {\n columnGap: style?.root?.columnGap,\n };\n}\n\nexport function getBubbleStyle(style: ChatBubbleProps.Style | undefined) {\n if (SYSTEM !== \"core\") {\n return {};\n }\n\n // `_borderStyle`: internal escape hatch, not part of the public Style.\n const internalBubble = (style as ChatBubbleInternalStyle | undefined)?.bubble;\n\n return {\n background: style?.bubble?.background,\n borderColor: style?.bubble?.borderColor,\n borderRadius: style?.bubble?.borderRadius,\n borderStyle: internalBubble?._borderStyle ?? (style?.bubble?.borderWidth ? \"solid\" : undefined),\n borderWidth: style?.bubble?.borderWidth,\n boxShadow: style?.bubble?.boxShadow,\n color: style?.bubble?.color,\n fontFamily: style?.bubble?.fontFamily,\n fontSize: style?.bubble?.fontSize,\n fontWeight: style?.bubble?.fontWeight,\n letterSpacing: style?.bubble?.letterSpacing,\n paddingBlock: style?.bubble?.paddingBlock,\n paddingInline: style?.bubble?.paddingInline,\n rowGap: style?.bubble?.rowGap,\n };\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "chat-components";
|
|
2
|
-
export var PACKAGE_VERSION = "1.0.0 (
|
|
2
|
+
export var PACKAGE_VERSION = "1.0.0 (32467e59)";
|
|
3
3
|
export var THEME = "open-source-visual-refresh";
|
|
4
4
|
export var SYSTEM = "core";
|
|
5
5
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED