@revikornmann/muka-ui 0.11.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.
Files changed (150) hide show
  1. package/build/manifest.json +30 -0
  2. package/dist/cjs/components/AgentTaskList/AgentTaskList.css +22 -3
  3. package/dist/cjs/components/AgentTaskList/AgentTaskList.js +1 -1
  4. package/dist/cjs/components/BadgeNumber/BadgeNumber.css +105 -0
  5. package/dist/cjs/components/BadgeNumber/BadgeNumber.js +19 -0
  6. package/dist/cjs/components/BadgeNumber/BadgeNumber.js.map +1 -0
  7. package/dist/cjs/components/BadgeNumber/index.js +11 -0
  8. package/dist/cjs/components/BadgeNumber/index.js.map +1 -0
  9. package/dist/cjs/components/BottomBar/BottomBar.css +8 -5
  10. package/dist/cjs/components/Button/Button.css +13 -6
  11. package/dist/cjs/components/Button/Button.js +1 -1
  12. package/dist/cjs/components/ChatComposer/ChatComposer.css +13 -1
  13. package/dist/cjs/components/ChatMessage/ChatMessage.css +328 -0
  14. package/dist/cjs/components/ChatMessage/ChatMessage.js +141 -0
  15. package/dist/cjs/components/ChatMessage/ChatMessage.js.map +1 -0
  16. package/dist/cjs/components/ChatMessage/index.js +7 -0
  17. package/dist/cjs/components/ChatMessage/index.js.map +1 -0
  18. package/dist/cjs/components/ChatMessageList/ChatMessageList.css +17 -1
  19. package/dist/cjs/components/ChatMessageList/ChatMessageList.js +1 -1
  20. package/dist/cjs/components/ChatMessageStack/ChatMessageStack.css +51 -0
  21. package/dist/cjs/components/ChatMessageStack/ChatMessageStack.js +49 -0
  22. package/dist/cjs/components/ChatMessageStack/ChatMessageStack.js.map +1 -0
  23. package/dist/cjs/components/ChatMessageStack/index.js +6 -0
  24. package/dist/cjs/components/ChatMessageStack/index.js.map +1 -0
  25. package/dist/cjs/components/ChatPhotoGrid/ChatPhotoGrid.css +119 -0
  26. package/dist/cjs/components/ChatPhotoGrid/ChatPhotoGrid.js +47 -0
  27. package/dist/cjs/components/ChatPhotoGrid/ChatPhotoGrid.js.map +1 -0
  28. package/dist/cjs/components/ChatPhotoGrid/index.js +11 -0
  29. package/dist/cjs/components/ChatPhotoGrid/index.js.map +1 -0
  30. package/dist/cjs/components/Menu/Menu.js +5 -4
  31. package/dist/cjs/components/Menu/Menu.js.map +1 -1
  32. package/dist/cjs/components/index.js +11 -5
  33. package/dist/cjs/components/index.js.map +1 -1
  34. package/dist/cjs/utils/useLongPress.js +71 -0
  35. package/dist/cjs/utils/useLongPress.js.map +1 -0
  36. package/dist/esm/components/AgentTaskList/AgentTaskList.css +22 -3
  37. package/dist/esm/components/AgentTaskList/AgentTaskList.js +1 -1
  38. package/dist/esm/components/BadgeNumber/BadgeNumber.css +105 -0
  39. package/dist/esm/components/BadgeNumber/BadgeNumber.js +15 -0
  40. package/dist/esm/components/BadgeNumber/BadgeNumber.js.map +1 -0
  41. package/dist/esm/components/BadgeNumber/index.js +3 -0
  42. package/dist/esm/components/BadgeNumber/index.js.map +1 -0
  43. package/dist/esm/components/BottomBar/BottomBar.css +8 -5
  44. package/dist/esm/components/Button/Button.css +13 -6
  45. package/dist/esm/components/Button/Button.js +1 -1
  46. package/dist/esm/components/ChatComposer/ChatComposer.css +13 -1
  47. package/dist/esm/components/ChatMessage/ChatMessage.css +328 -0
  48. package/dist/esm/components/ChatMessage/ChatMessage.js +137 -0
  49. package/dist/esm/components/ChatMessage/ChatMessage.js.map +1 -0
  50. package/dist/esm/components/ChatMessage/index.js +2 -0
  51. package/dist/esm/components/ChatMessage/index.js.map +1 -0
  52. package/dist/esm/components/ChatMessageList/ChatMessageList.css +17 -1
  53. package/dist/esm/components/ChatMessageList/ChatMessageList.js +1 -1
  54. package/dist/esm/components/ChatMessageStack/ChatMessageStack.css +51 -0
  55. package/dist/esm/components/ChatMessageStack/ChatMessageStack.js +42 -0
  56. package/dist/esm/components/ChatMessageStack/ChatMessageStack.js.map +1 -0
  57. package/dist/esm/components/ChatMessageStack/index.js +2 -0
  58. package/dist/esm/components/ChatMessageStack/index.js.map +1 -0
  59. package/dist/esm/components/ChatPhotoGrid/ChatPhotoGrid.css +119 -0
  60. package/dist/esm/components/ChatPhotoGrid/ChatPhotoGrid.js +43 -0
  61. package/dist/esm/components/ChatPhotoGrid/ChatPhotoGrid.js.map +1 -0
  62. package/dist/esm/components/ChatPhotoGrid/index.js +3 -0
  63. package/dist/esm/components/ChatPhotoGrid/index.js.map +1 -0
  64. package/dist/esm/components/Menu/Menu.js +5 -4
  65. package/dist/esm/components/Menu/Menu.js.map +1 -1
  66. package/dist/esm/components/index.js +4 -1
  67. package/dist/esm/components/index.js.map +1 -1
  68. package/dist/esm/utils/useLongPress.js +68 -0
  69. package/dist/esm/utils/useLongPress.js.map +1 -0
  70. package/dist/styles/components/AgentTaskList.css +22 -3
  71. package/dist/styles/components/BadgeNumber.css +105 -0
  72. package/dist/styles/components/BottomBar.css +8 -5
  73. package/dist/styles/components/Button.css +13 -6
  74. package/dist/styles/components/ChatComposer.css +13 -1
  75. package/dist/styles/components/ChatMessage.css +328 -0
  76. package/dist/styles/components/ChatMessageList.css +17 -1
  77. package/dist/styles/components/ChatMessageStack.css +51 -0
  78. package/dist/styles/components/ChatPhotoGrid.css +119 -0
  79. package/dist/styles/index.css +2615 -1941
  80. package/dist/styles/muka-dark.css +2615 -1941
  81. package/dist/styles/muka-light.css +2615 -1941
  82. package/dist/styles/tokens-bouwplan-dark.css +85 -0
  83. package/dist/styles/tokens-bouwplan-light.css +85 -0
  84. package/dist/styles/tokens-fscl-dark.css +85 -0
  85. package/dist/styles/tokens-fscl-light.css +85 -0
  86. package/dist/styles/tokens-grip-dark.css +85 -0
  87. package/dist/styles/tokens-grip-light.css +85 -0
  88. package/dist/styles/tokens-muka-dark.css +85 -0
  89. package/dist/styles/tokens-muka-light.css +85 -0
  90. package/dist/styles/tokens-wireframe-dark.css +85 -0
  91. package/dist/styles/tokens-wireframe-light.css +85 -0
  92. package/dist/styles/wireframe-dark.css +2615 -1941
  93. package/dist/styles/wireframe-light.css +2615 -1941
  94. package/dist/types/components/AgentTaskList/AgentTaskList.d.ts +1 -1
  95. package/dist/types/components/BadgeNumber/BadgeNumber.d.ts +17 -0
  96. package/dist/types/components/BadgeNumber/BadgeNumber.d.ts.map +1 -0
  97. package/dist/types/components/BadgeNumber/index.d.ts +3 -0
  98. package/dist/types/components/BadgeNumber/index.d.ts.map +1 -0
  99. package/dist/types/components/Button/Button.d.ts +1 -1
  100. package/dist/types/components/ChatMessage/ChatMessage.d.ts +130 -0
  101. package/dist/types/components/ChatMessage/ChatMessage.d.ts.map +1 -0
  102. package/dist/types/components/ChatMessage/index.d.ts +2 -0
  103. package/dist/types/components/ChatMessage/index.d.ts.map +1 -0
  104. package/dist/types/components/ChatMessageList/ChatMessageList.d.ts +2 -2
  105. package/dist/types/components/ChatMessageList/ChatMessageList.d.ts.map +1 -1
  106. package/dist/types/components/ChatMessageStack/ChatMessageStack.d.ts +46 -0
  107. package/dist/types/components/ChatMessageStack/ChatMessageStack.d.ts.map +1 -0
  108. package/dist/types/components/ChatMessageStack/index.d.ts +2 -0
  109. package/dist/types/components/ChatMessageStack/index.d.ts.map +1 -0
  110. package/dist/types/components/ChatPhotoGrid/ChatPhotoGrid.d.ts +44 -0
  111. package/dist/types/components/ChatPhotoGrid/ChatPhotoGrid.d.ts.map +1 -0
  112. package/dist/types/components/ChatPhotoGrid/index.d.ts +3 -0
  113. package/dist/types/components/ChatPhotoGrid/index.d.ts.map +1 -0
  114. package/dist/types/components/Menu/Menu.d.ts +12 -0
  115. package/dist/types/components/Menu/Menu.d.ts.map +1 -1
  116. package/dist/types/components/index.d.ts +4 -1
  117. package/dist/types/components/index.d.ts.map +1 -1
  118. package/dist/types/utils/useLongPress.d.ts +28 -0
  119. package/dist/types/utils/useLongPress.d.ts.map +1 -0
  120. package/package.json +1 -1
  121. package/tokens/README.md +14 -0
  122. package/tokens/t2-alias/brand/bouwplan/dark.json +24 -0
  123. package/tokens/t2-alias/brand/bouwplan/light.json +24 -0
  124. package/tokens/t2-alias/brand/fscl/dark.json +24 -0
  125. package/tokens/t2-alias/brand/fscl/light.json +24 -0
  126. package/tokens/t2-alias/brand/grip/dark.json +54 -0
  127. package/tokens/t2-alias/brand/grip/light.json +54 -0
  128. package/tokens/t2-alias/brand/muka/dark.json +54 -0
  129. package/tokens/t2-alias/brand/muka/light.json +54 -0
  130. package/tokens/t2-alias/brand/wireframe/dark.json +54 -0
  131. package/tokens/t2-alias/brand/wireframe/light.json +54 -0
  132. package/tokens/t3-semantics/ui.json +219 -0
  133. package/tokens/t4-components/badge-number.json +48 -0
  134. package/tokens/t4-components/chatbubble.json +180 -0
  135. package/tokens/t4-components/chatphotogrid.json +32 -0
  136. package/dist/cjs/components/ChatBubble/ChatBubble.css +0 -80
  137. package/dist/cjs/components/ChatBubble/ChatBubble.js +0 -24
  138. package/dist/cjs/components/ChatBubble/ChatBubble.js.map +0 -1
  139. package/dist/cjs/components/ChatBubble/index.js +0 -6
  140. package/dist/cjs/components/ChatBubble/index.js.map +0 -1
  141. package/dist/esm/components/ChatBubble/ChatBubble.css +0 -80
  142. package/dist/esm/components/ChatBubble/ChatBubble.js +0 -20
  143. package/dist/esm/components/ChatBubble/ChatBubble.js.map +0 -1
  144. package/dist/esm/components/ChatBubble/index.js +0 -2
  145. package/dist/esm/components/ChatBubble/index.js.map +0 -1
  146. package/dist/styles/components/ChatBubble.css +0 -80
  147. package/dist/types/components/ChatBubble/ChatBubble.d.ts +0 -30
  148. package/dist/types/components/ChatBubble/ChatBubble.d.ts.map +0 -1
  149. package/dist/types/components/ChatBubble/index.d.ts +0 -2
  150. package/dist/types/components/ChatBubble/index.d.ts.map +0 -1
@@ -0,0 +1,180 @@
1
+ {
2
+ "$schema": {
3
+ "$type": "other",
4
+ "$value": "https://design-tokens.org/schemas/1.0/schema.json"
5
+ },
6
+ "chatbubble": {
7
+ "max-width": {
8
+ "$type": "sizing",
9
+ "$value": "{container.max-width.sm}"
10
+ },
11
+ "radius": {
12
+ "$type": "borderRadius",
13
+ "$value": "{border.radius.lg}"
14
+ },
15
+ "padding": {
16
+ "block": {
17
+ "$type": "dimension",
18
+ "$value": "{spacing.3}"
19
+ },
20
+ "inline": {
21
+ "$type": "dimension",
22
+ "$value": "{spacing.4}"
23
+ }
24
+ },
25
+ "gap": {
26
+ "$type": "dimension",
27
+ "$value": "{spacing.1}"
28
+ },
29
+ "row": {
30
+ "gap": {
31
+ "$type": "dimension",
32
+ "$value": "{spacing.3}"
33
+ },
34
+ "gap-compact": {
35
+ "$type": "dimension",
36
+ "$value": "{spacing.2}"
37
+ }
38
+ },
39
+ "stack": {
40
+ "gap": {
41
+ "$type": "dimension",
42
+ "$value": "{spacing.3}"
43
+ }
44
+ },
45
+ "avatar": {
46
+ "size": {
47
+ "$type": "sizing",
48
+ "$value": "{size.4xl}"
49
+ },
50
+ "size-compact": {
51
+ "$type": "sizing",
52
+ "$value": "{size.2xl}"
53
+ }
54
+ },
55
+ "color": {
56
+ "own": {
57
+ "background": {
58
+ "$type": "color",
59
+ "$value": "{color.conversation.own.background}"
60
+ },
61
+ "border": {
62
+ "$type": "color",
63
+ "$value": "{color.conversation.own.border}"
64
+ },
65
+ "foreground": {
66
+ "$type": "color",
67
+ "$value": "{color.conversation.own.foreground}"
68
+ }
69
+ },
70
+ "peer": {
71
+ "background": {
72
+ "$type": "color",
73
+ "$value": "{color.conversation.peer.background}"
74
+ },
75
+ "border": {
76
+ "$type": "color",
77
+ "$value": "{color.conversation.peer.border}"
78
+ },
79
+ "foreground": {
80
+ "$type": "color",
81
+ "$value": "{color.conversation.peer.foreground}"
82
+ }
83
+ },
84
+ "agent": {
85
+ "background": {
86
+ "$type": "color",
87
+ "$value": "{color.conversation.agent.background}"
88
+ },
89
+ "border": {
90
+ "$type": "color",
91
+ "$value": "{color.conversation.agent.border}"
92
+ },
93
+ "foreground": {
94
+ "$type": "color",
95
+ "$value": "{color.conversation.agent.foreground}"
96
+ }
97
+ },
98
+ "timestamp": {
99
+ "$type": "color",
100
+ "$value": "{color.conversation.meta}"
101
+ }
102
+ },
103
+ "embed": {
104
+ "padding": {
105
+ "block": {
106
+ "$type": "dimension",
107
+ "$value": "{spacing.3}"
108
+ },
109
+ "inline": {
110
+ "$type": "dimension",
111
+ "$value": "{spacing.4}"
112
+ }
113
+ },
114
+ "margin": {
115
+ "block": {
116
+ "$type": "dimension",
117
+ "$value": "{spacing.3}"
118
+ }
119
+ },
120
+ "gap": {
121
+ "$type": "dimension",
122
+ "$value": "{spacing.2}"
123
+ },
124
+ "radius": {
125
+ "$type": "borderRadius",
126
+ "$value": "{border.radius.lg}"
127
+ },
128
+ "color": {
129
+ "own": {
130
+ "background": {
131
+ "$type": "color",
132
+ "$value": "{color.conversation.own.background-raised}"
133
+ },
134
+ "border": {
135
+ "$type": "color",
136
+ "$value": "{color.conversation.own.border}"
137
+ },
138
+ "foreground": {
139
+ "$type": "color",
140
+ "$value": "{color.conversation.own.foreground}"
141
+ }
142
+ },
143
+ "peer": {
144
+ "background": {
145
+ "$type": "color",
146
+ "$value": "{color.conversation.peer.background-raised}"
147
+ },
148
+ "border": {
149
+ "$type": "color",
150
+ "$value": "{color.conversation.peer.border}"
151
+ },
152
+ "foreground": {
153
+ "$type": "color",
154
+ "$value": "{color.conversation.peer.foreground}"
155
+ }
156
+ },
157
+ "agent": {
158
+ "background": {
159
+ "$type": "color",
160
+ "$value": "{color.conversation.agent.background-raised}"
161
+ },
162
+ "border": {
163
+ "$type": "color",
164
+ "$value": "{color.conversation.agent.border}"
165
+ },
166
+ "foreground": {
167
+ "$type": "color",
168
+ "$value": "{color.conversation.agent.foreground}"
169
+ }
170
+ }
171
+ }
172
+ },
173
+ "action-stack": {
174
+ "gap": {
175
+ "$type": "dimension",
176
+ "$value": "{spacing.3}"
177
+ }
178
+ }
179
+ }
180
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": {
3
+ "$type": "other",
4
+ "$value": "https://design-tokens.org/schemas/1.0/schema.json"
5
+ },
6
+ "chatphotogrid": {
7
+ "gap": {
8
+ "$type": "dimension",
9
+ "$value": "{spacing.1}"
10
+ },
11
+ "radius": {
12
+ "$type": "borderRadius",
13
+ "$value": "{border.radius.md}"
14
+ },
15
+ "color": {
16
+ "placeholder": {
17
+ "$type": "color",
18
+ "$value": "{color.surface.level2}"
19
+ },
20
+ "overflow": {
21
+ "background": {
22
+ "$type": "color",
23
+ "$value": "{color.surface.backdrop}"
24
+ },
25
+ "foreground": {
26
+ "$type": "color",
27
+ "$value": "{color.text.default.inverse}"
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -1,80 +0,0 @@
1
- /* ChatBubble Component Styles */
2
-
3
- .muka-chat-bubble {
4
- display: flex;
5
- flex-direction: column;
6
- gap: var(--spacing-1);
7
- width: 100%;
8
- max-width: 100%;
9
- }
10
-
11
- /* ─── User variant — right-aligned bubble ──────────────── */
12
-
13
- .muka-chat-bubble--user {
14
- align-items: flex-end;
15
- }
16
-
17
- .muka-chat-bubble--user .muka-chat-bubble__message {
18
- background-color: var(--color-surface-level2);
19
- color: var(--color-text-default-default);
20
- border-radius: var(--radius-lg);
21
- padding: var(--spacing-4);
22
- max-width: min(600px, 100%);
23
- word-break: break-word;
24
- }
25
-
26
- .muka-chat-bubble--user .muka-chat-bubble__meta {
27
- justify-content: flex-end;
28
- }
29
-
30
- /* ─── Agent variant — no bubble, full width ────────────── */
31
-
32
- .muka-chat-bubble--agent {
33
- align-items: flex-start;
34
- }
35
-
36
- .muka-chat-bubble--agent .muka-chat-bubble__message {
37
- color: var(--color-text-default-default);
38
- padding: 0 var(--spacing-2);
39
- width: 100%;
40
- word-break: break-word;
41
- }
42
-
43
- .muka-chat-bubble--agent .muka-chat-bubble__meta {
44
- justify-content: flex-start;
45
- }
46
-
47
- /* ─── Message typography ───────────────────────────────── */
48
-
49
- .muka-chat-bubble__message {
50
- font-family: var(--text-body-base-regular-fontFamily);
51
- font-weight: var(--text-body-base-regular-fontWeight);
52
- font-size: var(--text-body-base-regular-fontSize);
53
- line-height: var(--text-body-base-regular-lineHeight);
54
- }
55
-
56
- /* ─── Meta row (timestamp + actions) ───────────────────── */
57
-
58
- .muka-chat-bubble__meta {
59
- display: flex;
60
- align-items: center;
61
- gap: var(--spacing-1);
62
- }
63
-
64
- .muka-chat-bubble__timestamp {
65
- display: inline-flex;
66
- align-items: center;
67
- padding: 0 var(--spacing-2);
68
- color: var(--color-text-subtle-default);
69
- font-family: var(--text-body-sm-regular-fontFamily);
70
- font-weight: var(--text-body-sm-regular-fontWeight);
71
- font-size: var(--text-body-sm-regular-fontSize);
72
- line-height: var(--text-body-sm-regular-lineHeight);
73
- white-space: nowrap;
74
- }
75
-
76
- .muka-chat-bubble__actions {
77
- display: flex;
78
- align-items: center;
79
- gap: 0;
80
- }
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatBubble = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- require("./ChatBubble.css");
6
- /**
7
- * ChatBubble — a single chat message.
8
- *
9
- * Composes with `ChatMessageList`. For agent messages, render an `AgentTaskList`
10
- * above the bubble children if you want to show tool/task progress.
11
- */
12
- const ChatBubble = ({ variant, children, timestamp, actions, className = '', }) => {
13
- const classes = [
14
- 'muka-chat-bubble',
15
- `muka-chat-bubble--${variant}`,
16
- className,
17
- ]
18
- .filter(Boolean)
19
- .join(' ');
20
- return ((0, jsx_runtime_1.jsxs)("div", { className: classes, "data-variant": variant, children: [(0, jsx_runtime_1.jsx)("div", { className: "muka-chat-bubble__message", children: children }), (timestamp || actions) && ((0, jsx_runtime_1.jsxs)("div", { className: "muka-chat-bubble__meta", children: [timestamp && ((0, jsx_runtime_1.jsx)("span", { className: "muka-chat-bubble__timestamp", children: timestamp })), actions && ((0, jsx_runtime_1.jsx)("div", { className: "muka-chat-bubble__actions", children: actions }))] }))] }));
21
- };
22
- exports.ChatBubble = ChatBubble;
23
- exports.default = exports.ChatBubble;
24
- //# sourceMappingURL=ChatBubble.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatBubble.js","sourceRoot":"","sources":["../../../../components/ChatBubble/ChatBubble.tsx"],"names":[],"mappings":";;;;AACA,4BAA0B;AA0B1B;;;;;GAKG;AACI,MAAM,UAAU,GAA8B,CAAC,EACpD,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,kBAAkB;QAClB,qBAAqB,OAAO,EAAE;QAC9B,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,iCAAK,SAAS,EAAE,OAAO,kBAAgB,OAAO,aAC5C,gCAAK,SAAS,EAAC,2BAA2B,YAAE,QAAQ,GAAO,EAC1D,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CACzB,iCAAK,SAAS,EAAC,wBAAwB,aACpC,SAAS,IAAI,CACZ,iCAAM,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAQ,CACjE,EACA,OAAO,IAAI,CACV,gCAAK,SAAS,EAAC,2BAA2B,YAAE,OAAO,GAAO,CAC3D,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,UAAU,cA8BrB;AAEF,kBAAe,kBAAU,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChatBubble = void 0;
4
- var ChatBubble_1 = require("./ChatBubble");
5
- Object.defineProperty(exports, "ChatBubble", { enumerable: true, get: function () { return ChatBubble_1.ChatBubble; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/ChatBubble/index.ts"],"names":[],"mappings":";;;AAAA,2CAAgE;AAAvD,wGAAA,UAAU,OAAA"}
@@ -1,80 +0,0 @@
1
- /* ChatBubble Component Styles */
2
-
3
- .muka-chat-bubble {
4
- display: flex;
5
- flex-direction: column;
6
- gap: var(--spacing-1);
7
- width: 100%;
8
- max-width: 100%;
9
- }
10
-
11
- /* ─── User variant — right-aligned bubble ──────────────── */
12
-
13
- .muka-chat-bubble--user {
14
- align-items: flex-end;
15
- }
16
-
17
- .muka-chat-bubble--user .muka-chat-bubble__message {
18
- background-color: var(--color-surface-level2);
19
- color: var(--color-text-default-default);
20
- border-radius: var(--radius-lg);
21
- padding: var(--spacing-4);
22
- max-width: min(600px, 100%);
23
- word-break: break-word;
24
- }
25
-
26
- .muka-chat-bubble--user .muka-chat-bubble__meta {
27
- justify-content: flex-end;
28
- }
29
-
30
- /* ─── Agent variant — no bubble, full width ────────────── */
31
-
32
- .muka-chat-bubble--agent {
33
- align-items: flex-start;
34
- }
35
-
36
- .muka-chat-bubble--agent .muka-chat-bubble__message {
37
- color: var(--color-text-default-default);
38
- padding: 0 var(--spacing-2);
39
- width: 100%;
40
- word-break: break-word;
41
- }
42
-
43
- .muka-chat-bubble--agent .muka-chat-bubble__meta {
44
- justify-content: flex-start;
45
- }
46
-
47
- /* ─── Message typography ───────────────────────────────── */
48
-
49
- .muka-chat-bubble__message {
50
- font-family: var(--text-body-base-regular-fontFamily);
51
- font-weight: var(--text-body-base-regular-fontWeight);
52
- font-size: var(--text-body-base-regular-fontSize);
53
- line-height: var(--text-body-base-regular-lineHeight);
54
- }
55
-
56
- /* ─── Meta row (timestamp + actions) ───────────────────── */
57
-
58
- .muka-chat-bubble__meta {
59
- display: flex;
60
- align-items: center;
61
- gap: var(--spacing-1);
62
- }
63
-
64
- .muka-chat-bubble__timestamp {
65
- display: inline-flex;
66
- align-items: center;
67
- padding: 0 var(--spacing-2);
68
- color: var(--color-text-subtle-default);
69
- font-family: var(--text-body-sm-regular-fontFamily);
70
- font-weight: var(--text-body-sm-regular-fontWeight);
71
- font-size: var(--text-body-sm-regular-fontSize);
72
- line-height: var(--text-body-sm-regular-lineHeight);
73
- white-space: nowrap;
74
- }
75
-
76
- .muka-chat-bubble__actions {
77
- display: flex;
78
- align-items: center;
79
- gap: 0;
80
- }
@@ -1,20 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './ChatBubble.css';
3
- /**
4
- * ChatBubble — a single chat message.
5
- *
6
- * Composes with `ChatMessageList`. For agent messages, render an `AgentTaskList`
7
- * above the bubble children if you want to show tool/task progress.
8
- */
9
- export const ChatBubble = ({ variant, children, timestamp, actions, className = '', }) => {
10
- const classes = [
11
- 'muka-chat-bubble',
12
- `muka-chat-bubble--${variant}`,
13
- className,
14
- ]
15
- .filter(Boolean)
16
- .join(' ');
17
- return (_jsxs("div", { className: classes, "data-variant": variant, children: [_jsx("div", { className: "muka-chat-bubble__message", children: children }), (timestamp || actions) && (_jsxs("div", { className: "muka-chat-bubble__meta", children: [timestamp && (_jsx("span", { className: "muka-chat-bubble__timestamp", children: timestamp })), actions && (_jsx("div", { className: "muka-chat-bubble__actions", children: actions }))] }))] }));
18
- };
19
- export default ChatBubble;
20
- //# sourceMappingURL=ChatBubble.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatBubble.js","sourceRoot":"","sources":["../../../../components/ChatBubble/ChatBubble.tsx"],"names":[],"mappings":";AACA,OAAO,kBAAkB,CAAC;AA0B1B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,EACP,SAAS,GAAG,EAAE,GACf,EAAE,EAAE;IACH,MAAM,OAAO,GAAG;QACd,kBAAkB;QAClB,qBAAqB,OAAO,EAAE;QAC9B,SAAS;KACV;SACE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CACL,eAAK,SAAS,EAAE,OAAO,kBAAgB,OAAO,aAC5C,cAAK,SAAS,EAAC,2BAA2B,YAAE,QAAQ,GAAO,EAC1D,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CACzB,eAAK,SAAS,EAAC,wBAAwB,aACpC,SAAS,IAAI,CACZ,eAAM,SAAS,EAAC,6BAA6B,YAAE,SAAS,GAAQ,CACjE,EACA,OAAO,IAAI,CACV,cAAK,SAAS,EAAC,2BAA2B,YAAE,OAAO,GAAO,CAC3D,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatBubble } from './ChatBubble';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../components/ChatBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwB,MAAM,cAAc,CAAC"}
@@ -1,80 +0,0 @@
1
- /* ChatBubble Component Styles */
2
-
3
- .muka-chat-bubble {
4
- display: flex;
5
- flex-direction: column;
6
- gap: var(--spacing-1);
7
- width: 100%;
8
- max-width: 100%;
9
- }
10
-
11
- /* ─── User variant — right-aligned bubble ──────────────── */
12
-
13
- .muka-chat-bubble--user {
14
- align-items: flex-end;
15
- }
16
-
17
- .muka-chat-bubble--user .muka-chat-bubble__message {
18
- background-color: var(--color-surface-level2);
19
- color: var(--color-text-default-default);
20
- border-radius: var(--radius-lg);
21
- padding: var(--spacing-4);
22
- max-width: min(600px, 100%);
23
- word-break: break-word;
24
- }
25
-
26
- .muka-chat-bubble--user .muka-chat-bubble__meta {
27
- justify-content: flex-end;
28
- }
29
-
30
- /* ─── Agent variant — no bubble, full width ────────────── */
31
-
32
- .muka-chat-bubble--agent {
33
- align-items: flex-start;
34
- }
35
-
36
- .muka-chat-bubble--agent .muka-chat-bubble__message {
37
- color: var(--color-text-default-default);
38
- padding: 0 var(--spacing-2);
39
- width: 100%;
40
- word-break: break-word;
41
- }
42
-
43
- .muka-chat-bubble--agent .muka-chat-bubble__meta {
44
- justify-content: flex-start;
45
- }
46
-
47
- /* ─── Message typography ───────────────────────────────── */
48
-
49
- .muka-chat-bubble__message {
50
- font-family: var(--text-body-base-regular-fontFamily);
51
- font-weight: var(--text-body-base-regular-fontWeight);
52
- font-size: var(--text-body-base-regular-fontSize);
53
- line-height: var(--text-body-base-regular-lineHeight);
54
- }
55
-
56
- /* ─── Meta row (timestamp + actions) ───────────────────── */
57
-
58
- .muka-chat-bubble__meta {
59
- display: flex;
60
- align-items: center;
61
- gap: var(--spacing-1);
62
- }
63
-
64
- .muka-chat-bubble__timestamp {
65
- display: inline-flex;
66
- align-items: center;
67
- padding: 0 var(--spacing-2);
68
- color: var(--color-text-subtle-default);
69
- font-family: var(--text-body-sm-regular-fontFamily);
70
- font-weight: var(--text-body-sm-regular-fontWeight);
71
- font-size: var(--text-body-sm-regular-fontSize);
72
- line-height: var(--text-body-sm-regular-lineHeight);
73
- white-space: nowrap;
74
- }
75
-
76
- .muka-chat-bubble__actions {
77
- display: flex;
78
- align-items: center;
79
- gap: 0;
80
- }
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import './ChatBubble.css';
3
- export interface ChatBubbleProps {
4
- /**
5
- * Message author.
6
- * - `user` — right-aligned, level2 surface bubble
7
- * - `agent` — full-width, no bubble (text sits directly on the surface)
8
- */
9
- variant: 'user' | 'agent';
10
- /** Message body. Plain text or rich content (e.g. a markdown renderer) */
11
- children: React.ReactNode;
12
- /** Optional timestamp shown in the meta row (e.g. "19:54") */
13
- timestamp?: string;
14
- /**
15
- * Optional action buttons rendered in the meta row below the message
16
- * (typically icon-only buttons: copy, regenerate, like/dislike, edit).
17
- */
18
- actions?: React.ReactNode;
19
- /** Additional CSS classes */
20
- className?: string;
21
- }
22
- /**
23
- * ChatBubble — a single chat message.
24
- *
25
- * Composes with `ChatMessageList`. For agent messages, render an `AgentTaskList`
26
- * above the bubble children if you want to show tool/task progress.
27
- */
28
- export declare const ChatBubble: React.FC<ChatBubbleProps>;
29
- export default ChatBubble;
30
- //# sourceMappingURL=ChatBubble.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatBubble.d.ts","sourceRoot":"","sources":["../../../../components/ChatBubble/ChatBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAE1B,0EAA0E;IAC1E,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA8BhD,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export { ChatBubble, type ChatBubbleProps } from './ChatBubble';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/ChatBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC"}