@revikornmann/muka-ui 0.12.0 → 0.13.0
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/build/manifest.json +10 -0
- package/dist/cjs/components/AgentTaskList/AgentTaskList.js +1 -1
- package/dist/cjs/components/BadgeNumber/BadgeNumber.css +105 -0
- package/dist/cjs/components/BadgeNumber/BadgeNumber.js +19 -0
- package/dist/cjs/components/BadgeNumber/BadgeNumber.js.map +1 -0
- package/dist/cjs/components/BadgeNumber/index.js +11 -0
- package/dist/cjs/components/BadgeNumber/index.js.map +1 -0
- package/dist/cjs/components/{ChatBubble/ChatBubble.css → ChatMessage/ChatMessage.css} +133 -105
- package/dist/cjs/components/ChatMessage/ChatMessage.js +141 -0
- package/dist/cjs/components/ChatMessage/ChatMessage.js.map +1 -0
- package/dist/cjs/components/ChatMessage/index.js +7 -0
- package/dist/cjs/components/ChatMessage/index.js.map +1 -0
- package/dist/cjs/components/ChatMessageList/ChatMessageList.js +1 -1
- package/dist/cjs/components/ChatMessageStack/ChatMessageStack.css +51 -0
- package/dist/cjs/components/ChatMessageStack/ChatMessageStack.js +49 -0
- package/dist/cjs/components/ChatMessageStack/ChatMessageStack.js.map +1 -0
- package/dist/cjs/components/ChatMessageStack/index.js +6 -0
- package/dist/cjs/components/ChatMessageStack/index.js.map +1 -0
- package/dist/cjs/components/ChatPhotoGrid/ChatPhotoGrid.css +8 -2
- package/dist/cjs/components/ChatPhotoGrid/ChatPhotoGrid.js +1 -1
- package/dist/cjs/components/Menu/Menu.js +5 -4
- package/dist/cjs/components/Menu/Menu.js.map +1 -1
- package/dist/cjs/components/index.js +9 -5
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/utils/useLongPress.js +71 -0
- package/dist/cjs/utils/useLongPress.js.map +1 -0
- package/dist/esm/components/AgentTaskList/AgentTaskList.js +1 -1
- package/dist/esm/components/BadgeNumber/BadgeNumber.css +105 -0
- package/dist/esm/components/BadgeNumber/BadgeNumber.js +15 -0
- package/dist/esm/components/BadgeNumber/BadgeNumber.js.map +1 -0
- package/dist/esm/components/BadgeNumber/index.js +3 -0
- package/dist/esm/components/BadgeNumber/index.js.map +1 -0
- package/dist/esm/components/{ChatBubble/ChatBubble.css → ChatMessage/ChatMessage.css} +133 -105
- package/dist/esm/components/ChatMessage/ChatMessage.js +137 -0
- package/dist/esm/components/ChatMessage/ChatMessage.js.map +1 -0
- package/dist/esm/components/ChatMessage/index.js +2 -0
- package/dist/esm/components/ChatMessage/index.js.map +1 -0
- package/dist/esm/components/ChatMessageList/ChatMessageList.js +1 -1
- package/dist/esm/components/ChatMessageStack/ChatMessageStack.css +51 -0
- package/dist/esm/components/ChatMessageStack/ChatMessageStack.js +42 -0
- package/dist/esm/components/ChatMessageStack/ChatMessageStack.js.map +1 -0
- package/dist/esm/components/ChatMessageStack/index.js +2 -0
- package/dist/esm/components/ChatMessageStack/index.js.map +1 -0
- package/dist/esm/components/ChatPhotoGrid/ChatPhotoGrid.css +8 -2
- package/dist/esm/components/ChatPhotoGrid/ChatPhotoGrid.js +1 -1
- package/dist/esm/components/Menu/Menu.js +5 -4
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/index.js +3 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/utils/useLongPress.js +68 -0
- package/dist/esm/utils/useLongPress.js.map +1 -0
- package/dist/styles/components/BadgeNumber.css +105 -0
- package/dist/styles/components/{ChatBubble.css → ChatMessage.css} +133 -105
- package/dist/styles/components/ChatMessageStack.css +51 -0
- package/dist/styles/components/ChatPhotoGrid.css +8 -2
- package/dist/styles/index.css +1672 -1449
- package/dist/styles/muka-dark.css +1672 -1449
- package/dist/styles/muka-light.css +1672 -1449
- package/dist/styles/tokens-bouwplan-dark.css +32 -5
- package/dist/styles/tokens-bouwplan-light.css +32 -5
- package/dist/styles/tokens-fscl-dark.css +32 -5
- package/dist/styles/tokens-fscl-light.css +32 -5
- package/dist/styles/tokens-grip-dark.css +32 -5
- package/dist/styles/tokens-grip-light.css +32 -5
- package/dist/styles/tokens-muka-dark.css +32 -5
- package/dist/styles/tokens-muka-light.css +32 -5
- package/dist/styles/tokens-wireframe-dark.css +31 -4
- package/dist/styles/tokens-wireframe-light.css +31 -4
- package/dist/styles/wireframe-dark.css +1671 -1448
- package/dist/styles/wireframe-light.css +1671 -1448
- package/dist/types/components/AgentTaskList/AgentTaskList.d.ts +1 -1
- package/dist/types/components/BadgeNumber/BadgeNumber.d.ts +17 -0
- package/dist/types/components/BadgeNumber/BadgeNumber.d.ts.map +1 -0
- package/dist/types/components/BadgeNumber/index.d.ts +3 -0
- package/dist/types/components/BadgeNumber/index.d.ts.map +1 -0
- package/dist/types/components/ChatMessage/ChatMessage.d.ts +130 -0
- package/dist/types/components/ChatMessage/ChatMessage.d.ts.map +1 -0
- package/dist/types/components/ChatMessage/index.d.ts +2 -0
- package/dist/types/components/ChatMessage/index.d.ts.map +1 -0
- package/dist/types/components/ChatMessageList/ChatMessageList.d.ts +2 -2
- package/dist/types/components/ChatMessageList/ChatMessageList.d.ts.map +1 -1
- package/dist/types/components/ChatMessageStack/ChatMessageStack.d.ts +46 -0
- package/dist/types/components/ChatMessageStack/ChatMessageStack.d.ts.map +1 -0
- package/dist/types/components/ChatMessageStack/index.d.ts +2 -0
- package/dist/types/components/ChatMessageStack/index.d.ts.map +1 -0
- package/dist/types/components/ChatPhotoGrid/ChatPhotoGrid.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +12 -0
- package/dist/types/components/Menu/Menu.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +3 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/utils/useLongPress.d.ts +28 -0
- package/dist/types/utils/useLongPress.d.ts.map +1 -0
- package/package.json +1 -1
- package/tokens/t3-semantics/ui.json +29 -0
- package/tokens/t4-components/badge-number.json +48 -0
- package/tokens/t4-components/chatbubble.json +33 -7
- package/tokens/t4-components/chatphotogrid.json +2 -2
- package/dist/cjs/components/ChatBubble/ChatBubble.js +0 -37
- package/dist/cjs/components/ChatBubble/ChatBubble.js.map +0 -1
- package/dist/cjs/components/ChatBubble/index.js +0 -6
- package/dist/cjs/components/ChatBubble/index.js.map +0 -1
- package/dist/esm/components/ChatBubble/ChatBubble.js +0 -33
- package/dist/esm/components/ChatBubble/ChatBubble.js.map +0 -1
- package/dist/esm/components/ChatBubble/index.js +0 -2
- package/dist/esm/components/ChatBubble/index.js.map +0 -1
- package/dist/types/components/ChatBubble/ChatBubble.d.ts +0 -85
- package/dist/types/components/ChatBubble/ChatBubble.d.ts.map +0 -1
- package/dist/types/components/ChatBubble/index.d.ts +0 -2
- package/dist/types/components/ChatBubble/index.d.ts.map +0 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* BadgeNumber Component Styles - Using Muka Design Tokens */
|
|
2
|
+
|
|
3
|
+
.muka-badge-number {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
border-radius: var(--border-radius-full);
|
|
8
|
+
white-space: nowrap;
|
|
9
|
+
user-select: none;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
* Sizes — fixed height, matching min-width (so a single digit renders as a
|
|
15
|
+
* circle), horizontal padding, and bold label typography. Vertical centering
|
|
16
|
+
* is handled by the fixed height + align-items: center.
|
|
17
|
+
*/
|
|
18
|
+
.muka-badge-number--2xs {
|
|
19
|
+
height: var(--badge-number-size-2xs);
|
|
20
|
+
min-width: var(--badge-number-size-2xs);
|
|
21
|
+
padding: 0 var(--badge-number-padding-2xs);
|
|
22
|
+
font-family: var(--text-label-xs-bold-fontFamily);
|
|
23
|
+
font-weight: var(--text-label-xs-bold-fontWeight);
|
|
24
|
+
font-size: var(--text-label-xs-bold-fontSize);
|
|
25
|
+
line-height: var(--text-label-xs-bold-lineHeight);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.muka-badge-number--xs {
|
|
29
|
+
height: var(--badge-number-size-xs);
|
|
30
|
+
min-width: var(--badge-number-size-xs);
|
|
31
|
+
padding: 0 var(--badge-number-padding-xs);
|
|
32
|
+
font-family: var(--text-label-sm-bold-fontFamily);
|
|
33
|
+
font-weight: var(--text-label-sm-bold-fontWeight);
|
|
34
|
+
font-size: var(--text-label-sm-bold-fontSize);
|
|
35
|
+
line-height: var(--text-label-sm-bold-lineHeight);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.muka-badge-number--sm {
|
|
39
|
+
height: var(--badge-number-size-sm);
|
|
40
|
+
min-width: var(--badge-number-size-sm);
|
|
41
|
+
padding: 0 var(--badge-number-padding-sm);
|
|
42
|
+
font-family: var(--text-label-md-bold-fontFamily);
|
|
43
|
+
font-weight: var(--text-label-md-bold-fontWeight);
|
|
44
|
+
font-size: var(--text-label-md-bold-fontSize);
|
|
45
|
+
line-height: var(--text-label-md-bold-lineHeight);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.muka-badge-number--md {
|
|
49
|
+
height: var(--badge-number-size-md);
|
|
50
|
+
min-width: var(--badge-number-size-md);
|
|
51
|
+
padding: 0 var(--badge-number-padding-md);
|
|
52
|
+
font-family: var(--text-label-lg-bold-fontFamily);
|
|
53
|
+
font-weight: var(--text-label-lg-bold-fontWeight);
|
|
54
|
+
font-size: var(--text-label-lg-bold-fontSize);
|
|
55
|
+
line-height: var(--text-label-lg-bold-lineHeight);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.muka-badge-number--lg {
|
|
59
|
+
height: var(--badge-number-size-lg);
|
|
60
|
+
min-width: var(--badge-number-size-lg);
|
|
61
|
+
padding: 0 var(--badge-number-padding-lg);
|
|
62
|
+
font-family: var(--text-label-2xl-bold-fontFamily);
|
|
63
|
+
font-weight: var(--text-label-2xl-bold-fontWeight);
|
|
64
|
+
font-size: var(--text-label-2xl-bold-fontSize);
|
|
65
|
+
line-height: var(--text-label-2xl-bold-lineHeight);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.muka-badge-number__label {
|
|
69
|
+
/*
|
|
70
|
+
* The badge sets a tight line-height for compact sizing, which would clip
|
|
71
|
+
* glyph descenders; give the label a roomier line-height. Vertical centering
|
|
72
|
+
* is unaffected because the badge height is fixed and content is centered.
|
|
73
|
+
*/
|
|
74
|
+
line-height: normal;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Neutral variant */
|
|
78
|
+
.muka-badge-number--neutral {
|
|
79
|
+
background-color: var(--color-surface-level1);
|
|
80
|
+
color: var(--color-text-default-default);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Info variant */
|
|
84
|
+
.muka-badge-number--info {
|
|
85
|
+
background-color: var(--color-state-info-contrast);
|
|
86
|
+
color: var(--color-text-default-inverse);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* Success variant */
|
|
90
|
+
.muka-badge-number--success {
|
|
91
|
+
background-color: var(--color-state-success-contrast);
|
|
92
|
+
color: var(--color-text-default-inverse);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Warning variant */
|
|
96
|
+
.muka-badge-number--warning {
|
|
97
|
+
background-color: var(--color-state-warning-contrast);
|
|
98
|
+
color: var(--color-text-default-inverse);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Error variant */
|
|
102
|
+
.muka-badge-number--error {
|
|
103
|
+
background-color: var(--color-state-error-contrast);
|
|
104
|
+
color: var(--color-text-default-inverse);
|
|
105
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './BadgeNumber.css';
|
|
3
|
+
export const BadgeNumber = ({ children, variant = 'neutral', size = '2xs', className = '', 'aria-label': ariaLabel, ...props }) => {
|
|
4
|
+
const classes = [
|
|
5
|
+
'muka-badge-number',
|
|
6
|
+
`muka-badge-number--${variant}`,
|
|
7
|
+
`muka-badge-number--${size}`,
|
|
8
|
+
className,
|
|
9
|
+
]
|
|
10
|
+
.filter(Boolean)
|
|
11
|
+
.join(' ');
|
|
12
|
+
return (_jsx("span", { className: classes, role: "status", "aria-label": ariaLabel, ...props, children: _jsx("span", { className: "muka-badge-number__label", children: children }) }));
|
|
13
|
+
};
|
|
14
|
+
export default BadgeNumber;
|
|
15
|
+
//# sourceMappingURL=BadgeNumber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeNumber.js","sourceRoot":"","sources":["../../../../components/BadgeNumber/BadgeNumber.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAe3B,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,QAAQ,EACR,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,KAAK,EACZ,SAAS,GAAG,EAAE,EACd,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,mBAAmB;QACnB,sBAAsB,OAAO,EAAE;QAC/B,sBAAsB,IAAI,EAAE;QAC5B,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,eAAM,SAAS,EAAE,OAAO,EAAE,IAAI,EAAC,QAAQ,gBAAa,SAAS,KAAM,KAAK,YACtE,eAAM,SAAS,EAAC,0BAA0B,YAAE,QAAQ,GAAQ,GACvD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/BadgeNumber/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,89 +1,107 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* ChatMessage Component Styles */
|
|
2
2
|
|
|
3
|
-
.muka-chat-
|
|
3
|
+
.muka-chat-message {
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: column;
|
|
6
6
|
width: 100%;
|
|
7
7
|
max-width: 100%;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
/* ─── Row: avatar rail + bubble
|
|
11
|
-
*
|
|
12
|
-
* A two-row grid rather than a flex column, so the avatar bottom-aligns to the
|
|
13
|
-
* bubble itself and not to the action bar underneath it (Figma 5223:8520).
|
|
14
|
-
*/
|
|
10
|
+
/* ─── Row: avatar rail + bubble ────────────────────────── */
|
|
15
11
|
|
|
16
|
-
.muka-chat-
|
|
12
|
+
.muka-chat-message__row {
|
|
17
13
|
display: grid;
|
|
18
14
|
grid-template-columns: minmax(0, 1fr);
|
|
19
|
-
grid-template-areas:
|
|
20
|
-
'bubble'
|
|
21
|
-
'actions';
|
|
15
|
+
grid-template-areas: 'bubble';
|
|
22
16
|
column-gap: var(--chatbubble-row-gap);
|
|
23
|
-
row-gap: var(--chatbubble-gap);
|
|
24
17
|
width: 100%;
|
|
25
18
|
}
|
|
26
19
|
|
|
27
|
-
.muka-chat-
|
|
20
|
+
.muka-chat-message--has-avatar .muka-chat-message__row {
|
|
28
21
|
grid-template-columns: auto minmax(0, 1fr);
|
|
29
|
-
grid-template-areas:
|
|
30
|
-
'rail bubble'
|
|
31
|
-
'. actions';
|
|
22
|
+
grid-template-areas: 'rail bubble';
|
|
32
23
|
}
|
|
33
24
|
|
|
34
|
-
.muka-chat-
|
|
25
|
+
.muka-chat-message--own.muka-chat-message--has-avatar .muka-chat-message__row {
|
|
35
26
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
36
|
-
grid-template-areas:
|
|
37
|
-
'bubble rail'
|
|
38
|
-
'actions .';
|
|
27
|
+
grid-template-areas: 'bubble rail';
|
|
39
28
|
}
|
|
40
29
|
|
|
41
|
-
.muka-chat-
|
|
30
|
+
.muka-chat-message__rail {
|
|
42
31
|
grid-area: rail;
|
|
43
|
-
/* Sits on the bubble's baseline
|
|
32
|
+
/* Sits on the bubble's baseline (Figma 5355:44091) */
|
|
44
33
|
align-self: end;
|
|
45
34
|
display: flex;
|
|
46
35
|
justify-content: center;
|
|
47
36
|
min-width: var(--chatbubble-avatar-size);
|
|
48
37
|
}
|
|
49
38
|
|
|
39
|
+
/*
|
|
40
|
+
* The Small size in Figma (5373:44702) halves the avatar to 32px and tightens
|
|
41
|
+
* the gap to the bubble. Size the avatar itself, not just the rail, so the
|
|
42
|
+
* bubbles keep their alignment. The header row keeps its own gap.
|
|
43
|
+
*/
|
|
44
|
+
@media (max-width: 1023px) {
|
|
45
|
+
.muka-chat-message__row {
|
|
46
|
+
column-gap: var(--chatbubble-row-gap-compact);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.muka-chat-message__rail {
|
|
50
|
+
min-width: var(--chatbubble-avatar-size-compact);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Outweighs the avatar's own size class, which sets width/height directly */
|
|
54
|
+
.muka-chat-message .muka-chat-message__rail > * {
|
|
55
|
+
width: var(--chatbubble-avatar-size-compact);
|
|
56
|
+
height: var(--chatbubble-avatar-size-compact);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
50
60
|
/* ─── Bubble surface ───────────────────────────────────── */
|
|
51
61
|
|
|
52
|
-
.muka-chat-
|
|
62
|
+
.muka-chat-message__bubble {
|
|
53
63
|
grid-area: bubble;
|
|
54
64
|
max-width: var(--chatbubble-max-width);
|
|
55
65
|
position: relative;
|
|
56
66
|
display: flex;
|
|
57
67
|
flex-direction: column;
|
|
58
68
|
gap: var(--chatbubble-gap);
|
|
59
|
-
|
|
60
|
-
padding: var(--chatbubble-padding);
|
|
69
|
+
padding: var(--chatbubble-padding-block) var(--chatbubble-padding-inline);
|
|
61
70
|
border-radius: var(--chatbubble-radius);
|
|
62
71
|
border: var(--border-width-regular) solid transparent;
|
|
72
|
+
box-shadow: var(--shadow-level2);
|
|
63
73
|
word-break: break-word;
|
|
64
74
|
}
|
|
65
75
|
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
/*
|
|
77
|
+
* Length axis (Figma `Text length` on 5355:44091): short messages hug their
|
|
78
|
+
* content, long ones fill the row up to the shared max width.
|
|
79
|
+
*/
|
|
80
|
+
.muka-chat-message--long .muka-chat-message__bubble {
|
|
81
|
+
width: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.muka-chat-message--short .muka-chat-message__bubble {
|
|
85
|
+
width: fit-content;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.muka-chat-message--own .muka-chat-message__bubble {
|
|
68
89
|
justify-self: end;
|
|
69
90
|
}
|
|
70
91
|
|
|
71
|
-
.muka-chat-
|
|
92
|
+
.muka-chat-message--own .muka-chat-message__bubble {
|
|
72
93
|
background-color: var(--chatbubble-color-own-background);
|
|
73
94
|
border-color: var(--chatbubble-color-own-border);
|
|
74
95
|
color: var(--chatbubble-color-own-foreground);
|
|
75
|
-
/* Room for the inset timestamp in the bottom-right corner */
|
|
76
|
-
padding-right: var(--spacing-6);
|
|
77
96
|
}
|
|
78
97
|
|
|
79
|
-
.muka-chat-
|
|
98
|
+
.muka-chat-message--peer .muka-chat-message__bubble {
|
|
80
99
|
background-color: var(--chatbubble-color-peer-background);
|
|
81
100
|
border-color: var(--chatbubble-color-peer-border);
|
|
82
101
|
color: var(--chatbubble-color-peer-foreground);
|
|
83
|
-
box-shadow: var(--shadow-level2);
|
|
84
102
|
}
|
|
85
103
|
|
|
86
|
-
.muka-chat-
|
|
104
|
+
.muka-chat-message--agent .muka-chat-message__bubble {
|
|
87
105
|
background-color: var(--chatbubble-color-agent-background);
|
|
88
106
|
border-color: var(--chatbubble-color-agent-border);
|
|
89
107
|
color: var(--chatbubble-color-agent-foreground);
|
|
@@ -91,21 +109,21 @@
|
|
|
91
109
|
|
|
92
110
|
/* ─── Header row (author · meta · time · badge) ────────── */
|
|
93
111
|
|
|
94
|
-
.muka-chat-
|
|
112
|
+
.muka-chat-message__header {
|
|
95
113
|
display: flex;
|
|
96
114
|
flex-flow: row wrap;
|
|
97
115
|
align-items: center;
|
|
98
116
|
gap: var(--chatbubble-row-gap);
|
|
99
117
|
}
|
|
100
118
|
|
|
101
|
-
.muka-chat-
|
|
119
|
+
.muka-chat-message__author {
|
|
102
120
|
font-family: var(--text-body-base-bold-fontFamily);
|
|
103
121
|
font-weight: var(--text-body-base-bold-fontWeight);
|
|
104
122
|
font-size: var(--text-body-base-bold-fontSize);
|
|
105
123
|
line-height: var(--text-body-base-bold-lineHeight);
|
|
106
124
|
}
|
|
107
125
|
|
|
108
|
-
.muka-chat-
|
|
126
|
+
.muka-chat-message__author-meta {
|
|
109
127
|
/* Inherits the variant's body colour from the bubble */
|
|
110
128
|
color: inherit;
|
|
111
129
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
@@ -114,7 +132,7 @@
|
|
|
114
132
|
line-height: var(--text-body-base-regular-lineHeight);
|
|
115
133
|
}
|
|
116
134
|
|
|
117
|
-
.muka-chat-
|
|
135
|
+
.muka-chat-message__badge {
|
|
118
136
|
display: inline-flex;
|
|
119
137
|
align-items: center;
|
|
120
138
|
}
|
|
@@ -123,30 +141,30 @@
|
|
|
123
141
|
* Keep the first line of content clear of the absolutely positioned menu
|
|
124
142
|
* button in the bubble's top-right corner.
|
|
125
143
|
*/
|
|
126
|
-
.muka-chat-
|
|
127
|
-
.muka-chat-
|
|
128
|
-
padding-right: var(--spacing-
|
|
144
|
+
.muka-chat-message--has-menu .muka-chat-message__header,
|
|
145
|
+
.muka-chat-message--has-menu.muka-chat-message--no-header .muka-chat-message__message {
|
|
146
|
+
padding-right: var(--spacing-10);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* …and the last line clear of the inset timestamp in the bottom-right corner */
|
|
150
|
+
.muka-chat-message--has-timestamp .muka-chat-message__message {
|
|
151
|
+
padding-right: var(--spacing-10);
|
|
129
152
|
}
|
|
130
153
|
|
|
131
154
|
/* ─── Body ─────────────────────────────────────────────── */
|
|
132
155
|
|
|
133
|
-
.muka-chat-
|
|
156
|
+
.muka-chat-message__body {
|
|
134
157
|
display: flex;
|
|
135
158
|
flex-direction: column;
|
|
136
159
|
gap: var(--chatbubble-gap);
|
|
137
160
|
min-width: 0;
|
|
138
161
|
}
|
|
139
162
|
|
|
140
|
-
|
|
141
|
-
.muka-chat-bubble--agent .muka-chat-bubble__body {
|
|
142
|
-
gap: var(--chatbubble-body-gap);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.muka-chat-bubble__media {
|
|
163
|
+
.muka-chat-message__media {
|
|
146
164
|
min-width: 0;
|
|
147
165
|
}
|
|
148
166
|
|
|
149
|
-
.muka-chat-
|
|
167
|
+
.muka-chat-message__message {
|
|
150
168
|
font-family: var(--text-body-base-regular-fontFamily);
|
|
151
169
|
font-weight: var(--text-body-base-regular-fontWeight);
|
|
152
170
|
font-size: var(--text-body-base-regular-fontSize);
|
|
@@ -156,18 +174,20 @@
|
|
|
156
174
|
}
|
|
157
175
|
|
|
158
176
|
/* Empty message block should not add a gap of its own */
|
|
159
|
-
.muka-chat-
|
|
177
|
+
.muka-chat-message__message:empty {
|
|
160
178
|
display: none;
|
|
161
179
|
}
|
|
162
180
|
|
|
163
181
|
/* ─── Embedded card ────────────────────────────────────── */
|
|
164
182
|
|
|
165
|
-
.muka-chat-
|
|
183
|
+
.muka-chat-message__embed {
|
|
166
184
|
position: relative;
|
|
167
185
|
display: flex;
|
|
168
186
|
flex-direction: column;
|
|
169
187
|
gap: var(--chatbubble-embed-gap);
|
|
170
|
-
|
|
188
|
+
/* The card is inset from the blocks above and below it (Figma 5289:40562) */
|
|
189
|
+
margin-block: var(--chatbubble-embed-margin-block);
|
|
190
|
+
padding: var(--chatbubble-embed-padding-block) var(--chatbubble-embed-padding-inline);
|
|
171
191
|
border-radius: var(--chatbubble-embed-radius);
|
|
172
192
|
border: var(--border-width-regular) solid transparent;
|
|
173
193
|
}
|
|
@@ -176,125 +196,133 @@
|
|
|
176
196
|
* The embed sits on the raised surface of its author's role, one step apart
|
|
177
197
|
* from the bubble it is nested in, and reuses that role's border colour.
|
|
178
198
|
*/
|
|
179
|
-
.muka-chat-
|
|
199
|
+
.muka-chat-message--own .muka-chat-message__embed {
|
|
180
200
|
background-color: var(--chatbubble-embed-color-own-background);
|
|
181
201
|
border-color: var(--chatbubble-embed-color-own-border);
|
|
182
202
|
color: var(--chatbubble-embed-color-own-foreground);
|
|
183
203
|
}
|
|
184
204
|
|
|
185
|
-
.muka-chat-
|
|
205
|
+
.muka-chat-message--peer .muka-chat-message__embed {
|
|
186
206
|
background-color: var(--chatbubble-embed-color-peer-background);
|
|
187
207
|
border-color: var(--chatbubble-embed-color-peer-border);
|
|
188
208
|
color: var(--chatbubble-embed-color-peer-foreground);
|
|
189
209
|
}
|
|
190
210
|
|
|
191
|
-
.muka-chat-
|
|
211
|
+
.muka-chat-message--agent .muka-chat-message__embed {
|
|
192
212
|
background-color: var(--chatbubble-embed-color-agent-background);
|
|
193
213
|
border-color: var(--chatbubble-embed-color-agent-border);
|
|
194
214
|
color: var(--chatbubble-embed-color-agent-foreground);
|
|
195
215
|
}
|
|
196
216
|
|
|
197
|
-
.muka-chat-
|
|
217
|
+
.muka-chat-message__embed-content {
|
|
198
218
|
display: flex;
|
|
199
219
|
flex-direction: column;
|
|
200
220
|
gap: var(--chatbubble-embed-gap);
|
|
201
221
|
min-width: 0;
|
|
202
222
|
}
|
|
203
223
|
|
|
204
|
-
.muka-chat-
|
|
224
|
+
.muka-chat-message__embed-copy {
|
|
205
225
|
position: absolute;
|
|
206
|
-
top: var(--chatbubble-embed-padding);
|
|
207
|
-
right: var(--chatbubble-embed-padding);
|
|
226
|
+
top: var(--chatbubble-embed-padding-block);
|
|
227
|
+
right: var(--chatbubble-embed-padding-inline);
|
|
208
228
|
}
|
|
209
229
|
|
|
210
230
|
/* ─── Stacked full-width action buttons ────────────────── */
|
|
211
231
|
|
|
212
|
-
.muka-chat-
|
|
232
|
+
.muka-chat-message__action-stack {
|
|
213
233
|
display: flex;
|
|
214
234
|
flex-direction: column;
|
|
215
235
|
gap: var(--chatbubble-action-stack-gap);
|
|
216
236
|
}
|
|
217
237
|
|
|
218
|
-
/* ─── Inset timestamp
|
|
238
|
+
/* ─── Inset timestamp ──────────────────────────────────── */
|
|
239
|
+
|
|
240
|
+
/*
|
|
241
|
+
* Every author puts its timestamp in the bubble's bottom-right corner, below
|
|
242
|
+
* the message — never in the header row (Figma 5355:44091).
|
|
243
|
+
*/
|
|
219
244
|
|
|
220
|
-
.muka-chat-
|
|
245
|
+
.muka-chat-message__timestamp {
|
|
221
246
|
color: var(--chatbubble-color-timestamp);
|
|
222
|
-
font-family: var(--text-body-
|
|
223
|
-
font-weight: var(--text-body-
|
|
224
|
-
font-size: var(--text-body-
|
|
225
|
-
line-height: var(--text-body-
|
|
247
|
+
font-family: var(--text-body-xs-regular-fontFamily);
|
|
248
|
+
font-weight: var(--text-body-xs-regular-fontWeight);
|
|
249
|
+
font-size: var(--text-body-xs-regular-fontSize);
|
|
250
|
+
line-height: var(--text-body-xs-regular-lineHeight);
|
|
226
251
|
white-space: nowrap;
|
|
227
252
|
}
|
|
228
253
|
|
|
229
|
-
|
|
230
|
-
|
|
254
|
+
/*
|
|
255
|
+
* Pinned to the corner rather than stacked below the message, so a one-line
|
|
256
|
+
* message stays one line tall. The message reserves the width it needs.
|
|
257
|
+
*/
|
|
258
|
+
.muka-chat-message__timestamp--inset {
|
|
259
|
+
position: absolute;
|
|
260
|
+
right: var(--spacing-2);
|
|
261
|
+
bottom: var(--spacing-1);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/*
|
|
265
|
+
* Media, an embed or an action stack run the full width of the bubble, so the
|
|
266
|
+
* corner the timestamp sits in has to be cleared for it.
|
|
267
|
+
*/
|
|
268
|
+
.muka-chat-message--has-timestamp.muka-chat-message--has-blocks .muka-chat-message__body {
|
|
269
|
+
padding-bottom: var(--text-body-xs-regular-lineHeight);
|
|
231
270
|
}
|
|
232
271
|
|
|
233
272
|
/* ─── Menu affordance ──────────────────────────────────── */
|
|
234
273
|
|
|
235
|
-
|
|
274
|
+
/*
|
|
275
|
+
* Hidden at rest. Revealed on hover on pointer devices, on keyboard focus
|
|
276
|
+
* everywhere, and pinned while its menu is open. On touch the equivalent
|
|
277
|
+
* affordance is a long-press on the bubble, which opens an ActionSheet.
|
|
278
|
+
*/
|
|
279
|
+
.muka-chat-message__menu {
|
|
236
280
|
position: absolute;
|
|
237
281
|
top: var(--spacing-1);
|
|
238
282
|
right: var(--spacing-1);
|
|
283
|
+
opacity: 0;
|
|
284
|
+
pointer-events: none;
|
|
239
285
|
}
|
|
240
286
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
max-width: var(--chatbubble-max-width);
|
|
246
|
-
display: flex;
|
|
247
|
-
align-items: center;
|
|
248
|
-
gap: 0;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.muka-chat-bubble--own .muka-chat-bubble__actions,
|
|
252
|
-
.muka-chat-bubble--agent .muka-chat-bubble__actions {
|
|
253
|
-
justify-content: flex-end;
|
|
287
|
+
.muka-chat-message__menu:focus-within,
|
|
288
|
+
.muka-chat-message--menu-open .muka-chat-message__menu {
|
|
289
|
+
opacity: 1;
|
|
290
|
+
pointer-events: auto;
|
|
254
291
|
}
|
|
255
292
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
position: relative;
|
|
293
|
+
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
|
|
294
|
+
.muka-chat-message__bubble:hover .muka-chat-message__menu {
|
|
295
|
+
opacity: 1;
|
|
296
|
+
pointer-events: auto;
|
|
297
|
+
}
|
|
262
298
|
}
|
|
263
299
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
width: 44px;
|
|
270
|
-
height: 44px;
|
|
271
|
-
transform: translate(-50%, -50%);
|
|
300
|
+
/* Suppress iOS Safari's own callout so the long-press sheet can take over */
|
|
301
|
+
@media (pointer: coarse) {
|
|
302
|
+
.muka-chat-message--has-menu .muka-chat-message__bubble {
|
|
303
|
+
-webkit-touch-callout: none;
|
|
304
|
+
}
|
|
272
305
|
}
|
|
273
306
|
|
|
274
307
|
/* ─── Print ────────────────────────────────────────────── */
|
|
275
308
|
|
|
276
309
|
@media print {
|
|
277
|
-
.muka-chat-
|
|
310
|
+
.muka-chat-message__bubble {
|
|
278
311
|
box-shadow: none;
|
|
279
312
|
break-inside: avoid;
|
|
280
313
|
print-color-adjust: exact;
|
|
281
314
|
-webkit-print-color-adjust: exact;
|
|
282
315
|
}
|
|
283
316
|
|
|
284
|
-
.muka-chat-
|
|
317
|
+
.muka-chat-message__embed {
|
|
285
318
|
break-inside: avoid;
|
|
286
319
|
print-color-adjust: exact;
|
|
287
320
|
-webkit-print-color-adjust: exact;
|
|
288
321
|
}
|
|
289
322
|
|
|
290
|
-
.muka-chat-
|
|
291
|
-
.muka-chat-
|
|
292
|
-
.muka-chat-
|
|
293
|
-
.muka-chat-bubble__action-stack {
|
|
323
|
+
.muka-chat-message__menu,
|
|
324
|
+
.muka-chat-message__embed-copy,
|
|
325
|
+
.muka-chat-message__action-stack {
|
|
294
326
|
display: none;
|
|
295
327
|
}
|
|
296
|
-
|
|
297
|
-
.muka-chat-bubble__column {
|
|
298
|
-
max-width: 100%;
|
|
299
|
-
}
|
|
300
328
|
}
|